kouxiangtang 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AttachmentUploader-Brnkv4Ue.js → AttachmentUploader-Cfi4nzhH.js} +2 -2
- package/dist/{AttachmentUploader-Brnkv4Ue.js.map → AttachmentUploader-Cfi4nzhH.js.map} +1 -1
- package/dist/{ImageUploader-Bcq8TlEE.js → ImageUploader-D2k-oBBx.js} +2 -2
- package/dist/{ImageUploader-Bcq8TlEE.js.map → ImageUploader-D2k-oBBx.js.map} +1 -1
- package/dist/{ImagesUploader-BTzJYe95.js → ImagesUploader-Bml_7F6f.js} +2 -2
- package/dist/{ImagesUploader-BTzJYe95.js.map → ImagesUploader-Bml_7F6f.js.map} +1 -1
- package/dist/{RichTextEditor-D1Svdb--.js → RichTextEditor-D54TLFvG.js} +2 -2
- package/dist/{RichTextEditor-D1Svdb--.js.map → RichTextEditor-D54TLFvG.js.map} +1 -1
- package/dist/{config-B0VKfmRK.js → config-BWOjMXBy.js} +3 -2
- package/dist/config-BWOjMXBy.js.map +1 -0
- package/dist/{config-TWXmiDAM.js → config-BdbwfwTI.js} +3 -3
- package/dist/{config-TWXmiDAM.js.map → config-BdbwfwTI.js.map} +1 -1
- package/dist/{config-B19xgOT9.js → config-BmbZ0D9E.js} +2 -2
- package/dist/{config-B19xgOT9.js.map → config-BmbZ0D9E.js.map} +1 -1
- package/dist/{config-DktlSgEx.js → config-C4mGxPnB.js} +2 -2
- package/dist/{config-DktlSgEx.js.map → config-C4mGxPnB.js.map} +1 -1
- package/dist/{config-D_0aPsPz.js → config-CTnDRNfX.js} +2 -2
- package/dist/{config-D_0aPsPz.js.map → config-CTnDRNfX.js.map} +1 -1
- package/dist/{config-Dr8Xs5JQ.js → config-CUVUBfui.js} +2 -2
- package/dist/{config-Dr8Xs5JQ.js.map → config-CUVUBfui.js.map} +1 -1
- package/dist/{config-CM9qQRZE.js → config-CdPeE26g.js} +3 -3
- package/dist/{config-CM9qQRZE.js.map → config-CdPeE26g.js.map} +1 -1
- package/dist/{config-DR8gzogi.js → config-CgkvJlUP.js} +2 -2
- package/dist/{config-DR8gzogi.js.map → config-CgkvJlUP.js.map} +1 -1
- package/dist/{config-B_CZxFcW.js → config-Crrpr3JJ.js} +2 -2
- package/dist/{config-B_CZxFcW.js.map → config-Crrpr3JJ.js.map} +1 -1
- package/dist/{config-CkxQIK9Y.js → config-CyUD7MsL.js} +3 -3
- package/dist/{config-CkxQIK9Y.js.map → config-CyUD7MsL.js.map} +1 -1
- package/dist/{config-j78kMQ9X.js → config-D6HR2Oe6.js} +2 -2
- package/dist/{config-j78kMQ9X.js.map → config-D6HR2Oe6.js.map} +1 -1
- package/dist/{config-L6xEqYT2.js → config-DRva4F7g.js} +2 -2
- package/dist/{config-L6xEqYT2.js.map → config-DRva4F7g.js.map} +1 -1
- package/dist/{config-CsQquyvZ.js → config-DSO4tGAI.js} +2 -2
- package/dist/{config-CsQquyvZ.js.map → config-DSO4tGAI.js.map} +1 -1
- package/dist/{config-Cz3IlexC.js → config-DUcTdXQr.js} +2 -2
- package/dist/{config-Cz3IlexC.js.map → config-DUcTdXQr.js.map} +1 -1
- package/dist/{config-CeLnzruT.js → config-DVW0_Ylz.js} +2 -2
- package/dist/{config-CeLnzruT.js.map → config-DVW0_Ylz.js.map} +1 -1
- package/dist/{config-CfWP8FgI.js → config-DvAWdn80.js} +2 -2
- package/dist/{config-CfWP8FgI.js.map → config-DvAWdn80.js.map} +1 -1
- package/dist/{config-BwjRb0vQ.js → config-Pp5Cwsgj.js} +2 -2
- package/dist/{config-BwjRb0vQ.js.map → config-Pp5Cwsgj.js.map} +1 -1
- package/dist/{config-8_x6lPOx.js → config-QlFAtwW6.js} +2 -2
- package/dist/{config-8_x6lPOx.js.map → config-QlFAtwW6.js.map} +1 -1
- package/dist/{config-BZ3r8Jzk.js → config-eyl5FFbh.js} +2 -2
- package/dist/{config-BZ3r8Jzk.js.map → config-eyl5FFbh.js.map} +1 -1
- package/dist/{config-CgEOUJuy.js → config-iR9CIDY4.js} +2 -2
- package/dist/{config-CgEOUJuy.js.map → config-iR9CIDY4.js.map} +1 -1
- package/dist/{index-KIPPBvdZ.js → index-CWOOLK5w.js} +3 -3
- package/dist/{index-KIPPBvdZ.js.map → index-CWOOLK5w.js.map} +1 -1
- package/dist/kouxiangtang.js +1 -1
- package/dist/kouxiangtang.umd.cjs +1 -1
- package/dist/kouxiangtang.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/config-B0VKfmRK.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
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=Lt(i);r[c]||(Ks(s,i),r[c]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}}be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(be.prototype,({value:o},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>o,set(r){this[n]=r}}}),C.freezeMethods(be);function po(o,t){const n=this||Mt,r=t||n,s=be.from(r.headers);let a=r.data;return C.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 Ut(o,t,n){H.call(this,o??"canceled",H.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Ut,H,{__CANCEL__:!0});function Js(o,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?o(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Xs=De.hasStandardBrowserEnv?{write(o,t,n,r,s,a){const i=[o+"="+encodeURIComponent(t)];C.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),C.isString(r)&&i.push("path="+r),C.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 Zs(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function vs(o,t){return t?o.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):o}function Kr(o,t){return o&&!Zs(t)?vs(o,t):t}const ei=De.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=C.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function ti(o){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return t&&t[1]||""}function ni(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 h=Date.now(),u=r[a];i||(i=h),n[s]=d,r[s]=h;let f=a,_=0;for(;f!==s;)_+=n[f++],f=f%o;if(s=(s+1)%o,s===a&&(a=(a+1)%o),h-i<t)return;const x=u&&h-u;return x?Math.round(_*1e3/x):void 0}}function Jr(o,t){let n=0;const r=ni(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=r(c),h=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&&h?(i-a)/d:void 0,event:s};u[t?"download":"upload"]=!0,o(u)}}const ho={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 h(){o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let u;if(C.isFormData(s)){if(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((u=a.getContentType())!==!1){const[m,...k]=u?u.split(";").map(B=>B.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...k].join("; "))}}let f=new XMLHttpRequest;if(o.auth){const m=o.auth.username||"",k=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+k))}const _=Kr(o.baseURL,o.url);f.open(o.method.toUpperCase(),Hr(_,o.params,o.paramsSerializer),!0),f.timeout=o.timeout;function x(){if(!f)return;const m=be.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),B={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:o,request:f};Js(function(S){n(S),h()},function(S){r(S),h()},B),f=null}if("onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(r(new H("Request aborted",H.ECONNABORTED,o,f)),f=null)},f.onerror=function(){r(new H("Network Error",H.ERR_NETWORK,o,f)),f=null},f.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const B=o.transitional||Pr;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new H(k,B.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,o,f)),f=null},De.hasStandardBrowserEnv&&(c&&C.isFunction(c)&&(c=c(o)),c||c!==!1&&ei(_))){const m=o.xsrfHeaderName&&o.xsrfCookieName&&Xs.read(o.xsrfCookieName);m&&a.set(o.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in f&&C.forEach(a.toJSON(),function(k,B){f.setRequestHeader(B,k)}),C.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),i&&i!=="json"&&(f.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&f.addEventListener("progress",Jr(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Jr(o.onUploadProgress)),(o.cancelToken||o.signal)&&(d=m=>{f&&(r(!m||m.type?new Ut(null,o,f):m),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const b=ti(_);if(b&&De.protocols.indexOf(b)===-1){r(new H("Unsupported protocol "+b+":",H.ERR_BAD_REQUEST,o));return}f.send(s||null)})}};C.forEach(ho,(o,t)=>{if(o){try{Object.defineProperty(o,"name",{value:t})}catch{}Object.defineProperty(o,"adapterName",{value:t})}});const Xr=o=>`- ${o}`,oi=o=>C.isFunction(o)||o===null||o===!1,Zr={getAdapter:o=>{o=C.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,!oi(n)&&(r=ho[(i=String(n)).toLowerCase()],r===void 0))throw new H(`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
4
|
`+a.map(Xr).join(`
|
|
5
5
|
`):" "+Xr(a[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ho};function mo(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Ut(null,o)}function vr(o){return mo(o),o.headers=be.from(o.headers),o.data=po.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),Zr.getAdapter(o.adapter||Mt.adapter)(o).then(function(r){return mo(o),r.data=po.call(o,o.transformResponse,r),r.headers=be.from(r.headers),r},function(r){return Yr(r)||(mo(o),r&&r.response&&(r.response.data=po.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(h,u,f){return C.isPlainObject(h)&&C.isPlainObject(u)?C.merge.call({caseless:f},h,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function s(h,u,f){if(C.isUndefined(u)){if(!C.isUndefined(h))return r(void 0,h,f)}else return r(h,u,f)}function a(h,u){if(!C.isUndefined(u))return r(void 0,u)}function i(h,u){if(C.isUndefined(u)){if(!C.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function c(h,u,f){if(f in t)return r(h,u);if(f in o)return r(void 0,h)}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:(h,u)=>s(ea(h),ea(u),!0)};return C.forEach(Object.keys(Object.assign({},o,t)),function(u){const f=d[u]||s,_=f(o[u],t[u],u);C.isUndefined(_)&&f!==c||(n[u]=_)}),n}const ta="1.6.8",go={};["object","boolean","number","function","string","symbol"].forEach((o,t)=>{go[o]=function(r){return typeof r===o||"a"+(t<1?"n ":" ")+o}});const na={};go.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 H(s(i," has been removed"+(n?" in "+n:"")),H.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 ri(o,t,n){if(typeof o!="object")throw new H("options must be an object",H.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 H("option "+a+" must be "+d,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+a,H.ERR_BAD_OPTION)}}const _o={assertOptions:ri,validators:go},ve=_o.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&&_o.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&(C.isFunction(s)?n.paramsSerializer={serialize:s}:_o.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],b=>{delete a[b]}),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 h=[];this.interceptors.response.forEach(function(m){h.push(m.fulfilled,m.rejected)});let u,f=0,_;if(!d){const b=[vr.bind(this),void 0];for(b.unshift.apply(b,c),b.push.apply(b,h),_=b.length,u=Promise.resolve(n);f<_;)u=u.then(b[f++],b[f++]);return u}_=c.length;let x=n;for(f=0;f<_;){const b=c[f++],m=c[f++];try{x=b(x)}catch(k){m.call(this,k);break}}try{u=vr.call(this,x)}catch(b){return Promise.reject(b)}for(f=0,_=h.length;f<_;)u=u.then(h[f++],h[f++]);return u}getUri(t){t=_t(this.defaults,t);const n=Kr(t.baseURL,t.url);return Hr(n,t.params,t.paramsSerializer)}}C.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}))}}),C.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 yo{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 Ut(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 yo(function(s){t=s}),cancel:t}}}function ai(o){return function(n){return o.apply(null,n)}}function si(o){return C.isObject(o)&&o.isAxiosError===!0}const bo={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(bo).forEach(([o,t])=>{bo[t]=o});function oa(o){const t=new st(o),n=$r(st.prototype.request,t);return C.extend(n,st.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oa(_t(o,s))},n}const v=oa(Mt);v.Axios=st,v.CanceledError=Ut,v.CancelToken=yo,v.isCancel=Yr,v.VERSION=ta,v.toFormData=bn,v.AxiosError=H,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ai,v.isAxiosError=si,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Gr(C.isHTMLForm(o)?new FormData(o):o),v.getAdapter=Zr.getAdapter,v.HttpStatusCode=bo,v.default=v;let yt=null;function ii(o){yt=v.create(o)}function li(){return yt}async function ci(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 di(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function ui(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 fi(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:ci,post:di,put:fi,remove:ui,setupAxios:ii,getAxiosInstance:li};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 pi(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 pi=="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,k){return m===k?k:m===m.toLowerCase()?k.toLowerCase():m===m.toUpperCase()?k.toUpperCase():m[0]===m[0].toUpperCase()?k.charAt(0).toUpperCase()+k.substr(1).toLowerCase():k.toLowerCase()}function h(m,k){return m.replace(/\$(\d{1,2})/g,function(B,g){return k[g]||""})}function u(m,k){return m.replace(k[0],function(B,g){var S=h(k[1],arguments);return d(B===""?m[g-1]:B,S)})}function f(m,k,B){if(!m.length||s.hasOwnProperty(m))return k;for(var g=B.length;g--;){var S=B[g];if(S[0].test(k))return u(k,S)}return k}function _(m,k,B){return function(g){var S=g.toLowerCase();return k.hasOwnProperty(S)?d(g,S):m.hasOwnProperty(S)?d(g,m[S]):f(S,g,B)}}function x(m,k,B,g){return function(S){var E=S.toLowerCase();return k.hasOwnProperty(E)?!0:m.hasOwnProperty(E)?!1:f(E,E,B)===E}}function b(m,k,B){var g=k===1?b.singular(m):b.plural(m);return(B?k+" ":"")+g}return b.plural=_(i,a,n),b.isPlural=x(i,a,n),b.singular=_(a,i,r),b.isSingular=x(a,i,r),b.addPluralRule=function(m,k){n.push([c(m),k])},b.addSingularRule=function(m,k){r.push([c(m),k])},b.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}b.addPluralRule(m,"$0"),b.addSingularRule(m,"$0")},b.addIrregularRule=function(m,k){k=k.toLowerCase(),m=m.toLowerCase(),i[m]=k,a[k]=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 b.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 b.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 b.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(b.addUncountableRule),b})})(aa);var hi=aa.exports;const sa=ra(hi),wo=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",ko="RESTORE",ia="ENABLE",mi=[kn,En,xn,Bn,bt,ia];class gi{constructor(t,n,r=mi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.operations=r,this.operations.forEach(s=>{const a=wo(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(ko)){console.log(`${this.side}/${this.domain} 不支持 ${ko} 操作`);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 _i{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 yi={Client:gi,ReadOnlyClient:_i,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:ko,ENABLE:ia},bi=(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.":""))))})},wi=["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}computeWidth(t){return t.width?t.width:wi.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 Eo={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 bi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>pd),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>yd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>xd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>Vd),"./field/component/config.js":()=>Promise.resolve().then(()=>Td),"./field/date/config.js":()=>Promise.resolve().then(()=>jd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Ud),"./field/image/config.js":()=>Promise.resolve().then(()=>Yd),"./field/images/config.js":()=>Promise.resolve().then(()=>nu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>iu),"./field/json/config.js":()=>Promise.resolve().then(()=>uu),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>$u),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Au),"./field/row-id/config.js":()=>Promise.resolve().then(()=>ju),"./field/select/config.js":()=>Promise.resolve().then(()=>Uu),"./field/string/config.js":()=>Promise.resolve().then(()=>Qu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Zu),"./field/text/config.js":()=>Promise.resolve().then(()=>of),"./field/time/config.js":()=>Promise.resolve().then(()=>cf),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>pf)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function xo(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(Eo).includes(r.type)){const s=Eo[r.type];return s.deprecated&&la(r.domain||t,r.code,s.deprecated),ca(Eo[r.type].config,r,r.domain||t)}return ca("string",r,r.domain||t)})}let Bo={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function ki(o){Bo={...Bo,...o},wt=o.domainConfigs}function Ei(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 zt(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 h;return((h=d.childrenFields)==null?void 0:h.length)>0?Promise.all(d.childrenFields).then(u=>(d.childrenFields=u,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class xi{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=xo(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:xo(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))}wrapFields(t,n){return xo(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${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 xi(o,t)}const R=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},Bi={class:"card-header"},Si={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",Bi,[e.createElementVNode("span",Si,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-0f4cee53"]]),$i={key:0},Ci={key:1},Vi={key:0},Oi={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",Ci,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Vi,[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",Oi,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={},Di={style:{padding:"20px 0"}};function Ai(o,t){return e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(o.$slots,"default")])}const Fi=R(Ni,[["render",Ai]]),ji=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"]]);function K(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=wo(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Ri(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=>Ri(t))}const Ii={key:0,class:"classify-wrap"},Mi=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 h;return!((h=d.code)!=null&&h.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 h;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):(h=c[u+1])!=null&&h.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 h,u,f;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(h=r(d.field))!=null&&h.wholeRow?24:((u=c.cols)==null?void 0:u.length)==1&&!((f=d.field)!=null&&f.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var _,x;return[(_=d.field)!=null&&_.includes("classify")&&((x=r(d.field))!=null&&x.label)?(e.openBlock(),e.createElementBlock("div",Ii,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"]]),Li={style:{width:"100%"}},Ui={class:"footer"},zi={key:1},Hi=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=K(n),s=t,a=e.ref(!1),i=o,c=$o(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},h=e.reactive({...i.data}),u=e.ref(null),f=i.config.fields.filter(E=>E.rules).reduce((E,V)=>(E[V.code]=b(V.rules),E),{}),_=e.computed(S),x=e.computed(()=>i.config.fields.filter(E=>{const V=E.editable(h,r),O=E.visible(h,r);return E.disabled=O&&!V,V||O}));function b(E){return typeof E=="object"?E:typeof E=="function"?E(h):[]}function m(E){a.value=!0,s("submit",E,h,()=>{a.value=!1})}async function k(){await u.value.validate(async(E,V)=>{var G,Y;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={...h};if(O&&(I[O]=(Y=I[O])==null?void 0:Y.map(re=>re.id)),i.config.submitConfirm){await i.config.submitConfirm(I)&&m(I);return}m(I)})}function B(){s("remove",h)}function g(){if(i.config.removeConfirm){i.config.removeConfirm(h,B);return}w.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{B()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(r,h):!0}return e.watch(()=>({...h}),(E,V)=>{const I=Object.keys(E).filter(Y=>V[Y]!==E[Y]).map(Y=>{var re;return(re=u.value)==null||re.clearValidate(Y),{field:Y,newValue:E[Y],oldValue:V[Y]}});x.value.filter(Y=>!Y.disabled).forEach(Y=>{Y.formChange&&Y.formChange(h,I)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(V=>{h[V]=E[V]})},{immediate:!0}),(E,V)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:u,model:h,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(Mi,{layout:e.unref(c),fields:x.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",Li,[O!=null&&O.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.editor),{key:0,modelValue:h[O.code],"onUpdate:modelValue":I=>h[O.code]=I,field:O,disabled:O.disabled,"form-data":h,"domain-config":i.config,row:h},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",Ui,[h.id&&!h.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",type:"danger",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",zi)),_.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"]))}},[["__scopeId","data-v-5b84d1ad"]]);function qi(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const Ht={getValue:qi},Sn={__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=K(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:h.value})),d=e.computed(()=>a.config.fields.filter(m=>{var k;if(!((k=m.code)!=null&&k.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),h=e.ref(""),u=e.computed({get(){return a.modelValue},set(b){s("update:modelValue",b)}}),f=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function _(b,m,k){i.value=m,s("submit",b,async()=>{h.value=await Ht.getValue(),k()})}function x(b,m){s("remove",b,async()=>{h.value=await Ht.getValue(),m()})}return e.watch(()=>u,async()=>{h.value=await Ht.getValue()},{immediate:!0}),(b,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=k=>u.value=k),width:d.value,top:"20px",title:f.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3},{default:e.withCtx(()=>[e.createVNode(Hi,{config:a.config,data:c.value,removable:a.removable,onSubmit:_,onRemove:x},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Pi={__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=K(a),c=e.computed(()=>{const f=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},...f}}),d=da("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:c.value});Promise.all(d.fields).then(f=>{d.fields=f,d.restRepeat=t.restRepeat,d.rest=t.rest,d.formStyleConfig=c.value,s.value=d});async function h(){const f=t.rest;if(f!=null&&f.getOne){const{data:_}=await f.getOne({...t.row,...i});n.value=_}r.value=!0}function u(f,_){t.onSubmit(f,_).then(()=>{r.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),_()})}return(f,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),r.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=x=>r.value=x),title:t.text,config:s.value,data:n.value,onSubmit:u},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Wi={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",Wi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-426c7d45"]]),pa={__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(()=>gf)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(u){let f=-1;u.id&&(f=i.value.findIndex(_=>_.id===u.id)),u.url&&(f=i.value.findIndex(_=>_.url===u.url)),f>=0&&(i.value.splice(f,1),s("update:modelValue",i.value))}function h(u){console.log(u),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,u).then(f=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const _=c(f.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}),(u,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:h,onOnRemove:d},null,8,["images","props"])]))}},Ae=Te.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()}}}),qt=(o,t,n,r)=>Te.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Gi(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Co(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Co(o,t,this.filters)}}});function Gi(o,t,n,r,s){let i={...Qi(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Co(o,t,i)}function Qi(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 Co(o,t,n){const r=`filters---${t}---${o}`,s=Yi(n);return localStorage.setItem(r,JSON.stringify(s)),s}function Yi(o){return Object.keys(o).filter(t=>o[t]!=null&&o[t]!=null&&o[t]!="").reduce((t,n)=>(t[n]=o[n],t),{})}const Ki={class:"sorters-box"},Ji=["onClick"],Xi={class:"sorters-label"},Zi={class:"sorters-arrow-box"},vi=["onClick"],el=["onClick"],tl=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 h=s.value[d];for(let u=0;u<r.value.length;u++){const f=r.value[u];h.field===f.field&&(h.order=f.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,h){const u=s.value;h?u[d].order=h: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(f=>f.order))}return(d,h)=>(e.openBlock(),e.createElementBlock("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:_=>c(f,"")},[e.createElementVNode("div",Xi,e.toDisplayString(u.name),1),e.createElementVNode("div",Zi,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",u.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(_=>c(f,"ASC"),["stop"])},null,10,vi),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",u.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(_=>c(f,"DESC"),["stop"])},null,10,el)])],8,Ji))),256))]))}},[["__scopeId","data-v-9eb39193"]]),nl={class:"ranges-box"},ol={class:"range-item"},rl={class:"range-label"},al={class:"range-input-box"},sl=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,h){const u=[...s];u.forEach(f=>{f.field===d&&(f[h]=c)}),n("updateRanges",u.filter(f=>f.min||f.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,h=>(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",rl,e.toDisplayString(h.name),1),e.createElementVNode("div",al,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.min,"onUpdate:modelValue":u=>h.min=u,"controls-position":"right",class:"input-box",onChange:u=>{i(u,h.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.max,"onUpdate:modelValue":u=>h.max=u,"controls-position":"right",class:"input-box",type:"number",onChange:u=>{i(u,h.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-852a7796"]]),il={key:0},ll=R({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=U.useRoute(),s=K(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=qt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((g,S)=>{S.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(E=>{i[E]=void 0}),i.isDeleted=S.filters.isDeleted)});function h(g){return typeof g=="boolean"?g:typeof g=="function"?g(s):!0}async function u(g,S){var E;if(typeof g.options=="function")c[g.code]=await g.options(i,s,S);else if(Array.isArray(g.options))c[g.code]=g.options;else if(typeof g.options=="object"){const V=g.options.getOneUrl?g.options.getOneUrl:g.options.url;if(!S&&Array.isArray(i[g.code])&&i[g.code].length>0)c[g.code]=[],i[g.code].forEach(O=>{V.getOne({id:O}).then(I=>{c[g.code].push({code:I.data[g.options.data.value]||I.data.id,name:I.data[g.options.data.label]||I.data.name})})});else if(!S&&!Array.isArray(i[g.code])&&i[g.code])V.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(),I=g.options.method?g.options.method:"getList";g.options.url[I]({...g.options.query,[O]:S}).then(G=>{c[g.code]=G.data.rows.map(Y=>({code:Y[g.options.data.value]||Y.id,name:Y[g.options.data.label]||Y.name}))})}}if(c[g.code]&&g.type!="tree-select"){const V=c[g.code].map(O=>O.code);i[g.code]&&(g.multiple?i[g.code]=i[g.code].filter(O=>(console.log(V.includes(O)),V.includes(O))):i[g.code]=(E=c[g.code].find(O=>O.code==i[g.code]))==null?void 0:E.code,k())}}function f(g){if(g.remote)return S=>{u(g,S)}}function _(g){i.sorters=g,k()}function x(g){i.filters=g}function b(){Object.keys(i).forEach(g=>{i[g]=void 0}),a.value=Object.keys(t.settings.filters).filter(g=>h(t.settings.filters[g].visible)).map(g=>{const S={...t.settings.filters[g],code:g};return i[g]=m(g),(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(g=>g.code!=="isDeleted")}function m(g){const S=t.settings.filters[g],E=d.validFilters[g];return S.type==="boolean"&&typeof E!="boolean"?S.value:E}function k(){let g=JSON.parse(JSON.stringify(i));const S=t.settings.filterHook;S!=null&&S.preSubmit&&(g=S.preSubmit(g,s)),g!==!1&&d.change(g)}function B(){d.$reset({}),b(),k()}return e.watch(()=>t.settings,()=>{b(),k()},{immediate:!0}),e.watch(()=>({...i}),(g,S)=>{const V=Object.keys(g).filter(O=>S[O]!==g[O]).map(O=>({field:O,newValue:g[O],oldValue:S[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,V)})}),(g,S)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",il,[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:k},{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":f(E),"value-on-clear":null,onChange:k},{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:k},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(tl,{key:3,value:i[E.code],sorters:E,onUpdateSorters:_},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(sl,{key:4,value:i[E.code],ranges:E,onUpdateRanges:x},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":f(E),onCheck:k,onChange:k},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),{type:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(w.ElButton),{onClick:B},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a79425a9"]]);/*! Element Plus Icons Vue v2.3.1 */var cl=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"})]))}}),dl=cl,ul=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"})]))}}),fl=ul,pl=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=pl,hl=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=hl,ml=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"})]))}}),gl=ml,_l=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"})]))}}),yl=_l,bl=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=bl,wl=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"})]))}}),kl=wl,El=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"})]))}}),xl=El,Bl=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=Bl,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"})]))}}),$l=Sl,Cl=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"})]))}}),Vl=Cl,Ol=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"})]))}}),Vo=Ol,Tl=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=Tl,Nl=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"})]))}}),Dl=Nl,Al=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"})]))}}),Fl=Al,jl=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"})]))}}),Rl=jl,Il=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"})]))}}),Ml=Il;const Ll={class:"data-page-title"},Ul={class:"title"},zl={class:"data-page-toolbar"},Hl=R({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=t.tableName?t.tableName:t.settings.name,r=U.useRoute(),s=Ae(),a=qt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1),d=e.computed(()=>t.settings.displayMode.normalMode);function h(){a.$reset({isDeleted:!c.value})}function u(){const _=`table-view-${r.path}-${t.settings.code}`,x=localStorage.getItem(_)?localStorage.getItem(_):d.value;s.change(x)}function f(_){s.change(_);const x=`table-view-${r.path}-${t.settings.code}`;localStorage.setItem(x,s.mode)}return e.onMounted(u),(_,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ll,[e.createElementVNode("div",Ul,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",zl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:f},{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(xl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(dl))]),_: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(c.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(Fl))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(ll,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-fbc6f7d9"]]),ql={class:"kst-field-row-id"},Pl={key:0},Wl={key:1,class:"mono-data"},Gl={key:1},ba=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:{...K(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,K(n))}return(d,h)=>{const u=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",ql,[a.value?(e.openBlock(),e.createElementBlock("span",Pl,[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",Wl,[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",Gl," NO ID "))])}}},[["__scopeId","data-v-f68a9cd4"]]);function Ql(o){w.ElMessage(o)}const Yl={show:Ql},wa=10,$n=Te.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=wa&&(this.history=this.history.slice(2-wa),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 b;const t=$n(),n=Ae(),r=U.useRoute(),s=U.useRouter(),a=K(r),i=o,c=e.ref({}),d=e.ref(!1),h=e.computed(()=>{var m,k;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((k=i.operations)!=null&&k.removable)}),u=e.ref((b=i.operations)==null?void 0:b.removable);async function f(){const m=i.settings.formHook,k=i.settings.btnVisible,B=i.settings.rest,{data:g}=await B.getOne({...i.row,...a});c.value=g,m.setupUpdate&&(c.value=m.setupUpdate(c.value,a)),k.showRemove&&(u.value=k.showRemove(c.value)),d.value=!0}function _(m,k){const B=i.settings.formHook,g=i.settings.rest;Object.keys(a).forEach(S=>{m[S]=a[S]}),B!=null&&B.preUpdateSubmit&&(m=B.preUpdateSubmit(m)),g.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{k()})}function x(m,k){i.settings.rest.remove(m).then(()=>{Yl.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(g=>{r.fullPath.includes(g.path)&&(t.remove(g.code),s.back())}),n.fireRemoved()}).catch(()=>{k()})}return(m,k)=>h.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"primary",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:d.value,"onUpdate:modelValue":k[0]||(k[0]=B=>d.value=B),config:i.settings,data:c.value,removable:u.value,onSubmit:_,onRemove:x},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Kl=o=>(e.pushScopeId("data-v-af19c26f"),o=o(),e.popScopeId(),o),Jl={class:"data-grid-wrapper"},Xl={key:0,class:"cover"},Zl=Kl(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),vl={class:"header"},ec={key:0},tc={class:"key"},nc={class:"value"},oc={key:1,class:"footer tools"},rc=R({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=U.useRoute(),n=K(t),r=e.useSlots(),s=o,a=qt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Te.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),h=e.shallowRef(null),u=e.ref(!1);async function f(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{f().then(B=>{u.value=B})});const _=e.computed(()=>{var B,g;return!!((B=s.operations)!=null&&B.updatable&&u||(g=s.operations)!=null&&g.removable&&u)}),x=e.computed(()=>s.settings.displayMode.gridWidth),b=e.computed(()=>s.settings.displayMode.heightAuto);function m(){h.value=s.settings.fields.find(B=>B.code==="id"),d.value=s.settings.fields.filter(B=>B.code===s.settings.coverField||B.code===s.settings.nameField||B.code==="id"?!1:B.showInList(n,c.value))}function k(B){return s.settings.nameField?B[s.settings.nameField]:B.name?B.name:`${B.id}`}return e.watch(i,B=>{c.value=B,m()}),m(),(B,g)=>(e.openBlock(),e.createElementBlock("div",Jl,[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:x.value?x.value:24,xs:x.value?{}:24,sm:x.value?{}:12,md:x.value?{}:8,lg:x.value?{}:6,xl:x.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",Xl,[e.unref(r).cover?e.renderSlot(B.$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(()=>[Zl]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",vl,[e.createVNode(ba,{field:h.value,row:S},e.createSlots({_:2},[S[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k(S)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(b.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",ec,[e.renderSlot(B.$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",tc,e.toDisplayString(E.label)+" ",1),e.createElementVNode("div",nc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:S,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||_.value?(e.openBlock(),e.createElementBlock("div",oc,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:S},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(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 ac(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 ka=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=K(n),s=t,a=e.useSlots(),i=o,c=qt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Te.storeToRefs(c),h=e.ref(d.value),u=e.shallowRef([]),f=e.ref(!1);async function _(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{_().then(g=>{f.value=g})});const x=e.computed(()=>{var g,S;return!!((g=i.operations)!=null&&g.updatable&&f.value||(S=i.operations)!=null&&S.removable&&f.value)});function b(g){s("sort-column",g)}function m(g){s("enable-item",g)}function k(){var S,E;const g=[...i.settings.fields];if((S=i.settings)!=null&&S.extendTableColumnfields){const V=i.settings.extendTableColumnfields((E=i.data)==null?void 0:E[0]);g.push(...V)}u.value=g.filter(V=>V.showInList(r,h.value))}function B(g){s("select-change",{routeQuery:r,data:g})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(ac(i.settings,i.data[0]),k())}),e.watch(d,g=>{h.value=g,k()}),(g,S)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:B,onSortChange:b},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:E.code,label:E.label,width:E.width,prop:E.code,sortable:E.sortable?"custom":!1,fixed:E.fixed},e.createSlots({_:2},[E.type==="switch"?{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:V,mode:"list",onEnable:m},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{key:V.updatedAt,field:E,row:V,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:E})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"actions",{row:E},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:E})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:E,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-05d64a3c"]]),sc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Ae();t.$reset();const{mode:n}=Te.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=rc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(r),(h,u)=>({name:u,fn:e.withCtx(f=>[e.renderSlot(c.$slots,u,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040))}},ic={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){const t=Ae(),n=U.useRoute(),r=K(n),s=o,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var f;return await((f=s.operations)==null?void 0:f.creatable)}e.watchEffect(()=>{d().then(f=>{c.value=f})});async function h(){const f=s.settings.formHook,_=s.settings.fields.reduce((x,b)=>(x[b.code]=b.default,x),{});a.value=_,f.setupCreate&&(a.value=f.setupCreate(a.value,r)),i.value=!0}function u(f,_){const x=s.settings.formHook,b=s.settings.rest;Object.keys(r).forEach(m=>{f[m]=r[m]}),x!=null&&x.preCreateSubmit&&(f=x.preCreateSubmit(f)),b.create(f).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{_()})}return(f,_)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=x=>i.value=x),config:s.settings,data:a.value,removable:!1,onSubmit:u},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=U.useRouter(),n=Ae(),r=o,s=e.shallowRef([]);let a="";async function i(d,h){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,h);return}const u=await Ht.getValue();try{await d.action({...h,...r.query,idempotentToken:u}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,h){t.push(d.path(h,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,h)=>(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:f=>i(u,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},lc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Ae(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var u,f;return((f=(u=n.tableDataSelect)==null?void 0:u.data)==null?void 0:f.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 f=await Ht.getValue();try{await u.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:f}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function h(u){return typeof h=="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,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h(_.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:x=>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:x=>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"},dc=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),h=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 u(_){i.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function f(_){c.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(_,x)=>(e.openBlock(),e.createElementBlock("div",cc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":h.value,total:d.value,"current-page":o.page,layout:"total,sizes, prev, pager, next",onCurrentChange:u,onSizeChange:f},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-d595522f"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function uc(o){return typeof o=="function"?o():e.unref(o)}function fc(o){return o}function pc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function hc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function mc(o){var t;const n=uc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const gc=Ba?window:void 0;function _c(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),hc(r,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Sa[$a]=Sa[$a]||{};var Ca=Object.getOwnPropertySymbols,yc=Object.prototype.hasOwnProperty,bc=Object.prototype.propertyIsEnumerable,wc=(o,t)=>{var n={};for(var r in o)yc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Ca)for(var r of Ca(o))t.indexOf(r)<0&&bc.call(o,r)&&(n[r]=o[r]);return n};function Va(o,t,n={}){const r=n,{window:s=gc}=r,a=wc(r,["window"]);let i;const c=_c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},h=e.watch(()=>mc(o),f=>{d(),c.value&&s&&f&&(i=new ResizeObserver(t),i.observe(f,a))},{immediate:!0,flush:"post"}),u=()=>{d(),h()};return pc(u),{isSupported:c,stop:u}}var Oa;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Oa||(Oa={}));var kc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ec=Object.prototype.hasOwnProperty,xc=Object.prototype.propertyIsEnumerable,Na=(o,t,n)=>t in o?kc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Bc=(o,t)=>{for(var n in t||(t={}))Ec.call(t,n)&&Na(o,n,t[n]);if(Ta)for(var n of Ta(t))xc.call(t,n)&&Na(o,n,t[n]);return o};Bc({linear:fc},{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=R({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,xt;e.useCssVars(z=>({"9468e502":qe.value}));const t=U.useRoute(),n=K(t),r=o,s=qt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=Te.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,z=>{g.value=z,G()});const c=Ae(),{created:d,updated:h,removed:u}=Te.storeToRefs(c);e.watch([d,h,u],([z,Z,M])=>{(z||Z||M)&&G()});const f=e.ref(!0),_=e.ref([]),x=e.ref(0),b=e.ref({}),m=e.ref({}),k=e.ref(null),B=e.ref(null),g=e.ref({}),S=e.ref(parseInt(t.query.pageSize)||30),E=e.ref(parseInt(t.query.page)||1),V=(xt=r.hasMany)==null?void 0:xt.tableContentHeight;function O(z){let Z=null;if(z.order==="ascending"?Z="ASC":z.order==="descending"&&(Z="DESC"),g.value.sorters){let M=[];g.value.sorters.some(we=>we.field===z.prop)?g.value.sorters.forEach(we=>{we.field===z.prop&&(we.order=Z,we.name||M.push(we)),we.name&&M.push(we)}):M=[...g.value.sorters,{field:z.prop,order:Z}],g.value.sorters=M}else g.value.sorters=[{field:z.prop,order:Z}];G()}function I(){m.value=r.settings.operations(n)}function G(z){f.value=!0;const Z={...g.value,...n,...r.query,page:z=="again"?E.value-1:E.value,size:S.value};r.settings.rest.getList(Z).then(M=>{b.value.data=[],_.value=M.data.rows,x.value=M.data.count,f.value=!1,x.value&&_.value.length==0&&G("again")})}function Y(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 T(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){b.value=z}const X=e.ref(0),Se=e.ref(0);Va(k,z=>{var Z;X.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0}),Va(B,z=>{var Z;Se.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0});const qe=e.computed(()=>V&&x.value>0?`${V}px`:`calc(100% - ${X.value+Se.value}px)`);return I(),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:k},[e.createVNode(Hl,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(lc,{settings:r.settings,"table-data-select":b.value,query:e.unref(n),"filter-form":g.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(ic,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(sc,{class:"data-table-box",data:_.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:T,onSelectChange:L},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:M})=>[e.createVNode(Ea,{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),f.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:B},[e.createVNode(dc,{page:E.value,size:S.value,total:x.value,onPageChange:Y},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a2219e6e"]]);/*! Element Plus v2.7.2 */var Sc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const $c={__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"]))]))}},Cc={class:"header-box"},Vc={class:"header-box-left"},Oc={class:"page-title"},Tc={class:"tabs-container"},Nc={class:"user-profile"},Dc=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=x();r.setupRootPath("首页",`/${i}/home`);function d(b){var S,E;const m=b.meta.side,k=b.params.domain;let B=(S=b.meta)==null?void 0:S.title,g=(E=b.meta)==null?void 0:E.code;if(m&&k){B=So()[m][b.params.domain].name,g=b.params.domain;const V=b.params.id;V&&V!="detail"&&(B=`${B} - ${b.params.id}`,g=`${b.params.domain}-${b.params.id}`)}else{const V=c.find(O=>O.route===b.path);V&&(B=V.title,g=V.route)}B&&g&&(r.push(B,g,b.fullPath),s.value=g)}function h(b){const m=r.history.find(k=>k.code==b.props.name);t.push(m.path)}function u(b){if(r.remove(b),b==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const f=(b,m)=>{const k=r.history.length;return b===0&&m==="self"||b<2&&m==="left"||b===k-1&&m==="right"||k===1&&m==="all"?!1:!(k<2&&m==="other")};function _(b,m){const k=[],B=r.history;switch(m){case"self":k.push(B[b].code);break;case"left":for(let g=0;g<b;g++)g!==0&&k.push(B[g].code);break;case"right":for(let g=b+1;g<B.length;g++)k.push(B[g].code);break;case"all":for(let g=0;g<B.length;g++)g!==0&&k.push(B[g].code);break;case"other":for(let g=1;g<B.length;g++)g!==b&&k.push(B[g].code);break}for(let g=0;g<k.length;g++)u(k[g])}function x(){return a.config.sideMenus[i].map(b=>b.children?b.children:b).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(b,m)=>(e.openBlock(),e.createElementBlock("div",Cc,[e.createElementVNode("div",null,[e.createElementVNode("div",Vc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",Oc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Tc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=k=>s.value=k),type:"card",class:"tabs",onTabClick:h,onTabRemove:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(k,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:k.title!="首页",label:k.title,name:k.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(()=>[f(B,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:g=>_(B,"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),f(B,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:g=>_(B,"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),f(B,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:g=>_(B,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(gl))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(B,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:g=>_(B,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref($l))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(B,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:g=>_(B,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Vl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode($c,{content:k.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]=k=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})])]),e.createElementVNode("div",Nc,[e.renderSlot(b.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-6ea136f7"]]),Ac=o=>(e.pushScopeId("data-v-7bee87da"),o=o(),e.popScopeId(),o),Fc={key:2,class:"dot-wrapper"},jc=[Ac(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Da=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(Da,{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",Fc,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-7bee87da"]]),Rc=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),null,{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),h=>(e.openBlock(),e.createBlock(Da,{data:h},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-a1adb5f0"]]),Ic=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(Sc)},{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(Dc,{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(()=>[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Rc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-1735d819"]]),Mc={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 zt(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",Mc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-34bb8e6d"]]),Lc={key:0},Uc={class:"key"},zc={class:"value"},Hc={key:1,class:"loading-wrapper"},Fa=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=K(s),i=Ae(),{updated:c}=Te.storeToRefs(i),d=e.ref(null),h=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.computed(()=>r.settings.fields.filter(k=>k.showInDetail(d.value,{...a,...r.query}))),f=e.computed(()=>u.value.find(k=>k.code===r.settings.coverField)),_=e.computed(()=>u.value.filter(k=>!h.includes(k.type)&&!k.extendDetail)),x=e.computed(()=>{var B;const k=(B=f.value)==null?void 0:B.code;return u.value.filter(g=>h.includes(g.type)||g.extendDetail).filter(g=>g.code!==k)}),b=e.computed({get(){return x.value.map(k=>k.code)},set(k){}});function m(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{m()},{immediate:!0}),(k,B)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",Lc,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[f.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(f.value.display),{field:f.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:f.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(_.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:g.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,e.toDisplayString(g.label),1),e.createElementVNode("div",zc,[g.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.display),{key:1,field:g,row:d.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),x.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:b.value,"onUpdate:modelValue":B[0]||(B[0]=g=>b.value=g),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:g.label,name:g.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.display),{field:g,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Hc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-ce863b1a"]]),qc={key:0},Pc={class:"group-item-head"},Wc={class:"key"},Gc={class:"value"},Qc={key:1,class:"loading-wrapper"},Yc=R({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute();K(s);const a=Ae(),{updated:i}=Te.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],h=e.computed(()=>{var f,_;return((_=(f=r.settings)==null?void 0:f.detailGroupFields)==null?void 0:_.map(x=>{var m,k,B,g;const b=((k=(m=x==null?void 0:x.childrenFields)==null?void 0:m.filter(S=>d.includes(S.type)||S.extendDetail))==null?void 0:k.filter(S=>S.code!==(x==null?void 0:x.coverField)))||[];return{...x,coverField:(B=x==null?void 0:x.childrenFields)==null?void 0:B.find(S=>S.code===x.coverField),detailFields:(g=x==null?void 0:x.childrenFields)==null?void 0:g.filter(S=>!d.includes(S.type)&&!S.extendDetail),extendFields:b,activeFields:(b==null?void 0:b.map(S=>S.code))||[]}}))||[]});function u(){r.settings.rest.getOne(r.query).then(f=>{f.data.isDeleted=!!f.data.deletedAt,c.value=f.data,n("done",f.data)})}return e.watch(i,()=>{u()},{immediate:!0}),(f,_)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${x.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[x.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(x.coverField.display),{field:x.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:x.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(x.detailFields,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:b.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Wc,e.toDisplayString(b.label),1),e.createElementVNode("div",Gc,[b.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{key:1,field:b,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),x&&x.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:x.activeFields,"onUpdate:modelValue":b=>x.activeFields=b,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.extendFields,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:b.label,name:b.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[x.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Qc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-efd9932c"]]),Kc={class:"data-page-title"},Jc={class:"title"},Xc=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=K(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const h=s.settings;if(h.displayMode.normalMode=="detail")a.value=`${h.name}`;else{const f=`${h.formatName(d)}`;a.value=f?`${h.name}:${f}`:`${h.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,h)=>(e.openBlock(),e.createElementBlock("div",Kc,[e.createElementVNode("div",Jc,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(Ea,{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-f200a348"]]),Zc=R({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=K(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(h){a.value=h.props.name,t.push({name:`${n.meta.side}-association`,params:{association:h.props.name},query:r})}function d(h){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const u=s.associations.find(f=>f.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},h&&h()}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}),(h,u)=>{const f=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]=_=>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(f,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bb704011"]]),vc={__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(ja,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},ed=R({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){U.useRouter();const t=U.useRoute(),n=K(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,h;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(Xc,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(h=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&h.length?(e.openBlock(),e.createBlock(Yc,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(Fa,{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(Zc,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(vc,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-f928d31a"]]),td={key:1,class:"loading-wrapper"},ja=R({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=K(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);zt(s,a).then(h=>{const u=h,f=d("has-many",u.hasMany(r)),_=d("has-one",u.hasOne(r));i.value=u,c.value=_.concat(f)});function d(h,u){return(u||[]).map(f=>typeof f=="object"?{type:h,domain:f.code,name:f.name,tableName:f.tableName,tableContentHeight:f.tableContentHeight,query:f.query||(()=>({}))}:{type:h,domain:f,name:So()[s][f].name,query:()=>({})})}return(h,u)=>i.value?(e.openBlock(),e.createBlock(ed,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",td,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-595a829e"]]),nd={key:0},od={key:1,class:"loading-wrapper"},rd=R({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=U.useRoute(),n=t.meta.side,r=K(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{zt(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",nd,[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(Fa,{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",od,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-fa1c18aa"]]),ad={key:0},sd={class:"file-name"},id={class:"name"},ld={class:"file-type"},cd={key:1},dd=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",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",sd,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",id,e.toDisplayString(c.name),1),e.createElementVNode("span",ld,"."+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(kl))]),_: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(Ml))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",cd,[e.createVNode(fe)]))}},[["__scopeId","data-v-76764c63"]]),ud={__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(()=>bf)),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 f=a.value.findIndex(_=>_.id===u.id);a.value.splice(f,1)}async function d(u){const f=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(u.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await f.updateFilesName(u).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function h(u,f){if(f=="success"){i(u),r("update:modelValue",a.value);return}if(f=="remove"){c(u),r("update:modelValue",a.value);return}if(f=="change"){d(u);return}}return(u,f)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:f[0]||(f[0]=_=>h(_,"success")),onOnRemove:f[1]||(f[1]=_=>h(_,"remove")),onOnChange:f[2]||(f[2]=_=>h(_,"change"))},null,8,["pics","props"]))}};class fd extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=dd,this.editor=ud,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const pd=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"})),hd={key:3},md=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:{...K(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),h=e.ref("");let u=null;const f=zt(s,r).then(m=>(u=m.formatName,Promise.resolve(m.rest)));function _(m){return n.field.isRouter(n.row,K(t))&&!K(t)[n.field.code]}function x(){f.then(m=>{var S;c.value=!0;const k=n.row[n.field.code],B=n.row[wo(`${r}-name`)];if(!k){b(!1),c.value=!1;return}if(k&&B){b({id:k,name:B}),c.value=!1;return}if((S=n.field)!=null&&S.notGetOne){b({id:k,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const g={id:k};m.getOne(g).then(E=>{b(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function b(m){if(d.value=!1,n.field.showName){la(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),h.value=m[n.field.showName];return}if(n.field.formatter){h.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){h.value=m.name;return}if(!m){d.value=!0;return}h.value=u(m)}return e.watch(()=>n.row,x,{immediate:!0}),(m,k)=>{const B=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})):_(o.row)?(e.openBlock(),e.createBlock(B,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",hd,e.toDisplayString(h.value),1))])}}},[["__scopeId","data-v-4fc1db1d"]]),gd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(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 h(){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,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[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:h},{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 _d 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=md,this.editor=gd,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 yd=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"})),bd={style:{display:"flex","align-items":"center"}},wd={__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",bd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Rl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(fl))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Dl))]),_:1}))]))}},kd={__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 Ed extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=wd,this.editor=kd,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const xd=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"})),Bd={key:0},Sd={__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",Bd,e.toDisplayString(r.value),1))]))}},$d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(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 h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(u,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=_=>i.value=_),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:h},null,8,["modelValue","props","options"]))}};class Cd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=Sd,this.editor=$d,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Cd},Symbol.toStringTag,{value:"Module"}));class Od extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Td=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),Nd={key:0},Dd={__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",Nd,e.toDisplayString(r.value),1))}},Ad={__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 Fd extends ee{constructor(t,n){super(t,n),this.display=Dd,this.editor=Ad,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const jd=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),Rd={key:0},Id={__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",Rd,e.toDisplayString(r.value),1))}},Md=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 Ld extends ee{constructor(t,n){super(t,n),this.display=Id,this.editor=Md,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),Ra=o=>(e.pushScopeId("data-v-14af5b5e"),o=o(),e.popScopeId(),o),zd={class:"loading-error"},Hd=Ra(()=>e.createElementVNode("div",null,"加载失败",-1)),qd={key:1,class:"loading-error"},Pd=[Ra(()=>e.createElementVNode("div",null,"暂无",-1))],Wd=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],r.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(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":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",zd,[Hd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",qd,Pd))],2))}},[["__scopeId","data-v-14af5b5e"]]),Gd={__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(()=>Ef)),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 Qd extends ee{constructor(t,n){super(t,n),this.display=Wd,this.editor=Gd,this.props=t.props||{},this.checkValidProperties(t)}}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Qd},Symbol.toStringTag,{value:"Module"})),Ia=o=>(e.pushScopeId("data-v-e4bc2c79"),o=o(),e.popScopeId(),o),Kd={class:"image-card",style:{"margin-bottom":"20px"}},Jd={class:"loading-error"},Xd=Ia(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Zd={key:1,class:"loading-error"},vd=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],eu=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",Kd,[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",Jd,[Xd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Zd,vd))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-e4bc2c79"]]);class tu extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=eu,this.editor=pa,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),ou={key:0},ru={__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",ou,e.toDisplayString(r.value),1))}},au={__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 su extends ee{constructor(t,n){super(t,n),this.display=ru,this.editor=au,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 iu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"})),lu={__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]=h=>a.value=h),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class du extends ee{constructor(t,n){super(t,n),this.display=lu,this.editor=cu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const uu=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"}));var F=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},N=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,kt,Pt,Fe,je,Re,Ie,Me,Le,Ue,ze,lt,Et,nt,Cn,ot;const fu=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},D="0123456789abcdef".split(""),pu=[-2147483648,8388608,32768,128],xe=[24,16,8,0],Vn=[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 hu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),kt.set(this,void 0),Pt.set(this,void 0),Fe.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),Et.set(this,void 0),nt.set(this,void 0),Cn.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,F(this,it,oe)):F(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Fe,3238371032),F(this,je,914150663),F(this,Re,812702999),F(this,Ie,4144912697),F(this,Me,4290775857),F(this,Le,1750603025),F(this,Ue,1694076839),F(this,ze,3204075428)):(F(this,Fe,1779033703),F(this,je,3144134277),F(this,Re,1013904242),F(this,Ie,2773480762),F(this,Me,1359893119),F(this,Le,2600822924),F(this,Ue,528734635),F(this,ze,1541459225)),F(this,tt,F(this,ot,F(this,Ee,F(this,Et,0)))),F(this,kt,F(this,lt,!1)),F(this,Pt,!0),F(this,nt,t)}update(t){if(N(this,kt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=N(this,it);for(;r<s;){let i;if(N(this,lt)&&(F(this,lt,!1),a[0]=N(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=N(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=N(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])}F(this,Cn,i),F(this,Ee,N(this,Ee)+(i-N(this,ot))),i>=64?(F(this,tt,a[16]),F(this,ot,i-64),this.hash(),F(this,lt,!0)):F(this,ot,i)}return N(this,Ee)>4294967295&&(F(this,Et,N(this,Et)+(N(this,Ee)/4294967296<<0)),F(this,Ee,N(this,Ee)%4294967296)),this}finalize(){if(N(this,kt))return;F(this,kt,!0);const t=N(this,it),n=N(this,Cn);t[16]=N(this,tt),t[n>>2]|=pu[n&3],F(this,tt,t[16]),n>=56&&(N(this,lt)||this.hash(),t[0]=N(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]=N(this,Et)<<3|N(this,Ee)>>>29,t[15]=N(this,Ee)<<3,this.hash()}hash(){let t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze);const h=N(this,it);let u,f,_,x,b,m,k,B,g,S;for(let E=16;E<64;++E)x=h[E-15],u=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,x=h[E-2],f=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,h[E]=h[E-16]+u+h[E-7]+f<<0;S=n&r;for(let E=0;E<64;E+=4)N(this,Pt)?(N(this,nt)?(k=300032,x=h[0]-1413257819,d=x-150054599<<0,s=x+24177077<<0):(k=704751109,x=h[0]-210244248,d=x-1521486534<<0,s=x+143694565<<0),F(this,Pt,!1)):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),k=t&n,_=k^t&r^S,m=a&i^~a&c,x=d+f+m+Vn[E]+h[E],b=u+_,d=s+x<<0,s=x+b<<0),u=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),f=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),B=s&t,_=B^s&n^k,m=d&a^~d&i,x=c+f+m+Vn[E+1]+h[E+1],b=u+_,c=r+x<<0,r=x+b<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),g=r&s,_=g^r&t^B,m=c&d^~c&a,x=i+f+m+Vn[E+2]+h[E+2],b=u+_,i=n+x<<0,n=x+b<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),S=n&r,_=S^n&s^g,m=i&c^~i&d,x=a+f+m+Vn[E+3]+h[E+3],b=u+_,a=t+x<<0,t=x+b<<0;F(this,Fe,N(this,Fe)+t<<0),F(this,je,N(this,je)+n<<0),F(this,Re,N(this,Re)+r<<0),F(this,Ie,N(this,Ie)+s<<0),F(this,Me,N(this,Me)+a<<0),F(this,Le,N(this,Le)+i<<0),F(this,Ue,N(this,Ue)+c<<0),F(this,ze,N(this,ze)+d<<0)}hex(){this.finalize();const t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze);let h=D[t>>28&15]+D[t>>24&15]+D[t>>20&15]+D[t>>16&15]+D[t>>12&15]+D[t>>8&15]+D[t>>4&15]+D[t&15]+D[n>>28&15]+D[n>>24&15]+D[n>>20&15]+D[n>>16&15]+D[n>>12&15]+D[n>>8&15]+D[n>>4&15]+D[n&15]+D[r>>28&15]+D[r>>24&15]+D[r>>20&15]+D[r>>16&15]+D[r>>12&15]+D[r>>8&15]+D[r>>4&15]+D[r&15]+D[s>>28&15]+D[s>>24&15]+D[s>>20&15]+D[s>>16&15]+D[s>>12&15]+D[s>>8&15]+D[s>>4&15]+D[s&15]+D[a>>28&15]+D[a>>24&15]+D[a>>20&15]+D[a>>16&15]+D[a>>12&15]+D[a>>8&15]+D[a>>4&15]+D[a&15]+D[i>>28&15]+D[i>>24&15]+D[i>>20&15]+D[i>>16&15]+D[i>>12&15]+D[i>>8&15]+D[i>>4&15]+D[i&15]+D[c>>28&15]+D[c>>24&15]+D[c>>20&15]+D[c>>16&15]+D[c>>12&15]+D[c>>8&15]+D[c>>4&15]+D[c&15];return N(this,nt)||(h+=D[d>>28&15]+D[d>>24&15]+D[d>>20&15]+D[d>>16&15]+D[d>>12&15]+D[d>>8&15]+D[d>>4&15]+D[d&15]),h}toString(){return this.hex()}digest(){this.finalize();const t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze),h=[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 N(this,nt)||h.push(d>>24&255,d>>16&255,d>>8&255,d&255),h}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(N(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,N(this,Fe)),n.setUint32(4,N(this,je)),n.setUint32(8,N(this,Re)),n.setUint32(12,N(this,Ie)),n.setUint32(16,N(this,Me)),n.setUint32(20,N(this,Le)),n.setUint32(24,N(this,Ue)),N(this,nt)||n.setUint32(28,N(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,kt=new WeakMap,Pt=new WeakMap,Fe=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,Et=new WeakMap,nt=new WeakMap,Cn=new WeakMap,ot=new WeakMap;function mu(o){const t=new hu;return t.update(o),parseInt(t.hex().substring(0,8),16)}const gu=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},_u=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 yu{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=mu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=fu)}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 _u.apply(this,n)}hex(t){var n=this.rgb(t);return gu(n)}}const bu=new yu;function wu(o){const t=bu.hex(`abc${o}cba`);return ku(t.replace("#",""),-20)}function ku(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 Ma={strToHexColor:wu},Eu={key:0,class:"radio-fields"},xu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=K(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 h=await r.field.options(r.row,n);if(!h){s.value="<无>",a.value=!1;return}let u="";if(u=h.filter(f=>d===f.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(f=>({bgColor:Ma.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",Eu,[(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-44339b2b"]]),Bu={__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=K(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 h(){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,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=_=>i.value=_),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:h},{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 Su extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=xu,this.editor=Bu,this.checkValidProperties(t)}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Su},Symbol.toStringTag,{value:"Module"})),Cu={class:"editor-field"},Vu=["innerHTML"],Ou=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",Cu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Vu)]))}},[["__scopeId","data-v-e54b04b3"]]),Tu={style:{width:"100%"}},Nu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mf)),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",Tu,[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 Du extends ee{constructor(t,n){super(t,n),this.display=Ou,this.editor=Nu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"}));class Fu extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=ba,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 ju=Object.freeze(Object.defineProperty({__proto__:null,default:Fu},Symbol.toStringTag,{value:"Module"})),Ru={key:0,class:"select-fields"},Iu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=K(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 h=await r.field.options(r.row,n);if(!h){s.value="<无>",a.value=!1;return}let u=[];if(r.field.multiple?u=h.filter(f=>d.includes(f.code)):u=h.filter(f=>d===f.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(f=>({bgColor:Ma.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",Ru,[(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-9962eab5"]]),Mu={__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=K(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 h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[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:h},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 Lu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Iu,this.editor=Mu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const Uu=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),zu={key:0},Hu={__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,h)=>d[h],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",zu,e.toDisplayString(r.value),1))}},qu={class:"annotation"},Pu={class:"annotation"},Wu=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",qu,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",Pu,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-449013dd"]]);class Gu extends ee{constructor(t,n){super(t,n),this.display=Hu,this.editor=Wu,this.formatter=t.formatter,this.checkValidProperties(t)}}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Gu},Symbol.toStringTag,{value:"Module"})),Yu={style:{display:"flex","align-items":"center"}},Ku={__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((h,u)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",Yu,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),size:"small",disabled:!!s.value,"before-change":h=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Ju={__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 Xu extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=Ku,this.editor=Ju,this.checkValidProperties(t)}}const Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),vu={key:0},ef={__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",vu,e.toDisplayString(r.value),1))}},tf={__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 nf extends ee{constructor(t,n){super(t,n),this.display=ef,this.editor=tf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}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(){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",rf,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 lf extends ee{constructor(t,n){super(t,n),this.display=af,this.editor=sf,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:lf},Symbol.toStringTag,{value:"Module"})),df=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,h)=>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"]]),uf={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function h(_){c.value=await a.field.options(a.formData,r,_)}function u(_,x){var b;return(b=a.field)!=null&&b.useApiSearchKeyword||!_?!0:x.name.includes(_)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),h(),(_,x)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=b=>i.value=b),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:"","filter-node-method":u,"remote-method":h,onCheck:f,onChange:f},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class ff 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=df,this.editor=uf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const pf=Object.freeze(Object.defineProperty({__proto__:null,default:ff},Symbol.toStringTag,{value:"Module"})),hf={class:"el-upload__tip"},mf=["src"],gf=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(_=>{if(!(_!=null&&_.url))return{..._,name:"unknown",fileType:"unknown"};const x=_.url.substring(_.url.lastIndexOf(".")+1),b=_.url.split("/");return{..._,name:b[b.length-1],fileType:x}}));function c(_){var x,b;if(a.props.deleteParams){const m=(x=a.props.deleteParams)!=null&&x.data?(b=a.props.deleteParams)==null?void 0:b.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 h(_){r.value=_.url,s.value=!0}function u(_){return _.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function f(_){const x=new FormData;x.append("file",_.file),n("on-upload",x)}return(_,x)=>(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":h,multiple:!0,"before-upload":u,"http-request":f,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:x[0]||(x[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(Vo))]),_: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",hf,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":x[1]||(x[1]=b=>s.value=b)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,mf)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-b9c6d702"]])},Symbol.toStringTag,{value:"Module"})),_f=["src"],yf={class:"file-type"},bf=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 k=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=k,m;if(m.url){const B=m.url.split("/");return{...m,name:B[B.length-1],fileType:k}}return{...m,name:m.id,fileType:k}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const k=new FileReader;return k.readAsDataURL(m),new Promise(function(B,g){return m.type.startsWith("image/")?(k.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()});B(G)},m.type,.5)}},!1):(B(m),!1)})},h=m=>{var k,B;if(m.status==="success")if(r.props.deleteParams){const g=(k=r.props.deleteParams)!=null&&k.data?(B=r.props.deleteParams)==null?void 0:B.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,g,g).then(()=>{n("on-remove",m)})}else n("on-remove",m)},u=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},f=m=>{a.value=m.url,i.value=!0},_=m=>{const k=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(k))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(g=>g.size/1024/1024<5?(b(g),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function x(m,k){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function b(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((k,B)=>{const g=new FormData;g.append("file",m),v.post(c,g,{}).then(S=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",S.data.data),k(S.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),B("Upload failed")})})}return(m,k)=>(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":h,"before-upload":_,"on-exceed":u,"on-preview":f,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:k[0]||(k[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(Vo))]),_: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":k[1]||(k[1]=B=>i.value=B)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,_f)]),_: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,(B,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(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:B.name,"onUpdate:modelValue":S=>B.name=S,onChange:S=>x(B)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",yf,"."+e.toDisplayString(B.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:S=>h(B)},{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-28b29d8a"]])},Symbol.toStringTag,{value:"Module"})),wf={class:"image-slot"},kf={class:"el-upload__tip"},Ef=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=h=>{if(!(h.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=h=>{n("on-success",h.data.imageUrl)};function c(){n("on-success","")}function d(h){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((u,f)=>{const _=new FormData;_.append("image",h.file),v.post(s,_,{}).then(x=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),u(x.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),f("Upload failed")})})}return(h,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(h.$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",wf,[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(Vo))]),_: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(yl))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",kf,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=Cf(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=Do(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=xf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),Ua(d,r),d}function xf(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=Sf(o,t);if(i){var c=i[0],d=i[1],h=i[2],u=i[3],f=i[4],_=Wt(c,h),x=Wt(d,u);return _.concat([[me,f]],x)}return Bf(o,t)}function Bf(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),h=0;h<i;h++)c[h]=-1,d[h]=-1;c[a+1]=0,d[a+1]=0;for(var u=n-r,f=u%2!==0,_=0,x=0,b=0,m=0,k=0;k<s;k++){for(var B=-k+_;B<=k-x;B+=2){var g=a+B,S;B===-k||B!==k&&c[g-1]<c[g+1]?S=c[g+1]:S=c[g-1]+1;for(var E=S-B;S<n&&E<r&&o.charAt(S)===t.charAt(E);)S++,E++;if(c[g]=S,S>n)x+=2;else if(E>r)_+=2;else if(f){var V=a+u-B;if(V>=0&&V<i&&d[V]!==-1){var O=n-d[V];if(S>=O)return La(o,t,S,E)}}}for(var I=-k+b;I<=k-m;I+=2){var V=a+I,O;I===-k||I!==k&&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)b+=2;else if(!f){var g=a+u-I;if(g>=0&&g<i&&c[g]!==-1){var S=c[g],E=a+S-g;if(O=n-O,S>=O)return La(o,t,S,E)}}}}return[[He,o],[Be,t]]}function La(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),h=Wt(i,c);return d.concat(h)}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 za(o.charCodeAt(s-1))&&s--,s}function Do(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 Ha(o.charCodeAt(o.length-s))&&s--,s}function Sf(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(x,b,m){for(var k=x.substring(m,m+Math.floor(x.length/4)),B=-1,g="",S,E,V,O;(B=b.indexOf(k,B+1))!==-1;){var I=No(x.substring(m),b.substring(B)),G=Do(x.substring(0,m),b.substring(0,B));g.length<G+I&&(g=b.substring(B-G,B)+b.substring(B,B+I),S=x.substring(0,m-G),E=x.substring(m+I),V=b.substring(0,B-G),O=b.substring(B+I))}return g.length*2>=x.length?[S,E,V,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,h,u,f;o.length>t.length?(d=c[0],h=c[1],u=c[2],f=c[3]):(u=c[0],f=c[1],d=c[2],h=c[3]);var _=c[4];return[d,h,u,f,_]}function Ua(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&&Pa(o[d][1])){var h=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=h+a,i=h+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 h=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=h,i+=h}}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=Do(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 f=s+r;a.length===0&&i.length===0?(o.splice(n-f,f),n=n-f):a.length===0?(o.splice(n-f,f,[Be,i]),n=n-f+1):i.length===0?(o.splice(n-f,f,[He,a]),n=n-f+1):(o.splice(n-f,f,[He,a],[Be,i]),n=n-f+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++;_&&Ua(o,t)}function za(o){return o>=55296&&o<=56319}function Ha(o){return o>=56320&&o<=57343}function qa(o){return Ha(o.charCodeAt(0))}function Pa(o){return za(o.charCodeAt(o.length-1))}function $f(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 Pa(o)||qa(r)?null:$f([[me,o],[He,t],[Be,n],[me,r]])}function Cf(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),h=o.slice(c),u=s?s.index:null;e:{var f=c+i-a;if(u!==null&&u!==f||f<0||f>i)break e;var _=t.slice(0,f),x=t.slice(f);if(x!==h)break e;var b=Math.min(c,f),m=d.slice(0,b),k=_.slice(0,b);if(m!==k)break e;var B=d.slice(b),g=_.slice(b);return Ao(m,B,g,h)}e:{if(u!==null&&u!==c)break e;var S=c,_=t.slice(0,S),x=t.slice(S);if(_!==d)break e;var E=Math.min(a-S,i-S),V=h.slice(h.length-E),O=x.slice(x.length-E);if(V!==O)break e;var B=h.slice(0,h.length-E),g=x.slice(0,x.length-E);return Ao(d,B,g,V)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),V=o.slice(r.index+r.length),b=m.length,E=V.length;if(i<b+E)break e;var k=t.slice(0,b),O=t.slice(i-E);if(m!==k||V!==O)break e;var B=o.slice(b,a-E),g=t.slice(b,i-E);return Ao(m,B,g,V)}return null}function On(o,t,n){return Wt(o,t,n,!0)}On.INSERT=Be,On.DELETE=He,On.EQUAL=me;var Vf=On,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]",h="[object Error]",u="[object Function]",f="[object GeneratorFunction]",_="[object Map]",x="[object Number]",b="[object Object]",m="[object Promise]",k="[object RegExp]",B="[object Set]",g="[object String]",S="[object Symbol]",E="[object WeakMap]",V="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",G="[object Float64Array]",Y="[object Int8Array]",re="[object Int16Array]",T="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",qe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,xt=/\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[Y]=M[re]=M[T]=M[_]=M[x]=M[b]=M[k]=M[B]=M[g]=M[S]=M[L]=M[X]=M[Se]=M[qe]=!0,M[h]=M[u]=M[E]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Io=typeof self=="object"&&self&&self.Object===Object&&self,$e=we||Io||Function("return this")(),jn=t&&!t.nodeType&&t,J=jn&&!0&&o&&!o.nodeType&&o,Rn=J&&J.exports===jn;function Mo(l,p){return l.set(p[0],p[1]),l}function Ce(l,p){return l.add(p),l}function In(l,p){for(var y=-1,$=l?l.length:0;++y<$&&p(l[y],y,l)!==!1;);return l}function Mn(l,p){for(var y=-1,$=p.length,j=l.length;++y<$;)l[j+y]=p[y];return l}function Yt(l,p,y,$){for(var j=-1,A=l?l.length:0;++j<A;)y=p(y,l[j],j,l);return y}function Kt(l,p){for(var y=-1,$=Array(l);++y<l;)$[y]=p(y);return $}function Ln(l,p){return l==null?void 0:l[p]}function Jt(l){var p=!1;if(l!=null&&typeof l.toString!="function")try{p=!!(l+"")}catch{}return p}function Un(l){var p=-1,y=Array(l.size);return l.forEach(function($,j){y[++p]=[j,$]}),y}function Xt(l,p){return function(y){return l(p(y))}}function zn(l){var p=-1,y=Array(l.size);return l.forEach(function($){y[++p]=$}),y}var Lo=Array.prototype,Uo=Function.prototype,Bt=Object.prototype,Zt=$e["__core-js_shared__"],Hn=function(){var l=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Uo.toString,Pe=Bt.hasOwnProperty,St=Bt.toString,zo=RegExp("^"+qn.call(Pe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Rn?$e.Buffer:void 0,$t=$e.Symbol,vt=$e.Uint8Array,ke=Xt(Object.getPrototypeOf,Object),Pn=Object.create,Wn=Bt.propertyIsEnumerable,Ho=Lo.splice,en=Object.getOwnPropertySymbols,Ct=ct?ct.isBuffer:void 0,Gn=Xt(Object.keys,Object),Vt=Oe($e,"DataView"),dt=Oe($e,"Map"),Ve=Oe($e,"Promise"),Ot=Oe($e,"Set"),tn=Oe($e,"WeakMap"),ut=Oe(Object,"create"),nn=pe(Vt),ft=pe(dt),on=pe(Ve),rn=pe(Ot),an=pe(tn),rt=$t?$t.prototype:void 0,Qn=rt?rt.valueOf:void 0;function Ke(l){var p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function qo(){this.__data__=ut?ut(null):{}}function Po(l){return this.has(l)&&delete this.__data__[l]}function Wo(l){var p=this.__data__;if(ut){var y=p[l];return y===r?void 0:y}return Pe.call(p,l)?p[l]:void 0}function Yn(l){var p=this.__data__;return ut?p[l]!==void 0:Pe.call(p,l)}function sn(l,p){var y=this.__data__;return y[l]=ut&&p===void 0?r:p,this}Ke.prototype.clear=qo,Ke.prototype.delete=Po,Ke.prototype.get=Wo,Ke.prototype.has=Yn,Ke.prototype.set=sn;function ie(l){var p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Go(){this.__data__=[]}function Qo(l){var p=this.__data__,y=Nt(p,l);if(y<0)return!1;var $=p.length-1;return y==$?p.pop():Ho.call(p,y,1),!0}function Yo(l){var p=this.__data__,y=Nt(p,l);return y<0?void 0:p[y][1]}function Ko(l){return Nt(this.__data__,l)>-1}function Jo(l,p){var y=this.__data__,$=Nt(y,l);return $<0?y.push([l,p]):y[$][1]=p,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 p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[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,p){return ht(this,l).set(l,p),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,p){var y=this.__data__;if(y instanceof ie){var $=y.__data__;if(!dt||$.length<n-1)return $.push([l,p]),this;y=this.__data__=new ce($)}return y.set(l,p),this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l,p){var y=un(l)||At(l)?Kt(l.length,String):[],$=y.length,j=!!$;for(var A in l)Pe.call(l,A)&&!(j&&(A=="length"||wr(A,$)))&&y.push(A);return y}function Kn(l,p,y){var $=l[p];(!(Pe.call(l,p)&&eo($,y))||y===void 0&&!(p in l))&&(l[p]=y)}function Nt(l,p){for(var y=l.length;y--;)if(eo(l[y][0],p))return y;return-1}function We(l,p){return l&&dn(p,pn(p),l)}function ln(l,p,y,$,j,A,W){var P;if($&&(P=A?$(l,j,A,W):$(l)),P!==void 0)return P;if(!Qe(l))return l;var te=un(l);if(te){if(P=yr(l),!p)return mr(l,P)}else{var Q=Xe(l),de=Q==u||Q==f;if(to(l))return Dt(l,p);if(Q==b||Q==a||de&&!A){if(Jt(l))return A?l:{};if(P=Ge(de?{}:l),!p)return gr(l,We(P,l))}else{if(!M[Q])return A?l:{};P=br(l,Q,ln,p)}}W||(W=new ge);var _e=W.get(l);if(_e)return _e;if(W.set(l,P),!te)var ne=y?_r(l):pn(l);return In(ne||l,function(ue,le){ne&&(le=ue,ue=l[le]),Kn(P,le,ln(ue,p,y,$,le,l,W))}),P}function ir(l){return Qe(l)?Pn(l):{}}function lr(l,p,y){var $=p(l);return un(l)?$:Mn($,y(l))}function cr(l){return St.call(l)}function dr(l){if(!Qe(l)||Er(l))return!1;var p=fn(l)||Jt(l)?zo:z;return p.test(pe(l))}function ur(l){if(!Zn(l))return Gn(l);var p=[];for(var y in Object(l))Pe.call(l,y)&&y!="constructor"&&p.push(y);return p}function Dt(l,p){if(p)return l.slice();var y=new l.constructor(l.length);return l.copy(y),y}function cn(l){var p=new l.constructor(l.byteLength);return new vt(p).set(new vt(l)),p}function pt(l,p){var y=p?cn(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.byteLength)}function Jn(l,p,y){var $=p?y(Un(l),!0):Un(l);return Yt($,Mo,new l.constructor)}function Xn(l){var p=new l.constructor(l.source,xt.exec(l));return p.lastIndex=l.lastIndex,p}function fr(l,p,y){var $=p?y(zn(l),!0):zn(l);return Yt($,Ce,new l.constructor)}function pr(l){return Qn?Object(Qn.call(l)):{}}function hr(l,p){var y=p?cn(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.length)}function mr(l,p){var y=-1,$=l.length;for(p||(p=Array($));++y<$;)p[y]=l[y];return p}function dn(l,p,y,$){y||(y={});for(var j=-1,A=p.length;++j<A;){var W=p[j],P=void 0;Kn(y,W,P===void 0?l[W]:P)}return y}function gr(l,p){return dn(l,Je(l),p)}function _r(l){return lr(l,pn,Je)}function ht(l,p){var y=l.__data__;return kr(p)?y[typeof p=="string"?"string":"hash"]:y.map}function Oe(l,p){var y=Ln(l,p);return dr(y)?y:void 0}var Je=en?Xt(en,Object):Br,Xe=cr;(Vt&&Xe(new Vt(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=_||Ve&&Xe(Ve.resolve())!=m||Ot&&Xe(new Ot)!=B||tn&&Xe(new tn)!=E)&&(Xe=function(l){var p=St.call(l),y=p==b?l.constructor:void 0,$=y?pe(y):void 0;if($)switch($){case nn:return O;case ft:return _;case on:return m;case rn:return B;case an:return E}return p});function yr(l){var p=l.length,y=l.constructor(p);return p&&typeof l[0]=="string"&&Pe.call(l,"index")&&(y.index=l.index,y.input=l.input),y}function Ge(l){return typeof l.constructor=="function"&&!Zn(l)?ir(ke(l)):{}}function br(l,p,y,$){var j=l.constructor;switch(p){case V:return cn(l);case c:case d:return new j(+l);case O:return pt(l,$);case I:case G:case Y:case re:case T:case L:case X:case Se:case qe:return hr(l,$);case _:return Jn(l,$,y);case x:case g:return new j(l);case k:return Xn(l);case B:return fr(l,$,y);case S:return pr(l)}}function wr(l,p){return p=p??s,!!p&&(typeof l=="number"||Z.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!!Hn&&Hn in l}function Zn(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||Bt;return l===y}function pe(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function vn(l){return ln(l,!0,!0)}function eo(l,p){return l===p||l!==l&&p!==p}function At(l){return xr(l)&&Pe.call(l,"callee")&&(!Wn.call(l,"callee")||St.call(l)==a)}var un=Array.isArray;function Ft(l){return l!=null&&no(l.length)&&!fn(l)}function xr(l){return oo(l)&&Ft(l)}var to=Ct||Sr;function fn(l){var p=Qe(l)?St.call(l):"";return p==u||p==f}function no(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 oo(l){return!!l&&typeof l=="object"}function pn(l){return Ft(l)?Tt(l):ur(l)}function Br(){return[]}function Sr(){return!1}o.exports=vn}(Tn,Tn.exports);var Wa=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]",h="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",_="[object Error]",x="[object Function]",b="[object GeneratorFunction]",m="[object Map]",k="[object Number]",B="[object Null]",g="[object Object]",S="[object Promise]",E="[object Proxy]",V="[object RegExp]",O="[object Set]",I="[object String]",G="[object Symbol]",Y="[object Undefined]",re="[object WeakMap]",T="[object ArrayBuffer]",L="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",qe="[object Int8Array]",Ye="[object Int16Array]",xt="[object Int32Array]",z="[object Uint8Array]",Z="[object Uint8ClampedArray]",M="[object Uint16Array]",we="[object Uint32Array]",Io=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,jn=/^(?:0|[1-9]\d*)$/,J={};J[X]=J[Se]=J[qe]=J[Ye]=J[xt]=J[z]=J[Z]=J[M]=J[we]=!0,J[c]=J[d]=J[T]=J[u]=J[L]=J[f]=J[_]=J[x]=J[m]=J[k]=J[g]=J[V]=J[O]=J[I]=J[re]=!1;var Rn=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Rn||Mo||Function("return this")(),In=t&&!t.nodeType&&t,Mn=In&&!0&&o&&!o.nodeType&&o,Yt=Mn&&Mn.exports===In,Kt=Yt&&Rn.process,Ln=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Ln&&Ln.isTypedArray;function Un(l,p){for(var y=-1,$=l==null?0:l.length,j=0,A=[];++y<$;){var W=l[y];p(W,y,l)&&(A[j++]=W)}return A}function Xt(l,p){for(var y=-1,$=p.length,j=l.length;++y<$;)l[j+y]=p[y];return l}function zn(l,p){for(var y=-1,$=l==null?0:l.length;++y<$;)if(p(l[y],y,l))return!0;return!1}function Lo(l,p){for(var y=-1,$=Array(l);++y<l;)$[y]=p(y);return $}function Uo(l){return function(p){return l(p)}}function Bt(l,p){return l.has(p)}function Zt(l,p){return l==null?void 0:l[p]}function Hn(l){var p=-1,y=Array(l.size);return l.forEach(function($,j){y[++p]=[j,$]}),y}function qn(l,p){return function(y){return l(p(y))}}function Pe(l){var p=-1,y=Array(l.size);return l.forEach(function($){y[++p]=$}),y}var St=Array.prototype,zo=Function.prototype,ct=Object.prototype,$t=Ce["__core-js_shared__"],vt=zo.toString,ke=ct.hasOwnProperty,Pn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Wn=ct.toString,Ho=RegExp("^"+vt.call(ke).replace(Io,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Yt?Ce.Buffer:void 0,Ct=Ce.Symbol,Gn=Ce.Uint8Array,Vt=ct.propertyIsEnumerable,dt=St.splice,Ve=Ct?Ct.toStringTag:void 0,Ot=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Je(Ce,"DataView"),ft=Je(Ce,"Map"),on=Je(Ce,"Promise"),rn=Je(Ce,"Set"),an=Je(Ce,"WeakMap"),rt=Je(Object,"create"),Qn=pe(nn),Ke=pe(ft),qo=pe(on),Po=pe(rn),Wo=pe(an),Yn=Ct?Ct.prototype:void 0,sn=Yn?Yn.valueOf:void 0;function ie(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Go(){this.__data__=rt?rt(null):{},this.size=0}function Qo(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}function Yo(l){var p=this.__data__;if(rt){var y=p[l];return y===r?void 0:y}return ke.call(p,l)?p[l]:void 0}function Ko(l){var p=this.__data__;return rt?p[l]!==void 0:ke.call(p,l)}function Jo(l,p){var y=this.__data__;return this.size+=this.has(l)?0:1,y[l]=rt&&p===void 0?r:p,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 p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Xo(){this.__data__=[],this.size=0}function Zo(l){var p=this.__data__,y=Dt(p,l);if(y<0)return!1;var $=p.length-1;return y==$?p.pop():dt.call(p,y,1),--this.size,!0}function vo(l){var p=this.__data__,y=Dt(p,l);return y<0?void 0:p[y][1]}function er(l){return Dt(this.__data__,l)>-1}function tr(l,p){var y=this.__data__,$=Dt(y,l);return $<0?(++this.size,y.push([l,p])):y[$][1]=p,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 p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function nr(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function or(l){var p=Oe(this,l).delete(l);return this.size-=p?1:0,p}function rr(l){return Oe(this,l).get(l)}function ar(l){return Oe(this,l).has(l)}function sr(l,p){var y=Oe(this,l),$=y.size;return y.set(l,p),this.size+=y.size==$?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 p=-1,y=l==null?0:l.length;for(this.__data__=new ge;++p<y;)this.add(l[p])}function Kn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Kn,Tt.prototype.has=Nt;function We(l){var p=this.__data__=new ce(l);this.size=p.size}function ln(){this.__data__=new ce,this.size=0}function ir(l){var p=this.__data__,y=p.delete(l);return this.size=p.size,y}function lr(l){return this.__data__.get(l)}function cr(l){return this.__data__.has(l)}function dr(l,p){var y=this.__data__;if(y instanceof ce){var $=y.__data__;if(!ft||$.length<n-1)return $.push([l,p]),this.size=++y.size,this;y=this.__data__=new ge($)}return y.set(l,p),this.size=y.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,p){var y=At(l),$=!y&&eo(l),j=!y&&!$&&Ft(l),A=!y&&!$&&!j&&oo(l),W=y||$||j||A,P=W?Lo(l.length,String):[],te=P.length;for(var Q in l)ke.call(l,Q)&&!(W&&(Q=="length"||j&&(Q=="offset"||Q=="parent")||A&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||br(Q,te)))&&P.push(Q);return P}function Dt(l,p){for(var y=l.length;y--;)if(vn(l[y][0],p))return y;return-1}function cn(l,p,y){var $=p(l);return At(l)?$:Xt($,y(l))}function pt(l){return l==null?l===void 0?Y:B:Ve&&Ve in Object(l)?Xe(l):Zn(l)}function Jn(l){return Qe(l)&&pt(l)==c}function Xn(l,p,y,$,j){return l===p?!0:l==null||p==null||!Qe(l)&&!Qe(p)?l!==l&&p!==p:fr(l,p,y,$,Xn,j)}function fr(l,p,y,$,j,A){var W=At(l),P=At(p),te=W?d:Ge(l),Q=P?d:Ge(p);te=te==c?g:te,Q=Q==c?g:Q;var de=te==g,_e=Q==g,ne=te==Q;if(ne&&Ft(l)){if(!Ft(p))return!1;W=!0,de=!1}if(ne&&!de)return A||(A=new We),W||oo(l)?dn(l,p,y,$,j,A):gr(l,p,te,y,$,j,A);if(!(y&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 A||(A=new We),j(at,Ze,y,$,A)}}return ne?(A||(A=new We),_r(l,p,y,$,j,A)):!1}function pr(l){if(!no(l)||kr(l))return!1;var p=to(l)?Ho:$e;return p.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 p=[];for(var y in Object(l))ke.call(l,y)&&y!="constructor"&&p.push(y);return p}function dn(l,p,y,$,j,A){var W=y&s,P=l.length,te=p.length;if(P!=te&&!(W&&te>P))return!1;var Q=A.get(l);if(Q&&A.get(p))return Q==p;var de=-1,_e=!0,ne=y&a?new Tt:void 0;for(A.set(l,p),A.set(p,l);++de<P;){var ue=l[de],le=p[de];if($)var at=W?$(le,ue,de,p,l,A):$(ue,le,de,l,p,A);if(at!==void 0){if(at)continue;_e=!1;break}if(ne){if(!zn(p,function(Ze,mt){if(!Bt(ne,mt)&&(ue===Ze||j(ue,Ze,y,$,A)))return ne.push(mt)})){_e=!1;break}}else if(!(ue===le||j(ue,le,y,$,A))){_e=!1;break}}return A.delete(l),A.delete(p),_e}function gr(l,p,y,$,j,A,W){switch(y){case L:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case T:return!(l.byteLength!=p.byteLength||!A(new Gn(l),new Gn(p)));case u:case f:case k:return vn(+l,+p);case _:return l.name==p.name&&l.message==p.message;case V:case I:return l==p+"";case m:var P=Hn;case O:var te=$&s;if(P||(P=Pe),l.size!=p.size&&!te)return!1;var Q=W.get(l);if(Q)return Q==p;$|=a,W.set(l,p);var de=dn(P(l),P(p),$,j,A,W);return W.delete(l),de;case G:if(sn)return sn.call(l)==sn.call(p)}return!1}function _r(l,p,y,$,j,A){var W=y&s,P=ht(l),te=P.length,Q=ht(p),de=Q.length;if(te!=de&&!W)return!1;for(var _e=te;_e--;){var ne=P[_e];if(!(W?ne in p:ke.call(p,ne)))return!1}var ue=A.get(l);if(ue&&A.get(p))return ue==p;var le=!0;A.set(l,p),A.set(p,l);for(var at=W;++_e<te;){ne=P[_e];var Ze=l[ne],mt=p[ne];if($)var Za=W?$(mt,Ze,ne,p,l,A):$(Ze,mt,ne,l,p,A);if(!(Za===void 0?Ze===mt||j(Ze,mt,y,$,A):Za)){le=!1;break}at||(at=ne=="constructor")}if(le&&!at){var ro=l.constructor,ao=p.constructor;ro!=ao&&"constructor"in l&&"constructor"in p&&!(typeof ro=="function"&&ro instanceof ro&&typeof ao=="function"&&ao instanceof ao)&&(le=!1)}return A.delete(l),A.delete(p),le}function ht(l){return cn(l,pn,yr)}function Oe(l,p){var y=l.__data__;return wr(p)?y[typeof p=="string"?"string":"hash"]:y.map}function Je(l,p){var y=Zt(l,p);return pr(y)?y:void 0}function Xe(l){var p=ke.call(l,Ve),y=l[Ve];try{l[Ve]=void 0;var $=!0}catch{}var j=Wn.call(l);return $&&(p?l[Ve]=y:delete l[Ve]),j}var yr=Ot?function(l){return l==null?[]:(l=Object(l),Un(Ot(l),function(p){return Vt.call(l,p)}))}: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 p=pt(l),y=p==g?l.constructor:void 0,$=y?pe(y):"";if($)switch($){case Qn:return L;case Ke:return m;case qo:return S;case Po:return O;case Wo:return re}return p});function br(l,p){return p=p??i,!!p&&(typeof l=="number"||jn.test(l))&&l>-1&&l%1==0&&l<p}function wr(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}function kr(l){return!!Pn&&Pn in l}function Er(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||ct;return l===y}function Zn(l){return Wn.call(l)}function pe(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function vn(l,p){return l===p||l!==l&&p!==p}var eo=Jn(function(){return arguments}())?Jn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Vt.call(l,"callee")},At=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!to(l)}var Ft=tn||Sr;function xr(l,p){return Xn(l,p)}function to(l){if(!no(l))return!1;var p=pt(l);return p==x||p==b||p==h||p==E}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function no(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}function Qe(l){return l!=null&&typeof l=="object"}var oo=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 Ga=Nn.exports,Fo={},Qa=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Fo,"__esModule",{value:!0});var Of=Qa(Wa),Tf=Qa(Ga),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=Of.default(i);c||(d=Object.keys(d).reduce(function(u,f){return d[f]!=null&&(u[f]=d[f]),u},{}));for(var h in a)a[h]!==void 0&&i[h]===void 0&&(d[h]=a[h]);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,h){return Tf.default(a[h],i[h])||(d[h]=i[h]===void 0?null:i[h]),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,h){return i[h]!==a[h]&&a[h]!==void 0&&(d[h]=i[h]),d},{});return Object.keys(a).reduce(function(d,h){return a[h]!==i[h]&&i[h]===void 0&&(d[h]=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(h,u){return a[u]===void 0&&(h[u]=i[u]),h},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(jo||(jo={})),Fo.default=jo;var Dn={},An={},Ya;function Nf(){if(Ya)return An;Ya=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});var t=o(Ja()),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 Ka;function Ja(){if(Ka)return Dn;Ka=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dn,"__esModule",{value:!0});var t=o(Nf()),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={})),Dn.default=n,Dn}var Gt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},Fn=Gt(Vf),Df=Gt(Wa),Ro=Gt(Ga),Qt=Gt(Fo),se=Gt(Ja()),Af="\0",Ff=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=Df.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()),h=n.next(d),u=r.next(d);if(typeof u.retain=="number"){var f={};typeof h.retain=="number"?f.retain=d:f.insert=h.insert;var _=Qt.default.compose(h.attributes,u.attributes,typeof h.retain=="number");if(_&&(f.attributes=_),c.push(f),!r.hasNext()&&Ro.default(c.ops[c.ops.length-1],f)){var x=new o(n.rest());return c.concat(x).chop()}}else typeof u.delete=="number"&&typeof h.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(h){if(h.insert!=null)return typeof h.insert=="string"?h.insert:Af;var u=d===t?"on":"with";throw new Error("diff() called "+u+" non-document")}).join("")}),s=new o,a=Fn.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 h=d[1].length;h>0;){var u=0;switch(d[0]){case Fn.default.INSERT:u=Math.min(c.peekLength(),h),s.push(c.next(u));break;case Fn.default.DELETE:u=Math.min(h,i.peekLength()),i.next(u),s.delete(u);break;case Fn.default.EQUAL:u=Math.min(i.peekLength(),c.peekLength(),h);var f=i.next(u),_=c.next(u);Ro.default(f.insert,_.insert)?s.retain(u,Qt.default.diff(f.attributes,_.attributes)):s.push(_).delete(u);break}h-=u}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
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&&_o.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&(C.isFunction(s)?n.paramsSerializer={serialize:s}:_o.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],b=>{delete a[b]}),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 h=[];this.interceptors.response.forEach(function(m){h.push(m.fulfilled,m.rejected)});let u,f=0,_;if(!d){const b=[vr.bind(this),void 0];for(b.unshift.apply(b,c),b.push.apply(b,h),_=b.length,u=Promise.resolve(n);f<_;)u=u.then(b[f++],b[f++]);return u}_=c.length;let x=n;for(f=0;f<_;){const b=c[f++],m=c[f++];try{x=b(x)}catch(k){m.call(this,k);break}}try{u=vr.call(this,x)}catch(b){return Promise.reject(b)}for(f=0,_=h.length;f<_;)u=u.then(h[f++],h[f++]);return u}getUri(t){t=_t(this.defaults,t);const n=Kr(t.baseURL,t.url);return Hr(n,t.params,t.paramsSerializer)}}C.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}))}}),C.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 yo{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 Ut(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 yo(function(s){t=s}),cancel:t}}}function ai(o){return function(n){return o.apply(null,n)}}function si(o){return C.isObject(o)&&o.isAxiosError===!0}const bo={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(bo).forEach(([o,t])=>{bo[t]=o});function oa(o){const t=new st(o),n=$r(st.prototype.request,t);return C.extend(n,st.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oa(_t(o,s))},n}const v=oa(Mt);v.Axios=st,v.CanceledError=Ut,v.CancelToken=yo,v.isCancel=Yr,v.VERSION=ta,v.toFormData=bn,v.AxiosError=H,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ai,v.isAxiosError=si,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Gr(C.isHTMLForm(o)?new FormData(o):o),v.getAdapter=Zr.getAdapter,v.HttpStatusCode=bo,v.default=v;let yt=null;function ii(o){yt=v.create(o)}function li(){return yt}async function ci(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 di(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function ui(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 fi(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:ci,post:di,put:fi,remove:ui,setupAxios:ii,getAxiosInstance:li};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 pi(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 pi=="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,k){return m===k?k:m===m.toLowerCase()?k.toLowerCase():m===m.toUpperCase()?k.toUpperCase():m[0]===m[0].toUpperCase()?k.charAt(0).toUpperCase()+k.substr(1).toLowerCase():k.toLowerCase()}function h(m,k){return m.replace(/\$(\d{1,2})/g,function(B,g){return k[g]||""})}function u(m,k){return m.replace(k[0],function(B,g){var S=h(k[1],arguments);return d(B===""?m[g-1]:B,S)})}function f(m,k,B){if(!m.length||s.hasOwnProperty(m))return k;for(var g=B.length;g--;){var S=B[g];if(S[0].test(k))return u(k,S)}return k}function _(m,k,B){return function(g){var S=g.toLowerCase();return k.hasOwnProperty(S)?d(g,S):m.hasOwnProperty(S)?d(g,m[S]):f(S,g,B)}}function x(m,k,B,g){return function(S){var E=S.toLowerCase();return k.hasOwnProperty(E)?!0:m.hasOwnProperty(E)?!1:f(E,E,B)===E}}function b(m,k,B){var g=k===1?b.singular(m):b.plural(m);return(B?k+" ":"")+g}return b.plural=_(i,a,n),b.isPlural=x(i,a,n),b.singular=_(a,i,r),b.isSingular=x(a,i,r),b.addPluralRule=function(m,k){n.push([c(m),k])},b.addSingularRule=function(m,k){r.push([c(m),k])},b.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}b.addPluralRule(m,"$0"),b.addSingularRule(m,"$0")},b.addIrregularRule=function(m,k){k=k.toLowerCase(),m=m.toLowerCase(),i[m]=k,a[k]=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 b.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 b.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 b.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(b.addUncountableRule),b})})(aa);var hi=aa.exports;const sa=ra(hi),wo=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",ko="RESTORE",ia="ENABLE",mi=[kn,En,xn,Bn,bt,ia];class gi{constructor(t,n,r=mi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.operations=r,this.operations.forEach(s=>{const a=wo(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(ko)){console.log(`${this.side}/${this.domain} 不支持 ${ko} 操作`);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 _i{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 yi={Client:gi,ReadOnlyClient:_i,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:ko,ENABLE:ia},bi=(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.":""))))})},wi=["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}computeWidth(t){return t.width?t.width:wi.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 Eo={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 bi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>pd),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>yd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>xd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>Vd),"./field/component/config.js":()=>Promise.resolve().then(()=>Td),"./field/date/config.js":()=>Promise.resolve().then(()=>jd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Ud),"./field/image/config.js":()=>Promise.resolve().then(()=>Yd),"./field/images/config.js":()=>Promise.resolve().then(()=>nu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>iu),"./field/json/config.js":()=>Promise.resolve().then(()=>uu),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>$u),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Au),"./field/row-id/config.js":()=>Promise.resolve().then(()=>ju),"./field/select/config.js":()=>Promise.resolve().then(()=>Uu),"./field/string/config.js":()=>Promise.resolve().then(()=>Qu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Zu),"./field/text/config.js":()=>Promise.resolve().then(()=>of),"./field/time/config.js":()=>Promise.resolve().then(()=>cf),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>pf)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function xo(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(Eo).includes(r.type)){const s=Eo[r.type];return s.deprecated&&la(r.domain||t,r.code,s.deprecated),ca(Eo[r.type].config,r,r.domain||t)}return ca("string",r,r.domain||t)})}let Bo={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function ki(o){Bo={...Bo,...o},wt=o.domainConfigs}function Ei(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 zt(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 h;return((h=d.childrenFields)==null?void 0:h.length)>0?Promise.all(d.childrenFields).then(u=>(d.childrenFields=u,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class xi{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=xo(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:xo(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))}wrapFields(t,n){return xo(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${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 xi(o,t)}const R=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},Bi={class:"card-header"},Si={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",Bi,[e.createElementVNode("span",Si,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-0f4cee53"]]),$i={key:0},Ci={key:1},Vi={key:0},Oi={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",Ci,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Vi,[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",Oi,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={},Di={style:{padding:"20px 0"}};function Ai(o,t){return e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(o.$slots,"default")])}const Fi=R(Ni,[["render",Ai]]),ji=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"]]);function K(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=wo(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Ri(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=>Ri(t))}const Ii={key:0,class:"classify-wrap"},Mi=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 h;return!((h=d.code)!=null&&h.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 h;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):(h=c[u+1])!=null&&h.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 h,u,f;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(h=r(d.field))!=null&&h.wholeRow?24:((u=c.cols)==null?void 0:u.length)==1&&!((f=d.field)!=null&&f.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var _,x;return[(_=d.field)!=null&&_.includes("classify")&&((x=r(d.field))!=null&&x.label)?(e.openBlock(),e.createElementBlock("div",Ii,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"]]),Li={style:{width:"100%"}},Ui={class:"footer"},zi={key:1},Hi=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=K(n),s=t,a=e.ref(!1),i=o,c=$o(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},h=e.reactive({...i.data}),u=e.ref(null),f=i.config.fields.filter(E=>E.rules).reduce((E,V)=>(E[V.code]=b(V.rules),E),{}),_=e.computed(S),x=e.computed(()=>i.config.fields.filter(E=>{const V=E.editable(h,r),O=E.visible(h,r);return E.disabled=O&&!V,V||O}));function b(E){return typeof E=="object"?E:typeof E=="function"?E(h):[]}function m(E){a.value=!0,s("submit",E,h,()=>{a.value=!1})}async function k(){await u.value.validate(async(E,V)=>{var G,Y;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={...h};if(O&&(I[O]=(Y=I[O])==null?void 0:Y.map(re=>re.id)),i.config.submitConfirm){await i.config.submitConfirm(I)&&m(I);return}m(I)})}function B(){s("remove",h)}function g(){if(i.config.removeConfirm){i.config.removeConfirm(h,B);return}w.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{B()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(r,h):!0}return e.watch(()=>({...h}),(E,V)=>{const I=Object.keys(E).filter(Y=>V[Y]!==E[Y]).map(Y=>{var re;return(re=u.value)==null||re.clearValidate(Y),{field:Y,newValue:E[Y],oldValue:V[Y]}});x.value.filter(Y=>!Y.disabled).forEach(Y=>{Y.formChange&&Y.formChange(h,I)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(V=>{h[V]=E[V]})},{immediate:!0}),(E,V)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:u,model:h,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(Mi,{layout:e.unref(c),fields:x.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",Li,[O!=null&&O.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.editor),{key:0,modelValue:h[O.code],"onUpdate:modelValue":I=>h[O.code]=I,field:O,disabled:O.disabled,"form-data":h,"domain-config":i.config,row:h},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",Ui,[h.id&&!h.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",type:"danger",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",zi)),_.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"]))}},[["__scopeId","data-v-5b84d1ad"]]);function qi(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const Ht={getValue:qi},Sn={__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=K(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:h.value})),d=e.computed(()=>a.config.fields.filter(m=>{var k;if(!((k=m.code)!=null&&k.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),h=e.ref(""),u=e.computed({get(){return a.modelValue},set(b){s("update:modelValue",b)}}),f=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function _(b,m,k){i.value=m,s("submit",b,async()=>{h.value=await Ht.getValue(),k()})}function x(b,m){s("remove",b,async()=>{h.value=await Ht.getValue(),m()})}return e.watch(()=>u,async()=>{h.value=await Ht.getValue()},{immediate:!0}),(b,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=k=>u.value=k),width:d.value,top:"20px",title:f.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3},{default:e.withCtx(()=>[e.createVNode(Hi,{config:a.config,data:c.value,removable:a.removable,onSubmit:_,onRemove:x},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Pi={__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=K(a),c=e.computed(()=>{const f=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},...f}}),d=da("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:c.value});Promise.all(d.fields).then(f=>{d.fields=f,d.restRepeat=t.restRepeat,d.rest=t.rest,d.formStyleConfig=c.value,s.value=d});async function h(){const f=t.rest;if(f!=null&&f.getOne){const{data:_}=await f.getOne({...t.row,...i});n.value=_}r.value=!0}function u(f,_){t.onSubmit(f,_).then(()=>{r.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),_()})}return(f,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),r.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=x=>r.value=x),title:t.text,config:s.value,data:n.value,onSubmit:u},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Wi={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",Wi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-426c7d45"]]),pa={__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(()=>gf)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(u){let f=-1;u.id&&(f=i.value.findIndex(_=>_.id===u.id)),u.url&&(f=i.value.findIndex(_=>_.url===u.url)),f>=0&&(i.value.splice(f,1),s("update:modelValue",i.value))}function h(u){console.log(u),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,u).then(f=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const _=c(f.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}),(u,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:h,onOnRemove:d},null,8,["images","props"])]))}},Ae=Te.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()}}}),qt=(o,t,n,r)=>Te.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Gi(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Co(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Co(o,t,this.filters)}}});function Gi(o,t,n,r,s){let i={...Qi(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Co(o,t,i)}function Qi(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 Co(o,t,n){const r=`filters---${t}---${o}`,s=Yi(n);return localStorage.setItem(r,JSON.stringify(s)),s}function Yi(o){return Object.keys(o).filter(t=>o[t]!=null&&o[t]!=null&&o[t]!="").reduce((t,n)=>(t[n]=o[n],t),{})}const Ki={class:"sorters-box"},Ji=["onClick"],Xi={class:"sorters-label"},Zi={class:"sorters-arrow-box"},vi=["onClick"],el=["onClick"],tl=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 h=s.value[d];for(let u=0;u<r.value.length;u++){const f=r.value[u];h.field===f.field&&(h.order=f.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,h){const u=s.value;h?u[d].order=h: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(f=>f.order))}return(d,h)=>(e.openBlock(),e.createElementBlock("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:_=>c(f,"")},[e.createElementVNode("div",Xi,e.toDisplayString(u.name),1),e.createElementVNode("div",Zi,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",u.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(_=>c(f,"ASC"),["stop"])},null,10,vi),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",u.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(_=>c(f,"DESC"),["stop"])},null,10,el)])],8,Ji))),256))]))}},[["__scopeId","data-v-9eb39193"]]),nl={class:"ranges-box"},ol={class:"range-item"},rl={class:"range-label"},al={class:"range-input-box"},sl=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,h){const u=[...s];u.forEach(f=>{f.field===d&&(f[h]=c)}),n("updateRanges",u.filter(f=>f.min||f.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,h=>(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",rl,e.toDisplayString(h.name),1),e.createElementVNode("div",al,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.min,"onUpdate:modelValue":u=>h.min=u,"controls-position":"right",class:"input-box",onChange:u=>{i(u,h.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.max,"onUpdate:modelValue":u=>h.max=u,"controls-position":"right",class:"input-box",type:"number",onChange:u=>{i(u,h.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-852a7796"]]),il={key:0},ll=R({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=U.useRoute(),s=K(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=qt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((g,S)=>{S.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(E=>{i[E]=void 0}),i.isDeleted=S.filters.isDeleted)});function h(g){return typeof g=="boolean"?g:typeof g=="function"?g(s):!0}async function u(g,S){var E;if(typeof g.options=="function")c[g.code]=await g.options(i,s,S);else if(Array.isArray(g.options))c[g.code]=g.options;else if(typeof g.options=="object"){const V=g.options.getOneUrl?g.options.getOneUrl:g.options.url;if(!S&&Array.isArray(i[g.code])&&i[g.code].length>0)c[g.code]=[],i[g.code].forEach(O=>{V.getOne({id:O}).then(I=>{c[g.code].push({code:I.data[g.options.data.value]||I.data.id,name:I.data[g.options.data.label]||I.data.name})})});else if(!S&&!Array.isArray(i[g.code])&&i[g.code])V.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(),I=g.options.method?g.options.method:"getList";g.options.url[I]({...g.options.query,[O]:S}).then(G=>{c[g.code]=G.data.rows.map(Y=>({code:Y[g.options.data.value]||Y.id,name:Y[g.options.data.label]||Y.name}))})}}if(c[g.code]&&g.type!="tree-select"){const V=c[g.code].map(O=>O.code);i[g.code]&&(g.multiple?i[g.code]=i[g.code].filter(O=>(console.log(V.includes(O)),V.includes(O))):i[g.code]=(E=c[g.code].find(O=>O.code==i[g.code]))==null?void 0:E.code,k())}}function f(g){if(g.remote)return S=>{u(g,S)}}function _(g){i.sorters=g,k()}function x(g){i.filters=g}function b(){Object.keys(i).forEach(g=>{i[g]=void 0}),a.value=Object.keys(t.settings.filters).filter(g=>h(t.settings.filters[g].visible)).map(g=>{const S={...t.settings.filters[g],code:g};return i[g]=m(g),(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(g=>g.code!=="isDeleted")}function m(g){const S=t.settings.filters[g],E=d.validFilters[g];return S.type==="boolean"&&typeof E!="boolean"?S.value:E}function k(){let g=JSON.parse(JSON.stringify(i));const S=t.settings.filterHook;S!=null&&S.preSubmit&&(g=S.preSubmit(g,s)),g!==!1&&d.change(g)}function B(){d.$reset({}),b(),k()}return e.watch(()=>t.settings,()=>{b(),k()},{immediate:!0}),e.watch(()=>({...i}),(g,S)=>{const V=Object.keys(g).filter(O=>S[O]!==g[O]).map(O=>({field:O,newValue:g[O],oldValue:S[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,V)})}),(g,S)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",il,[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:k},{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":f(E),"value-on-clear":null,onChange:k},{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:k},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(tl,{key:3,value:i[E.code],sorters:E,onUpdateSorters:_},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(sl,{key:4,value:i[E.code],ranges:E,onUpdateRanges:x},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":f(E),onCheck:k,onChange:k},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),{type:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(w.ElButton),{onClick:B},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a79425a9"]]);/*! Element Plus Icons Vue v2.3.1 */var cl=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"})]))}}),dl=cl,ul=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"})]))}}),fl=ul,pl=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=pl,hl=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=hl,ml=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"})]))}}),gl=ml,_l=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"})]))}}),yl=_l,bl=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=bl,wl=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"})]))}}),kl=wl,El=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"})]))}}),xl=El,Bl=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=Bl,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"})]))}}),$l=Sl,Cl=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"})]))}}),Vl=Cl,Ol=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"})]))}}),Vo=Ol,Tl=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=Tl,Nl=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"})]))}}),Dl=Nl,Al=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"})]))}}),Fl=Al,jl=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"})]))}}),Rl=jl,Il=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"})]))}}),Ml=Il;const Ll={class:"data-page-title"},Ul={class:"title"},zl={class:"data-page-toolbar"},Hl=R({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=t.tableName?t.tableName:t.settings.name,r=U.useRoute(),s=Ae(),a=qt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1),d=e.computed(()=>t.settings.displayMode.normalMode);function h(){a.$reset({isDeleted:!c.value})}function u(){const _=`table-view-${r.path}-${t.settings.code}`,x=localStorage.getItem(_)?localStorage.getItem(_):d.value;s.change(x)}function f(_){s.change(_);const x=`table-view-${r.path}-${t.settings.code}`;localStorage.setItem(x,s.mode)}return e.onMounted(u),(_,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ll,[e.createElementVNode("div",Ul,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",zl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:f},{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(xl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(dl))]),_: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(c.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(Fl))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(ll,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-fbc6f7d9"]]),ql={class:"kst-field-row-id"},Pl={key:0},Wl={key:1,class:"mono-data"},Gl={key:1},ba=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:{...K(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,K(n))}return(d,h)=>{const u=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",ql,[a.value?(e.openBlock(),e.createElementBlock("span",Pl,[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",Wl,[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",Gl," NO ID "))])}}},[["__scopeId","data-v-f68a9cd4"]]);function Ql(o){w.ElMessage(o)}const Yl={show:Ql},wa=10,$n=Te.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=wa&&(this.history=this.history.slice(2-wa),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 b;const t=$n(),n=Ae(),r=U.useRoute(),s=U.useRouter(),a=K(r),i=o,c=e.ref({}),d=e.ref(!1),h=e.computed(()=>{var m,k;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((k=i.operations)!=null&&k.removable)}),u=e.ref((b=i.operations)==null?void 0:b.removable);async function f(){const m=i.settings.formHook,k=i.settings.btnVisible,B=i.settings.rest,{data:g}=await B.getOne({...i.row,...a});c.value=g,m.setupUpdate&&(c.value=m.setupUpdate(c.value,a)),k.showRemove&&(u.value=k.showRemove(c.value)),d.value=!0}function _(m,k){const B=i.settings.formHook,g=i.settings.rest;Object.keys(a).forEach(S=>{m[S]=a[S]}),B!=null&&B.preUpdateSubmit&&(m=B.preUpdateSubmit(m)),g.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{k()})}function x(m,k){i.settings.rest.remove(m).then(()=>{Yl.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(g=>{r.fullPath.includes(g.path)&&(t.remove(g.code),s.back())}),n.fireRemoved()}).catch(()=>{k()})}return(m,k)=>h.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"primary",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:d.value,"onUpdate:modelValue":k[0]||(k[0]=B=>d.value=B),config:i.settings,data:c.value,removable:u.value,onSubmit:_,onRemove:x},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Kl=o=>(e.pushScopeId("data-v-af19c26f"),o=o(),e.popScopeId(),o),Jl={class:"data-grid-wrapper"},Xl={key:0,class:"cover"},Zl=Kl(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),vl={class:"header"},ec={key:0},tc={class:"key"},nc={class:"value"},oc={key:1,class:"footer tools"},rc=R({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=U.useRoute(),n=K(t),r=e.useSlots(),s=o,a=qt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Te.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),h=e.shallowRef(null),u=e.ref(!1);async function f(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{f().then(B=>{u.value=B})});const _=e.computed(()=>{var B,g;return!!((B=s.operations)!=null&&B.updatable&&u||(g=s.operations)!=null&&g.removable&&u)}),x=e.computed(()=>s.settings.displayMode.gridWidth),b=e.computed(()=>s.settings.displayMode.heightAuto);function m(){h.value=s.settings.fields.find(B=>B.code==="id"),d.value=s.settings.fields.filter(B=>B.code===s.settings.coverField||B.code===s.settings.nameField||B.code==="id"?!1:B.showInList(n,c.value))}function k(B){return s.settings.nameField?B[s.settings.nameField]:B.name?B.name:`${B.id}`}return e.watch(i,B=>{c.value=B,m()}),m(),(B,g)=>(e.openBlock(),e.createElementBlock("div",Jl,[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:x.value?x.value:24,xs:x.value?{}:24,sm:x.value?{}:12,md:x.value?{}:8,lg:x.value?{}:6,xl:x.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",Xl,[e.unref(r).cover?e.renderSlot(B.$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(()=>[Zl]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",vl,[e.createVNode(ba,{field:h.value,row:S},e.createSlots({_:2},[S[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k(S)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(b.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",ec,[e.renderSlot(B.$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",tc,e.toDisplayString(E.label)+" ",1),e.createElementVNode("div",nc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:S,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||_.value?(e.openBlock(),e.createElementBlock("div",oc,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:S},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(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 ac(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 ka=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=K(n),s=t,a=e.useSlots(),i=o,c=qt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Te.storeToRefs(c),h=e.ref(d.value),u=e.shallowRef([]),f=e.ref(!1);async function _(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{_().then(g=>{f.value=g})});const x=e.computed(()=>{var g,S;return!!((g=i.operations)!=null&&g.updatable&&f.value||(S=i.operations)!=null&&S.removable&&f.value)});function b(g){s("sort-column",g)}function m(g){s("enable-item",g)}function k(){var S,E;const g=[...i.settings.fields];if((S=i.settings)!=null&&S.extendTableColumnfields){const V=i.settings.extendTableColumnfields((E=i.data)==null?void 0:E[0]);g.push(...V)}u.value=g.filter(V=>V.showInList(r,h.value))}function B(g){s("select-change",{routeQuery:r,data:g})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(ac(i.settings,i.data[0]),k())}),e.watch(d,g=>{h.value=g,k()}),(g,S)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:B,onSortChange:b},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:E.code,label:E.label,width:E.width,prop:E.code,sortable:E.sortable?"custom":!1,fixed:E.fixed},e.createSlots({_:2},[E.type==="switch"?{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:V,mode:"list",onEnable:m},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{key:V.updatedAt,field:E,row:V,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:E})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"actions",{row:E},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:E})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:E,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-05d64a3c"]]),sc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Ae();t.$reset();const{mode:n}=Te.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=rc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(r),(h,u)=>({name:u,fn:e.withCtx(f=>[e.renderSlot(c.$slots,u,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040))}},ic={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){const t=Ae(),n=U.useRoute(),r=K(n),s=o,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var f;return await((f=s.operations)==null?void 0:f.creatable)}e.watchEffect(()=>{d().then(f=>{c.value=f})});async function h(){const f=s.settings.formHook,_=s.settings.fields.reduce((x,b)=>(x[b.code]=b.default,x),{});a.value=_,f.setupCreate&&(a.value=f.setupCreate(a.value,r)),i.value=!0}function u(f,_){const x=s.settings.formHook,b=s.settings.rest;Object.keys(r).forEach(m=>{f[m]=r[m]}),x!=null&&x.preCreateSubmit&&(f=x.preCreateSubmit(f)),b.create(f).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{_()})}return(f,_)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=x=>i.value=x),config:s.settings,data:a.value,removable:!1,onSubmit:u},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=U.useRouter(),n=Ae(),r=o,s=e.shallowRef([]);let a="";async function i(d,h){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,h);return}const u=await Ht.getValue();try{await d.action({...h,...r.query,idempotentToken:u}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,h){t.push(d.path(h,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,h)=>(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:f=>i(u,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},lc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Ae(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var u,f;return((f=(u=n.tableDataSelect)==null?void 0:u.data)==null?void 0:f.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 f=await Ht.getValue();try{await u.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:f}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function h(u){return typeof h=="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,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h(_.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:x=>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:x=>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"},dc=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),h=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 u(_){i.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function f(_){c.value=_,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(_,x)=>(e.openBlock(),e.createElementBlock("div",cc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":h.value,total:d.value,"current-page":o.page,layout:"total,sizes, prev, pager, next",onCurrentChange:u,onSizeChange:f},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-d595522f"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function uc(o){return typeof o=="function"?o():e.unref(o)}function fc(o){return o}function pc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function hc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function mc(o){var t;const n=uc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const gc=Ba?window:void 0;function _c(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),hc(r,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Sa[$a]=Sa[$a]||{};var Ca=Object.getOwnPropertySymbols,yc=Object.prototype.hasOwnProperty,bc=Object.prototype.propertyIsEnumerable,wc=(o,t)=>{var n={};for(var r in o)yc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Ca)for(var r of Ca(o))t.indexOf(r)<0&&bc.call(o,r)&&(n[r]=o[r]);return n};function Va(o,t,n={}){const r=n,{window:s=gc}=r,a=wc(r,["window"]);let i;const c=_c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},h=e.watch(()=>mc(o),f=>{d(),c.value&&s&&f&&(i=new ResizeObserver(t),i.observe(f,a))},{immediate:!0,flush:"post"}),u=()=>{d(),h()};return pc(u),{isSupported:c,stop:u}}var Oa;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Oa||(Oa={}));var kc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ec=Object.prototype.hasOwnProperty,xc=Object.prototype.propertyIsEnumerable,Na=(o,t,n)=>t in o?kc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Bc=(o,t)=>{for(var n in t||(t={}))Ec.call(t,n)&&Na(o,n,t[n]);if(Ta)for(var n of Ta(t))xc.call(t,n)&&Na(o,n,t[n]);return o};Bc({linear:fc},{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=R({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,xt;e.useCssVars(z=>({"9468e502":qe.value}));const t=U.useRoute(),n=K(t),r=o,s=qt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=Te.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,z=>{g.value=z,G()});const c=Ae(),{created:d,updated:h,removed:u}=Te.storeToRefs(c);e.watch([d,h,u],([z,Z,M])=>{(z||Z||M)&&G()});const f=e.ref(!0),_=e.ref([]),x=e.ref(0),b=e.ref({}),m=e.ref({}),k=e.ref(null),B=e.ref(null),g=e.ref({}),S=e.ref(parseInt(t.query.pageSize)||30),E=e.ref(parseInt(t.query.page)||1),V=(xt=r.hasMany)==null?void 0:xt.tableContentHeight;function O(z){let Z=null;if(z.order==="ascending"?Z="ASC":z.order==="descending"&&(Z="DESC"),g.value.sorters){let M=[];g.value.sorters.some(we=>we.field===z.prop)?g.value.sorters.forEach(we=>{we.field===z.prop&&(we.order=Z,we.name||M.push(we)),we.name&&M.push(we)}):M=[...g.value.sorters,{field:z.prop,order:Z}],g.value.sorters=M}else g.value.sorters=[{field:z.prop,order:Z}];G()}function I(){m.value=r.settings.operations(n)}function G(z){f.value=!0;const Z={...g.value,...n,...r.query,page:z=="again"?E.value-1:E.value,size:S.value};r.settings.rest.getList(Z).then(M=>{b.value.data=[],_.value=M.data.rows,x.value=M.data.count,f.value=!1,x.value&&_.value.length==0&&G("again")})}function Y(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 T(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){b.value=z}const X=e.ref(0),Se=e.ref(0);Va(k,z=>{var Z;X.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0}),Va(B,z=>{var Z;Se.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0});const qe=e.computed(()=>V&&x.value>0?`${V}px`:`calc(100% - ${X.value+Se.value}px)`);return I(),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:k},[e.createVNode(Hl,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(lc,{settings:r.settings,"table-data-select":b.value,query:e.unref(n),"filter-form":g.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(ic,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(sc,{class:"data-table-box",data:_.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:T,onSelectChange:L},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:M})=>[e.createVNode(Ea,{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),f.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:B},[e.createVNode(dc,{page:E.value,size:S.value,total:x.value,onPageChange:Y},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a2219e6e"]]);/*! Element Plus v2.7.2 */var Sc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const $c={__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"]))]))}},Cc={class:"header-box"},Vc={class:"header-box-left"},Oc={class:"page-title"},Tc={class:"tabs-container"},Nc={class:"user-profile"},Dc=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=x();r.setupRootPath("首页",`/${i}/home`);function d(b){var S,E;const m=b.meta.side,k=b.params.domain;let B=(S=b.meta)==null?void 0:S.title,g=(E=b.meta)==null?void 0:E.code;if(m&&k){B=So()[m][b.params.domain].name,g=b.params.domain;const V=b.params.id;V&&V!="detail"&&(B=`${B} - ${b.params.id}`,g=`${b.params.domain}-${b.params.id}`)}else{const V=c.find(O=>O.route===b.path);V&&(B=V.title,g=V.route)}B&&g&&(r.push(B,g,b.fullPath),s.value=g)}function h(b){const m=r.history.find(k=>k.code==b.props.name);t.push(m.path)}function u(b){if(r.remove(b),b==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const f=(b,m)=>{const k=r.history.length;return b===0&&m==="self"||b<2&&m==="left"||b===k-1&&m==="right"||k===1&&m==="all"?!1:!(k<2&&m==="other")};function _(b,m){const k=[],B=r.history;switch(m){case"self":k.push(B[b].code);break;case"left":for(let g=0;g<b;g++)g!==0&&k.push(B[g].code);break;case"right":for(let g=b+1;g<B.length;g++)k.push(B[g].code);break;case"all":for(let g=0;g<B.length;g++)g!==0&&k.push(B[g].code);break;case"other":for(let g=1;g<B.length;g++)g!==b&&k.push(B[g].code);break}for(let g=0;g<k.length;g++)u(k[g])}function x(){return a.config.sideMenus[i].map(b=>b.children?b.children:b).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(b,m)=>(e.openBlock(),e.createElementBlock("div",Cc,[e.createElementVNode("div",null,[e.createElementVNode("div",Vc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",Oc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Tc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=k=>s.value=k),type:"card",class:"tabs",onTabClick:h,onTabRemove:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(k,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:k.title!="首页",label:k.title,name:k.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(()=>[f(B,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:g=>_(B,"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),f(B,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:g=>_(B,"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),f(B,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:g=>_(B,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(gl))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(B,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:g=>_(B,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref($l))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(B,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:g=>_(B,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Vl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode($c,{content:k.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]=k=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})])]),e.createElementVNode("div",Nc,[e.renderSlot(b.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-6ea136f7"]]),Ac=o=>(e.pushScopeId("data-v-7bee87da"),o=o(),e.popScopeId(),o),Fc={key:2,class:"dot-wrapper"},jc=[Ac(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Da=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(Da,{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",Fc,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-7bee87da"]]),Rc=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),null,{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),h=>(e.openBlock(),e.createBlock(Da,{data:h},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-a1adb5f0"]]),Ic=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(Sc)},{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(Dc,{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(()=>[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Rc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-1735d819"]]),Mc={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 zt(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",Mc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-34bb8e6d"]]),Lc={key:0},Uc={class:"key"},zc={class:"value"},Hc={key:1,class:"loading-wrapper"},Fa=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=K(s),i=Ae(),{updated:c}=Te.storeToRefs(i),d=e.ref(null),h=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.computed(()=>r.settings.fields.filter(k=>k.showInDetail(d.value,{...a,...r.query}))),f=e.computed(()=>u.value.find(k=>k.code===r.settings.coverField)),_=e.computed(()=>u.value.filter(k=>!h.includes(k.type)&&!k.extendDetail)),x=e.computed(()=>{var B;const k=(B=f.value)==null?void 0:B.code;return u.value.filter(g=>h.includes(g.type)||g.extendDetail).filter(g=>g.code!==k)}),b=e.computed({get(){return x.value.map(k=>k.code)},set(k){}});function m(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{m()},{immediate:!0}),(k,B)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",Lc,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[f.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(f.value.display),{field:f.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:f.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(_.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:g.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,e.toDisplayString(g.label),1),e.createElementVNode("div",zc,[g.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.display),{key:1,field:g,row:d.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),x.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:b.value,"onUpdate:modelValue":B[0]||(B[0]=g=>b.value=g),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:g.label,name:g.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.display),{field:g,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Hc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-ce863b1a"]]),qc={key:0},Pc={class:"group-item-head"},Wc={class:"key"},Gc={class:"value"},Qc={key:1,class:"loading-wrapper"},Yc=R({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute();K(s);const a=Ae(),{updated:i}=Te.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],h=e.computed(()=>{var f,_;return((_=(f=r.settings)==null?void 0:f.detailGroupFields)==null?void 0:_.map(x=>{var m,k,B,g;const b=((k=(m=x==null?void 0:x.childrenFields)==null?void 0:m.filter(S=>d.includes(S.type)||S.extendDetail))==null?void 0:k.filter(S=>S.code!==(x==null?void 0:x.coverField)))||[];return{...x,coverField:(B=x==null?void 0:x.childrenFields)==null?void 0:B.find(S=>S.code===x.coverField),detailFields:(g=x==null?void 0:x.childrenFields)==null?void 0:g.filter(S=>!d.includes(S.type)&&!S.extendDetail),extendFields:b,activeFields:(b==null?void 0:b.map(S=>S.code))||[]}}))||[]});function u(){r.settings.rest.getOne(r.query).then(f=>{f.data.isDeleted=!!f.data.deletedAt,c.value=f.data,n("done",f.data)})}return e.watch(i,()=>{u()},{immediate:!0}),(f,_)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${x.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[x.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(x.coverField.display),{field:x.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:x.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(x.detailFields,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:b.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Wc,e.toDisplayString(b.label),1),e.createElementVNode("div",Gc,[b.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{key:1,field:b,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),x&&x.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:x.activeFields,"onUpdate:modelValue":b=>x.activeFields=b,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.extendFields,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:b.label,name:b.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[x.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Qc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-efd9932c"]]),Kc={class:"data-page-title"},Jc={class:"title"},Xc=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=K(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const h=s.settings;if(h.displayMode.normalMode=="detail")a.value=`${h.name}`;else{const f=`${h.formatName(d)}`;a.value=f?`${h.name}:${f}`:`${h.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,h)=>(e.openBlock(),e.createElementBlock("div",Kc,[e.createElementVNode("div",Jc,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(Ea,{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-f200a348"]]),Zc=R({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=K(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(h){a.value=h.props.name,t.push({name:`${n.meta.side}-association`,params:{association:h.props.name},query:r})}function d(h){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const u=s.associations.find(f=>f.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},h&&h()}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}),(h,u)=>{const f=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]=_=>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(f,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bb704011"]]),vc={__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(ja,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},ed=R({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){U.useRouter();const t=U.useRoute(),n=K(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,h;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(Xc,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(h=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&h.length?(e.openBlock(),e.createBlock(Yc,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(Fa,{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(Zc,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(vc,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-f928d31a"]]),td={key:1,class:"loading-wrapper"},ja=R({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=K(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);zt(s,a).then(h=>{const u=h,f=d("has-many",u.hasMany(r)),_=d("has-one",u.hasOne(r));i.value=u,c.value=_.concat(f)});function d(h,u){return(u||[]).map(f=>typeof f=="object"?{type:h,domain:f.code,name:f.name,tableName:f.tableName,tableContentHeight:f.tableContentHeight,query:f.query||(()=>({}))}:{type:h,domain:f,name:So()[s][f].name,query:()=>({})})}return(h,u)=>i.value?(e.openBlock(),e.createBlock(ed,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",td,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-595a829e"]]),nd={key:0},od={key:1,class:"loading-wrapper"},rd=R({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=U.useRoute(),n=t.meta.side,r=K(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{zt(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",nd,[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(Fa,{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",od,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-fa1c18aa"]]),ad={key:0},sd={class:"file-name"},id={class:"name"},ld={class:"file-type"},cd={key:1},dd=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",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",sd,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",id,e.toDisplayString(c.name),1),e.createElementVNode("span",ld,"."+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(kl))]),_: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(Ml))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",cd,[e.createVNode(fe)]))}},[["__scopeId","data-v-76764c63"]]),ud={__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(()=>bf)),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 f=a.value.findIndex(_=>_.id===u.id);a.value.splice(f,1)}async function d(u){const f=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(u.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await f.updateFilesName(u).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function h(u,f){if(f=="success"){i(u),r("update:modelValue",a.value);return}if(f=="remove"){c(u),r("update:modelValue",a.value);return}if(f=="change"){d(u);return}}return(u,f)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:f[0]||(f[0]=_=>h(_,"success")),onOnRemove:f[1]||(f[1]=_=>h(_,"remove")),onOnChange:f[2]||(f[2]=_=>h(_,"change"))},null,8,["pics","props"]))}};class fd extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=dd,this.editor=ud,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const pd=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"})),hd={key:3},md=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:{...K(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),h=e.ref("");let u=null;const f=zt(s,r).then(m=>(u=m.formatName,Promise.resolve(m.rest)));function _(m){return n.field.isRouter(n.row,K(t))&&!K(t)[n.field.code]}function x(){f.then(m=>{var S;c.value=!0;const k=n.row[n.field.code],B=n.row[wo(`${r}-name`)];if(!k){b(!1),c.value=!1;return}if(k&&B){b({id:k,name:B}),c.value=!1;return}if((S=n.field)!=null&&S.notGetOne){b({id:k,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const g={id:k};m.getOne(g).then(E=>{b(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function b(m){if(d.value=!1,n.field.showName){la(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),h.value=m[n.field.showName];return}if(n.field.formatter){h.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){h.value=m.name;return}if(!m){d.value=!0;return}h.value=u(m)}return e.watch(()=>n.row,x,{immediate:!0}),(m,k)=>{const B=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})):_(o.row)?(e.openBlock(),e.createBlock(B,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",hd,e.toDisplayString(h.value),1))])}}},[["__scopeId","data-v-4fc1db1d"]]),gd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(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 h(){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,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[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:h},{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 _d 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=md,this.editor=gd,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 yd=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"})),bd={style:{display:"flex","align-items":"center"}},wd={__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",bd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Rl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(fl))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Dl))]),_:1}))]))}},kd={__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 Ed extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=wd,this.editor=kd,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const xd=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"})),Bd={key:0},Sd={__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",Bd,e.toDisplayString(r.value),1))]))}},$d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(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 h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(u,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=_=>i.value=_),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:h},null,8,["modelValue","props","options"]))}};class Cd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=Sd,this.editor=$d,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Cd},Symbol.toStringTag,{value:"Module"}));class Od extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Td=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),Nd={key:0},Dd={__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",Nd,e.toDisplayString(r.value),1))}},Ad={__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 Fd extends ee{constructor(t,n){super(t,n),this.display=Dd,this.editor=Ad,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const jd=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),Rd={key:0},Id={__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",Rd,e.toDisplayString(r.value),1))}},Md=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 Ld extends ee{constructor(t,n){super(t,n),this.display=Id,this.editor=Md,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),Ra=o=>(e.pushScopeId("data-v-14af5b5e"),o=o(),e.popScopeId(),o),zd={class:"loading-error"},Hd=Ra(()=>e.createElementVNode("div",null,"加载失败",-1)),qd={key:1,class:"loading-error"},Pd=[Ra(()=>e.createElementVNode("div",null,"暂无",-1))],Wd=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],r.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(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":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",zd,[Hd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",qd,Pd))],2))}},[["__scopeId","data-v-14af5b5e"]]),Gd={__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(()=>Ef)),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 Qd extends ee{constructor(t,n){super(t,n),this.display=Wd,this.editor=Gd,this.props=t.props||{},this.checkValidProperties(t)}}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Qd},Symbol.toStringTag,{value:"Module"})),Ia=o=>(e.pushScopeId("data-v-e4bc2c79"),o=o(),e.popScopeId(),o),Kd={class:"image-card",style:{"margin-bottom":"20px"}},Jd={class:"loading-error"},Xd=Ia(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Zd={key:1,class:"loading-error"},vd=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],eu=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",Kd,[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",Jd,[Xd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Zd,vd))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-e4bc2c79"]]);class tu extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=eu,this.editor=pa,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),ou={key:0},ru={__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",ou,e.toDisplayString(r.value),1))}},au={__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 su extends ee{constructor(t,n){super(t,n),this.display=ru,this.editor=au,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 iu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"})),lu={__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]=h=>a.value=h),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class du extends ee{constructor(t,n){super(t,n),this.display=lu,this.editor=cu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const uu=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"}));var F=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},N=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,kt,Pt,Fe,je,Re,Ie,Me,Le,Ue,ze,lt,Et,nt,Cn,ot;const fu=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},D="0123456789abcdef".split(""),pu=[-2147483648,8388608,32768,128],xe=[24,16,8,0],Vn=[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 hu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),kt.set(this,void 0),Pt.set(this,void 0),Fe.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),Et.set(this,void 0),nt.set(this,void 0),Cn.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,F(this,it,oe)):F(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Fe,3238371032),F(this,je,914150663),F(this,Re,812702999),F(this,Ie,4144912697),F(this,Me,4290775857),F(this,Le,1750603025),F(this,Ue,1694076839),F(this,ze,3204075428)):(F(this,Fe,1779033703),F(this,je,3144134277),F(this,Re,1013904242),F(this,Ie,2773480762),F(this,Me,1359893119),F(this,Le,2600822924),F(this,Ue,528734635),F(this,ze,1541459225)),F(this,tt,F(this,ot,F(this,Ee,F(this,Et,0)))),F(this,kt,F(this,lt,!1)),F(this,Pt,!0),F(this,nt,t)}update(t){if(N(this,kt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=N(this,it);for(;r<s;){let i;if(N(this,lt)&&(F(this,lt,!1),a[0]=N(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=N(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=N(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])}F(this,Cn,i),F(this,Ee,N(this,Ee)+(i-N(this,ot))),i>=64?(F(this,tt,a[16]),F(this,ot,i-64),this.hash(),F(this,lt,!0)):F(this,ot,i)}return N(this,Ee)>4294967295&&(F(this,Et,N(this,Et)+(N(this,Ee)/4294967296<<0)),F(this,Ee,N(this,Ee)%4294967296)),this}finalize(){if(N(this,kt))return;F(this,kt,!0);const t=N(this,it),n=N(this,Cn);t[16]=N(this,tt),t[n>>2]|=pu[n&3],F(this,tt,t[16]),n>=56&&(N(this,lt)||this.hash(),t[0]=N(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]=N(this,Et)<<3|N(this,Ee)>>>29,t[15]=N(this,Ee)<<3,this.hash()}hash(){let t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze);const h=N(this,it);let u,f,_,x,b,m,k,B,g,S;for(let E=16;E<64;++E)x=h[E-15],u=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,x=h[E-2],f=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,h[E]=h[E-16]+u+h[E-7]+f<<0;S=n&r;for(let E=0;E<64;E+=4)N(this,Pt)?(N(this,nt)?(k=300032,x=h[0]-1413257819,d=x-150054599<<0,s=x+24177077<<0):(k=704751109,x=h[0]-210244248,d=x-1521486534<<0,s=x+143694565<<0),F(this,Pt,!1)):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),k=t&n,_=k^t&r^S,m=a&i^~a&c,x=d+f+m+Vn[E]+h[E],b=u+_,d=s+x<<0,s=x+b<<0),u=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),f=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),B=s&t,_=B^s&n^k,m=d&a^~d&i,x=c+f+m+Vn[E+1]+h[E+1],b=u+_,c=r+x<<0,r=x+b<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),g=r&s,_=g^r&t^B,m=c&d^~c&a,x=i+f+m+Vn[E+2]+h[E+2],b=u+_,i=n+x<<0,n=x+b<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),S=n&r,_=S^n&s^g,m=i&c^~i&d,x=a+f+m+Vn[E+3]+h[E+3],b=u+_,a=t+x<<0,t=x+b<<0;F(this,Fe,N(this,Fe)+t<<0),F(this,je,N(this,je)+n<<0),F(this,Re,N(this,Re)+r<<0),F(this,Ie,N(this,Ie)+s<<0),F(this,Me,N(this,Me)+a<<0),F(this,Le,N(this,Le)+i<<0),F(this,Ue,N(this,Ue)+c<<0),F(this,ze,N(this,ze)+d<<0)}hex(){this.finalize();const t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze);let h=D[t>>28&15]+D[t>>24&15]+D[t>>20&15]+D[t>>16&15]+D[t>>12&15]+D[t>>8&15]+D[t>>4&15]+D[t&15]+D[n>>28&15]+D[n>>24&15]+D[n>>20&15]+D[n>>16&15]+D[n>>12&15]+D[n>>8&15]+D[n>>4&15]+D[n&15]+D[r>>28&15]+D[r>>24&15]+D[r>>20&15]+D[r>>16&15]+D[r>>12&15]+D[r>>8&15]+D[r>>4&15]+D[r&15]+D[s>>28&15]+D[s>>24&15]+D[s>>20&15]+D[s>>16&15]+D[s>>12&15]+D[s>>8&15]+D[s>>4&15]+D[s&15]+D[a>>28&15]+D[a>>24&15]+D[a>>20&15]+D[a>>16&15]+D[a>>12&15]+D[a>>8&15]+D[a>>4&15]+D[a&15]+D[i>>28&15]+D[i>>24&15]+D[i>>20&15]+D[i>>16&15]+D[i>>12&15]+D[i>>8&15]+D[i>>4&15]+D[i&15]+D[c>>28&15]+D[c>>24&15]+D[c>>20&15]+D[c>>16&15]+D[c>>12&15]+D[c>>8&15]+D[c>>4&15]+D[c&15];return N(this,nt)||(h+=D[d>>28&15]+D[d>>24&15]+D[d>>20&15]+D[d>>16&15]+D[d>>12&15]+D[d>>8&15]+D[d>>4&15]+D[d&15]),h}toString(){return this.hex()}digest(){this.finalize();const t=N(this,Fe),n=N(this,je),r=N(this,Re),s=N(this,Ie),a=N(this,Me),i=N(this,Le),c=N(this,Ue),d=N(this,ze),h=[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 N(this,nt)||h.push(d>>24&255,d>>16&255,d>>8&255,d&255),h}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(N(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,N(this,Fe)),n.setUint32(4,N(this,je)),n.setUint32(8,N(this,Re)),n.setUint32(12,N(this,Ie)),n.setUint32(16,N(this,Me)),n.setUint32(20,N(this,Le)),n.setUint32(24,N(this,Ue)),N(this,nt)||n.setUint32(28,N(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,kt=new WeakMap,Pt=new WeakMap,Fe=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,Et=new WeakMap,nt=new WeakMap,Cn=new WeakMap,ot=new WeakMap;function mu(o){const t=new hu;return t.update(o),parseInt(t.hex().substring(0,8),16)}const gu=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},_u=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 yu{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=mu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=fu)}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 _u.apply(this,n)}hex(t){var n=this.rgb(t);return gu(n)}}const bu=new yu;function wu(o){const t=bu.hex(`abc${o}cba`);return ku(t.replace("#",""),-20)}function ku(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 Ma={strToHexColor:wu},Eu={key:0,class:"radio-fields"},xu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=K(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 h=await r.field.options(r.row,n);if(!h){s.value="<无>",a.value=!1;return}let u="";if(u=h.filter(f=>d===f.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(f=>({bgColor:Ma.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",Eu,[(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-44339b2b"]]),Bu={__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=K(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 h(){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,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=_=>i.value=_),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:h},{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 Su extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=xu,this.editor=Bu,this.checkValidProperties(t)}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Su},Symbol.toStringTag,{value:"Module"})),Cu={class:"editor-field"},Vu=["innerHTML"],Ou=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",Cu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Vu)]))}},[["__scopeId","data-v-e54b04b3"]]),Tu={style:{width:"100%"}},Nu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mf)),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",Tu,[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 Du extends ee{constructor(t,n){super(t,n),this.display=Ou,this.editor=Nu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"}));class Fu extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=ba,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 ju=Object.freeze(Object.defineProperty({__proto__:null,default:Fu},Symbol.toStringTag,{value:"Module"})),Ru={key:0,class:"select-fields"},Iu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=K(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 h=await r.field.options(r.row,n);if(!h){s.value="<无>",a.value=!1;return}let u=[];if(r.field.multiple?u=h.filter(f=>d.includes(f.code)):u=h.filter(f=>d===f.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(f=>({bgColor:Ma.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",Ru,[(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-9962eab5"]]),Mu={__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=K(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 h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[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:h},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 Lu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Iu,this.editor=Mu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const Uu=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),zu={key:0},Hu={__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,h)=>d[h],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",zu,e.toDisplayString(r.value),1))}},qu={class:"annotation"},Pu={class:"annotation"},Wu=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",qu,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",Pu,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-449013dd"]]);class Gu extends ee{constructor(t,n){super(t,n),this.display=Hu,this.editor=Wu,this.formatter=t.formatter,this.checkValidProperties(t)}}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Gu},Symbol.toStringTag,{value:"Module"})),Yu={style:{display:"flex","align-items":"center"}},Ku={__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((h,u)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",Yu,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),size:"small",disabled:!!s.value,"before-change":h=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Ju={__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 Xu extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=Ku,this.editor=Ju,this.checkValidProperties(t)}}const Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),vu={key:0},ef={__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",vu,e.toDisplayString(r.value),1))}},tf={__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 nf extends ee{constructor(t,n){super(t,n),this.display=ef,this.editor=tf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}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(){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",rf,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 lf extends ee{constructor(t,n){super(t,n),this.display=af,this.editor=sf,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:lf},Symbol.toStringTag,{value:"Module"})),df=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,h)=>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"]]),uf={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=K(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function h(_){c.value=await a.field.options(a.formData,r,_)}function u(_,x){var b;return(b=a.field)!=null&&b.useApiSearchKeyword||!_?!0:x.name.includes(_)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),h(),(_,x)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=b=>i.value=b),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":h,onCheck:f,onChange:f},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class ff 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=df,this.editor=uf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const pf=Object.freeze(Object.defineProperty({__proto__:null,default:ff},Symbol.toStringTag,{value:"Module"})),hf={class:"el-upload__tip"},mf=["src"],gf=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(_=>{if(!(_!=null&&_.url))return{..._,name:"unknown",fileType:"unknown"};const x=_.url.substring(_.url.lastIndexOf(".")+1),b=_.url.split("/");return{..._,name:b[b.length-1],fileType:x}}));function c(_){var x,b;if(a.props.deleteParams){const m=(x=a.props.deleteParams)!=null&&x.data?(b=a.props.deleteParams)==null?void 0:b.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 h(_){r.value=_.url,s.value=!0}function u(_){return _.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function f(_){const x=new FormData;x.append("file",_.file),n("on-upload",x)}return(_,x)=>(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":h,multiple:!0,"before-upload":u,"http-request":f,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:x[0]||(x[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(Vo))]),_: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",hf,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":x[1]||(x[1]=b=>s.value=b)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,mf)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-b9c6d702"]])},Symbol.toStringTag,{value:"Module"})),_f=["src"],yf={class:"file-type"},bf=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 k=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=k,m;if(m.url){const B=m.url.split("/");return{...m,name:B[B.length-1],fileType:k}}return{...m,name:m.id,fileType:k}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const k=new FileReader;return k.readAsDataURL(m),new Promise(function(B,g){return m.type.startsWith("image/")?(k.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()});B(G)},m.type,.5)}},!1):(B(m),!1)})},h=m=>{var k,B;if(m.status==="success")if(r.props.deleteParams){const g=(k=r.props.deleteParams)!=null&&k.data?(B=r.props.deleteParams)==null?void 0:B.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,g,g).then(()=>{n("on-remove",m)})}else n("on-remove",m)},u=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},f=m=>{a.value=m.url,i.value=!0},_=m=>{const k=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(k))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(g=>g.size/1024/1024<5?(b(g),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function x(m,k){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function b(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((k,B)=>{const g=new FormData;g.append("file",m),v.post(c,g,{}).then(S=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",S.data.data),k(S.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),B("Upload failed")})})}return(m,k)=>(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":h,"before-upload":_,"on-exceed":u,"on-preview":f,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:k[0]||(k[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(Vo))]),_: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":k[1]||(k[1]=B=>i.value=B)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,_f)]),_: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,(B,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(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:B.name,"onUpdate:modelValue":S=>B.name=S,onChange:S=>x(B)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",yf,"."+e.toDisplayString(B.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:S=>h(B)},{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-28b29d8a"]])},Symbol.toStringTag,{value:"Module"})),wf={class:"image-slot"},kf={class:"el-upload__tip"},Ef=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=h=>{if(!(h.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=h=>{n("on-success",h.data.imageUrl)};function c(){n("on-success","")}function d(h){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((u,f)=>{const _=new FormData;_.append("image",h.file),v.post(s,_,{}).then(x=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),u(x.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),f("Upload failed")})})}return(h,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(h.$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",wf,[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(Vo))]),_: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(yl))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",kf,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=Cf(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=Do(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=xf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),Ua(d,r),d}function xf(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=Sf(o,t);if(i){var c=i[0],d=i[1],h=i[2],u=i[3],f=i[4],_=Wt(c,h),x=Wt(d,u);return _.concat([[me,f]],x)}return Bf(o,t)}function Bf(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),h=0;h<i;h++)c[h]=-1,d[h]=-1;c[a+1]=0,d[a+1]=0;for(var u=n-r,f=u%2!==0,_=0,x=0,b=0,m=0,k=0;k<s;k++){for(var B=-k+_;B<=k-x;B+=2){var g=a+B,S;B===-k||B!==k&&c[g-1]<c[g+1]?S=c[g+1]:S=c[g-1]+1;for(var E=S-B;S<n&&E<r&&o.charAt(S)===t.charAt(E);)S++,E++;if(c[g]=S,S>n)x+=2;else if(E>r)_+=2;else if(f){var V=a+u-B;if(V>=0&&V<i&&d[V]!==-1){var O=n-d[V];if(S>=O)return La(o,t,S,E)}}}for(var I=-k+b;I<=k-m;I+=2){var V=a+I,O;I===-k||I!==k&&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)b+=2;else if(!f){var g=a+u-I;if(g>=0&&g<i&&c[g]!==-1){var S=c[g],E=a+S-g;if(O=n-O,S>=O)return La(o,t,S,E)}}}}return[[He,o],[Be,t]]}function La(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),h=Wt(i,c);return d.concat(h)}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 za(o.charCodeAt(s-1))&&s--,s}function Do(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 Ha(o.charCodeAt(o.length-s))&&s--,s}function Sf(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(x,b,m){for(var k=x.substring(m,m+Math.floor(x.length/4)),B=-1,g="",S,E,V,O;(B=b.indexOf(k,B+1))!==-1;){var I=No(x.substring(m),b.substring(B)),G=Do(x.substring(0,m),b.substring(0,B));g.length<G+I&&(g=b.substring(B-G,B)+b.substring(B,B+I),S=x.substring(0,m-G),E=x.substring(m+I),V=b.substring(0,B-G),O=b.substring(B+I))}return g.length*2>=x.length?[S,E,V,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,h,u,f;o.length>t.length?(d=c[0],h=c[1],u=c[2],f=c[3]):(u=c[0],f=c[1],d=c[2],h=c[3]);var _=c[4];return[d,h,u,f,_]}function Ua(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&&Pa(o[d][1])){var h=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=h+a,i=h+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 h=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=h,i+=h}}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=Do(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 f=s+r;a.length===0&&i.length===0?(o.splice(n-f,f),n=n-f):a.length===0?(o.splice(n-f,f,[Be,i]),n=n-f+1):i.length===0?(o.splice(n-f,f,[He,a]),n=n-f+1):(o.splice(n-f,f,[He,a],[Be,i]),n=n-f+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++;_&&Ua(o,t)}function za(o){return o>=55296&&o<=56319}function Ha(o){return o>=56320&&o<=57343}function qa(o){return Ha(o.charCodeAt(0))}function Pa(o){return za(o.charCodeAt(o.length-1))}function $f(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 Pa(o)||qa(r)?null:$f([[me,o],[He,t],[Be,n],[me,r]])}function Cf(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),h=o.slice(c),u=s?s.index:null;e:{var f=c+i-a;if(u!==null&&u!==f||f<0||f>i)break e;var _=t.slice(0,f),x=t.slice(f);if(x!==h)break e;var b=Math.min(c,f),m=d.slice(0,b),k=_.slice(0,b);if(m!==k)break e;var B=d.slice(b),g=_.slice(b);return Ao(m,B,g,h)}e:{if(u!==null&&u!==c)break e;var S=c,_=t.slice(0,S),x=t.slice(S);if(_!==d)break e;var E=Math.min(a-S,i-S),V=h.slice(h.length-E),O=x.slice(x.length-E);if(V!==O)break e;var B=h.slice(0,h.length-E),g=x.slice(0,x.length-E);return Ao(d,B,g,V)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),V=o.slice(r.index+r.length),b=m.length,E=V.length;if(i<b+E)break e;var k=t.slice(0,b),O=t.slice(i-E);if(m!==k||V!==O)break e;var B=o.slice(b,a-E),g=t.slice(b,i-E);return Ao(m,B,g,V)}return null}function On(o,t,n){return Wt(o,t,n,!0)}On.INSERT=Be,On.DELETE=He,On.EQUAL=me;var Vf=On,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]",h="[object Error]",u="[object Function]",f="[object GeneratorFunction]",_="[object Map]",x="[object Number]",b="[object Object]",m="[object Promise]",k="[object RegExp]",B="[object Set]",g="[object String]",S="[object Symbol]",E="[object WeakMap]",V="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",G="[object Float64Array]",Y="[object Int8Array]",re="[object Int16Array]",T="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",qe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,xt=/\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[Y]=M[re]=M[T]=M[_]=M[x]=M[b]=M[k]=M[B]=M[g]=M[S]=M[L]=M[X]=M[Se]=M[qe]=!0,M[h]=M[u]=M[E]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Io=typeof self=="object"&&self&&self.Object===Object&&self,$e=we||Io||Function("return this")(),jn=t&&!t.nodeType&&t,J=jn&&!0&&o&&!o.nodeType&&o,Rn=J&&J.exports===jn;function Mo(l,p){return l.set(p[0],p[1]),l}function Ce(l,p){return l.add(p),l}function In(l,p){for(var y=-1,$=l?l.length:0;++y<$&&p(l[y],y,l)!==!1;);return l}function Mn(l,p){for(var y=-1,$=p.length,j=l.length;++y<$;)l[j+y]=p[y];return l}function Yt(l,p,y,$){for(var j=-1,A=l?l.length:0;++j<A;)y=p(y,l[j],j,l);return y}function Kt(l,p){for(var y=-1,$=Array(l);++y<l;)$[y]=p(y);return $}function Ln(l,p){return l==null?void 0:l[p]}function Jt(l){var p=!1;if(l!=null&&typeof l.toString!="function")try{p=!!(l+"")}catch{}return p}function Un(l){var p=-1,y=Array(l.size);return l.forEach(function($,j){y[++p]=[j,$]}),y}function Xt(l,p){return function(y){return l(p(y))}}function zn(l){var p=-1,y=Array(l.size);return l.forEach(function($){y[++p]=$}),y}var Lo=Array.prototype,Uo=Function.prototype,Bt=Object.prototype,Zt=$e["__core-js_shared__"],Hn=function(){var l=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Uo.toString,Pe=Bt.hasOwnProperty,St=Bt.toString,zo=RegExp("^"+qn.call(Pe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Rn?$e.Buffer:void 0,$t=$e.Symbol,vt=$e.Uint8Array,ke=Xt(Object.getPrototypeOf,Object),Pn=Object.create,Wn=Bt.propertyIsEnumerable,Ho=Lo.splice,en=Object.getOwnPropertySymbols,Ct=ct?ct.isBuffer:void 0,Gn=Xt(Object.keys,Object),Vt=Oe($e,"DataView"),dt=Oe($e,"Map"),Ve=Oe($e,"Promise"),Ot=Oe($e,"Set"),tn=Oe($e,"WeakMap"),ut=Oe(Object,"create"),nn=pe(Vt),ft=pe(dt),on=pe(Ve),rn=pe(Ot),an=pe(tn),rt=$t?$t.prototype:void 0,Qn=rt?rt.valueOf:void 0;function Ke(l){var p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function qo(){this.__data__=ut?ut(null):{}}function Po(l){return this.has(l)&&delete this.__data__[l]}function Wo(l){var p=this.__data__;if(ut){var y=p[l];return y===r?void 0:y}return Pe.call(p,l)?p[l]:void 0}function Yn(l){var p=this.__data__;return ut?p[l]!==void 0:Pe.call(p,l)}function sn(l,p){var y=this.__data__;return y[l]=ut&&p===void 0?r:p,this}Ke.prototype.clear=qo,Ke.prototype.delete=Po,Ke.prototype.get=Wo,Ke.prototype.has=Yn,Ke.prototype.set=sn;function ie(l){var p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Go(){this.__data__=[]}function Qo(l){var p=this.__data__,y=Nt(p,l);if(y<0)return!1;var $=p.length-1;return y==$?p.pop():Ho.call(p,y,1),!0}function Yo(l){var p=this.__data__,y=Nt(p,l);return y<0?void 0:p[y][1]}function Ko(l){return Nt(this.__data__,l)>-1}function Jo(l,p){var y=this.__data__,$=Nt(y,l);return $<0?y.push([l,p]):y[$][1]=p,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 p=-1,y=l?l.length:0;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[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,p){return ht(this,l).set(l,p),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,p){var y=this.__data__;if(y instanceof ie){var $=y.__data__;if(!dt||$.length<n-1)return $.push([l,p]),this;y=this.__data__=new ce($)}return y.set(l,p),this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l,p){var y=un(l)||At(l)?Kt(l.length,String):[],$=y.length,j=!!$;for(var A in l)Pe.call(l,A)&&!(j&&(A=="length"||wr(A,$)))&&y.push(A);return y}function Kn(l,p,y){var $=l[p];(!(Pe.call(l,p)&&eo($,y))||y===void 0&&!(p in l))&&(l[p]=y)}function Nt(l,p){for(var y=l.length;y--;)if(eo(l[y][0],p))return y;return-1}function We(l,p){return l&&dn(p,pn(p),l)}function ln(l,p,y,$,j,A,W){var P;if($&&(P=A?$(l,j,A,W):$(l)),P!==void 0)return P;if(!Qe(l))return l;var te=un(l);if(te){if(P=yr(l),!p)return mr(l,P)}else{var Q=Xe(l),de=Q==u||Q==f;if(to(l))return Dt(l,p);if(Q==b||Q==a||de&&!A){if(Jt(l))return A?l:{};if(P=Ge(de?{}:l),!p)return gr(l,We(P,l))}else{if(!M[Q])return A?l:{};P=br(l,Q,ln,p)}}W||(W=new ge);var _e=W.get(l);if(_e)return _e;if(W.set(l,P),!te)var ne=y?_r(l):pn(l);return In(ne||l,function(ue,le){ne&&(le=ue,ue=l[le]),Kn(P,le,ln(ue,p,y,$,le,l,W))}),P}function ir(l){return Qe(l)?Pn(l):{}}function lr(l,p,y){var $=p(l);return un(l)?$:Mn($,y(l))}function cr(l){return St.call(l)}function dr(l){if(!Qe(l)||Er(l))return!1;var p=fn(l)||Jt(l)?zo:z;return p.test(pe(l))}function ur(l){if(!Zn(l))return Gn(l);var p=[];for(var y in Object(l))Pe.call(l,y)&&y!="constructor"&&p.push(y);return p}function Dt(l,p){if(p)return l.slice();var y=new l.constructor(l.length);return l.copy(y),y}function cn(l){var p=new l.constructor(l.byteLength);return new vt(p).set(new vt(l)),p}function pt(l,p){var y=p?cn(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.byteLength)}function Jn(l,p,y){var $=p?y(Un(l),!0):Un(l);return Yt($,Mo,new l.constructor)}function Xn(l){var p=new l.constructor(l.source,xt.exec(l));return p.lastIndex=l.lastIndex,p}function fr(l,p,y){var $=p?y(zn(l),!0):zn(l);return Yt($,Ce,new l.constructor)}function pr(l){return Qn?Object(Qn.call(l)):{}}function hr(l,p){var y=p?cn(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.length)}function mr(l,p){var y=-1,$=l.length;for(p||(p=Array($));++y<$;)p[y]=l[y];return p}function dn(l,p,y,$){y||(y={});for(var j=-1,A=p.length;++j<A;){var W=p[j],P=void 0;Kn(y,W,P===void 0?l[W]:P)}return y}function gr(l,p){return dn(l,Je(l),p)}function _r(l){return lr(l,pn,Je)}function ht(l,p){var y=l.__data__;return kr(p)?y[typeof p=="string"?"string":"hash"]:y.map}function Oe(l,p){var y=Ln(l,p);return dr(y)?y:void 0}var Je=en?Xt(en,Object):Br,Xe=cr;(Vt&&Xe(new Vt(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=_||Ve&&Xe(Ve.resolve())!=m||Ot&&Xe(new Ot)!=B||tn&&Xe(new tn)!=E)&&(Xe=function(l){var p=St.call(l),y=p==b?l.constructor:void 0,$=y?pe(y):void 0;if($)switch($){case nn:return O;case ft:return _;case on:return m;case rn:return B;case an:return E}return p});function yr(l){var p=l.length,y=l.constructor(p);return p&&typeof l[0]=="string"&&Pe.call(l,"index")&&(y.index=l.index,y.input=l.input),y}function Ge(l){return typeof l.constructor=="function"&&!Zn(l)?ir(ke(l)):{}}function br(l,p,y,$){var j=l.constructor;switch(p){case V:return cn(l);case c:case d:return new j(+l);case O:return pt(l,$);case I:case G:case Y:case re:case T:case L:case X:case Se:case qe:return hr(l,$);case _:return Jn(l,$,y);case x:case g:return new j(l);case k:return Xn(l);case B:return fr(l,$,y);case S:return pr(l)}}function wr(l,p){return p=p??s,!!p&&(typeof l=="number"||Z.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!!Hn&&Hn in l}function Zn(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||Bt;return l===y}function pe(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function vn(l){return ln(l,!0,!0)}function eo(l,p){return l===p||l!==l&&p!==p}function At(l){return xr(l)&&Pe.call(l,"callee")&&(!Wn.call(l,"callee")||St.call(l)==a)}var un=Array.isArray;function Ft(l){return l!=null&&no(l.length)&&!fn(l)}function xr(l){return oo(l)&&Ft(l)}var to=Ct||Sr;function fn(l){var p=Qe(l)?St.call(l):"";return p==u||p==f}function no(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 oo(l){return!!l&&typeof l=="object"}function pn(l){return Ft(l)?Tt(l):ur(l)}function Br(){return[]}function Sr(){return!1}o.exports=vn}(Tn,Tn.exports);var Wa=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]",h="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",_="[object Error]",x="[object Function]",b="[object GeneratorFunction]",m="[object Map]",k="[object Number]",B="[object Null]",g="[object Object]",S="[object Promise]",E="[object Proxy]",V="[object RegExp]",O="[object Set]",I="[object String]",G="[object Symbol]",Y="[object Undefined]",re="[object WeakMap]",T="[object ArrayBuffer]",L="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",qe="[object Int8Array]",Ye="[object Int16Array]",xt="[object Int32Array]",z="[object Uint8Array]",Z="[object Uint8ClampedArray]",M="[object Uint16Array]",we="[object Uint32Array]",Io=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,jn=/^(?:0|[1-9]\d*)$/,J={};J[X]=J[Se]=J[qe]=J[Ye]=J[xt]=J[z]=J[Z]=J[M]=J[we]=!0,J[c]=J[d]=J[T]=J[u]=J[L]=J[f]=J[_]=J[x]=J[m]=J[k]=J[g]=J[V]=J[O]=J[I]=J[re]=!1;var Rn=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Rn||Mo||Function("return this")(),In=t&&!t.nodeType&&t,Mn=In&&!0&&o&&!o.nodeType&&o,Yt=Mn&&Mn.exports===In,Kt=Yt&&Rn.process,Ln=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Ln&&Ln.isTypedArray;function Un(l,p){for(var y=-1,$=l==null?0:l.length,j=0,A=[];++y<$;){var W=l[y];p(W,y,l)&&(A[j++]=W)}return A}function Xt(l,p){for(var y=-1,$=p.length,j=l.length;++y<$;)l[j+y]=p[y];return l}function zn(l,p){for(var y=-1,$=l==null?0:l.length;++y<$;)if(p(l[y],y,l))return!0;return!1}function Lo(l,p){for(var y=-1,$=Array(l);++y<l;)$[y]=p(y);return $}function Uo(l){return function(p){return l(p)}}function Bt(l,p){return l.has(p)}function Zt(l,p){return l==null?void 0:l[p]}function Hn(l){var p=-1,y=Array(l.size);return l.forEach(function($,j){y[++p]=[j,$]}),y}function qn(l,p){return function(y){return l(p(y))}}function Pe(l){var p=-1,y=Array(l.size);return l.forEach(function($){y[++p]=$}),y}var St=Array.prototype,zo=Function.prototype,ct=Object.prototype,$t=Ce["__core-js_shared__"],vt=zo.toString,ke=ct.hasOwnProperty,Pn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Wn=ct.toString,Ho=RegExp("^"+vt.call(ke).replace(Io,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Yt?Ce.Buffer:void 0,Ct=Ce.Symbol,Gn=Ce.Uint8Array,Vt=ct.propertyIsEnumerable,dt=St.splice,Ve=Ct?Ct.toStringTag:void 0,Ot=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Je(Ce,"DataView"),ft=Je(Ce,"Map"),on=Je(Ce,"Promise"),rn=Je(Ce,"Set"),an=Je(Ce,"WeakMap"),rt=Je(Object,"create"),Qn=pe(nn),Ke=pe(ft),qo=pe(on),Po=pe(rn),Wo=pe(an),Yn=Ct?Ct.prototype:void 0,sn=Yn?Yn.valueOf:void 0;function ie(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Go(){this.__data__=rt?rt(null):{},this.size=0}function Qo(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}function Yo(l){var p=this.__data__;if(rt){var y=p[l];return y===r?void 0:y}return ke.call(p,l)?p[l]:void 0}function Ko(l){var p=this.__data__;return rt?p[l]!==void 0:ke.call(p,l)}function Jo(l,p){var y=this.__data__;return this.size+=this.has(l)?0:1,y[l]=rt&&p===void 0?r:p,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 p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function Xo(){this.__data__=[],this.size=0}function Zo(l){var p=this.__data__,y=Dt(p,l);if(y<0)return!1;var $=p.length-1;return y==$?p.pop():dt.call(p,y,1),--this.size,!0}function vo(l){var p=this.__data__,y=Dt(p,l);return y<0?void 0:p[y][1]}function er(l){return Dt(this.__data__,l)>-1}function tr(l,p){var y=this.__data__,$=Dt(y,l);return $<0?(++this.size,y.push([l,p])):y[$][1]=p,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 p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var $=l[p];this.set($[0],$[1])}}function nr(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function or(l){var p=Oe(this,l).delete(l);return this.size-=p?1:0,p}function rr(l){return Oe(this,l).get(l)}function ar(l){return Oe(this,l).has(l)}function sr(l,p){var y=Oe(this,l),$=y.size;return y.set(l,p),this.size+=y.size==$?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 p=-1,y=l==null?0:l.length;for(this.__data__=new ge;++p<y;)this.add(l[p])}function Kn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Kn,Tt.prototype.has=Nt;function We(l){var p=this.__data__=new ce(l);this.size=p.size}function ln(){this.__data__=new ce,this.size=0}function ir(l){var p=this.__data__,y=p.delete(l);return this.size=p.size,y}function lr(l){return this.__data__.get(l)}function cr(l){return this.__data__.has(l)}function dr(l,p){var y=this.__data__;if(y instanceof ce){var $=y.__data__;if(!ft||$.length<n-1)return $.push([l,p]),this.size=++y.size,this;y=this.__data__=new ge($)}return y.set(l,p),this.size=y.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,p){var y=At(l),$=!y&&eo(l),j=!y&&!$&&Ft(l),A=!y&&!$&&!j&&oo(l),W=y||$||j||A,P=W?Lo(l.length,String):[],te=P.length;for(var Q in l)ke.call(l,Q)&&!(W&&(Q=="length"||j&&(Q=="offset"||Q=="parent")||A&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||br(Q,te)))&&P.push(Q);return P}function Dt(l,p){for(var y=l.length;y--;)if(vn(l[y][0],p))return y;return-1}function cn(l,p,y){var $=p(l);return At(l)?$:Xt($,y(l))}function pt(l){return l==null?l===void 0?Y:B:Ve&&Ve in Object(l)?Xe(l):Zn(l)}function Jn(l){return Qe(l)&&pt(l)==c}function Xn(l,p,y,$,j){return l===p?!0:l==null||p==null||!Qe(l)&&!Qe(p)?l!==l&&p!==p:fr(l,p,y,$,Xn,j)}function fr(l,p,y,$,j,A){var W=At(l),P=At(p),te=W?d:Ge(l),Q=P?d:Ge(p);te=te==c?g:te,Q=Q==c?g:Q;var de=te==g,_e=Q==g,ne=te==Q;if(ne&&Ft(l)){if(!Ft(p))return!1;W=!0,de=!1}if(ne&&!de)return A||(A=new We),W||oo(l)?dn(l,p,y,$,j,A):gr(l,p,te,y,$,j,A);if(!(y&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 A||(A=new We),j(at,Ze,y,$,A)}}return ne?(A||(A=new We),_r(l,p,y,$,j,A)):!1}function pr(l){if(!no(l)||kr(l))return!1;var p=to(l)?Ho:$e;return p.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 p=[];for(var y in Object(l))ke.call(l,y)&&y!="constructor"&&p.push(y);return p}function dn(l,p,y,$,j,A){var W=y&s,P=l.length,te=p.length;if(P!=te&&!(W&&te>P))return!1;var Q=A.get(l);if(Q&&A.get(p))return Q==p;var de=-1,_e=!0,ne=y&a?new Tt:void 0;for(A.set(l,p),A.set(p,l);++de<P;){var ue=l[de],le=p[de];if($)var at=W?$(le,ue,de,p,l,A):$(ue,le,de,l,p,A);if(at!==void 0){if(at)continue;_e=!1;break}if(ne){if(!zn(p,function(Ze,mt){if(!Bt(ne,mt)&&(ue===Ze||j(ue,Ze,y,$,A)))return ne.push(mt)})){_e=!1;break}}else if(!(ue===le||j(ue,le,y,$,A))){_e=!1;break}}return A.delete(l),A.delete(p),_e}function gr(l,p,y,$,j,A,W){switch(y){case L:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case T:return!(l.byteLength!=p.byteLength||!A(new Gn(l),new Gn(p)));case u:case f:case k:return vn(+l,+p);case _:return l.name==p.name&&l.message==p.message;case V:case I:return l==p+"";case m:var P=Hn;case O:var te=$&s;if(P||(P=Pe),l.size!=p.size&&!te)return!1;var Q=W.get(l);if(Q)return Q==p;$|=a,W.set(l,p);var de=dn(P(l),P(p),$,j,A,W);return W.delete(l),de;case G:if(sn)return sn.call(l)==sn.call(p)}return!1}function _r(l,p,y,$,j,A){var W=y&s,P=ht(l),te=P.length,Q=ht(p),de=Q.length;if(te!=de&&!W)return!1;for(var _e=te;_e--;){var ne=P[_e];if(!(W?ne in p:ke.call(p,ne)))return!1}var ue=A.get(l);if(ue&&A.get(p))return ue==p;var le=!0;A.set(l,p),A.set(p,l);for(var at=W;++_e<te;){ne=P[_e];var Ze=l[ne],mt=p[ne];if($)var Za=W?$(mt,Ze,ne,p,l,A):$(Ze,mt,ne,l,p,A);if(!(Za===void 0?Ze===mt||j(Ze,mt,y,$,A):Za)){le=!1;break}at||(at=ne=="constructor")}if(le&&!at){var ro=l.constructor,ao=p.constructor;ro!=ao&&"constructor"in l&&"constructor"in p&&!(typeof ro=="function"&&ro instanceof ro&&typeof ao=="function"&&ao instanceof ao)&&(le=!1)}return A.delete(l),A.delete(p),le}function ht(l){return cn(l,pn,yr)}function Oe(l,p){var y=l.__data__;return wr(p)?y[typeof p=="string"?"string":"hash"]:y.map}function Je(l,p){var y=Zt(l,p);return pr(y)?y:void 0}function Xe(l){var p=ke.call(l,Ve),y=l[Ve];try{l[Ve]=void 0;var $=!0}catch{}var j=Wn.call(l);return $&&(p?l[Ve]=y:delete l[Ve]),j}var yr=Ot?function(l){return l==null?[]:(l=Object(l),Un(Ot(l),function(p){return Vt.call(l,p)}))}: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 p=pt(l),y=p==g?l.constructor:void 0,$=y?pe(y):"";if($)switch($){case Qn:return L;case Ke:return m;case qo:return S;case Po:return O;case Wo:return re}return p});function br(l,p){return p=p??i,!!p&&(typeof l=="number"||jn.test(l))&&l>-1&&l%1==0&&l<p}function wr(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}function kr(l){return!!Pn&&Pn in l}function Er(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||ct;return l===y}function Zn(l){return Wn.call(l)}function pe(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function vn(l,p){return l===p||l!==l&&p!==p}var eo=Jn(function(){return arguments}())?Jn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Vt.call(l,"callee")},At=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!to(l)}var Ft=tn||Sr;function xr(l,p){return Xn(l,p)}function to(l){if(!no(l))return!1;var p=pt(l);return p==x||p==b||p==h||p==E}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function no(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}function Qe(l){return l!=null&&typeof l=="object"}var oo=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 Ga=Nn.exports,Fo={},Qa=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Fo,"__esModule",{value:!0});var Of=Qa(Wa),Tf=Qa(Ga),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=Of.default(i);c||(d=Object.keys(d).reduce(function(u,f){return d[f]!=null&&(u[f]=d[f]),u},{}));for(var h in a)a[h]!==void 0&&i[h]===void 0&&(d[h]=a[h]);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,h){return Tf.default(a[h],i[h])||(d[h]=i[h]===void 0?null:i[h]),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,h){return i[h]!==a[h]&&a[h]!==void 0&&(d[h]=i[h]),d},{});return Object.keys(a).reduce(function(d,h){return a[h]!==i[h]&&i[h]===void 0&&(d[h]=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(h,u){return a[u]===void 0&&(h[u]=i[u]),h},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(jo||(jo={})),Fo.default=jo;var Dn={},An={},Ya;function Nf(){if(Ya)return An;Ya=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});var t=o(Ja()),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 Ka;function Ja(){if(Ka)return Dn;Ka=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dn,"__esModule",{value:!0});var t=o(Nf()),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={})),Dn.default=n,Dn}var Gt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},Fn=Gt(Vf),Df=Gt(Wa),Ro=Gt(Ga),Qt=Gt(Fo),se=Gt(Ja()),Af="\0",Ff=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=Df.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()),h=n.next(d),u=r.next(d);if(typeof u.retain=="number"){var f={};typeof h.retain=="number"?f.retain=d:f.insert=h.insert;var _=Qt.default.compose(h.attributes,u.attributes,typeof h.retain=="number");if(_&&(f.attributes=_),c.push(f),!r.hasNext()&&Ro.default(c.ops[c.ops.length-1],f)){var x=new o(n.rest());return c.concat(x).chop()}}else typeof u.delete=="number"&&typeof h.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(h){if(h.insert!=null)return typeof h.insert=="string"?h.insert:Af;var u=d===t?"on":"with";throw new Error("diff() called "+u+" non-document")}).join("")}),s=new o,a=Fn.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 h=d[1].length;h>0;){var u=0;switch(d[0]){case Fn.default.INSERT:u=Math.min(c.peekLength(),h),s.push(c.next(u));break;case Fn.default.DELETE:u=Math.min(h,i.peekLength()),i.next(u),s.delete(u);break;case Fn.default.EQUAL:u=Math.min(i.peekLength(),c.peekLength(),h);var f=i.next(u),_=c.next(u);Ro.default(f.insert,_.insert)?s.retain(u,Qt.default.diff(f.attributes,_.attributes)):s.push(_).delete(u);break}h-=u}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
7
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),h=a.next(c);if(d.delete)continue;h.delete?i.push(h):i.retain(c,Qt.default.transform(d.attributes,h.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}(),jf=Ff;const Rf=ra(jf);/*!
|
|
8
8
|
* VueQuill @vueup/vue-quill v1.2.0
|
|
9
9
|
* https://vueup.github.io/vue-quill/
|