kouxiangtang 0.1.33 → 0.1.34

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 (81) hide show
  1. package/README.md +411 -411
  2. package/dist/{AttachmentUploader-B7kkPU2C.js → AttachmentUploader-CGL54aBb.js} +16 -16
  3. package/dist/AttachmentUploader-CGL54aBb.js.map +1 -0
  4. package/dist/{ImageUploader-ByDQtIvq.js → ImageUploader-CcFlcSpQ.js} +15 -15
  5. package/dist/ImageUploader-CcFlcSpQ.js.map +1 -0
  6. package/dist/{ImagesUploader-D6-3HM_D.js → ImagesUploader-CG88IU_g.js} +7 -7
  7. package/dist/ImagesUploader-CG88IU_g.js.map +1 -0
  8. package/dist/{RichTextEditor-BL6xqftk.js → RichTextEditor-D4TE30tP.js} +2 -2
  9. package/dist/{RichTextEditor-BL6xqftk.js.map → RichTextEditor-D4TE30tP.js.map} +1 -1
  10. package/dist/color-DbNhHNpt.js.map +1 -1
  11. package/dist/{config-CkOTyA6M.js → config-6Nd09Jjv.js} +2 -2
  12. package/dist/config-6Nd09Jjv.js.map +1 -0
  13. package/dist/{config-Dd3jwmiE.js → config-B8Kl3wi6.js} +5 -5
  14. package/dist/config-B8Kl3wi6.js.map +1 -0
  15. package/dist/{config-8QYaFvNM.js → config-B8xbilFY.js} +15 -15
  16. package/dist/config-B8xbilFY.js.map +1 -0
  17. package/dist/{config-CVpuFBZU.js → config-BJ05VOJS.js} +2 -2
  18. package/dist/config-BJ05VOJS.js.map +1 -0
  19. package/dist/{config-QcC384MA.js → config-Bq3afnqQ.js} +2 -2
  20. package/dist/config-Bq3afnqQ.js.map +1 -0
  21. package/dist/{config-CyTeIX36.js → config-CAV930xL.js} +2 -2
  22. package/dist/config-CAV930xL.js.map +1 -0
  23. package/dist/{config-DhFx4vma.js → config-CaNnHrXu.js} +2 -2
  24. package/dist/config-CaNnHrXu.js.map +1 -0
  25. package/dist/{config-CGN5-J3g.js → config-D0bD_igE.js} +2 -2
  26. package/dist/config-D0bD_igE.js.map +1 -0
  27. package/dist/{config-HHs-1vYi.js → config-D1fFnyeg.js} +2 -2
  28. package/dist/config-D1fFnyeg.js.map +1 -0
  29. package/dist/{config-BRlZRcCp.js → config-DEU4rXLM.js} +11 -11
  30. package/dist/config-DEU4rXLM.js.map +1 -0
  31. package/dist/{config-DNjYwWf2.js → config-DEuYj7n8.js} +3 -3
  32. package/dist/config-DEuYj7n8.js.map +1 -0
  33. package/dist/{config-aPvPNn1F.js → config-DFCrgtZu.js} +2 -2
  34. package/dist/config-DFCrgtZu.js.map +1 -0
  35. package/dist/{config-Cy9I3Yww.js → config-DLUKJ00O.js} +6 -6
  36. package/dist/config-DLUKJ00O.js.map +1 -0
  37. package/dist/{config-DvLe94XY.js → config-Da7Ds_Wm.js} +2 -2
  38. package/dist/config-Da7Ds_Wm.js.map +1 -0
  39. package/dist/{config-lUL3nYIJ.js → config-DpS-vbol.js} +15 -15
  40. package/dist/config-DpS-vbol.js.map +1 -0
  41. package/dist/{config-BnpixRqt.js → config-Dtn2JkO5.js} +12 -12
  42. package/dist/config-Dtn2JkO5.js.map +1 -0
  43. package/dist/{config-Bu0VHLBr.js → config-H7UfnxyZ.js} +14 -14
  44. package/dist/config-H7UfnxyZ.js.map +1 -0
  45. package/dist/{config-BeR4PpdP.js → config-HEkYpTmG.js} +8 -8
  46. package/dist/config-HEkYpTmG.js.map +1 -0
  47. package/dist/{config-CoRLR8yc.js → config-ZqJ_p7Re.js} +3 -3
  48. package/dist/config-ZqJ_p7Re.js.map +1 -0
  49. package/dist/{config-R1n9p5mL.js → config-_n6i3lwk.js} +2 -2
  50. package/dist/config-_n6i3lwk.js.map +1 -0
  51. package/dist/{index-Bq_Z8Hm7.js → index-D5MVRDok.js} +2028 -2063
  52. package/dist/index-D5MVRDok.js.map +1 -0
  53. package/dist/kouxiangtang.js +16 -18
  54. package/dist/kouxiangtang.umd.cjs +9 -9
  55. package/dist/kouxiangtang.umd.cjs.map +1 -1
  56. package/dist/style.css +1 -1
  57. package/package.json +56 -56
  58. package/dist/AttachmentUploader-B7kkPU2C.js.map +0 -1
  59. package/dist/ImageUploader-ByDQtIvq.js.map +0 -1
  60. package/dist/ImagesUploader-D6-3HM_D.js.map +0 -1
  61. package/dist/config-8QYaFvNM.js.map +0 -1
  62. package/dist/config-BRlZRcCp.js.map +0 -1
  63. package/dist/config-BeR4PpdP.js.map +0 -1
  64. package/dist/config-BnpixRqt.js.map +0 -1
  65. package/dist/config-Bu0VHLBr.js.map +0 -1
  66. package/dist/config-CGN5-J3g.js.map +0 -1
  67. package/dist/config-CVpuFBZU.js.map +0 -1
  68. package/dist/config-CkOTyA6M.js.map +0 -1
  69. package/dist/config-CoRLR8yc.js.map +0 -1
  70. package/dist/config-Cy9I3Yww.js.map +0 -1
  71. package/dist/config-CyTeIX36.js.map +0 -1
  72. package/dist/config-DNjYwWf2.js.map +0 -1
  73. package/dist/config-Dd3jwmiE.js.map +0 -1
  74. package/dist/config-DhFx4vma.js.map +0 -1
  75. package/dist/config-DvLe94XY.js.map +0 -1
  76. package/dist/config-HHs-1vYi.js.map +0 -1
  77. package/dist/config-QcC384MA.js.map +0 -1
  78. package/dist/config-R1n9p5mL.js.map +0 -1
  79. package/dist/config-aPvPNn1F.js.map +0 -1
  80. package/dist/config-lUL3nYIJ.js.map +0 -1
  81. package/dist/index-Bq_Z8Hm7.js.map +0 -1
@@ -1,10 +1,10 @@
1
- (function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H.kouxiangtang={},H.Vue,H.ElementPlus,H.VueRouter,H.Pinia,H.Quill))})(this,function(H,e,w,z,De,mn){"use strict";function ts(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const Rt=ts(mn);function $r(o,t){return function(){return o.apply(t,arguments)}}const{toString:ns}=Object.prototype,{getPrototypeOf:co}=Object,gn=(o=>t=>{const n=ns.call(t);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Te=o=>(o=o.toLowerCase(),t=>gn(t)===o),_n=o=>t=>typeof t===o,{isArray:gt}=Array,It=_n("undefined");function os(o){return o!==null&&!It(o)&&o.constructor!==null&&!It(o.constructor)&&ye(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Vr=Te("ArrayBuffer");function rs(o){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(o):t=o&&o.buffer&&Vr(o.buffer),t}const as=_n("string"),ye=_n("function"),Or=_n("number"),yn=o=>o!==null&&typeof o=="object",ss=o=>o===!0||o===!1,bn=o=>{if(gn(o)!=="object")return!1;const t=co(o);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in o)&&!(Symbol.iterator in o)},is=Te("Date"),ls=Te("File"),cs=Te("Blob"),ds=Te("FileList"),us=o=>yn(o)&&ye(o.pipe),fs=o=>{let t;return o&&(typeof FormData=="function"&&o instanceof FormData||ye(o.append)&&((t=gn(o))==="formdata"||t==="object"&&ye(o.toString)&&o.toString()==="[object FormData]"))},ps=Te("URLSearchParams"),hs=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mt(o,t,{allOwnKeys:n=!1}={}){if(o===null||typeof o>"u")return;let r,s;if(typeof o!="object"&&(o=[o]),gt(o))for(r=0,s=o.length;r<s;r++)t.call(null,o[r],r,o);else{const a=n?Object.getOwnPropertyNames(o):Object.keys(o),i=a.length;let c;for(r=0;r<i;r++)c=a[r],t.call(null,o[c],c,o)}}function Dr(o,t){t=t.toLowerCase();const n=Object.keys(o);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Tr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nr=o=>!It(o)&&o!==Tr;function uo(){const{caseless:o}=Nr(this)&&this||{},t={},n=(r,s)=>{const a=o&&Dr(t,s)||s;bn(t[a])&&bn(r)?t[a]=uo(t[a],r):bn(r)?t[a]=uo({},r):gt(r)?t[a]=r.slice():t[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Mt(arguments[r],n);return t}const ms=(o,t,n,{allOwnKeys:r}={})=>(Mt(t,(s,a)=>{n&&ye(s)?o[a]=$r(s,n):o[a]=s},{allOwnKeys:r}),o),gs=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),_s=(o,t,n,r)=>{o.prototype=Object.create(t.prototype,r),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:t.prototype}),n&&Object.assign(o.prototype,n)},ys=(o,t,n,r)=>{let s,a,i;const c={};if(t=t||{},o==null)return t;do{for(s=Object.getOwnPropertyNames(o),a=s.length;a-- >0;)i=s[a],(!r||r(i,o,t))&&!c[i]&&(t[i]=o[i],c[i]=!0);o=n!==!1&&co(o)}while(o&&(!n||n(o,t))&&o!==Object.prototype);return t},bs=(o,t,n)=>{o=String(o),(n===void 0||n>o.length)&&(n=o.length),n-=t.length;const r=o.indexOf(t,n);return r!==-1&&r===n},ws=o=>{if(!o)return null;if(gt(o))return o;let t=o.length;if(!Or(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=o[t];return n},ks=(o=>t=>o&&t instanceof o)(typeof Uint8Array<"u"&&co(Uint8Array)),Es=(o,t)=>{const r=(o&&o[Symbol.iterator]).call(o);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(o,a[0],a[1])}},xs=(o,t)=>{let n;const r=[];for(;(n=o.exec(t))!==null;)r.push(n);return r},Bs=Te("HTMLFormElement"),Ss=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Fr=(({hasOwnProperty:o})=>(t,n)=>o.call(t,n))(Object.prototype),Cs=Te("RegExp"),Ar=(o,t)=>{const n=Object.getOwnPropertyDescriptors(o),r={};Mt(n,(s,a)=>{let i;(i=t(s,a,o))!==!1&&(r[a]=i||s)}),Object.defineProperties(o,r)},$s=o=>{Ar(o,(t,n)=>{if(ye(o)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=o[n];if(ye(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vs=(o,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return gt(o)?r(o):r(String(o).split(t)),n},Os=()=>{},Ds=(o,t)=>(o=+o,Number.isFinite(o)?o:t),fo="abcdefghijklmnopqrstuvwxyz",jr="0123456789",Rr={DIGIT:jr,ALPHA:fo,ALPHA_DIGIT:fo+fo.toUpperCase()+jr},Ts=(o=16,t=Rr.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;o--;)n+=t[Math.random()*r|0];return n};function Ns(o){return!!(o&&ye(o.append)&&o[Symbol.toStringTag]==="FormData"&&o[Symbol.iterator])}const Fs=o=>{const t=new Array(10),n=(r,s)=>{if(yn(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const a=gt(r)?[]:{};return Mt(r,(i,c)=>{const d=n(i,s+1);!It(d)&&(a[c]=d)}),t[s]=void 0,a}}return r};return n(o,0)},As=Te("AsyncFunction"),V={isArray:gt,isArrayBuffer:Vr,isBuffer:os,isFormData:fs,isArrayBufferView:rs,isString:as,isNumber:Or,isBoolean:ss,isObject:yn,isPlainObject:bn,isUndefined:It,isDate:is,isFile:ls,isBlob:cs,isRegExp:Cs,isFunction:ye,isStream:us,isURLSearchParams:ps,isTypedArray:ks,isFileList:ds,forEach:Mt,merge:uo,extend:ms,trim:hs,stripBOM:gs,inherits:_s,toFlatObject:ys,kindOf:gn,kindOfTest:Te,endsWith:bs,toArray:ws,forEachEntry:Es,matchAll:xs,isHTMLForm:Bs,hasOwnProperty:Fr,hasOwnProp:Fr,reduceDescriptors:Ar,freezeMethods:$s,toObjectSet:Vs,toCamelCase:Ss,noop:Os,toFiniteNumber:Ds,findKey:Dr,global:Tr,isContextDefined:Nr,ALPHABET:Rr,generateString:Ts,isSpecCompliantForm:Ns,toJSONObject:Fs,isAsyncFn:As,isThenable:o=>o&&(yn(o)||ye(o))&&ye(o.then)&&ye(o.catch)};function q(o,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}V.inherits(q,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:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ir=q.prototype,Mr={};["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(o=>{Mr[o]={value:o}}),Object.defineProperties(q,Mr),Object.defineProperty(Ir,"isAxiosError",{value:!0}),q.from=(o,t,n,r,s,a)=>{const i=Object.create(Ir);return V.toFlatObject(o,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),q.call(i,o.message,t,n,r,s),i.cause=o,i.name=o.name,a&&Object.assign(i,a),i};const js=null;function po(o){return V.isPlainObject(o)||V.isArray(o)}function Lr(o){return V.endsWith(o,"[]")?o.slice(0,-2):o}function Ur(o,t,n){return o?o.concat(t).map(function(s,a){return s=Lr(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Rs(o){return V.isArray(o)&&!o.some(po)}const Is=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function wn(o,t,n){if(!V.isObject(o))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,x){return!V.isUndefined(x[m])});const r=n.metaTokens,s=n.visitor||f,a=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(V.isDate(y))return y.toISOString();if(!d&&V.isBlob(y))throw new q("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(y)||V.isTypedArray(y)?d&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,m,x){let k=y;if(y&&!x&&typeof y=="object"){if(V.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=JSON.stringify(y);else if(V.isArray(y)&&Rs(y)||(V.isFileList(y)||V.endsWith(m,"[]"))&&(k=V.toArray(y)))return m=Lr(m),k.forEach(function(B,S){!(V.isUndefined(B)||B===null)&&t.append(i===!0?Ur([m],S,a):i===null?m:m+"[]",u(B))}),!1}return po(y)?!0:(t.append(Ur(x,m,a),u(y)),!1)}const h=[],_=Object.assign(Is,{defaultVisitor:f,convertValue:u,isVisitable:po});function E(y,m){if(!V.isUndefined(y)){if(h.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(y),V.forEach(y,function(k,g){(!(V.isUndefined(k)||k===null)&&s.call(t,k,V.isString(g)?g.trim():g,m,_))===!0&&E(k,m?m.concat(g):[g])}),h.pop()}}if(!V.isObject(o))throw new TypeError("data must be an object");return E(o),t}function zr(o){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ho(o,t){this._pairs=[],o&&wn(o,this,t)}const Hr=ho.prototype;Hr.append=function(t,n){this._pairs.push([t,n])},Hr.toString=function(t){const n=t?function(r){return t.call(this,r,zr)}:zr;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ms(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pr(o,t,n){if(!t)return o;const r=n&&n.encode||Ms,s=n&&n.serialize;let a;if(s?a=s(t,n):a=V.isURLSearchParams(t)?t.toString():new ho(t,n).toString(r),a){const i=o.indexOf("#");i!==-1&&(o=o.slice(0,i)),o+=(o.indexOf("?")===-1?"?":"&")+a}return o}class qr{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ls={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ho,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Gr=typeof window<"u"&&typeof document<"u",Us=(o=>Gr&&["ReactNative","NativeScript","NS"].indexOf(o)<0)(typeof navigator<"u"&&navigator.product),zs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ne={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Gr,hasStandardBrowserEnv:Us,hasStandardBrowserWebWorkerEnv:zs},Symbol.toStringTag,{value:"Module"})),...Ls};function Hs(o,t){return wn(o,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,a){return Ne.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ps(o){return V.matchAll(/\w+|\[(\w*)]/g,o).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qs(o){const t={},n=Object.keys(o);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=o[a];return t}function Qr(o){function t(n,r,s,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=a>=n.length;return i=!i&&V.isArray(s)?s.length:i,d?(V.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!V.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],a)&&V.isArray(s[i])&&(s[i]=qs(s[i])),!c)}if(V.isFormData(o)&&V.isFunction(o.entries)){const n={};return V.forEachEntry(o,(r,s)=>{t(Ps(r),s,n,0)}),n}return null}function Ws(o,t,n){if(V.isString(o))try{return(t||JSON.parse)(o),V.trim(o)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(o)}const Lt={transitional:Wr,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return s?JSON.stringify(Qr(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Hs(t,this.formSerializer).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return wn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),Ws(t)):t}],transformResponse:[function(t){const n=this.transitional||Lt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&V.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?q.from(c,q.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:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],o=>{Lt.headers[o]={}});const Gs=V.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"]),Qs=o=>{const t={};let n,r,s;return o&&o.split(`
2
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Gs[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Yr=Symbol("internals");function Ut(o){return o&&String(o).trim().toLowerCase()}function kn(o){return o===!1||o==null?o:V.isArray(o)?o.map(kn):String(o)}function Ys(o){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(o);)t[r[1]]=r[2];return t}const Ks=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function mo(o,t,n,r,s){if(V.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function Js(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Xs(o,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(o,r+n,{value:function(s,a,i){return this[r].call(this,t,s,a,i)},configurable:!0})})}class be{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,u){const f=Ut(d);if(!f)throw new Error("header name must be a non-empty string");const h=V.findKey(s,f);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||d]=kn(c))}const i=(c,d)=>V.forEach(c,(u,f)=>a(u,f,d));return V.isPlainObject(t)||t instanceof this.constructor?i(t,n):V.isString(t)&&(t=t.trim())&&!Ks(t)?i(Qs(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Ut(t),t){const r=V.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ys(s);if(V.isFunction(n))return n.call(this,s,r);if(V.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ut(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||mo(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(i){if(i=Ut(i),i){const c=V.findKey(r,i);c&&(!n||mo(r,r[c],c,n))&&(delete r[c],s=!0)}}return V.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||mo(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return V.forEach(this,(s,a)=>{const i=V.findKey(r,a);if(i){n[i]=kn(s),delete n[a];return}const c=t?Js(a):String(a).trim();c!==a&&delete n[a],n[c]=kn(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Yr]=this[Yr]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ut(i);r[c]||(Xs(s,i),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}}be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(be.prototype,({value:o},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>o,set(r){this[n]=r}}}),V.freezeMethods(be);function go(o,t){const n=this||Lt,r=t||n,s=be.from(r.headers);let a=r.data;return V.forEach(o,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Kr(o){return!!(o&&o.__CANCEL__)}function zt(o,t,n){q.call(this,o??"canceled",q.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(zt,q,{__CANCEL__:!0});function Zs(o,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?o(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vs=Ne.hasStandardBrowserEnv?{write(o,t,n,r,s,a){const i=[o+"="+encodeURIComponent(t)];V.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),V.isString(r)&&i.push("path="+r),V.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(o){const t=document.cookie.match(new RegExp("(^|;\\s*)("+o+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(o){this.write(o,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ei(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function ti(o,t){return t?o.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):o}function Jr(o,t){return o&&!ei(t)?ti(o,t):t}const ni=Ne.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;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 r=s(window.location.href),function(i){const c=V.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function oi(o){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return t&&t[1]||""}function ri(o,t){o=o||10;const n=new Array(o),r=new Array(o);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),f=r[a];i||(i=u),n[s]=d,r[s]=u;let h=a,_=0;for(;h!==s;)_+=n[h++],h=h%o;if(s=(s+1)%o,s===a&&(a=(a+1)%o),u-i<t)return;const E=f&&u-f;return E?Math.round(_*1e3/E):void 0}}function Xr(o,t){let n=0;const r=ri(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=r(c),u=a<=i;n=a;const f={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&u?(i-a)/d:void 0,event:s};f[t?"download":"upload"]=!0,o(f)}}const _o={http:js,xhr:typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(n,r){let s=o.data;const a=be.from(o.headers).normalize();let{responseType:i,withXSRFToken:c}=o,d;function u(){o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let f;if(V.isFormData(s)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[m,...x]=f?f.split(";").map(k=>k.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...x].join("; "))}}let h=new XMLHttpRequest;if(o.auth){const m=o.auth.username||"",x=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+x))}const _=Jr(o.baseURL,o.url);h.open(o.method.toUpperCase(),Pr(_,o.params,o.paramsSerializer),!0),h.timeout=o.timeout;function E(){if(!h)return;const m=be.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:m,config:o,request:h};Zs(function(B){n(B),u()},function(B){r(B),u()},k),h=null}if("onloadend"in h?h.onloadend=E:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(E)},h.onabort=function(){h&&(r(new q("Request aborted",q.ECONNABORTED,o,h)),h=null)},h.onerror=function(){r(new q("Network Error",q.ERR_NETWORK,o,h)),h=null},h.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Wr;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new q(x,k.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,o,h)),h=null},Ne.hasStandardBrowserEnv&&(c&&V.isFunction(c)&&(c=c(o)),c||c!==!1&&ni(_))){const m=o.xsrfHeaderName&&o.xsrfCookieName&&vs.read(o.xsrfCookieName);m&&a.set(o.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in h&&V.forEach(a.toJSON(),function(x,k){h.setRequestHeader(k,x)}),V.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&h.addEventListener("progress",Xr(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",Xr(o.onUploadProgress)),(o.cancelToken||o.signal)&&(d=m=>{h&&(r(!m||m.type?new zt(null,o,h):m),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const y=oi(_);if(y&&Ne.protocols.indexOf(y)===-1){r(new q("Unsupported protocol "+y+":",q.ERR_BAD_REQUEST,o));return}h.send(s||null)})}};V.forEach(_o,(o,t)=>{if(o){try{Object.defineProperty(o,"name",{value:t})}catch{}Object.defineProperty(o,"adapterName",{value:t})}});const Zr=o=>`- ${o}`,ai=o=>V.isFunction(o)||o===null||o===!1,vr={getAdapter:o=>{o=V.isArray(o)?o:[o];const{length:t}=o;let n,r;const s={};for(let a=0;a<t;a++){n=o[a];let i;if(r=n,!ai(n)&&(r=_o[(i=String(n)).toLowerCase()],r===void 0))throw new q(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+a]=r}if(!r){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(Zr).join(`
5
- `):" "+Zr(a[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:_o};function yo(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new zt(null,o)}function ea(o){return yo(o),o.headers=be.from(o.headers),o.data=go.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),vr.getAdapter(o.adapter||Lt.adapter)(o).then(function(r){return yo(o),r.data=go.call(o,o.transformResponse,r),r.headers=be.from(r.headers),r},function(r){return Kr(r)||(yo(o),r&&r.response&&(r.response.data=go.call(o,o.transformResponse,r.response),r.response.headers=be.from(r.response.headers))),Promise.reject(r)})}const ta=o=>o instanceof be?{...o}:o;function _t(o,t){t=t||{};const n={};function r(u,f,h){return V.isPlainObject(u)&&V.isPlainObject(f)?V.merge.call({caseless:h},u,f):V.isPlainObject(f)?V.merge({},f):V.isArray(f)?f.slice():f}function s(u,f,h){if(V.isUndefined(f)){if(!V.isUndefined(u))return r(void 0,u,h)}else return r(u,f,h)}function a(u,f){if(!V.isUndefined(f))return r(void 0,f)}function i(u,f){if(V.isUndefined(f)){if(!V.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function c(u,f,h){if(h in t)return r(u,f);if(h in o)return r(void 0,u)}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:(u,f)=>s(ta(u),ta(f),!0)};return V.forEach(Object.keys(Object.assign({},o,t)),function(f){const h=d[f]||s,_=h(o[f],t[f],f);V.isUndefined(_)&&h!==c||(n[f]=_)}),n}const na="1.6.8",bo={};["object","boolean","number","function","string","symbol"].forEach((o,t)=>{bo[o]=function(r){return typeof r===o||"a"+(t<1?"n ":" ")+o}});const oa={};bo.transitional=function(t,n,r){function s(a,i){return"[Axios v"+na+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,c)=>{if(t===!1)throw new q(s(i," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!oa[i]&&(oa[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 si(o,t,n){if(typeof o!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(o);let s=r.length;for(;s-- >0;){const a=r[s],i=t[a];if(i){const c=o[a],d=c===void 0||i(c,a,o);if(d!==!0)throw new q("option "+a+" must be "+d,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+a,q.ERR_BAD_OPTION)}}const wo={assertOptions:si,validators:bo},ve=wo.validators;class st{constructor(t){this.defaults=t,this.interceptors={request:new qr,response:new qr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+a):r.stack=a}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&wo.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&(V.isFunction(s)?n.paramsSerializer={serialize:s}:wo.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=be.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let f,h=0,_;if(!d){const y=[ea.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,u),_=y.length,f=Promise.resolve(n);h<_;)f=f.then(y[h++],y[h++]);return f}_=c.length;let E=n;for(h=0;h<_;){const y=c[h++],m=c[h++];try{E=y(E)}catch(x){m.call(this,x);break}}try{f=ea.call(this,E)}catch(y){return Promise.reject(y)}for(h=0,_=u.length;h<_;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=_t(this.defaults,t);const n=Jr(t.baseURL,t.url);return Pr(n,t.params,t.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,r){return this.request(_t(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class ko{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 r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(s);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new zt(a,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ko(function(s){t=s}),cancel:t}}}function ii(o){return function(n){return o.apply(null,n)}}function li(o){return V.isObject(o)&&o.isAxiosError===!0}const Eo={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(Eo).forEach(([o,t])=>{Eo[t]=o});function ra(o){const t=new st(o),n=$r(st.prototype.request,t);return V.extend(n,st.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ra(_t(o,s))},n}const v=ra(Lt);v.Axios=st,v.CanceledError=zt,v.CancelToken=ko,v.isCancel=Kr,v.VERSION=na,v.toFormData=wn,v.AxiosError=q,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ii,v.isAxiosError=li,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Qr(V.isHTMLForm(o)?new FormData(o):o),v.getAdapter=vr.getAdapter,v.HttpStatusCode=Eo,v.default=v;let yt=null;function ci(o){yt=v.create(o)}function di(){return yt}async function ui(o,t={},n={}){return new Promise((r,s)=>{yt.get(o,{headers:n,params:t}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function fi(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function pi(o,t,n={}){return new Promise((r,s)=>{yt.delete(o,{data:t,headers:n}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function hi(o,t,n={}){return new Promise((r,s)=>{yt.put(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}const he={get:ui,post:fi,put:hi,remove:pi,setupAxios:ci,getAxiosInstance:di};var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function mi(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sa={exports:{}};(function(o,t){(function(n,r){typeof mi=="function"?o.exports=r():n.pluralize=r()})(ae,function(){var n=[],r=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function u(m,x){return m.replace(/\$(\d{1,2})/g,function(k,g){return x[g]||""})}function f(m,x){return m.replace(x[0],function(k,g){var B=u(x[1],arguments);return d(k===""?m[g-1]:k,B)})}function h(m,x,k){if(!m.length||s.hasOwnProperty(m))return x;for(var g=k.length;g--;){var B=k[g];if(B[0].test(x))return f(x,B)}return x}function _(m,x,k){return function(g){var B=g.toLowerCase();return x.hasOwnProperty(B)?d(g,B):m.hasOwnProperty(B)?d(g,m[B]):h(B,g,k)}}function E(m,x,k,g){return function(B){var S=B.toLowerCase();return x.hasOwnProperty(S)?!0:m.hasOwnProperty(S)?!1:h(S,S,k)===S}}function y(m,x,k){var g=x===1?y.singular(m):y.plural(m);return(k?x+" ":"")+g}return y.plural=_(i,a,n),y.isPlural=E(i,a,n),y.singular=_(a,i,r),y.isSingular=E(a,i,r),y.addPluralRule=function(m,x){n.push([c(m),x])},y.addSingularRule=function(m,x){r.push([c(m),x])},y.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}y.addPluralRule(m,"$0"),y.addSingularRule(m,"$0")},y.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["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(m){return y.addIrregularRule(m[0],m[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(m){return y.addPluralRule(m[0],m[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(m){return y.addSingularRule(m[0],m[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})})(sa);var gi=sa.exports;const ia=aa(gi),xo=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),En="GET_LIST",xn="GET_ONE",Bn="CREATE",Sn="UPDATE",bt="REMOVE",Bo="RESTORE",la="ENABLE",_i=[En,xn,Bn,Sn,bt,la];class yi{constructor(t,n,r=_i){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=ia(n),this.operations=r,this.operations.forEach(s=>{const a=xo(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return he.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return he.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return he.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Sn)){console.log(`${this.side}/${this.domain} 不支持 ${Sn} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(Bo)){console.log(`${this.side}/${this.domain} 不支持 ${Bo} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class bi{constructor(t,n,r){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=ia(n),this.listQuerys=r}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),he.get(`${this.side}/${this.resources}`,n)}getOne(t){return he.get(`${this.side}/${this.resources}/${t.id}`)}}const wi={Client:yi,ReadOnlyClient:bi,GET_LIST:En,GET_ONE:xn,CREATE:Bn,UPDATE:Sn,REMOVE:bt,RESTORE:Bo,ENABLE:la},ki=(o,t,n)=>{const r=o[t];return r?typeof r=="function"?r():Promise.resolve(r):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.":""))))})},Ei=["createdAt","updatedAt","deletedAt"];class ee{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.info=t.info?"("+(t==null?void 0:t.info)+")":"",this.label=t.label+this.info,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.placeholder=t.placeholder||"",this.prefix=t.prefix||"",this.suffix=t.suffix||"",this.extendDetail=t.extendDetail||!1,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.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss",this.change=(t==null?void 0:t.change)||null,this.waterMark=(t==null?void 0:t.waterMark)||"",this.elConfig=(t==null?void 0:t.elConfig)||{}}computeWidth(t){return t.width?t.width:Ei.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),r=Object.getOwnPropertyNames(this);if(n.every(a=>r.includes(a)))return;const s=n.filter(a=>!r.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 ca(o,t,n){console.warn(`${o}.${t} => ${n}`)}const So={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},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"},"radio-group":{config:"radio-group"},component:{config:"component"},"input-number":{config:"input-number"}};async function da(o,t,n){const r=await ki(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>Td),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>Rd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>zd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>Gd),"./field/component/config.js":()=>Promise.resolve().then(()=>Yd),"./field/date/config.js":()=>Promise.resolve().then(()=>vd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>ru),"./field/image/config.js":()=>Promise.resolve().then(()=>fu),"./field/images/config.js":()=>Promise.resolve().then(()=>wu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>Su),"./field/json/config.js":()=>Promise.resolve().then(()=>Ou),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>qu),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Xu),"./field/row-id/config.js":()=>Promise.resolve().then(()=>vu),"./field/select/config.js":()=>Promise.resolve().then(()=>rf),"./field/string/config.js":()=>Promise.resolve().then(()=>ff),"./field/switch/config.js":()=>Promise.resolve().then(()=>_f),"./field/text/config.js":()=>Promise.resolve().then(()=>Ef),"./field/time/config.js":()=>Promise.resolve().then(()=>$f),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Tf)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function Cn(o,t="unknown"){return o==null?void 0:o.map(r=>{if(r instanceof ee)return r;if(r.code==="id"?r.type="row-id":r.component&&(r.type="component"),Object.keys(So).includes(r.type)){const s=So[r.type];return s.deprecated&&ca(r.domain||t,r.code,s.deprecated),da(So[r.type].config,r,r.domain||t)}return da("string",r,r.domain||t)})}let $n={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function xi(o){$n={...$n,...o},wt=o.domainConfigs}function Bi(o){Object.keys(wt).forEach(t=>{const n=wt[t];Object.keys(n).forEach(r=>{const s=n[r];s.load=o(t,r)})})}function et(){return $n}function Ht(o){var t;return o?((((t=$n.sideMenus)==null?void 0:t.btns)||{})[o]||[]).reduce((r,s)=>(r[s]=!0,r),{}):{}}function Co(){return wt}function Pt(o,t){return wt[o][t].load().then(n=>wt[o][t].load().then(r=>{const s=r.default;return Promise.all(s.fields).then(a=>{var i;if(s.fields=a,((i=s.detailGroupFields)==null?void 0:i.length)>0){const c=s.detailGroupFields.map(d=>{var u;return((u=d.childrenFields)==null?void 0:u.length)>0?Promise.all(d.childrenFields).then(f=>(d.childrenFields=f,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class Si{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=Cn(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:Cn(a.childrenFields,r.code)})),!r.simple&&(this.name=Co()[t][r.code].name,this.filters=r.filters||[],this.coverField=r.coverField,this.nameField=r.nameField||"name",this.showSubmit=r.showSubmit||!0,this.showEdit=this.setupShowEdit(r.showEdit),this.submitConfirm=r.submitConfirm,this.removeConfirm=r.removeConfirm,this.showCreate=this.setupShowCreate(r.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=r.detailSubType?"list":"tabs",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||[],this.displayMode=n.displayMode||{},this.showPagination=n.showPagination??!0,this.extendTableColumnfields=n.extendTableColumnfields||null,this.formStyleConfig=this.getFormStyleConfig(n.formConfig),this.delText=n.delText||"确定要删除该条数据吗?",this.showDetailInfo=n.showDetailInfo)}wrapFields(t,n){return Cn(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:n.id?`#${n.id}`:""}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const r=t.hasOne(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const r=t.hasMany(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const r=t.pageActions(n);return Array.isArray(r)?r:(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 r=t.rowActions(n);return Array.isArray(r)?r:(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}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,r)=>t(n,r):()=>!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 r=>{const s=this.showCreate(r);return{...n,creatable:n.creatable&&s}}}getFormStyleConfig(t){return{...{labelPosition:"top",labelWidth:100},...t||{}}}}function ua(o,t){return new Si(o,t)}const Ci={install:o=>{o.directive("auth",{mounted:function(t,n){n.value||t.parentNode.removeChild(t)}})}},I=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},$i={class:"card-header"},Vi={class:"title"},fa=I({__name:"Widget",props:{title:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(w.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",$i,[e.createElementVNode("span",Vi,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),Oi={key:0},Di={key:1},Ti={key:0},Ni={key:1},pa=I({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(o){const t=o;let n="#f7faff",r="10px";return t.background&&(n=t.background,n=="none"&&(r="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(r)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",Oi,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Di,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Ti,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Ni,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),Fi=I({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(fa,null,{default:e.withCtx(()=>[e.createVNode(pa,{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"]]),Ai={},ji={style:{padding:"20px 0"}};function Ri(o,t){return e.openBlock(),e.createElementBlock("div",ji,[e.renderSlot(o.$slots,"default")])}const Ii=I(Ai,[["render",Ri]]),Mi=I({__name:"DashboardRow",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);/*! Element Plus Icons Vue v2.3.1 */var Li=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(o){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"})]))}}),Ui=Li,zi=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){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"})]))}}),Hi=zi,Pi=e.defineComponent({name:"CirclePlus",__name:"circle-plus",setup(o){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:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),e.createElementVNode("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),qi=Pi,Wi=e.defineComponent({name:"Close",__name:"close",setup(o){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"})]))}}),ha=Wi,Gi=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(o){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"})]))}}),ma=Gi,Qi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(o){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=Qi,Ki=e.defineComponent({name:"Delete",__name:"delete",setup(o){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"})]))}}),ga=Ki,Ji=e.defineComponent({name:"Document",__name:"document",setup(o){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"})]))}}),_a=Ji,Xi=e.defineComponent({name:"Download",__name:"download",setup(o){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"})]))}}),Zi=Xi,vi=e.defineComponent({name:"EditPen",__name:"edit-pen",setup(o){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:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),el=vi,tl=e.defineComponent({name:"Finished",__name:"finished",setup(o){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:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),nl=tl,ol=e.defineComponent({name:"Grid",__name:"grid",setup(o){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"})]))}}),rl=ol,al=e.defineComponent({name:"Loading",__name:"loading",setup(o){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"})]))}}),ya=al,sl=e.defineComponent({name:"Minus",__name:"minus",setup(o){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(o){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(o){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"})]))}}),$o=dl,ul=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(o){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"})]))}}),ba=ul,fl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(o){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:"Refresh",__name:"refresh",setup(o){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:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),ml=hl,gl=e.defineComponent({name:"Search",__name:"search",setup(o){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:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),_l=gl,yl=e.defineComponent({name:"Setting",__name:"setting",setup(o){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"})]))}}),bl=yl,wl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(o){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"})]))}}),kl=wl,El=e.defineComponent({name:"View",__name:"view",setup(o){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"})]))}}),xl=El;function Y(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=xo(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Bl(o){const t=o.length,n=Math.floor(24/t);return{type:"row",cols:o.map(s=>({type:"col",span:n,field:s}))}}function Vo(o){return o.map(t=>Bl(t))}const Sl={key:0,class:"classify-wrap"},Cl=I({__name:"FormLayout",props:{layout:Object,fields:Array},setup(o){const t=o,n=e.computed(()=>{var a;if(t.layout.length==0){if(((a=t.fields)==null?void 0:a.filter(d=>{var u;return!((u=d.code)!=null&&u.includes("classify"))}).length)<=6){const d=s(t.fields,1);return Vo(d)}console.log(t.fields);const c=s(t.fields,2);return Vo(c)}return t.layout});function r(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){var u;const c=a.map(f=>f.code),d=[];if(i==2)for(let f=0;f<c.length;f+=i)c[f].includes("classify")?(d.push([c[f]]),c.splice(c[f].includes("classify")?f:f+1,1),f-=i):(u=c[f+1])!=null&&u.includes("classify")?(d.push([c[f]]),d.push([c[f+1]])):d.push(c.slice(f,f+i));else 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(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>{var u,f,h;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(u=r(d.field))!=null&&u.wholeRow?24:((f=c.cols)==null?void 0:f.length)==1&&!((h=d.field)!=null&&h.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var _,E;return[(_=d.field)!=null&&_.includes("classify")&&((E=r(d.field))!=null&&E.label)?(e.openBlock(),e.createElementBlock("div",Sl,e.toDisplayString(r(d.field).label),1)):e.renderSlot(a.$slots,"default",{key:1,field:r(d.field)},void 0,!0)]}),_:2},1032,["span"])}),256))]),_:2},1024))),256))]))}},[["__scopeId","data-v-16950b22"]]),$l={style:{width:"100%"}},Vl={class:"footer"},Ol={key:1},Dl=I({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=e.ref(!1),i=o,c=Vo(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},u=e.reactive({...i.data}),f=e.ref(null),h=Ht(i.config.code),_=i.config.fields.filter(C=>C.rules).reduce((C,O)=>(C[O.code]=m(O.rules),C),{}),E=e.computed(S),y=e.computed(()=>i.config.fields.filter(C=>{const O=C.editable(u,r),M=C.visible(u,r);return C.disabled=M&&!O,O||M}));function m(C){return typeof C=="object"?C:typeof C=="function"?C(u):[]}function x(C){a.value=!0,s("submit",C,u,()=>{a.value=!1})}async function k(){await f.value.validate(async(C,O)=>{var ne,J;if(!C)return console.log("error submit!",O),!1;const M=(ne=i.config.fields.find(D=>["images","attachments","attachment"].includes(D.type)))==null?void 0:ne.code,A={...u};if(M&&(A[M]=(J=A[M])==null?void 0:J.map(D=>D.id)),i.config.submitConfirm){await i.config.submitConfirm(A)&&x(A);return}x(A)})}function g(){s("remove",u)}function B(){if(i.config.removeConfirm){i.config.removeConfirm(u,g);return}w.ElMessageBox.confirm(i.config.delText,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{g()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const C=i.config.showSubmit;return typeof C=="boolean"?C:typeof C=="function"?C(r,u):!0}return e.watch(()=>({...u}),(C,O)=>{const A=Object.keys(C).filter(J=>O[J]!==C[J]).map(J=>{var D;return(D=f.value)==null||D.clearValidate(J),{field:J,newValue:C[J],oldValue:O[J]}});y.value.filter(J=>!J.disabled).forEach(J=>{J.formChange&&J.formChange(u,A)})}),e.watch(()=>i.data,C=>{Object.keys(C).forEach(O=>{u[O]=C[O]})},{immediate:!0}),(C,O)=>{const M=e.resolveDirective("auth");return e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:f,model:u,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(_)},{default:e.withCtx(()=>[e.createVNode(Cl,{layout:e.unref(c),fields:y.value},{default:e.withCtx(({field:A})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:A.code,label:A.label,prop:A.code},{default:e.withCtx(()=>[e.createElementVNode("div",$l,[A!=null&&A.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A.editor),{key:0,modelValue:u[A.code],"onUpdate:modelValue":ne=>u[A.code]=ne,field:A,disabled:A.disabled,"form-data":u,"domain-config":i.config,row:u},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${A.code}(${A.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Vl,[u.id&&!u.deletedAt&&i.removable?e.withDirectives((e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",icon:e.unref(ga),plain:"",type:"danger",onClick:B},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1},8,["icon"])),[[M,e.unref(h).delete]]):(e.openBlock(),e.createElementBlock("div",Ol)),E.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",icon:e.unref(nl),type:"primary",loading:a.value,onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["icon","loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"])}}},[["__scopeId","data-v-95166445"]]);function Tl(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const qt={getValue:Tl},Nl={style:{"font-weight":"700","font-size":"22px",color:"#333"}},Vn={__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(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:u.value})),d=e.computed(()=>a.config.fields.filter(m=>{var x;if(!((x=m.code)!=null&&x.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),u=e.ref(""),f=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),h=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`新增${a.config.name}`);function _(y,m,x){i.value=m,s("submit",y,async()=>{u.value=await qt.getValue(),x()})}function E(y,m){s("remove",y,async()=>{u.value=await qt.getValue(),m()})}return e.watch(()=>f,async()=>{u.value=await qt.getValue()},{immediate:!0}),(y,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:f.value,"onUpdate:modelValue":m[0]||(m[0]=x=>f.value=x),width:d.value,top:"20px",title:null,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3,style:{"border-radius":"12px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Nl,e.toDisplayString(h.value),1)]),default:e.withCtx(()=>[e.createVNode(Dl,{config:a.config,data:c.value,removable:a.removable,onSubmit:_,onRemove:E},null,8,["config","data","removable"])]),_:1},8,["modelValue","width"]))}},Fl={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},authkey:{type:String,default:""},restRepeat:{type:Function,default:()=>""},rest:{type:Object},formStyleConfig:{type:Object}},setup(o){const t=o,n=Ht(t==null?void 0:t.code),r=e.ref(t.row),s=e.ref(!1),a=e.shallowRef(null),i=z.useRoute(),c=Y(i),d=e.computed(()=>{const _=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},..._}}),u=ua("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:d.value});Promise.all(u.fields).then(_=>{u.fields=_,u.restRepeat=t.restRepeat,u.rest=t.rest,u.formStyleConfig=d.value,a.value=u});async function f(){const _=t.rest;if(_!=null&&_.getOne){const{data:E}=await _.getOne({...t.row,...c});r.value=E}s.value=!0}function h(_,E){t.onSubmit(_,E).then(()=>{s.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),E()})}return(_,E)=>{const y=e.resolveDirective("auth");return e.withDirectives((e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),s.value?(e.openBlock(),e.createBlock(Vn,{key:0,modelValue:s.value,"onUpdate:modelValue":E[0]||(E[0]=m=>s.value=m),title:t.text,config:a.value,data:r.value,onSubmit:h},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"])),[[y,e.unref(n)[o.authkey]||!o.authkey]])}}},Al={class:"not-found"},fe=I({__name:"EmptyTip",props:{text:{type:String,default:"--"}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("span",Al,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-4d787802"]]),wa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Af)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(f){let h=-1;f.id&&(h=i.value.findIndex(_=>_.id===f.id)),f.url&&(h=i.value.findIndex(_=>_.url===f.url)),h>=0&&(i.value.splice(h,1),s("update:modelValue",i.value))}function u(f){console.log(f),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,f).then(h=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const _=c(h.data);i.value=i.value?[...i.value,_]:[_],s("update:modelValue",i.value)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(f,h)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:u,onOnRemove:d},null,8,["images","props"])]))}},Fe=De.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(o){o&&(this.mode=o)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),kt=(o,t,n,r)=>De.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return jl(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Oo(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Oo(o,t,this.filters)}}});function jl(o,t,n,r,s){let i={...Rl(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Oo(o,t,i)}function Rl(o,t,n){const r=`filters---${t}---${o}`;let s={};return localStorage.getItem(r)&&(s=JSON.parse(localStorage.getItem(r))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Oo(o,t,n){const r=`filters---${t}---${o}`,s=Il(n);return localStorage.setItem(r,JSON.stringify(s)),s}function Il(o){return Object.keys(o).filter(t=>o[t]!==null&&o[t]!==void 0&&o[t]!=="").reduce((t,n)=>(t[n]=o[n],t),{})}const Ml={class:"sorters-box"},Ll=["onClick"],Ul={class:"sorters-label"},zl={class:"sorters-arrow-box"},Hl=["onClick"],Pl=["onClick"],ql=I({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(o,{emit:t}){const n=t,r=o,s=e.ref([]);async function a(){typeof r.sorters.sortersList=="function"?s.value=await r.sorters.sortersList():s.value=r.sorters.sortersList}a(),e.watch(()=>r.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(r.value.length>0)for(let d=0;d<s.value.length;d++){const u=s.value[d];for(let f=0;f<r.value.length;f++){const h=r.value[f];u.field===h.field&&(u.order=h.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,u){const f=s.value;u?f[d].order=u:f[d].order?f[d].order==="ASC"?f[d].order="DESC":f[d].order==="DESC"&&(f[d].order=""):f[d].order="ASC",n("updateSorters",f.filter(h=>h.order))}return(d,u)=>(e.openBlock(),e.createElementBlock("div",Ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:_=>c(h,"")},[e.createElementVNode("div",Ul,e.toDisplayString(f.name),1),e.createElementVNode("div",zl,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",f.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(_=>c(h,"ASC"),["stop"])},null,10,Hl),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",f.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(_=>c(h,"DESC"),["stop"])},null,10,Pl)])],8,Ll))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),Wl={class:"ranges-box"},Gl={class:"range-item"},Ql={class:"range-label"},Yl={class:"range-input-box"},Kl=I({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive(r.ranges.rangesList);e.watch(()=>r.value,()=>{a()});function a(){r.value&&r.value.length>0?s.forEach(c=>{r.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,u){const f=[...s];f.forEach(h=>{h.field===d&&(h[u]=c)}),n("updateRanges",f.filter(h=>h.min||h.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",Wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,u=>(e.openBlock(),e.createElementBlock("div",Gl,[e.createElementVNode("div",Ql,e.toDisplayString(u.name),1),e.createElementVNode("div",Yl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:u.min,"onUpdate:modelValue":f=>u.min=f,"controls-position":"right",class:"input-box",onChange:f=>{i(f,u.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:u.max,"onUpdate:modelValue":f=>u.max=f,"controls-position":"right",class:"input-box",type:"number",onChange:f=>{i(f,u.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Jl={key:0},Xl=I({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=z.useRoute(),s=Y(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=kt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((g,B)=>{B.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(S=>{i[S]=void 0}),i.isDeleted=B.filters.isDeleted)});function u(g){return typeof g=="boolean"?g:typeof g=="function"?g(s):!0}async function f(g,B){var S;if(typeof g.options=="function")c[g.code]=await g.options(i,s,B);else if(Array.isArray(g.options))c[g.code]=g.options;else if(typeof g.options=="object"){const C=g.options.getOneUrl?g.options.getOneUrl:g.options.url;if(!B&&Array.isArray(i[g.code])&&i[g.code].length>0)c[g.code]=[],i[g.code].forEach(O=>{C.getOne({id:O}).then(M=>{c[g.code].push({code:M.data[g.options.data.value]||M.data.id,name:M.data[g.options.data.label]||M.data.name})})});else if(!B&&!Array.isArray(i[g.code])&&i[g.code])C.getOne({id:i[g.code]}).then(O=>{c[g.code]=[{code:O.data[g.options.data.value]||O.data.id,name:O.data[g.options.data.label]||O.data.name}]});else{const O=g.options.query.keyWord.toString(),M=g.options.method?g.options.method:"getList";g.options.url[M]({...g.options.query,[O]:B}).then(A=>{c[g.code]=A.data.rows.map(ne=>({code:ne[g.options.data.value]||ne.id,name:ne[g.options.data.label]||ne.name}))})}}if(c[g.code]&&g.type!="tree-select"){const C=c[g.code].map(O=>O.code);i[g.code]&&(g.multiple?i[g.code]=i[g.code].filter(O=>(console.log(C.includes(O)),C.includes(O))):i[g.code]=(S=c[g.code].find(O=>O.code==i[g.code]))==null?void 0:S.code,x())}}function h(g){if(g.remote)return B=>{f(g,B)}}function _(g){i.sorters=g,x()}function E(g){i.filters=g}function y(){Object.keys(i).forEach(g=>{i[g]=void 0}),a.value=Object.keys(t.settings.filters).filter(g=>u(t.settings.filters[g].visible)).map(g=>{const B={...t.settings.filters[g],code:g};return i[g]=m(g),(B.type==="select"||B.type==="selectV2"||B.type==="tree"||B.type==="tree-select")&&f(B),{...B,dateType:B.dateType||"datetimerange",format:B.format||"YYYY-MM-DD HH:mm:ss"}}).filter(g=>g.code!=="isDeleted")}function m(g){const B=t.settings.filters[g],S=d.validFilters[g];return B.type==="boolean"&&typeof S!="boolean"?B.value:S}function x(){let g=JSON.parse(JSON.stringify(i));const B=t.settings.filterHook;B!=null&&B.preSubmit&&(g=B.preSubmit(g,s)),g!==!1&&d.change(g)}function k(){d.$reset({}),y(),x()}return e.watch(()=>t.settings,()=>{y(),x()},{immediate:!0}),e.watch(()=>({...i}),(g,B)=>{const C=Object.keys(g).filter(O=>B[O]!==g[O]).map(O=>({field:O,newValue:g[O],oldValue:B[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,C)})}),(g,B)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Jl,[e.createVNode(e.unref(w.ElForm),{model:i,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[S.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,filterable:"",clearable:"",placeholder:`是否${S.name}`,"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${S.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${S.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):S.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:S.name,multiple:S.multiple,"collapse-tags":"",class:e.normalizeClass(S.multiple?"tags-selects-input":""),"multiple-limit":S.multipleLimit?S.multipleLimit:0,"remote-method":h(S),"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c[S.code],C=>(e.openBlock(),e.createBlock(e.unref(w.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"])):S.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,filterable:"",options:c[S.code]?c[S.code]:[],props:{label:"name",value:"code"},multiple:S.multiple,placeholder:S.name,clearable:"","value-on-clear":null,onChange:x},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):S.type==="sorters"?(e.openBlock(),e.createBlock(ql,{key:3,value:i[S.code],sorters:S,onUpdateSorters:_},null,8,["value","sorters"])):S.type==="range"?(e.openBlock(),e.createBlock(Kl,{key:4,value:i[S.code],ranges:S,onUpdateRanges:E},null,8,["value","ranges"])):S.type==="tree-select"?(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{key:5,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,placeholder:S.name,data:c[S.code],props:n,"node-key":"id",multiple:S.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"","check-strictly":S.checkStrictly,remote:"","show-checkbox":"",filterable:"","collapse-tags":"","multiple-limit":S.multipleLimit?S.multipleLimit:0,"remote-method":h(S),onCheck:x,onChange:x},null,8,["modelValue","onUpdate:modelValue","placeholder","data","multiple","check-strictly","multiple-limit","remote-method"])):S.type==="date"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:S.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):S.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:7,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:S.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):S.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:8,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,type:S.dateType,format:S.format,"value-format":S.format,"start-placeholder":S.name,"end-placeholder":S.name,placeholder:S.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:9,modelValue:i[S.code],"onUpdate:modelValue":C=>i[S.code]=C,modelModifiers:{trim:!0},placeholder:S.name,type:S.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),a.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{icon:e.unref(_l),type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1},8,["icon"]),e.createVNode(e.unref(w.ElButton),{icon:e.unref(ml),onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1},8,["icon"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-8ce141d0"]]),Zl={class:"data-page-title"},vl={class:"title"},ec={class:"data-page-toolbar"},tc={key:0,class:"show-detail-info"},nc=I({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=e.ref([]),r=t.tableName?t.tableName:t.settings.name,s=z.useRoute(),a=Y(s),i=Fe(),c=kt(t.settings.code,s.path,t.settings.filters,t.settings.filterHook)(),d=e.useSlots(),u=e.computed(()=>c.validFilters.isDeleted||!1),f=e.computed(()=>t.settings.displayMode.normalMode);function h(){c.$reset({isDeleted:!u.value})}async function _(){var x,k;const y=`table-view-${s.path}-${t.settings.code}`,m=localStorage.getItem(y)?localStorage.getItem(y):f.value;if(i.change(m),(x=t.settings)!=null&&x.showDetailInfo){const g=(k=t.settings)==null?void 0:k.showDetailInfo;n.value=await g(a)}}function E(y){i.change(y);const m=`table-view-${s.path}-${t.settings.code}`;localStorage.setItem(m,i.mode)}return e.onMounted(_),(y,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Zl,[e.createElementVNode("div",vl,e.toDisplayString(u.value?`已删除的${e.unref(r)}`:e.unref(r)),1),e.createElementVNode("div",ec,[e.unref(d).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:E},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(w.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(rl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ui))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(w.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"deleted",onClick:h},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(u.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),n.value.length?(e.openBlock(),e.createElementBlock("div",tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElTag),{key:x.auditStatus,type:x.type,effect:"dark",class:"show-detail-info-item"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name)+": "+e.toDisplayString(x.num),1)]),_:2},1032,["type"]))),128))])):e.createCommentVNode("",!0),e.createVNode(Xl,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-b3f5430c"]]),oc={class:"kst-field-row-id"},rc={key:0},ac={key:1,class:"mono-data"},sc={key:1},ka=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=e.useSlots(),n=z.useRoute(),r=o,s=n.meta.side,a=e.computed(()=>r.row[r.field.code]),i=e.computed(()=>({path:`/${s}/${r.field.domain}/${a.value}`,query:{...Y(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,Y(n))}return(d,u)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",oc,[a.value?(e.openBlock(),e.createElementBlock("span",rc,[c()?(e.openBlock(),e.createBlock(f,{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",ac,[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",sc," NO ID "))])}}},[["__scopeId","data-v-00021e61"]]);function ic(o){w.ElMessage(o)}const lc={show:ic},Ea=10,On=De.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=Ea&&(this.history=this.history.slice(2-Ea),this.history.unshift(this.root)),this.history.push({title:o,code:t,path:n}))},setupRootPath(o,t){this.root={title:o,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(o){this.history=this.history.filter(t=>t.code!=o)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(o,t){const n=this.history.find(r=>r.code==o);n&&(n.title=t)}}}),Do={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(o){var m,x;const t=On(),n=Fe(),r=z.useRoute(),s=z.useRouter(),a=Y(r),i=o,c=Ht((m=i.settings)==null?void 0:m.code),d=e.ref({}),u=e.ref(!1),f=e.computed(()=>{var k,g;return i.row.deletedAt?!1:(k=i.operations)!=null&&k.updatable?!0:!!((g=i.operations)!=null&&g.removable)}),h=e.ref((x=i.operations)==null?void 0:x.removable);async function _(){const k=i.settings.formHook,g=i.settings.btnVisible,B=i.settings.rest,{data:S}=await B.getOne({...i.row,...a});d.value=S,k.setupUpdate&&(d.value=await k.setupUpdate(d.value,a)),g.showRemove&&(h.value=g.showRemove(d.value)),u.value=!0}function E(k,g){const B=i.settings.formHook,S=i.settings.rest;Object.keys(a).forEach(C=>{k[C]=a[C]}),B!=null&&B.preUpdateSubmit&&(k=B.preUpdateSubmit(k)),S.update(k).then(()=>{u.value=!1,n.fireUpdated()}).catch(async()=>{g()})}function y(k,g){i.settings.rest.remove(k).then(()=>{lc.show({type:"success",message:"删除成功"}),u.value=!1,i.isDetail&&t.history.forEach(S=>{r.fullPath.includes(S.path)&&(t.remove(S.code),s.back())}),n.fireRemoved()}).catch(()=>{g()})}return(k,g)=>{const B=e.resolveDirective("auth");return f.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(el),type:"primary",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),u.value?(e.openBlock(),e.createBlock(Vn,{key:0,modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=S=>u.value=S),config:i.settings,data:d.value,removable:h.value,onSubmit:E,onRemove:y},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])),[[B,e.unref(c).update]]):e.createCommentVNode("",!0)}}},cc=o=>(e.pushScopeId("data-v-0941be48"),o=o(),e.popScopeId(),o),dc={class:"data-grid-wrapper"},uc={key:0,class:"cover"},fc=cc(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),pc={class:"header"},hc={key:0},mc={class:"key"},gc={class:"value"},_c={key:1,class:"footer tools"},yc=I({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=z.useRoute(),n=Y(t),r=e.useSlots(),s=o,a=kt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=De.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),u=e.shallowRef(null),f=e.ref(!1);async function h(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{h().then(k=>{f.value=k})});const _=e.computed(()=>{var k,g;return!!((k=s.operations)!=null&&k.updatable&&f||(g=s.operations)!=null&&g.removable&&f)}),E=e.computed(()=>s.settings.displayMode.gridWidth),y=e.computed(()=>s.settings.displayMode.heightAuto);function m(){u.value=s.settings.fields.find(k=>k.code==="id"),d.value=s.settings.fields.filter(k=>k.code===s.settings.coverField||k.code===s.settings.nameField||k.code==="id"?!1:k.showInList(n,c.value))}function x(k){return s.settings.nameField?k[s.settings.nameField]:k.name?k.name:`${k.id}`}return e.watch(i,k=>{c.value=k,m()}),m(),(k,g)=>(e.openBlock(),e.createElementBlock("div",dc,[o.data.length===0?(e.openBlock(),e.createBlock(e.unref(w.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(w.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},span:E.value?E.value:24,xs:E.value?{}:24,sm:E.value?{}:12,md:E.value?{}:8,lg:E.value?{}:6,xl:E.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(r).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",uc,[e.unref(r).cover?e.renderSlot(k.$slots,"cover",{key:0,row:B},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:B[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[fc]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",pc,[e.createVNode(ka,{field:u.value,row:B},e.createSlots({_:2},[B[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(B)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(y.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",hc,[e.renderSlot(k.$slots,"body",{row:B},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.code,class:"field mono-data"},[e.createElementVNode("div",mc,e.toDisplayString(S.label)+" ",1),e.createElementVNode("div",gc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:B,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||_.value?(e.openBlock(),e.createElementBlock("div",_c,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"actions",{row:B},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Do,{row:B,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-0941be48"]]);function bc(o,t){const n=o.fields.map(s=>s.code),r=Object.keys(t);n.forEach(s=>{r.includes(s)||console.error(`${o.code}.${s} : 与服务端数据不匹配`)})}const wc=o=>(e.pushScopeId("data-v-5cf3ddfc"),o=o(),e.popScopeId(),o),kc={class:"empty-box"},Ec=wc(()=>e.createElementVNode("div",{class:"empty-text"},"暂无数据",-1)),xa=I({__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(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=e.useSlots(),i=o,c={background:"#F3F6F9",color:"#303133"},d=kt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:u}=De.storeToRefs(d),f=e.ref(u.value),h=e.shallowRef([]),_=e.ref(!1);async function E(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{E().then(B=>{_.value=B})});const y=e.computed(()=>{var B,S;return!!((B=i.operations)!=null&&B.updatable&&_.value||(S=i.operations)!=null&&S.removable&&_.value)});function m(B){s("sort-column",B)}function x(B){s("enable-item",B)}function k(){var S,C;const B=[...i.settings.fields];if((S=i.settings)!=null&&S.extendTableColumnfields){const O=i.settings.extendTableColumnfields((C=i.data)==null?void 0:C[0]);B.push(...O)}h.value=B.filter(O=>O.showInList(r,f.value))}function g(B){s("select-change",{routeQuery:r,data:B})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(bc(i.settings,i.data[0]),k())}),e.watch(u,B=>{f.value=B,k()}),(B,S)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","header-cell-style":c,"row-key":"id",onSelectionChange:g,onSortChange:m},{empty:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createVNode(e.unref(w.ElEmpty),{class:"empty-img",description:" ",image:"https://bloodcare-1251596343.cos.ap-shanghai.myqcloud.com/assets/empty/empty-web.png","image-size":"400"}),Ec])]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,C=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:C.code,label:C.label,width:C.width,prop:C.code,sortable:C.sortable?"custom":!1,fixed:C.fixed},e.createSlots({_:2},[C.type==="switch"?{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.display),{field:C,row:O,mode:"list",onEnable:x},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.display),{key:O.updatedAt,field:C,row:O,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(w.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:C})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:C},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:C})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Do,{row:C,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-5cf3ddfc"]]),xc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Fe();t.$reset();const{mode:n}=De.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(xa);function i(c){c=="grid"?a.value=yc:a.value=xa}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(r),(u,f)=>({name:f,fn:e.withCtx(h=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(h||{})))])}))]),1040))}},Bc={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){var _;const t=Fe(),n=z.useRoute(),r=Y(n),s=o,a=Ht((_=s.settings)==null?void 0:_.code),i=e.ref({}),c=e.ref(!1),d=e.ref(!1);async function u(){var E;return await((E=s.operations)==null?void 0:E.creatable)}e.watchEffect(()=>{u().then(E=>{d.value=E})});async function f(){const E=s.settings.formHook,y=s.settings.fields.reduce((m,x)=>(m[x.code]=x.default,m),{});i.value=y,E.setupCreate&&(i.value=await E.setupCreate(i.value,r)),c.value=!0}function h(E,y){const m=s.settings.formHook,x=s.settings.rest;Object.keys(r).forEach(k=>{E[k]=r[k]}),m!=null&&m.preCreateSubmit&&(E=m.preCreateSubmit(E)),x.create(E).then(()=>{c.value=!1,t.fireCreated()}).catch(async()=>{y()})}return(E,y)=>{const m=e.resolveDirective("auth");return d.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(qi),type:"success",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 新增 "),c.value?(e.openBlock(),e.createBlock(Vn,{key:0,modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=x=>c.value=x),config:s.settings,data:i.value,removable:!1,onSubmit:h},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])),[[m,e.unref(a).add]]):e.createCommentVNode("",!0)}}},Ba={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=z.useRouter(),n=Fe(),r=o,s=e.shallowRef([]);let a="";async function i(d,u){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,u);return}const f=await qt.getValue();try{await d.action({...u,...r.query,idempotentToken:f}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,u){t.push(d.path(u,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,u)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.isVisible(r.row,r.query,r.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,row:o.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:f.type?f.type:"primary",onClick:h=>i(f,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},Sc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Fe(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var f,h;return((h=(f=n.tableDataSelect)==null?void 0:f.data)==null?void 0:h.length)>0});e.ref(!1),e.watch(()=>n.filterForm,f=>{s.value=f});const c=e.ref(!1);async function d(f){c.value=!0;const h=await qt.getValue();try{await f.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:h}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function u(f){return typeof u=="boolean"?f:typeof f=="function"?f(s.value,r):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(f,h)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u(_.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[_.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.component),{key:0,item:_,settings:o.settings,query:e.unref(r),"table-data-select":o.tableDataSelect,"filter-form":o.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):_.tooltip&&_.tooltip.content?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:1,effect:_.tooltip.effect||"dark",content:_.tooltip.content||"default tip",placement:_.tooltip.placement||"top-start"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:_.type,loading:c.value,disabled:!_.enable&&!i.value,onClick:E=>d(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.name),1)]),_:2},1032,["type","loading","disabled","onClick"])]),_:2},1032,["effect","content","placement"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,type:_.type,loading:c.value,disabled:!_.enable&&!i.value,onClick:E=>d(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},Cc={class:"pagination-wrapper"},$c=I({__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(o,{emit:t}){const n=t,r=z.useRouter(),s=z.useRoute(),a=o,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),u=e.ref(a.pageSizes);e.watch(()=>a.total,_=>{d.value=_}),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 f(_){i.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function h(_){c.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(_,E)=>(e.openBlock(),e.createElementBlock("div",Cc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":u.value,total:d.value,"current-page":o.page,layout:"->,total,sizes, prev, pager, next, jumper",onCurrentChange:f,onSizeChange:h},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-a8f2f51d"]]);var Sa;const Ca=typeof window<"u";Ca&&((Sa=window==null?void 0:window.navigator)!=null&&Sa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Vc(o){return typeof o=="function"?o():e.unref(o)}function Oc(o){return o}function Dc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function Tc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function Nc(o){var t;const n=Vc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const Fc=Ca?window:void 0;function Ac(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),Tc(r,t),n}const $a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Va="__vueuse_ssr_handlers__";$a[Va]=$a[Va]||{};var Oa=Object.getOwnPropertySymbols,jc=Object.prototype.hasOwnProperty,Rc=Object.prototype.propertyIsEnumerable,Ic=(o,t)=>{var n={};for(var r in o)jc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Oa)for(var r of Oa(o))t.indexOf(r)<0&&Rc.call(o,r)&&(n[r]=o[r]);return n};function Da(o,t,n={}){const r=n,{window:s=Fc}=r,a=Ic(r,["window"]);let i;const c=Ac(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},u=e.watch(()=>Nc(o),h=>{d(),c.value&&s&&h&&(i=new ResizeObserver(t),i.observe(h,a))},{immediate:!0,flush:"post"}),f=()=>{d(),u()};return Dc(f),{isSupported:c,stop:f}}var Ta;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Ta||(Ta={}));var Mc=Object.defineProperty,Na=Object.getOwnPropertySymbols,Lc=Object.prototype.hasOwnProperty,Uc=Object.prototype.propertyIsEnumerable,Fa=(o,t,n)=>t in o?Mc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,zc=(o,t)=>{for(var n in t||(t={}))Lc.call(t,n)&&Fa(o,n,t[n]);if(Na)for(var n of Na(t))Uc.call(t,n)&&Fa(o,n,t[n]);return o};zc({linear:Oc},{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 To=I({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,Bt;e.useCssVars(P=>({"58e286a0":Pe.value}));const t=z.useRoute(),n=Y(t),r=o,s=kt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=De.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,P=>{g.value=P,A()});const c=Fe(),{created:d,updated:u,removed:f}=De.storeToRefs(c);e.watch([d,u,f],([P,Z,L])=>{(P||Z||L)&&A()});const h=e.ref(!0),_=e.ref([]),E=e.ref(0),y=e.ref({}),m=e.ref({}),x=e.ref(null),k=e.ref(null),g=e.ref({}),B=e.ref(parseInt(t.query.pageSize)||30),S=e.ref(parseInt(t.query.page)||1),C=(Bt=r.hasMany)==null?void 0:Bt.tableContentHeight;function O(P){let Z=null;if(P.order==="ascending"?Z="ASC":P.order==="descending"&&(Z="DESC"),g.value.sorters){let L=[];g.value.sorters.some(we=>we.field===P.prop)?g.value.sorters.forEach(we=>{we.field===P.prop&&(we.order=Z,we.name||L.push(we)),we.name&&L.push(we)}):L=[...g.value.sorters,{field:P.prop,order:Z}],g.value.sorters=L}else g.value.sorters=[{field:P.prop,order:Z}];A()}function M(){m.value=r.settings.operations(n)}function A(P){h.value=!0,P=="again"&&(S.value=S.value-1<1?1:S.value-1);const Z={...g.value,...n,...r.query,page:S.value,size:B.value};r.settings.rest.getList(Z).then(L=>{y.value.data=[],_.value=L.data.rows,E.value=L.data.count,h.value=!1,E.value&&_.value.length==0&&A("again")})}function ne(P){S.value=P.page,B.value=P.size,A()}function J(P){const Z={id:P.id,enable:!P.enable};r.settings.rest.enable(Z).then(()=>{A()})}function D(P){if(P.enable){const Z=P.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${Z}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{J(P)}).catch(()=>{})}else J(P)}function U(P){y.value=P}const X=e.ref(0),Se=e.ref(0);Da(x,P=>{var Z;X.value=((Z=P[0])==null?void 0:Z.contentRect.height)||0}),Da(k,P=>{var Z;Se.value=((Z=P[0])==null?void 0:Z.contentRect.height)||0});const Pe=e.computed(()=>C&&E.value>0?`${C-14}px`:`calc(100% - ${X.value+Se.value+14}px)`);return M(),(P,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"},class:"aa"},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x,class:"header-wrap"},[e.createVNode(nc,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(Sc,{settings:r.settings,"table-data-select":y.value,query:e.unref(n),"filter-form":g.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(Bc,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(xc,{class:"data-table-box",data:_.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:D,onSelectChange:U},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:L})=>[e.createVNode(Ba,{mode:"list",row:L,settings:r.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(w.vLoading),h.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:k},[e.createVNode($c,{page:S.value,size:B.value,total:E.value,onPageChange:ne},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-86ca027c"]]);/*! Element Plus v2.11.2 */var Hc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",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:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},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 Pc={__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(o){const t=o,n=e.computed(()=>t.content?t.content.toString():"");return(r,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.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(w.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"]))]))}},qc={class:"header-box"},Wc={class:"header-box-left"},Gc={class:"page-title"},Qc={class:"tabs-container"},Yc={class:"user-profile"},Kc=I({__name:"HeaderMenu",props:{config:{type:Object}},setup(o){const t=z.useRouter(),n=z.useRoute(),r=On(),s=e.ref("首页"),a=o,i=n.fullPath.split("/")[1],c=E();r.setupRootPath("首页",`/${i}/home`);function d(y){var B,S;const m=y.meta.side,x=y.params.domain;let k=(B=y.meta)==null?void 0:B.title,g=(S=y.meta)==null?void 0:S.code;if(m&&x){k=Co()[m][y.params.domain].name,g=y.params.domain;const C=y.params.id;C&&C!="detail"&&(k=`${k} - ${y.params.id}`,g=`${y.params.domain}-${y.params.id}`)}else{const C=c.find(O=>O.route===y.path);C&&(k=C.title,g=C.route)}k&&g&&(r.push(k,g,y.fullPath),s.value=g)}function u(y){const m=r.history.find(x=>x.code==y.props.name);t.push(m.path)}function f(y){if(r.remove(y),y==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const h=(y,m)=>{const x=r.history.length;return y===0&&m==="self"||y<2&&m==="left"||y===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function _(y,m){const x=[],k=r.history;switch(m){case"self":x.push(k[y].code);break;case"left":for(let g=0;g<y;g++)g!==0&&x.push(k[g].code);break;case"right":for(let g=y+1;g<k.length;g++)x.push(k[g].code);break;case"all":for(let g=0;g<k.length;g++)g!==0&&x.push(k[g].code);break;case"other":for(let g=1;g<k.length;g++)g!==y&&x.push(k[g].code);break}for(let g=0;g<x.length;g++)f(x[g])}function E(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,m)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",null,[e.createElementVNode("div",Wc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",Gc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Qc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:u,onTabRemove:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(x,k)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[h(k,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:g=>_(k,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),h(k,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:g=>_(k,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),h(k,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:g=>_(k,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Yi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),h(k,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:g=>_(k,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),h(k,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:g=>_(k,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.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(Pc,{content:x.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:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})])]),e.createElementVNode("div",Yc,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-906bae66"]]),Jc=o=>(e.pushScopeId("data-v-9a00f172"),o=o(),e.popScopeId(),o),Xc={key:2,class:"dot-wrapper"},Zc=[Jc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Aa=I({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(o){const t=o;return(n,r)=>o.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:o.data.title},{title:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ba))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data.children,s=>(e.openBlock(),e.createBlock(Aa,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:o.data.route,route:o.data.route,class:"menu-item"},{default:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Xc,Zc)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ba))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-9a00f172"]]),vc=I({__name:"SideBar",props:{sideMenus:{type:Object}},setup(o){const t=z.useRouter(),n=z.useRoute(),r=e.ref(n.fullPath),s=o,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;n.params.id=="detail"?r.value=`/${d}/${n.params.domain}/detail`:r.value=`/${d}/${n.params.domain}/list`}else r.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),{"wrap-class":"scrollbar-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":r.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),u=>(e.openBlock(),e.createBlock(Aa,{data:u},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-bbb38e99"]]),ed=I({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(o){const t=z.useRoute(),n=o,r={...et(),...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(w.ElConfigProvider),{locale:e.unref(Hc)},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Kc,{config:r},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(w.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>{var d;return[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(vc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:e.normalizeClass(["page-content-main",(d=e.unref(t).fullPath)!=null&&d.includes("/list")?"list-main":""])},{default:e.withCtx(()=>[e.unref(t).params.domain?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(({Component:u,route:f})=>[e.createVNode(e.Transition,{name:"KxtFade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u),{key:s.value}))]),_:2},1024)]),_:1})):(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1},8,["class"])]}),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-a8d15917"]]),td={key:1,class:"loading-wrapper"},ja=I({__name:"List",props:{domain:{type:String}},setup(o){const t=o,n=z.useRoute(),r=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return Pt(r,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(To,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",td,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-2d9c8e98"]]),nd={key:0},od={class:"key"},rd={class:"value"},ad={style:{color:"#111","font-size":"14px","font-weight":"500"}},sd={key:1,class:"loading-wrapper"},Ra=I({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=z.useRoute(),a=Y(s),i=Fe(),{updated:c}=De.storeToRefs(i),d=e.ref(null),u=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],f=e.ref([]),h=e.computed(()=>[...r.settings.fields.filter(B=>B.showInDetail(d.value,{...a,...r.query})),...f.value]),_=e.computed(()=>h.value.find(k=>k.code===r.settings.coverField)),E=e.computed(()=>h.value.filter(k=>!u.includes(k.type)&&!k.extendDetail)),y=e.computed(()=>{var g;const k=(g=_.value)==null?void 0:g.code;return h.value.filter(B=>u.includes(B.type)||B.extendDetail).filter(B=>B.code!==k)}),m=e.computed({get(){return y.value.map(k=>k.code)},set(k){}});async function x(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,k.data.custumFileds?Promise.all(Cn(k.data.custumFileds,"form-management-result")).then(g=>{f.value=g}):f.value=[],d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{x()},{immediate:!0}),(k,g)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",nd,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[_.value?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value.display),{field:_.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:_.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:B.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>{var S;return[e.createElementVNode("div",od,e.toDisplayString(B.label),1),e.createElementVNode("div",rd,[B.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):B.display?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.display),{key:2,field:B,row:d.value,mode:"description"},null,8,["field","row"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((S=d.value[B.code])==null?void 0:S.toString()),1)],64))])]}),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),y.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:m.value,"onUpdate:modelValue":g[0]||(g[0]=B=>m.value=B),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:null,name:B.code,class:"mono-data"},{title:e.withCtx(()=>[e.createElementVNode("span",ad,e.toDisplayString(B.label),1)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.display),{field:B,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",sd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-b4065dcd"]]),id={key:0},ld={class:"group-item-head"},cd={class:"key"},dd={class:"value"},ud={key:1,class:"loading-wrapper"},fd=I({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=z.useRoute();Y(s);const a=Fe(),{updated:i}=De.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.computed(()=>{var h,_;return((_=(h=r.settings)==null?void 0:h.detailGroupFields)==null?void 0:_.map(E=>{var m,x,k,g;const y=((x=(m=E==null?void 0:E.childrenFields)==null?void 0:m.filter(B=>d.includes(B.type)||B.extendDetail))==null?void 0:x.filter(B=>B.code!==(E==null?void 0:E.coverField)))||[];return{...E,coverField:(k=E==null?void 0:E.childrenFields)==null?void 0:k.find(B=>B.code===E.coverField),detailFields:(g=E==null?void 0:E.childrenFields)==null?void 0:g.filter(B=>!d.includes(B.type)&&!B.extendDetail),extendFields:y,activeFields:(y==null?void 0:y.map(B=>B.code))||[]}}))||[]});function f(){r.settings.rest.getOne(r.query).then(h=>{h.data.isDeleted=!!h.data.deletedAt,c.value=h.data,n("done",h.data)})}return e.watch(i,()=>{f()},{immediate:!0}),(h,_)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",id,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${E.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[E.coverField?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.coverField.display),{field:E.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:E.coverField?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.detailFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:y.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",cd,e.toDisplayString(y.label),1),e.createElementVNode("div",dd,[y.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(y.display),{key:1,field:y,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),E&&E.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:E.activeFields,"onUpdate:modelValue":y=>E.activeFields=y,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.extendFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:y.label,name:y.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{field:y,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[E.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",ud,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-50c9cb06"]]),pd={class:"data-page-title"},hd={class:"title"},md=I({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(o,{emit:t}){On();const n=z.useRoute(),r=Y(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const u=s.settings;if(u.displayMode.normalMode=="detail")a.value=`${u.name}`;else{const h=`${u.formatName(d)}`;a.value=h?`${u.name}:${h}`:`${u.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,u)=>(e.openBlock(),e.createElementBlock("div",pd,[e.createElementVNode("div",hd,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ba,{row:s.data,settings:s.settings,query:e.unref(r),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(r),"detail")?(e.openBlock(),e.createBlock(Do,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-f9999537"]]),gd=I({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=z.useRouter(),n=z.useRoute(),r=Y(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(u){a.value=u.props.name,t.push({name:`${n.meta.side}-association`,params:{association:u.props.name},query:r})}function d(u){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const f=s.associations.find(h=>h.domain===n.params.association);i.value={...f,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},u&&u()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:r})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(u,f)=>{const h=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElTabs),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=_=>a.value=_),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,_=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:_.name,name:_.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(h,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-0dc49aad"]]),_d={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(o){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.associations,r=>(e.openBlock(),e.createElementBlock("div",null,[r.type=="has-many"?(e.openBlock(),e.createBlock(ja,{key:0,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0),r.type=="has-one"?(e.openBlock(),e.createBlock(Ia,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},yd=I({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){z.useRouter();const t=z.useRoute(),n=Y(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,u;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(md,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(u=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&u.length?(e.openBlock(),e.createBlock(fd,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(Ra,{key:1,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])),r.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(gd,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(_d,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-8b30eefd"]]),bd={key:1,class:"loading-wrapper"},Ia=I({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=z.useRoute(),r=Y(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);Pt(s,a).then(u=>{const f=u,h=d("has-many",f.hasMany(r)),_=d("has-one",f.hasOne(r));i.value=f,c.value=_.concat(h)});function d(u,f){return(f||[]).map(h=>typeof h=="object"?{type:u,domain:h.code,name:h.name,tableName:h.tableName,tableContentHeight:h.tableContentHeight,query:h.query||(()=>({}))}:{type:u,domain:h,name:Co()[s][h].name,query:()=>({})})}return(u,f)=>i.value?(e.openBlock(),e.createBlock(yd,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",bd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-896e8698"]]),wd={key:0},kd={key:1,class:"loading-wrapper"},Ed=I({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=z.useRoute(),n=t.meta.side,r=Y(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{Pt(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",wd,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(To,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(Ra,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(r),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",kd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-79eac380"]]),xd={key:0},Bd={class:"file-name"},Sd={class:"name"},Cd={class:"file-type"},$d={key:1},Vd=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]);function r(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",xd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Bd,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1}),e.createElementVNode("span",Sd,e.toDisplayString(c.name),1),e.createElementVNode("span",Cd,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>r(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(Zi))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(w.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(xl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",$d,[e.createVNode(fe)]))}},[["__scopeId","data-v-196b9bff"]]),Od={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>If)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(f){a.value=a.value?[...a.value,f]:[f]}function c(f){const h=a.value.findIndex(_=>_.id===f.id);a.value.splice(h,1)}async function d(f){const h=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(f.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await h.updateFilesName(f).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function u(f,h){if(h=="success"){i(f),r("update:modelValue",a.value);return}if(h=="remove"){c(f),r("update:modelValue",a.value);return}if(h=="change"){d(f);return}}return(f,h)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:h[0]||(h[0]=_=>u(_,"success")),onOnRemove:h[1]||(h[1]=_=>u(_,"remove")),onOnChange:h[2]||(h[2]=_=>u(_,"change"))},null,8,["pics","props"]))}};class Dd extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=Vd,this.editor=Od,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Td=Object.freeze(Object.defineProperty({__proto__:null,default:Dd},Symbol.toStringTag,{value:"Module"})),Nd={key:3},Fd=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=z.useRoute(),n=o,r=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${r}/${a}`,query:{...Y(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),u=e.ref("");let f=null;const h=Pt(s,r).then(m=>(f=m.formatName,Promise.resolve(m.rest)));function _(m){return n.field.isRouter(n.row,Y(t))&&!Y(t)[n.field.code]}function E(){h.then(m=>{var B;c.value=!0;const x=n.row[n.field.code],k=n.row[xo(`${r}-name`)];if(!x){y(!1),c.value=!1;return}if(x&&k){y({id:x,name:k}),c.value=!1;return}if((B=n.field)!=null&&B.notGetOne){y({id:x,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const g={id:x};m.getOne(g).then(S=>{y(S.data),c.value=!1}).catch(S=>{console.log(S)})})}function y(m){if(d.value=!1,n.field.showName){ca(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),u.value=m[n.field.showName];return}if(n.field.formatter){u.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){u.value=m.name;return}if(!m){d.value=!0;return}u.value=f(m)}return e.watch(()=>n.row,E,{immediate:!0}),(m,x)=>{const k=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})):d.value?(e.openBlock(),e.createBlock(fe,{key:1})):_(o.row)?(e.openBlock(),e.createBlock(k,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",Nd,e.toDisplayString(u.value),1))])}}},[["__scopeId","data-v-a7249bb7"]]),Ad={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,r,f)}function u(){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(),(f,h)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=_=>i.value=_),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:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:_.code,label:_.name,value:_.code,title:_.name,disabled:_.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class jd extends ee{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=Fd,this.editor=Ad,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.notGetOne=t.notGetOne||!1,this.codeName=t.codeName||"",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 Rd=Object.freeze(Object.defineProperty({__proto__:null,default:jd},Symbol.toStringTag,{value:"Module"})),Id={style:{display:"flex","align-items":"center"}},Md={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.computed(()=>t.row[t.field.code]);return(r,s)=>(e.openBlock(),e.createElementBlock("span",Id,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#2DAD28",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(kl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#FF444A",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(Hi))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#85888E",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(pl))]),_:1}))]))}},Ld={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>{var d,u,f,h,_,E;return e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=y=>s.value=y),disabled:r.disabled,"active-text":((u=(d=r.field)==null?void 0:d.elConfig)==null?void 0:u.activeText)||"是","inactive-text":((h=(f=r.field)==null?void 0:f.elConfig)==null?void 0:h.inactiveText)||"否","inline-prompt":((E=(_=r.field)==null?void 0:_.elConfig)==null?void 0:E.inlinePrompt)!==!1,onChange:a},null,8,["modelValue","disabled","active-text","inactive-text","inline-prompt"])}}};class Ud extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Md,this.editor=Ld,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const zd=Object.freeze(Object.defineProperty({__proto__:null,default:Ud},Symbol.toStringTag,{value:"Module"})),Hd={key:0},Pd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Hd,e.toDisplayString(r.value),1))]))}},qd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,r,f)}d();function u(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(f,h)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=_=>i.value=_),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:u},null,8,["modelValue","props","options"]))}};class Wd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=Pd,this.editor=qd,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const Gd=Object.freeze(Object.defineProperty({__proto__:null,default:Wd},Symbol.toStringTag,{value:"Module"}));class Qd extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Qd},Symbol.toStringTag,{value:"Module"})),Kd={key:0},Jd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Kd,e.toDisplayString(r.value),1))}},Xd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}};class Zd extends ee{constructor(t,n){super(t,n),this.display=Jd,this.editor=Xd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const vd=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"})),eu={key:0},tu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",eu,e.toDisplayString(r.value),1))}},nu=I({__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}},[["__scopeId","data-v-6a5d3aec"]]);class ou extends ee{constructor(t,n){super(t,n),this.display=tu,this.editor=nu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const ru=Object.freeze(Object.defineProperty({__proto__:null,default:ou},Symbol.toStringTag,{value:"Module"})),Ma=o=>(e.pushScopeId("data-v-5401b120"),o=o(),e.popScopeId(),o),au={class:"loading-error"},su=Ma(()=>e.createElementVNode("div",null,"加载失败",-1)),iu={key:1,class:"loading-error"},lu=[Ma(()=>e.createElementVNode("div",null,"暂无",-1))],cu=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref("");e.watch(()=>t.row,()=>{t.field.waterMark?n.value=i(t.row[t.field.code],t.field.waterMark):n.value=t.row[t.field.code]},{immediate:!0});function r(c){const d=document.createElement("canvas");return d.width=c.width,d.height=c.height,d.getContext("2d").drawImage(c,0,0),d}function s(c,d){return new Promise(u=>{const f=c.getContext("2d"),h=a(d);f.fillStyle=f.createPattern(h,"repeat"),f.fillRect(0,0,c.width,c.height),u(c.toDataURL())})}function a(c){const d=document.createElement("canvas");d.width=500,d.height=200;const u=d.getContext("2d");return u.textAlign="left",u.textBaseline="middle",u.font="26px Microsoft Yahei",u.fillStyle="rgba(0, 0, 0, 0.3)",u.rotate(-20*Math.PI/180),u.fillText(c,10,200),d}function i(c,d){const u=new Image;u.crossOrigin="Anonymous",u.src=c,u.onload=async()=>{const f=r(u),h=await s(f,d);n.value=h}}return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":[n.value],class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",au,[su,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",iu,lu))],2))}},[["__scopeId","data-v-5401b120"]]),du={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Uf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){r("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,props:s.field.props,onOnSuccess:i},null,8,["image-url","disabled","props"]))}};class uu extends ee{constructor(t,n){super(t,n),this.display=cu,this.editor=du,this.props=t.props||{},this.checkValidProperties(t)}}const fu=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"})),La=o=>(e.pushScopeId("data-v-56e18295"),o=o(),e.popScopeId(),o),pu={class:"image-card",style:{"margin-bottom":"20px"}},hu={class:"loading-error"},mu=La(()=>e.createElementVNode("div",null,"图片加载失败",-1)),gu={key:1,class:"loading-error"},_u=[La(()=>e.createElementVNode("div",null,"暂无",-1))],yu=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(r.value=s.map(a=>a.url),n.value=r.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(w.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",pu,[i.url?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",hu,[mu,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",gu,_u))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-56e18295"]]);class bu extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=yu,this.editor=wa,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const wu=Object.freeze(Object.defineProperty({__proto__:null,default:bu},Symbol.toStringTag,{value:"Module"})),ku={key:0},Eu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",ku,e.toDisplayString(r.value),1))}},xu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInputNumber),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,min:r.field.min,max:r.field.max,step:r.field.step,precision:r.field.precision,"step-atrictly":r.field.stepAtrictly,onChange:a},null,8,["modelValue","disabled","min","max","step","precision","step-atrictly"]))}};class Bu extends ee{constructor(t,n){super(t,n),this.display=Eu,this.editor=xu,this.min=t.min,this.max=t.max,this.step=t.step||1,this.precision=t.precision,this.stepAtrictly=t.stepAtrictly||!1,this.checkValidProperties(t)}}const Su=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),Cu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=o,r=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{r.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(r.value=!0,s.value=a)},{immediate:!0}),(a,i)=>r.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(fe,{key:1}))}},$u={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,r("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]=u=>a.value=u),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class Vu extends ee{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"}));var j=function(o,t,n){if(!t.has(o))throw new TypeError("attempted to set private field on non-instance");return t.set(o,n),n},T=function(o,t){if(!t.has(o))throw new TypeError("attempted to get private field on non-instance");return t.get(o)},tt,it,Ee,Et,Wt,Ae,je,Re,Ie,Me,Le,Ue,ze,lt,xt,nt,Dn,ot;const Du=function(o){var t=131,n=137,r=0;o+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<o.length;a++)r>s&&(r=Math.floor(r/n)),r=r*t+o.charCodeAt(a);return r},N="0123456789abcdef".split(""),Tu=[-2147483648,8388608,32768,128],xe=[24,16,8,0],Tn=[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],re=[];class Nu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),Et.set(this,void 0),Wt.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),Ue.set(this,void 0),ze.set(this,void 0),lt.set(this,void 0),xt.set(this,void 0),nt.set(this,void 0),Dn.set(this,0),ot.set(this,void 0),this.init(t,n)}init(t,n){n?(re[0]=re[16]=re[1]=re[2]=re[3]=re[4]=re[5]=re[6]=re[7]=re[8]=re[9]=re[10]=re[11]=re[12]=re[13]=re[14]=re[15]=0,j(this,it,re)):j(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(j(this,Ae,3238371032),j(this,je,914150663),j(this,Re,812702999),j(this,Ie,4144912697),j(this,Me,4290775857),j(this,Le,1750603025),j(this,Ue,1694076839),j(this,ze,3204075428)):(j(this,Ae,1779033703),j(this,je,3144134277),j(this,Re,1013904242),j(this,Ie,2773480762),j(this,Me,1359893119),j(this,Le,2600822924),j(this,Ue,528734635),j(this,ze,1541459225)),j(this,tt,j(this,ot,j(this,Ee,j(this,xt,0)))),j(this,Et,j(this,lt,!1)),j(this,Wt,!0),j(this,nt,t)}update(t){if(T(this,Et))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=T(this,it);for(;r<s;){let i;if(T(this,lt)&&(j(this,lt,!1),a[0]=T(this,tt),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=T(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=T(this,ot);r<s&&i<64;++r){let c=n.charCodeAt(r);c<128?a[i>>2]|=c<<xe[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++r)&1023),a[i>>2]|=(240|c>>18)<<xe[i++&3],a[i>>2]|=(128|c>>12&63)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3])}j(this,Dn,i),j(this,Ee,T(this,Ee)+(i-T(this,ot))),i>=64?(j(this,tt,a[16]),j(this,ot,i-64),this.hash(),j(this,lt,!0)):j(this,ot,i)}return T(this,Ee)>4294967295&&(j(this,xt,T(this,xt)+(T(this,Ee)/4294967296<<0)),j(this,Ee,T(this,Ee)%4294967296)),this}finalize(){if(T(this,Et))return;j(this,Et,!0);const t=T(this,it),n=T(this,Dn);t[16]=T(this,tt),t[n>>2]|=Tu[n&3],j(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),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]=T(this,xt)<<3|T(this,Ee)>>>29,t[15]=T(this,Ee)<<3,this.hash()}hash(){let t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);const u=T(this,it);let f,h,_,E,y,m,x,k,g,B;for(let S=16;S<64;++S)E=u[S-15],f=(E>>>7|E<<25)^(E>>>18|E<<14)^E>>>3,E=u[S-2],h=(E>>>17|E<<15)^(E>>>19|E<<13)^E>>>10,u[S]=u[S-16]+f+u[S-7]+h<<0;B=n&r;for(let S=0;S<64;S+=4)T(this,Wt)?(T(this,nt)?(x=300032,E=u[0]-1413257819,d=E-150054599<<0,s=E+24177077<<0):(x=704751109,E=u[0]-210244248,d=E-1521486534<<0,s=E+143694565<<0),j(this,Wt,!1)):(f=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),h=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,_=x^t&r^B,m=a&i^~a&c,E=d+h+m+Tn[S]+u[S],y=f+_,d=s+E<<0,s=E+y<<0),f=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),h=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),k=s&t,_=k^s&n^x,m=d&a^~d&i,E=c+h+m+Tn[S+1]+u[S+1],y=f+_,c=r+E<<0,r=E+y<<0,f=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),h=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),g=r&s,_=g^r&t^k,m=c&d^~c&a,E=i+h+m+Tn[S+2]+u[S+2],y=f+_,i=n+E<<0,n=E+y<<0,f=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),h=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),B=n&r,_=B^n&s^g,m=i&c^~i&d,E=a+h+m+Tn[S+3]+u[S+3],y=f+_,a=t+E<<0,t=E+y<<0;j(this,Ae,T(this,Ae)+t<<0),j(this,je,T(this,je)+n<<0),j(this,Re,T(this,Re)+r<<0),j(this,Ie,T(this,Ie)+s<<0),j(this,Me,T(this,Me)+a<<0),j(this,Le,T(this,Le)+i<<0),j(this,Ue,T(this,Ue)+c<<0),j(this,ze,T(this,ze)+d<<0)}hex(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);let u=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[r>>28&15]+N[r>>24&15]+N[r>>20&15]+N[r>>16&15]+N[r>>12&15]+N[r>>8&15]+N[r>>4&15]+N[r&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(u+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),u}toString(){return this.hex()}digest(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze),u=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&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 T(this,nt)||u.push(d>>24&255,d>>16&255,d>>8&255,d&255),u}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,Ae)),n.setUint32(4,T(this,je)),n.setUint32(8,T(this,Re)),n.setUint32(12,T(this,Ie)),n.setUint32(16,T(this,Me)),n.setUint32(20,T(this,Le)),n.setUint32(24,T(this,Ue)),T(this,nt)||n.setUint32(28,T(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,Et=new WeakMap,Wt=new WeakMap,Ae=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,Ue=new WeakMap,ze=new WeakMap,lt=new WeakMap,xt=new WeakMap,nt=new WeakMap,Dn=new WeakMap,ot=new WeakMap;function Fu(o){const t=new Nu;return t.update(o),parseInt(t.hex().substring(0,8),16)}const Au=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},ju=function(o,t,n){o/=360;var r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;return[o+1/3,o,o-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(r-s)*6*a:a<.5?a=r:a<2/3?a=s+(r-s)*6*(2/3-a):a=s,Math.round(a*255)})};class Ru{constructor(t={}){const[n,r]=[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=r,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=Fu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=Du)}hsl(t){var n,r,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),r=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,r,s]}rgb(t){var n=this.hsl(t);return ju.apply(this,n)}hex(t){var n=this.rgb(t);return Au(n)}}const Iu=new Ru;function Mu(o){const t=Iu.hex(`abc${o}cba`);return Lu(t.replace("#",""),-20)}function Lu(o,t){let n=parseInt(o.substring(1,3),16),r=parseInt(o.substring(3,5),16),s=parseInt(o.substring(5,7),16);n=parseInt(n*(100+t)/100),r=parseInt(r*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,r=r<255?r:255,s=s<255?s:255,n=Math.round(n),r=Math.round(r),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Ua={strToHexColor:Mu},Uu={key:0,class:"radio-fields"},zu=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=z.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const u=await r.field.options(r.row,n);if(!u){s.value="<无>",a.value=!1;return}let f="";if(f=u.filter(h=>d===h.code),f.length===0){s.value="<无>",a.value=!1;return}i.value=f.map(h=>({bgColor:Ua.strToHexColor(`${h.code}-${h.name}`),code:h.code,name:h.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,u)=>a.value?(e.openBlock(),e.createElementBlock("div",Uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"radio-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-c0b98ff6"]]),Hu={__name:"FieldEditor",props:{modelValue:[String,Number],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,r,f)}function u(){var f;s("update:modelValue",i.value),(f=a==null?void 0:a.field)!=null&&f.change&&a.field.change(i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(f,h)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=_=>i.value=_),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(e.unref(w.ElRadio),{key:_.code,label:_.code,disabled:_.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"]))}};class Pu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=zu,this.editor=Hu,this.checkValidProperties(t)}}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Pu},Symbol.toStringTag,{value:"Module"})),Wu={class:"editor-field"},Gu=["innerHTML"],Qu=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",Wu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Gu)]))}},[["__scopeId","data-v-6cf9056d"]]),Yu={style:{width:"100%"}},Ku={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>np)),r=t,s=o,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{r("update:modelValue",a.value)}),e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Yu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class Ju extends ee{constructor(t,n){super(t,n),this.display=Qu,this.editor=Ku,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Xu=Object.freeze(Object.defineProperty({__proto__:null,default:Ju},Symbol.toStringTag,{value:"Module"}));class Zu extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=ka,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 vu=Object.freeze(Object.defineProperty({__proto__:null,default:Zu},Symbol.toStringTag,{value:"Module"})),ef={key:0,class:"select-fields"},tf=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=z.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const u=await r.field.options(r.row,n);if(!u){s.value="<无>",a.value=!1;return}let f=[];if(r.field.multiple?f=u.filter(h=>d.includes(h.code)):f=u.filter(h=>d===h.code),f.length===0){s.value="--",a.value=!1;return}i.value=f.map(h=>({bgColor:Ua.strToHexColor(`${h.code}-${h.name}`),code:h.code,name:h.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,u)=>a.value?(e.openBlock(),e.createElementBlock("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${f.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-48df8735"]]),nf={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,r,f)}function u(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(f,h)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=_=>i.value=_),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:o.field.placeholder,remote:"","remote-method":d,onChange:u},e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:_.code,label:_.name,value:_.code,title:_.name,disabled:_.disabled},null,8,["label","value","title","disabled"]))),128))]),_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0]),1032,["modelValue","multiple","disabled","placeholder"]))}};class of extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=tf,this.editor=nf,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const rf=Object.freeze(Object.defineProperty({__proto__:null,default:of},Symbol.toStringTag,{value:"Module"})),af={key:0},sf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){var c;if((c=t.field)!=null&&c.formatter){r.value=t.field.formatter(t.row),n.value=!r.value;return}const i=t.field.code.toString().split(".").reduce((d,u)=>d[u],t.row);i==null||`${i}`.trim()===""?n.value=!0:(r.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",af,e.toDisplayString(r.value),1))}},lf={class:"annotation"},cf={class:"annotation"},df=I({__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:o.field.type,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},e.createSlots({_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createElementVNode("div",lf,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",cf,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-4c74bd97"]]);class uf extends ee{constructor(t,n){super(t,n),this.display=sf,this.editor=df,this.formatter=t.formatter,this.checkValidProperties(t)}}const ff=Object.freeze(Object.defineProperty({__proto__:null,default:uf},Symbol.toStringTag,{value:"Module"})),pf={style:{display:"flex","align-items":"center"}},hf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(o,{emit:t}){const n=t,r=o,s=e.ref(r.row.deletedAt);function a(c,d){return c.label=d,new Promise((u,f)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",pf,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=u=>i.value=u),size:"small",disabled:!!s.value,"before-change":u=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},mf={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class gf extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=hf,this.editor=mf,this.checkValidProperties(t)}}const _f=Object.freeze(Object.defineProperty({__proto__:null,default:gf},Symbol.toStringTag,{value:"Module"})),yf={key:0},bf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",yf,e.toDisplayString(r.value),1))}},wf={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},null,8,["modelValue","disabled","placeholder"]))}};class kf extends ee{constructor(t,n){super(t,n),this.display=bf,this.editor=wf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ef=Object.freeze(Object.defineProperty({__proto__:null,default:kf},Symbol.toStringTag,{value:"Module"})),xf={key:0},Bf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",xf,e.toDisplayString(r.value),1))}},Sf={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,format:r.field.format,"value-format":r.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Cf extends ee{constructor(t,n){super(t,n),this.display=Bf,this.editor=Sf,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const $f=Object.freeze(Object.defineProperty({__proto__:null,default:Cf},Symbol.toStringTag,{value:"Module"})),Vf=I({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]),r=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],r.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,u)=>i.value?(e.openBlock(),e.createBlock(e.unref(w.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:r.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(fe,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-fbd0b556"]]),Of={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=z.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function u(_){c.value=await a.field.options(a.formData,r,_)}function f(_,E){var y;return(y=a.field)!=null&&y.useApiSearchKeyword||!_?!0:E.name.includes(_)}function h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),u(),(_,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=y=>i.value=y),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"",clearable:"","filter-node-method":f,"remote-method":u,onCheck:h,onChange:h},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Df extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.useApiSearchKeyword=t.useApiSearchKeyword||!1,this.display=Vf,this.editor=Of,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Tf=Object.freeze(Object.defineProperty({__proto__:null,default:Df},Symbol.toStringTag,{value:"Module"})),Nf={class:"el-upload__tip"},Ff=["src"],Af=Object.freeze(Object.defineProperty({__proto__:null,default:I({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*",tip:""}}}},emits:["on-remove","on-upload"],setup(o,{emit:t}){const n=t,r=e.ref(""),s=e.ref(!1),a=o,i=e.computed(()=>a.images.map(_=>{if(!(_!=null&&_.url))return{..._,name:"unknown",fileType:"unknown"};const E=_.url.substring(_.url.lastIndexOf(".")+1),y=_.url.split("/");return{..._,name:y[y.length-1],fileType:E}}));function c(_){var E,y;if(a.props.deleteParams){const m=(E=a.props.deleteParams)!=null&&E.data?(y=a.props.deleteParams)==null?void 0:y.data:{};he.remove(`${a.props.deleteParams.url}/${_.id}/attachment`,m,m).then(()=>{n("on-remove",_)})}else n("on-remove",_)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function u(_){r.value=_.url,s.value=!0}function f(_){return _.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function h(_){const E=new FormData;E.append("file",_.file),n("on-upload",E)}return(_,E)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(w.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":u,multiple:!0,"before-upload":f,"http-request":h,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:E[0]||(E[0]=e.withModifiers(()=>{},["prevent"]))},e.createSlots({default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($o))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:2},[a.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Nf,e.toDisplayString(a.props.tip),1)]),key:"0"}:void 0]),1032,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,Ff)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-ee6aad72"]])},Symbol.toStringTag,{value:"Module"})),jf=["src"],Rf={class:"file-type"},If=Object.freeze(Object.defineProperty({__proto__:null,default:I({__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(o,{emit:t}){const n=t,r=o,s=e.computed(()=>r.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const k=m.url.split("/");return{...m,name:k[k.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(k,g){return m.type.startsWith("image/")?(x.onload=async B=>{const S=new Image;S.src=B.target.result,S.onload=()=>{const C=document.createElement("canvas"),O=C.getContext("2d");C.width=S.width,C.height=S.height,O.drawImage(S,0,0,C.width,C.height),C.toBlob(M=>{const A=new File([M],m.name,{type:m.type,lastModified:Date.now()});k(A)},m.type,.5)}},!1):(k(m),!1)})},u=m=>{var x,k;if(m.status==="success")if(r.props.deleteParams){const g=(x=r.props.deleteParams)!=null&&x.data?(k=r.props.deleteParams)==null?void 0:k.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,g,g).then(()=>{n("on-remove",m)})}else n("on-remove",m)},f=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},h=m=>{a.value=m.url,i.value=!0},_=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(g=>g.size/1024/1024<5?(y(g),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function E(m,x){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function y(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,k)=>{const g=new FormData;g.append("file",m),v.post(c,g,{}).then(B=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",B.data.data),x(B.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),k("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:r.props.limit,accept:r.props.accept,"list-type":r.props.listType,"on-remove":u,"before-upload":_,"on-exceed":f,"on-preview":h,multiple:!0,"http-request":()=>!1,"show-file-list":r.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=r.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[r.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($o))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.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(w.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=k=>i.value=k)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,jf)]),_:1},8,["modelValue"]),r.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,g)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:g,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:k.name,"onUpdate:modelValue":B=>k.name=B,onChange:B=>E(k)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Rf,"."+e.toDisplayString(k.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:B=>u(k)},{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-4c31cc76"]])},Symbol.toStringTag,{value:"Module"})),Mf={class:"image-slot"},Lf={class:"el-upload__tip"},Uf=Object.freeze(Object.defineProperty({__proto__:null,default:I({__name:"ImageUploader",props:{imageUrl:{type:String},props:{type:Object,default(){return{accept:"image/*",tip:""}}}},emits:["on-success"],setup(o,{emit:t}){const n=t,r=o,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=u=>{if(!(u.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=u=>{n("on-success",u.data.imageUrl)};function c(){n("on-success","")}function d(u){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((f,h)=>{const _=new FormData;_.append("image",u.file),v.post(s,_,{}).then(E=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),f(E.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),h("Upload failed")})})}return(u,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,accept:r.props.accept,"on-success":i,"before-upload":a,"http-request":d},e.createSlots({default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:r.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Mf,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref($o))]),_:1})),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Lf,e.toDisplayString(r.props.tip),1)]),key:"0"}:void 0]),1032,["action","accept"]))}},[["__scopeId","data-v-4344bdad"]])},Symbol.toStringTag,{value:"Module"}));var He=-1,Be=1,me=0;function Gt(o,t,n,r){if(o===t)return o?[[me,o]]:[];if(n!=null){var s=Wf(o,t,n);if(s)return s}var a=No(o,t),i=o.substring(0,a);o=o.substring(a),t=t.substring(a),a=Fo(o,t);var c=o.substring(o.length-a);o=o.substring(0,o.length-a),t=t.substring(0,t.length-a);var d=zf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),Ha(d,r),d}function zf(o,t){var n;if(!o)return[[Be,t]];if(!t)return[[He,o]];var r=o.length>t.length?o:t,s=o.length>t.length?t:o,a=r.indexOf(s);if(a!==-1)return n=[[Be,r.substring(0,a)],[me,s],[Be,r.substring(a+s.length)]],o.length>t.length&&(n[0][0]=n[2][0]=He),n;if(s.length===1)return[[He,o],[Be,t]];var i=Pf(o,t);if(i){var c=i[0],d=i[1],u=i[2],f=i[3],h=i[4],_=Gt(c,u),E=Gt(d,f);return _.concat([[me,h]],E)}return Hf(o,t)}function Hf(o,t){for(var n=o.length,r=t.length,s=Math.ceil((n+r)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),u=0;u<i;u++)c[u]=-1,d[u]=-1;c[a+1]=0,d[a+1]=0;for(var f=n-r,h=f%2!==0,_=0,E=0,y=0,m=0,x=0;x<s;x++){for(var k=-x+_;k<=x-E;k+=2){var g=a+k,B;k===-x||k!==x&&c[g-1]<c[g+1]?B=c[g+1]:B=c[g-1]+1;for(var S=B-k;B<n&&S<r&&o.charAt(B)===t.charAt(S);)B++,S++;if(c[g]=B,B>n)E+=2;else if(S>r)_+=2;else if(h){var C=a+f-k;if(C>=0&&C<i&&d[C]!==-1){var O=n-d[C];if(B>=O)return za(o,t,B,S)}}}for(var M=-x+y;M<=x-m;M+=2){var C=a+M,O;M===-x||M!==x&&d[C-1]<d[C+1]?O=d[C+1]:O=d[C-1]+1;for(var A=O-M;O<n&&A<r&&o.charAt(n-O-1)===t.charAt(r-A-1);)O++,A++;if(d[C]=O,O>n)m+=2;else if(A>r)y+=2;else if(!h){var g=a+f-M;if(g>=0&&g<i&&c[g]!==-1){var B=c[g],S=a+B-g;if(O=n-O,B>=O)return za(o,t,B,S)}}}}return[[He,o],[Be,t]]}function za(o,t,n,r){var s=o.substring(0,n),a=t.substring(0,r),i=o.substring(n),c=t.substring(r),d=Gt(s,a),u=Gt(i,c);return d.concat(u)}function No(o,t){if(!o||!t||o.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(a,s)==t.substring(a,s)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Pa(o.charCodeAt(s-1))&&s--,s}function Fo(o,t){if(!o||!t||o.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(o.length-s,o.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return qa(o.charCodeAt(o.length-s))&&s--,s}function Pf(o,t){var n=o.length>t.length?o:t,r=o.length>t.length?t:o;if(n.length<4||r.length*2<n.length)return null;function s(E,y,m){for(var x=E.substring(m,m+Math.floor(E.length/4)),k=-1,g="",B,S,C,O;(k=y.indexOf(x,k+1))!==-1;){var M=No(E.substring(m),y.substring(k)),A=Fo(E.substring(0,m),y.substring(0,k));g.length<A+M&&(g=y.substring(k-A,k)+y.substring(k,k+M),B=E.substring(0,m-A),S=E.substring(m+M),C=y.substring(0,k-A),O=y.substring(k+M))}return g.length*2>=E.length?[B,S,C,O,g]:null}var a=s(n,r,Math.ceil(n.length/4)),i=s(n,r,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,u,f,h;o.length>t.length?(d=c[0],u=c[1],f=c[2],h=c[3]):(f=c[0],h=c[1],d=c[2],u=c[3]);var _=c[4];return[d,u,f,h,_]}function Ha(o,t){o.push([me,""]);for(var n=0,r=0,s=0,a="",i="",c;n<o.length;){if(n<o.length-1&&!o[n][1]){o.splice(n,1);continue}switch(o[n][0]){case Be:s++,i+=o[n][1],n++;break;case He:r++,a+=o[n][1],n++;break;case me:var d=n-s-r-1;if(t){if(d>=0&&Ga(o[d][1])){var u=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=u+a,i=u+i,!o[d][1]){o.splice(d,1),n--;var f=d-1;o[f]&&o[f][0]===Be&&(s++,i=o[f][1]+i,f--),o[f]&&o[f][0]===He&&(r++,a=o[f][1]+a,f--),d=f}}if(Wa(o[n][1])){var u=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=u,i+=u}}if(n<o.length-1&&!o[n][1]){o.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=No(i,a),c!==0&&(d>=0?o[d][1]+=i.substring(0,c):(o.splice(0,0,[me,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Fo(i,a),c!==0&&(o[n][1]=i.substring(i.length-c)+o[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var h=s+r;a.length===0&&i.length===0?(o.splice(n-h,h),n=n-h):a.length===0?(o.splice(n-h,h,[Be,i]),n=n-h+1):i.length===0?(o.splice(n-h,h,[He,a]),n=n-h+1):(o.splice(n-h,h,[He,a],[Be,i]),n=n-h+2)}n!==0&&o[n-1][0]===me?(o[n-1][1]+=o[n][1],o.splice(n,1)):n++,s=0,r=0,a="",i="";break}}o[o.length-1][1]===""&&o.pop();var _=!1;for(n=1;n<o.length-1;)o[n-1][0]===me&&o[n+1][0]===me&&(o[n][1].substring(o[n][1].length-o[n-1][1].length)===o[n-1][1]?(o[n][1]=o[n-1][1]+o[n][1].substring(0,o[n][1].length-o[n-1][1].length),o[n+1][1]=o[n-1][1]+o[n+1][1],o.splice(n-1,1),_=!0):o[n][1].substring(0,o[n+1][1].length)==o[n+1][1]&&(o[n-1][1]+=o[n+1][1],o[n][1]=o[n][1].substring(o[n+1][1].length)+o[n+1][1],o.splice(n+1,1),_=!0)),n++;_&&Ha(o,t)}function Pa(o){return o>=55296&&o<=56319}function qa(o){return o>=56320&&o<=57343}function Wa(o){return qa(o.charCodeAt(0))}function Ga(o){return Pa(o.charCodeAt(o.length-1))}function qf(o){for(var t=[],n=0;n<o.length;n++)o[n][1].length>0&&t.push(o[n]);return t}function Ao(o,t,n,r){return Ga(o)||Wa(r)?null:qf([[me,o],[He,t],[Be,n],[me,r]])}function Wf(o,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=o.length,i=t.length;if(r.length===0&&(s===null||s.length===0)){var c=r.index,d=o.slice(0,c),u=o.slice(c),f=s?s.index:null;e:{var h=c+i-a;if(f!==null&&f!==h||h<0||h>i)break e;var _=t.slice(0,h),E=t.slice(h);if(E!==u)break e;var y=Math.min(c,h),m=d.slice(0,y),x=_.slice(0,y);if(m!==x)break e;var k=d.slice(y),g=_.slice(y);return Ao(m,k,g,u)}e:{if(f!==null&&f!==c)break e;var B=c,_=t.slice(0,B),E=t.slice(B);if(_!==d)break e;var S=Math.min(a-B,i-B),C=u.slice(u.length-S),O=E.slice(E.length-S);if(C!==O)break e;var k=u.slice(0,u.length-S),g=E.slice(0,E.length-S);return Ao(d,k,g,C)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),C=o.slice(r.index+r.length),y=m.length,S=C.length;if(i<y+S)break e;var x=t.slice(0,y),O=t.slice(i-S);if(m!==x||C!==O)break e;var k=o.slice(y,a-S),g=t.slice(y,i-S);return Ao(m,k,g,C)}return null}function Nn(o,t,n){return Gt(o,t,n,!0)}Nn.INSERT=Be,Nn.DELETE=He,Nn.EQUAL=me;var Gf=Nn,Fn={exports:{}};Fn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",u="[object Error]",f="[object Function]",h="[object GeneratorFunction]",_="[object Map]",E="[object Number]",y="[object Object]",m="[object Promise]",x="[object RegExp]",k="[object Set]",g="[object String]",B="[object Symbol]",S="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",A="[object Float64Array]",ne="[object Int8Array]",J="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",Pe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Bt=/\w*$/,P=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,L={};L[a]=L[i]=L[C]=L[O]=L[c]=L[d]=L[M]=L[A]=L[ne]=L[J]=L[D]=L[_]=L[E]=L[y]=L[x]=L[k]=L[g]=L[B]=L[U]=L[X]=L[Se]=L[Pe]=!0,L[u]=L[f]=L[S]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,Ce=we||Mo||Function("return this")(),Mn=t&&!t.nodeType&&t,K=Mn&&!0&&o&&!o.nodeType&&o,Ln=K&&K.exports===Mn;function Lo(l,p){return l.set(p[0],p[1]),l}function $e(l,p){return l.add(p),l}function Un(l,p){for(var b=-1,$=l?l.length:0;++b<$&&p(l[b],b,l)!==!1;);return l}function zn(l,p){for(var b=-1,$=p.length,R=l.length;++b<$;)l[R+b]=p[b];return l}function Kt(l,p,b,$){for(var R=-1,F=l?l.length:0;++R<F;)b=p(b,l[R],R,l);return b}function Jt(l,p){for(var b=-1,$=Array(l);++b<l;)$[b]=p(b);return $}function Hn(l,p){return l==null?void 0:l[p]}function Xt(l){var p=!1;if(l!=null&&typeof l.toString!="function")try{p=!!(l+"")}catch{}return p}function Pn(l){var p=-1,b=Array(l.size);return l.forEach(function($,R){b[++p]=[R,$]}),b}function Zt(l,p){return function(b){return l(p(b))}}function qn(l){var p=-1,b=Array(l.size);return l.forEach(function($){b[++p]=$}),b}var Uo=Array.prototype,zo=Function.prototype,St=Object.prototype,vt=Ce["__core-js_shared__"],Wn=function(){var l=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Gn=zo.toString,qe=St.hasOwnProperty,Ct=St.toString,Ho=RegExp("^"+Gn.call(qe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Ln?Ce.Buffer:void 0,$t=Ce.Symbol,en=Ce.Uint8Array,ke=Zt(Object.getPrototypeOf,Object),Qn=Object.create,Yn=St.propertyIsEnumerable,Po=Uo.splice,tn=Object.getOwnPropertySymbols,Vt=ct?ct.isBuffer:void 0,Kn=Zt(Object.keys,Object),Ot=Oe(Ce,"DataView"),dt=Oe(Ce,"Map"),Ve=Oe(Ce,"Promise"),Dt=Oe(Ce,"Set"),nn=Oe(Ce,"WeakMap"),ut=Oe(Object,"create"),on=pe(Ot),ft=pe(dt),rn=pe(Ve),an=pe(Dt),sn=pe(nn),rt=$t?$t.prototype:void 0,Jn=rt?rt.valueOf:void 0;function Ke(l){var p=-1,b=l?l.length:0;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function qo(){this.__data__=ut?ut(null):{}}function Wo(l){return this.has(l)&&delete this.__data__[l]}function Go(l){var p=this.__data__;if(ut){var b=p[l];return b===r?void 0:b}return qe.call(p,l)?p[l]:void 0}function Xn(l){var p=this.__data__;return ut?p[l]!==void 0:qe.call(p,l)}function ln(l,p){var b=this.__data__;return b[l]=ut&&p===void 0?r:p,this}Ke.prototype.clear=qo,Ke.prototype.delete=Wo,Ke.prototype.get=Go,Ke.prototype.has=Xn,Ke.prototype.set=ln;function ie(l){var p=-1,b=l?l.length:0;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function Qo(){this.__data__=[]}function Yo(l){var p=this.__data__,b=Nt(p,l);if(b<0)return!1;var $=p.length-1;return b==$?p.pop():Po.call(p,b,1),!0}function Ko(l){var p=this.__data__,b=Nt(p,l);return b<0?void 0:p[b][1]}function Jo(l){return Nt(this.__data__,l)>-1}function Xo(l,p){var b=this.__data__,$=Nt(b,l);return $<0?b.push([l,p]):b[$][1]=p,this}ie.prototype.clear=Qo,ie.prototype.delete=Yo,ie.prototype.get=Ko,ie.prototype.has=Jo,ie.prototype.set=Xo;function ce(l){var p=-1,b=l?l.length:0;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function Zo(){this.__data__={hash:new Ke,map:new(dt||ie),string:new Ke}}function vo(l){return ht(this,l).delete(l)}function er(l){return ht(this,l).get(l)}function tr(l){return ht(this,l).has(l)}function nr(l,p){return ht(this,l).set(l,p),this}ce.prototype.clear=Zo,ce.prototype.delete=vo,ce.prototype.get=er,ce.prototype.has=tr,ce.prototype.set=nr;function ge(l){this.__data__=new ie(l)}function or(){this.__data__=new ie}function rr(l){return this.__data__.delete(l)}function ar(l){return this.__data__.get(l)}function sr(l){return this.__data__.has(l)}function ir(l,p){var b=this.__data__;if(b instanceof ie){var $=b.__data__;if(!dt||$.length<n-1)return $.push([l,p]),this;b=this.__data__=new ce($)}return b.set(l,p),this}ge.prototype.clear=or,ge.prototype.delete=rr,ge.prototype.get=ar,ge.prototype.has=sr,ge.prototype.set=ir;function Tt(l,p){var b=fn(l)||At(l)?Jt(l.length,String):[],$=b.length,R=!!$;for(var F in l)qe.call(l,F)&&!(R&&(F=="length"||kr(F,$)))&&b.push(F);return b}function Zn(l,p,b){var $=l[p];(!(qe.call(l,p)&&oo($,b))||b===void 0&&!(p in l))&&(l[p]=b)}function Nt(l,p){for(var b=l.length;b--;)if(oo(l[b][0],p))return b;return-1}function We(l,p){return l&&un(p,hn(p),l)}function cn(l,p,b,$,R,F,G){var W;if($&&(W=F?$(l,R,F,G):$(l)),W!==void 0)return W;if(!Qe(l))return l;var te=fn(l);if(te){if(W=br(l),!p)return gr(l,W)}else{var Q=Xe(l),de=Q==f||Q==h;if(ro(l))return Ft(l,p);if(Q==y||Q==a||de&&!F){if(Xt(l))return F?l:{};if(W=Ge(de?{}:l),!p)return _r(l,We(W,l))}else{if(!L[Q])return F?l:{};W=wr(l,Q,cn,p)}}G||(G=new ge);var _e=G.get(l);if(_e)return _e;if(G.set(l,W),!te)var oe=b?yr(l):hn(l);return Un(oe||l,function(ue,le){oe&&(le=ue,ue=l[le]),Zn(W,le,cn(ue,p,b,$,le,l,G))}),W}function lr(l){return Qe(l)?Qn(l):{}}function cr(l,p,b){var $=p(l);return fn(l)?$:zn($,b(l))}function dr(l){return Ct.call(l)}function ur(l){if(!Qe(l)||xr(l))return!1;var p=pn(l)||Xt(l)?Ho:P;return p.test(pe(l))}function fr(l){if(!to(l))return Kn(l);var p=[];for(var b in Object(l))qe.call(l,b)&&b!="constructor"&&p.push(b);return p}function Ft(l,p){if(p)return l.slice();var b=new l.constructor(l.length);return l.copy(b),b}function dn(l){var p=new l.constructor(l.byteLength);return new en(p).set(new en(l)),p}function pt(l,p){var b=p?dn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function vn(l,p,b){var $=p?b(Pn(l),!0):Pn(l);return Kt($,Lo,new l.constructor)}function eo(l){var p=new l.constructor(l.source,Bt.exec(l));return p.lastIndex=l.lastIndex,p}function pr(l,p,b){var $=p?b(qn(l),!0):qn(l);return Kt($,$e,new l.constructor)}function hr(l){return Jn?Object(Jn.call(l)):{}}function mr(l,p){var b=p?dn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function gr(l,p){var b=-1,$=l.length;for(p||(p=Array($));++b<$;)p[b]=l[b];return p}function un(l,p,b,$){b||(b={});for(var R=-1,F=p.length;++R<F;){var G=p[R],W=void 0;Zn(b,G,W===void 0?l[G]:W)}return b}function _r(l,p){return un(l,Je(l),p)}function yr(l){return cr(l,hn,Je)}function ht(l,p){var b=l.__data__;return Er(p)?b[typeof p=="string"?"string":"hash"]:b.map}function Oe(l,p){var b=Hn(l,p);return ur(b)?b:void 0}var Je=tn?Zt(tn,Object):Sr,Xe=dr;(Ot&&Xe(new Ot(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=_||Ve&&Xe(Ve.resolve())!=m||Dt&&Xe(new Dt)!=k||nn&&Xe(new nn)!=S)&&(Xe=function(l){var p=Ct.call(l),b=p==y?l.constructor:void 0,$=b?pe(b):void 0;if($)switch($){case on:return O;case ft:return _;case rn:return m;case an:return k;case sn:return S}return p});function br(l){var p=l.length,b=l.constructor(p);return p&&typeof l[0]=="string"&&qe.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function Ge(l){return typeof l.constructor=="function"&&!to(l)?lr(ke(l)):{}}function wr(l,p,b,$){var R=l.constructor;switch(p){case C:return dn(l);case c:case d:return new R(+l);case O:return pt(l,$);case M:case A:case ne:case J:case D:case U:case X:case Se:case Pe:return mr(l,$);case _:return vn(l,$,b);case E:case g:return new R(l);case x:return eo(l);case k:return pr(l,$,b);case B:return hr(l)}}function kr(l,p){return p=p??s,!!p&&(typeof l=="number"||Z.test(l))&&l>-1&&l%1==0&&l<p}function Er(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}function xr(l){return!!Wn&&Wn in l}function to(l){var p=l&&l.constructor,b=typeof p=="function"&&p.prototype||St;return l===b}function pe(l){if(l!=null){try{return Gn.call(l)}catch{}try{return l+""}catch{}}return""}function no(l){return cn(l,!0,!0)}function oo(l,p){return l===p||l!==l&&p!==p}function At(l){return Br(l)&&qe.call(l,"callee")&&(!Yn.call(l,"callee")||Ct.call(l)==a)}var fn=Array.isArray;function jt(l){return l!=null&&ao(l.length)&&!pn(l)}function Br(l){return so(l)&&jt(l)}var ro=Vt||Cr;function pn(l){var p=Qe(l)?Ct.call(l):"";return p==f||p==h}function ao(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Qe(l){var p=typeof l;return!!l&&(p=="object"||p=="function")}function so(l){return!!l&&typeof l=="object"}function hn(l){return jt(l)?Tt(l):fr(l)}function Sr(){return[]}function Cr(){return!1}o.exports=no}(Fn,Fn.exports);var Qa=Fn.exports,An={exports:{}};An.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",h="[object Date]",_="[object Error]",E="[object Function]",y="[object GeneratorFunction]",m="[object Map]",x="[object Number]",k="[object Null]",g="[object Object]",B="[object Promise]",S="[object Proxy]",C="[object RegExp]",O="[object Set]",M="[object String]",A="[object Symbol]",ne="[object Undefined]",J="[object WeakMap]",D="[object ArrayBuffer]",U="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Ye="[object Int16Array]",Bt="[object Int32Array]",P="[object Uint8Array]",Z="[object Uint8ClampedArray]",L="[object Uint16Array]",we="[object Uint32Array]",Mo=/[\\^$.*+?()[\]{}|]/g,Ce=/^\[object .+?Constructor\]$/,Mn=/^(?:0|[1-9]\d*)$/,K={};K[X]=K[Se]=K[Pe]=K[Ye]=K[Bt]=K[P]=K[Z]=K[L]=K[we]=!0,K[c]=K[d]=K[D]=K[f]=K[U]=K[h]=K[_]=K[E]=K[m]=K[x]=K[g]=K[C]=K[O]=K[M]=K[J]=!1;var Ln=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Lo=typeof self=="object"&&self&&self.Object===Object&&self,$e=Ln||Lo||Function("return this")(),Un=t&&!t.nodeType&&t,zn=Un&&!0&&o&&!o.nodeType&&o,Kt=zn&&zn.exports===Un,Jt=Kt&&Ln.process,Hn=function(){try{return Jt&&Jt.binding&&Jt.binding("util")}catch{}}(),Xt=Hn&&Hn.isTypedArray;function Pn(l,p){for(var b=-1,$=l==null?0:l.length,R=0,F=[];++b<$;){var G=l[b];p(G,b,l)&&(F[R++]=G)}return F}function Zt(l,p){for(var b=-1,$=p.length,R=l.length;++b<$;)l[R+b]=p[b];return l}function qn(l,p){for(var b=-1,$=l==null?0:l.length;++b<$;)if(p(l[b],b,l))return!0;return!1}function Uo(l,p){for(var b=-1,$=Array(l);++b<l;)$[b]=p(b);return $}function zo(l){return function(p){return l(p)}}function St(l,p){return l.has(p)}function vt(l,p){return l==null?void 0:l[p]}function Wn(l){var p=-1,b=Array(l.size);return l.forEach(function($,R){b[++p]=[R,$]}),b}function Gn(l,p){return function(b){return l(p(b))}}function qe(l){var p=-1,b=Array(l.size);return l.forEach(function($){b[++p]=$}),b}var Ct=Array.prototype,Ho=Function.prototype,ct=Object.prototype,$t=$e["__core-js_shared__"],en=Ho.toString,ke=ct.hasOwnProperty,Qn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Yn=ct.toString,Po=RegExp("^"+en.call(ke).replace(Mo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tn=Kt?$e.Buffer:void 0,Vt=$e.Symbol,Kn=$e.Uint8Array,Ot=ct.propertyIsEnumerable,dt=Ct.splice,Ve=Vt?Vt.toStringTag:void 0,Dt=Object.getOwnPropertySymbols,nn=tn?tn.isBuffer:void 0,ut=Gn(Object.keys,Object),on=Je($e,"DataView"),ft=Je($e,"Map"),rn=Je($e,"Promise"),an=Je($e,"Set"),sn=Je($e,"WeakMap"),rt=Je(Object,"create"),Jn=pe(on),Ke=pe(ft),qo=pe(rn),Wo=pe(an),Go=pe(sn),Xn=Vt?Vt.prototype:void 0,ln=Xn?Xn.valueOf:void 0;function ie(l){var p=-1,b=l==null?0:l.length;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function Qo(){this.__data__=rt?rt(null):{},this.size=0}function Yo(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}function Ko(l){var p=this.__data__;if(rt){var b=p[l];return b===r?void 0:b}return ke.call(p,l)?p[l]:void 0}function Jo(l){var p=this.__data__;return rt?p[l]!==void 0:ke.call(p,l)}function Xo(l,p){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=rt&&p===void 0?r:p,this}ie.prototype.clear=Qo,ie.prototype.delete=Yo,ie.prototype.get=Ko,ie.prototype.has=Jo,ie.prototype.set=Xo;function ce(l){var p=-1,b=l==null?0:l.length;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function Zo(){this.__data__=[],this.size=0}function vo(l){var p=this.__data__,b=Ft(p,l);if(b<0)return!1;var $=p.length-1;return b==$?p.pop():dt.call(p,b,1),--this.size,!0}function er(l){var p=this.__data__,b=Ft(p,l);return b<0?void 0:p[b][1]}function tr(l){return Ft(this.__data__,l)>-1}function nr(l,p){var b=this.__data__,$=Ft(b,l);return $<0?(++this.size,b.push([l,p])):b[$][1]=p,this}ce.prototype.clear=Zo,ce.prototype.delete=vo,ce.prototype.get=er,ce.prototype.has=tr,ce.prototype.set=nr;function ge(l){var p=-1,b=l==null?0:l.length;for(this.clear();++p<b;){var $=l[p];this.set($[0],$[1])}}function or(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function rr(l){var p=Oe(this,l).delete(l);return this.size-=p?1:0,p}function ar(l){return Oe(this,l).get(l)}function sr(l){return Oe(this,l).has(l)}function ir(l,p){var b=Oe(this,l),$=b.size;return b.set(l,p),this.size+=b.size==$?0:1,this}ge.prototype.clear=or,ge.prototype.delete=rr,ge.prototype.get=ar,ge.prototype.has=sr,ge.prototype.set=ir;function Tt(l){var p=-1,b=l==null?0:l.length;for(this.__data__=new ge;++p<b;)this.add(l[p])}function Zn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Zn,Tt.prototype.has=Nt;function We(l){var p=this.__data__=new ce(l);this.size=p.size}function cn(){this.__data__=new ce,this.size=0}function lr(l){var p=this.__data__,b=p.delete(l);return this.size=p.size,b}function cr(l){return this.__data__.get(l)}function dr(l){return this.__data__.has(l)}function ur(l,p){var b=this.__data__;if(b instanceof ce){var $=b.__data__;if(!ft||$.length<n-1)return $.push([l,p]),this.size=++b.size,this;b=this.__data__=new ge($)}return b.set(l,p),this.size=b.size,this}We.prototype.clear=cn,We.prototype.delete=lr,We.prototype.get=cr,We.prototype.has=dr,We.prototype.set=ur;function fr(l,p){var b=At(l),$=!b&&oo(l),R=!b&&!$&&jt(l),F=!b&&!$&&!R&&so(l),G=b||$||R||F,W=G?Uo(l.length,String):[],te=W.length;for(var Q in l)ke.call(l,Q)&&!(G&&(Q=="length"||R&&(Q=="offset"||Q=="parent")||F&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||wr(Q,te)))&&W.push(Q);return W}function Ft(l,p){for(var b=l.length;b--;)if(no(l[b][0],p))return b;return-1}function dn(l,p,b){var $=p(l);return At(l)?$:Zt($,b(l))}function pt(l){return l==null?l===void 0?ne:k:Ve&&Ve in Object(l)?Xe(l):to(l)}function vn(l){return Qe(l)&&pt(l)==c}function eo(l,p,b,$,R){return l===p?!0:l==null||p==null||!Qe(l)&&!Qe(p)?l!==l&&p!==p:pr(l,p,b,$,eo,R)}function pr(l,p,b,$,R,F){var G=At(l),W=At(p),te=G?d:Ge(l),Q=W?d:Ge(p);te=te==c?g:te,Q=Q==c?g:Q;var de=te==g,_e=Q==g,oe=te==Q;if(oe&&jt(l)){if(!jt(p))return!1;G=!0,de=!1}if(oe&&!de)return F||(F=new We),G||so(l)?un(l,p,b,$,R,F):_r(l,p,te,b,$,R,F);if(!(b&s)){var ue=de&&ke.call(l,"__wrapped__"),le=_e&&ke.call(p,"__wrapped__");if(ue||le){var at=ue?l.value():l,Ze=le?p.value():p;return F||(F=new We),R(at,Ze,b,$,F)}}return oe?(F||(F=new We),yr(l,p,b,$,R,F)):!1}function hr(l){if(!ao(l)||Er(l))return!1;var p=ro(l)?Po:Ce;return p.test(pe(l))}function mr(l){return Qe(l)&&pn(l.length)&&!!K[pt(l)]}function gr(l){if(!xr(l))return ut(l);var p=[];for(var b in Object(l))ke.call(l,b)&&b!="constructor"&&p.push(b);return p}function un(l,p,b,$,R,F){var G=b&s,W=l.length,te=p.length;if(W!=te&&!(G&&te>W))return!1;var Q=F.get(l);if(Q&&F.get(p))return Q==p;var de=-1,_e=!0,oe=b&a?new Tt:void 0;for(F.set(l,p),F.set(p,l);++de<W;){var ue=l[de],le=p[de];if($)var at=G?$(le,ue,de,p,l,F):$(ue,le,de,l,p,F);if(at!==void 0){if(at)continue;_e=!1;break}if(oe){if(!qn(p,function(Ze,mt){if(!St(oe,mt)&&(ue===Ze||R(ue,Ze,b,$,F)))return oe.push(mt)})){_e=!1;break}}else if(!(ue===le||R(ue,le,b,$,F))){_e=!1;break}}return F.delete(l),F.delete(p),_e}function _r(l,p,b,$,R,F,G){switch(b){case U:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case D:return!(l.byteLength!=p.byteLength||!F(new Kn(l),new Kn(p)));case f:case h:case x:return no(+l,+p);case _:return l.name==p.name&&l.message==p.message;case C:case M:return l==p+"";case m:var W=Wn;case O:var te=$&s;if(W||(W=qe),l.size!=p.size&&!te)return!1;var Q=G.get(l);if(Q)return Q==p;$|=a,G.set(l,p);var de=un(W(l),W(p),$,R,F,G);return G.delete(l),de;case A:if(ln)return ln.call(l)==ln.call(p)}return!1}function yr(l,p,b,$,R,F){var G=b&s,W=ht(l),te=W.length,Q=ht(p),de=Q.length;if(te!=de&&!G)return!1;for(var _e=te;_e--;){var oe=W[_e];if(!(G?oe in p:ke.call(p,oe)))return!1}var ue=F.get(l);if(ue&&F.get(p))return ue==p;var le=!0;F.set(l,p),F.set(p,l);for(var at=G;++_e<te;){oe=W[_e];var Ze=l[oe],mt=p[oe];if($)var es=G?$(mt,Ze,oe,p,l,F):$(Ze,mt,oe,l,p,F);if(!(es===void 0?Ze===mt||R(Ze,mt,b,$,F):es)){le=!1;break}at||(at=oe=="constructor")}if(le&&!at){var io=l.constructor,lo=p.constructor;io!=lo&&"constructor"in l&&"constructor"in p&&!(typeof io=="function"&&io instanceof io&&typeof lo=="function"&&lo instanceof lo)&&(le=!1)}return F.delete(l),F.delete(p),le}function ht(l){return dn(l,hn,br)}function Oe(l,p){var b=l.__data__;return kr(p)?b[typeof p=="string"?"string":"hash"]:b.map}function Je(l,p){var b=vt(l,p);return hr(b)?b:void 0}function Xe(l){var p=ke.call(l,Ve),b=l[Ve];try{l[Ve]=void 0;var $=!0}catch{}var R=Yn.call(l);return $&&(p?l[Ve]=b:delete l[Ve]),R}var br=Dt?function(l){return l==null?[]:(l=Object(l),Pn(Dt(l),function(p){return Ot.call(l,p)}))}:Sr,Ge=pt;(on&&Ge(new on(new ArrayBuffer(1)))!=U||ft&&Ge(new ft)!=m||rn&&Ge(rn.resolve())!=B||an&&Ge(new an)!=O||sn&&Ge(new sn)!=J)&&(Ge=function(l){var p=pt(l),b=p==g?l.constructor:void 0,$=b?pe(b):"";if($)switch($){case Jn:return U;case Ke:return m;case qo:return B;case Wo:return O;case Go:return J}return p});function wr(l,p){return p=p??i,!!p&&(typeof l=="number"||Mn.test(l))&&l>-1&&l%1==0&&l<p}function kr(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}function Er(l){return!!Qn&&Qn in l}function xr(l){var p=l&&l.constructor,b=typeof p=="function"&&p.prototype||ct;return l===b}function to(l){return Yn.call(l)}function pe(l){if(l!=null){try{return en.call(l)}catch{}try{return l+""}catch{}}return""}function no(l,p){return l===p||l!==l&&p!==p}var oo=vn(function(){return arguments}())?vn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Ot.call(l,"callee")},At=Array.isArray;function fn(l){return l!=null&&pn(l.length)&&!ro(l)}var jt=nn||Cr;function Br(l,p){return eo(l,p)}function ro(l){if(!ao(l))return!1;var p=pt(l);return p==E||p==y||p==u||p==S}function pn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function ao(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}function Qe(l){return l!=null&&typeof l=="object"}var so=Xt?zo(Xt):mr;function hn(l){return fn(l)?fr(l):gr(l)}function Sr(){return[]}function Cr(){return!1}o.exports=Br}(An,An.exports);var Ya=An.exports,jo={},Ka=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(jo,"__esModule",{value:!0});var Qf=Ka(Qa),Yf=Ka(Ya),Ro;(function(o){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Qf.default(i);c||(d=Object.keys(d).reduce(function(f,h){return d[h]!=null&&(f[h]=d[h]),f},{}));for(var u in a)a[u]!==void 0&&i[u]===void 0&&(d[u]=a[u]);return Object.keys(d).length>0?d:void 0}o.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,u){return Yf.default(a[u],i[u])||(d[u]=i[u]===void 0?null:i[u]),d},{});return Object.keys(c).length>0?c:void 0}o.diff=n;function r(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,u){return i[u]!==a[u]&&a[u]!==void 0&&(d[u]=i[u]),d},{});return Object.keys(a).reduce(function(d,u){return a[u]!==i[u]&&i[u]===void 0&&(d[u]=null),d},c)}o.invert=r;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(u,f){return a[f]===void 0&&(u[f]=i[f]),u},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(Ro||(Ro={})),jo.default=Ro;var jn={},Rn={},Ja;function Kf(){if(Ja)return Rn;Ja=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rn,"__esModule",{value:!0});var t=o(Za()),n=function(){function r(s){this.ops=s,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.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}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},r.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"},r.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[]},r}();return Rn.default=n,Rn}var Xa;function Za(){if(Xa)return jn;Xa=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jn,"__esModule",{value:!0});var t=o(Kf()),n;return function(r){function s(i){return new t.default(i)}r.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}r.length=a}(n||(n={})),jn.default=n,jn}var Qt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},In=Qt(Gf),Jf=Qt(Qa),Io=Qt(Ya),Yt=Qt(jo),se=Qt(Za()),Xf="\0",Zf=function(){function o(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return o.prototype.insert=function(t,n){var r={};return typeof t=="string"&&t.length===0?this:(r.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},o.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},o.prototype.retain=function(t,n){if(t<=0)return this;var r={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},o.prototype.push=function(t){var n=this.ops.length,r=this.ops[n-1];if(t=Jf.default(t),typeof r=="object"){if(typeof t.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+t.delete},this;if(typeof r.delete=="number"&&t.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(t),this;if(Io.default(t.attributes,r.attributes)){if(typeof t.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.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},o.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},o.prototype.filter=function(t){return this.ops.filter(t)},o.prototype.forEach=function(t){this.ops.forEach(t)},o.prototype.map=function(t){return this.ops.map(t)},o.prototype.partition=function(t){var n=[],r=[];return this.forEach(function(s){var a=t(s)?n:r;a.push(s)}),[n,r]},o.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},o.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+se.default.length(n):n.delete?t-n.delete:t},0)},o.prototype.length=function(){return this.reduce(function(t,n){return t+se.default.length(n)},0)},o.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var r=[],s=se.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),r.push(i)),a+=se.default.length(i)}return new o(r)},o.prototype.compose=function(t){var n=se.default.iterator(this.ops),r=se.default.iterator(t.ops),s=[],a=r.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&&r.next(a.retain-i)}for(var c=new o(s);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")c.push(r.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),r.peekLength()),u=n.next(d),f=r.next(d);if(typeof f.retain=="number"){var h={};typeof u.retain=="number"?h.retain=d:h.insert=u.insert;var _=Yt.default.compose(u.attributes,f.attributes,typeof u.retain=="number");if(_&&(h.attributes=_),c.push(h),!r.hasNext()&&Io.default(c.ops[c.ops.length-1],h)){var E=new o(n.rest());return c.concat(E).chop()}}else typeof f.delete=="number"&&typeof u.retain=="number"&&c.push(f)}return c.chop()},o.prototype.concat=function(t){var n=new o(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},o.prototype.diff=function(t,n){if(this.ops===t.ops)return new o;var r=[this,t].map(function(d){return d.map(function(u){if(u.insert!=null)return typeof u.insert=="string"?u.insert:Xf;var f=d===t?"on":"with";throw new Error("diff() called "+f+" non-document")}).join("")}),s=new o,a=In.default(r[0],r[1],n),i=se.default.iterator(this.ops),c=se.default.iterator(t.ops);return a.forEach(function(d){for(var u=d[1].length;u>0;){var f=0;switch(d[0]){case In.default.INSERT:f=Math.min(c.peekLength(),u),s.push(c.next(f));break;case In.default.DELETE:f=Math.min(u,i.peekLength()),i.next(f),s.delete(f);break;case In.default.EQUAL:f=Math.min(i.peekLength(),c.peekLength(),u);var h=i.next(f),_=c.next(f);Io.default(h.insert,_.insert)?s.retain(f,Yt.default.diff(h.attributes,_.attributes)):s.push(_).delete(f);break}u-=f}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
7
- `);for(var r=se.default.iterator(this.ops),s=new o,a=0;r.hasNext();){if(r.peekType()!=="insert")return;var i=r.peek(),c=se.default.length(i)-r.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(r.next());else if(d>0)s.push(r.next(d));else{if(t(s,r.next(1).attributes||{},a)===!1)return;a+=1,s=new o}}s.length()>0&&t(s,{},a)},o.prototype.invert=function(t){var n=new o;return this.reduce(function(r,s){if(s.insert)n.delete(se.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),r+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(r,r+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(se.default.length(c),Yt.default.invert(s.attributes,c.attributes))}),r+a}}return r},0),n.chop()},o.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var r=t,s=se.default.iterator(this.ops),a=se.default.iterator(r.ops),i=new o;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(se.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),u=a.next(c);if(d.delete)continue;u.delete?i.push(u):i.retain(c,Yt.default.transform(d.attributes,u.attributes,n))}return i.chop()},o.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var r=se.default.iterator(this.ops),s=0;r.hasNext()&&s<=t;){var a=r.peekLength(),i=r.peekType();if(r.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},o.Op=se.default,o.AttributeMap=Yt.default,o}(),vf=Zf;const ep=aa(vf);/*!
1
+ (function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H.kouxiangtang={},H.Vue,H.ElementPlus,H.VueRouter,H.Pinia,H.Quill))})(this,function(H,e,w,U,De,hn){"use strict";function es(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const Rt=es(hn);function Cr(o,t){return function(){return o.apply(t,arguments)}}const{toString:ts}=Object.prototype,{getPrototypeOf:io}=Object,mn=(o=>t=>{const n=ts.call(t);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Te=o=>(o=o.toLowerCase(),t=>mn(t)===o),gn=o=>t=>typeof t===o,{isArray:gt}=Array,It=gn("undefined");function ns(o){return o!==null&&!It(o)&&o.constructor!==null&&!It(o.constructor)&&ye(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const $r=Te("ArrayBuffer");function os(o){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(o):t=o&&o.buffer&&$r(o.buffer),t}const rs=gn("string"),ye=gn("function"),Vr=gn("number"),_n=o=>o!==null&&typeof o=="object",as=o=>o===!0||o===!1,yn=o=>{if(mn(o)!=="object")return!1;const t=io(o);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in o)&&!(Symbol.iterator in o)},ss=Te("Date"),is=Te("File"),ls=Te("Blob"),cs=Te("FileList"),ds=o=>_n(o)&&ye(o.pipe),us=o=>{let t;return o&&(typeof FormData=="function"&&o instanceof FormData||ye(o.append)&&((t=mn(o))==="formdata"||t==="object"&&ye(o.toString)&&o.toString()==="[object FormData]"))},fs=Te("URLSearchParams"),ps=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mt(o,t,{allOwnKeys:n=!1}={}){if(o===null||typeof o>"u")return;let r,s;if(typeof o!="object"&&(o=[o]),gt(o))for(r=0,s=o.length;r<s;r++)t.call(null,o[r],r,o);else{const a=n?Object.getOwnPropertyNames(o):Object.keys(o),i=a.length;let c;for(r=0;r<i;r++)c=a[r],t.call(null,o[c],c,o)}}function Or(o,t){t=t.toLowerCase();const n=Object.keys(o);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Tr=o=>!It(o)&&o!==Dr;function lo(){const{caseless:o}=Tr(this)&&this||{},t={},n=(r,s)=>{const a=o&&Or(t,s)||s;yn(t[a])&&yn(r)?t[a]=lo(t[a],r):yn(r)?t[a]=lo({},r):gt(r)?t[a]=r.slice():t[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Mt(arguments[r],n);return t}const hs=(o,t,n,{allOwnKeys:r}={})=>(Mt(t,(s,a)=>{n&&ye(s)?o[a]=Cr(s,n):o[a]=s},{allOwnKeys:r}),o),ms=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),gs=(o,t,n,r)=>{o.prototype=Object.create(t.prototype,r),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:t.prototype}),n&&Object.assign(o.prototype,n)},_s=(o,t,n,r)=>{let s,a,i;const c={};if(t=t||{},o==null)return t;do{for(s=Object.getOwnPropertyNames(o),a=s.length;a-- >0;)i=s[a],(!r||r(i,o,t))&&!c[i]&&(t[i]=o[i],c[i]=!0);o=n!==!1&&io(o)}while(o&&(!n||n(o,t))&&o!==Object.prototype);return t},ys=(o,t,n)=>{o=String(o),(n===void 0||n>o.length)&&(n=o.length),n-=t.length;const r=o.indexOf(t,n);return r!==-1&&r===n},bs=o=>{if(!o)return null;if(gt(o))return o;let t=o.length;if(!Vr(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=o[t];return n},ws=(o=>t=>o&&t instanceof o)(typeof Uint8Array<"u"&&io(Uint8Array)),ks=(o,t)=>{const r=(o&&o[Symbol.iterator]).call(o);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(o,a[0],a[1])}},Es=(o,t)=>{let n;const r=[];for(;(n=o.exec(t))!==null;)r.push(n);return r},xs=Te("HTMLFormElement"),Bs=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Nr=(({hasOwnProperty:o})=>(t,n)=>o.call(t,n))(Object.prototype),Ss=Te("RegExp"),Fr=(o,t)=>{const n=Object.getOwnPropertyDescriptors(o),r={};Mt(n,(s,a)=>{let i;(i=t(s,a,o))!==!1&&(r[a]=i||s)}),Object.defineProperties(o,r)},Cs=o=>{Fr(o,(t,n)=>{if(ye(o)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=o[n];if(ye(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$s=(o,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return gt(o)?r(o):r(String(o).split(t)),n},Vs=()=>{},Os=(o,t)=>(o=+o,Number.isFinite(o)?o:t),co="abcdefghijklmnopqrstuvwxyz",Ar="0123456789",jr={DIGIT:Ar,ALPHA:co,ALPHA_DIGIT:co+co.toUpperCase()+Ar},Ds=(o=16,t=jr.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;o--;)n+=t[Math.random()*r|0];return n};function Ts(o){return!!(o&&ye(o.append)&&o[Symbol.toStringTag]==="FormData"&&o[Symbol.iterator])}const Ns=o=>{const t=new Array(10),n=(r,s)=>{if(_n(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const a=gt(r)?[]:{};return Mt(r,(i,c)=>{const d=n(i,s+1);!It(d)&&(a[c]=d)}),t[s]=void 0,a}}return r};return n(o,0)},Fs=Te("AsyncFunction"),$={isArray:gt,isArrayBuffer:$r,isBuffer:ns,isFormData:us,isArrayBufferView:os,isString:rs,isNumber:Vr,isBoolean:as,isObject:_n,isPlainObject:yn,isUndefined:It,isDate:ss,isFile:is,isBlob:ls,isRegExp:Ss,isFunction:ye,isStream:ds,isURLSearchParams:fs,isTypedArray:ws,isFileList:cs,forEach:Mt,merge:lo,extend:hs,trim:ps,stripBOM:ms,inherits:gs,toFlatObject:_s,kindOf:mn,kindOfTest:Te,endsWith:ys,toArray:bs,forEachEntry:ks,matchAll:Es,isHTMLForm:xs,hasOwnProperty:Nr,hasOwnProp:Nr,reduceDescriptors:Fr,freezeMethods:Cs,toObjectSet:$s,toCamelCase:Bs,noop:Vs,toFiniteNumber:Os,findKey:Or,global:Dr,isContextDefined:Tr,ALPHABET:jr,generateString:Ds,isSpecCompliantForm:Ts,toJSONObject:Ns,isAsyncFn:Fs,isThenable:o=>o&&(_n(o)||ye(o))&&ye(o.then)&&ye(o.catch)};function P(o,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}$.inherits(P,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 Rr=P.prototype,Ir={};["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(o=>{Ir[o]={value:o}}),Object.defineProperties(P,Ir),Object.defineProperty(Rr,"isAxiosError",{value:!0}),P.from=(o,t,n,r,s,a)=>{const i=Object.create(Rr);return $.toFlatObject(o,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),P.call(i,o.message,t,n,r,s),i.cause=o,i.name=o.name,a&&Object.assign(i,a),i};const As=null;function uo(o){return $.isPlainObject(o)||$.isArray(o)}function Mr(o){return $.endsWith(o,"[]")?o.slice(0,-2):o}function Lr(o,t,n){return o?o.concat(t).map(function(s,a){return s=Mr(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function js(o){return $.isArray(o)&&!o.some(uo)}const Rs=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function bn(o,t,n){if(!$.isObject(o))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,x){return!$.isUndefined(x[m])});const r=n.metaTokens,s=n.visitor||u,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 P("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 u(y,m,x){let k=y;if(y&&!x&&typeof y=="object"){if($.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=JSON.stringify(y);else if($.isArray(y)&&js(y)||($.isFileList(y)||$.endsWith(m,"[]"))&&(k=$.toArray(y)))return m=Mr(m),k.forEach(function(S,E){!($.isUndefined(S)||S===null)&&t.append(i===!0?Lr([m],E,a):i===null?m:m+"[]",f(S))}),!1}return uo(y)?!0:(t.append(Lr(x,m,a),f(y)),!1)}const p=[],g=Object.assign(Rs,{defaultVisitor:u,convertValue:f,isVisitable:uo});function B(y,m){if(!$.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(y),$.forEach(y,function(k,_){(!($.isUndefined(k)||k===null)&&s.call(t,k,$.isString(_)?_.trim():_,m,g))===!0&&B(k,m?m.concat(_):[_])}),p.pop()}}if(!$.isObject(o))throw new TypeError("data must be an object");return B(o),t}function Ur(o){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function fo(o,t){this._pairs=[],o&&bn(o,this,t)}const zr=fo.prototype;zr.append=function(t,n){this._pairs.push([t,n])},zr.toString=function(t){const n=t?function(r){return t.call(this,r,Ur)}:Ur;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Is(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hr(o,t,n){if(!t)return o;const r=n&&n.encode||Is,s=n&&n.serialize;let a;if(s?a=s(t,n):a=$.isURLSearchParams(t)?t.toString():new fo(t,n).toString(r),a){const i=o.indexOf("#");i!==-1&&(o=o.slice(0,i)),o+=(o.indexOf("?")===-1?"?":"&")+a}return o}class Pr{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ms={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fo,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Wr=typeof window<"u"&&typeof document<"u",Ls=(o=>Wr&&["ReactNative","NativeScript","NS"].indexOf(o)<0)(typeof navigator<"u"&&navigator.product),Us=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ne={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wr,hasStandardBrowserEnv:Ls,hasStandardBrowserWebWorkerEnv:Us},Symbol.toStringTag,{value:"Module"})),...Ms};function zs(o,t){return bn(o,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,a){return Ne.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Hs(o){return $.matchAll(/\w+|\[(\w*)]/g,o).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ps(o){const t={},n=Object.keys(o);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=o[a];return t}function Gr(o){function t(n,r,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],r]:s[i]=r,!c):((!s[i]||!$.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],a)&&$.isArray(s[i])&&(s[i]=Ps(s[i])),!c)}if($.isFormData(o)&&$.isFunction(o.entries)){const n={};return $.forEachEntry(o,(r,s)=>{t(Hs(r),s,n,0)}),n}return null}function qs(o,t,n){if($.isString(o))try{return(t||JSON.parse)(o),$.trim(o)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(o)}const Lt={transitional:qr,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(Gr(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(r.indexOf("application/x-www-form-urlencoded")>-1)return zs(t,this.formSerializer).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return bn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),qs(t)):t}],transformResponse:[function(t){const n=this.transitional||Lt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&$.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?P.from(c,P.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:Ne.classes.FormData,Blob:Ne.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"],o=>{Lt.headers[o]={}});const Ws=$.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"]),Gs=o=>{const t={};let n,r,s;return o&&o.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Ws[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qr=Symbol("internals");function Ut(o){return o&&String(o).trim().toLowerCase()}function wn(o){return o===!1||o==null?o:$.isArray(o)?o.map(wn):String(o)}function Qs(o){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(o);)t[r[1]]=r[2];return t}const Ys=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function po(o,t,n,r,s){if($.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function Ks(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Js(o,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(o,r+n,{value:function(s,a,i){return this[r].call(this,t,s,a,i)},configurable:!0})})}class be{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const u=Ut(d);if(!u)throw new Error("header name must be a non-empty string");const p=$.findKey(s,u);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||d]=wn(c))}const i=(c,d)=>$.forEach(c,(f,u)=>a(f,u,d));return $.isPlainObject(t)||t instanceof this.constructor?i(t,n):$.isString(t)&&(t=t.trim())&&!Ys(t)?i(Gs(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Ut(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Qs(s);if($.isFunction(n))return n.call(this,s,r);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ut(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||po(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(i){if(i=Ut(i),i){const c=$.findKey(r,i);c&&(!n||po(r,r[c],c,n))&&(delete r[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||po(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return $.forEach(this,(s,a)=>{const i=$.findKey(r,a);if(i){n[i]=wn(s),delete n[a];return}const c=t?Ks(a):String(a).trim();c!==a&&delete n[a],n[c]=wn(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&$.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Qr]=this[Qr]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ut(i);r[c]||(Js(s,i),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}}be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(be.prototype,({value:o},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>o,set(r){this[n]=r}}}),$.freezeMethods(be);function ho(o,t){const n=this||Lt,r=t||n,s=be.from(r.headers);let a=r.data;return $.forEach(o,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Yr(o){return!!(o&&o.__CANCEL__)}function zt(o,t,n){P.call(this,o??"canceled",P.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(zt,P,{__CANCEL__:!0});function Xs(o,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?o(n):t(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Zs=Ne.hasStandardBrowserEnv?{write(o,t,n,r,s,a){const i=[o+"="+encodeURIComponent(t)];$.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$.isString(r)&&i.push("path="+r),$.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(o){const t=document.cookie.match(new RegExp("(^|;\\s*)("+o+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(o){this.write(o,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vs(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function ei(o,t){return t?o.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):o}function Kr(o,t){return o&&!vs(t)?ei(o,t):t}const ti=Ne.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;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 r=s(window.location.href),function(i){const c=$.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function ni(o){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return t&&t[1]||""}function oi(o,t){o=o||10;const n=new Array(o),r=new Array(o);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),u=r[a];i||(i=f),n[s]=d,r[s]=f;let p=a,g=0;for(;p!==s;)g+=n[p++],p=p%o;if(s=(s+1)%o,s===a&&(a=(a+1)%o),f-i<t)return;const B=u&&f-u;return B?Math.round(g*1e3/B):void 0}}function Jr(o,t){let n=0;const r=oi(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=r(c),f=a<=i;n=a;const u={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};u[t?"download":"upload"]=!0,o(u)}}const mo={http:As,xhr:typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(n,r){let s=o.data;const a=be.from(o.headers).normalize();let{responseType:i,withXSRFToken:c}=o,d;function f(){o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let u;if($.isFormData(s)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((u=a.getContentType())!==!1){const[m,...x]=u?u.split(";").map(k=>k.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...x].join("; "))}}let p=new XMLHttpRequest;if(o.auth){const m=o.auth.username||"",x=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+x))}const g=Kr(o.baseURL,o.url);p.open(o.method.toUpperCase(),Hr(g,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function B(){if(!p)return;const m=be.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:o,request:p};Xs(function(S){n(S),f()},function(S){r(S),f()},k),p=null}if("onloadend"in p?p.onloadend=B:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(B)},p.onabort=function(){p&&(r(new P("Request aborted",P.ECONNABORTED,o,p)),p=null)},p.onerror=function(){r(new P("Network Error",P.ERR_NETWORK,o,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||qr;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new P(x,k.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,o,p)),p=null},Ne.hasStandardBrowserEnv&&(c&&$.isFunction(c)&&(c=c(o)),c||c!==!1&&ti(g))){const m=o.xsrfHeaderName&&o.xsrfCookieName&&Zs.read(o.xsrfCookieName);m&&a.set(o.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in p&&$.forEach(a.toJSON(),function(x,k){p.setRequestHeader(k,x)}),$.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",Jr(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",Jr(o.onUploadProgress)),(o.cancelToken||o.signal)&&(d=m=>{p&&(r(!m||m.type?new zt(null,o,p):m),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const y=ni(g);if(y&&Ne.protocols.indexOf(y)===-1){r(new P("Unsupported protocol "+y+":",P.ERR_BAD_REQUEST,o));return}p.send(s||null)})}};$.forEach(mo,(o,t)=>{if(o){try{Object.defineProperty(o,"name",{value:t})}catch{}Object.defineProperty(o,"adapterName",{value:t})}});const Xr=o=>`- ${o}`,ri=o=>$.isFunction(o)||o===null||o===!1,Zr={getAdapter:o=>{o=$.isArray(o)?o:[o];const{length:t}=o;let n,r;const s={};for(let a=0;a<t;a++){n=o[a];let i;if(r=n,!ri(n)&&(r=mo[(i=String(n)).toLowerCase()],r===void 0))throw new P(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+a]=r}if(!r){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(Xr).join(`
5
+ `):" "+Xr(a[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:mo};function go(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new zt(null,o)}function vr(o){return go(o),o.headers=be.from(o.headers),o.data=ho.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),Zr.getAdapter(o.adapter||Lt.adapter)(o).then(function(r){return go(o),r.data=ho.call(o,o.transformResponse,r),r.headers=be.from(r.headers),r},function(r){return Yr(r)||(go(o),r&&r.response&&(r.response.data=ho.call(o,o.transformResponse,r.response),r.response.headers=be.from(r.response.headers))),Promise.reject(r)})}const ea=o=>o instanceof be?{...o}:o;function _t(o,t){t=t||{};const n={};function r(f,u,p){return $.isPlainObject(f)&&$.isPlainObject(u)?$.merge.call({caseless:p},f,u):$.isPlainObject(u)?$.merge({},u):$.isArray(u)?u.slice():u}function s(f,u,p){if($.isUndefined(u)){if(!$.isUndefined(f))return r(void 0,f,p)}else return r(f,u,p)}function a(f,u){if(!$.isUndefined(u))return r(void 0,u)}function i(f,u){if($.isUndefined(u)){if(!$.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,p){if(p in t)return r(f,u);if(p in o)return r(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,u)=>s(ea(f),ea(u),!0)};return $.forEach(Object.keys(Object.assign({},o,t)),function(u){const p=d[u]||s,g=p(o[u],t[u],u);$.isUndefined(g)&&p!==c||(n[u]=g)}),n}const ta="1.6.8",_o={};["object","boolean","number","function","string","symbol"].forEach((o,t)=>{_o[o]=function(r){return typeof r===o||"a"+(t<1?"n ":" ")+o}});const na={};_o.transitional=function(t,n,r){function s(a,i){return"[Axios v"+ta+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,c)=>{if(t===!1)throw new P(s(i," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!na[i]&&(na[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 ai(o,t,n){if(typeof o!="object")throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(o);let s=r.length;for(;s-- >0;){const a=r[s],i=t[a];if(i){const c=o[a],d=c===void 0||i(c,a,o);if(d!==!0)throw new P("option "+a+" must be "+d,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+a,P.ERR_BAD_OPTION)}}const yo={assertOptions:ai,validators:_o},ve=yo.validators;class st{constructor(t){this.defaults=t,this.interceptors={request:new Pr,response:new Pr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+a):r.stack=a}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&yo.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:yo.assertOptions(s,{encode:ve.function,serialize:ve.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=be.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,p=0,g;if(!d){const y=[vr.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),g=y.length,u=Promise.resolve(n);p<g;)u=u.then(y[p++],y[p++]);return u}g=c.length;let B=n;for(p=0;p<g;){const y=c[p++],m=c[p++];try{B=y(B)}catch(x){m.call(this,x);break}}try{u=vr.call(this,B)}catch(y){return Promise.reject(y)}for(p=0,g=f.length;p<g;)u=u.then(f[p++],f[p++]);return u}getUri(t){t=_t(this.defaults,t);const n=Kr(t.baseURL,t.url);return Hr(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,r){return this.request(_t(r||{},{method:t,url:n,data:(r||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class bo{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 r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(s);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new zt(a,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bo(function(s){t=s}),cancel:t}}}function si(o){return function(n){return o.apply(null,n)}}function ii(o){return $.isObject(o)&&o.isAxiosError===!0}const wo={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(wo).forEach(([o,t])=>{wo[t]=o});function oa(o){const t=new st(o),n=Cr(st.prototype.request,t);return $.extend(n,st.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oa(_t(o,s))},n}const v=oa(Lt);v.Axios=st,v.CanceledError=zt,v.CancelToken=bo,v.isCancel=Yr,v.VERSION=ta,v.toFormData=bn,v.AxiosError=P,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=si,v.isAxiosError=ii,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Gr($.isHTMLForm(o)?new FormData(o):o),v.getAdapter=Zr.getAdapter,v.HttpStatusCode=wo,v.default=v;let yt=null;function li(o){yt=v.create(o)}function ci(){return yt}async function di(o,t={},n={}){return new Promise((r,s)=>{yt.get(o,{headers:n,params:t}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function ui(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function fi(o,t,n={}){return new Promise((r,s)=>{yt.delete(o,{data:t,headers:n}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function pi(o,t,n={}){return new Promise((r,s)=>{yt.put(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}const he={get:di,post:ui,put:pi,remove:fi,setupAxios:li,getAxiosInstance:ci};var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function hi(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var aa={exports:{}};(function(o,t){(function(n,r){typeof hi=="function"?o.exports=r():n.pluralize=r()})(ae,function(){var n=[],r=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function f(m,x){return m.replace(/\$(\d{1,2})/g,function(k,_){return x[_]||""})}function u(m,x){return m.replace(x[0],function(k,_){var S=f(x[1],arguments);return d(k===""?m[_-1]:k,S)})}function p(m,x,k){if(!m.length||s.hasOwnProperty(m))return x;for(var _=k.length;_--;){var S=k[_];if(S[0].test(x))return u(x,S)}return x}function g(m,x,k){return function(_){var S=_.toLowerCase();return x.hasOwnProperty(S)?d(_,S):m.hasOwnProperty(S)?d(_,m[S]):p(S,_,k)}}function B(m,x,k,_){return function(S){var E=S.toLowerCase();return x.hasOwnProperty(E)?!0:m.hasOwnProperty(E)?!1:p(E,E,k)===E}}function y(m,x,k){var _=x===1?y.singular(m):y.plural(m);return(k?x+" ":"")+_}return y.plural=g(i,a,n),y.isPlural=B(i,a,n),y.singular=g(a,i,r),y.isSingular=B(a,i,r),y.addPluralRule=function(m,x){n.push([c(m),x])},y.addSingularRule=function(m,x){r.push([c(m),x])},y.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}y.addPluralRule(m,"$0"),y.addSingularRule(m,"$0")},y.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["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(m){return y.addIrregularRule(m[0],m[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(m){return y.addPluralRule(m[0],m[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(m){return y.addSingularRule(m[0],m[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})})(aa);var mi=aa.exports;const sa=ra(mi),ko=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",Eo="RESTORE",ia="ENABLE",gi=[kn,En,xn,Bn,bt,ia];class _i{constructor(t,n,r=gi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.operations=r,this.operations.forEach(s=>{const a=ko(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(kn)){console.log(`${this.side}/${this.domain} 不支持 ${kn} 操作`);return}return he.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return he.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return he.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(Eo)){console.log(`${this.side}/${this.domain} 不支持 ${Eo} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class yi{constructor(t,n,r){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.listQuerys=r}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),he.get(`${this.side}/${this.resources}`,n)}getOne(t){return he.get(`${this.side}/${this.resources}/${t.id}`)}}const bi={Client:_i,ReadOnlyClient:yi,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:Eo,ENABLE:ia},wi=(o,t,n)=>{const r=o[t];return r?typeof r=="function"?r():Promise.resolve(r):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.":""))))})},ki=["createdAt","updatedAt","deletedAt"];class ee{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.info=t.info?"("+(t==null?void 0:t.info)+")":"",this.label=t.label+this.info,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.placeholder=t.placeholder||"",this.prefix=t.prefix||"",this.suffix=t.suffix||"",this.extendDetail=t.extendDetail||!1,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.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss",this.change=(t==null?void 0:t.change)||null,this.waterMark=(t==null?void 0:t.waterMark)||"",this.elConfig=(t==null?void 0:t.elConfig)||{}}computeWidth(t){return t.width?t.width:ki.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),r=Object.getOwnPropertyNames(this);if(n.every(a=>r.includes(a)))return;const s=n.filter(a=>!r.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 la(o,t,n){console.warn(`${o}.${t} => ${n}`)}const xo={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},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"},"radio-group":{config:"radio-group"},component:{config:"component"},"input-number":{config:"input-number"}};async function ca(o,t,n){const r=await wi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>Dd),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>jd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>Ud),"./field/cascader/config.js":()=>Promise.resolve().then(()=>Wd),"./field/component/config.js":()=>Promise.resolve().then(()=>Qd),"./field/date/config.js":()=>Promise.resolve().then(()=>Zd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>ou),"./field/image/config.js":()=>Promise.resolve().then(()=>uu),"./field/images/config.js":()=>Promise.resolve().then(()=>bu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>Bu),"./field/json/config.js":()=>Promise.resolve().then(()=>Vu),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>Pu),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Ju),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zu),"./field/select/config.js":()=>Promise.resolve().then(()=>of),"./field/string/config.js":()=>Promise.resolve().then(()=>uf),"./field/switch/config.js":()=>Promise.resolve().then(()=>gf),"./field/text/config.js":()=>Promise.resolve().then(()=>kf),"./field/time/config.js":()=>Promise.resolve().then(()=>Cf),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Df)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function Sn(o,t="unknown"){return o==null?void 0:o.map(r=>{if(r instanceof ee)return r;if(r.code==="id"?r.type="row-id":r.component&&(r.type="component"),Object.keys(xo).includes(r.type)){const s=xo[r.type];return s.deprecated&&la(r.domain||t,r.code,s.deprecated),ca(xo[r.type].config,r,r.domain||t)}return ca("string",r,r.domain||t)})}let Bo={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function Ei(o){Bo={...Bo,...o},wt=o.domainConfigs}function xi(o){Object.keys(wt).forEach(t=>{const n=wt[t];Object.keys(n).forEach(r=>{const s=n[r];s.load=o(t,r)})})}function et(){return Bo}function So(){return wt}function Ht(o,t){return wt[o][t].load().then(n=>wt[o][t].load().then(r=>{const s=r.default;return Promise.all(s.fields).then(a=>{var i;if(s.fields=a,((i=s.detailGroupFields)==null?void 0:i.length)>0){const c=s.detailGroupFields.map(d=>{var f;return((f=d.childrenFields)==null?void 0:f.length)>0?Promise.all(d.childrenFields).then(u=>(d.childrenFields=u,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class Bi{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=Sn(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:Sn(a.childrenFields,r.code)})),!r.simple&&(this.name=So()[t][r.code].name,this.filters=r.filters||[],this.coverField=r.coverField,this.nameField=r.nameField||"name",this.showSubmit=r.showSubmit||!0,this.showEdit=this.setupShowEdit(r.showEdit),this.submitConfirm=r.submitConfirm,this.removeConfirm=r.removeConfirm,this.showCreate=this.setupShowCreate(r.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=r.detailSubType?"list":"tabs",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||[],this.displayMode=n.displayMode||{},this.showPagination=n.showPagination??!0,this.extendTableColumnfields=n.extendTableColumnfields||null,this.formStyleConfig=this.getFormStyleConfig(n.formConfig),this.delText=n.delText||"确定要删除该条数据吗?",this.showDetailInfo=n.showDetailInfo,this.detailComponent=n.detailComponent||null)}wrapFields(t,n){return Sn(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:n.id?`#${n.id}`:""}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const r=t.hasOne(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const r=t.hasMany(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const r=t.pageActions(n);return Array.isArray(r)?r:(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 r=t.rowActions(n);return Array.isArray(r)?r:(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}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,r)=>t(n,r):()=>!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 r=>{const s=this.showCreate(r);return{...n,creatable:n.creatable&&s}}}getFormStyleConfig(t){return{...{labelPosition:"top",labelWidth:100},...t||{}}}}function da(o,t){return new Bi(o,t)}const R=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},Si={class:"card-header"},Ci={class:"title"},ua=R({__name:"Widget",props:{title:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(w.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",Si,[e.createElementVNode("span",Ci,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-0f4cee53"]]),$i={key:0},Vi={key:1},Oi={key:0},Di={key:1},fa=R({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(o){const t=o;let n="#f7faff",r="10px";return t.background&&(n=t.background,n=="none"&&(r="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(r)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",$i,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Vi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Oi,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Di,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-3122281d"]]),Ti=R({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(ua,null,{default:e.withCtx(()=>[e.createVNode(fa,{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-a711a147"]]),Ni={},Fi={style:{padding:"20px 0"}};function Ai(o,t){return e.openBlock(),e.createElementBlock("div",Fi,[e.renderSlot(o.$slots,"default")])}const ji=R(Ni,[["render",Ai]]),Ri=R({__name:"DashboardRow",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-a22ec57e"]]);/*! Element Plus Icons Vue v2.3.1 */var Ii=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(o){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"})]))}}),Mi=Ii,Li=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){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"})]))}}),Ui=Li,zi=e.defineComponent({name:"CirclePlus",__name:"circle-plus",setup(o){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:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),e.createElementVNode("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Hi=zi,Pi=e.defineComponent({name:"Close",__name:"close",setup(o){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=Pi,qi=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(o){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=qi,Wi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(o){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"})]))}}),Gi=Wi,Qi=e.defineComponent({name:"Delete",__name:"delete",setup(o){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"})]))}}),ma=Qi,Yi=e.defineComponent({name:"Document",__name:"document",setup(o){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"})]))}}),ga=Yi,Ki=e.defineComponent({name:"Download",__name:"download",setup(o){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"})]))}}),Ji=Ki,Xi=e.defineComponent({name:"EditPen",__name:"edit-pen",setup(o){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:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),Zi=Xi,vi=e.defineComponent({name:"Finished",__name:"finished",setup(o){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:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),el=vi,tl=e.defineComponent({name:"Grid",__name:"grid",setup(o){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"})]))}}),nl=tl,ol=e.defineComponent({name:"Loading",__name:"loading",setup(o){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"})]))}}),_a=ol,rl=e.defineComponent({name:"Minus",__name:"minus",setup(o){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"})]))}}),al=rl,sl=e.defineComponent({name:"Operation",__name:"operation",setup(o){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"})]))}}),il=sl,ll=e.defineComponent({name:"Plus",__name:"plus",setup(o){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"})]))}}),Co=ll,cl=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(o){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"})]))}}),ya=cl,dl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(o){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"})]))}}),ul=dl,fl=e.defineComponent({name:"Refresh",__name:"refresh",setup(o){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:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),pl=fl,hl=e.defineComponent({name:"Search",__name:"search",setup(o){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:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),ml=hl,gl=e.defineComponent({name:"Setting",__name:"setting",setup(o){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"})]))}}),_l=gl,yl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(o){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"})]))}}),bl=yl,wl=e.defineComponent({name:"View",__name:"view",setup(o){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"})]))}}),kl=wl;function Y(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=ko(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function El(o){const t=o.length,n=Math.floor(24/t);return{type:"row",cols:o.map(s=>({type:"col",span:n,field:s}))}}function $o(o){return o.map(t=>El(t))}const xl={key:0,class:"classify-wrap"},Bl=R({__name:"FormLayout",props:{layout:Object,fields:Array},setup(o){const t=o,n=e.computed(()=>{var a;if(t.layout.length==0){if(((a=t.fields)==null?void 0:a.filter(d=>{var f;return!((f=d.code)!=null&&f.includes("classify"))}).length)<=6){const d=s(t.fields,1);return $o(d)}console.log(t.fields);const c=s(t.fields,2);return $o(c)}return t.layout});function r(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){var f;const c=a.map(u=>u.code),d=[];if(i==2)for(let u=0;u<c.length;u+=i)c[u].includes("classify")?(d.push([c[u]]),c.splice(c[u].includes("classify")?u:u+1,1),u-=i):(f=c[u+1])!=null&&f.includes("classify")?(d.push([c[u]]),d.push([c[u+1]])):d.push(c.slice(u,u+i));else for(let u=0;u<c.length;u+=i)d.push(c.slice(u,u+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(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>{var f,u,p;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(f=r(d.field))!=null&&f.wholeRow?24:((u=c.cols)==null?void 0:u.length)==1&&!((p=d.field)!=null&&p.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var g,B;return[(g=d.field)!=null&&g.includes("classify")&&((B=r(d.field))!=null&&B.label)?(e.openBlock(),e.createElementBlock("div",xl,e.toDisplayString(r(d.field).label),1)):e.renderSlot(a.$slots,"default",{key:1,field:r(d.field)},void 0,!0)]}),_:2},1032,["span"])}),256))]),_:2},1024))),256))]))}},[["__scopeId","data-v-285a71e5"]]),Sl={style:{width:"100%"}},Cl={class:"footer"},$l={key:1},Vl=R({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.ref(!1),i=o,c=$o(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},f=e.reactive({...i.data}),u=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,V)=>(E[V.code]=y(V.rules),E),{}),g=e.computed(S),B=e.computed(()=>i.config.fields.filter(E=>{const V=E.editable(f,r),O=E.visible(f,r);return E.disabled=O&&!V,V||O}));function y(E){return typeof E=="object"?E:typeof E=="function"?E(f):[]}function m(E){a.value=!0,s("submit",E,f,()=>{a.value=!1})}async function x(){await u.value.validate(async(E,V)=>{var G,K;if(!E)return console.log("error submit!",V),!1;const O=(G=i.config.fields.find(re=>["images","attachments","attachment"].includes(re.type)))==null?void 0:G.code,I={...f};if(O&&(I[O]=(K=I[O])==null?void 0:K.map(re=>re.id)),i.config.submitConfirm){await i.config.submitConfirm(I)&&m(I);return}m(I)})}function k(){s("remove",f)}function _(){if(i.config.removeConfirm){i.config.removeConfirm(f,k);return}w.ElMessageBox.confirm(i.config.delText,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{k()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(r,f):!0}return e.watch(()=>({...f}),(E,V)=>{const I=Object.keys(E).filter(K=>V[K]!==E[K]).map(K=>{var re;return(re=u.value)==null||re.clearValidate(K),{field:K,newValue:E[K],oldValue:V[K]}});B.value.filter(K=>!K.disabled).forEach(K=>{K.formChange&&K.formChange(f,I)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(V=>{f[V]=E[V]})},{immediate:!0}),(E,V)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:u,model:f,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Bl,{layout:e.unref(c),fields:B.value},{default:e.withCtx(({field:O})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:O.code,label:O.label,prop:O.code},{default:e.withCtx(()=>[e.createElementVNode("div",Sl,[O!=null&&O.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.editor),{key:0,modelValue:f[O.code],"onUpdate:modelValue":I=>f[O.code]=I,field:O,disabled:O.disabled,"form-data":f,"domain-config":i.config,row:f},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${O.code}(${O.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Cl,[f.id&&!f.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",icon:e.unref(ma),plain:"",type:"danger",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1},8,["icon"])):(e.openBlock(),e.createElementBlock("div",$l)),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",icon:e.unref(el),type:"primary",loading:a.value,onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["icon","loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"]))}},[["__scopeId","data-v-52a4310f"]]);function Ol(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const Pt={getValue:Ol},Dl={style:{"font-weight":"700","font-size":"22px",color:"#333"}},Cn={__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(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:f.value})),d=e.computed(()=>a.config.fields.filter(m=>{var x;if(!((x=m.code)!=null&&x.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),f=e.ref(""),u=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`新增${a.config.name}`);function g(y,m,x){i.value=m,s("submit",y,async()=>{f.value=await Pt.getValue(),x()})}function B(y,m){s("remove",y,async()=>{f.value=await Pt.getValue(),m()})}return e.watch(()=>u,async()=>{f.value=await Pt.getValue()},{immediate:!0}),(y,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=x=>u.value=x),width:d.value,top:"20px",title:null,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3,style:{"border-radius":"12px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Dl,e.toDisplayString(p.value),1)]),default:e.withCtx(()=>[e.createVNode(Vl,{config:a.config,data:c.value,removable:a.removable,onSubmit:g,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width"]))}},Tl={__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},formStyleConfig:{type:Object}},setup(o){const t=o,n=e.ref(t.row),r=e.ref(!1),s=e.shallowRef(null),a=U.useRoute(),i=Y(a),c=e.computed(()=>{const p=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},...p}}),d=da("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:c.value});Promise.all(d.fields).then(p=>{d.fields=p,d.restRepeat=t.restRepeat,d.rest=t.rest,d.formStyleConfig=c.value,s.value=d});async function f(){const p=t.rest;if(p!=null&&p.getOne){const{data:g}=await p.getOne({...t.row,...i});n.value=g}r.value=!0}function u(p,g){t.onSubmit(p,g).then(()=>{r.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),g()})}return(p,g)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),r.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=B=>r.value=B),title:t.text,config:s.value,data:n.value,onSubmit:u},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Nl={class:"not-found"},fe=R({__name:"EmptyTip",props:{text:{type:String,default:"--"}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("span",Nl,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-765bd99b"]]),ba={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ff)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(u){let p=-1;u.id&&(p=i.value.findIndex(g=>g.id===u.id)),u.url&&(p=i.value.findIndex(g=>g.url===u.url)),p>=0&&(i.value.splice(p,1),s("update:modelValue",i.value))}function f(u){console.log(u),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,u).then(p=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const g=c(p.data);i.value=i.value?[...i.value,g]:[g],s("update:modelValue",i.value)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(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"])]))}},Fe=De.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(o){o&&(this.mode=o)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),kt=(o,t,n,r)=>De.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Fl(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Vo(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Vo(o,t,this.filters)}}});function Fl(o,t,n,r,s){let i={...Al(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Vo(o,t,i)}function Al(o,t,n){const r=`filters---${t}---${o}`;let s={};return localStorage.getItem(r)&&(s=JSON.parse(localStorage.getItem(r))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Vo(o,t,n){const r=`filters---${t}---${o}`,s=jl(n);return localStorage.setItem(r,JSON.stringify(s)),s}function jl(o){return Object.keys(o).filter(t=>o[t]!==null&&o[t]!==void 0&&o[t]!=="").reduce((t,n)=>(t[n]=o[n],t),{})}const Rl={class:"sorters-box"},Il=["onClick"],Ml={class:"sorters-label"},Ll={class:"sorters-arrow-box"},Ul=["onClick"],zl=["onClick"],Hl=R({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(o,{emit:t}){const n=t,r=o,s=e.ref([]);async function a(){typeof r.sorters.sortersList=="function"?s.value=await r.sorters.sortersList():s.value=r.sorters.sortersList}a(),e.watch(()=>r.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(r.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let u=0;u<r.value.length;u++){const p=r.value[u];f.field===p.field&&(f.order=p.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const u=s.value;f?u[d].order=f:u[d].order?u[d].order==="ASC"?u[d].order="DESC":u[d].order==="DESC"&&(u[d].order=""):u[d].order="ASC",n("updateSorters",u.filter(p=>p.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:g=>c(p,"")},[e.createElementVNode("div",Ml,e.toDisplayString(u.name),1),e.createElementVNode("div",Ll,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",u.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(g=>c(p,"ASC"),["stop"])},null,10,Ul),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",u.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(g=>c(p,"DESC"),["stop"])},null,10,zl)])],8,Il))),256))]))}},[["__scopeId","data-v-9eb39193"]]),Pl={class:"ranges-box"},ql={class:"range-item"},Wl={class:"range-label"},Gl={class:"range-input-box"},Ql=R({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive(r.ranges.rangesList);e.watch(()=>r.value,()=>{a()});function a(){r.value&&r.value.length>0?s.forEach(c=>{r.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 u=[...s];u.forEach(p=>{p.field===d&&(p[f]=c)}),n("updateRanges",u.filter(p=>p.min||p.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",ql,[e.createElementVNode("div",Wl,e.toDisplayString(f.name),1),e.createElementVNode("div",Gl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":u=>f.min=u,"controls-position":"right",class:"input-box",onChange:u=>{i(u,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":u=>f.max=u,"controls-position":"right",class:"input-box",type:"number",onChange:u=>{i(u,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-852a7796"]]),Yl={key:0},Kl=R({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=U.useRoute(),s=Y(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=kt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((_,S)=>{S.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(E=>{i[E]=void 0}),i.isDeleted=S.filters.isDeleted)});function f(_){return typeof _=="boolean"?_:typeof _=="function"?_(s):!0}async function u(_,S){var E;if(typeof _.options=="function")c[_.code]=await _.options(i,s,S);else if(Array.isArray(_.options))c[_.code]=_.options;else if(typeof _.options=="object"){const V=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(!S&&Array.isArray(i[_.code])&&i[_.code].length>0)c[_.code]=[],i[_.code].forEach(O=>{V.getOne({id:O}).then(I=>{c[_.code].push({code:I.data[_.options.data.value]||I.data.id,name:I.data[_.options.data.label]||I.data.name})})});else if(!S&&!Array.isArray(i[_.code])&&i[_.code])V.getOne({id:i[_.code]}).then(O=>{c[_.code]=[{code:O.data[_.options.data.value]||O.data.id,name:O.data[_.options.data.label]||O.data.name}]});else{const O=_.options.query.keyWord.toString(),I=_.options.method?_.options.method:"getList";_.options.url[I]({..._.options.query,[O]:S}).then(G=>{c[_.code]=G.data.rows.map(K=>({code:K[_.options.data.value]||K.id,name:K[_.options.data.label]||K.name}))})}}if(c[_.code]&&_.type!="tree-select"){const V=c[_.code].map(O=>O.code);i[_.code]&&(_.multiple?i[_.code]=i[_.code].filter(O=>(console.log(V.includes(O)),V.includes(O))):i[_.code]=(E=c[_.code].find(O=>O.code==i[_.code]))==null?void 0:E.code,x())}}function p(_){if(_.remote)return S=>{u(_,S)}}function g(_){i.sorters=_,x()}function B(_){i.filters=_}function y(){Object.keys(i).forEach(_=>{i[_]=void 0}),a.value=Object.keys(t.settings.filters).filter(_=>f(t.settings.filters[_].visible)).map(_=>{const S={...t.settings.filters[_],code:_};return i[_]=m(_),(S.type==="select"||S.type==="selectV2"||S.type==="tree"||S.type==="tree-select")&&u(S),{...S,dateType:S.dateType||"datetimerange",format:S.format||"YYYY-MM-DD HH:mm:ss"}}).filter(_=>_.code!=="isDeleted")}function m(_){const S=t.settings.filters[_],E=d.validFilters[_];return S.type==="boolean"&&typeof E!="boolean"?S.value:E}function x(){let _=JSON.parse(JSON.stringify(i));const S=t.settings.filterHook;S!=null&&S.preSubmit&&(_=S.preSubmit(_,s)),_!==!1&&d.change(_)}function k(){d.$reset({}),y(),x()}return e.watch(()=>t.settings,()=>{y(),x()},{immediate:!0}),e.watch(()=>({...i}),(_,S)=>{const V=Object.keys(_).filter(O=>S[O]!==_[O]).map(O=>({field:O,newValue:_[O],oldValue:S[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,V)})}),(_,S)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(e.unref(w.ElForm),{model:i,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[E.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",placeholder:`是否${E.name}`,"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${E.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${E.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:E.name,multiple:E.multiple,"collapse-tags":"",class:e.normalizeClass(E.multiple?"tags-selects-input":""),"multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c[E.code],V=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:V.code,label:V.name,value:V.code,title:V.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):E.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",options:c[E.code]?c[E.code]:[],props:{label:"name",value:"code"},multiple:E.multiple,placeholder:E.name,clearable:"","value-on-clear":null,onChange:x},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(Hl,{key:3,value:i[E.code],sorters:E,onUpdateSorters:g},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(Ql,{key:4,value:i[E.code],ranges:E,onUpdateRanges:B},null,8,["value","ranges"])):E.type==="tree-select"?(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{key:5,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,placeholder:E.name,data:c[E.code],props:n,"node-key":"id",multiple:E.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"","check-strictly":E.checkStrictly,remote:"","show-checkbox":"",filterable:"","collapse-tags":"","multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),onCheck:x,onChange:x},null,8,["modelValue","onUpdate:modelValue","placeholder","data","multiple","check-strictly","multiple-limit","remote-method"])):E.type==="date"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:7,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:8,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:E.dateType,format:E.format,"value-format":E.format,"start-placeholder":E.name,"end-placeholder":E.name,placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:9,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,modelModifiers:{trim:!0},placeholder:E.name,type:E.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),a.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{icon:e.unref(ml),type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1},8,["icon"]),e.createVNode(e.unref(w.ElButton),{icon:e.unref(pl),onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1},8,["icon"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-5c926745"]]),Jl={class:"data-page-title"},Xl={class:"title"},Zl={class:"data-page-toolbar"},vl={key:0,class:"show-detail-info"},ec=R({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=e.ref([]),r=t.tableName?t.tableName:t.settings.name,s=U.useRoute(),a=Y(s),i=Fe(),c=kt(t.settings.code,s.path,t.settings.filters,t.settings.filterHook)(),d=e.useSlots(),f=e.computed(()=>c.validFilters.isDeleted||!1),u=e.computed(()=>t.settings.displayMode.normalMode);function p(){c.$reset({isDeleted:!f.value})}async function g(){var x,k;const y=`table-view-${s.path}-${t.settings.code}`,m=localStorage.getItem(y)?localStorage.getItem(y):u.value;if(i.change(m),(x=t.settings)!=null&&x.showDetailInfo){const _=(k=t.settings)==null?void 0:k.showDetailInfo;n.value=await _(a)}}function B(y){i.change(y);const m=`table-view-${s.path}-${t.settings.code}`;localStorage.setItem(m,i.mode)}return e.onMounted(g),(y,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Xl,e.toDisplayString(f.value?`已删除的${e.unref(r)}`:e.unref(r)),1),e.createElementVNode("div",Zl,[e.unref(d).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:B},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(w.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Mi))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(w.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"deleted",onClick:p},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(f.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),n.value.length?(e.openBlock(),e.createElementBlock("div",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElTag),{key:x.auditStatus,type:x.type,effect:"dark",class:"show-detail-info-item"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name)+": "+e.toDisplayString(x.num),1)]),_:2},1032,["type"]))),128))])):e.createCommentVNode("",!0),e.createVNode(Kl,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-a67d4553"]]),tc={class:"kst-field-row-id"},nc={key:0},oc={key:1,class:"mono-data"},rc={key:1},wa=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=e.useSlots(),n=U.useRoute(),r=o,s=n.meta.side,a=e.computed(()=>r.row[r.field.code]),i=e.computed(()=>({path:`/${s}/${r.field.domain}/${a.value}`,query:{...Y(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,Y(n))}return(d,f)=>{const u=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",tc,[a.value?(e.openBlock(),e.createElementBlock("span",nc,[c()?(e.openBlock(),e.createBlock(u,{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",oc,[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",rc," NO ID "))])}}},[["__scopeId","data-v-f68a9cd4"]]);function ac(o){w.ElMessage(o)}const sc={show:ac},ka=10,$n=De.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ka&&(this.history=this.history.slice(2-ka),this.history.unshift(this.root)),this.history.push({title:o,code:t,path:n}))},setupRootPath(o,t){this.root={title:o,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(o){this.history=this.history.filter(t=>t.code!=o)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(o,t){const n=this.history.find(r=>r.code==o);n&&(n.title=t)}}}),Oo={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(o){var y;const t=$n(),n=Fe(),r=U.useRoute(),s=U.useRouter(),a=Y(r),i=o,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var m,x;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((x=i.operations)!=null&&x.removable)}),u=e.ref((y=i.operations)==null?void 0:y.removable);async function p(){const m=i.settings.formHook,x=i.settings.btnVisible,k=i.settings.rest,{data:_}=await k.getOne({...i.row,...a});c.value=_,m.setupUpdate&&(c.value=await m.setupUpdate(c.value,a)),x.showRemove&&(u.value=x.showRemove(c.value)),d.value=!0}function g(m,x){const k=i.settings.formHook,_=i.settings.rest;Object.keys(a).forEach(S=>{m[S]=a[S]}),k!=null&&k.preUpdateSubmit&&(m=k.preUpdateSubmit(m)),_.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{x()})}function B(m,x){i.settings.rest.remove(m).then(()=>{sc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(_=>{r.fullPath.includes(_.path)&&(t.remove(_.code),s.back())}),n.fireRemoved()}).catch(()=>{x()})}return(m,x)=>f.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Zi),type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=k=>d.value=k),config:i.settings,data:c.value,removable:u.value,onSubmit:g,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},ic=o=>(e.pushScopeId("data-v-af19c26f"),o=o(),e.popScopeId(),o),lc={class:"data-grid-wrapper"},cc={key:0,class:"cover"},dc=ic(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),uc={class:"header"},fc={key:0},pc={class:"key"},hc={class:"value"},mc={key:1,class:"footer tools"},gc=R({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=U.useRoute(),n=Y(t),r=e.useSlots(),s=o,a=kt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=De.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),f=e.shallowRef(null),u=e.ref(!1);async function p(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{p().then(k=>{u.value=k})});const g=e.computed(()=>{var k,_;return!!((k=s.operations)!=null&&k.updatable&&u||(_=s.operations)!=null&&_.removable&&u)}),B=e.computed(()=>s.settings.displayMode.gridWidth),y=e.computed(()=>s.settings.displayMode.heightAuto);function m(){f.value=s.settings.fields.find(k=>k.code==="id"),d.value=s.settings.fields.filter(k=>k.code===s.settings.coverField||k.code===s.settings.nameField||k.code==="id"?!1:k.showInList(n,c.value))}function x(k){return s.settings.nameField?k[s.settings.nameField]:k.name?k.name:`${k.id}`}return e.watch(i,k=>{c.value=k,m()}),m(),(k,_)=>(e.openBlock(),e.createElementBlock("div",lc,[o.data.length===0?(e.openBlock(),e.createBlock(e.unref(w.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(w.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},span:B.value?B.value:24,xs:B.value?{}:24,sm:B.value?{}:12,md:B.value?{}:8,lg:B.value?{}:6,xl:B.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(r).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",cc,[e.unref(r).cover?e.renderSlot(k.$slots,"cover",{key:0,row:S},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:S[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[dc]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",uc,[e.createVNode(wa,{field:f.value,row:S},e.createSlots({_:2},[S[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(S)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(y.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",fc,[e.renderSlot(k.$slots,"body",{row:S},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,E=>(e.openBlock(),e.createElementBlock("div",{key:E.code,class:"field mono-data"},[e.createElementVNode("div",pc,e.toDisplayString(E.label)+" ",1),e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:S,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||g.value?(e.openBlock(),e.createElementBlock("div",mc,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"actions",{row:S},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:S,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-af19c26f"]]);function _c(o,t){const n=o.fields.map(s=>s.code),r=Object.keys(t);n.forEach(s=>{r.includes(s)||console.error(`${o.code}.${s} : 与服务端数据不匹配`)})}const yc=o=>(e.pushScopeId("data-v-6330eead"),o=o(),e.popScopeId(),o),bc={class:"empty-box"},wc=yc(()=>e.createElementVNode("div",{class:"empty-text"},"暂无数据",-1)),Ea=R({__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(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.useSlots(),i=o,c={background:"#F3F6F9",color:"#303133"},d=kt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:f}=De.storeToRefs(d),u=e.ref(f.value),p=e.shallowRef([]),g=e.ref(!1);async function B(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{B().then(S=>{g.value=S})});const y=e.computed(()=>{var S,E;return!!((S=i.operations)!=null&&S.updatable&&g.value||(E=i.operations)!=null&&E.removable&&g.value)});function m(S){s("sort-column",S)}function x(S){s("enable-item",S)}function k(){var E,V;const S=[...i.settings.fields];if((E=i.settings)!=null&&E.extendTableColumnfields){const O=i.settings.extendTableColumnfields((V=i.data)==null?void 0:V[0]);S.push(...O)}p.value=S.filter(O=>O.showInList(r,u.value))}function _(S){s("select-change",{routeQuery:r,data:S})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(_c(i.settings,i.data[0]),k())}),e.watch(f,S=>{u.value=S,k()}),(S,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","header-cell-style":c,"row-key":"id",onSelectionChange:_,onSortChange:m},{empty:e.withCtx(()=>[e.createElementVNode("div",bc,[e.createVNode(e.unref(w.ElEmpty),{class:"empty-img",description:" ",image:"https://bloodcare-1251596343.cos.ap-shanghai.myqcloud.com/assets/empty/empty-web.png","image-size":"400"}),wc])]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,V=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:V.code,label:V.label,width:V.width,prop:V.code,sortable:V.sortable?"custom":!1,fixed:V.fixed},e.createSlots({_:2},[V.type==="switch"?{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{field:V,row:O,mode:"list",onEnable:x},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{key:O.updatedAt,field:V,row:O,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(w.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"actions",{row:V},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:V,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-6330eead"]]),kc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Fe();t.$reset();const{mode:n}=De.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(Ea);function i(c){c=="grid"?a.value=gc:a.value=Ea}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(r),(f,u)=>({name:u,fn:e.withCtx(p=>[e.renderSlot(c.$slots,u,e.normalizeProps(e.guardReactiveProps(p||{})))])}))]),1040))}},Ec={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){const t=Fe(),n=U.useRoute(),r=Y(n),s=o,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var p;return await((p=s.operations)==null?void 0:p.creatable)}e.watchEffect(()=>{d().then(p=>{c.value=p})});async function f(){const p=s.settings.formHook,g=s.settings.fields.reduce((B,y)=>(B[y.code]=y.default,B),{});a.value=g,p.setupCreate&&(a.value=await p.setupCreate(a.value,r)),i.value=!0}function u(p,g){const B=s.settings.formHook,y=s.settings.rest;Object.keys(r).forEach(m=>{p[m]=r[m]}),B!=null&&B.preCreateSubmit&&(p=B.preCreateSubmit(p)),y.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{g()})}return(p,g)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Hi),type:"success",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 新增 "),i.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=B=>i.value=B),config:s.settings,data:a.value,removable:!1,onSubmit:u},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},xa={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=U.useRouter(),n=Fe(),r=o,s=e.shallowRef([]);let a="";async function i(d,f){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,f);return}const u=await Pt.getValue();try{await d.action({...f,...r.query,idempotentToken:u}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.isVisible(r.row,r.query,r.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{key:0,row:o.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:u.type?u.type:"primary",onClick:p=>i(u,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},xc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Fe(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var u,p;return((p=(u=n.tableDataSelect)==null?void 0:u.data)==null?void 0:p.length)>0});e.ref(!1),e.watch(()=>n.filterForm,u=>{s.value=u});const c=e.ref(!1);async function d(u){c.value=!0;const p=await Pt.getValue();try{await u.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:p}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function f(u){return typeof f=="boolean"?u:typeof u=="function"?u(s.value,r):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(u,p)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f(g.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.component),{key:0,item:g,settings:o.settings,query:e.unref(r),"table-data-select":o.tableDataSelect,"filter-form":o.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):g.tooltip&&g.tooltip.content?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:1,effect:g.tooltip.effect||"dark",content:g.tooltip.content||"default tip",placement:g.tooltip.placement||"top-start"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"])]),_:2},1032,["effect","content","placement"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},Bc={class:"pagination-wrapper"},Sc=R({__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(o,{emit:t}){const n=t,r=U.useRouter(),s=U.useRoute(),a=o,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,g=>{d.value=g}),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 u(g){i.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function p(g){c.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(g,B)=>(e.openBlock(),e.createElementBlock("div",Bc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":f.value,total:d.value,"current-page":o.page,layout:"->,total,sizes, prev, pager, next, jumper",onCurrentChange:u,onSizeChange:p},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-5542d11e"]]);var Ba;const Sa=typeof window<"u";Sa&&((Ba=window==null?void 0:window.navigator)!=null&&Ba.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Cc(o){return typeof o=="function"?o():e.unref(o)}function $c(o){return o}function Vc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function Oc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function Dc(o){var t;const n=Cc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const Tc=Sa?window:void 0;function Nc(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),Oc(r,t),n}const Ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Ca[$a]=Ca[$a]||{};var Va=Object.getOwnPropertySymbols,Fc=Object.prototype.hasOwnProperty,Ac=Object.prototype.propertyIsEnumerable,jc=(o,t)=>{var n={};for(var r in o)Fc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Va)for(var r of Va(o))t.indexOf(r)<0&&Ac.call(o,r)&&(n[r]=o[r]);return n};function Oa(o,t,n={}){const r=n,{window:s=Tc}=r,a=jc(r,["window"]);let i;const c=Nc(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Dc(o),p=>{d(),c.value&&s&&p&&(i=new ResizeObserver(t),i.observe(p,a))},{immediate:!0,flush:"post"}),u=()=>{d(),f()};return Vc(u),{isSupported:c,stop:u}}var Da;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Da||(Da={}));var Rc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ic=Object.prototype.hasOwnProperty,Mc=Object.prototype.propertyIsEnumerable,Na=(o,t,n)=>t in o?Rc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Lc=(o,t)=>{for(var n in t||(t={}))Ic.call(t,n)&&Na(o,n,t[n]);if(Ta)for(var n of Ta(t))Mc.call(t,n)&&Na(o,n,t[n]);return o};Lc({linear:$c},{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 Do=R({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,Bt;e.useCssVars(z=>({f471d0ac:Pe.value}));const t=U.useRoute(),n=Y(t),r=o,s=kt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=De.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,z=>{_.value=z,G()});const c=Fe(),{created:d,updated:f,removed:u}=De.storeToRefs(c);e.watch([d,f,u],([z,Z,M])=>{(z||Z||M)&&G()});const p=e.ref(!0),g=e.ref([]),B=e.ref(0),y=e.ref({}),m=e.ref({}),x=e.ref(null),k=e.ref(null),_=e.ref({}),S=e.ref(parseInt(t.query.pageSize)||30),E=e.ref(parseInt(t.query.page)||1),V=(Bt=r.hasMany)==null?void 0:Bt.tableContentHeight;function O(z){let Z=null;if(z.order==="ascending"?Z="ASC":z.order==="descending"&&(Z="DESC"),_.value.sorters){let M=[];_.value.sorters.some(we=>we.field===z.prop)?_.value.sorters.forEach(we=>{we.field===z.prop&&(we.order=Z,we.name||M.push(we)),we.name&&M.push(we)}):M=[..._.value.sorters,{field:z.prop,order:Z}],_.value.sorters=M}else _.value.sorters=[{field:z.prop,order:Z}];G()}function I(){m.value=r.settings.operations(n)}function G(z){p.value=!0,z=="again"&&(E.value=E.value-1<1?1:E.value-1);const Z={..._.value,...n,...r.query,page:E.value,size:S.value};r.settings.rest.getList(Z).then(M=>{y.value.data=[],g.value=M.data.rows,B.value=M.data.count,p.value=!1,B.value&&g.value.length==0&&G("again")})}function K(z){E.value=z.page,S.value=z.size,G()}function re(z){const Z={id:z.id,enable:!z.enable};r.settings.rest.enable(Z).then(()=>{G()})}function D(z){if(z.enable){const Z=z.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${Z}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{re(z)}).catch(()=>{})}else re(z)}function L(z){y.value=z}const X=e.ref(0),Se=e.ref(0);Oa(x,z=>{var Z;X.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0}),Oa(k,z=>{var Z;Se.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0});const Pe=e.computed(()=>V&&B.value>0?`${V-14}px`:`calc(100% - ${X.value+Se.value+14}px)`);return I(),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"},class:"aa"},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x,class:"header-wrap"},[e.createVNode(ec,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(xc,{settings:r.settings,"table-data-select":y.value,query:e.unref(n),"filter-form":_.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(Ec,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(kc,{class:"data-table-box",data:g.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:D,onSelectChange:L},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:M})=>[e.createVNode(xa,{mode:"list",row:M,settings:r.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(w.vLoading),p.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:k},[e.createVNode(Sc,{page:E.value,size:S.value,total:B.value,onPageChange:K},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a69d8019"]]);/*! Element Plus v2.11.2 */var Uc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",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:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},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 zc={__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(o){const t=o,n=e.computed(()=>t.content?t.content.toString():"");return(r,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.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(w.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"]))]))}},Hc={class:"header-box"},Pc={class:"header-box-left"},qc={class:"page-title"},Wc={class:"tabs-container"},Gc={class:"user-profile"},Qc=R({__name:"HeaderMenu",props:{config:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=$n(),s=e.ref("首页"),a=o,i=n.fullPath.split("/")[1],c=B();r.setupRootPath("首页",`/${i}/home`);function d(y){var S,E;const m=y.meta.side,x=y.params.domain;let k=(S=y.meta)==null?void 0:S.title,_=(E=y.meta)==null?void 0:E.code;if(m&&x){k=So()[m][y.params.domain].name,_=y.params.domain;const V=y.params.id;V&&V!="detail"&&(k=`${k} - ${y.params.id}`,_=`${y.params.domain}-${y.params.id}`)}else{const V=c.find(O=>O.route===y.path);V&&(k=V.title,_=V.route)}k&&_&&(r.push(k,_,y.fullPath),s.value=_)}function f(y){const m=r.history.find(x=>x.code==y.props.name);t.push(m.path)}function u(y){if(r.remove(y),y==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const p=(y,m)=>{const x=r.history.length;return y===0&&m==="self"||y<2&&m==="left"||y===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function g(y,m){const x=[],k=r.history;switch(m){case"self":x.push(k[y].code);break;case"left":for(let _=0;_<y;_++)_!==0&&x.push(k[_].code);break;case"right":for(let _=y+1;_<k.length;_++)x.push(k[_].code);break;case"all":for(let _=0;_<k.length;_++)_!==0&&x.push(k[_].code);break;case"other":for(let _=1;_<k.length;_++)_!==y&&x.push(k[_].code);break}for(let _=0;_<x.length;_++)u(x[_])}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,m)=>(e.openBlock(),e.createElementBlock("div",Hc,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",qc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Wc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:f,onTabRemove:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(x,k)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[p(k,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:_=>g(k,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:_=>g(k,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:_=>g(k,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Gi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:_=>g(k,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(al))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:_=>g(k,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(zc,{content:x.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:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Gc,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-325547cd"]]),Yc=o=>(e.pushScopeId("data-v-0d17ba7a"),o=o(),e.popScopeId(),o),Kc={key:2,class:"dot-wrapper"},Jc=[Yc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Fa=R({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(o){const t=o;return(n,r)=>o.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:o.data.title},{title:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data.children,s=>(e.openBlock(),e.createBlock(Fa,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:o.data.route,route:o.data.route,class:"menu-item"},{default:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Kc,Jc)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-0d17ba7a"]]),Xc=R({__name:"SideBar",props:{sideMenus:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=e.ref(n.fullPath),s=o,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;n.params.id=="detail"?r.value=`/${d}/${n.params.domain}/detail`:r.value=`/${d}/${n.params.domain}/list`}else r.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),{"wrap-class":"scrollbar-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":r.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(Fa,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-c309dc86"]]),Zc=R({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(o){const t=U.useRoute(),n=o,r={...et(),...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(w.ElConfigProvider),{locale:e.unref(Uc)},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Qc,{config:r},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(w.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>{var d;return[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Xc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:e.normalizeClass(["page-content-main",(d=e.unref(t).fullPath)!=null&&d.includes("/list")?"list-main":""])},{default:e.withCtx(()=>[e.unref(t).params.domain?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(({Component:f,route:u})=>[e.createVNode(e.Transition,{name:"KxtFade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{key:s.value}))]),_:2},1024)]),_:1})):(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1},8,["class"])]}),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-7ead3030"]]),vc={key:1,class:"loading-wrapper"},Aa=R({__name:"List",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return Ht(r,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(Do,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",vc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-34bb8e6d"]]),ed={key:0},td={class:"key"},nd={class:"value"},od={style:{color:"#111","font-size":"14px","font-weight":"500"}},rd={key:1,class:"loading-wrapper"},ja=R({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute(),a=Y(s),i=Fe(),{updated:c}=De.storeToRefs(i),d=e.ref(null),f=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.ref([]),p=e.computed(()=>[...r.settings.fields.filter(S=>S.showInDetail(d.value,{...a,...r.query})),...u.value]),g=e.computed(()=>p.value.find(k=>k.code===r.settings.coverField)),B=e.computed(()=>p.value.filter(k=>!f.includes(k.type)&&!k.extendDetail)),y=e.computed(()=>{var _;const k=(_=g.value)==null?void 0:_.code;return p.value.filter(S=>f.includes(S.type)||S.extendDetail).filter(S=>S.code!==k)}),m=e.computed({get(){return y.value.map(k=>k.code)},set(k){}});async function x(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,k.data.custumFileds?Promise.all(Sn(k.data.custumFileds,"form-management-result")).then(_=>{u.value=_}):u.value=[],d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{x()},{immediate:!0}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value.display),{field:g.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:g.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:S.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>{var E;return[e.createElementVNode("div",td,e.toDisplayString(S.label),1),e.createElementVNode("div",nd,[S.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):S.display?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{key:2,field:S,row:d.value,mode:"description"},null,8,["field","row"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((E=d.value[S.code])==null?void 0:E.toString()),1)],64))])]}),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),y.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:m.value,"onUpdate:modelValue":_[0]||(_[0]=S=>m.value=S),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:null,name:S.code,class:"mono-data"},{title:e.withCtx(()=>[e.createElementVNode("span",od,e.toDisplayString(S.label),1)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",rd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-38f9a185"]]),ad={key:0},sd={class:"group-item-head"},id={class:"key"},ld={class:"value"},cd={key:1,class:"loading-wrapper"},dd=R({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute();Y(s);const a=Fe(),{updated:i}=De.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],f=e.computed(()=>{var p,g;return((g=(p=r.settings)==null?void 0:p.detailGroupFields)==null?void 0:g.map(B=>{var m,x,k,_;const y=((x=(m=B==null?void 0:B.childrenFields)==null?void 0:m.filter(S=>d.includes(S.type)||S.extendDetail))==null?void 0:x.filter(S=>S.code!==(B==null?void 0:B.coverField)))||[];return{...B,coverField:(k=B==null?void 0:B.childrenFields)==null?void 0:k.find(S=>S.code===B.coverField),detailFields:(_=B==null?void 0:B.childrenFields)==null?void 0:_.filter(S=>!d.includes(S.type)&&!S.extendDetail),extendFields:y,activeFields:(y==null?void 0:y.map(S=>S.code))||[]}}))||[]});function u(){r.settings.rest.getOne(r.query).then(p=>{p.data.isDeleted=!!p.data.deletedAt,c.value=p.data,n("done",p.data)})}return e.watch(i,()=>{u()},{immediate:!0}),(p,g)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${B.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[B.coverField?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.coverField.display),{field:B.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:B.coverField?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.detailFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:y.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",id,e.toDisplayString(y.label),1),e.createElementVNode("div",ld,[y.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(y.display),{key:1,field:y,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),B&&B.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:B.activeFields,"onUpdate:modelValue":y=>B.activeFields=y,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.extendFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:y.label,name:y.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{field:y,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[B.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",sd,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",cd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-efd9932c"]]),ud={class:"data-page-title"},fd={class:"title"},pd=R({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(o,{emit:t}){$n();const n=U.useRoute(),r=Y(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const f=s.settings;if(f.displayMode.normalMode=="detail")a.value=`${f.name}`;else{const p=`${f.formatName(d)}`;a.value=p?`${f.name}:${p}`:`${f.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,f)=>(e.openBlock(),e.createElementBlock("div",ud,[e.createElementVNode("div",fd,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(xa,{row:s.data,settings:s.settings,query:e.unref(r),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(r),"detail")?(e.openBlock(),e.createBlock(Oo,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-789f7fa7"]]),hd=R({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=Y(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(f){a.value=f.props.name,t.push({name:`${n.meta.side}-association`,params:{association:f.props.name},query:r})}function d(f){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const u=s.associations.find(p=>p.domain===n.params.association);i.value={...u,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},f&&f()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:r})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(f,u)=>{const p=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElTabs),{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=g=>a.value=g),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,g=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:g.name,name:g.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(p,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bb704011"]]),md={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(o){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.associations,r=>(e.openBlock(),e.createElementBlock("div",null,[r.type=="has-many"?(e.openBlock(),e.createBlock(Aa,{key:0,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0),r.type=="has-one"?(e.openBlock(),e.createBlock(Ra,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},gd=R({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){U.useRouter();const t=U.useRoute(),n=Y(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,f;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(pd,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(f=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&f.length?(e.openBlock(),e.createBlock(dd,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(ja,{key:1,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])),r.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(hd,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(md,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-f928d31a"]]),_d={key:0,class:"detail"},yd={key:2,class:"loading-wrapper"},Ra=R({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=Y(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);Ht(s,a).then(f=>{const u=f,p=d("has-many",u.hasMany(r)),g=d("has-one",u.hasOne(r));i.value=u,c.value=g.concat(p)});function d(f,u){return(u||[]).map(p=>typeof p=="object"?{type:f,domain:p.code,name:p.name,tableName:p.tableName,tableContentHeight:p.tableContentHeight,query:p.query||(()=>({}))}:{type:f,domain:p,name:So()[s][p].name,query:()=>({})})}return(f,u)=>i.value&&i.value.detailComponent?(e.openBlock(),e.createElementBlock("div",_d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value.detailComponent),{"route-query":e.unref(r)},null,8,["route-query"]))])):i.value?(e.openBlock(),e.createBlock(gd,{key:1,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",yd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-d50f54e1"]]),bd={key:0},wd={key:1,class:"loading-wrapper"},kd=R({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=U.useRoute(),n=t.meta.side,r=Y(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{Ht(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",bd,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Do,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(ja,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(r),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",wd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-fa1c18aa"]]),Ed={key:0},xd={class:"file-name"},Bd={class:"name"},Sd={class:"file-type"},Cd={key:1},$d=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]);function r(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",Ed,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",xd,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",Bd,e.toDisplayString(c.name),1),e.createElementVNode("span",Sd,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>r(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(Ji))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(w.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(kl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",Cd,[e.createVNode(fe)]))}},[["__scopeId","data-v-76764c63"]]),Vd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Rf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(u){a.value=a.value?[...a.value,u]:[u]}function c(u){const p=a.value.findIndex(g=>g.id===u.id);a.value.splice(p,1)}async function d(u){const p=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(u.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await p.updateFilesName(u).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function f(u,p){if(p=="success"){i(u),r("update:modelValue",a.value);return}if(p=="remove"){c(u),r("update:modelValue",a.value);return}if(p=="change"){d(u);return}}return(u,p)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:p[0]||(p[0]=g=>f(g,"success")),onOnRemove:p[1]||(p[1]=g=>f(g,"remove")),onOnChange:p[2]||(p[2]=g=>f(g,"change"))},null,8,["pics","props"]))}};class Od extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=$d,this.editor=Vd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),Td={key:3},Nd=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=o,r=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${r}/${a}`,query:{...Y(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let u=null;const p=Ht(s,r).then(m=>(u=m.formatName,Promise.resolve(m.rest)));function g(m){return n.field.isRouter(n.row,Y(t))&&!Y(t)[n.field.code]}function B(){p.then(m=>{var S;c.value=!0;const x=n.row[n.field.code],k=n.row[ko(`${r}-name`)];if(!x){y(!1),c.value=!1;return}if(x&&k){y({id:x,name:k}),c.value=!1;return}if((S=n.field)!=null&&S.notGetOne){y({id:x,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const _={id:x};m.getOne(_).then(E=>{y(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function y(m){if(d.value=!1,n.field.showName){la(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=m[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){f.value=m.name;return}if(!m){d.value=!0;return}f.value=u(m)}return e.watch(()=>n.row,B,{immediate:!0}),(m,x)=>{const k=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})):d.value?(e.openBlock(),e.createBlock(fe,{key:1})):g(o.row)?(e.openBlock(),e.createBlock(k,{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",Td,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-4fc1db1d"]]),Fd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}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(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),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,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class Ad extends ee{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=Nd,this.editor=Fd,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.notGetOne=t.notGetOne||!1,this.codeName=t.codeName||"",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 jd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Rd={style:{display:"flex","align-items":"center"}},Id={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.computed(()=>t.row[t.field.code]);return(r,s)=>(e.openBlock(),e.createElementBlock("span",Rd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#2DAD28",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#FF444A",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(Ui))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#85888E",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(ul))]),_:1}))]))}},Md={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>{var d,f,u,p,g,B;return e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=y=>s.value=y),disabled:r.disabled,"active-text":((f=(d=r.field)==null?void 0:d.elConfig)==null?void 0:f.activeText)||"是","inactive-text":((p=(u=r.field)==null?void 0:u.elConfig)==null?void 0:p.inactiveText)||"否","inline-prompt":((B=(g=r.field)==null?void 0:g.elConfig)==null?void 0:B.inlinePrompt)!==!1,onChange:a},null,8,["modelValue","disabled","active-text","inactive-text","inline-prompt"])}}};class Ld extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Id,this.editor=Md,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),zd={key:0},Hd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",zd,e.toDisplayString(r.value),1))]))}},Pd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}d();function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:f},null,8,["modelValue","props","options"]))}};class qd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=Hd,this.editor=Pd,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const Wd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"}));class Gd extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Qd=Object.freeze(Object.defineProperty({__proto__:null,default:Gd},Symbol.toStringTag,{value:"Module"})),Yd={key:0},Kd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Yd,e.toDisplayString(r.value),1))}},Jd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}};class Xd extends ee{constructor(t,n){super(t,n),this.display=Kd,this.editor=Jd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),vd={key:0},eu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",vd,e.toDisplayString(r.value),1))}},tu=R({__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}},[["__scopeId","data-v-145e36e2"]]);class nu extends ee{constructor(t,n){super(t,n),this.display=eu,this.editor=tu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),Ia=o=>(e.pushScopeId("data-v-9f5b0d8a"),o=o(),e.popScopeId(),o),ru={class:"loading-error"},au=Ia(()=>e.createElementVNode("div",null,"加载失败",-1)),su={key:1,class:"loading-error"},iu=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],lu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref("");e.watch(()=>t.row,()=>{t.field.waterMark?n.value=i(t.row[t.field.code],t.field.waterMark):n.value=t.row[t.field.code]},{immediate:!0});function r(c){const d=document.createElement("canvas");return d.width=c.width,d.height=c.height,d.getContext("2d").drawImage(c,0,0),d}function s(c,d){return new Promise(f=>{const u=c.getContext("2d"),p=a(d);u.fillStyle=u.createPattern(p,"repeat"),u.fillRect(0,0,c.width,c.height),f(c.toDataURL())})}function a(c){const d=document.createElement("canvas");d.width=500,d.height=200;const f=d.getContext("2d");return f.textAlign="left",f.textBaseline="middle",f.font="26px Microsoft Yahei",f.fillStyle="rgba(0, 0, 0, 0.3)",f.rotate(-20*Math.PI/180),f.fillText(c,10,200),d}function i(c,d){const f=new Image;f.crossOrigin="Anonymous",f.src=c,f.onload=async()=>{const u=r(f),p=await s(u,d);n.value=p}}return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":[n.value],class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",ru,[au,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",su,iu))],2))}},[["__scopeId","data-v-9f5b0d8a"]]),cu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Lf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){r("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,props:s.field.props,onOnSuccess:i},null,8,["image-url","disabled","props"]))}};class du extends ee{constructor(t,n){super(t,n),this.display=lu,this.editor=cu,this.props=t.props||{},this.checkValidProperties(t)}}const uu=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"})),Ma=o=>(e.pushScopeId("data-v-e4bc2c79"),o=o(),e.popScopeId(),o),fu={class:"image-card",style:{"margin-bottom":"20px"}},pu={class:"loading-error"},hu=Ma(()=>e.createElementVNode("div",null,"图片加载失败",-1)),mu={key:1,class:"loading-error"},gu=[Ma(()=>e.createElementVNode("div",null,"暂无",-1))],_u=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(r.value=s.map(a=>a.url),n.value=r.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(w.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",fu,[i.url?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",pu,[hu,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",mu,gu))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-e4bc2c79"]]);class yu extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=_u,this.editor=ba,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={key:0},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",wu,e.toDisplayString(r.value),1))}},Eu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInputNumber),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,min:r.field.min,max:r.field.max,step:r.field.step,precision:r.field.precision,"step-atrictly":r.field.stepAtrictly,onChange:a},null,8,["modelValue","disabled","min","max","step","precision","step-atrictly"]))}};class xu extends ee{constructor(t,n){super(t,n),this.display=ku,this.editor=Eu,this.min=t.min,this.max=t.max,this.step=t.step||1,this.precision=t.precision,this.stepAtrictly=t.stepAtrictly||!1,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=o,r=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{r.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(r.value=!0,s.value=a)},{immediate:!0}),(a,i)=>r.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(fe,{key:1}))}},Cu={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,r("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 $u extends ee{constructor(t,n){super(t,n),this.display=Su,this.editor=Cu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));var A=function(o,t,n){if(!t.has(o))throw new TypeError("attempted to set private field on non-instance");return t.set(o,n),n},T=function(o,t){if(!t.has(o))throw new TypeError("attempted to get private field on non-instance");return t.get(o)},tt,it,Ee,Et,qt,Ae,je,Re,Ie,Me,Le,Ue,ze,lt,xt,nt,Vn,ot;const Ou=function(o){var t=131,n=137,r=0;o+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<o.length;a++)r>s&&(r=Math.floor(r/n)),r=r*t+o.charCodeAt(a);return r},N="0123456789abcdef".split(""),Du=[-2147483648,8388608,32768,128],xe=[24,16,8,0],On=[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],oe=[];class Tu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),Et.set(this,void 0),qt.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),Ue.set(this,void 0),ze.set(this,void 0),lt.set(this,void 0),xt.set(this,void 0),nt.set(this,void 0),Vn.set(this,0),ot.set(this,void 0),this.init(t,n)}init(t,n){n?(oe[0]=oe[16]=oe[1]=oe[2]=oe[3]=oe[4]=oe[5]=oe[6]=oe[7]=oe[8]=oe[9]=oe[10]=oe[11]=oe[12]=oe[13]=oe[14]=oe[15]=0,A(this,it,oe)):A(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(A(this,Ae,3238371032),A(this,je,914150663),A(this,Re,812702999),A(this,Ie,4144912697),A(this,Me,4290775857),A(this,Le,1750603025),A(this,Ue,1694076839),A(this,ze,3204075428)):(A(this,Ae,1779033703),A(this,je,3144134277),A(this,Re,1013904242),A(this,Ie,2773480762),A(this,Me,1359893119),A(this,Le,2600822924),A(this,Ue,528734635),A(this,ze,1541459225)),A(this,tt,A(this,ot,A(this,Ee,A(this,xt,0)))),A(this,Et,A(this,lt,!1)),A(this,qt,!0),A(this,nt,t)}update(t){if(T(this,Et))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=T(this,it);for(;r<s;){let i;if(T(this,lt)&&(A(this,lt,!1),a[0]=T(this,tt),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=T(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=T(this,ot);r<s&&i<64;++r){let c=n.charCodeAt(r);c<128?a[i>>2]|=c<<xe[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++r)&1023),a[i>>2]|=(240|c>>18)<<xe[i++&3],a[i>>2]|=(128|c>>12&63)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3])}A(this,Vn,i),A(this,Ee,T(this,Ee)+(i-T(this,ot))),i>=64?(A(this,tt,a[16]),A(this,ot,i-64),this.hash(),A(this,lt,!0)):A(this,ot,i)}return T(this,Ee)>4294967295&&(A(this,xt,T(this,xt)+(T(this,Ee)/4294967296<<0)),A(this,Ee,T(this,Ee)%4294967296)),this}finalize(){if(T(this,Et))return;A(this,Et,!0);const t=T(this,it),n=T(this,Vn);t[16]=T(this,tt),t[n>>2]|=Du[n&3],A(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),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]=T(this,xt)<<3|T(this,Ee)>>>29,t[15]=T(this,Ee)<<3,this.hash()}hash(){let t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);const f=T(this,it);let u,p,g,B,y,m,x,k,_,S;for(let E=16;E<64;++E)B=f[E-15],u=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=f[E-2],p=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,f[E]=f[E-16]+u+f[E-7]+p<<0;S=n&r;for(let E=0;E<64;E+=4)T(this,qt)?(T(this,nt)?(x=300032,B=f[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(x=704751109,B=f[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),A(this,qt,!1)):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,g=x^t&r^S,m=a&i^~a&c,B=d+p+m+On[E]+f[E],y=u+g,d=s+B<<0,s=B+y<<0),u=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),p=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),k=s&t,g=k^s&n^x,m=d&a^~d&i,B=c+p+m+On[E+1]+f[E+1],y=u+g,c=r+B<<0,r=B+y<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),_=r&s,g=_^r&t^k,m=c&d^~c&a,B=i+p+m+On[E+2]+f[E+2],y=u+g,i=n+B<<0,n=B+y<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),S=n&r,g=S^n&s^_,m=i&c^~i&d,B=a+p+m+On[E+3]+f[E+3],y=u+g,a=t+B<<0,t=B+y<<0;A(this,Ae,T(this,Ae)+t<<0),A(this,je,T(this,je)+n<<0),A(this,Re,T(this,Re)+r<<0),A(this,Ie,T(this,Ie)+s<<0),A(this,Me,T(this,Me)+a<<0),A(this,Le,T(this,Le)+i<<0),A(this,Ue,T(this,Ue)+c<<0),A(this,ze,T(this,ze)+d<<0)}hex(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);let f=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[r>>28&15]+N[r>>24&15]+N[r>>20&15]+N[r>>16&15]+N[r>>12&15]+N[r>>8&15]+N[r>>4&15]+N[r&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(f+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&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 T(this,nt)||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(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,Ae)),n.setUint32(4,T(this,je)),n.setUint32(8,T(this,Re)),n.setUint32(12,T(this,Ie)),n.setUint32(16,T(this,Me)),n.setUint32(20,T(this,Le)),n.setUint32(24,T(this,Ue)),T(this,nt)||n.setUint32(28,T(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,Et=new WeakMap,qt=new WeakMap,Ae=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,Ue=new WeakMap,ze=new WeakMap,lt=new WeakMap,xt=new WeakMap,nt=new WeakMap,Vn=new WeakMap,ot=new WeakMap;function Nu(o){const t=new Tu;return t.update(o),parseInt(t.hex().substring(0,8),16)}const Fu=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},Au=function(o,t,n){o/=360;var r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;return[o+1/3,o,o-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(r-s)*6*a:a<.5?a=r:a<2/3?a=s+(r-s)*6*(2/3-a):a=s,Math.round(a*255)})};class ju{constructor(t={}){const[n,r]=[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=r,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=Nu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=Ou)}hsl(t){var n,r,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),r=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,r,s]}rgb(t){var n=this.hsl(t);return Au.apply(this,n)}hex(t){var n=this.rgb(t);return Fu(n)}}const Ru=new ju;function Iu(o){const t=Ru.hex(`abc${o}cba`);return Mu(t.replace("#",""),-20)}function Mu(o,t){let n=parseInt(o.substring(1,3),16),r=parseInt(o.substring(3,5),16),s=parseInt(o.substring(5,7),16);n=parseInt(n*(100+t)/100),r=parseInt(r*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,r=r<255?r:255,s=s<255?s:255,n=Math.round(n),r=Math.round(r),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const La={strToHexColor:Iu},Lu={key:0,class:"radio-fields"},Uu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u="";if(u=f.filter(p=>d===p.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"radio-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-66131aaa"]]),zu={__name:"FieldEditor",props:{modelValue:[String,Number],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){var u;s("update:modelValue",i.value),(u=a==null?void 0:a.field)!=null&&u.change&&a.field.change(i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElRadio),{key:g.code,label:g.code,disabled:g.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"]))}};class Hu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Uu,this.editor=zu,this.checkValidProperties(t)}}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),qu={class:"editor-field"},Wu=["innerHTML"],Gu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",qu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Wu)]))}},[["__scopeId","data-v-e54b04b3"]]),Qu={style:{width:"100%"}},Yu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>tp)),r=t,s=o,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{r("update:modelValue",a.value)}),e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Qu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class Ku extends ee{constructor(t,n){super(t,n),this.display=Gu,this.editor=Yu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Ku},Symbol.toStringTag,{value:"Module"}));class Xu extends ee{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 Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),vu={key:0,class:"select-fields"},ef=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u=[];if(r.field.multiple?u=f.filter(p=>d.includes(p.code)):u=f.filter(p=>d===p.code),u.length===0){s.value="--",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-a4302e50"]]),tf={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:o.field.placeholder,remote:"","remote-method":d,onChange:f},e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0]),1032,["modelValue","multiple","disabled","placeholder"]))}};class nf extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=ef,this.editor=tf,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const of=Object.freeze(Object.defineProperty({__proto__:null,default:nf},Symbol.toStringTag,{value:"Module"})),rf={key:0},af={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){var c;if((c=t.field)!=null&&c.formatter){r.value=t.field.formatter(t.row),n.value=!r.value;return}const i=t.field.code.toString().split(".").reduce((d,f)=>d[f],t.row);i==null||`${i}`.trim()===""?n.value=!0:(r.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",rf,e.toDisplayString(r.value),1))}},sf={class:"annotation"},lf={class:"annotation"},cf=R({__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:o.field.type,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},e.createSlots({_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createElementVNode("div",sf,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",lf,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-449013dd"]]);class df extends ee{constructor(t,n){super(t,n),this.display=af,this.editor=cf,this.formatter=t.formatter,this.checkValidProperties(t)}}const uf=Object.freeze(Object.defineProperty({__proto__:null,default:df},Symbol.toStringTag,{value:"Module"})),ff={style:{display:"flex","align-items":"center"}},pf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(o,{emit:t}){const n=t,r=o,s=e.ref(r.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,u)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",ff,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),size:"small",disabled:!!s.value,"before-change":f=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},hf={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class mf extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=pf,this.editor=hf,this.checkValidProperties(t)}}const gf=Object.freeze(Object.defineProperty({__proto__:null,default:mf},Symbol.toStringTag,{value:"Module"})),_f={key:0},yf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",_f,e.toDisplayString(r.value),1))}},bf={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},null,8,["modelValue","disabled","placeholder"]))}};class wf extends ee{constructor(t,n){super(t,n),this.display=yf,this.editor=bf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const kf=Object.freeze(Object.defineProperty({__proto__:null,default:wf},Symbol.toStringTag,{value:"Module"})),Ef={key:0},xf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Ef,e.toDisplayString(r.value),1))}},Bf={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,format:r.field.format,"value-format":r.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Sf extends ee{constructor(t,n){super(t,n),this.display=xf,this.editor=Bf,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cf=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),$f=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]),r=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],r.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,f)=>i.value?(e.openBlock(),e.createBlock(e.unref(w.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:r.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(fe,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-f3f99ac4"]]),Vf={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(g){c.value=await a.field.options(a.formData,r,g)}function u(g,B){var y;return(y=a.field)!=null&&y.useApiSearchKeyword||!g?!0:B.name.includes(g)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(g,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":B[0]||(B[0]=y=>i.value=y),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"",clearable:"","filter-node-method":u,"remote-method":f,onCheck:p,onChange:p},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Of extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.useApiSearchKeyword=t.useApiSearchKeyword||!1,this.display=$f,this.editor=Vf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Df=Object.freeze(Object.defineProperty({__proto__:null,default:Of},Symbol.toStringTag,{value:"Module"})),Tf={class:"el-upload__tip"},Nf=["src"],Ff=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*",tip:""}}}},emits:["on-remove","on-upload"],setup(o,{emit:t}){const n=t,r=e.ref(""),s=e.ref(!1),a=o,i=e.computed(()=>a.images.map(g=>{if(!(g!=null&&g.url))return{...g,name:"unknown",fileType:"unknown"};const B=g.url.substring(g.url.lastIndexOf(".")+1),y=g.url.split("/");return{...g,name:y[y.length-1],fileType:B}}));function c(g){var B,y;if(a.props.deleteParams){const m=(B=a.props.deleteParams)!=null&&B.data?(y=a.props.deleteParams)==null?void 0:y.data:{};he.remove(`${a.props.deleteParams.url}/${g.id}/attachment`,m,m).then(()=>{n("on-remove",g)})}else n("on-remove",g)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(g){r.value=g.url,s.value=!0}function u(g){return g.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function p(g){const B=new FormData;B.append("file",g.file),n("on-upload",B)}return(g,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(w.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":u,"http-request":p,"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"]))},e.createSlots({default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:2},[a.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Tf,e.toDisplayString(a.props.tip),1)]),key:"0"}:void 0]),1032,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,Nf)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-b9c6d702"]])},Symbol.toStringTag,{value:"Module"})),Af=["src"],jf={class:"file-type"},Rf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__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(o,{emit:t}){const n=t,r=o,s=e.computed(()=>r.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const k=m.url.split("/");return{...m,name:k[k.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(k,_){return m.type.startsWith("image/")?(x.onload=async S=>{const E=new Image;E.src=S.target.result,E.onload=()=>{const V=document.createElement("canvas"),O=V.getContext("2d");V.width=E.width,V.height=E.height,O.drawImage(E,0,0,V.width,V.height),V.toBlob(I=>{const G=new File([I],m.name,{type:m.type,lastModified:Date.now()});k(G)},m.type,.5)}},!1):(k(m),!1)})},f=m=>{var x,k;if(m.status==="success")if(r.props.deleteParams){const _=(x=r.props.deleteParams)!=null&&x.data?(k=r.props.deleteParams)==null?void 0:k.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,_,_).then(()=>{n("on-remove",m)})}else n("on-remove",m)},u=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},p=m=>{a.value=m.url,i.value=!0},g=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(_=>_.size/1024/1024<5?(y(_),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(m,x){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function y(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,k)=>{const _=new FormData;_.append("file",m),v.post(c,_,{}).then(S=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",S.data.data),x(S.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),k("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:r.props.limit,accept:r.props.accept,"list-type":r.props.listType,"on-remove":f,"before-upload":g,"on-exceed":u,"on-preview":p,multiple:!0,"http-request":()=>!1,"show-file-list":r.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=r.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[r.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.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(w.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=k=>i.value=k)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Af)]),_:1},8,["modelValue"]),r.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:_,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:k.name,"onUpdate:modelValue":S=>k.name=S,onChange:S=>B(k)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",jf,"."+e.toDisplayString(k.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:S=>f(k)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-28b29d8a"]])},Symbol.toStringTag,{value:"Module"})),If={class:"image-slot"},Mf={class:"el-upload__tip"},Lf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImageUploader",props:{imageUrl:{type:String},props:{type:Object,default(){return{accept:"image/*",tip:""}}}},emits:["on-success"],setup(o,{emit:t}){const n=t,r=o,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=f=>{if(!(f.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=f=>{n("on-success",f.data.imageUrl)};function c(){n("on-success","")}function d(f){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((u,p)=>{const g=new FormData;g.append("image",f.file),v.post(s,g,{}).then(B=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),u(B.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),p("Upload failed")})})}return(f,u)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,accept:r.props.accept,"on-success":i,"before-upload":a,"http-request":d},e.createSlots({default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:r.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",If,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Mf,e.toDisplayString(r.props.tip),1)]),key:"0"}:void 0]),1032,["action","accept"]))}},[["__scopeId","data-v-2aeefc1e"]])},Symbol.toStringTag,{value:"Module"}));var He=-1,Be=1,me=0;function Wt(o,t,n,r){if(o===t)return o?[[me,o]]:[];if(n!=null){var s=qf(o,t,n);if(s)return s}var a=To(o,t),i=o.substring(0,a);o=o.substring(a),t=t.substring(a),a=No(o,t);var c=o.substring(o.length-a);o=o.substring(0,o.length-a),t=t.substring(0,t.length-a);var d=Uf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),za(d,r),d}function Uf(o,t){var n;if(!o)return[[Be,t]];if(!t)return[[He,o]];var r=o.length>t.length?o:t,s=o.length>t.length?t:o,a=r.indexOf(s);if(a!==-1)return n=[[Be,r.substring(0,a)],[me,s],[Be,r.substring(a+s.length)]],o.length>t.length&&(n[0][0]=n[2][0]=He),n;if(s.length===1)return[[He,o],[Be,t]];var i=Hf(o,t);if(i){var c=i[0],d=i[1],f=i[2],u=i[3],p=i[4],g=Wt(c,f),B=Wt(d,u);return g.concat([[me,p]],B)}return zf(o,t)}function zf(o,t){for(var n=o.length,r=t.length,s=Math.ceil((n+r)/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 u=n-r,p=u%2!==0,g=0,B=0,y=0,m=0,x=0;x<s;x++){for(var k=-x+g;k<=x-B;k+=2){var _=a+k,S;k===-x||k!==x&&c[_-1]<c[_+1]?S=c[_+1]:S=c[_-1]+1;for(var E=S-k;S<n&&E<r&&o.charAt(S)===t.charAt(E);)S++,E++;if(c[_]=S,S>n)B+=2;else if(E>r)g+=2;else if(p){var V=a+u-k;if(V>=0&&V<i&&d[V]!==-1){var O=n-d[V];if(S>=O)return Ua(o,t,S,E)}}}for(var I=-x+y;I<=x-m;I+=2){var V=a+I,O;I===-x||I!==x&&d[V-1]<d[V+1]?O=d[V+1]:O=d[V-1]+1;for(var G=O-I;O<n&&G<r&&o.charAt(n-O-1)===t.charAt(r-G-1);)O++,G++;if(d[V]=O,O>n)m+=2;else if(G>r)y+=2;else if(!p){var _=a+u-I;if(_>=0&&_<i&&c[_]!==-1){var S=c[_],E=a+S-_;if(O=n-O,S>=O)return Ua(o,t,S,E)}}}}return[[He,o],[Be,t]]}function Ua(o,t,n,r){var s=o.substring(0,n),a=t.substring(0,r),i=o.substring(n),c=t.substring(r),d=Wt(s,a),f=Wt(i,c);return d.concat(f)}function To(o,t){if(!o||!t||o.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(a,s)==t.substring(a,s)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Ha(o.charCodeAt(s-1))&&s--,s}function No(o,t){if(!o||!t||o.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(o.length-s,o.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Pa(o.charCodeAt(o.length-s))&&s--,s}function Hf(o,t){var n=o.length>t.length?o:t,r=o.length>t.length?t:o;if(n.length<4||r.length*2<n.length)return null;function s(B,y,m){for(var x=B.substring(m,m+Math.floor(B.length/4)),k=-1,_="",S,E,V,O;(k=y.indexOf(x,k+1))!==-1;){var I=To(B.substring(m),y.substring(k)),G=No(B.substring(0,m),y.substring(0,k));_.length<G+I&&(_=y.substring(k-G,k)+y.substring(k,k+I),S=B.substring(0,m-G),E=B.substring(m+I),V=y.substring(0,k-G),O=y.substring(k+I))}return _.length*2>=B.length?[S,E,V,O,_]:null}var a=s(n,r,Math.ceil(n.length/4)),i=s(n,r,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,u,p;o.length>t.length?(d=c[0],f=c[1],u=c[2],p=c[3]):(u=c[0],p=c[1],d=c[2],f=c[3]);var g=c[4];return[d,f,u,p,g]}function za(o,t){o.push([me,""]);for(var n=0,r=0,s=0,a="",i="",c;n<o.length;){if(n<o.length-1&&!o[n][1]){o.splice(n,1);continue}switch(o[n][0]){case Be:s++,i+=o[n][1],n++;break;case He:r++,a+=o[n][1],n++;break;case me:var d=n-s-r-1;if(t){if(d>=0&&Wa(o[d][1])){var f=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=f+a,i=f+i,!o[d][1]){o.splice(d,1),n--;var u=d-1;o[u]&&o[u][0]===Be&&(s++,i=o[u][1]+i,u--),o[u]&&o[u][0]===He&&(r++,a=o[u][1]+a,u--),d=u}}if(qa(o[n][1])){var f=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=f,i+=f}}if(n<o.length-1&&!o[n][1]){o.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=To(i,a),c!==0&&(d>=0?o[d][1]+=i.substring(0,c):(o.splice(0,0,[me,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=No(i,a),c!==0&&(o[n][1]=i.substring(i.length-c)+o[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var p=s+r;a.length===0&&i.length===0?(o.splice(n-p,p),n=n-p):a.length===0?(o.splice(n-p,p,[Be,i]),n=n-p+1):i.length===0?(o.splice(n-p,p,[He,a]),n=n-p+1):(o.splice(n-p,p,[He,a],[Be,i]),n=n-p+2)}n!==0&&o[n-1][0]===me?(o[n-1][1]+=o[n][1],o.splice(n,1)):n++,s=0,r=0,a="",i="";break}}o[o.length-1][1]===""&&o.pop();var g=!1;for(n=1;n<o.length-1;)o[n-1][0]===me&&o[n+1][0]===me&&(o[n][1].substring(o[n][1].length-o[n-1][1].length)===o[n-1][1]?(o[n][1]=o[n-1][1]+o[n][1].substring(0,o[n][1].length-o[n-1][1].length),o[n+1][1]=o[n-1][1]+o[n+1][1],o.splice(n-1,1),g=!0):o[n][1].substring(0,o[n+1][1].length)==o[n+1][1]&&(o[n-1][1]+=o[n+1][1],o[n][1]=o[n][1].substring(o[n+1][1].length)+o[n+1][1],o.splice(n+1,1),g=!0)),n++;g&&za(o,t)}function Ha(o){return o>=55296&&o<=56319}function Pa(o){return o>=56320&&o<=57343}function qa(o){return Pa(o.charCodeAt(0))}function Wa(o){return Ha(o.charCodeAt(o.length-1))}function Pf(o){for(var t=[],n=0;n<o.length;n++)o[n][1].length>0&&t.push(o[n]);return t}function Fo(o,t,n,r){return Wa(o)||qa(r)?null:Pf([[me,o],[He,t],[Be,n],[me,r]])}function qf(o,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=o.length,i=t.length;if(r.length===0&&(s===null||s.length===0)){var c=r.index,d=o.slice(0,c),f=o.slice(c),u=s?s.index:null;e:{var p=c+i-a;if(u!==null&&u!==p||p<0||p>i)break e;var g=t.slice(0,p),B=t.slice(p);if(B!==f)break e;var y=Math.min(c,p),m=d.slice(0,y),x=g.slice(0,y);if(m!==x)break e;var k=d.slice(y),_=g.slice(y);return Fo(m,k,_,f)}e:{if(u!==null&&u!==c)break e;var S=c,g=t.slice(0,S),B=t.slice(S);if(g!==d)break e;var E=Math.min(a-S,i-S),V=f.slice(f.length-E),O=B.slice(B.length-E);if(V!==O)break e;var k=f.slice(0,f.length-E),_=B.slice(0,B.length-E);return Fo(d,k,_,V)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),V=o.slice(r.index+r.length),y=m.length,E=V.length;if(i<y+E)break e;var x=t.slice(0,y),O=t.slice(i-E);if(m!==x||V!==O)break e;var k=o.slice(y,a-E),_=t.slice(y,i-E);return Fo(m,k,_,V)}return null}function Dn(o,t,n){return Wt(o,t,n,!0)}Dn.INSERT=Be,Dn.DELETE=He,Dn.EQUAL=me;var Wf=Dn,Tn={exports:{}};Tn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",u="[object Function]",p="[object GeneratorFunction]",g="[object Map]",B="[object Number]",y="[object Object]",m="[object Promise]",x="[object RegExp]",k="[object Set]",_="[object String]",S="[object Symbol]",E="[object WeakMap]",V="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",G="[object Float64Array]",K="[object Int8Array]",re="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",Pe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Bt=/\w*$/,z=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,M={};M[a]=M[i]=M[V]=M[O]=M[c]=M[d]=M[I]=M[G]=M[K]=M[re]=M[D]=M[g]=M[B]=M[y]=M[x]=M[k]=M[_]=M[S]=M[L]=M[X]=M[Se]=M[Pe]=!0,M[f]=M[u]=M[E]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Io=typeof self=="object"&&self&&self.Object===Object&&self,Ce=we||Io||Function("return this")(),Rn=t&&!t.nodeType&&t,J=Rn&&!0&&o&&!o.nodeType&&o,In=J&&J.exports===Rn;function Mo(l,h){return l.set(h[0],h[1]),l}function $e(l,h){return l.add(h),l}function Mn(l,h){for(var b=-1,C=l?l.length:0;++b<C&&h(l[b],b,l)!==!1;);return l}function Ln(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Yt(l,h,b,C){for(var j=-1,F=l?l.length:0;++j<F;)b=h(b,l[j],j,l);return b}function Kt(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Un(l,h){return l==null?void 0:l[h]}function Jt(l){var h=!1;if(l!=null&&typeof l.toString!="function")try{h=!!(l+"")}catch{}return h}function zn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function Xt(l,h){return function(b){return l(h(b))}}function Hn(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Lo=Array.prototype,Uo=Function.prototype,St=Object.prototype,Zt=Ce["__core-js_shared__"],Pn=function(){var l=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Uo.toString,qe=St.hasOwnProperty,Ct=St.toString,zo=RegExp("^"+qn.call(qe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=In?Ce.Buffer:void 0,$t=Ce.Symbol,vt=Ce.Uint8Array,ke=Xt(Object.getPrototypeOf,Object),Wn=Object.create,Gn=St.propertyIsEnumerable,Ho=Lo.splice,en=Object.getOwnPropertySymbols,Vt=ct?ct.isBuffer:void 0,Qn=Xt(Object.keys,Object),Ot=Oe(Ce,"DataView"),dt=Oe(Ce,"Map"),Ve=Oe(Ce,"Promise"),Dt=Oe(Ce,"Set"),tn=Oe(Ce,"WeakMap"),ut=Oe(Object,"create"),nn=pe(Ot),ft=pe(dt),on=pe(Ve),rn=pe(Dt),an=pe(tn),rt=$t?$t.prototype:void 0,Yn=rt?rt.valueOf:void 0;function Ke(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Po(){this.__data__=ut?ut(null):{}}function qo(l){return this.has(l)&&delete this.__data__[l]}function Wo(l){var h=this.__data__;if(ut){var b=h[l];return b===r?void 0:b}return qe.call(h,l)?h[l]:void 0}function Kn(l){var h=this.__data__;return ut?h[l]!==void 0:qe.call(h,l)}function sn(l,h){var b=this.__data__;return b[l]=ut&&h===void 0?r:h,this}Ke.prototype.clear=Po,Ke.prototype.delete=qo,Ke.prototype.get=Wo,Ke.prototype.has=Kn,Ke.prototype.set=sn;function ie(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=[]}function Qo(l){var h=this.__data__,b=Nt(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():Ho.call(h,b,1),!0}function Yo(l){var h=this.__data__,b=Nt(h,l);return b<0?void 0:h[b][1]}function Ko(l){return Nt(this.__data__,l)>-1}function Jo(l,h){var b=this.__data__,C=Nt(b,l);return C<0?b.push([l,h]):b[C][1]=h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__={hash:new Ke,map:new(dt||ie),string:new Ke}}function Zo(l){return ht(this,l).delete(l)}function vo(l){return ht(this,l).get(l)}function er(l){return ht(this,l).has(l)}function tr(l,h){return ht(this,l).set(l,h),this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){this.__data__=new ie(l)}function nr(){this.__data__=new ie}function or(l){return this.__data__.delete(l)}function rr(l){return this.__data__.get(l)}function ar(l){return this.__data__.has(l)}function sr(l,h){var b=this.__data__;if(b instanceof ie){var C=b.__data__;if(!dt||C.length<n-1)return C.push([l,h]),this;b=this.__data__=new ce(C)}return b.set(l,h),this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l,h){var b=un(l)||At(l)?Kt(l.length,String):[],C=b.length,j=!!C;for(var F in l)qe.call(l,F)&&!(j&&(F=="length"||wr(F,C)))&&b.push(F);return b}function Jn(l,h,b){var C=l[h];(!(qe.call(l,h)&&to(C,b))||b===void 0&&!(h in l))&&(l[h]=b)}function Nt(l,h){for(var b=l.length;b--;)if(to(l[b][0],h))return b;return-1}function We(l,h){return l&&dn(h,pn(h),l)}function ln(l,h,b,C,j,F,W){var q;if(C&&(q=F?C(l,j,F,W):C(l)),q!==void 0)return q;if(!Qe(l))return l;var te=un(l);if(te){if(q=yr(l),!h)return mr(l,q)}else{var Q=Xe(l),de=Q==u||Q==p;if(no(l))return Ft(l,h);if(Q==y||Q==a||de&&!F){if(Jt(l))return F?l:{};if(q=Ge(de?{}:l),!h)return gr(l,We(q,l))}else{if(!M[Q])return F?l:{};q=br(l,Q,ln,h)}}W||(W=new ge);var _e=W.get(l);if(_e)return _e;if(W.set(l,q),!te)var ne=b?_r(l):pn(l);return Mn(ne||l,function(ue,le){ne&&(le=ue,ue=l[le]),Jn(q,le,ln(ue,h,b,C,le,l,W))}),q}function ir(l){return Qe(l)?Wn(l):{}}function lr(l,h,b){var C=h(l);return un(l)?C:Ln(C,b(l))}function cr(l){return Ct.call(l)}function dr(l){if(!Qe(l)||Er(l))return!1;var h=fn(l)||Jt(l)?zo:z;return h.test(pe(l))}function ur(l){if(!vn(l))return Qn(l);var h=[];for(var b in Object(l))qe.call(l,b)&&b!="constructor"&&h.push(b);return h}function Ft(l,h){if(h)return l.slice();var b=new l.constructor(l.length);return l.copy(b),b}function cn(l){var h=new l.constructor(l.byteLength);return new vt(h).set(new vt(l)),h}function pt(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function Xn(l,h,b){var C=h?b(zn(l),!0):zn(l);return Yt(C,Mo,new l.constructor)}function Zn(l){var h=new l.constructor(l.source,Bt.exec(l));return h.lastIndex=l.lastIndex,h}function fr(l,h,b){var C=h?b(Hn(l),!0):Hn(l);return Yt(C,$e,new l.constructor)}function pr(l){return Yn?Object(Yn.call(l)):{}}function hr(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function mr(l,h){var b=-1,C=l.length;for(h||(h=Array(C));++b<C;)h[b]=l[b];return h}function dn(l,h,b,C){b||(b={});for(var j=-1,F=h.length;++j<F;){var W=h[j],q=void 0;Jn(b,W,q===void 0?l[W]:q)}return b}function gr(l,h){return dn(l,Je(l),h)}function _r(l){return lr(l,pn,Je)}function ht(l,h){var b=l.__data__;return kr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Oe(l,h){var b=Un(l,h);return dr(b)?b:void 0}var Je=en?Xt(en,Object):Br,Xe=cr;(Ot&&Xe(new Ot(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=g||Ve&&Xe(Ve.resolve())!=m||Dt&&Xe(new Dt)!=k||tn&&Xe(new tn)!=E)&&(Xe=function(l){var h=Ct.call(l),b=h==y?l.constructor:void 0,C=b?pe(b):void 0;if(C)switch(C){case nn:return O;case ft:return g;case on:return m;case rn:return k;case an:return E}return h});function yr(l){var h=l.length,b=l.constructor(h);return h&&typeof l[0]=="string"&&qe.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function Ge(l){return typeof l.constructor=="function"&&!vn(l)?ir(ke(l)):{}}function br(l,h,b,C){var j=l.constructor;switch(h){case V:return cn(l);case c:case d:return new j(+l);case O:return pt(l,C);case I:case G:case K:case re:case D:case L:case X:case Se:case Pe:return hr(l,C);case g:return Xn(l,C,b);case B:case _:return new j(l);case x:return Zn(l);case k:return fr(l,C,b);case S:return pr(l)}}function wr(l,h){return h=h??s,!!h&&(typeof l=="number"||Z.test(l))&&l>-1&&l%1==0&&l<h}function kr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function Er(l){return!!Pn&&Pn in l}function vn(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||St;return l===b}function pe(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l){return ln(l,!0,!0)}function to(l,h){return l===h||l!==l&&h!==h}function At(l){return xr(l)&&qe.call(l,"callee")&&(!Gn.call(l,"callee")||Ct.call(l)==a)}var un=Array.isArray;function jt(l){return l!=null&&oo(l.length)&&!fn(l)}function xr(l){return ro(l)&&jt(l)}var no=Vt||Sr;function fn(l){var h=Qe(l)?Ct.call(l):"";return h==u||h==p}function oo(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Qe(l){var h=typeof l;return!!l&&(h=="object"||h=="function")}function ro(l){return!!l&&typeof l=="object"}function pn(l){return jt(l)?Tt(l):ur(l)}function Br(){return[]}function Sr(){return!1}o.exports=eo}(Tn,Tn.exports);var Ga=Tn.exports,Nn={exports:{}};Nn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",p="[object Date]",g="[object Error]",B="[object Function]",y="[object GeneratorFunction]",m="[object Map]",x="[object Number]",k="[object Null]",_="[object Object]",S="[object Promise]",E="[object Proxy]",V="[object RegExp]",O="[object Set]",I="[object String]",G="[object Symbol]",K="[object Undefined]",re="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Ye="[object Int16Array]",Bt="[object Int32Array]",z="[object Uint8Array]",Z="[object Uint8ClampedArray]",M="[object Uint16Array]",we="[object Uint32Array]",Io=/[\\^$.*+?()[\]{}|]/g,Ce=/^\[object .+?Constructor\]$/,Rn=/^(?:0|[1-9]\d*)$/,J={};J[X]=J[Se]=J[Pe]=J[Ye]=J[Bt]=J[z]=J[Z]=J[M]=J[we]=!0,J[c]=J[d]=J[D]=J[u]=J[L]=J[p]=J[g]=J[B]=J[m]=J[x]=J[_]=J[V]=J[O]=J[I]=J[re]=!1;var In=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,$e=In||Mo||Function("return this")(),Mn=t&&!t.nodeType&&t,Ln=Mn&&!0&&o&&!o.nodeType&&o,Yt=Ln&&Ln.exports===Mn,Kt=Yt&&In.process,Un=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Un&&Un.isTypedArray;function zn(l,h){for(var b=-1,C=l==null?0:l.length,j=0,F=[];++b<C;){var W=l[b];h(W,b,l)&&(F[j++]=W)}return F}function Xt(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Hn(l,h){for(var b=-1,C=l==null?0:l.length;++b<C;)if(h(l[b],b,l))return!0;return!1}function Lo(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Uo(l){return function(h){return l(h)}}function St(l,h){return l.has(h)}function Zt(l,h){return l==null?void 0:l[h]}function Pn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function qn(l,h){return function(b){return l(h(b))}}function qe(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Ct=Array.prototype,zo=Function.prototype,ct=Object.prototype,$t=$e["__core-js_shared__"],vt=zo.toString,ke=ct.hasOwnProperty,Wn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Gn=ct.toString,Ho=RegExp("^"+vt.call(ke).replace(Io,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Yt?$e.Buffer:void 0,Vt=$e.Symbol,Qn=$e.Uint8Array,Ot=ct.propertyIsEnumerable,dt=Ct.splice,Ve=Vt?Vt.toStringTag:void 0,Dt=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Je($e,"DataView"),ft=Je($e,"Map"),on=Je($e,"Promise"),rn=Je($e,"Set"),an=Je($e,"WeakMap"),rt=Je(Object,"create"),Yn=pe(nn),Ke=pe(ft),Po=pe(on),qo=pe(rn),Wo=pe(an),Kn=Vt?Vt.prototype:void 0,sn=Kn?Kn.valueOf:void 0;function ie(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=rt?rt(null):{},this.size=0}function Qo(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function Yo(l){var h=this.__data__;if(rt){var b=h[l];return b===r?void 0:b}return ke.call(h,l)?h[l]:void 0}function Ko(l){var h=this.__data__;return rt?h[l]!==void 0:ke.call(h,l)}function Jo(l,h){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=rt&&h===void 0?r:h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__=[],this.size=0}function Zo(l){var h=this.__data__,b=Ft(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():dt.call(h,b,1),--this.size,!0}function vo(l){var h=this.__data__,b=Ft(h,l);return b<0?void 0:h[b][1]}function er(l){return Ft(this.__data__,l)>-1}function tr(l,h){var b=this.__data__,C=Ft(b,l);return C<0?(++this.size,b.push([l,h])):b[C][1]=h,this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function nr(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function or(l){var h=Oe(this,l).delete(l);return this.size-=h?1:0,h}function rr(l){return Oe(this,l).get(l)}function ar(l){return Oe(this,l).has(l)}function sr(l,h){var b=Oe(this,l),C=b.size;return b.set(l,h),this.size+=b.size==C?0:1,this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l){var h=-1,b=l==null?0:l.length;for(this.__data__=new ge;++h<b;)this.add(l[h])}function Jn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Jn,Tt.prototype.has=Nt;function We(l){var h=this.__data__=new ce(l);this.size=h.size}function ln(){this.__data__=new ce,this.size=0}function ir(l){var h=this.__data__,b=h.delete(l);return this.size=h.size,b}function lr(l){return this.__data__.get(l)}function cr(l){return this.__data__.has(l)}function dr(l,h){var b=this.__data__;if(b instanceof ce){var C=b.__data__;if(!ft||C.length<n-1)return C.push([l,h]),this.size=++b.size,this;b=this.__data__=new ge(C)}return b.set(l,h),this.size=b.size,this}We.prototype.clear=ln,We.prototype.delete=ir,We.prototype.get=lr,We.prototype.has=cr,We.prototype.set=dr;function ur(l,h){var b=At(l),C=!b&&to(l),j=!b&&!C&&jt(l),F=!b&&!C&&!j&&ro(l),W=b||C||j||F,q=W?Lo(l.length,String):[],te=q.length;for(var Q in l)ke.call(l,Q)&&!(W&&(Q=="length"||j&&(Q=="offset"||Q=="parent")||F&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||br(Q,te)))&&q.push(Q);return q}function Ft(l,h){for(var b=l.length;b--;)if(eo(l[b][0],h))return b;return-1}function cn(l,h,b){var C=h(l);return At(l)?C:Xt(C,b(l))}function pt(l){return l==null?l===void 0?K:k:Ve&&Ve in Object(l)?Xe(l):vn(l)}function Xn(l){return Qe(l)&&pt(l)==c}function Zn(l,h,b,C,j){return l===h?!0:l==null||h==null||!Qe(l)&&!Qe(h)?l!==l&&h!==h:fr(l,h,b,C,Zn,j)}function fr(l,h,b,C,j,F){var W=At(l),q=At(h),te=W?d:Ge(l),Q=q?d:Ge(h);te=te==c?_:te,Q=Q==c?_:Q;var de=te==_,_e=Q==_,ne=te==Q;if(ne&&jt(l)){if(!jt(h))return!1;W=!0,de=!1}if(ne&&!de)return F||(F=new We),W||ro(l)?dn(l,h,b,C,j,F):gr(l,h,te,b,C,j,F);if(!(b&s)){var ue=de&&ke.call(l,"__wrapped__"),le=_e&&ke.call(h,"__wrapped__");if(ue||le){var at=ue?l.value():l,Ze=le?h.value():h;return F||(F=new We),j(at,Ze,b,C,F)}}return ne?(F||(F=new We),_r(l,h,b,C,j,F)):!1}function pr(l){if(!oo(l)||kr(l))return!1;var h=no(l)?Ho:Ce;return h.test(pe(l))}function hr(l){return Qe(l)&&fn(l.length)&&!!J[pt(l)]}function mr(l){if(!Er(l))return ut(l);var h=[];for(var b in Object(l))ke.call(l,b)&&b!="constructor"&&h.push(b);return h}function dn(l,h,b,C,j,F){var W=b&s,q=l.length,te=h.length;if(q!=te&&!(W&&te>q))return!1;var Q=F.get(l);if(Q&&F.get(h))return Q==h;var de=-1,_e=!0,ne=b&a?new Tt:void 0;for(F.set(l,h),F.set(h,l);++de<q;){var ue=l[de],le=h[de];if(C)var at=W?C(le,ue,de,h,l,F):C(ue,le,de,l,h,F);if(at!==void 0){if(at)continue;_e=!1;break}if(ne){if(!Hn(h,function(Ze,mt){if(!St(ne,mt)&&(ue===Ze||j(ue,Ze,b,C,F)))return ne.push(mt)})){_e=!1;break}}else if(!(ue===le||j(ue,le,b,C,F))){_e=!1;break}}return F.delete(l),F.delete(h),_e}function gr(l,h,b,C,j,F,W){switch(b){case L:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case D:return!(l.byteLength!=h.byteLength||!F(new Qn(l),new Qn(h)));case u:case p:case x:return eo(+l,+h);case g:return l.name==h.name&&l.message==h.message;case V:case I:return l==h+"";case m:var q=Pn;case O:var te=C&s;if(q||(q=qe),l.size!=h.size&&!te)return!1;var Q=W.get(l);if(Q)return Q==h;C|=a,W.set(l,h);var de=dn(q(l),q(h),C,j,F,W);return W.delete(l),de;case G:if(sn)return sn.call(l)==sn.call(h)}return!1}function _r(l,h,b,C,j,F){var W=b&s,q=ht(l),te=q.length,Q=ht(h),de=Q.length;if(te!=de&&!W)return!1;for(var _e=te;_e--;){var ne=q[_e];if(!(W?ne in h:ke.call(h,ne)))return!1}var ue=F.get(l);if(ue&&F.get(h))return ue==h;var le=!0;F.set(l,h),F.set(h,l);for(var at=W;++_e<te;){ne=q[_e];var Ze=l[ne],mt=h[ne];if(C)var va=W?C(mt,Ze,ne,h,l,F):C(Ze,mt,ne,l,h,F);if(!(va===void 0?Ze===mt||j(Ze,mt,b,C,F):va)){le=!1;break}at||(at=ne=="constructor")}if(le&&!at){var ao=l.constructor,so=h.constructor;ao!=so&&"constructor"in l&&"constructor"in h&&!(typeof ao=="function"&&ao instanceof ao&&typeof so=="function"&&so instanceof so)&&(le=!1)}return F.delete(l),F.delete(h),le}function ht(l){return cn(l,pn,yr)}function Oe(l,h){var b=l.__data__;return wr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Je(l,h){var b=Zt(l,h);return pr(b)?b:void 0}function Xe(l){var h=ke.call(l,Ve),b=l[Ve];try{l[Ve]=void 0;var C=!0}catch{}var j=Gn.call(l);return C&&(h?l[Ve]=b:delete l[Ve]),j}var yr=Dt?function(l){return l==null?[]:(l=Object(l),zn(Dt(l),function(h){return Ot.call(l,h)}))}:Br,Ge=pt;(nn&&Ge(new nn(new ArrayBuffer(1)))!=L||ft&&Ge(new ft)!=m||on&&Ge(on.resolve())!=S||rn&&Ge(new rn)!=O||an&&Ge(new an)!=re)&&(Ge=function(l){var h=pt(l),b=h==_?l.constructor:void 0,C=b?pe(b):"";if(C)switch(C){case Yn:return L;case Ke:return m;case Po:return S;case qo:return O;case Wo:return re}return h});function br(l,h){return h=h??i,!!h&&(typeof l=="number"||Rn.test(l))&&l>-1&&l%1==0&&l<h}function wr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function kr(l){return!!Wn&&Wn in l}function Er(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||ct;return l===b}function vn(l){return Gn.call(l)}function pe(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l,h){return l===h||l!==l&&h!==h}var to=Xn(function(){return arguments}())?Xn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Ot.call(l,"callee")},At=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!no(l)}var jt=tn||Sr;function xr(l,h){return Zn(l,h)}function no(l){if(!oo(l))return!1;var h=pt(l);return h==B||h==y||h==f||h==E}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function oo(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function Qe(l){return l!=null&&typeof l=="object"}var ro=Jt?Uo(Jt):hr;function pn(l){return un(l)?ur(l):mr(l)}function Br(){return[]}function Sr(){return!1}o.exports=xr}(Nn,Nn.exports);var Qa=Nn.exports,Ao={},Ya=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ao,"__esModule",{value:!0});var Gf=Ya(Ga),Qf=Ya(Qa),jo;(function(o){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Gf.default(i);c||(d=Object.keys(d).reduce(function(u,p){return d[p]!=null&&(u[p]=d[p]),u},{}));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}o.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 Qf.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}o.diff=n;function r(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)}o.invert=r;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,u){return a[u]===void 0&&(f[u]=i[u]),f},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(jo||(jo={})),Ao.default=jo;var Fn={},An={},Ka;function Yf(){if(Ka)return An;Ka=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});var t=o(Xa()),n=function(){function r(s){this.ops=s,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.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}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},r.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"},r.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[]},r}();return An.default=n,An}var Ja;function Xa(){if(Ja)return Fn;Ja=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fn,"__esModule",{value:!0});var t=o(Yf()),n;return function(r){function s(i){return new t.default(i)}r.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}r.length=a}(n||(n={})),Fn.default=n,Fn}var Gt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},jn=Gt(Wf),Kf=Gt(Ga),Ro=Gt(Qa),Qt=Gt(Ao),se=Gt(Xa()),Jf="\0",Xf=function(){function o(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return o.prototype.insert=function(t,n){var r={};return typeof t=="string"&&t.length===0?this:(r.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},o.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},o.prototype.retain=function(t,n){if(t<=0)return this;var r={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},o.prototype.push=function(t){var n=this.ops.length,r=this.ops[n-1];if(t=Kf.default(t),typeof r=="object"){if(typeof t.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+t.delete},this;if(typeof r.delete=="number"&&t.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(t),this;if(Ro.default(t.attributes,r.attributes)){if(typeof t.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.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},o.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},o.prototype.filter=function(t){return this.ops.filter(t)},o.prototype.forEach=function(t){this.ops.forEach(t)},o.prototype.map=function(t){return this.ops.map(t)},o.prototype.partition=function(t){var n=[],r=[];return this.forEach(function(s){var a=t(s)?n:r;a.push(s)}),[n,r]},o.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},o.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+se.default.length(n):n.delete?t-n.delete:t},0)},o.prototype.length=function(){return this.reduce(function(t,n){return t+se.default.length(n)},0)},o.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var r=[],s=se.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),r.push(i)),a+=se.default.length(i)}return new o(r)},o.prototype.compose=function(t){var n=se.default.iterator(this.ops),r=se.default.iterator(t.ops),s=[],a=r.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&&r.next(a.retain-i)}for(var c=new o(s);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")c.push(r.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),r.peekLength()),f=n.next(d),u=r.next(d);if(typeof u.retain=="number"){var p={};typeof f.retain=="number"?p.retain=d:p.insert=f.insert;var g=Qt.default.compose(f.attributes,u.attributes,typeof f.retain=="number");if(g&&(p.attributes=g),c.push(p),!r.hasNext()&&Ro.default(c.ops[c.ops.length-1],p)){var B=new o(n.rest());return c.concat(B).chop()}}else typeof u.delete=="number"&&typeof f.retain=="number"&&c.push(u)}return c.chop()},o.prototype.concat=function(t){var n=new o(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},o.prototype.diff=function(t,n){if(this.ops===t.ops)return new o;var r=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Jf;var u=d===t?"on":"with";throw new Error("diff() called "+u+" non-document")}).join("")}),s=new o,a=jn.default(r[0],r[1],n),i=se.default.iterator(this.ops),c=se.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var u=0;switch(d[0]){case jn.default.INSERT:u=Math.min(c.peekLength(),f),s.push(c.next(u));break;case jn.default.DELETE:u=Math.min(f,i.peekLength()),i.next(u),s.delete(u);break;case jn.default.EQUAL:u=Math.min(i.peekLength(),c.peekLength(),f);var p=i.next(u),g=c.next(u);Ro.default(p.insert,g.insert)?s.retain(u,Qt.default.diff(p.attributes,g.attributes)):s.push(g).delete(u);break}f-=u}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
7
+ `);for(var r=se.default.iterator(this.ops),s=new o,a=0;r.hasNext();){if(r.peekType()!=="insert")return;var i=r.peek(),c=se.default.length(i)-r.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(r.next());else if(d>0)s.push(r.next(d));else{if(t(s,r.next(1).attributes||{},a)===!1)return;a+=1,s=new o}}s.length()>0&&t(s,{},a)},o.prototype.invert=function(t){var n=new o;return this.reduce(function(r,s){if(s.insert)n.delete(se.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),r+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(r,r+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(se.default.length(c),Qt.default.invert(s.attributes,c.attributes))}),r+a}}return r},0),n.chop()},o.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var r=t,s=se.default.iterator(this.ops),a=se.default.iterator(r.ops),i=new o;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(se.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,Qt.default.transform(d.attributes,f.attributes,n))}return i.chop()},o.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var r=se.default.iterator(this.ops),s=0;r.hasNext()&&s<=t;){var a=r.peekLength(),i=r.peekType();if(r.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},o.Op=se.default,o.AttributeMap=Qt.default,o}(),Zf=Xf;const vf=ra(Zf);/*!
8
8
  * VueQuill @vueup/vue-quill v1.2.0
9
9
  * https://vueup.github.io/vue-quill/
10
10
  *
@@ -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 va={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"]]},tp=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:o=>["delta","html","text"].includes(o)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:o=>["snow","bubble",""].includes(o)},toolbar:{type:[String,Array,Object],required:!1,validator:o=>typeof o=="string"&&o!==""?o.charAt(0)==="#"?!0:Object.keys(va).indexOf(o)!==-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:(o,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,r;const s=e.ref(),a=()=>{var D;if(s.value){if(r=i(),o.modules)if(Array.isArray(o.modules))for(const U of o.modules)mn.register(`modules/${U.name}`,U.module);else mn.register(`modules/${o.modules.name}`,o.modules.module);n=new mn(s.value,r),B(o.content),n.on("text-change",h),n.on("selection-change",E),n.on("editor-change",y),o.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),o.theme!=="snow"&&s.value.classList.remove("ql-snow"),(D=n.getModule("toolbar"))===null||D===void 0||D.container.addEventListener("mousedown",U=>{U.preventDefault()}),t.emit("ready",n)}},i=()=>{const D={};if(o.theme!==""&&(D.theme=o.theme),o.readOnly&&(D.readOnly=o.readOnly),o.placeholder&&(D.placeholder=o.placeholder),o.toolbar&&o.toolbar!==""&&(D.modules={toolbar:(()=>{if(typeof o.toolbar=="object")return o.toolbar;if(typeof o.toolbar=="string")return o.toolbar.charAt(0)==="#"?o.toolbar:va[o.toolbar]})()}),o.modules){const U=(()=>{var X,Se;const Pe={};if(Array.isArray(o.modules))for(const Ye of o.modules)Pe[Ye.name]=(X=Ye.options)!==null&&X!==void 0?X:{};else Pe[o.modules.name]=(Se=o.modules.options)!==null&&Se!==void 0?Se:{};return Pe})();D.modules=Object.assign({},D.modules,U)}return Object.assign({},o.globalOptions,o.options,D)},c=D=>typeof D=="object"&&D?D.slice():D,d=D=>Object.values(D.ops).some(U=>!U.retain||Object.keys(U).length!==1);let u;const f=D=>{if(typeof u==typeof D){if(D===u)return!0;if(typeof D=="object"&&D&&typeof u=="object"&&u)return!d(u.diff(D))}return!1},h=(D,U,X)=>{u=c(g()),f(o.content)||t.emit("update:content",u),t.emit("textChange",{delta:D,oldContents:U,source:X})},_=e.ref(),E=(D,U,X)=>{_.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:D,oldRange:U,source:X})};e.watch(_,D=>{D?t.emit("focus",s):t.emit("blur",s)});const y=(...D)=>{D[0]==="text-change"&&t.emit("editorChange",{name:D[0],delta:D[1],oldContents:D[2],source:D[3]}),D[0]==="selection-change"&&t.emit("editorChange",{name:D[0],range:D[1],oldRange:D[2],source:D[3]})},m=()=>s.value,x=()=>{var D;return(D=n==null?void 0:n.getModule("toolbar"))===null||D===void 0?void 0:D.container},k=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
17
+ */const Za={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"]]},ep=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:o=>["delta","html","text"].includes(o)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:o=>["snow","bubble",""].includes(o)},toolbar:{type:[String,Array,Object],required:!1,validator:o=>typeof o=="string"&&o!==""?o.charAt(0)==="#"?!0:Object.keys(Za).indexOf(o)!==-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:(o,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,r;const s=e.ref(),a=()=>{var D;if(s.value){if(r=i(),o.modules)if(Array.isArray(o.modules))for(const L of o.modules)hn.register(`modules/${L.name}`,L.module);else hn.register(`modules/${o.modules.name}`,o.modules.module);n=new hn(s.value,r),S(o.content),n.on("text-change",p),n.on("selection-change",B),n.on("editor-change",y),o.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),o.theme!=="snow"&&s.value.classList.remove("ql-snow"),(D=n.getModule("toolbar"))===null||D===void 0||D.container.addEventListener("mousedown",L=>{L.preventDefault()}),t.emit("ready",n)}},i=()=>{const D={};if(o.theme!==""&&(D.theme=o.theme),o.readOnly&&(D.readOnly=o.readOnly),o.placeholder&&(D.placeholder=o.placeholder),o.toolbar&&o.toolbar!==""&&(D.modules={toolbar:(()=>{if(typeof o.toolbar=="object")return o.toolbar;if(typeof o.toolbar=="string")return o.toolbar.charAt(0)==="#"?o.toolbar:Za[o.toolbar]})()}),o.modules){const L=(()=>{var X,Se;const Pe={};if(Array.isArray(o.modules))for(const Ye of o.modules)Pe[Ye.name]=(X=Ye.options)!==null&&X!==void 0?X:{};else Pe[o.modules.name]=(Se=o.modules.options)!==null&&Se!==void 0?Se:{};return Pe})();D.modules=Object.assign({},D.modules,L)}return Object.assign({},o.globalOptions,o.options,D)},c=D=>typeof D=="object"&&D?D.slice():D,d=D=>Object.values(D.ops).some(L=>!L.retain||Object.keys(L).length!==1);let f;const u=D=>{if(typeof f==typeof D){if(D===f)return!0;if(typeof D=="object"&&D&&typeof f=="object"&&f)return!d(f.diff(D))}return!1},p=(D,L,X)=>{f=c(_()),u(o.content)||t.emit("update:content",f),t.emit("textChange",{delta:D,oldContents:L,source:X})},g=e.ref(),B=(D,L,X)=>{g.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:D,oldRange:L,source:X})};e.watch(g,D=>{D?t.emit("focus",s):t.emit("blur",s)});const y=(...D)=>{D[0]==="text-change"&&t.emit("editorChange",{name:D[0],delta:D[1],oldContents:D[2],source:D[3]}),D[0]==="selection-change"&&t.emit("editorChange",{name:D[0],range:D[1],oldRange:D[2],source:D[3]})},m=()=>s.value,x=()=>{var D;return(D=n==null?void 0:n.getModule("toolbar"))===null||D===void 0?void 0:D.container},k=()=>{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.`},g=(D,U)=>o.contentType==="html"?O():o.contentType==="text"?S(D,U):n==null?void 0:n.getContents(D,U),B=(D,U="api")=>{const X=D||(o.contentType==="delta"?new ep:"");o.contentType==="html"?M(X):o.contentType==="text"?C(X,U):n==null||n.setContents(X,U),u=c(X)},S=(D,U)=>{var X;return(X=n==null?void 0:n.getText(D,U))!==null&&X!==void 0?X:""},C=(D,U="api")=>{n==null||n.setText(D,U)},O=()=>{var D;return(D=n==null?void 0:n.root.innerHTML)!==null&&D!==void 0?D:""},M=D=>{n&&(n.root.innerHTML=D)},A=(D,U="api")=>{const X=n==null?void 0:n.clipboard.convert(D);X&&(n==null||n.setContents(X,U))},ne=()=>{n==null||n.focus()},J=()=>{e.nextTick(()=>{var D;!t.slots.toolbar&&n&&((D=n.getModule("toolbar"))===null||D===void 0||D.container.remove()),a()})};return e.watch(()=>o.content,D=>{if(!n||!D||f(D))return;const U=n.getSelection();U&&e.nextTick(()=>n==null?void 0:n.setSelection(U)),B(D)},{deep:!0}),e.watch(()=>o.enable,D=>{n&&n.enable(D)}),{editor:s,getEditor:m,getToolbar:x,getQuill:k,getContents:g,setContents:B,getHTML:O,setHTML:M,pasteHTML:A,focus:ne,getText:S,setText:C,reinit:J}},render(){var o,t;return[(t=(o=this.$slots).toolbar)===null||t===void 0?void 0:t.call(o),e.h("div",{ref:"editor",...this.$attrs})]}}),np=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",props:{field:Object},setup(o){const t=o,n=e.computed(()=>t.field.maxImageCounts),r=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],s=[!1,"16px","18px","20px","22px","26px","28px","30px"],a=Rt.default.imports["formats/size"];a.whitelist=s;const i=Rt.default.imports["formats/font"];i.whitelist=r,Rt.default.register(i,!0);const c=Rt.imports["attributors/style/align"];c.whitelist=["right","center","justify"],Rt.default.register(c,!0);const d=e.ref(),u={container:[[{font:r}],[{size:s}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],handlers:{image:function(){const h=(m,x)=>(m.match(new RegExp(x,"g"))||[]).length,_=d.value.content,E=_?h(_,"<img "):0;if(E>=n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}const y=document.createElement("input");y.setAttribute("type","file"),y.setAttribute("accept","image/*"),y.setAttribute("multiple",!0),y.click(),y.onchange=()=>{const m=y.files;if(m.length+E>n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}for(const k of m)if(k.size<5242880)f(k);else return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1}}}};function f(h){const _=new FormData;return _.append("image",h),new Promise((E,y)=>{v.post(et().imageUploadUrl,_,{}).then(m=>{const x=m.data.data.imageUrl,k=d.value.getQuill(),g=k.getSelection().index;k.insertEmbed(g,"image",x),k.setSelection(g+1),E(m)}).catch(m=>{console.log("图片上传失败。",m),y("图片上传失败。")})})}return(h,_)=>(e.openBlock(),e.createBlock(e.unref(tp),{ref_key:"quillEditor",ref:d,toolbar:u,"content-type":"html"},null,512))}}},Symbol.toStringTag,{value:"Module"}));H.BaseLayout=ed,H.DashboardPage=Ii,H.DashboardRow=Mi,H.DataTablePage=To,H.Detail=Ia,H.DetailTab=Ed,H.EmptyTip=fe,H.FormEditor=Vn,H.ImagesUploader=wa,H.List=ja,H.RowActionFormEditor=Fl,H.Statistic=pa,H.StatisticCard=Fi,H.Widget=fa,H.auth=Ci,H.defineDomain=ua,H.getBtns=Ht,H.getConfig=et,H.getDomainConfig=Pt,H.http=he,H.rest=wi,H.setupAppConfig=xi,H.setupDomainConfigLoader=Bi,H.useDataTableStore=Fe,H.useRouteHistoryStore=On,H.useTableFilterStore=kt,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
19
+ or use v-on:ready="onReady(quill)" event instead.`},_=(D,L)=>o.contentType==="html"?O():o.contentType==="text"?E(D,L):n==null?void 0:n.getContents(D,L),S=(D,L="api")=>{const X=D||(o.contentType==="delta"?new vf:"");o.contentType==="html"?I(X):o.contentType==="text"?V(X,L):n==null||n.setContents(X,L),f=c(X)},E=(D,L)=>{var X;return(X=n==null?void 0:n.getText(D,L))!==null&&X!==void 0?X:""},V=(D,L="api")=>{n==null||n.setText(D,L)},O=()=>{var D;return(D=n==null?void 0:n.root.innerHTML)!==null&&D!==void 0?D:""},I=D=>{n&&(n.root.innerHTML=D)},G=(D,L="api")=>{const X=n==null?void 0:n.clipboard.convert(D);X&&(n==null||n.setContents(X,L))},K=()=>{n==null||n.focus()},re=()=>{e.nextTick(()=>{var D;!t.slots.toolbar&&n&&((D=n.getModule("toolbar"))===null||D===void 0||D.container.remove()),a()})};return e.watch(()=>o.content,D=>{if(!n||!D||u(D))return;const L=n.getSelection();L&&e.nextTick(()=>n==null?void 0:n.setSelection(L)),S(D)},{deep:!0}),e.watch(()=>o.enable,D=>{n&&n.enable(D)}),{editor:s,getEditor:m,getToolbar:x,getQuill:k,getContents:_,setContents:S,getHTML:O,setHTML:I,pasteHTML:G,focus:K,getText:E,setText:V,reinit:re}},render(){var o,t;return[(t=(o=this.$slots).toolbar)===null||t===void 0?void 0:t.call(o),e.h("div",{ref:"editor",...this.$attrs})]}}),tp=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",props:{field:Object},setup(o){const t=o,n=e.computed(()=>t.field.maxImageCounts),r=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],s=[!1,"16px","18px","20px","22px","26px","28px","30px"],a=Rt.default.imports["formats/size"];a.whitelist=s;const i=Rt.default.imports["formats/font"];i.whitelist=r,Rt.default.register(i,!0);const c=Rt.imports["attributors/style/align"];c.whitelist=["right","center","justify"],Rt.default.register(c,!0);const d=e.ref(),f={container:[[{font:r}],[{size:s}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],handlers:{image:function(){const p=(m,x)=>(m.match(new RegExp(x,"g"))||[]).length,g=d.value.content,B=g?p(g,"<img "):0;if(B>=n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}const y=document.createElement("input");y.setAttribute("type","file"),y.setAttribute("accept","image/*"),y.setAttribute("multiple",!0),y.click(),y.onchange=()=>{const m=y.files;if(m.length+B>n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}for(const k of m)if(k.size<5242880)u(k);else return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1}}}};function u(p){const g=new FormData;return g.append("image",p),new Promise((B,y)=>{v.post(et().imageUploadUrl,g,{}).then(m=>{const x=m.data.data.imageUrl,k=d.value.getQuill(),_=k.getSelection().index;k.insertEmbed(_,"image",x),k.setSelection(_+1),B(m)}).catch(m=>{console.log("图片上传失败。",m),y("图片上传失败。")})})}return(p,g)=>(e.openBlock(),e.createBlock(e.unref(ep),{ref_key:"quillEditor",ref:d,toolbar:f,"content-type":"html"},null,512))}}},Symbol.toStringTag,{value:"Module"}));H.BaseLayout=Zc,H.DashboardPage=ji,H.DashboardRow=Ri,H.DataTablePage=Do,H.Detail=Ra,H.DetailTab=kd,H.EmptyTip=fe,H.FormEditor=Cn,H.ImagesUploader=ba,H.List=Aa,H.RowActionFormEditor=Tl,H.Statistic=fa,H.StatisticCard=Ti,H.Widget=ua,H.defineDomain=da,H.getConfig=et,H.getDomainConfig=Ht,H.http=he,H.rest=bi,H.setupAppConfig=Ei,H.setupDomainConfigLoader=xi,H.useDataTableStore=Fe,H.useRouteHistoryStore=$n,H.useTableFilterStore=kt,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
20
20
  //# sourceMappingURL=kouxiangtang.umd.cjs.map