@archbiz/element-plus 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +176 -2
- package/dist/element-plus.cjs +21 -0
- package/dist/element-plus.min.js +8 -0
- package/dist/element-plus.umd.js +21 -0
- package/dist/style.css +7 -0
- package/package.json +61 -4
- package/types/ab-form/index.d.ts +22 -0
- package/types/ab-table/index.d.ts +115 -0
- package/types/ab-upload/index.d.ts +53 -0
- package/types/css.d.ts +1 -0
- package/types/index.d.ts +33 -0
- package/types/jsx.d.ts +13 -0
- package/types/purge-icons.d.ts +5 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Archbiz
|
|
3
|
+
* @archbiz/element-plus v0.1.1
|
|
4
|
+
* (c) 2018-2026 Dio Zhu
|
|
5
|
+
* Released under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
(function(Y,D){typeof exports=="object"&&typeof module!="undefined"?D(exports,require("element-plus"),require("vue"),require("@element-plus/icons-vue"),require("vue-router"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@element-plus/icons-vue","vue-router","vxe-pc-ui"],D):(Y=typeof globalThis!="undefined"?globalThis:Y||self,D(Y.ArchbizKitElementPlus={},Y.ElementPlus,Y.Vue,Y.ElementPlusIconsVue,Y.VueRouter,Y.VxeUI))})(this,function(Y,D,l,ke,ut,Mt){"use strict";var Qw=Object.defineProperty,Zw=Object.defineProperties;var Xw=Object.getOwnPropertyDescriptors;var cn=Object.getOwnPropertySymbols;var As=Object.prototype.hasOwnProperty,Os=Object.prototype.propertyIsEnumerable;var Bi=(Y,D,l)=>D in Y?Qw(Y,D,{enumerable:!0,configurable:!0,writable:!0,value:l}):Y[D]=l,M=(Y,D)=>{for(var l in D||(D={}))As.call(D,l)&&Bi(Y,l,D[l]);if(cn)for(var l of cn(D))Os.call(D,l)&&Bi(Y,l,D[l]);return Y},ne=(Y,D)=>Zw(Y,Xw(D));var xr=(Y,D)=>{var l={};for(var ke in Y)As.call(Y,ke)&&D.indexOf(ke)<0&&(l[ke]=Y[ke]);if(Y!=null&&cn)for(var ke of cn(Y))D.indexOf(ke)<0&&Os.call(Y,ke)&&(l[ke]=Y[ke]);return l};var ve=(Y,D,l)=>Bi(Y,typeof D!="symbol"?D+"":D,l);var ye=(Y,D,l)=>new Promise((ke,ut)=>{var Mt=Ye=>{try{qt(l.next(Ye))}catch(Yt){ut(Yt)}},un=Ye=>{try{qt(l.throw(Ye))}catch(Yt){ut(Yt)}},qt=Ye=>Ye.done?ke(Ye.value):Promise.resolve(Ye.value).then(Mt,un);qt((l=l.apply(Y,D)).next())});var Cs,$s;function un(e){e.useApp((t,r)=>{r.component(D.ElForm.name)||r.use(D.ElForm),r.component(D.ElButton.name)||r.use(D.ElButton),r.component(D.ElRow.name)||r.use(D.ElRow),r.component(D.ElCol.name)||r.use(D.ElCol),r.component(D.ElInput.name)||r.use(D.ElInput),r.component(D.ElInputNumber.name)||r.use(D.ElInputNumber),r.component(D.ElCascader.name)||r.use(D.ElCascader),r.component(D.ElPopover.name)||r.use(D.ElPopover),r.component(D.ElTooltip.name)||r.use(D.ElTooltip),r.component(D.ElAutocomplete.name)||r.use(D.ElAutocomplete),r.component(D.ElCheckboxGroup.name)||r.use(D.ElCheckboxGroup),r.component(D.ElCheckboxButton.name)||r.use(D.ElCheckboxButton),r.component(D.ElRadioGroup.name)||r.use(D.ElRadioGroup),r.component(D.ElRadioButton.name)||r.use(D.ElRadioButton),r.component(D.ElRadio.name)||r.use(D.ElRadio),r.component(D.ElDialog.name)||r.use(D.ElDialog),r.component(D.ElDivider.name)||r.use(D.ElDivider),r.component(D.ElCheckbox.name)||r.use(D.ElCheckbox),r.component(D.ElSelect.name)||r.use(D.ElSelect),r.component(D.ElTree.name)||r.use(D.ElTree),r.component(D.ElUpload.name)||r.use(D.ElUpload),r.component(D.ElSlider.name)||r.use(D.ElSlider),r.component(D.ElRate.name)||r.use(D.ElRate),r.component(D.ElColorPicker.name)||r.use(D.ElColorPicker),r.component(D.ElSwitch.name)||r.use(D.ElSwitch),r.component(D.ElDatePicker.name)||r.use(D.ElDatePicker),r.component(D.ElIcon.name)||r.use(D.ElIcon),r.component(D.ElTimePicker.name)||r.use(D.ElTimePicker),r.component(D.ElProgress.name)||r.use(D.ElProgress),r.component(D.ElInputTag.name)||r.use(D.ElInputTag),r.component(D.ElText.name)||r.use(D.ElText),r.component(D.ElTransfer.name)||r.use(D.ElTransfer),r.component(D.ElTreeSelect.name)||r.use(D.ElTreeSelect),r.component(D.ElMention.name)||r.use(D.ElMention)})}const qt=(e,t)=>{const{AbForm:r}=t||{};r.use(un),e.use(r)};var Ye=typeof global=="object"&&global&&global.Object===Object&&global,Yt=typeof self=="object"&&self&&self.Object===Object&&self,je=Ye||Yt||Function("return this")(),Ge=je.Symbol,ji=Object.prototype,Rs=ji.hasOwnProperty,Ms=ji.toString,Gt=Ge?Ge.toStringTag:void 0;function Ds(e){var t=Rs.call(e,Gt),r=e[Gt];try{e[Gt]=void 0;var n=!0}catch(o){}var i=Ms.call(e);return n&&(t?e[Gt]=r:delete e[Gt]),i}var Ps=Object.prototype,Is=Ps.toString;function Bs(e){return Is.call(e)}var js="[object Null]",Ns="[object Undefined]",Ni=Ge?Ge.toStringTag:void 0;function gt(e){return e==null?e===void 0?Ns:js:Ni&&Ni in Object(e)?Ds(e):Bs(e)}function We(e){return e!=null&&typeof e=="object"}var Vs="[object Symbol]";function Sr(e){return typeof e=="symbol"||We(e)&>(e)==Vs}function Vi(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ee=Array.isArray,Li=Ge?Ge.prototype:void 0,Hi=Li?Li.toString:void 0;function zi(e){if(typeof e=="string")return e;if(Ee(e))return Vi(e,zi)+"";if(Sr(e))return Hi?Hi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ls=/\s/;function Hs(e){for(var t=e.length;t--&&Ls.test(e.charAt(t)););return t}var zs=/^\s+/;function Us(e){return e&&e.slice(0,Hs(e)+1).replace(zs,"")}function Oe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ui=NaN,qs=/^[-+]0x[0-9a-f]+$/i,Ys=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,Ws=parseInt;function qi(e){if(typeof e=="number")return e;if(Sr(e))return Ui;if(Oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Us(e);var r=Ys.test(e);return r||Gs.test(e)?Ws(e.slice(2),r?2:8):qs.test(e)?Ui:+e}function Cr(e){return e}var Js="[object AsyncFunction]",Ks="[object Function]",Qs="[object GeneratorFunction]",Zs="[object Proxy]";function dn(e){if(!Oe(e))return!1;var t=gt(e);return t==Ks||t==Qs||t==Js||t==Zs}var fn=je["__core-js_shared__"],Yi=function(){var e=/[^.]+$/.exec(fn&&fn.keys&&fn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xs(e){return!!Yi&&Yi in e}var ec=Function.prototype,tc=ec.toString;function yt(e){if(e!=null){try{return tc.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var rc=/[\\^$.*+?()[\]{}|]/g,nc=/^\[object .+?Constructor\]$/,ic=Function.prototype,oc=Object.prototype,ac=ic.toString,lc=oc.hasOwnProperty,sc=RegExp("^"+ac.call(lc).replace(rc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cc(e){if(!Oe(e)||Xs(e))return!1;var t=dn(e)?sc:nc;return t.test(yt(e))}function uc(e,t){return e==null?void 0:e[t]}function bt(e,t){var r=uc(e,t);return cc(r)?r:void 0}var pn=bt(je,"WeakMap"),Gi=Object.create,dc=function(){function e(){}return function(t){if(!Oe(t))return{};if(Gi)return Gi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function fc(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pc(){}function hc(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var mc=800,gc=16,yc=Date.now;function bc(e){var t=0,r=0;return function(){var n=yc(),i=gc-(n-r);if(r=n,i>0){if(++t>=mc)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wc(e){return function(){return e}}var $r=function(){try{var e=bt(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),vc=$r?function(e,t){return $r(e,"toString",{configurable:!0,enumerable:!1,value:wc(t),writable:!0})}:Cr,xc=bc(vc);function Wi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Sc(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function Cc(e){return e!==e}function $c(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Tc(e,t,r){return t===t?$c(e,t,r):Sc(e,Cc,r)}function Ec(e,t){var r=e==null?0:e.length;return!!r&&Tc(e,t,0)>-1}var kc=9007199254740991,_c=/^(?:0|[1-9]\d*)$/;function Tr(e,t){var r=typeof e;return t=t==null?kc:t,!!t&&(r=="number"||r!="symbol"&&_c.test(e))&&e>-1&&e%1==0&&e<t}function hn(e,t,r){t=="__proto__"&&$r?$r(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Wt(e,t){return e===t||e!==e&&t!==t}var Fc=Object.prototype,Ac=Fc.hasOwnProperty;function mn(e,t,r){var n=e[t];(!(Ac.call(e,t)&&Wt(n,r))||r===void 0&&!(t in e))&&hn(e,t,r)}function Oc(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=void 0;c===void 0&&(c=e[s]),i?hn(r,s,c):mn(r,s,c)}return r}var Ji=Math.max;function Rc(e,t,r){return t=Ji(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ji(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),fc(e,this,s)}}function Mc(e,t){return xc(Rc(e,t,Cr),e+"")}var Dc=9007199254740991;function gn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dc}function Dt(e){return e!=null&&gn(e.length)&&!dn(e)}function Pc(e,t,r){if(!Oe(r))return!1;var n=typeof t;return(n=="number"?Dt(r)&&Tr(t,r.length):n=="string"&&t in r)?Wt(r[t],e):!1}function Ic(e){return Mc(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Pc(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var Bc=Object.prototype;function yn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bc;return e===r}function jc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Nc="[object Arguments]";function Ki(e){return We(e)&>(e)==Nc}var Qi=Object.prototype,Vc=Qi.hasOwnProperty,Lc=Qi.propertyIsEnumerable,Er=Ki(function(){return arguments}())?Ki:function(e){return We(e)&&Vc.call(e,"callee")&&!Lc.call(e,"callee")};function Hc(){return!1}var Zi=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Xi=Zi&&typeof module=="object"&&module&&!module.nodeType&&module,zc=Xi&&Xi.exports===Zi,eo=zc?je.Buffer:void 0,Uc=eo?eo.isBuffer:void 0,Jt=Uc||Hc,qc="[object Arguments]",Yc="[object Array]",Gc="[object Boolean]",Wc="[object Date]",Jc="[object Error]",Kc="[object Function]",Qc="[object Map]",Zc="[object Number]",Xc="[object Object]",eu="[object RegExp]",tu="[object Set]",ru="[object String]",nu="[object WeakMap]",iu="[object ArrayBuffer]",ou="[object DataView]",au="[object Float32Array]",lu="[object Float64Array]",su="[object Int8Array]",cu="[object Int16Array]",uu="[object Int32Array]",du="[object Uint8Array]",fu="[object Uint8ClampedArray]",pu="[object Uint16Array]",hu="[object Uint32Array]",ge={};ge[au]=ge[lu]=ge[su]=ge[cu]=ge[uu]=ge[du]=ge[fu]=ge[pu]=ge[hu]=!0,ge[qc]=ge[Yc]=ge[iu]=ge[Gc]=ge[ou]=ge[Wc]=ge[Jc]=ge[Kc]=ge[Qc]=ge[Zc]=ge[Xc]=ge[eu]=ge[tu]=ge[ru]=ge[nu]=!1;function mu(e){return We(e)&&gn(e.length)&&!!ge[gt(e)]}function bn(e){return function(t){return e(t)}}var to=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Kt=to&&typeof module=="object"&&module&&!module.nodeType&&module,gu=Kt&&Kt.exports===to,wn=gu&&Ye.process,Pt=function(){try{var e=Kt&&Kt.require&&Kt.require("util").types;return e||wn&&wn.binding&&wn.binding("util")}catch(t){}}(),ro=Pt&&Pt.isTypedArray,vn=ro?bn(ro):mu,yu=Object.prototype,bu=yu.hasOwnProperty;function no(e,t){var r=Ee(e),n=!r&&Er(e),i=!r&&!n&&Jt(e),o=!r&&!n&&!i&&vn(e),a=r||n||i||o,s=a?jc(e.length,String):[],c=s.length;for(var u in e)(t||bu.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Tr(u,c)))&&s.push(u);return s}function io(e,t){return function(r){return e(t(r))}}var wu=io(Object.keys,Object),vu=Object.prototype,xu=vu.hasOwnProperty;function Su(e){if(!yn(e))return wu(e);var t=[];for(var r in Object(e))xu.call(e,r)&&r!="constructor"&&t.push(r);return t}function xn(e){return Dt(e)?no(e):Su(e)}function Cu(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $u=Object.prototype,Tu=$u.hasOwnProperty;function Eu(e){if(!Oe(e))return Cu(e);var t=yn(e),r=[];for(var n in e)n=="constructor"&&(t||!Tu.call(e,n))||r.push(n);return r}function oo(e){return Dt(e)?no(e,!0):Eu(e)}var ku=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/;function Sn(e,t){if(Ee(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Sr(e)?!0:_u.test(e)||!ku.test(e)||t!=null&&e in Object(t)}var Qt=bt(Object,"create");function Fu(){this.__data__=Qt?Qt(null):{},this.size=0}function Au(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ou="__lodash_hash_undefined__",Ru=Object.prototype,Mu=Ru.hasOwnProperty;function Du(e){var t=this.__data__;if(Qt){var r=t[e];return r===Ou?void 0:r}return Mu.call(t,e)?t[e]:void 0}var Pu=Object.prototype,Iu=Pu.hasOwnProperty;function Bu(e){var t=this.__data__;return Qt?t[e]!==void 0:Iu.call(t,e)}var ju="__lodash_hash_undefined__";function Nu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qt&&t===void 0?ju:t,this}function wt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wt.prototype.clear=Fu,wt.prototype.delete=Au,wt.prototype.get=Du,wt.prototype.has=Bu,wt.prototype.set=Nu;function Vu(){this.__data__=[],this.size=0}function kr(e,t){for(var r=e.length;r--;)if(Wt(e[r][0],t))return r;return-1}var Lu=Array.prototype,Hu=Lu.splice;function zu(e){var t=this.__data__,r=kr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Hu.call(t,r,1),--this.size,!0}function Uu(e){var t=this.__data__,r=kr(t,e);return r<0?void 0:t[r][1]}function qu(e){return kr(this.__data__,e)>-1}function Yu(e,t){var r=this.__data__,n=kr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function nt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nt.prototype.clear=Vu,nt.prototype.delete=zu,nt.prototype.get=Uu,nt.prototype.has=qu,nt.prototype.set=Yu;var Zt=bt(je,"Map");function Gu(){this.size=0,this.__data__={hash:new wt,map:new(Zt||nt),string:new wt}}function Wu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _r(e,t){var r=e.__data__;return Wu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ju(e){var t=_r(this,e).delete(e);return this.size-=t?1:0,t}function Ku(e){return _r(this,e).get(e)}function Qu(e){return _r(this,e).has(e)}function Zu(e,t){var r=_r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=Gu,it.prototype.delete=Ju,it.prototype.get=Ku,it.prototype.has=Qu,it.prototype.set=Zu;var Xu="Expected a function";function Cn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Cn.Cache||it),r}Cn.Cache=it;var ed=500;function td(e){var t=Cn(e,function(n){return r.size===ed&&r.clear(),n}),r=t.cache;return t}var rd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nd=/\\(\\)?/g,id=td(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rd,function(r,n,i,o){t.push(i?o.replace(nd,"$1"):n||r)}),t});function ao(e){return e==null?"":zi(e)}function $n(e,t){return Ee(e)?e:Sn(e,t)?[e]:id(ao(e))}function Xt(e){if(typeof e=="string"||Sr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function lo(e,t){t=$n(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Xt(t[r++])];return r&&r==n?e:void 0}function Je(e,t,r){var n=e==null?void 0:lo(e,t);return n===void 0?r:n}function od(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var so=io(Object.getPrototypeOf,Object),ad="[object Object]",ld=Function.prototype,sd=Object.prototype,co=ld.toString,cd=sd.hasOwnProperty,ud=co.call(Object);function dd(e){if(!We(e)||gt(e)!=ad)return!1;var t=so(e);if(t===null)return!0;var r=cd.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&co.call(r)==ud}function fd(){if(!arguments.length)return[];var e=arguments[0];return Ee(e)?e:[e]}function pd(){this.__data__=new nt,this.size=0}function hd(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function md(e){return this.__data__.get(e)}function gd(e){return this.__data__.has(e)}var yd=200;function bd(e,t){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!Zt||n.length<yd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(e,t),this.size=r.size,this}function Ne(e){var t=this.__data__=new nt(e);this.size=t.size}Ne.prototype.clear=pd,Ne.prototype.delete=hd,Ne.prototype.get=md,Ne.prototype.has=gd,Ne.prototype.set=bd;var uo=typeof Y=="object"&&Y&&!Y.nodeType&&Y,fo=uo&&typeof module=="object"&&module&&!module.nodeType&&module,wd=fo&&fo.exports===uo,po=wd?je.Buffer:void 0,ho=po?po.allocUnsafe:void 0;function mo(e,t){if(t)return e.slice();var r=e.length,n=ho?ho(r):new e.constructor(r);return e.copy(n),n}function go(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function vd(){return[]}var xd=Object.prototype,Sd=xd.propertyIsEnumerable,yo=Object.getOwnPropertySymbols,Cd=yo?function(e){return e==null?[]:(e=Object(e),go(yo(e),function(t){return Sd.call(e,t)}))}:vd;function $d(e,t,r){var n=t(e);return Ee(e)?n:od(n,r(e))}function Tn(e){return $d(e,xn,Cd)}var En=bt(je,"DataView"),kn=bt(je,"Promise"),It=bt(je,"Set"),bo="[object Map]",Td="[object Object]",wo="[object Promise]",vo="[object Set]",xo="[object WeakMap]",So="[object DataView]",Ed=yt(En),kd=yt(Zt),_d=yt(kn),Fd=yt(It),Ad=yt(pn),Ve=gt;(En&&Ve(new En(new ArrayBuffer(1)))!=So||Zt&&Ve(new Zt)!=bo||kn&&Ve(kn.resolve())!=wo||It&&Ve(new It)!=vo||pn&&Ve(new pn)!=xo)&&(Ve=function(e){var t=gt(e),r=t==Td?e.constructor:void 0,n=r?yt(r):"";if(n)switch(n){case Ed:return So;case kd:return bo;case _d:return wo;case Fd:return vo;case Ad:return xo}return t});var Od=Object.prototype,Rd=Od.hasOwnProperty;function Md(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Rd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Fr=je.Uint8Array;function _n(e){var t=new e.constructor(e.byteLength);return new Fr(t).set(new Fr(e)),t}function Dd(e,t){var r=_n(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Pd=/\w*$/;function Id(e){var t=new e.constructor(e.source,Pd.exec(e));return t.lastIndex=e.lastIndex,t}var Co=Ge?Ge.prototype:void 0,$o=Co?Co.valueOf:void 0;function Bd(e){return $o?Object($o.call(e)):{}}function To(e,t){var r=t?_n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var jd="[object Boolean]",Nd="[object Date]",Vd="[object Map]",Ld="[object Number]",Hd="[object RegExp]",zd="[object Set]",Ud="[object String]",qd="[object Symbol]",Yd="[object ArrayBuffer]",Gd="[object DataView]",Wd="[object Float32Array]",Jd="[object Float64Array]",Kd="[object Int8Array]",Qd="[object Int16Array]",Zd="[object Int32Array]",Xd="[object Uint8Array]",ef="[object Uint8ClampedArray]",tf="[object Uint16Array]",rf="[object Uint32Array]";function nf(e,t,r){var n=e.constructor;switch(t){case Yd:return _n(e);case jd:case Nd:return new n(+e);case Gd:return Dd(e);case Wd:case Jd:case Kd:case Qd:case Zd:case Xd:case ef:case tf:case rf:return To(e,r);case Vd:return new n;case Ld:case Ud:return new n(e);case Hd:return Id(e);case zd:return new n;case qd:return Bd(e)}}function Eo(e){return typeof e.constructor=="function"&&!yn(e)?dc(so(e)):{}}var of="[object Map]";function af(e){return We(e)&&Ve(e)==of}var ko=Pt&&Pt.isMap,lf=ko?bn(ko):af,sf="[object Set]";function cf(e){return We(e)&&Ve(e)==sf}var _o=Pt&&Pt.isSet,uf=_o?bn(_o):cf,df=1,Fo="[object Arguments]",ff="[object Array]",pf="[object Boolean]",hf="[object Date]",mf="[object Error]",Ao="[object Function]",gf="[object GeneratorFunction]",yf="[object Map]",bf="[object Number]",Oo="[object Object]",wf="[object RegExp]",vf="[object Set]",xf="[object String]",Sf="[object Symbol]",Cf="[object WeakMap]",$f="[object ArrayBuffer]",Tf="[object DataView]",Ef="[object Float32Array]",kf="[object Float64Array]",_f="[object Int8Array]",Ff="[object Int16Array]",Af="[object Int32Array]",Of="[object Uint8Array]",Rf="[object Uint8ClampedArray]",Mf="[object Uint16Array]",Df="[object Uint32Array]",he={};he[Fo]=he[ff]=he[$f]=he[Tf]=he[pf]=he[hf]=he[Ef]=he[kf]=he[_f]=he[Ff]=he[Af]=he[yf]=he[bf]=he[Oo]=he[wf]=he[vf]=he[xf]=he[Sf]=he[Of]=he[Rf]=he[Mf]=he[Df]=!0,he[mf]=he[Ao]=he[Cf]=!1;function er(e,t,r,n,i,o){var a,s=t&df;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Oe(e))return e;var c=Ee(e);if(c)a=Md(e);else{var u=Ve(e),d=u==Ao||u==gf;if(Jt(e))return mo(e,s);if(u==Oo||u==Fo||d&&!i)a=d?{}:Eo(e);else{if(!he[u])return i?e:{};a=nf(e,u,s)}}o||(o=new Ne);var f=o.get(e);if(f)return f;o.set(e,a),uf(e)?e.forEach(function(m){a.add(er(m,t,r,m,e,o))}):lf(e)&&e.forEach(function(m,g){a.set(g,er(m,t,r,g,e,o))});var h=Tn,p=c?void 0:h(e);return Wi(p||e,function(m,g){p&&(g=m,m=e[g]),mn(a,g,er(m,t,r,g,e,o))}),a}var Pf=1,If=4;function dt(e){return er(e,Pf|If)}var Bf=1,jf=4;function Nf(e,t){return t=typeof t=="function"?t:void 0,er(e,Bf|jf,t)}function Vf(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var Lf="__lodash_hash_undefined__";function Hf(e){return this.__data__.set(e,Lf),this}function zf(e){return this.__data__.has(e)}function tr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new it;++t<r;)this.add(e[t])}tr.prototype.add=tr.prototype.push=Hf,tr.prototype.has=zf;function Uf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ro(e,t){return e.has(t)}var qf=1,Yf=2;function Mo(e,t,r,n,i,o){var a=r&qf,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&Yf?new tr:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var m=e[f],g=t[f];if(n)var y=a?n(g,m,f,t,e,o):n(m,g,f,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Uf(t,function(b,S){if(!Ro(p,S)&&(m===b||i(m,b,r,n,o)))return p.push(S)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Gf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Fn(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Wf=1,Jf=2,Kf="[object Boolean]",Qf="[object Date]",Zf="[object Error]",Xf="[object Map]",ep="[object Number]",tp="[object RegExp]",rp="[object Set]",np="[object String]",ip="[object Symbol]",op="[object ArrayBuffer]",ap="[object DataView]",Do=Ge?Ge.prototype:void 0,An=Do?Do.valueOf:void 0;function lp(e,t,r,n,i,o,a){switch(r){case ap:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case op:return!(e.byteLength!=t.byteLength||!o(new Fr(e),new Fr(t)));case Kf:case Qf:case ep:return Wt(+e,+t);case Zf:return e.name==t.name&&e.message==t.message;case tp:case np:return e==t+"";case Xf:var s=Gf;case rp:var c=n&Wf;if(s||(s=Fn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=Jf,a.set(e,t);var d=Mo(s(e),s(t),n,i,o,a);return a.delete(e),d;case ip:if(An)return An.call(e)==An.call(t)}return!1}var sp=1,cp=Object.prototype,up=cp.hasOwnProperty;function dp(e,t,r,n,i,o){var a=r&sp,s=Tn(e),c=s.length,u=Tn(t),d=u.length;if(c!=d&&!a)return!1;for(var f=c;f--;){var h=s[f];if(!(a?h in t:up.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=a;++f<c;){h=s[f];var b=e[h],S=t[h];if(n)var $=a?n(S,b,h,t,e,o):n(b,S,h,e,t,o);if(!($===void 0?b===S||i(b,S,r,n,o):$)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(g=!1)}return o.delete(e),o.delete(t),g}var fp=1,Po="[object Arguments]",Io="[object Array]",Ar="[object Object]",pp=Object.prototype,Bo=pp.hasOwnProperty;function hp(e,t,r,n,i,o){var a=Ee(e),s=Ee(t),c=a?Io:Ve(e),u=s?Io:Ve(t);c=c==Po?Ar:c,u=u==Po?Ar:u;var d=c==Ar,f=u==Ar,h=c==u;if(h&&Jt(e)){if(!Jt(t))return!1;a=!0,d=!1}if(h&&!d)return o||(o=new Ne),a||vn(e)?Mo(e,t,r,n,i,o):lp(e,t,c,r,n,i,o);if(!(r&fp)){var p=d&&Bo.call(e,"__wrapped__"),m=f&&Bo.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,y=m?t.value():t;return o||(o=new Ne),i(g,y,r,n,o)}}return h?(o||(o=new Ne),dp(e,t,r,n,i,o)):!1}function Or(e,t,r,n,i){return e===t?!0:e==null||t==null||!We(e)&&!We(t)?e!==e&&t!==t:hp(e,t,r,n,Or,i)}var mp=1,gp=2;function yp(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],c=e[s],u=a[1];if(a[2]){if(c===void 0&&!(s in e))return!1}else{var d=new Ne,f;if(!(f===void 0?Or(u,c,mp|gp,n,d):f))return!1}}return!0}function jo(e){return e===e&&!Oe(e)}function bp(e){for(var t=xn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,jo(i)]}return t}function No(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function wp(e){var t=bp(e);return t.length==1&&t[0][2]?No(t[0][0],t[0][1]):function(r){return r===e||yp(r,e,t)}}function vp(e,t){return e!=null&&t in Object(e)}function xp(e,t,r){t=$n(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Xt(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&gn(i)&&Tr(a,i)&&(Ee(e)||Er(e)))}function Sp(e,t){return e!=null&&xp(e,t,vp)}var Cp=1,$p=2;function Tp(e,t){return Sn(e)&&jo(t)?No(Xt(e),t):function(r){var n=Je(r,e);return n===void 0&&n===t?Sp(r,e):Or(t,n,Cp|$p)}}function Ep(e){return function(t){return t==null?void 0:t[e]}}function kp(e){return function(t){return lo(t,e)}}function _p(e){return Sn(e)?Ep(Xt(e)):kp(e)}function Vo(e){return typeof e=="function"?e:e==null?Cr:typeof e=="object"?Ee(e)?Tp(e[0],e[1]):wp(e):_p(e)}function Fp(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var c=a[++i];if(r(o[c],c,o)===!1)break}return t}}var Lo=Fp();function Ap(e,t){return e&&Lo(e,t,xn)}function Op(e,t){return function(r,n){if(r==null)return r;if(!Dt(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}var On=Op(Ap),Rn=function(){return je.Date.now()},Rp="Expected a function",Mp=Math.max,Dp=Math.min;function Pp(e,t,r){var n,i,o,a,s,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Rp);t=qi(t)||0,Oe(r)&&(d=!!r.leading,f="maxWait"in r,o=f?Mp(qi(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(T){var E=n,k=i;return n=i=void 0,u=T,a=e.apply(k,E),a}function m(T){return u=T,s=setTimeout(b,t),d?p(T):a}function g(T){var E=T-c,k=T-u,V=t-E;return f?Dp(V,o-k):V}function y(T){var E=T-c,k=T-u;return c===void 0||E>=t||E<0||f&&k>=o}function b(){var T=Rn();if(y(T))return S(T);s=setTimeout(b,g(T))}function S(T){return s=void 0,h&&n?p(T):(n=i=void 0,a)}function $(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function L(){return s===void 0?a:S(Rn())}function R(){var T=Rn(),E=y(T);if(n=arguments,i=this,c=T,E){if(s===void 0)return m(c);if(f)return clearTimeout(s),s=setTimeout(b,t),p(c)}return s===void 0&&(s=setTimeout(b,t)),a}return R.cancel=$,R.flush=L,R}function Mn(e,t,r){(r!==void 0&&!Wt(e[t],r)||r===void 0&&!(t in e))&&hn(e,t,r)}function Ip(e){return We(e)&&Dt(e)}function Dn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Bp(e){return Oc(e,oo(e))}function jp(e,t,r,n,i,o,a){var s=Dn(e,r),c=Dn(t,r),u=a.get(c);if(u){Mn(e,r,u);return}var d=o?o(s,c,r+"",e,t,a):void 0,f=d===void 0;if(f){var h=Ee(c),p=!h&&Jt(c),m=!h&&!p&&vn(c);d=c,h||p||m?Ee(s)?d=s:Ip(s)?d=hc(s):p?(f=!1,d=mo(c,!0)):m?(f=!1,d=To(c,!0)):d=[]:dd(c)||Er(c)?(d=s,Er(s)?d=Bp(s):(!Oe(s)||dn(s))&&(d=Eo(c))):f=!1}f&&(a.set(c,d),i(d,c,n,o,a),a.delete(c)),Mn(e,r,d)}function Ho(e,t,r,n,i){e!==t&&Lo(t,function(o,a){if(i||(i=new Ne),Oe(o))jp(e,t,a,r,Ho,n,i);else{var s=n?n(Dn(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),Mn(e,a,s)}},oo)}function Np(e){return typeof e=="function"?e:Cr}function zo(e,t){var r=Ee(e)?Wi:On;return r(e,Np(t))}function Vp(e,t){var r=[];return On(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function vt(e,t){var r=Ee(e)?go:Vp;return r(e,Vo(t))}function Lp(e,t){var r=-1,n=Dt(e)?Array(e.length):[];return On(e,function(i,o,a){n[++r]=t(i,o,a)}),n}function Uo(e,t){var r=Ee(e)?Vi:Lp;return r(e,Vo(t))}function Rr(e,t){return Or(e,t)}var Mr=Ic(function(e,t,r){Ho(e,t,r)});function Hp(e,t,r,n){if(!Oe(e))return e;t=$n(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var c=Xt(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=a){var d=s[c];u=void 0,u===void 0&&(u=Oe(d)?d:Tr(t[i+1])?[]:{})}mn(s,c,u),s=s[c]}return e}function Se(e,t,r){return e==null?e:Hp(e,t,r)}function zp(e){return ao(e).toLowerCase()}var Up=1/0,qp=It&&1/Fn(new It([,-0]))[1]==Up?function(e){return new It(e)}:pc,Yp=200;function Gp(e,t,r){var n=-1,i=Ec,o=e.length,a=!0,s=[],c=s;if(o>=Yp){var u=qp(e);if(u)return Fn(u);a=!1,i=Ro,c=new tr}else c=s;e:for(;++n<o;){var d=e[n],f=d;if(d=d!==0?d:0,a&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;s.push(d)}else i(c,f,r)||(c!==s&&c.push(f),s.push(d))}return s}function Wp(e){return e&&e.length?Gp(e):[]}const qo={search:"Search",reset:"Reset",expand:"Expand",unexpand:"Unexpand",pleaseEnter:"Please enter ",pleaseSelect:"Please select ",rangeStart:"start ",rangeEnd:"end ",today:"Today",yesterday:"Yesterday",lastWeek:"Last week",last7:"Last seven days",last30:"Last 30 days",thisMonth:"This month",thisYear:"This year",min:"Min",max:"Max",table:{total:"Total"},timePeriodOutOfRange:"The current period is outside the selectable range",upload:{select:"Select files",tip:"Allowed formats and maximum size",uploading:"Uploading",preview:"Preview",download:"Download",delete:"Delete",retry:"Retry association",setCover:"Set cover",unsetCover:"Unset cover",tooMany:"File count exceeds the limit",invalidType:"File type is not allowed",tooLarge:"File size exceeds the limit",failed:"File upload failed",missingBusinessId:"Business ID or file ID is missing"},action:{detail:"Detail",create:"Create",del:"Delete",edit:"Edit",export:"Export",save:"Save",cancel:"Cancel",return:"Return"}},Yo={search:"查询",reset:"重置",expand:"展开",unexpand:"收起",pleaseEnter:"请输入",pleaseSelect:"请选择",rangeStart:"开始",rangeEnd:"结束",today:"今天",yesterday:"昨天",lastWeek:"上周",last7:"最近七天",last30:"最近 30 天",thisMonth:"本月",thisYear:"今年",min:"最小",max:"最大",table:{total:"合计"},timePeriodOutOfRange:"已有时段超出可选范围",upload:{select:"选择文件",tip:"支持的格式及最大大小",uploading:"上传中",preview:"预览",download:"下载",delete:"删除",retry:"重试关联",setCover:"设为封面",unsetCover:"取消封面",tooMany:"文件数量超过限制",invalidType:"文件格式不符合要求",tooLarge:"文件大小超过限制",failed:"文件上传失败",missingBusinessId:"缺少业务主键或文件标识"},action:{detail:"详情",create:"新增",del:"删除",edit:"编辑",export:"导出",save:"保存",cancel:"取消",return:"返回"}},Ce=(e="localStorage")=>({wsCache:e==="localStorage"?window.localStorage:window.sessionStorage,setLang:Go,getLang:rr,isZhCN:xt,setTheme:Wo,getTheme:Jo,isDark:Ko,setCurrentSize:Qo,getCurrentSize:Zo,setUser:Xo,getUser:ea}),ot={IS_DARK:"isDark",LANG:"lang",THEME:"theme",LAYOUT:"layout",CURRENT_SIZE:"currentSize",USER:"user"},Go=(e="")=>{const{wsCache:t}=Ce();t.setItem(ot.LANG,e)},rr=()=>{const{wsCache:e}=Ce();return e.getItem(ot.LANG)},xt=()=>{const e=rr()||"";return!e||zp(e)==="zh-cn"},Wo=e=>{const{wsCache:t}=Ce();t.setItem(ot.THEME,JSON.stringify(e||"{}"))},Jo=()=>{const{wsCache:e}=Ce(),t=e.getItem(ot.THEME);return t?JSON.parse(t):void 0},Ko=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,Qo=(e="")=>{const{wsCache:t}=Ce();t.setItem(ot.CURRENT_SIZE,e)},Zo=()=>{const{wsCache:e}=Ce();return e.getItem(ot.CURRENT_SIZE)},Xo=e=>{const{wsCache:t}=Ce();t.setItem(ot.USER,JSON.stringify(e||"{}"))},ea=()=>{const{wsCache:e}=Ce(),t=e.getItem(ot.USER),r=t?JSON.parse(t):{};return r.permissions=new Set(r.permissions||[]),r},Jp=rr()||"zh-cn",Ke=e=>({t:r=>Je(Jp==="zh-cn"?Yo:qo,r,r)});function Kp(e){const t=new Set(e.map(n=>n.field).filter(Boolean)),r=new Set;return e.flatMap(n=>{if(n.rangeFields===void 0)return[];const i=n.rangeFields;if(typeof n.field!="string"||!n.field||!Array.isArray(i)||!i.length||i.some(o=>typeof o!="string"||!o||t.has(o)||r.has(o))||new Set(i).size!==i.length)throw new TypeError(`Invalid rangeFields for search rule "${n.field}": expected distinct fields that do not conflict with other rules.`);return i.forEach(o=>r.add(o)),[{field:n.field,fields:i,trimTrailingNulls:n.type==="cascader"}]})}function Qp(e,t,r){if(!t.length||e==null&&!r.size)return e;const n=M({},e);for(const{field:i,fields:o,trimTrailingNulls:a}of t)if(o.some(s=>Object.prototype.hasOwnProperty.call(n,s))){const s=o.map(c=>{var u;return(u=n[c])!=null?u:null});if(a)for(;s.length&&s[s.length-1]===null;)s.pop();n[i]=s.every(c=>c===null)?null:s,o.forEach(c=>delete n[c])}else r.has(i)&&!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=null);return n}function Zp(e,t){if(!t.length||e==null)return e;const r=M({},e);for(const{field:n,fields:i}of t){if(!Object.prototype.hasOwnProperty.call(r,n))continue;const o=r[n];if(o!=null&&o!==""&&!Array.isArray(o))throw new TypeError(`Invalid range value for search rule "${n}": expected an array or an empty value.`);i.forEach((a,s)=>{var c;r[a]=Array.isArray(o)&&(c=o[s])!=null?c:null}),delete r[n]}return r}const Xp=((e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r})(l.defineComponent({name:"AbSearch",__name:"ab-search",props:l.mergeModels({rule:{},compactMode:{type:Boolean,default:!1},collapse:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["update:modelValue","query","reset"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.inject("abTableRef",null),{t:o}=Ke(),a=l.useModel(e,"modelValue"),s=l.ref(n.collapse),c=l.ref(),u=l.ref(),d=l.computed(()=>Kp(n.rule.map(V))),f=l.reactive(new Set);l.watch(()=>d.value.map(({field:_,fields:F})=>({field:_,present:a.value!=null&&F.some(A=>Object.prototype.hasOwnProperty.call(a.value,A))})),_=>{const F=new Set(_.map(({field:A})=>A));for(const A of f)F.has(A)||f.delete(A);for(const{field:A,present:C}of _)C&&f.add(A)},{immediate:!0,flush:"sync"});const h=l.computed(()=>Qp(a.value,d.value,f));let p;function m(_,F){const A=M({},p!=null?p:h.value);for(const C of F.fields())Object.prototype.hasOwnProperty.call(_,C)?A[C]=_[C]:delete A[C];p=A,a.value=Zp(A,d.value),l.nextTick(()=>{p===A&&(p=void 0)})}const g=l.reactive({type:"ElFormItem",native:!0,props:{justify:"end"},class:"ab-form-item ab-search__operates",children:[{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:search"}},o("search")],props:{type:"primary"},on:{click:U}},{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:refresh"}},o("reset")],props:{type:"default"},on:{click:k}},{type:"ElButton",native:!0,children:[o("expand")],props:{type:"primary",link:!0,icon:l.markRaw(ke.ArrowDown)},on:{click:x}}]});l.watchEffect(()=>{g.children[2].children=[o(s.value?"unexpand":"expand")],g.children[2].props.icon=s.value?l.markRaw(ke.ArrowUp):l.markRaw(ke.ArrowDown)}),l.watch(()=>n.rule,()=>{s.value=n.collapse});const y=l.computed(()=>[...n.rule.filter(_=>V(_).hidden!==!0),g]),b=l.computed(()=>n.rule.filter(_=>V(_).hidden===!0).map(_=>l.shallowReactive(ne(M({},V(_)),{hidden:!1}))));function S(_,F=new Set){for(const A of _){if(!A||typeof A!="object")continue;const C=V(A);if(typeof C.field=="string"&&F.add(C.field),Array.isArray(C.children)&&S(C.children,F),Array.isArray(C.control))for(const B of C.control)Array.isArray(B.rule)&&S(B.rule,F)}return F}const $=l.computed(()=>S(y.value)),L=l.computed(()=>S(b.value));function R(_){if(h.value==null)return h.value;const F=M({},h.value);for(const A of _)delete F[A];return F}const T=l.computed(_=>{const F=R(L.value);return Rr(F,_)?_:F}),E=l.computed(_=>{const F=R($.value);return Rr(F,_)?_:F});l.watch(()=>a.value,_=>q());function k(){return ye(this,null,function*(){var _,F;(_=c.value)==null||_.resetFields(),yield l.nextTick(),(F=u.value)==null||F.resetFields()})}function V(_){return typeof _.getRule=="function"?_.getRule():_}function q(){var _;(_=i==null?void 0:i.value)==null||_.reload(),r("query",a.value)}function U(){return ye(this,null,function*(){yield l.nextTick(),q()})}function x(){s.value=!s.value}return(_,F)=>{const A=l.resolveComponent("ab-form");return l.openBlock(),l.createElementBlock("section",{class:l.normalizeClass(["ab-search",e.compactMode?"compact":""])},[l.createVNode(A,{rule:y.value,"model-value":T.value,"onUpdate:modelValue":F[0]||(F[0]=C=>m(C,c.value)),api:c.value,"onUpdate:api":F[1]||(F[1]=C=>c.value=C)},null,8,["rule","model-value","api"]),l.createVNode(l.Transition,{name:"ab-search-expand",mode:"out-in",appear:"",persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",null,[l.createVNode(A,{rule:b.value,"model-value":E.value,"onUpdate:modelValue":F[2]||(F[2]=C=>m(C,u.value)),api:u.value,"onUpdate:api":F[3]||(F[3]=C=>u.value=C)},null,8,["rule","model-value","api"])],512),[[l.vShow,s.value]])]),_:1})],2)}}}),[["__scopeId","data-v-bfc6a8b4"]]),eh=(e,t)=>{e.component("ab-search",Xp)};function Bt(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function ta(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function Pe(e,t,r){e&&t&&(e[t]=r)}function St(e,t){e&&t&&delete e[t]}var ra=e=>Object.prototype.toString.call(e).slice(8,-1),j={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&!!e&&"nodeType"in e&&e.nodeType===1&&!j.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=ra(e);return t==="Function"||t==="AsyncFunction"},getType(e){return ra(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e},Date:e=>j.type(e,"Date"),Object:e=>j.type(e,"Object"),String:e=>j.type(e,"String"),Boolean:e=>j.type(e,"Boolean"),Array:e=>j.type(e,"Array"),Number:e=>j.type(e,"Number")};function ue(e,t){return{}.hasOwnProperty.call(e,t)}function Dr(e,t={},r){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=Reflect.get(t,n);if(Array.isArray(i)||j.Object(i)){let o=Reflect.get(e,n)===void 0;if(Array.isArray(i))o&&Pe(e,n,[]);else{let a=i;if(a._clone&&r!==void 0)if(r)i=a.getRule(),o&&Pe(e,n,{});else{Pe(e,n,a._clone());continue}else o&&Pe(e,n,{})}Reflect.set(e,n,Dr(Reflect.get(e,n),i,r))}else if(Pe(e,n,i),!j.Undef(i)){let o=i;j.Undef(o.__json)||Reflect.set(Reflect.get(e,n),"__json",o.__json),j.Undef(o.__origin)||Reflect.set(Reflect.get(e,n),"__origin",o.__origin)}}return r!==void 0&&Array.isArray(e)?e.filter(n=>!n||!n.__ctrl):e}function Ct(e){return Dr({},{value:e}).value}function na(e,t,r){return`[archbiz ${e}]: ${t}`}function Pn(e,t){console.error(na("err",e))}function th(e){Pn(e instanceof Error?e.toString():String(e)),console.error(e)}var ia=["props"],oa=["class","style","directives"],aa=["on","hook"],In="[[T-FORM-PREFIX-",Bn="-T-FORM-SUFFIX]]";function jn(e){return Function(`return ${e}`)()}function nr(e,t){let r=Dr(Array.isArray(e)?[]:{},e,!0),n=JSON.stringify(r,function(i,o){var c;if(typeof o=="object"&&o&&Reflect.get(o,"_isVue")===!0)return;if(typeof o!="function")return o;let a=o;if(a.__json)return a.__json;let s=(c=a.__origin)!=null?c:o;if(!a.__emit)return`${In}${s}${Bn}`},t);if(n===void 0)throw TypeError("Unable to serialize the provided value as JSON.");return n}function Qe(e,t){if(typeof e!="string"||e.length<=4)return e;let r=e.trim(),n=!1;try{if(r.indexOf(Bn)>0&&r.indexOf(In)===0)r=r.replace(Bn,"").replace(In,""),n=!0;else if(r.indexOf("$FN:")===0)r=r.substring(4),n=!0;else if(r.indexOf("$EXEC:")===0)r=r.substring(6),n=!0;else if(r.indexOf("$GLOBAL:")===0){let o=r.substring(8),a=function(...s){let c=s[0].api.getGlobalEvent(o);if(typeof c=="function")return c.apply(this,s)};return a.__json=e,a.__inject=!0,a}else if(r.indexOf("$FNX:")===0){let o=jn(`function($inject){
|
|
8
|
+
${r.substring(5)}
|
|
9
|
+
}`);return o.__json=e,o.__inject=!0,o}else(!t&&r.indexOf("function ")===0&&r!=="function "||!t&&r.indexOf("function(")===0&&r!=="function(")&&(n=!0);if(!n)return e;let i;try{i=jn(r)}catch(o){i=jn(`function ${r}`)}return i.__json=e,i}catch(i){Pn(`解析失败:${r}
|
|
10
|
+
|
|
11
|
+
err: ${String(i)}`);return}}function la(e,t){return JSON.parse(e,function(r,n){return typeof n=="string"?Qe(n,t):n})}var at=(e,t={},r={})=>{let n=[...ia,...r.normal||[]],i=[...oa,...r.array||[]],o=[...aa,...r.functional||[]],a=r.props||[];return e.reduce((s,c)=>{for(let u in c)if(s[u])if(a.indexOf(u)>-1)s[u]=at([c[u]],s[u]);else if(n.indexOf(u)>-1)s[u]=M(M({},s[u]),c[u]);else if(i.indexOf(u)>-1){let d=s[u]instanceof Array?s[u]:[s[u]],f=c[u]instanceof Array?c[u]:[c[u]];s[u]=[...d,...f]}else if(o.indexOf(u)>-1)for(let d in c[u])if(s[u][d]){let f=s[u][d]instanceof Array?s[u][d]:[s[u][d]],h=c[u][d]instanceof Array?c[u][d]:[c[u][d]];s[u][d]=[...f,...h]}else s[u][d]=c[u][d];else if(u==="hook")for(let d in c[u])s[u][d]?s[u][d]=rh(s[u][d],c[u][d]):s[u][d]=c[u][d];else s[u]=c[u];else s[u]=n.indexOf(u)>-1||o.indexOf(u)>-1||a.indexOf(u)>-1?M({},c[u]):i.indexOf(u)>-1?c[u]instanceof Array?[...c[u]]:typeof c[u]=="object"?M({},c[u]):c[u]:c[u];return s},t)},rh=(e,t)=>function(...r){e&&e.apply(this,r),t&&t.apply(this,r)};function ft(e,t){let r=null;return function(...n){r!==null&&clearTimeout(r),r=setTimeout(()=>e.apply(this,n),t)}}function pt(e,t,r){let n=e,i;return(t||"").split(".").forEach(o=>{i&&(n[i]&&typeof n[i]=="object"||(n[i]={}),n=n[i]),i=o}),n[String(i)]=r,n}function ee(e,...t){return(Object.assign||function(r,...n){for(let i of n)for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&Pe(r,o,Reflect.get(i,o));return r})(e,...t)}function sa(e){return typeof e!="object"||!e?e:Array.isArray(e)?[...e]:M({},e)}function nh(e=new Map){let t={$on(r,n){let i=e.get(r);i&&i.push(n)||e.set(r,[n])},$once(r,n){n._once=!0,t.$on(r,n)},$off(r,n){let i=e.get(r);i&&i.splice(i.indexOf(n)>>>0,1)},$emit(r,...n){(e.get(r)||[]).slice().forEach(i=>{"_once"in i&&i._once&&(t.$off(r,i),delete i._once),i(...n)}),(e.get("*")||[]).slice().forEach(i=>{i(r,n)})}};return t}function ih(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nn(e){return ih(e)?e:Promise.resolve(e)}function $t(e){return Array.isArray(e)?e:e==null||e===""?[]:[e]}function Me(e){return ca(e==null?void 0:e.replace(/(-[a-z])/g,function(t){return t.replace("-","").toLocaleUpperCase()}))}function ca(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function ir(e){return e?typeof e=="object"?JSON.stringify(e,null,2):String(e):""}var oh=0;function Pr(){let e=370+ ++oh;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}function ua(e,t,r={}){let{valueField:n="value",childrenField:i="children"}=r;for(let o of e){if(o[n]===t)return o;if(Array.isArray(o[i])){let a=ua(o[i],t,r);if(a)return a}}}var ah={black:"#182327"},lh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Le={h:0,s:0,l:0},Ir={h:0,s:0,l:0};function Vn(e,t,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*6*(2/3-r):e}var sh=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/,da=class Rt{constructor(t,r,n,i){ve(this,"isColor",!0);ve(this,"r",1);ve(this,"g",1);ve(this,"b",1);ve(this,"a",1);return r===void 0&&n===void 0?this.set(t):this.setRGBA(t,r,n,i)}static isColor(t){return typeof t=="string"?sh.test(t):typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=16777215&&t.toString(6).length===6}static getRandomStyle(t){return t?Ze.random().setA(t).getStyle():Ze.random().getStyle()}static getDarken(t,r=.8){return Ze.set(t).getHSL(Br),Ze.setHSL(Br.h,Br.s,Br.l*r).getStyle()}static getLighten(t,r=1.2){return this.getDarken(t,r)}static getContrast(t){return Ze.set(t),Ze.getContrastString()}static getArray(t){return Ze.set(t).toArray()}static getComplementary(t){return Ze.set(t),Ze.getComplementaryString()}static getMoreTransparent(t,r){return Ze.set(t).setA(r).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,r,n){return this.setRGBA(t,r,n,this.a)}setRGBA(t,r,n,i=1){return this.r=t,this.g=r,this.b=n,this.a=i,this}setHSL(t,r,n,i=1){if(t=ch(t,1),r=or(r,0,1),n=or(n,0,1),r===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+r):n+r-n*r,a=2*n-o;this.r=Vn(a,o,t+1/3),this.g=Vn(a,o,t),this.b=Vn(a,o,t-1/3)}return this.a=i,this}setStyle(t){let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n,i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let a=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,c=parseInt(n[3],10)/100,u=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0);return this.setHSL(a,s,c,u)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let n=r[1],i=n.length;if(i===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(i===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let r=lh[t.toLowerCase()];return r===void 0?console.warn("Color: Unknown color "+t):this.setHex(r),this}clone(){return new Rt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Rt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Rt){let r=this.a,n=r*this.r+(1-r)*t.r,i=r*this.g+(1-r)*t.g,o=r*this.b+(1-r)*t.b;return new Rt(n,i,o)}getHex(){return or(this.r*255,0,255)<<16^or(this.g*255,0,255)<<8^or(this.b*255,0,255)}getHSL(t){let r=this.r,n=this.g,i=this.b,o=Math.max(r,n,i),a=Math.min(r,n,i),s=0,c,u=(a+o)/2;if(a===o)s=0,c=0;else{let d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case r:s=(n-i)/d+(n<i?6:0);break;case n:s=(i-r)/d+2;break;case i:s=(r-n)/d+4}s/=6}return t.h=s,t.s=c,t.l=u,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Rt){let r=this.toArray(),n=[0,0,0,1];for(let i=0;i<r.length;i++)if(i<3)n[i]=1-r[i];else if(i===3)r[i]>1||r[i]<=0?n[i]=1:n[i]=Math.max(Math.min(parseFloat(r[i].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(t===void 0||t>=1)return this.getHexString();let r=this.getRGBByBg(),n=r.r*t+(1-t),i=r.g*t+(1-t),o=r.b*t+(1-t);return new Rt(n,i,o).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,r,n){return this.getHSL(Le),Le.h+=t,Le.s+=r,Le.l+=n,this.setHSL(Le.h,Le.s,Le.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,r){return this.r=t.r+r.r,this.g=t.g+r.g,this.b=t.b+r.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,r){return this.r+=(t.r-this.r)*r,this.g+=(t.g-this.g)*r,this.b+=(t.b-this.b)*r,this}lerpColors(t,r,n){return this.r=t.r+(r.r-t.r)*n,this.g=t.g+(r.g-t.g)*n,this.b=t.b+(r.b-t.b)*n,this}lerpHSL(t,r){this.getHSL(Le),t.getHSL(Ir);let n=Ln(Le.h,Ir.h,r),i=Ln(Le.s,Ir.s,r),o=Ln(Le.l,Ir.l,r);return this.setHSL(n,i,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}toArray(t=[0,0,0,0],r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,t}fromBufferAttribute(t,r){return this.r=t.getX(r),this.g=t.getY(r),this.b=t.getZ(r),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},or=(e,t,r)=>Math.max(t,Math.min(r,e)),ch=(e,t)=>(e%t+t)%t,Ln=(e,t,r)=>(1-r)*e+r*t,Ze=new da,Br={h:0,s:0,l:0};function fa(){let e=window.localStorage.getItem("user"),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function Hn(e,t){let r=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(r=dh(e)),t&&t.length>0&&(r||(r=fh(t))),r)}var uh="*:*:*",dh=(e=[])=>{var r;let t=fa();return((r=t==null?void 0:t.permissions)==null?void 0:r.has(uh))||e.some(n=>{var i;return(i=t==null?void 0:t.permissions)==null?void 0:i.has(n)})};function fh(e){var t;if(e&&e instanceof Array&&e.length>0){let r=e;return!!(((t=fa())==null?void 0:t.roles)||[]).some(n=>n==="super_admin"||r.includes(n))}return console.error("permission.hasRole"),!1}var ar=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pa={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var A=["th","st","nd","rd"],C=F%100;return"["+F+(A[(C-20)%10]||A[C]||A[0])+"]"}},$=function(F,A,C){var B=String(F);return!B||B.length>=A?F:""+Array(A+1-B.length).join(C)+F},L={s:$,z:function(F){var A=-F.utcOffset(),C=Math.abs(A),B=Math.floor(C/60),I=C%60;return(A<=0?"+":"-")+$(B,2,"0")+":"+$(I,2,"0")},m:function F(A,C){if(A.date()<C.date())return-F(C,A);var B=12*(C.year()-A.year())+(C.month()-A.month()),I=A.clone().add(B,f),W=C-I<0,Z=A.clone().add(B+(W?-1:1),f);return+(-(B+(C-I)/(W?I-Z:Z-I))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:d,d:u,D:m,h:c,m:s,s:a,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},R="en",T={};T[R]=S;var E="$isDayjsObject",k=function(F){return F instanceof x||!(!F||!F[E])},V=function F(A,C,B){var I;if(!A)return R;if(typeof A=="string"){var W=A.toLowerCase();T[W]&&(I=W),C&&(T[W]=C,I=W);var Z=A.split("-");if(!I&&Z.length>1)return F(Z[0])}else{var X=A.name;T[X]=A,I=X}return!B&&I&&(R=I),I||!B&&R},q=function(F,A){if(k(F))return F.clone();var C=typeof A=="object"?A:{};return C.date=F,C.args=arguments,new x(C)},U=L;U.l=V,U.i=k,U.w=function(F,A){return q(F,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var x=function(){function F(C){this.$L=V(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[E]=!0}var A=F.prototype;return A.parse=function(C){this.$d=function(B){var I=B.date,W=B.utc;if(I===null)return new Date(NaN);if(U.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var Z=I.match(y);if(Z){var X=Z[2]-1||0,P=(Z[7]||"0").substring(0,3);return W?new Date(Date.UTC(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,P)):new Date(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,P)}}return new Date(I)}(C),this.init()},A.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},A.$utils=function(){return U},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(C,B){var I=q(C);return this.startOf(B)<=I&&I<=this.endOf(B)},A.isAfter=function(C,B){return q(C)<this.startOf(B)},A.isBefore=function(C,B){return this.endOf(B)<q(C)},A.$g=function(C,B,I){return U.u(C)?this[B]:this.set(I,C)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(C,B){var I=this,W=!!U.u(B)||B,Z=U.p(C),X=function(v,O){var N=U.w(I.$u?Date.UTC(I.$y,O,v):new Date(I.$y,O,v),I);return W?N:N.endOf(u)},P=function(v,O){return U.w(I.toDate()[v].apply(I.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(O)),I)},H=this.$W,G=this.$M,ie=this.$D,pe="set"+(this.$u?"UTC":"");switch(Z){case p:return W?X(1,0):X(31,11);case f:return W?X(1,G):X(0,G+1);case d:var K=this.$locale().weekStart||0,w=(H<K?H+7:H)-K;return X(W?ie-w:ie+(6-w),G);case u:case m:return P(pe+"Hours",0);case c:return P(pe+"Minutes",1);case s:return P(pe+"Seconds",2);case a:return P(pe+"Milliseconds",3);default:return this.clone()}},A.endOf=function(C){return this.startOf(C,!1)},A.$set=function(C,B){var I,W=U.p(C),Z="set"+(this.$u?"UTC":""),X=(I={},I[u]=Z+"Date",I[m]=Z+"Date",I[f]=Z+"Month",I[p]=Z+"FullYear",I[c]=Z+"Hours",I[s]=Z+"Minutes",I[a]=Z+"Seconds",I[o]=Z+"Milliseconds",I)[W],P=W===u?this.$D+(B-this.$W):B;if(W===f||W===p){var H=this.clone().set(m,1);H.$d[X](P),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else X&&this.$d[X](P);return this.init(),this},A.set=function(C,B){return this.clone().$set(C,B)},A.get=function(C){return this[U.p(C)]()},A.add=function(C,B){var I,W=this;C=Number(C);var Z=U.p(B),X=function(G){var ie=q(W);return U.w(ie.date(ie.date()+Math.round(G*C)),W)};if(Z===f)return this.set(f,this.$M+C);if(Z===p)return this.set(p,this.$y+C);if(Z===u)return X(1);if(Z===d)return X(7);var P=(I={},I[s]=n,I[c]=i,I[a]=r,I)[Z]||1,H=this.$d.getTime()+C*P;return U.w(H,this)},A.subtract=function(C,B){return this.add(-1*C,B)},A.format=function(C){var B=this,I=this.$locale();if(!this.isValid())return I.invalidDate||g;var W=C||"YYYY-MM-DDTHH:mm:ssZ",Z=U.z(this),X=this.$H,P=this.$m,H=this.$M,G=I.weekdays,ie=I.months,pe=I.meridiem,K=function(O,N,z,ae){return O&&(O[N]||O(B,W))||z[N].slice(0,ae)},w=function(O){return U.s(X%12||12,O,"0")},v=pe||function(O,N,z){var ae=O<12?"AM":"PM";return z?ae.toLowerCase():ae};return W.replace(b,function(O,N){return N||function(z){switch(z){case"YY":return String(B.$y).slice(-2);case"YYYY":return U.s(B.$y,4,"0");case"M":return H+1;case"MM":return U.s(H+1,2,"0");case"MMM":return K(I.monthsShort,H,ie,3);case"MMMM":return K(ie,H);case"D":return B.$D;case"DD":return U.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return K(I.weekdaysMin,B.$W,G,2);case"ddd":return K(I.weekdaysShort,B.$W,G,3);case"dddd":return G[B.$W];case"H":return String(X);case"HH":return U.s(X,2,"0");case"h":return w(1);case"hh":return w(2);case"a":return v(X,P,!0);case"A":return v(X,P,!1);case"m":return String(P);case"mm":return U.s(P,2,"0");case"s":return String(B.$s);case"ss":return U.s(B.$s,2,"0");case"SSS":return U.s(B.$ms,3,"0");case"Z":return Z}return null}(O)||Z.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(C,B,I){var W,Z=this,X=U.p(B),P=q(C),H=(P.utcOffset()-this.utcOffset())*n,G=this-P,ie=function(){return U.m(Z,P)};switch(X){case p:W=ie()/12;break;case f:W=ie();break;case h:W=ie()/3;break;case d:W=(G-H)/6048e5;break;case u:W=(G-H)/864e5;break;case c:W=G/i;break;case s:W=G/n;break;case a:W=G/r;break;default:W=G}return I?W:U.a(W)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return T[this.$L]},A.locale=function(C,B){if(!C)return this.$L;var I=this.clone(),W=V(C,B,!0);return W&&(I.$L=W),I},A.clone=function(){return U.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},F}(),_=x.prototype;return q.prototype=_,[["$ms",o],["$s",a],["$m",s],["$H",c],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(F){_[F[1]]=function(A){return this.$g(A,F[0],F[1])}}),q.extend=function(F,A){return F.$i||(F(A,x,q),F.$i=!0),q},q.locale=V,q.isDayjs=k,q.unix=function(F){return q(1e3*F)},q.en=T[R],q.Ls=T,q.p={},q})})(pa);var ph=pa.exports;const de=jt(ph);var hh={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r,n,i=1e3,o=6e4,a=36e5,s=864e5,c=31536e6,u=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:c,months:u,days:s,hours:a,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof L},m=function(T,E,k){return new L(T,k,E.$l)},g=function(T){return n.p(T)+"s"},y=function(T){return T<0},b=function(T){return y(T)?Math.ceil(T):Math.floor(T)},S=function(T){return Math.abs(T)},$=function(T,E){return T?y(T)?{negative:!0,format:""+S(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},L=function(){function T(k,V,q){var U=this;if(this.$d={},this.$l=q,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),V)return m(k*h[g(V)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach(function(F){U.$d[g(F)]=k[F]}),this.calMilliseconds(),this;if(typeof k=="string"){var x=k.match(d);if(x){var _=x.slice(2).map(function(F){return F!=null?Number(F):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce(function(V,q){return V+(k.$d[q]||0)*h[q]},0)},E.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=b(k/c),k%=c,this.$d.months=b(k/u),k%=u,this.$d.days=b(k/s),k%=s,this.$d.hours=b(k/a),k%=a,this.$d.minutes=b(k/o),k%=o,this.$d.seconds=b(k/i),k%=i,this.$d.milliseconds=k},E.toISOString=function(){var k=$(this.$d.years,"Y"),V=$(this.$d.months,"M"),q=+this.$d.days||0;this.$d.weeks&&(q+=7*this.$d.weeks);var U=$(q,"D"),x=$(this.$d.hours,"H"),_=$(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var A=$(F,"S"),C=k.negative||V.negative||U.negative||x.negative||_.negative||A.negative,B=x.format||_.format||A.format?"T":"",I=(C?"-":"")+"P"+k.format+V.format+U.format+B+x.format+_.format+A.format;return I==="P"||I==="-P"?"P0D":I},E.toJSON=function(){return this.toISOString()},E.format=function(k){var V=k||"YYYY-MM-DDTHH:mm:ss",q={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return V.replace(f,function(U,x){return x||String(q[U])})},E.as=function(k){return this.$ms/h[g(k)]},E.get=function(k){var V=this.$ms,q=g(k);return q==="milliseconds"?V%=1e3:V=q==="weeks"?b(V/h[q]):this.$d[q],V||0},E.add=function(k,V,q){var U;return U=V?k*h[g(V)]:p(k)?k.$ms:m(k,this).$ms,m(this.$ms+U*(q?-1:1),this)},E.subtract=function(k,V){return this.add(k,V,!0)},E.locale=function(k){var V=this.clone();return V.$l=k,V},E.clone=function(){return m(this.$ms,this)},E.humanize=function(k){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),R=function(T,E,k){return T.add(E.years()*k,"y").add(E.months()*k,"M").add(E.days()*k,"d").add(E.hours()*k,"h").add(E.minutes()*k,"m").add(E.seconds()*k,"s").add(E.milliseconds()*k,"ms")};return function(T,E,k){r=k,n=k().$utils(),k.duration=function(U,x){var _=k.locale();return m(U,{$l:_},x)},k.isDuration=p;var V=E.prototype.add,q=E.prototype.subtract;E.prototype.add=function(U,x){return p(U)?R(this,U,1):V.bind(this)(U,x)},E.prototype.subtract=function(U,x){return p(U)?R(this,U,-1):q.bind(this)(U,x)}}})})(hh);var ha={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){return function(r,n){var i=n.prototype,o=i.format;i.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return o.bind(this)(a);var u=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),f==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return f}});return o.bind(this)(d)}}})})(ha);var mh=ha.exports;const gh=jt(mh);var ma={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r="day";return function(n,i,o){var a=function(u){return u.add(4-u.isoWeekday(),r)},s=i.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),r);var d,f,h,p,m=a(this),g=(d=this.isoWeekYear(),f=this.$u,h=(f?o.utc:o)().year(d).startOf("year"),p=4-h.isoWeekday(),h.isoWeekday()>4&&(p+=7),h.add(p,r));return m.diff(g,"week")+1},s.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var c=s.startOf;s.startOf=function(u,d){var f=this.$utils(),h=!!f.u(d)||d;return f.p(u)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(u,d)}}})})(ma);var yh=ma.exports;const bh=jt(yh);var ga={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(b){this[y]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var S=b.match(/([+-]|\d\d)/g),$=60*S[1]+(+S[2]||0);return $===0?0:S[0]==="+"?-$:$}(y)}],h=function(y){var b=c[y];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(y,b){var S,$=c.meridiem;if($){for(var L=1;L<=24;L+=1)if(y.indexOf($(L,0,b))>-1){S=L>12;break}}else S=y===(b?"pm":"PM");return S},m={A:[s,function(y){this.afternoon=p(y,!1)}],a:[s,function(y){this.afternoon=p(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[o,d("day")],Do:[s,function(y){var b=c.ordinal,S=y.match(/\d+/);if(this.day=S[0],b)for(var $=1;$<=31;$+=1)b($).replace(/\[|\]/g,"")===y&&(this.day=$)}],w:[a,d("week")],ww:[o,d("week")],M:[a,d("month")],MM:[o,d("month")],MMM:[s,function(y){var b=h("months"),S=(h("monthsShort")||b.map(function($){return $.slice(0,3)})).indexOf(y)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[s,function(y){var b=h("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(y){var b,S;b=y,S=c&&c.formats;for(var $=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(q,U,x){var _=x&&x.toUpperCase();return U||S[x]||r[x]||S[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,A,C){return A||C.slice(1)})})).match(n),L=$.length,R=0;R<L;R+=1){var T=$[R],E=m[T],k=E&&E[0],V=E&&E[1];$[R]=V?{regex:k,parser:V}:T.replace(/^\[|\]$/g,"")}return function(q){for(var U={},x=0,_=0;x<L;x+=1){var F=$[x];if(typeof F=="string")_+=F.length;else{var A=F.regex,C=F.parser,B=q.slice(_),I=A.exec(B)[0];C.call(U,I),q=q.replace(I,"")}}return function(W){var Z=W.afternoon;if(Z!==void 0){var X=W.hours;Z?X<12&&(W.hours+=12):X===12&&(W.hours=0),delete W.afternoon}}(U),U}}return function(y,b,S){S.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var $=b.prototype,L=$.parse;$.parse=function(R){var T=R.date,E=R.utc,k=R.args;this.$u=E;var V=k[1];if(typeof V=="string"){var q=k[2]===!0,U=k[3]===!0,x=q||U,_=k[2];U&&(_=k[2]),c=this.$locale(),!q&&_&&(c=S.Ls[_]),this.$d=function(B,I,W,Z){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*B);var X=g(I)(B),P=X.year,H=X.month,G=X.day,ie=X.hours,pe=X.minutes,K=X.seconds,w=X.milliseconds,v=X.zone,O=X.week,N=new Date,z=G||(P||H?1:N.getDate()),ae=P||N.getFullYear(),oe=0;P&&!H||(oe=H>0?H-1:N.getMonth());var me,Ae=ie||0,Te=pe||0,De=K||0,we=w||0;return v?new Date(Date.UTC(ae,oe,z,Ae,Te,De,we+60*v.offset*1e3)):W?new Date(Date.UTC(ae,oe,z,Ae,Te,De,we)):(me=new Date(ae,oe,z,Ae,Te,De,we),O&&(me=Z(me).week(O).toDate()),me)}catch(Be){return new Date("")}}(T,V,E,S),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),x&&T!=this.format(V)&&(this.$d=new Date("")),c={}}else if(V instanceof Array)for(var F=V.length,A=1;A<=F;A+=1){k[1]=V[A-1];var C=S.apply(this,k);if(C.isValid()){this.$d=C.$d,this.$L=C.$L,this.init();break}A===F&&(this.$d=new Date(""))}else L.call(this,R)}}})})(ga);var wh=ga.exports;const vh=jt(wh),xh=rr()==="zh-cn";de.extend(bh),de.extend(gh),de.extend(vh);function lt(e){return typeof e=="undefined"||e==="undefined"||e==="null"||e===null||e===""||isNaN(e)}function Sh(e){if(lt(e))return e;let t="";return xh?t=Intl.NumberFormat("zh-CN",{style:"currency",currency:"CNY"}).format(e):t=Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e),t}function Ch(e){return lt(e)?e:(Math.round(e*100)/100).toLocaleString()}function $h(e){return lt(e)?e:Math.round(e*100)/100+" %"}function _e(e,t="YYYY-MM-DD"){if(e==null||e==="")return e;const r=de(e);return r.isValid()?r.format(t):e}function Th(e,t,r="label",n){const i=[];if(Array.isArray(t)&&!t.length)return"";if(Array.isArray(t))for(let a=0,s=t.length;a<s;a++)t[a]=String(t[a]).trim().normalize();else t=String(t).trim().normalize();if(!(e!=null&&e.length))return lt(t)?"":t;const o=a=>!0;return Array.isArray(t)?i.push(...vt(e,a=>t.includes(String(a.value))&&o())):i.push(...vt(e,a=>(a.value===t||String(a.value)===String(t))&&o())),i!=null&&i.length?Wp(Vf(Uo(i,r))).join("、"):Array.isArray(t)||lt(t)?"":t}const ya=({cellValue:e}={},t="YYYY-MM-DD HH:mm")=>_e(e,t),zn=({cellValue:e}={},t="YYYY")=>_e(e,t),Un=({cellValue:e}={},t="Q")=>e==null||e===""||!de(e).isValid()?e:xt()?_e(e,"YYYY")+"年"+_e(e,t)+"季度":"Quarter "+_e(e,t)+", "+_e(e,"YYYY"),qn=({cellValue:e}={},t="MM")=>e==null||e===""||!de(e).isValid()?e:xt()?_e(e,"YYYY")+"年 "+_e(e,t)+"月":_e(e,t)+"/"+_e(e,"YYYY"),Eh=({cellValue:e}={},t="W")=>{if(e==null||e==="")return e;const r=typeof e=="string"&&/^(\d{4})-(\d{1,2})(?:st|nd|rd|th|周)$/i.exec(e);if(!r&&!de(e).isValid())return e;const n=r?r[1]:_e(e,"GGGG"),i=r?r[2]:_e(e,t);return xt()?n+"年第"+i+"周":"Week "+i+", "+n},ba=({cellValue:e,itemValue:t}={})=>((typeof e=="undefined"||e===null)&&(e=t),lt(e)?e:Ch(e)),wa=({cellValue:e}={})=>lt(e)?e:$h(e),va=({cellValue:e,itemValue:t}={})=>(lt(e)&&(e=t),lt(e)?e:Sh(e)),kh=new Map([["radio",Sa],["checkbox",Sa],["switch",_h],["treeSelect",Fh],["cascader",Ah],["inputNumber",()=>typeof ba=="function"?ba:void 0],["inputCurrency",()=>typeof va=="function"?va:void 0],["inputPercent",()=>typeof wa=="function"?wa:void 0],["datePicker",Oh],["timePicker",Rh]]);function Yn(e){var n;if(typeof e.formatter=="function")return ne(M({},e),{formatter:e.formatter});const t=kh.get((n=e.type)!=null?n:"");let r;return t?r=t(e):Array.isArray(e.options)&&e.options.length>0&&(r=Mh(e)),ne(M({},e),{formatter:r})}function xa(e,t){if(typeof e!="string"||typeof t!="string"||t==="YYYY-wo")return e;const r=t==="x"||t==="X"?de(Number(e)*(t==="X"?1e3:1)):de(e,t,!0);return r.isValid()?r:e}function Sa(e){var r;const t=((r=e.props)==null?void 0:r.options)||e.options;return({cellValue:n})=>n==null||n===""?"":(Array.isArray(n)?n:[n]).map(o=>{var s,c;const a=Array.isArray(t)?t.find(u=>(u==null?void 0:u.value)===o):void 0;return(c=(s=a==null?void 0:a.label)!=null?s:o)!=null?c:""}).join("、")}function _h(e){return({cellValue:t})=>{var a;const{activeValue:r=!0,inactiveValue:n=!1,activeText:i,inactiveText:o}=(a=e.props)!=null?a:{};return t===r?i||(xt()?"开启":"On"):t===n?o||(xt()?"关闭":"Off"):t!=null?t:""}}function Fh(e){var s,c,u,d,f,h,p;const t=(s=e.props)!=null?s:{},r=(c=t.props)!=null?c:{},n=e.optionsTo==="props.data"&&Array.isArray(e.options)?e.options:t.data,i=(f=(d=(u=r.value)!=null?u:t.nodeKey)!=null?d:t.valueKey)!=null?f:"value",o=(h=r.label)!=null?h:"label",a=(p=r.children)!=null?p:"children";return({cellValue:m})=>m==null||m===""?"":(Array.isArray(m)?m:[m]).map(y=>{var S;const b=Array.isArray(n)?ua(n,y,{valueField:i,childrenField:a}):void 0;return(S=b==null?void 0:b[o])!=null?S:y}).join("、")}function Ca(e,t,r,n){for(const i of e){if(Rr(i[r],t))return[i];const o=i[n];if(Array.isArray(o)){const a=Ca(o,t,r,n);if(a)return[i,...a]}}}function Ah(e){var f,h,p,m,g,y;const t=(f=e.props)!=null?f:{},r=(h=t.props)!=null?h:{},n=e.optionsTo==="props.options"&&Array.isArray(e.options)?e.options:t.options,i=(p=r.value)!=null?p:"value",o=(m=r.label)!=null?m:"label",a=(g=r.children)!=null?g:"children",s=Array.isArray(n)?n:[],c=(y=t.separator)!=null?y:" / ",u=t.showAllLevels!==!1;function d(b){let S;if(r.emitPath===!1){const $=Ca(s,b,i,a);S=$?$.map(L=>{var R;return(R=L[o])!=null?R:L[i]}):[b]}else{const $=Array.isArray(b)?b:[b];let L=s;S=$.map(R=>{var k;const T=L.find(V=>Rr(V[i],R)),E=T==null?void 0:T[a];return L=Array.isArray(E)?E:[],(k=T==null?void 0:T[o])!=null?k:R})}return(u?S:S.slice(-1)).join(c)}return({cellValue:b})=>b==null||b===""?"":r.multiple===!0?(Array.isArray(b)?b:[b]).map(d).join("、"):d(b)}const Gn={year:zn,years:zn,yearrange:zn,quarter:Un,quarters:Un,quarterrange:Un,month:qn,months:qn,monthrange:qn,week:Eh,datetime:ya,datetimerange:ya};function Oh(e){var n,i;const t=(i=(n=e.props)==null?void 0:n.type)!=null?i:"date",r=o=>{var s,c,u,d;if(o==null||o==="")return"";const a=xa(o,(s=e.props)==null?void 0:s.valueFormat);return(c=e.props)!=null&&c.format?_e(a,e.props.format):(d=(u=Gn[t])==null?void 0:u.call(Gn,{cellValue:a}))!=null?d:_e(a)};return({cellValue:o})=>{var s,c;if(!Array.isArray(o))return r(o);if(o.every(u=>u==null||u===""))return"";const a=t.endsWith("range")?(c=(s=e.props)==null?void 0:s.rangeSeparator)!=null?c:" - ":"、";return o.map(r).join(a)}}function Rh(e){const t=r=>{var i,o,a,s;if(r==null||r==="")return"";const n=xa(r,(o=(i=e.props)==null?void 0:i.valueFormat)!=null?o:"HH:mm");return _e(n,(s=(a=e.props)==null?void 0:a.format)!=null?s:"HH:mm")};return({cellValue:r})=>{var n,i;return Array.isArray(r)?r.every(o=>o==null||o==="")?"":r.map(t).join((i=(n=e.props)==null?void 0:n.rangeSeparator)!=null?i:" - "):t(r)}}function Mh(e){return({cellValue:t})=>Th(e.options,t)}function $a(e="small"){return e==="large"?"medium":e==="default"?"small":"mini"}const fe={DETAIL:"detail",DEL:"del",ADD:"add",EDIT:"edit",SAVE:"save",CREATE:"create",READ:"read",UPDATE:"update",EXPORT:"export",OPERATE:"OPERATE"};function Ta(e){let t=0;for(const r of e)r.group&&(t=Math.max(t,fd(r.group).length));return t+1}const Ea=()=>{const{t:e}=Ke();return{info(t){D.ElMessage.info(t)},error(t){D.ElMessage.error(t)},success(t){D.ElMessage.success(t)},warning(t){D.ElMessage.warning(t)},alert(t){D.ElMessageBox.alert(t,e("common.confirmTitle"))},alertError(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"error"})},alertSuccess(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"success"})},alertWarning(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"warning"})},notify(t){D.ElNotification.info(t)},notifyError(t){D.ElNotification.error(t)},notifySuccess(t){D.ElNotification.success(t)},notifyWarning(t){D.ElNotification.warning(t)},confirm(t,r){return D.ElMessageBox.confirm(t,r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},delConfirm(t,r){return D.ElMessageBox.confirm(t||e("common.delMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},exportConfirm(t,r){return D.ElMessageBox.confirm(t||e("common.exportMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},prompt(t,r){return D.ElMessageBox.prompt(t,r,{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})}}},jr=l.defineComponent({name:"AbTableOperate",__name:"ab-table-operate",props:l.mergeModels({rule:{},modelValue:{},idField:{},idFieldTable:{},permiPrefix:{},api:{},link:{type:Boolean},plain:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},{api:{},apiModifiers:{}}),emits:l.mergeModels(["refresh","operated"],["update:api"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=Ea(),s=l.inject("abTableDetailRef",void 0),c=l.inject("abTableRef",void 0),{wsCache:u}=Ce(),d=l.computed(()=>u.getCurrentSize||"default"),f=l.useModel(e,"api"),h=l.computed(()=>{var L;if(!i.rule||Array.isArray(i.rule)&&!((L=i.rule)!=null&&L.length))return;const $=Array.isArray(i.rule)?{type:"ElRow",children:[...dt(i.rule)],native:!0}:ne(M({},dt(i.rule)),{native:!0});return delete $.field,zo($==null?void 0:$.children,R=>{Se(R,"props.plain",i.plain),Se(R,"props.link",i.link),Se(R,"props.size",d.value),R.field===fe.CREATE?(Se(R,"children",[{type:"icon",props:{icon:"ep:plus"}},o(`action.${fe.CREATE}`)]),Se(R,"props",{type:"primary",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",m),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",p)):R.field===fe.DETAIL?(Se(R,"children",[{type:"icon",props:{icon:"ep:view"}},o(`action.${fe.DETAIL}`)]),Se(R,"props",{type:"primary",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",g)):R.field===fe.DEL?(Se(R,"children",[{type:"icon",props:{icon:"ep:delete"}},o(`action.${fe.DEL}`)]),Se(R,"props",{type:"danger",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",b),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",y)):R.field===fe.EXPORT&&(Se(R,"children",[{type:"icon",props:{icon:"ep:download"}},o(`action.${fe.EXPORT}`)]),Se(R,"props",{type:"warning",plain:i.plain,link:i.link}),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",S)),Se(R,"native",!0)}),[$]});function p(){return!Hn([`${i.permiPrefix}:create`],["admin"])}function m(){var $,L;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((L=s==null?void 0:s.value)==null||L.toggle(!0,i.modelValue,!1))}function g(){var $,L;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((L=s==null?void 0:s.value)==null||L.toggle(!0,i.modelValue,i.readonly))}function y(){return!Hn([`${i.permiPrefix}:delete`],["admin"])}function b(){return ye(this,null,function*(){var L,R;(yield a.delConfirm().catch(T=>T))==="confirm"&&(typeof i.deleteHandler=="function"&&i.idField&&(yield i.deleteHandler((L=i.modelValue)==null?void 0:L[i.idField])),yield l.nextTick(),(R=c==null?void 0:c.value)==null||R.remove(i.modelValue),n("refresh"))})}function S(){return!Hn([`${i.permiPrefix}:export`],["admin"])}return t({}),($,L)=>{const R=l.resolveComponent("ab-form");return l.openBlock(),l.createBlock(R,{rule:h.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":L[0]||(L[0]=T=>f.value=T)},null,8,["rule","model-value","api"])}}}),Dh={class:"ab-table-detail__title"},ka=l.defineComponent({name:"AbTableDetail",__name:"ab-table-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},visible:{type:Boolean},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(),c=l.ref({}),u=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.visible),h=l.ref(i.readonly);l.watch(()=>i.readonly,x=>h.value=x,{immediate:!0});const p=l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");i.id;const m=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),g=l.computed(()=>m.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:h.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),y=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),b=()=>{var x;h.value=!1,(x=c.value)==null||x.refresh()},S=()=>ye(this,null,function*(){E.value=!0;let x;m.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!m.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),E.value=!1}),$=()=>{var x;h.value=!0,(x=c.value)==null||x.refresh()},L=()=>V(),R=l.computed(()=>{const x=dt(y.value.find(_=>_.type!==fe.OPERATE&&_.field===fe.OPERATE));if(x)return x.children=vt(x==null?void 0:x.children,_=>_.field!==fe.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!h.value},on:{click:b}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:h.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:h.value},on:{click:$}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:L}}),x}),T=l.computed(()=>l.reactive(y.value.filter(x=>x.type!==fe.OPERATE&&x.field!==fe.OPERATE).map(x=>dt(x)))),E=l.ref(!1),k=(x=void 0,_=!1)=>ye(this,null,function*(){var F,A;if(h.value=_,f.value=!0,E.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=dt(x)||{};(F=i.rule)==null||F.forEach(B=>{const I=typeof B.getRule=="function"?B.getRule():B;I.field&&I.field!==fe.OPERATE&&typeof(C==null?void 0:C[I.field])=="undefined"&&typeof I.edit=="undefined"&&typeof I.itemRender=="undefined"&&(C[I.field]="")}),d.value=C}yield l.nextTick(),(A=c.value)==null||A.refresh(),n("open",d.value),E.value=!1}),V=()=>{h.value=!0,f.value=!1,d.value={}};return t({open:k,close:V,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):V(),reload:()=>ye(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,h.value)})}),(x,_)=>{const F=l.resolveComponent("ab-form"),A=l.resolveComponent("el-drawer"),C=l.resolveDirective("loading");return l.openBlock(),l.createBlock(A,{modelValue:f.value,"onUpdate:modelValue":_[3]||(_[3]=B=>f.value=B),"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:p.value,class:"ab-table-detail","header-class":"ab-table-detail__header"},{header:l.withCtx(()=>[l.createElementVNode("div",Dh,l.toDisplayString(g.value),1),l.withDirectives(l.createVNode(jr,{class:"ab-table-detail__opr","permi-prefix":e.permiPrefix,rule:R.value,"model-value":d.value,api:u.value,"onUpdate:api":_[0]||(_[0]=B=>u.value=B),plain:"",readonly:h.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,E.value]])]),default:l.withCtx(()=>[l.withDirectives(l.createVNode(F,{ref_key:"formRef",ref:s,rule:T.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=B=>d.value=B),api:c.value,"onUpdate:api":_[2]||(_[2]=B=>c.value=B),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:h.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,E.value]])]),_:1},8,["modelValue","size"])}}});function _a(e){return typeof e=="object"&&e!==null&&"name"in e&&typeof e.name=="string"}function Ph(e){return typeof e=="string"||typeof e=="function"||_a(e)}function Wn(e){return e==null||typeof e=="string"||typeof e=="number"?e:String(e)}function Fa(e){if(e!=null)return typeof e=="string"||typeof e=="number"?e:String(e)}function Ih(e,t,r){if(t==null||t==="")return;if(typeof e=="function")return e(r);if(typeof e=="string")return{name:e,query:{id:Wn(t)}};if(!_a(e))return;const n={name:e.name},i=e.query;typeof i=="string"?n.query={[i]:Wn(t)}:i&&(n.query={},Object.keys(i).forEach(a=>{const s=i[a];n.query[a]=Wn(r[s])}));const o=e.params;if(typeof o=="string"){const a=Fa(t);a!==void 0&&(n.params={[o]:a})}else o&&(n.params={},Object.keys(o).forEach(a=>{const s=o[a],c=Fa(r[s]);c!==void 0&&(n.params[a]=c)}));return n}const Bh={class:"ab-router-link"},Aa=l.defineComponent({name:"AbRouterLink",__name:"ab-router-link",props:{link:{},value:{},row:{}},setup(e){const t=e,r=l.computed(()=>Ih(t.link,t.value,t.row));return(n,i)=>{const o=l.resolveComponent("ab-icon");return l.openBlock(),l.createElementBlock("div",Bh,[l.createVNode(o,{icon:"ep:link",size:16}),r.value?(l.openBlock(),l.createBlock(l.unref(ut.RouterLink),{key:0,to:r.value,class:"ab-router-link"},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default")]),_:3},8,["to"])):l.renderSlot(n.$slots,"default",{},void 0,void 0,1)])}}}),jh=l.defineComponent({name:"AbTableColumn",__name:"ab-table-column",props:{rule:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh","operated"],setup(e,{emit:t}){const r=t,n=e;l.inject("abTableRef",null);const i=l.computed(()=>{var u;return!((u=n.rule)!=null&&u.hidden)}),o=l.computed(()=>n.sortable!==!1&&n.rule.sortable!==!1&&n.rule.sortFieldTable!==!1&&(n.rule.sortable===!0||n.rule.sortFieldTable!==void 0||!!n.idFieldTable)),a=l.computed(()=>{var u,d,f,h,p;return ne(M({},n.rule.params),{sortField:(d=n.rule.sortField)!=null?d:(u=n.rule.params)==null?void 0:u.sortField,sortFieldTable:typeof n.rule.sortFieldTable=="string"?n.rule.sortFieldTable:(p=(h=(f=n.rule.params)==null?void 0:f.sortFieldTable)!=null?h:n.idFieldTable)!=null?p:""})}),s=l.computed(()=>Yn(n.rule).formatter);function c({cellValue:u,row:d,column:f}={}){var h,p,m,g,y;typeof((p=(h=n.rule)==null?void 0:h.on)==null?void 0:p.change)=="function"&&((y=(g=(m=n.rule)==null?void 0:m.on)==null?void 0:g.change)==null||y.call(g,{cellValue:u,row:d,column:f}))}return l.inject("abTableDetailRef",void 0),(u,d)=>{var m,g,y,b,S;const f=l.resolveComponent("el-switch"),h=l.resolveComponent("ab-icon"),p=l.resolveComponent("vxe-column");return e.rule.field?(l.openBlock(),l.createBlock(p,{key:1,title:e.rule.title,field:e.rule.field,sortable:o.value,params:a.value,width:((m=e.rule)==null?void 0:m.width)||"auto","min-width":(g=e.rule)==null?void 0:g.minWidth,align:(y=e.rule)==null?void 0:y.align,fixed:(b=e.rule)==null?void 0:b.fixed,visible:i.value,"class-name":(S=e.rule)!=null&&S.cellArrow?"items-center":""},{default:l.withCtx($=>{var L,R;return[e.rule.type==="ElRow"&&e.rule.field===l.unref(fe).OPERATE?(l.openBlock(),l.createBlock(jr,{key:0,"id-field":e.idField,"permi-prefix":e.permiPrefix,rule:e.rule,"model-value":$.row,"delete-handler":e.deleteHandler,readonly:e.readonly,link:"",onRefresh:d[0]||(d[0]=T=>r("refresh"))},null,8,["id-field","permi-prefix","rule","model-value","delete-handler","readonly"])):e.rule.field?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[(L=e.rule)!=null&&L.cellRender?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[e.rule.type==="switch"?(l.openBlock(),l.createBlock(f,l.mergeProps({key:0},e.rule.props,{modelValue:$.row[e.rule.field],"onUpdate:modelValue":T=>$.row[e.rule.field]=T,onChange:T=>c({cellValue:$.row[e.rule.field],column:$.column,row:$.row})}),null,16,["modelValue","onUpdate:modelValue","onChange"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.rule.type),1)],64))],64)):e.rule.link?(l.openBlock(),l.createBlock(Aa,{key:1,link:e.rule.link,value:$.row[e.rule.field],row:$.row},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))]),_:2},1032,["link","value","row"])):s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))],64)):l.createCommentVNode("",!0),(R=e.rule)!=null&&R.cellArrow?(l.openBlock(),l.createBlock(h,{key:2,icon:$.row[e.rule.field]<0?"streamline:graph-arrow-decrease":"streamline:graph-arrow-increase",class:l.normalizeClass($.row[e.rule.field]<0?"danger":"success")},null,8,["icon","class"])):l.createCommentVNode("",!0)]}),_:1},8,["title","field","sortable","params","width","min-width","align","fixed","visible","class-name"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[],64))}}}),Nh=l.defineComponent({name:"AbTableColumns",__name:"ab-table-columns",props:{rule:{},idx:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh"],setup(e,{emit:t}){const r=t,n=e,i=l.computed(()=>{const{field:o,children:a}=n.rule;return!!(a!=null&&a.length)&&(o?o!==fe.OPERATE:!n.rule.type&&!!n.rule.title)});return(o,a)=>{var u,d,f;const s=l.resolveComponent("ab-table-columns",!0),c=l.resolveComponent("vxe-colgroup");return i.value?(l.openBlock(),l.createBlock(c,{key:0,field:e.rule.field,title:(u=e.rule)==null?void 0:u.title,"header-align":((d=e.rule)==null?void 0:d.groupAlign)||((f=e.rule)==null?void 0:f.align)||"center"},{default:l.withCtx(()=>{var h;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((h=e.rule)==null?void 0:h.children,(p,m)=>(l.openBlock(),l.createBlock(s,l.mergeProps({key:p.field||`${e.idx}_${m}`,ref_for:!0},ne(M({},n),{rule:p,idx:m}),{"id-field":e.idField,onRefresh:a[0]||(a[0]=g=>r("refresh"))}),null,16,["id-field"]))),128))]}),_:1},8,["field","title","header-align"])):(l.openBlock(),l.createBlock(jh,{key:1,rule:e.rule,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:a[1]||(a[1]=h=>r("refresh"))},null,8,["rule","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))}}});function Nr(e,t){if(!e||e===t)return;let r=e.props.abFormInject;if(r)return r;if(e.parent)return Nr(e.parent,t)}function Oa(){let e=l.getCurrentInstance();if(!e)throw Error("AbForm lifecycle hook requires an active Vue component.");return e}function Vh(){return typeof document<"u"&&typeof document.createElement=="function"&&document.head!=null}function Lh(e,t,r){return l.defineComponent({name:"AbForm"+(e.isMobile?"Mobile":""),components:t,directives:r,props:{rule:{type:Array,required:!0,default:()=>[]},option:{type:Object,default:()=>({})},extendOption:Boolean,driver:[String,Object],modelValue:Object,idField:String,idFieldTable:String,disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","beforeUnmount","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render(){return this.fc.render()},setup(n){let i=Oa();l.provide("parentFC",i);let o=l.inject("parentFC",null),a=o!=null?o:i;if(o)for(;a.setupState.parent;)a=a.setupState.parent;let{rule:s,modelValue:c,subForm:u,inFor:d}=l.toRefs(n),f=l.reactive({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...s.value||[]]}),h=JSON.stringify(c.value||{}),p=new e(i),m=p.api(),g=d.value,y=()=>{if(o){let E=Nr(i,o);if(E){let k;if(g){let V=E.getSubForm();k=Array.isArray(V)?[...V]:V?[V]:[],k.push(m)}else k=m;E.subForm(k)}}},b=()=>{let E=Nr(i,o);if(E)if(g){let k=$t(E.getSubForm()),V=k.indexOf(m);V>-1&&k.splice(V,1)}else E.subForm()},S=null;l.onBeforeMount(()=>{Vh()&&l.watchEffect(()=>{let E="",k=n.option&&n.option.globalClass||{};Object.keys(k).forEach(V=>{let q="",U=k[V].style;U&&Object.keys(U).forEach(x=>{q+=Bt(x)+":"+U[x]+";"}),k[V].content&&(q+=k[V].content+";"),q&&(E+=`.${V}{${q}}`)}),n.option&&n.option.style&&(E+=n.option.style),S||(S=document.createElement("style"),S.type="text/css",document.head.appendChild(S)),S.innerHTML=E||""})});let $=ft(()=>{p.bus.$emit("$loadData.$topForm")},100),L=ft(function(){p.bus.$emit("$loadData.$scopeForm")},100),R=ft(()=>{p.bus.$emit("$loadData.$form")},100),T=(...E)=>{p.bus.$emit("change-$form."+String(E[0]))};return l.onMounted(()=>{o&&(m.top.bus.$on("$loadData.$form",$),m.top.bus.$on("change",T)),m!==m.scope&&m.scope.bus.$on("$loadData.$scopeForm",L),p.mounted()}),l.onBeforeUnmount(()=>{o&&(m.top.bus.$off("$loadData.$form",$),m.top.bus.$off("change",T)),m!==m.scope&&m.scope.bus.$off("$loadData.$scopeForm",L),b(),f.destroyed=!0,p.unmount(),S&&S.parentNode&&S.parentNode.removeChild(S)}),l.onUpdated(()=>{p.updated()}),y(),l.watch(()=>n.option,()=>{p.initOptions(),m.refresh()},{deep:!0,flush:"sync"}),l.watch(()=>[...s.value],E=>{p.$handle.isBreakWatch()||E.length===f.renderRule.length&&E.every(k=>f.renderRule.indexOf(k)>-1)||(p.$handle.updateAppendData(),p.$handle.reloadRule(s.value),i.setupState.renderRule())}),l.watch(()=>[n.disabled,n.preview,n.readonly],()=>{m.refresh()}),l.watch(c,E=>{if(nr(E||{})===h)return;let k=E!=null?E:{};m.config.forceCoverValue?m.coverValue(k):m.setValue(k)},{deep:!0,flush:"post"}),l.watch(()=>n.index,()=>{m.coverValue({}),p.$handle.updateAppendData(),l.nextTick(()=>{l.nextTick(()=>{m.clearValidateState()})})},{flush:"sync"}),ne(M({fc:l.markRaw(p),parent:o&&l.markRaw(o),top:l.markRaw(a),fapi:l.markRaw(m)},l.toRefs(f)),{getGroupInject:()=>Nr(i,o),refresh(){++f.unique},renderRule(){f.renderRule=[...s.value||[]]},updateValue(E){if(f.destroyed)return;let k=nr(E);h!==k&&(h=k,i.emit("update:modelValue",E),l.nextTick(()=>{R(),o?u.value||L():($(),L())}))}})},created(){let n=Oa();n.emit("update:api",n.setupState.fapi),n.setupState.fc.init()}})}var Ra=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],Jn=["validate","children","control"],Kn=["effect","deep","renderSlots"];function Ma(){return[...Ra,...ia,...oa,...aa,...Jn,...Kn]}function Qn(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function Da(e,t){return Pa([e],t||!1)[0]}function Pa(e,t){return Dr([],[...e],t||!1)}var Hh={array:Jn,normal:Kn};function st(e,t){return at(Array.isArray(t)?t:[t],e,Hh),e}function Ia(e){let t=typeof e.getRule=="function"?e.getRule():e;return t.type||(t.type="text"),t}function zh(e,t){return e?(Object.keys(t||{}).forEach(r=>{t!=null&&t[r]&&(e[r]=st(e[r]||{},t[r]))}),e):t}function Ba(e,t){Object.defineProperties(e,Object.keys(t).reduce((r,n)=>(r[n]={get(){return t[n]()}},r),{}))}function Xe(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function te(e,t){try{return e()}catch(r){th(r)}return t}function Vr(){let e={},t=r=>r||"default";return{setSlot(r,n){r=t(r),!n||Array.isArray(n)&&n.length||(e[r]||(e[r]=[]),e[r].push(n))},getSlot(r,n){r=t(r);let i=[];return(e[r]||[]).forEach(o=>{if(Array.isArray(o))i.push(...o);else if(j.Function(o)){let a=o(...n||[]);Array.isArray(a)?i.push(...a):i.push(a)}else j.Undef(o)||i.push(o)}),i},getSlots(){let r={};return Object.keys(e).forEach(n=>{r[n]=(...i)=>this.getSlot(n,i)}),r},slotLen(r){return r=t(r),e[r]?e[r].length:0},mergeBag(r){if(!r)return this;let n=r,i=j.Function(n.getSlots)?n.getSlots():r;return Array.isArray(r)||l.isVNode(r)?this.setSlot(void 0,()=>r):Object.keys(i).forEach(o=>{this.setSlot(o,i[o])}),this}}}function ja(e){let t=M({},e.props||{}),r=e.on||{};return Object.keys(r).forEach(n=>{n.indexOf("-")>0&&(n=Me(n));let i=`on${ta(n)}`;Array.isArray(t[i])?t[i]=[...t[i],r[n]]:t[i]?t[i]=[t[i],r[n]]:t[i]=r[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function Lr(e,t){return Object.setPrototypeOf(e,t),e}var Na=(e,t)=>typeof e=="string"?String(t):typeof e=="number"?Number(t):t,Nt={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(Na(e,t)),"!=":(e,t)=>!Nt["=="](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){let r=e;return r&&r.indexOf&&r.indexOf(Na(r[0],t))>-1},notOn(e,t){return!Nt.on(e,t)},in(e,t){let r=t;return r&&r.indexOf&&r.indexOf(e)>-1},notIn(e,t){return!Nt.in(e,t)},between(e,t){let r=t;return e>r[0]&&e<r[1]},notBetween(e,t){let r=t;return e<r[0]||e>r[1]},empty(e){return j.empty(e)},notEmpty(e){return!j.empty(e)},pattern(e,t){return new RegExp(t,"g").test(e)}};function Fe(e,t){return(typeof t=="string"?t.split("."):t||[]).forEach(r=>{e!=null&&(e=e[r])}),e}function Uh(e){let t=/{{\s*(.*?)\s*}}/g,r,n={};for(;(r=t.exec(e))!==null;)r[1]&&(n[r[1]]=!0);return Object.keys(n)}function Va(e){let t=e.split("."),r=[],n="";return t.forEach((i,o)=>{o===0?n=i:n+="."+i,r.push(n)}),r.join(" && ")}function La(e){let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];o==="["?(n===0&&r&&(t.push({type:"key",value:r}),r=""),n++,r+=o):o==="]"?(n--,r+=o,n===0&&(t.push({type:"bracket",value:La(r.slice(1,-1))}),r="")):o==="."&&n===0?r&&(r=(t.push({type:"key",value:r}),"")):r+=o}return r&&t.push({type:"key",value:r}),t.map(i=>i.type==="key"?{key:i.value}:{children:i.value})}function Ha(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var za=class{constructor(e,t,r,n,i){ve(this,"_data");ve(this,"event");this._data=ne(M({},Ha()),{type:e,title:t,field:r,value:n,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return Pe(this._data,e,t),this}modelField(e){return this._data.modelField=e,this}on(e,t){return this.setAttribute("on",e,t,arguments.length>=2)}setAttribute(e,t,r,n=!1){let i=n?{[t]:r}:t;return st(this._data,{[e]:i}),this}_clone(){let e=new this.constructor;return e._data=Da(this._data),e}};function Ua(e){e.forEach(t=>{Object.defineProperty(za.prototype,t,{configurable:!0,enumerable:!0,writable:!0,value:function(r,n){return this.setAttribute(t,r,n,arguments.length>=2)}})})}Ua(Ma());function $e(e,t){return(r,n,i,o={})=>{let a=new za(e,r,n,i,o);return typeof t=="function"?t(a):t&&a.setAttribute("props",t),a}}var qh=$e("");function Yh(e,t,r){let n=qh("",t);return n._data.type=e,n._data.title=r,n}function Gh(){return{create:Yh,factory:$e}}function Wh(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function qa(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function Ya(e){if(typeof XMLHttpRequest>"u")return;let t=new XMLHttpRequest,r=e.action||"";t.upload&&e.onProgress&&t.upload.addEventListener("progress",a=>{var c;let s=a;s.percent=s.total>0?s.loaded/s.total*100:0,(c=e.onProgress)==null||c.call(e,s)});let n=e.query;if(n){let a=typeof n=="string"?n:Object.keys(n).reduce((c,u)=>{let d=n[u];return c[u]=d==null?"":String(d),c},{}),s=new URLSearchParams(a).toString();s&&(r+=r.includes("?")?`&${s}`:`?${s}`)}t.onerror=a=>{var s;(s=e.onError)==null||s.call(e,a)},t.onload=()=>{var a;t.status<200||t.status>=300?(a=e.onError)==null||a.call(e,Wh(r,t),qa(t)):e.onSuccess(qa(t))},t.open(e.method||"get",r,!0);let i=null;if(e.data||e.file)if(e.file||(e.dataType||"").toLowerCase()!=="json"){let a=new FormData;Object.keys(e.data||{}).forEach(s=>{var u;let c=(u=e.data)==null?void 0:u[s];a.append(s,typeof Blob<"u"&&c instanceof Blob?c:String(c))}),i=a}else i=JSON.stringify(e.data||{}),t.setRequestHeader("content-type","application/json");e.file&&i instanceof FormData&&i.append(String(e.filename),e.file,e.file.name),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);let o=e.headers||{};Object.keys(o).forEach(a=>{o[a]!=null&&t.setRequestHeader(a,o[a])}),t.send(i)}function Ga(e,t,r){return new Promise((n,i)=>{(t||Ya)(ne(M({},e),{onSuccess(o){let a=c=>c,s=Qe(e.parse);typeof s=="function"?a=(c,u,d)=>s(c,u,d):typeof s=="string"&&(a=c=>Fe(c,s)),Nn(a(o,e.targetRule,r)).then(n)},onError(o){i(o)}}))})}function lr(e){return Ct(e)}function Jh(e){function t(o){return j.Undef(o)?o=e.fields():Array.isArray(o)||(o=[o]),o}function r(o,a,s){j.Undef(o)?o=Object.keys(M(M({},e.fieldCtx),e.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(c=>{let u=e.fieldCtx[c]||e.nameCtx[c];u&&u.forEach(d=>{Pe(d.rule,a,s),e.$render.clearCache(d)})})}function n(){let o=e.subForm;return Object.keys(o).reduce((a,s)=>{let c=o[s];return c&&(Array.isArray(c)?a.push(...c):a.push(c)),a},[])}let i={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(o){e.fc.options.value=o},get options(){return e.options},set options(o){e.fc.options.value=o},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return i.parent?i.parent.top:i},get scope(){let o=e.vm;for(;o&&o.setupState.fapi;)if(o.props.subForm)o=o.setupState.parent;else return o.setupState.fapi;return i.top},get children(){return n()},get siblings(){let o=e.vm.setupState.getGroupInject();if(o){let a=o.getSubForm();if(Array.isArray(a))return[...a]}},get index(){let o=i.siblings;if(o){let a=o.indexOf(i);return a>-1?a:void 0}},get formulas(){return M({},e.fc.formulas)},formData(o){if(o==null||typeof o=="boolean"){let a={};return Object.keys(e.form).forEach(s=>{(o===!0||e.ignoreFields.indexOf(s)===-1)&&(a[s]=lr(e.form[s]))}),a}return t(o).reduce((a,s)=>(a[s]=i.getValue(s),a),{})},getValue(o){let a=e.getFieldCtx(o);return a?lr(a.rule.value):e.options.appendValue!==!1&&ue(e.appendData,o)?lr(e.appendData[o]):void 0},coverValue(o){let a=M({},o||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(s=>{let c=e.fieldCtx[s];if(c){let u=ue(o,s);c.forEach(d=>{d.rule.value=u?o[s]:void 0}),delete a[s]}}),ee(e.appendData,a)},!0)},setValue(o){let a=o;arguments.length>=2&&(a={[o]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(a).forEach(s=>{let c=e.fieldCtx[s];if(!c)return e.appendData[s]=a[s];c.forEach(u=>{u.rule.value=a[s]})})},!0)},removeField(o){let a=e.getCtx(o);return e.deferSyncValue(()=>{e.getCtxs(o).forEach(s=>{s.rm()})},!0),a?a.origin:void 0},removeRule(o){let a=o&&Xe(o);if(a)return a.rm(),a.origin},fields:()=>e.fields(),append:(o,a,s)=>{let c=e.sort.length-1,u,d=e.getCtx(a);if(d)if(s){if(u=d.getPending("children",d.rule.children),!Array.isArray(u))return;c=d.rule.children.length-1}else c=d.root.indexOf(d.origin),u=d.root;else u=e.rules;u.splice(c+1,0,o)},prepend:(o,a,s)=>{let c=0,u,d=e.getCtx(a);if(d)if(s){if(u=d.getPending("children",d.rule.children),!Array.isArray(u))return}else c=d.root.indexOf(d.origin),u=d.root;else u=e.rules;u.splice(c,0,o)},hidden(o,a){r(a,"hidden",!!o),e.refresh()},hiddenStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.hidden},display(o,a){r(a,"display",!!o),e.refresh()},displayStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.display},disabled(o,a){t(a).forEach(s=>{e.getCtxs(s).forEach(c=>{Pe(c.rule.props,"disabled",!!o)})}),e.refresh()},all(o){return Object.keys(e.ctxs).map(a=>{let s=e.ctxs[a];return o?s.origin:s.rule})},model(o){return e.fields().reduce((a,s)=>{let c=e.fieldCtx[s][0];return a[s]=o?c.origin:c.rule,a},{})},component(o){return Object.keys(e.nameCtx).reduce((a,s)=>{let c=e.nameCtx[s].map(u=>o?u.origin:u.rule);return a[s]=c.length===1?c[0]:c,a},{})},bind(){return i.form},reload:o=>{e.reloadRule(o)},updateOptions(o){e.fc.updateOptions(o),i.refresh()},onSubmit(o){i.updateOptions({onSubmit:o})},sync:o=>{if(Array.isArray(o)){o.forEach(s=>i.sync(s));return}let a=j.Object(o)?Xe(o):e.getCtxs(o);a&&(a=Array.isArray(a)?a:[a],a.forEach(s=>{if(!s.deleted){let c=e.subForm[s.id];c&&(Array.isArray(c)?c.forEach(u=>{u.refresh()}):c&&c.refresh()),e.$render.clearCache(s)}}),e.refresh())},refresh:()=>{n().forEach(o=>{o.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),i.refresh()},hideForm:o=>{e.vm.setupState.isShow=!o},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(o,a){e.getCtxs(o).forEach(s=>{ee(s.rule,a)})},updateRules(o){Object.keys(o).forEach(a=>{i.updateRule(a,o[a])})},mergeRule:(o,a)=>{e.getCtxs(o).forEach(s=>{st(s.rule,a)})},mergeRules(o){Object.keys(o).forEach(a=>{i.mergeRule(a,o[a])})},getRule:(o,a)=>{let s=e.getCtx(o);if(s)return a?s.origin:s.rule},findType(o,a){let s;return Object.keys(e.ctxs).forEach(c=>{let u=e.ctxs[c];u.rule.type===o&&(s=a?u.origin:u.rule)}),s},findTypes(o,a){let s=[];return Object.keys(e.ctxs).forEach(c=>{let u=e.ctxs[c];u.rule.type===o&&s.push(a?u.origin:u.rule)}),s},getRenderRule:o=>{let a=e.getCtx(o);if(a)return a.prop},getRefRule:o=>{let a=e.getCtxs(o);if(a){let s=a.map(c=>c.rule);return s.length===1?s[0]:s}},setEffect(o,a,s){let c=e.getCtx(o);c&&a&&(a[0]==="$"&&(a=a.substr(1)),ue(c.rule,"$"+a)&&Pe(c.rule,"$"+a,s),ue(c.rule,"effect")||(c.rule.effect={}),Pe(c.rule.effect,a,s))},clearEffectData(o,a){let s=e.getCtx(o);s&&(a&&a[0]==="$"&&(a=a.substr(1)),s.clearEffectData(a),i.sync(o))},updateValidate(o,a,s){s?i.mergeRule(o,{validate:a}):r(o,"validate",a)},updateValidates(o,a){Object.keys(o).forEach(s=>{i.updateValidate(s,o[s],a)})},refreshValidate(){i.refresh()},resetFields(o){t(o).forEach(a=>{e.getCtxs(a).forEach(s=>{e.$render.clearCache(s),s.rule.value=lr(s.defaultValue)})}),l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{i.clearValidateState(o)})})}),o!=null||(j.Function(e.options.onReset)&&te(()=>e.options.onReset(i)),e.vm.emit("reset",i))},method(o,a){let s=i.el(o);if(!s||!s[a])throw Error(na("err",`${a} 方法不存在`));return(...c)=>s[a](...c)},exec(o,a,...s){return te(()=>i.method(o,a)(...s))},toJson(o){return nr(i.rule,o)},trigger(o,a,...s){let c=i.el(o);c&&c.$emit(a,...s)},el(o){let a=e.getCtx(o);if(a)return a.el||e.vm.refs[a.ref]},scrollTo(o,a={block:"center",inline:"nearest",behavior:"smooth"}){let s=i.el(o);if(!s)return;let c=s.$el===void 0?s:s.$el;if(!c)return;let u=c.nodeType===1?c:c.firstElementChild;u&&typeof u.scrollIntoView=="function"&&u.scrollIntoView(a)},focus(o){let a=i.el(o);if(!a)return;let s=d=>!d||typeof d.focus!="function"?!1:(te(()=>d.focus()),!0);if(s(a))return;let c=a.$el===void 0?a:a.$el;if(s(c))return;let u=c&&(c.nodeType===1?c:c.firstElementChild);s(u)||u&&u.querySelector&&s(u.querySelector('input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])'))},closeModal:o=>{e.bus.$emit("fc:closeModal:"+o)},getSubForm(o){let a=e.getCtx(o);return a?e.subForm[a.id]:void 0},getChildrenRuleList(o){let a=typeof o=="object",s=a?Xe(o):e.getCtx(o),c=s?s.rule:a?o:i.getRule(o);if(!c)return[];let u=[];return(d=>{d&&d.forEach(f=>{typeof f=="object"&&(f.field&&u.push(f),u.push(...i.getChildrenRuleList(f)))})})(s?s.loadChildrenPending():c.children),u},getParentRule(o){return(typeof o=="object"?Xe(o):e.getCtx(o)).parent.rule},getParentSubRule(o){let a=typeof o=="object"?Xe(o):e.getCtx(o);if(a){let s=a.getParentGroup();if(s)return s.rule}},getChildrenFormData(o,a){return i.getChildrenRuleList(o).reduce((s,c)=>((c.ignore!==!0||a===!0)&&(s[c.field]=lr(c.value)),s),{})},setChildrenFormData(o,a,s){let c=i.getChildrenRuleList(o);e.deferSyncValue(()=>{c.forEach(u=>{ue(a,u.field)?u.value=a[u.field]:s&&(u.value=void 0)})})},getGlobalEvent(o){let a=i.options.globalEvent[o];if(a)return typeof a=="object"&&(a=a.handle),Qe(a)},getGlobalData(o){return new Promise((a,s)=>{let c=i.options.globalData[o];c?c.type==="fetch"?i.fetch(c).then(u=>{a(u)}).catch(s):a(c.data):a(e.fc.loadData[o])})},emitGlobalEvent(o,...a){let s=i.getGlobalEvent(o);if(s){let c=e.getInjectData({},void 0);return c.args=[...a],a.unshift(c),s.apply(null,a)}},setGlobalData(o,a){i.setData("$globalData."+o,a)},setGlobalVar(o,a){i.setData("$var."+o,a)},renderRule(o,a,s){let c=typeof o=="object"?Xe(o):e.getCtx(o);return c?e.$render.createRuleVnode(c,a,s):void 0},renderChildren(o,a,s){let c=typeof o=="object"?Xe(o):e.getCtx(o);return c?e.$render.createChildrenVnodes(c,a,s):void 0},nextTick(o){e.bus.$once("next-tick",o),e.refresh()},nextRefresh(o){e.nextRefresh(),o&&te(o)},deferSyncValue(o,a){e.deferSyncValue(o,a)},emit(o,...a){e.vm.emitsOptions&&!e.vm.emitsOptions[o]&&(e.vm.emitsOptions[o]=null),e.vm.emit(o,...a)},bus:e.bus,getCurrenabFormRule(){var o;return(o=e.vm.setupState.getGroupInject())==null?void 0:o.rule},fetch(o){return new Promise((a,s)=>{let c=M({},o);c=e.loadFetchVar(c);let u=d=>{te(()=>c.onError&&c.onError(d)),s(d)};e.beforeFetch(c).then(()=>Ga(c,e.fc.create.fetch,i).then(d=>{te(()=>c.onSuccess&&c.onSuccess(d)),a(d)}).catch(d=>{u(d)})).catch(d=>{u(d)})})},watchFetch(o,a,s,c){return e.fc.watchLoadData((u,d)=>{let f=M({},o);if(f=e.loadFetchVar(f,u),c&&c(f,d)===!1)return;let h=p=>{te(()=>f.onError&&f.onError(p)),s&&s(p)};e.beforeFetch(f).then(()=>Ga(f,e.fc.create.fetch,i).then(p=>{te(()=>f.onSuccess&&f.onSuccess(p)),a&&a(p,d)}).catch(p=>{h(p)})).catch(p=>{h(p)})},o.wait==null?1e3:o.wait)},getData(o,a){return e.fc.get?e.fc.get(o,a):e.fc.getLoadData(o,a)},watchData(o){return e.fc.watchLoadData((a,s)=>{te(()=>o(a,s))})},setData(o,a,s){return e.fc.setData(o,a,s)},refreshData(o){return e.fc.refreshData(o)},t(o,a){return e.fc.t(o,a)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:r}};return["on","once","off"].forEach(o=>{i[o]=function(...a){e.bus[`$${o}`](...a)}}),i.changeValue=i.changeField=i.setValue,i}function Kh(e){ee(e.prototype,{initCache(){this.clearCacheAll()},clearCache(t){if(t.rule.cache)return;let r=this.cache[t.id];r?((r.use===!0||r.parent)&&this.$handle.refresh(),r.parent&&this.clearCache(r.parent),this.cache[t.id]=null):t.parent&&this.clearCache(t.parent)},clearCacheAll(){this.cache={}},setCache(t,r,n){this.cache[t.id]={vnode:r,use:!1,parent:n,slot:t.rule.slot}},getCache(t){let r=this.cache[t.id];if(r)return r.use=!0,r.vnode}})}var Vt={init(e){},toFormValue(e,t){return e},toValue(e,t){return e},mounted(e){},render(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp(e){}};function Wa(e,t){let{key:r,origin:n,def:i,onLoad:o,onReload:a,onUpdate:s}=t;if(e.pending[r]&&e.pending[r].origin===n)return e.getPending(r,i);delete e.pending[r];let c=n;if(j.Function(n)){let u=n,d=te(()=>u({rule:e.rule,api:e.$api,update:f=>{let h=f||i,p=e.getPending(r,i);e.setPending(r,n,h),s&&s(h,p)},reload:()=>{let f=e.getPending(r,i);delete e.pending[r],a&&a(f),e.$api&&e.$api.sync(e.rule)}}));d&&j.Function(d.then)?(d.then(f=>{let h=f||i;e.setPending(r,n,h),o&&o(h),e.$api&&e.$api.sync(e.rule)}).catch(f=>{console.error(f)}),c=i,e.setPending(r,n,c)):(c=d||i,e.setPending(r,n,c),o&&o(c))}return c}function Ja(e,t,r={}){let n=M({key:"options",origin:t,def:[]},r);return"loadPending"in e?e.loadPending(n):Wa(e,n)}function Qh(e){ee(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(t){let r=n=>{if(n){let i;return t.rule.field&&(i=n.slots["field-"+Bt(t.rule.field)]||n.slots["field-"+t.rule.field]),i||(i=n.slots["type-"+Bt(t.type)]||n.slots["type-"+t.type]),i||r(n.setupState.parent)}};return r(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender(),this.applyShowNumber(this.$manager.rule);let t=Vr();return this.sort.forEach(r=>{this.renderSlot(t,this.$handle.ctxs[r])}),this.$manager.render(t)},applyShowNumber(t){let r=this.$handle.options||{};if(!r.showNumber||!t)return;t.class=this.mergeClass(t.class,"is-numbered"),r.showNumber==="chinese"&&(t.class=this.mergeClass(t.class,"is-number-chinese"));let n=r.numberColor,i=(r.form||{}).style;t.style=n?j.String(i)?`${i};--ab-number-color:${n}`:Array.isArray(i)?i.concat({"--ab-number-color":n}):ne(M({},i||{}),{"--ab-number-color":n}):i},renderSlot(t,r,n){if(this.isFragment(r)){r.initProp(),this.mergeGlobal(r),r.initNone();let i=this.renderChildren(r.loadChildrenPending(),r),o=i.default;o&&t.setSlot(r.rule.slot,()=>o()),delete i.default,t.mergeBag(i)}else t.setSlot(r.rule.slot,this.renderCtx(r,n))},mergeGlobal(t){if(!this.$handle.options.global)return;let{trueType:r,originType:n,type:i}=t;this.cacheConfig[r]||(this.cacheConfig[r]=l.computed(()=>{let o=this.$handle.options.global;return st({},[o["*"]||o.default||{},o[n]||o[i]||{}])})),t.prop=st({},[this.cacheConfig[t.trueType].value,t.prop])},setOptions(t){let r=Ja(t,t.prop.options);t.prop.options=r,t.prop.optionsTo&&r&&pt(t.prop,t.prop.optionsTo,r)},deepSet(t){let r=t.prop.deep;r&&Object.keys(r).sort((n,i)=>n.length<i.length?-1:1).forEach(n=>{pt(t.prop,n,r[n])})},parseSide(t,r){return j.Object(t)?st({props:{abFormInject:r.prop.props.abFormInject}},t):t},renderSides(t,r,n){let i=r[n?"rule":"prop"];return[this.renderRule(this.parseSide(i.prefix,r)),t,this.renderRule(this.parseSide(i.suffix,r))]},renderId(t,r){let n=this.$handle[r==="field"?"fieldCtx":"nameCtx"][t];return n?n.map(i=>this.renderCtx(i,i.parent)):void 0},renderCtx(t,r){var n;try{if(t.type==="hidden")return;let i=t.rule;if(this.force||!this.cache[t.id]||((n=this.cache[t.id])==null?void 0:n.slot)!==i.slot){let o;t.initProp(),this.mergeGlobal(t),t.initNone(),this.$manager.tidyRule(t),this.deepSet(t),this.setOptions(t),this.ctxProp(t);let a=t.prop;a.preview=!!(a.preview==null?this.$handle.preview:a.preview),a.props.abFormInject=this.injectProp(t);let s=a.cache!==!1,c=a.preview;if(a.hidden){this.setCache(t,void 0,r);return}o=(...u)=>{var g,y,b,S,$,L;let d={rule:i,prop:a,preview:c,api:this.$handle.api,model:a.model||{},slotValue:u};u.length&&i.slotUpdate&&te(()=>i.slotUpdate(d));let f={},h=t.loadChildrenPending();t.parser.renderChildren?f=t.parser.renderChildren(h,t):t.parser.loadChildren!==!1&&(f=this.renderChildren(h,t)),Object.keys(a.renderSlots||{}).forEach(R=>{f[R]=(...T)=>{if(j.Function(a.renderSlots[R]))return te(()=>a.renderSlots[R](...T));let E=this.parseSide(a.renderSlots[R],t);return this.renderRule(E)}});let p=this.getTypeSlot(t),m;if(p)d.children=f,m=p(d);else{let R=sa(f);if(c)m=t.parser.preview(R,t);else{let T=t.parser,E=T!==Vt,k=E&&Object.prototype.hasOwnProperty.call(T,"render");if(E&&!k&&t.input&&((b=(y=(g=t.$handle)==null?void 0:g.vm)==null?void 0:y.props)==null?void 0:b.readonly)===!0){let V=typeof this.$handle.getParser=="function"?this.$handle.getParser({type:"text",originType:"text",trueType:"text"}):(S=this.fc.parsers)==null?void 0:S.text;m=V&&V!==T?V.render(R,t):T.render(R,t)}else m=T.render(R,t)}}return m=this.renderSides(m,t),($=a.title)!=null&&$.show&&(a.wrap=M({show:!0},a.wrap||{}),a.native||(a.native=!1)),(t.input||!j.Undef(a.native)||((L=a.col)==null?void 0:L.show)===!0)&&a.native!==!0&&(this.fc.targeabFormDriver("updateWrap",t),m=this.$manager.makeWrap(t,m)),t.none&&(m=Array.isArray(m)?m.map(R=>!R||!R.__v_isVNode?R:this.none(R)):this.none(m)),s&&this.setCache(t,()=>this.stable(m),r),m},this.setCache(t,o,r)}return(...o)=>{let a=this.getCache(t);if(a)return a(...o);if(this.cache[t.id])return;let s=this.renderCtx(t,t.parent);if(s)return s()}}catch(i){console.error(i);return}},none(t){if(t)return t.props.class=this.mergeClass(t.props.class,"ab-none"),t},mergeClass(t,r){if(Array.isArray(t))t.push(r);else return t?[t,r]:r;return t},stable(t){return(Array.isArray(t)?t:[t]).forEach(r=>{r&&r.__v_isVNode&&r.children&&typeof r.children=="object"&&(r.children.$stable=!0,this.stable(r.children))}),t},getModelField(t){var r,n,i;return t.prop.modelField||t.parser.modelField||((r=this.fc.modelFields)==null?void 0:r[this.vNode.aliasMap[t.type]])||((n=this.fc.modelFields)==null?void 0:n[t.type])||((i=this.fc.modelFields)==null?void 0:i[t.originType])||"modelValue"},isFragment(t){return t.type==="fragment"||t.type==="template"},injectProp(t){let r=this.vm.setupState;if(!r.ctxInject[t.id]){let i={api:this.$handle.api,form:this.fc.create,subForm:o=>{this.$handle.addSubForm(t,o)},getSubForm:()=>this.$handle.subForm[t.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[t.wrapRef],options:[],children:[],preview:!1,get readonly(){return t.$handle.vm.props.readonly},get idField(){return t.$handle.vm.props.idField},get idFieldTable(){return t.$handle.vm.props.idFieldTable},get formValue(){return t.$handle.vm.props.modelValue},id:t.id,field:t.field,rule:t.rule,input:t.input,t:(...o)=>this.$handle.api.t(...o),updateValue:o=>{this.$handle.onUpdateValue(t,o)}};r.ctxInject[t.id]=i}let n=r.ctxInject[t.id];return ee(n,{preview:t.prop.preview,options:t.prop.options,children:t.loadChildrenPending()}),n},ensureCtxHandlers(t){if(t.handlers)return t.handlers;let r=this,n={vnodeMounted(i){i.el.__rule__=t.rule,r.onMounted(t,i.el)},vnodeBeforeUnmount(){r.$handle.effect(t,"beforeUnmount"),r.$handle.targetHook(t,"beforeUnmount")},fcUpdateValue(i){r.$handle.onUpdateValue(t,i)},fcEl(i){t.exportEl=i,i&&((i.$el||i).__rule__=t.rule)},modelCallback(i){r.tmpInput&&r.tmpInput(t.field,i,t.rule),r.onInput(t,i)},modelEmit(){r.onEmitInput(t)}};return t.handlers=n,n},ctxProp(t){let{ref:r,key:n,rule:i}=t;this.$manager.mergeProp(t),t.parser.mergeProp(t);let o=this.ensureCtxHandlers(t),a=[{ref:r,key:i.key||`${n}fc`,slot:void 0,on:{vnodeMounted:o.vnodeMounted,vnodeBeforeUnmount:o.vnodeBeforeUnmount,"fc.updateValue":o.fcUpdateValue,"fc.el":o.fcEl}}];if(t.input){this.vm.props.disabled===!0&&(t.prop.props.disabled=!0);let s=this.getModelField(t),c={callback:o.modelCallback,modelField:s,value:this.$handle.geabFormData(t)};a.push({on:M({[`update:${s}`]:c.callback},t.prop.modelEmit?{[t.prop.modelEmit]:o.modelEmit}:{}),props:{[s]:c.value}}),t.prop.model=c}return at(a,t.prop),t.prop},onMounted(t,r){t.el=this.vm.refs[t.ref]||r,t.parser.mounted(t),this.$handle.effect(t,"mounted"),this.$handle.targetHook(t,"mounted")},onInput(t,r){t.prop.modelEmit?this.$handle.onBaseInput(t,r):this.$handle.onInput(t,r)},onEmitInput(t){this.$handle.setValue(t,t.parser.toValue(t.modelValue,t),t.modelValue)},renderChildren(t,r){if(!j.trueArray(t))return{};let n=Vr();return t.map(i=>{if(i){if(j.String(i)||j.Number(i))return n.setSlot(null,`${i}`);if(i.__fc__)return this.renderSlot(n,i.__fc__,r);i.type&&l.nextTick(()=>{this.$handle.loadChildren(t,r),this.$handle.refresh()})}}),n.getSlots()},defaultRender(t,r){let n=t.prop;return n.component?typeof n.component=="string"?this.vNode.make(n.component,n,r):this.vNode.makeComponent(n.component,n,r):this.vNode[t.type]?this.vNode[t.type](n,r):this.vNode[t.originType]?this.vNode[t.originType](n,r):this.vNode.make(ca(n.type),n,r)},createChildrenVnodes(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=this.renderChildren(t.rule.children,t);return this.force=!1,this.tmpInput=null,i},createRuleVnode(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=Vr();return this.renderSlot(i,t,t.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule(t,r,n){if(!t)return;if(j.String(t)||j.Number(t))return`${t}`;let i;if(n)i=t.type;else if(i=t.is,t.type){i=Me(t.type);let s=this.vNode.aliasMap[i];s&&(i=Me(s))}if(!i)return;let o=Vr();j.trueArray(t.children)&&t.children.forEach(s=>{s&&o.setSlot(s==null?void 0:s.slot,()=>this.renderRule(s))});let a=M({},t);return delete a.type,delete a.is,this.vNode.make(i,a,o.mergeBag(r).getSlots())}})}var Zh=1;function Zn(e){ee(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:Zh++}),Ba(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}Kh(Zn),Qh(Zn);function Xh(e){ee(e.prototype,{parseInjectEvent(t,r){let n=t.inject||this.options.injectEvent;return this.parseEventLst(t,r,n)},parseEventLst(t,r,n,i){return Object.keys(r).forEach(o=>{let a=this.parseEvent(t,r[o],n,i);a&&(r[o]=a)}),r},parseEvent(t,r,n,i){if(j.Function(r)&&(n!==!1&&!j.Undef(n)||r.__inject))return this.inject(t,r,n);if(!i&&Array.isArray(r)&&r[0]&&(j.String(r[0])||j.Function(r[0])))return this.parseEventLst(t,r,n,!0);if(j.String(r)){let o=Qe(r);if(o&&r!==o){let a=o;return a.__inject?this.parseEvent(t,a,n,!0):a}}},parseEmit(t){let r={},n=t.rule,{emitPrefix:i,field:o,name:a,inject:s}=n,c=n.emit||[];return j.trueArray(c)&&c.forEach(u=>{if(!u)return;let d,f=i||o||a;if(j.Object(u)&&(d=u.inject,u=u.name,f=u.prefix||f),f){let h=Bt(`${f}-${u}`),p=(...m)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[h]&&(this.vm.emitsOptions[h]=null),this.vm.emit(h,...m),this.vm.emit("emit-event",h,...m),this.bus.$emit(h,...m)};if(p.__emit=!0,!d&&s===!1)r[Me(u)]=p;else{let m=d||s||this.options.injectEvent;r[Me(u)]=j.Undef(m)?p:this.inject(n,p,m)}}}),t.computed.on=r,r},getInjectData(t,r){let n=t.__fc__&&t.__fc__.$api,{option:i,rule:o}=(t.__fc__&&t.__fc__.$handle.vm||this.vm).props;return{$f:n||this.api,api:n||this.api,rule:o,self:t.__origin__,option:i,inject:r}},inject(t,r,n){if(r.__origin){if(this.watching&&!this.loading)return r;r=r.__origin}let i=this,o=function(...a){let s=i.getInjectData(t,n);return s.args=[...a],a.unshift(s),r.apply(this,a)};return o.__origin=r,o.__json=r.__json,o},loadStrVar(t,r,n){if(t&&typeof t=="string"&&t.indexOf("{{")>-1&&t.indexOf("}}")>-1){let i=t,o=Uh(t),a=u=>{let d=!1,f;if(n&&u.indexOf("$form.")===0){let h=u.split(".");h.shift(),ue(n.value,h[0])&&(d=!0,f=r?r({id:"$form."+h[0]+"_"+n.rule.__fc__.id,getValue:()=>Fe(n.value,h)}):Fe(n.value,h))}return d||(f=r?r(u):this.fc.getLoadData(u)),f},s=u=>{let d=[];u.forEach(h=>{h.key?d.push(h.key):h.children&&d.push(s(h.children))});let f=!1;return d.forEach((h,p)=>{h!=null&&(h.indexOf("'")===0||h.indexOf('"')===0)&&(d[p]=h.slice(1,-1),f=!0)}),d.length===1&&(f||!isNaN(Number(d[0])))?d[0]:a(d.join("."))},c;if(o.forEach(u=>{let d=u.split("||"),f=d[0].trim();if(f){let h=(d[1]||"").trim(),p=La(f),m=te(()=>s(p));(m==null||m==="")&&d.length>1&&(m=h),c=m,t=t.replaceAll(`{{${u}}}`,m!=null?m:"")}}),o.length===1&&i===`{{${o[0]}}}`)return c}return t},loadFetchVar(t,r,n){let i;n&&n.__fc__&&(i=n.__fc__.getParentGroup()),!i&&t.targetRule&&t.targetRule.__fc__&&(i=t.targetRule.__fc__.getParentGroup());let o=a=>this.loadStrVar(a,r,i?{rule:n,value:this.subRuleData[i.id]||{}}:null);return t.action=o(t.action||""),["headers","data","query"].forEach(a=>{if(t[a]){let s=Array.isArray(t[a])?[]:{};Object.keys(t[a]).forEach(c=>{s[o(c)]=o(t[a][c])}),t[a]=s}}),t}})}var Ka=["hook:updated","hook:mounted"];function em(e){ee(e.prototype,{usePage(){let t=this.options.page;if(!t)return;let r=25,n=tm(this.rules);if(j.Object(t)){let i=t;i.first&&(r=parseInt(String(i.first),10)||r),i.limit&&(n=parseInt(String(i.limit),10)||n)}ee(this,{first:r,limit:n,pageEnd:this.rules.length<=r}),this.bus.$on("page-end",()=>this.vm.emit("page-end",this.api)),this.pageLoad()},pageLoad(){let t=()=>{this.pageEnd?(this.bus.$off(Ka,t),this.bus.$emit("page-end")):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Ka,t)}})}function tm(e){return e.length<31?31:Math.ceil(e.length/3)}function rm(e){ee(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(t){this.clearNextTick(),this.nextTick=setTimeout(()=>{t(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function nm(e){Object.defineProperties(e.origin,{__fc__:Qn(l.markRaw(e))}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Qn(l.markRaw(e))})}function Qa(e,t,r){let n=Pr(),i=!!t.field;ee(this,{id:n,ref:n,wrapRef:n+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:M({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?Ct(r):void 0,field:t.field||void 0}),this.updateKey(),nm(this),this.update(e,!0)}ee(Qa.prototype,{getParentGroup(){let e=this.parent;for(;e;){if(e.group)return e;e=e.parent}},loadChildrenPending(){let e=this.rule.children||[];return Array.isArray(e)?e:this.loadPending({key:"children",origin:e,def:[],onLoad:t=>{this.$handle&&this.$handle.loadChildren(t,this)},onUpdate:(t,r)=>{this.$handle&&(t===r?this.$handle.loadChildren(t,this):this.$handle.updateChildren(this,t,r))},onReload:t=>{this.$handle?this.$handle.updateChildren(this,[],t):delete this.pending.children}})},loadPending(e){return Wa(this,e)},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,r){this.pending[e]={origin:t,value:l.reactive(r)}},effectData(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey(e){this.key=Pr(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=Me(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var t,r,n;let e=M({},this.rule);delete e.children,delete e.validate,this.prop=st({},[e,...Object.keys(this.payload).map(i=>this.payload[i]),this.computed]),e.col&&((t=e.col)==null?void 0:t.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((n=(r=this.refRule)==null?void 0:r.__$validate)==null?void 0:n.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(j.Undef(this.prop.display)||this.prop.display)},hasHidden(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate(){return this.prop.validate},check(e){return this.vm===e.vm},unwatch(){this.watch.forEach(e=>e()),this.watch=[],Object.keys(this.refRule).forEach(e=>{e.indexOf("__$")!==0&&delete this.refRule[e]})},unlink(){this.linkOn.forEach(e=>e()),this.linkOn=[]},link(){this.unlink(),this.$handle.appendLink(this)},watchTo(){this.$handle.watchCtx(this)},delete(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),ee(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1,handlers:null,el:void 0,exportEl:void 0})},rmCtrl(){this.ctrlRule.forEach(e=>e.__fc__&&e.__fc__.rm()),this.ctrlRule=[]},rm(){let e=()=>{let t=this.root.indexOf(this.origin);t>-1&&(this.root.splice(t,1),this.$handle&&this.$handle.refresh())};this.deleted?e():this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),ee(this,{root:[]})},this.input)})},update(e,t){ee(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function im(e){ee(e.prototype,{nextRefresh(t){let r=this.loadedId;l.nextTick(()=>{r===this.loadedId&&(t?t():this.refresh())})},parseRule(t){let r=Ia(t);return Object.defineProperties(r,{__origin__:Qn(t)}),om(r),this.appendValue(r),[r,r.prefix,r.suffix].forEach(n=>{n&&this.loadFn(n,r)}),this.loadCtrl(r),r.update&&(r.update=Qe(r.update)),r},loadFn(t,r){["on","props","deep"].forEach(n=>{t[n]&&this.parseInjectEvent(r,t[n])})},loadCtrl(t){t.control&&t.control.forEach(r=>{r.handle&&(r.handle=Qe(r.handle))})},syncProp(t){let r=t.rule,n=r.sync;j.trueArray(n)&&at([{on:n.reduce((i,o)=>(i[typeof o=="object"&&o.event||`update:${o}`]=a=>{r.props[typeof o=="object"&&o.prop||o]=a,this.vm.emit("sync",o,a,r,this.fapi)},i),{})}],t.computed)},loadRule(){this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(()=>{if(this._loadRule(this.rules),this.loading=!1,this.cycleLoad&&this.pageEnd)return this.loadRule();this.syncForm(),this.pageEnd&&this.bus.$emit("load-end"),this.vm.setupState.renderRule()})},loadChildren(t,r){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(t,r),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(r)},_loadRule(t,r){let n=a=>{let s=t[a-1];if(!s||!s.__fc__)return a>0?n(a-1):-1;let c=this.sort.indexOf(s.__fc__.id);return c>-1?c:n(a-1)},i=(a,s)=>{j.trueArray(a)&&this._loadRule(a,s)},o=t.map((a,s)=>{if(r&&!j.Object(a)||!this.pageEnd&&!r&&s>=this.first)return;if(a.__fc__&&a.__fc__.root===t&&this.ctxs[a.__fc__.id])return i(a.__fc__.loadChildrenPending(),a.__fc__),a.__fc__;let c=Ia(a),u=()=>!!(c.field&&this.fieldCtx[c.field]&&this.fieldCtx[c.field][0]!==a.__fc__);this.fc.targeabFormDriver("loadRule",{rule:c,api:this.api},this.fc),this.ruleEffect(c,"init",{repeat:u()}),u()&&this.vm.emit("repeat-field",a,this.api);let d=a.__fc__||null,f=!1,h=d!==null,p=c.value;if(h){let y=d;if(p=y.defaultValue,y.deleted){if(Za(y))return;y.update(this)}else if(!y.check(this)){if(Za(y))return;t[s]=a=a._clone?a._clone():la(nr(a)),d=null,f=!0}}if(d)d.originType!==d.rule.type&&d.updateType(),this.bindParser(d),this.appendValue(d.rule),d.parent&&d.parent!==r&&this.rmSubRuleData(d);else{let y=this.parseRule(a);d=new Qa(this,y,p),this.bindParser(d)}this.parseEmit(d),this.syncProp(d),d.parent=r||null,d.root=t,this.setCtx(d),!f&&!h&&(this.effect(d,"load"),this.targetHook(d,"load")),this.effect(d,"created");let m=d.loadChildrenPending();if(d.parser.loadChildren===!1||i(m,d),!r){let y=n(s);y>-1||!s?this.sort.splice(y+1,0,d.id):this.sort.push(d.id)}let g=d.rule;return d.updated||(d.updated=!0,j.Function(g.update)&&this.bus.$once("load-end",()=>{this.refreshUpdate(d,g.value,"init")}),this.effect(d,"loaded")),this.refreshControl(d)&&(this.cycleLoad=!0),d}).filter(a=>!!a);r&&(r.children=o)},refreshControl(t){return t.input&&t.rule.control&&this.useCtrl(t)},useCtrl(t){let r=am(t),n=[],i=this.api;if(!r.length)return!1;for(let s=0;s<r.length;s++){let c=r[s],u=c.handle||function(f){let h=Nt;return(h[c.condition||"=="]||h["=="])(f,c.value)};if(!j.trueArray(c.rule))continue;let d=ne(M({},c),{valid:te(()=>u(t.rule.value,i)),ctrl:lm(t,c.rule),isHidden:j.String(c.rule[0])});d.valid&&d.ctrl||!d.valid&&!d.ctrl&&!d.isHidden||n.push(d)}if(!n.length)return!1;let o=[],a=!1;return this.deferSyncValue(()=>{n.reverse().forEach(({isHidden:s,valid:c,rule:u,prepend:d,append:f,child:h,ctrl:p,method:m})=>{if(s)c?t.ctrlRule.push({__ctrl:!0,children:u,valid:c}):p&&t.ctrlRule.splice(t.ctrlRule.indexOf(p)>>>0,1),o[c?"push":"unshift"](()=>{m==="disabled"||m==="enabled"?this.api.disabled(!c,u):m==="display"||m==="show"?this.api.display(c,u):m==="required"?(u.forEach(g=>{this.api.setEffect(g,"required",c)}),c||this.api.clearValidateState(u)):this.api.hidden(!c,u)});else if(c){a=!0;let g={type:"fragment",native:!0,__ctrl:!0,children:u};t.ctrlRule.push(g),this.bus.$once("load-start",()=>{d?i.prepend(g,d,h):f||h?i.append(g,f||t.id,h):t.root.splice(t.root.indexOf(t.origin)+1,0,g)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(p),1);let g=Xe(p);g&&g.rm()}})}),o.length&&(this.loading?o.length&&this.bus.$once("load-end",()=>{o.forEach(s=>s())}):o.length&&l.nextTick(()=>{o.forEach(s=>s())})),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),a},reloadRule(t){return this._reloadRule(t)},_reloadRule(t){t||(t=this.rules);let r=M({},this.ctxs);this.clearNextTick(),this.initData(t),this.fc.rules=t,this.deferSyncValue(()=>{this.bus.$once("load-end",()=>{Object.keys(r).filter(n=>this.ctxs[n]===void 0).forEach(n=>this.rmCtx(r[n])),this.$render.clearCacheAll()}),this.reloading=!0,this.loadRule(),this.reloading=!1,this.refresh(),this.bus.$emit("reloading",this.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh(){this.vm.setupState.refresh()}})}function om(e){let t=Ha();return Object.keys(t).forEach(r=>{ue(e,r)||(e[r]=t[r])}),e}function am(e){let t=e.rule.control||[];return j.Object(t)?[t]:t}function lm(e,t){for(let r=0;r<e.ctrlRule.length;r++){let n=e.ctrlRule[r];if(n.children===t)return n}}function Za(e){return!!e.rule.__ctrl}function sm(e){ee(e.prototype,{setValue(t,r,n,i){t.deleted||(t.rule.value=r,this.changeStatus=!0,this.seabFormData(t,n),this.$render.clearCache(t),this.nextRefresh(),this.syncValue(),this.valueChange(t,r),this.vm.emit("change",t.field,r,t.origin,this.api,i||!1),this.effect(t,"value"),this.targetHook(t,"value",{value:r}),this.emitEvent("change",t.field,r,{rule:t.origin,api:this.api,setFlag:i||!1}),i&&l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{this.api.clearValidateState(t.id)})})}),this.$manager.fieldChange(t,r,n,i))},onInput(t,r){let n;t.input&&(this.isQuote(t,n=t.parser.toValue(r,t))||this.isChange(t,r))&&this.setValue(t,n,r)},onUpdateValue(t,r){this.deferSyncValue(()=>{let n=t.getParentGroup(),i=n?this.subRuleData[n.id]:null,o={};Object.keys(r||{}).forEach(a=>{i&&ue(i,a)?o[a]=r[a]:ue(this.api.form,a)?this.api.form[a]=r[a]:this.api.top!==this.api&&ue(this.api.top.form,a)&&(this.api.top.form[a]=r[a])}),Object.keys(o).length&&this.api.setChildrenFormData(n.rule,o)})},onBaseInput(t,r){this.seabFormData(t,r),this.$render.clearCache(t),this.nextRefresh()},seabFormData(t,r){t.modelValue=r;let n=t.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][t.field]=t.rule.value),Pe(this.formData,t.id,r)},rmSubRuleData(t){let r=t.getParentGroup();r&&this.subRuleData[r.id]&&delete this.subRuleData[r.id][t.field]},geabFormData(t){return this.formData[t.id]},syncForm(){let t=l.reactive({}),r=this.fields(),n=[];this.options.appendValue!==!1&&Object.keys(this.appendData).forEach(i=>{r.indexOf(i)===-1&&(t[i]=l.toRef(this.appendData,i))}),r.forEach(i=>{let o=(this.fieldCtx[i]||[]).filter(a=>!this.isIgnore(a))[0];o||(o=this.fieldCtx[i][0],n.push(i)),t[i]=l.toRef(o.rule,"value")}),this.form=t,this.ignoreFields=n,this.syncValue()},isIgnore(t){return t.rule.ignore===!0||(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields)&&t.hasHidden()},appendValue(t){(t.field&&ue(this.appendData,t.field)||j.Undef(t.value)&&this.options.forceCoverValue)&&(t.value=this.appendData[t.field],delete this.appendData[t.field])},addSubForm(t,r){this.subForm[t.id]=r},deferSyncValue(t,r){this.deferSyncFn||(this.deferSyncFn=t),this.deferSyncFn.sync||(this.deferSyncFn.sync=r),te(t),this.deferSyncFn===t&&(this.deferSyncFn=null,t.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;let t={};Object.keys(this.form).forEach(r=>{this.ignoreFields.indexOf(r)===-1&&(t[r]=this.form[r])}),this.vm.setupState.updateValue(t)},isChange(t,r){let n=this.geabFormData(t);if(n===r)return!1;let i=typeof n;return i===typeof r&&(i==="string"||i==="boolean"||i==="number"&&Number.isFinite(n)&&Number.isFinite(r))?!0:JSON.stringify(n,Xa)!==JSON.stringify(r,Xa)},isQuote(t,r){return(r instanceof Function||j.Object(r)||Array.isArray(r))&&r===t.rule.value},refreshUpdate(t,r,n,i){if(j.Function(t.rule.update)){let o=te(()=>t.rule.update(r,t.origin,this.api,{origin:n||"change",linkField:i}));if(o===void 0)return;t.rule.hidden=o===!0}},valueChange(t,r){this.refreshRule(t,r),this.bus.$emit("change-"+t.field,r)},refreshRule(t,r,n,i){this.refreshControl(t)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(t,r,n,i)},appendLink(t){let r=t.rule.link;j.trueArray(r)&&r.forEach(n=>{let i=()=>this.refreshRule(t,t.rule.value,"link",n);this.bus.$on("change-"+n,i),t.linkOn.push(()=>this.bus.$off("change-"+n,i))})},fields(){return Object.keys(this.fieldCtx)}})}function Xa(e,t){return typeof t=="function"?""+t:t}var cm=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],sr=Symbol("oldValue"),um=["$condition","$variableVal","$val","$form","$scope","$group","$rule"],dm=["$formulas","$form","$scope","$group","$rule","$api"],Hr=new Map,fm=1e3;function el(e,t){let r=e.join(",")+"|"+t,n=Hr.get(r);return n||(Hr.size>=fm&&Hr.clear(),n=Function(...e,t),Hr.set(r,n)),n}function pm(e){ee(e.prototype,{scheduleComputedUpdate(t){(this._computedQueue||(this._computedQueue=[])).push(t),this._computedFlushing||this._computedScheduled||(this._computedScheduled=!0,setTimeout(()=>{this._computedScheduled=!1,this._computedFlushing=!0;try{let r=this._computedQueue||[];this._computedQueue=[];for(let n=0;n<r.length;n++)te(r[n]),this._computedQueue&&this._computedQueue.length&&(r.push(...this._computedQueue),this._computedQueue=[])}finally{this._computedFlushing=!1}}))},getCtx(t){return this.getFieldCtx(t)||this.getNameCtx(t)[0]||this.ctxs[t]},getCtxs(t){return this.fieldCtx[t]||this.nameCtx[t]||(this.ctxs[t]?[this.ctxs[t]]:[])},setIdCtx(t,r,n){let i=`${n}Ctx`;this[i][r]?this[i][r].push(t):this[i][r]=[t]},rmIdCtx(t,r,n){let i=`${n}Ctx`,o=this[i][r];if(!o)return!1;let a=o.splice(o.indexOf(t)>>>0,1).length>0;return o.length||delete this[i][r],a},getFieldCtx(t){return(this.fieldCtx[t]||[])[0]},getNameCtx(t){return this.nameCtx[t]||[]},setCtx(t){let{id:r,field:n,name:i,rule:o}=t;this.ctxs[r]=t,i&&this.setIdCtx(t,i,"name"),t.input&&(this.setIdCtx(t,n,"field"),this.seabFormData(t,t.parser.toFormValue(o.value,t)),this.isMounted&&!this.reloading&&this.vm.emit("change",t.field,o.value,t.origin,this.api,!1,!0))},getParser(t){let r=this.fc.parsers,n=this.fc.renderDriver,i=Me(t.type)||t.type;if(n){let o=n.parsers||{},a=o[t.originType]||o[i]||o[t.trueType];if(a)return a}return r[t.originType]||r[i]||r[t.trueType]||Vt},bindParser(t){t.setParser(this.getParser(t))},getType(t){let r=this.fc.CreateNode.aliasMap,n=r[t]||r[Me(t)||t]||t;return Me(n)},noWatch(t){this.noWatchFn||(this.noWatchFn=t),te(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx(t){let r=Ma().filter(a=>a[0]!=="_"&&a[0]!=="$"&&cm.indexOf(a)===-1),n={},i=(a,s,c)=>(u,d)=>{let f=s.value;if(!this.isBreakWatch())if(c&&t.parser.loadChildren===!1)this.$render.clearCache(t),this.nextRefresh();else{if(this.watching=!0,l.nextTick(()=>{this.targetHook(t,"watch",{key:a,oldValue:d,newValue:f})}),a==="hidden"&&!!f!=!!d&&l.nextTick(()=>{this.targetHook(t,"hidden",{value:f})}),a==="ignore"&&t.input||a==="hidden"&&(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields))this.syncForm();else if(a==="link"){t.link();return}else["props","on","deep"].indexOf(a)>-1?(this.parseInjectEvent(t.rule,f||{}),a==="props"&&t.input&&this.seabFormData(t,t.parser.toFormValue(t.rule.value,t))):a==="emit"?this.parseEmit(t):["prefix","suffix"].indexOf(a)>-1?f&&this.loadFn(f,t.rule):a==="type"?(t.updateType(),this.bindParser(t)):c&&(j.Function(d)&&(d=t.getPending("children",[])),j.Function(f)&&(f=t.loadChildrenPending()),this.updateChildren(t,f,d));this.$render.clearCache(t),this.refresh(),this.watching=!1}},o=(a,s=!1)=>{if(n[a])return;n[a]=!0;let c=t.refRule[a],u=a==="children",d=i(a,c,u);t.watch.push(l.watch(u?()=>j.Function(c.value)?c.value:[...c.value||[]]:()=>c.value,d,{deep:!u,flush:u?"sync":"pre"})),s&&d(c.value,void 0)};if(r.forEach(a=>{t.refRule[a]=l.toRef(t.rule,a),ue(t.rule,a)&&o(a)}),t.watch.push(l.watch(()=>Object.keys(t.rule).join("|"),()=>{r.forEach(a=>{!n[a]&&ue(t.rule,a)&&o(a,!0)})})),t.refRule.__$title=l.computed(()=>{let a=(typeof t.rule.title=="object"?t.rule.title.title:t.rule.title)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$info=l.computed(()=>{let a=(typeof t.rule.info=="object"?t.rule.info.info:t.rule.info)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$validate=l.computed(()=>{let a=s=>{var u,d;let c=s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return c?this.api.t(c[1],{title:(d=(u=t.refRule)==null?void 0:u.__$title)==null?void 0:d.value}):s};return $t(t.rule.validate).map(s=>{let c=M({},s);if(c.message&&(c.message=a(c.message)),j.Function(c.validator)){let u=t;c.validator=function(...d){return s.validator.call({that:this,id:u.id,field:u.field,rule:u.rule,api:u.$handle.api},...d)}}if(c.adapter){if(typeof c.error=="object"){let u=M({},c.error);Object.keys(u).forEach(d=>{u[d]=a(u[d])}),c.error=u}return this.adapterValidate(c,t)}return c})}),t.input){let a=l.toRef(t.rule,"value");t.watch.push(l.watch(()=>a.value,()=>{let s=t.parser.toFormValue(a.value,t);this.isChange(t,s)&&this.setValue(t,a.value,s,!0)}))}this.bus.$once("load-end",()=>{let a=t.rule.computed;a&&(typeof a!="object"&&(a={value:a}),Object.keys(a).forEach(s=>{let c=l.computed(()=>{let d=a[s];if(!d)return;let f=this.compute(t,d);return(d.linkage||d.linkageVariable)&&f===sr?sr:f}),u=d=>{s==="value"?this.onInput(t,d):s[0]==="$"?this.api.setEffect(t.id,s,d):pt(t.rule,s,d)};(s==="value"?[void 0,null,""].indexOf(t.rule.value)>-1:c.value!==Fe(t.rule,s))&&u(c.value),t.watch.push(l.watch(c,d=>{d!==sr&&this.scheduleComputedUpdate(()=>u(d))},{deep:!0}))}))}),this.watchEffect(t)},adapterValidate(t,r){return this.$manager.adapterValidate({required:t.required,message:t.message,trigger:t.trigger},(n,i)=>{if((t.beforeValidate&&te(()=>t.beforeValidate({value:n,api:this.api,validate:t,rule:r.rule})))===!1)i();else{let o=this.validator(r,n,t);if(o){let a="";typeof t.error=="object"&&(a=t.error[o]||t.error.default),!a&&typeof t.message=="string"&&(a=t.message),a||(a=this.getValidateMessage(r,{key:o,rule:t[o]})),i(a)}else if(t.validator){let a=t.validator&&te(()=>t.validator(n,i));a&&j.Function(a.then)&&a.then(()=>i()).catch(s=>i(s))}else i()}})},getValidateMessage(t,r){var i,o;let n=Array.isArray(r.rule)?r.rule.join(","):""+r.rule;return this.api.t(r.key==="required"?r.key:"validate."+r.key,{[r.key]:n,title:(o=(i=t.refRule)==null?void 0:i.__$title)==null?void 0:o.value})},validator(t,r,n){if(j.empty(r))return n.required?"required":void 0;for(let[i,o]of Object.entries(n))switch(i){case"len":case"maxLen":case"minLen":let a=c=>i==="len"?c===o:i==="maxLen"?c<=o:c>=o;if(Array.isArray(r)){if(!a(r.length))return i}else{if(typeof r=="object")return i;if(!a((""+r).length))return i}break;case"pattern":if(!(typeof o=="string"?new RegExp(o):o).test(""+r))return i;break;case"uppercase":if(o&&(typeof r!="string"||!/^[A-Z]*$/.test(r)))return i;break;case"lowercase":if(o&&(typeof r!="string"||!/^[a-z]*$/.test(r)))return i;break;case"min":case"max":case"positive":case"negative":case"integer":case"number":let s=Number(r);if(Number.isNaN(s)||i==="min"&&s<o||i==="max"&&s>o||i==="positive"&&s<=0||i==="negative"&&s>=0||i==="integer"&&!Number.isInteger(s))return i;break;case"equal":if(r!==o)return i;break;case"enum":if(Array.isArray(o)&&!o.includes(r))return i;break;case"hasKeys":if(typeof r!="object"||Array.isArray(o)&&o.some(c=>!(c in r)))return i;break;case"email":if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(""+r))return i;break;case"url":if(!RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(""+r))return i;break;case"ip":if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(""+r))return i;break;case"phone":if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(""+r))return i;break;case"computed":if(!this.compute(t,o))return i}},compute(t,r){let n;if(typeof r=="object"){let i=t.getParentGroup(),o=c=>{if(c=Array.isArray(c)?{mode:"AND",group:c}:c,!j.trueArray(c.group))return!0;let u=c.mode==="OR",d=!0;for(let f=0;f<c.group.length;f++){let h=c.group[f],p,m=null,g=null;if(h.variable)g=this.fc.getLoadData(h.variable);else if(h.field)m=Va(h.field||"");else if(!h.mode)return!0;let y=h.compare;if(y&&(y=Va(y||"")),p=h.mode?o(h):Nt[h.condition]?j.Function(h.handler)?te(()=>h.handler(this.api,t.rule)):te(()=>el(um,`with($form){with($scope){with(this){with($group){ return $condition['${h.condition}'](${h.variable?"$variableVal":m}, ${y||"$val"}); }}}}`).call(this.api.form,Nt,g,h.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,i&&this.subRuleData[i.id]||{},t.rule)):!1,u&&p)return!0;u||d&&(d=p)}return!u&&d},a=r,s=o(a);return s=a.invert===!0?!s:s,a.linkage?s?te(()=>this.computeValue(a.linkage,t,i),void 0):sr:a.linkageVariable?s?te(()=>this.fc.getLoadData(a.linkageVariable),void 0):sr:s}if(j.Function(r)){let i=r;n=()=>i(this.api.form,this.api,t.rule)}else{let i=t.getParentGroup();n=()=>this.computeValue(r,t,i)}return te(n,void 0)},computeValue(t,r,n){let i=this,o=Object.keys(this.fc.formulas).reduce((a,s)=>(a[s]=function(...c){return i.fc.formulas[s].call({that:this,rule:r.rule,api:i.api,fc:i.fc},...c)},a),{});return te(()=>el(dm,`with($form){with($scope){with(this){with($group){with($formulas){ return ${t} }}}}}`).call(this.api.form,o,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},r.rule,this.api),void 0)},updateChildren(t,r,n){this.deferSyncValue(()=>{n&&n.forEach(i=>{(r||[]).indexOf(i)===-1&&i&&!j.String(i)&&i.__fc__&&i.__fc__.parent===t&&this.rmCtx(i.__fc__)}),j.trueArray(r)&&(this.loadChildren(r,t),this.bus.$emit("update",this.api))})},rmSub(t){j.trueArray(t)&&t.forEach(r=>{r&&r.__fc__&&this.rmCtx(r.__fc__)})},rmCtx(t){if(t.deleted)return;let{id:r,field:n,input:i,name:o}=t;St(this.ctxs,r),St(this.formData,r),St(this.subForm,r),St(this.vm.setupState.ctxInject,r);let a=t.getParentGroup();a&&this.subRuleData[a.id]&&St(this.subRuleData[a.id],n),t.group&&St(this.subRuleData,r),i&&this.rmIdCtx(t,n,"field"),o&&this.rmIdCtx(t,o,"name"),i&&!ue(this.fieldCtx,n)&&St(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(t.parser.loadChildren!==!1){let c=t.getPending("children",t.rule.children);j.trueArray(c)&&c.forEach(u=>u&&u.__fc__&&this.rmCtx(u.__fc__))}t.root===this.rules&&this.vm.setupState.renderRule()}},i);let s=this.sort.indexOf(r);return s>-1&&this.sort.splice(s,1),this.$render.clearCache(t),t.delete(),this.effect(t,"deleted"),this.targetHook(t,"deleted"),i&&!this.fieldCtx[n]&&this.vm.emit("remove-field",n,t.rule,this.api),t.rule.__ctrl||this.vm.emit("remove-rule",t.rule,this.api),t}})}function hm(e){ee(e.prototype,{mounted(){let t=()=>{this.isMounted=!0,this.lifecycle("mounted")};this.pageEnd?t():this.bus.$once("page-end",t)},lifecycle(t){this.fc.targeabFormDriver(t,this.api,this.fc),this.vm.emit(t,this.api),this.emitEvent(t,this.api)},emitEvent(t,...r){let n=this.options[t]||this.options[Me("on-"+t)||"on-"+t];if(n){let i=Qe(n);j.Function(i)&&te(()=>i(...r))}this.bus.$emit(t,...r)},targetHook(t,r,n){var c,u,d,f;let i=(u=(c=t.prop)==null?void 0:c.hook)==null?void 0:u[r],o=(h,p)=>{h&&(Array.isArray(h)?h:[h]).forEach(m=>{te(()=>m(ne(M({args:Object.values(n||{})},n||{}),{self:t.rule,rule:t.rule,parent:p==null?void 0:p.rule,$f:this.api,api:this.api,option:this.vm.props.option})))})};o(i);let a="deep"+ta(r),s=t.parent;for(;s;)o((f=(d=s.prop)==null?void 0:d.hook)==null?void 0:f[a],s),s=s.parent}})}function mm(e){ee(e.prototype,{useProvider(){let t=this.fc.providers;Object.keys(t).forEach(r=>{let n=t[r];j.Function(n)&&(n=n(this.fc)),n._c=ym(n),this.onEffect(n,r),this.providers[r]=n})},onEffect(t,r){let n=[];(t._c||["*"]).forEach(i=>{let o=i==="*"?"*":this.getType(i);n.indexOf(o)>-1||(n.push(o),this.bus.$on(`p:${r||t.name}:${o}:${+!!t.input}`,(a,s)=>{t[a]&&t[a](...s)}))}),t._used=n},watchEffect(t){let r={required:()=>{var i,o;return(ue(t.rule,"$required")?t.rule.$required:(o=(i=t.rule)==null?void 0:i.effect)==null?void 0:o.required)||!1}},n=t.rule.effect||{};Object.keys(n).forEach(i=>{r[i]=()=>n[i]}),Object.keys(t.rule).forEach(i=>{i[0]==="$"&&(r[i.substr(1)]=()=>t.rule[i])}),Object.keys(r).forEach(i=>{t.watch.push(l.watch(r[i],o=>{this.effect(t,"watch",{[i]:o})},{deep:!0}))})},ruleEffect(t,r,n){this.emitEffect({rule:t,input:!!t.field,type:this.getType(t.type)},r,n)},effect(t,r,n){this.emitEffect({rule:t.rule,input:t.input,type:t.trueType,ctx:t,custom:n},r)},getEffect(t,r){if(ue(t,"$"+r))return t["$"+r];if(ue(t,"effect")&&ue(t.effect,r))return t.effect[r]},emitEffect({ctx:t,rule:r,input:n,type:i,custom:o},a,s){if(!i||["fcFragment","fragment"].indexOf(i)>-1)return;let c=o||Object.keys(r).reduce((u,d)=>(d[0]==="$"&&(u[d.substr(1)]=r[d]),u),M({},r.effect||{}));Object.keys(c).forEach(u=>{let d=this.providers[u];if(!d||d.input&&!n)return;let f;if(!d._c)f="*";else if(d._used&&d._used.indexOf(i)>-1)f=i;else return;let h=M({value:c[u],getValue:()=>this.getEffect(r,u)},s||{});t&&(h.getProp=()=>t.effectData(u),h.clearProp=()=>t.clearEffectData(u),h.mergeProp=p=>st(h.getProp(),[p]),h.id=t.id),this.bus.$emit(`p:${u}:${f}:${+!!d.input}`,a,[h,r,this.api])})}})}function gm(e){return e.filter(function(t,r,n){return n.indexOf(t,0)===r})}function ym(e){let t=e.components;if(Array.isArray(t)){let r=gm(t.filter(n=>n!=="*"));return r.length?r:!1}return j.String(t)?[t]:!1}function et(e){Ba(this,{options(){return e.options.value||{}},bus(){return e.bus},preview(){return e.vm.props.preview==null?e.vm.setupState.parent&&e.vm.setupState.parent.props.preview!=null?e.vm.setupState.parent.props.preview:e.options.value.preview||!1:e.vm.props.preview}}),ee(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:l.reactive({}),subRuleData:l.reactive({}),subForm:{},form:l.reactive({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:()=>{this.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=Reflect.construct(Zn,[this]),this.api=e.extendApiFn.reduce((t,r)=>{let n=te(()=>r(t,this));return n&&n!==t&&ee(t,n),t},Jh(this))}ee(et.prototype,{initData(e){ee(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData(){this.appendData=M(M(M({},Ct(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,r)=>{let n=this.options.beforeFetch&&te(()=>this.options.beforeFetch(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):t()})},beforeFetch(e){return new Promise((t,r)=>{let n=e&&e.beforeFetch&&te(()=>e.beforeFetch(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):n===!1?r():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,r)=>{let n=this.options.beforeSubmit&&te(()=>this.options.beforeSubmit(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):n===!1?r():t()})}}),Xh(et),em(et),rm(et),im(et),sm(et),pm(et),hm(et),mm(et);var Xn=l.defineComponent({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render(){return this.vnode}});function bm(e){return Object.keys(e).map(t=>{let r=e[t],n=l.resolveDirective(t);if(n)return[n,r.value,r.arg,r.modifiers||{}]}).filter(t=>!!t)}function tl(e,t){let r=e.directives;return r?(Array.isArray(r)||(r=[r]),l.withDirectives(t,r.reduce((n,i)=>n.concat(bm(i)),[]))):t}function wm(){let e={};const r=class r{constructor(i){ve(this,"aliasMap",e);ve(this,"vm");ve(this,"handle");this.vm=i.vm,this.handle=i}make(i,o,a){return tl(o,this.h(i,ja(o),a))}makeComponent(i,o,a){try{return tl(o,l.createVNode(i,ja(o),a))}catch(s){return console.error(s),l.createVNode("")}}h(i,o,a){let s=this.vm||l.getCurrentInstance();if(!s)throw Error("Cannot create a node outside a component instance");let c=s.appContext.config.isNativeTag(i),u=this.handle.fc.prop.components[i];!u&&c&&delete o.abFormInject;try{return l.createVNode(u||(c?i:l.resolveComponent(i)),o,a)}catch(d){return console.error(d),l.createVNode("")}}static alias(i,o){e[i]=o}static use(i){Object.keys(i).forEach(o=>{let a=Bt(o),s=o.toLocaleLowerCase(),c=i[o];r.alias(o,c),[o,a,s].forEach(u=>{Object.assign(r.prototype,{[u]:function(d,f){return this.make(e[o]||u,d,f)}})})})}};ve(r,"aliasMap",e);let t=r;return t}function vm(e){class t extends xm{}return Object.assign(t.prototype,e),t}var xm=class{constructor(e){ve(this,"$handle");ve(this,"vm");ve(this,"$render");ve(this,"$r");ve(this,"options");ve(this,"ref");ve(this,"mergeOptionsRule");ve(this,"key");this.$handle=e,this.vm=e.vm,this.options={},this.ref="fcForm",this.mergeOptionsRule={normal:["form","row","info","submitBtn","resetBtn"]},this.updateKey(),this.init()}__init(){this.$render=this.$handle.$render,this.$r=(...e)=>this.$render.renderRule(...e)}updateKey(){this.key=Pr()}init(){}update(){}beforeRender(){}form(){return this.vm.refs[this.ref]}adapterValidate(e,t){return e.validator=(r,n,i)=>t(n,i),e}getSlot(e){let t=r=>r.slots[e]||(r.setupState.parent?t(r.setupState.parent):void 0);return t(this.vm)}mergeOptions(e,t){return at(e.map(r=>this.tidyOptions(r)),t,this.mergeOptionsRule)}updateOptions(e){this.$handle.fc.targeabFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()}tidyOptions(e){return e}tidyRule(e){}mergeProp(e){}getDefaultOptions(){return{}}fieldChange(e,t,r,n){}render(e){}};function zr(e,t){return Reflect.get(e,t)}function ei(e,t,r){Reflect.set(e,t,r)}function ti(e,t){Reflect.deleteProperty(e,t)}var Sm=function(e){return{name:"loadData",_fn:[],loaded(t,r,n){this.deleted(t),l.nextTick(()=>{let i=$t(t.getValue()),o=[];i.forEach(a=>{if(a&&(a.attr||a.template||a.handler)){let s=u=>{var p;let d=(p=r==null?void 0:r.__fc__)==null?void 0:p.getParentGroup(),f;f=a.template?e.$handle.loadStrVar(a.template,u,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null):a.handler&&j.Function(a.handler)?a.handler(u,r,n):e.$handle.loadStrVar(`{{${a.attr}}}`,u,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null),(f==null||f==="")&&a.default!=null&&(f=a.default),a.copy!==!1&&(f=Ct(f));let h=a.modify?r:t.getProp();a.to==="child"?h.children?h.children[0]=f:h.children=[f]:pt(h,a.to||"options",f),n.sync(r)},c=e.watchLoadData(u=>s(u));s=ft(s,a.wait||300),a.watch===!1?c():o.push(c)}}),ei(this._fn,t.id,o)})},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=zr(this._fn,t.id))==null||r.forEach(n=>{n()}),ti(this._fn,t.id),t.clearProp()}}},Cm=function(e){return{name:"t",_fn:[],loaded(t,r,n){this.deleted(t);let i=t.getValue()||{},o=[];Object.keys(i).forEach(a=>{let s=i[a];if(s){let c=typeof s=="object",u=f=>{let h=c?s:null,p=e.t(c?h==null?void 0:h.attr:s,c&&(h==null?void 0:h.params)||null,f),m=c&&(h!=null&&h.modify)?r:t.getProp();a==="child"?m.children?m.children[0]=p:m.children=[p]:pt(m,a,p),n.sync(r)},d=e.watchLoadData(f=>u(f));u=ft(u,(typeof s=="object"?s.wait:0)||300),typeof s!="object"||s.watch!==!1?o.push(d):d()}}),ei(this._fn,t.id,o)},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=zr(this._fn,t.id))==null||r.forEach(n=>{n()}),ti(this._fn,t.id),t.clearProp()}}},rl={name:"componentValidate",load(e,t,r){let n=e.getValue();if(!n||typeof n=="object"&&"method"in n&&n.method===!1)e.clearProp(),r.clearValidateState([t.field]);else{let i=j.Object(n)&&n!==null?n:{method:n},o=i.method,a=ne(M({},i),{validator(...s){let c=Xe(t);if(c&&typeof c=="object"&&"id"in c)return r.exec(c.id,typeof o=="string"?o:"abFormValidate",...s,{attr:e,rule:t,api:r})}});delete a.method,e.getProp().validate=[a]}},watch(e,t,r){rl.load(e,t,r)}},$m={fetch:function(e){function t(i){return typeof i=="string"?{action:i,to:"options"}:i}function r(i,o,a){let s=i.value;n.deleted(i);let c=t(typeof s=="function"?s(o,a):s),u=h=>{h===void 0?i.clearProp():pt(i.getProp(),(c==null?void 0:c.to)||"options",h),h!=null&&(c!=null&&c.key)&&e.$handle.options.globalData[c.key]&&e.fetchCache.set(e.$handle.options.globalData[c.key],{status:!0,data:h}),a.sync(o)};if(!c||!c.action&&!c.key){u(void 0);return}c=Ct(c),c.to||(c.to="options");let d=c.onError,f=()=>!i.getValue()&&(i.clearProp(),a.sync(o),!0);ei(n._fn,i.id,e.watchLoadData(ft((h,p)=>{var y;if(p&&(c==null?void 0:c.watch)===!1)return(y=zr(n._fn,i.id))==null?void 0:y();if(c!=null&&c.key){e.targetRule=o;let b=h(`$globalData.${c.key}`);if(delete e.targetRule,b){if(f())return;u(b)}return}let m=e.$handle.loadFetchVar(Ct(c),h,o),g=ne(M({headers:{}},m),{onSuccess(b,S){if(f())return;let $=R=>S?R:ue(R,"data")?Fe(R,"data"):R,L=Qe(m.parse);typeof L=="function"?$=R=>L(R,o,a):typeof L=="string"&&($=R=>Fe(R,L)),Nn($(b)).then(R=>{u(R)})},onError(b){if(u(void 0),!f())if(typeof d=="function")d(b,o,a);else{let S=b&&typeof b=="object"&&"message"in b?b.message:void 0;Pn(S?String(S):`fetch fail ${m.action||""}`)}}});e.$handle.beforeFetch(g,{rule:o,api:a}).then(()=>{typeof m.action=="function"?Nn(m.action(o,a)).then(b=>{g.onSuccess(b,!0)}).catch(b=>{g.onError(b)}):te(()=>e.create.fetch(g,{inject:i,rule:o,api:a}))}).catch(()=>{})},c.wait||600)))}let n={name:"fetch",_fn:[],loaded(i,o,a){r(i,o,a)},watch(i,o,a){r(i,o,a)},deleted(i){var o;(o=zr(this._fn,i.id))==null||o(),ti(this._fn,i.id),i.clearProp()}};return n},loadData:Sm,t:Cm,componentValidate:rl},Tm={name:"html",loadChildren:!1,render(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren(e){return{default:()=>e.filter(t=>j.String(t)).join("")}}};function Em(e){e+="=";let t=decodeURIComponent(document.cookie).split(";");for(let r=0;r<t.length;r++){let n=t[r];for(;n.charAt(0)===" ";)n=n.substring(1);if(n.indexOf(e)===0){n=n.substring(e.length,n.length);try{return JSON.parse(n)}catch(i){return n}}}return null}function km(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function _m(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function ri(e,t){if(!t)return null;let r=t.split("."),n=r.shift();if(!n)return null;let i=e(n);return r.length?i==null?null:Fe(i,r):i}function Fm(e){return ri(Em,e)}function Am(e){return ri(km,e)}function Om(e){return ri(_m,e)}var Rm=typeof global=="object"&&global&&global.Object===Object&&global,Mm=typeof self=="object"&&self&&self.Object===Object&&self,ni=Rm||Mm||Function("return this")(),Lt=ni.Symbol,nl=Object.prototype,Dm=nl.hasOwnProperty,Pm=nl.toString,cr=Lt?Lt.toStringTag:void 0;function Im(e){var t=Dm.call(e,cr),r=e[cr];try{e[cr]=void 0;var n=!0}catch(o){}var i=Pm.call(e);return n&&(t?e[cr]=r:delete e[cr]),i}var Bm=Object.prototype.toString;function jm(e){return Bm.call(e)}var Nm="[object Null]",Vm="[object Undefined]",il=Lt?Lt.toStringTag:void 0;function ol(e){return e==null?e===void 0?Vm:Nm:il&&il in Object(e)?Im(e):jm(e)}function Lm(e){return typeof e=="object"&&!!e}var Hm="[object Symbol]";function ii(e){return typeof e=="symbol"||Lm(e)&&ol(e)==Hm}function zm(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var oi=Array.isArray,al=Lt?Lt.prototype:void 0,ll=al?al.toString:void 0;function sl(e){if(typeof e=="string")return e;if(oi(e))return zm(e,sl)+"";if(ii(e))return ll?ll.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Um="[object AsyncFunction]",qm="[object Function]",Ym="[object GeneratorFunction]",Gm="[object Proxy]";function Wm(e){if(!cl(e))return!1;var t=ol(e);return t==qm||t==Ym||t==Um||t==Gm}var ai=ni["__core-js_shared__"],ul=function(){var e=/[^.]+$/.exec(ai&&ai.keys&&ai.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jm(e){return!!ul&&ul in e}var Km=Function.prototype.toString;function Qm(e){if(e!=null){try{return Km.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Zm=/[\\^$.*+?()[\]{}|]/g,Xm=/^\[object .+?Constructor\]$/,eg=Function.prototype,tg=Object.prototype,rg=eg.toString,ng=tg.hasOwnProperty,ig=RegExp("^"+rg.call(ng).replace(Zm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function og(e){return!cl(e)||Jm(e)?!1:(Wm(e)?ig:Xm).test(Qm(e))}function ag(e,t){return e==null?void 0:e[t]}function dl(e,t){var r=ag(e,t);return og(r)?r:void 0}function lg(e,t){return e===t||e!==e&&t!==t}var sg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cg=/^\w*$/;function ug(e,t){if(oi(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ii(e)?!0:cg.test(e)||!sg.test(e)||t!=null&&e in Object(t)}var ur=dl(Object,"create"),dg="__lodash_hash_undefined__",fg=Object.prototype.hasOwnProperty,pg=Object.prototype.hasOwnProperty,hg="__lodash_hash_undefined__";function Tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tt.prototype.clear=function(){this.__data__=ur?ur(null):{},this.size=0},Tt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},Tt.prototype.get=function(e){var t=this.__data__;if(ur){var r=t[e];return r===dg?void 0:r}return fg.call(t,e)?t[e]:void 0},Tt.prototype.has=function(e){var t=this.__data__;return ur?t[e]!==void 0:pg.call(t,e)},Tt.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ur&&t===void 0?hg:t,this};function Ur(e,t){for(var r=e.length;r--;)if(lg(e[r][0],t))return r;return-1}var mg=Array.prototype.splice;function Ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ht.prototype.clear=function(){this.__data__=[],this.size=0},Ht.prototype.delete=function(e){var t=this.__data__,r=Ur(t,e);return r<0?!1:(r==t.length-1?t.pop():mg.call(t,r,1),--this.size,!0)},Ht.prototype.get=function(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]},Ht.prototype.has=function(e){return Ur(this.__data__,e)>-1},Ht.prototype.set=function(e,t){var r=this.__data__,n=Ur(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var gg=dl(ni,"Map");function yg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qr(e,t){var r=e.__data__;return yg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Et.prototype.clear=function(){this.size=0,this.__data__={hash:new Tt,map:new(gg||Ht),string:new Tt}},Et.prototype.delete=function(e){var t=qr(this,e).delete(e);return this.size-=+!!t,t},Et.prototype.get=function(e){return qr(this,e).get(e)},Et.prototype.has=function(e){return qr(this,e).has(e)},Et.prototype.set=function(e,t){var r=qr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var bg="Expected a function";function li(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(bg);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(li.Cache||Et),r}li.Cache=Et;var wg=500;function vg(e){var t=li(e,function(n){return r.size===wg&&r.clear(),n}),r=t.cache;return t}var xg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sg=/\\(\\)?/g,Cg=vg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(xg,function(r,n,i,o){t.push(i?o.replace(Sg,"$1"):n||r)}),t});function $g(e){return e==null?"":sl(e)}function Tg(e,t){return oi(e)?e:ug(e,t)?[e]:Cg($g(e))}function Eg(e){if(typeof e=="string"||ii(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kg(e,t){t=Tg(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Eg(t[r++])];return r&&r==n?e:void 0}function _g(e,t,r){var n=e==null?void 0:kg(e,t);return n===void 0?r:n}var Fg={required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},Ag={required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}},Og=((Cs=window.localStorage)==null?void 0:Cs.getItem("lang"))||"zh-cn",Rg=($s=(e=>({t:t=>_g(Og==="zh-cn"?Ag:Fg,t,t)}))())==null?void 0:$s.t;function si(...e){let t=e.length===1?e[0]:e[1],r=e.length===1?t==null?void 0:t.name:e[0];return{id:typeof r=="string"?r:void 0,prop:t}}function Mg(e={}){let t=e.key||[],r=e.array||[],n=e.normal||[];Ra.push(...t),Jn.push(...r),Kn.push(...n),Ua([...t,...r,...n])}var Dg=1,Ie={},fl=Symbol("defValue");function pl(e){let t={[Xn.name||"fcFragment"]:Xn},r={},n={},i={},o={},a=[],s=[],c=e.extendApi?[e.extendApi]:[],u=M({},$m),d=Gh(),f={global:{}},h=e.isMobile===!0,p=l.reactive({$mobile:h}),m=wm(),g={},y={};Mg(e.attrs||{});function b(w){let v=Ie[w];if(Array.isArray(v))return v.map(O=>O.api());if(v)return v.api()}function S(w){a.push(w)}function $(...w){let v=si(...w);v.id&&v.prop&&(n[v.id]=v.prop)}function L(...w){let v=si(...w);v.id&&v.prop&&(u[v.id]=j.Function(v.prop)?v.prop:ne(M({},v.prop),{name:v.id}))}function R(w){m.use(w)}function T(...w){let v=w[0];if(arguments.length===0)return Vt;if(typeof v=="string"&&arguments.length===1)return r[Me(v)||v];let O=si(...w);if(!O.id||!O.prop)return Vt;let N=Me(O.id),z=O.prop,ae=z.merge===!0?r[N]:void 0;r[N]=Lr(z,ae||Vt),d[N]=$e(N),z.maker&&ee(d,z.maker)}function E(w,v){let O,N=v;if(typeof w=="string"){if(O=w,N===void 0)return t[O]}else{let me=w;O=me.displayName||me.name,N=w}if(!O||!N)return;let z=Me(O),ae=Bt(O);t[O]=N,t[z]=N,t[ae]=N,delete m.aliasMap[O],delete m.aliasMap[z],delete m.aliasMap[ae],delete r[O],delete r[z],delete r[ae];let oe=N.abFormParser;oe&&T(O,oe)}function k(){return Lh(G,t,n)}function V(w,v){let O=k();return l.createApp({data(){return l.reactive({rule:w,option:v})},render(){return l.h(O,M({ref:"fc"},this.$data))}})}function q(){return Xn}function U(w,v){let O=Reflect.get(w,"install");return j.Function(O)?O(x,v):typeof w=="function"&&w(x,v),this}let x=function(w,v){let O=V(w,v||{});a.forEach(z=>{te(()=>z(x,O))});let N=document.createElement("div");return((v==null?void 0:v.el)||document.body).appendChild(N),O.mount(N).$refs.fc.fapi};Lr(x,y);function _(w){let v=M({},e);return w?v.inherit={components:t,parsers:r,directives:n,modelFields:i,providers:u,useApps:a,maker:d,formulas:g,loadData:p}:delete v.inherit,pl(v)}function F(w,v){i[w]=v}function A(w,v){g[w]=v}function C(w,v){let O=o[w]||{},N=O.parsers||{};v.parsers&&Object.keys(v.parsers).forEach(z=>{N[z]=Lr(v.parsers[z],Vt)}),v.name=w,o[w]=ne(M(M({},O),v),{parsers:N})}function B(w){w&&Object.keys(Ie).forEach(v=>{(Array.isArray(Ie[v])?Ie[v]:[Ie[v]]).forEach(O=>{O.bus.$emit("$loadData."+w)})})}function I(w,v){pt(p,w,v),B(w)}function W(w,v){let O=(...N)=>te(()=>v(...N));O._driver=!0,I(w,O)}function Z(w,v){let O=(w||"").split(".");w=O.shift()||"";let N=O.join(".");if(ue(p,w)||(p[w]=fl),p[w]!==fl){let z=p[w];return z&&z._driver?z=z(N):O.length&&(z=Fe(z,O)),z==null||z===""?v:z}return v}function X(w){c.push(w)}function P(w){delete p[w],B(w)}function H(w,v){s.push({name:w,callback:v})}function G(w){ee(this,{id:Dg++,create:x,vm:w,manager:vm(e.manager||{}),parsers:r,providers:u,modelFields:i,formulas:g,isMobile:h,rules:w.props.rule,name:w.props.name||Pr(),inFor:w.props.inFor,prop:{components:t,directives:n},get:null,drivers:o,renderDriver:null,refreshData:B,loadData:p,CreateNode:m,bus:nh(),unwatch:new Set,options:l.ref({}),extendApiFn:c,fetchCache:new WeakMap,tmpData:l.reactive({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),s.forEach(v=>{this.bus.$on(v.name,v.callback)}),l.nextTick(()=>{l.watch(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),ee(w.appContext.components,t),ee(w.appContext.directives,n),this.$handle=Reflect.construct(et,[this]),this.name&&(this.inFor?(Ie[this.name]||(Ie[this.name]=[]),Ie[this.name].push(this)):Ie[this.name]=this)}G.isMobile=h,ee(G.prototype,{init(){this.isSub()&&this.unwatch.add(l.watch(()=>this.vm.setupState.parent.setupState.fc.options.value,()=>{this.initOptions(),this.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver=typeof this.vm.props.driver=="object"?this.vm.props.driver:this.drivers[String(this.vm.props.driver)]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targeabFormDriver(w,...v){this.bus.$emit(w,...v);let O=this.renderDriver;if(O&&O[w])return te(()=>O[w](...v))},t(w,v,O){let N=O?O("$t."+w):this.globalLanguageDriver(w);return N!=null||(N=""),N&&v&&Object.keys(v).forEach(z=>{let ae=RegExp(`{${z}}`,"g");N=N.replace(ae,v[z])}),N},globalDataDriver(w){var ae;let v=w.split("."),O=v.shift()||"",N=(ae=this.options.value)==null?void 0:ae.globalData,z=N==null?void 0:N[O];if(z){if(z.type==="static")return Fe(z.data,v);{let oe,me=this.fetchCache.get(z);if(me){if(me.status&&(oe=Fe(me.data,v)),!me.loading)return oe;me.loading=!1,this.fetchCache.set(z,me)}else this.fetchCache.set(z,{status:!1});let Ae=ft(()=>{De();let we=this.fetchCache.get(z);N&&Object.values(N).indexOf(z)!==-1?(we&&(we.loading=!0,this.fetchCache.set(z,we)),this.bus.$emit("$loadData.$globalData."+O)):this.fetchCache.delete(z)},z.wait||600),Te=we=>{this.fetchCache.set(z,{status:!0,data:we}),this.bus.$emit("$loadData.$globalData."+O)},De=this.watchLoadData((we,Be)=>{if(Be&&z.watch===!1)return De();if(Be){Ae();return}let He=this.$handle.loadFetchVar(sa(z),we);He.targetRule=this.targetRule,this.$handle.api.fetch(He).then(At=>{Te(At)}).catch(()=>{Te(null)})});return z.watch===!1&&De(),oe}}},getLocale(){let w=this.vm.setupState.top.props.locale;return w&&typeof w=="object"?w.name:typeof w=="string"?w:"zh-cn"},globalLanguageDriver(w){var z;let v=this.vm.setupState.top.props.t,O=this.vm.setupState.top.props.locale,N;return v&&(N=te(()=>v(w))),N==null&&O&&typeof O=="object"&&(N=Fe(O,w)),N!=null||(N=Fe((((z=this.options.value)==null?void 0:z.language)||{})[this.getLocale()]||{},w),N!=null||(N=Rg(w))),N},globalVarDriver(w){var z,ae;let v=w.split("."),O=v.shift()||"",N=(ae=(z=this.options.value)==null?void 0:z.globalVariable)==null?void 0:ae[O];if(N){let oe=j.Function(N)?N:Qe(N.handle);if(oe)return Fe(oe((...me)=>this.$handle.api.getData(...me),this.$handle.api),v)}},setData(w,v,O){O?I(w,v):(pt(this.vm.setupState.top.setupState.fc.tmpData,w,v),this.bus.$emit("$loadData."+w))},getLoadData(w,v){let O=null;if(w!=null){let N=w.split("."),z=N.shift();if(O=Fe(this.vm.setupState.top.setupState.fc.tmpData,w),O!=null)return O;if(z==="$topForm")O=this.$handle.api.top.formData(!0);else if(z==="$scopeForm")O=this.$handle.api.scope.formData(!0);else if(z==="$form")O=this.$handle.api.formData(!0);else if(z==="$options")O=this.options.value;else if(z==="$globalData")O=this.globalDataDriver(N.join(".")),N=[];else if(z==="$var")O=this.globalVarDriver(N.join(".")),N=[];else if(z==="$locale")O=this.getLocale(),N=[];else if(z==="$t")O=this.globalLanguageDriver(N.join(".")),N=[];else{if(z==="$preview")return this.$handle.preview;O=Z(w),N=[]}O&&N.length&&(O=Fe(O,N))}return O==null||O===""?v:O},watchLoadData(w,v){let O={},N=oe=>{this.get||(this.get=z),te(()=>{w(z,oe)}),this.get===z&&(this.get=void 0)},z=(oe,me)=>{let Ae;if(typeof oe=="object"&&(Ae=oe.getValue,oe=oe.id),O[oe])return O[oe].val;let Te=l.computed(()=>Ae?Ae():this.getLoadData(oe,me)),De=oe.split("."),we=De.shift(),Be=De.shift()||"",He=ft(()=>{let ze=Ae?Ae():this.getLoadData(oe,me);if(O[oe])((ze instanceof Function||j.Object(ze)||Array.isArray(ze))&&ze===O[oe].val||JSON.stringify(ze)!==JSON.stringify(O[oe].val))&&(O[oe].val=ze,N(!0));else return},v||0),At=l.watch(Te,ze=>{He()});return this.bus.$on("$loadData."+we,He),Be&&this.bus.$on("$loadData."+we+"."+Be,He),O[oe]={fn:()=>{this.bus.$off("$loadData."+we,He),Be&&this.bus.$off("$loadData."+we+"."+Be,He),At()},val:Te.value},Te.value};N(!1);let ae=()=>{Object.keys(O).forEach(oe=>O[oe].fn()),O={},this.unwatch.delete(ae)};return this.unwatch.add(ae),ae},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let w=M({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Ct(f)),v=this.isSub();v&&(w=this.mergeOptions(w,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),w=this.mergeOptions(w,this.vm.props.option);let O=this.api();this.targeabFormDriver("initOptions",w,{api:O,isSubForm:v}),this.updateOptions(w)},mergeOptions(w,v,O){return v=M({},v||{}),O&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(N=>{delete v[N]}),v.global&&(w.global=zh(w.global,v.global),delete v.global),this.$handle.$manager.mergeOptions([v],w),w},updateOptions(w){this.options.value=this.mergeOptions(this.options.value,w),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api(){return this.$handle.api},render(){return this.$handle.render()},mounted(){this.$handle.mounted()},unmount(){if(te(()=>this.$handle.lifecycle("beforeUnmount")),this.name)if(this.inFor){let w=Ie[this.name].indexOf(this);Ie[this.name].splice(w,1)}else delete Ie[this.name];s.forEach(w=>{this.bus.$off(w.name,w.callback)}),this.tmpData={},[...this.unwatch].forEach(w=>w()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit("next-tick",this.$handle.api))}});function ie(w){ee(w,{version:e.version,ui:e.ui,isMobile:h,extendApi:X,getData:Z,setDataDriver:W,setData:I,removeData:P,refreshData:B,maker:d,component:E,directive:$,setModelField:F,seabFormula:A,setDriver:C,register:L,$vnode:q,parser:T,use:U,factory:_,componentAlias:R,copyRule:Da,copyRules:Pa,mergeRule:st,fetch:Ya,$form:k,parseFn:Qe,parseJson:la,toJson:nr,useApp:S,getApi:b,on:H})}function pe(w){ee(w,{create:x,install(v,O){f=M(M({},f),O||{});let N=`_installedAbForm${h?"Mobile":""}_${e.ui}`,z=v;if(z[N]===!0)return;z[N]=!0;let ae=function(me,Ae={}){return x(me,Ae)};ie(ae),v.config.globalProperties.$abForm=ae;let oe=k();v.component(oe.name,oe),a.forEach(me=>{te(()=>me(w,v))})}})}if(ie(y),pe(y),W("$cookie",Fm),W("$localStorage",Am),W("$sessionStorage",Om),m.use({fragment:"fcFragment"}),e.install&&x.use(e),S((w,v)=>{v.mixin({props:["abFormInject"],emits:["fc.updateValue","fc.el"]})}),T(Tm),e.inherit){let w=e.inherit;w.components&&ee(t,w.components),w.parsers&&ee(r,w.parsers),w.directives&&ee(n,w.directives),w.modelFields&&ee(i,w.modelFields),w.providers&&ee(u,w.providers),w.useApps&&ee(a,w.useApps),w.maker&&ee(d,w.maker),w.loadData&&ee(p,w.loadData),w.formulas&&ee(g,w.formulas)}let K=k();return Lr(K,y),Object.defineProperties(K,{fetch:{get(){return y.fetch},set(w){y.fetch=w}}}),K.util=y,K}const{t:tt}=Ke(),{isZhCN:Pg}=Ce(),Ig=["rgba(1, 1, 1, 0)","#45b787","#21532fff","#6e9bc5","#2775b6","#F26666","#D95970","#ECD2B9","#BF9D8A","#ECDEC0","#D0AC57","#e0e0e0","#beb6b6","#918883","#F2F2F2","#ececec","#2E3032","#182327","rgba(0, 0, 0, 0.5)"],hl={hidden:{hidden:!0},datePicker:{props:{valueFormat:"x"}},timePicker:{props:{format:"HH:mm",valueFormat:"HH:mm"}},select:{props:{showKey:!0,showCode:!0}},treeSelect:{props:{defaultExpandAll:!0,expandOnClickNode:!1}},treeSelectMultiple:{props:{multiple:!0,type:"checked",showCheckbox:!0}},inputNumber:{align:"right"},inputCurrency:{align:"right",children:[{type:"span",slot:"prefix",children:[Pg()?"¥":"$"]}]},inputPercent:{align:"right",children:[{type:"span",slot:"suffix",children:["%"]}]},switch:{align:"center"},colorPicker:{props:{showAlpha:!0,predefine:Ig}},divider:{props:{contentPosition:"left"}}};function ml(e,t={}){const{type:r,disabledDate:n,shortcuts:i}=e||{};let o=hl[r||""];if(r==="datePicker"){if(n===!0&&(o=Mr({},o,{props:{disabledDate:jg}})),i===!0){const p=Je(e,"props.type")==="daterange";o=Mr({},o,{props:{shortcuts:p?Vg:Ng}})}}else r==="treeSelect"&&Je(e,"props.multiple")&&(o=Mr({},o,hl.treeSelectMultiple));if(!o)return e;const a=t.includeChildren!==!1,f=o,{children:s}=f,c=xr(f,["children"]),d=Mr({},a?o:c,e);return a&&s?ne(M({},d),{children:Bg(s,e.children)}):d}function Bg(e,t){if(t===void 0)return e;if(!Array.isArray(t))return t;const r=new Set(t.map(n=>n==null?void 0:n.slot).filter(Boolean));return[...e.filter(n=>!n.slot||!r.has(n.slot)),...t]}function jg(e){return e.getTime()>Date.now()}const Ng=[{text:tt("today"),value:()=>de().startOf("day").valueOf()},{text:tt("yesterday"),value:()=>de().subtract(1,"days").startOf("day").valueOf()},{text:tt("lastWeek"),value:()=>de().subtract(1,"weeks").startOf("week").valueOf()}],Vg=[{text:tt("today"),value:()=>[de().startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("yesterday"),value:()=>[de().subtract(1,"days").startOf("day").valueOf(),de().subtract(1,"days").endOf("day").valueOf()]},{text:tt("lastWeek"),value:()=>[de().subtract(1,"weeks").startOf("week").valueOf(),de().subtract(1,"weeks").endOf("week").valueOf()]},{text:tt("last7"),value:()=>[de().subtract(7,"days").startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("last30"),value:()=>[de().subtract(30,"days").startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("thisMonth"),value:()=>[de().startOf("month").valueOf(),de().endOf("day").valueOf()]},{text:tt("thisYear"),value:()=>[de().startOf("year").valueOf(),de().endOf("day").valueOf()]}];function gl(e,t=[]){var i;const r=[],n=new Map;for(const o of e){const a=typeof o.group=="string"?o.group?[o.group]:[]:(i=o.group)!=null?i:[];if(!Array.isArray(a)||a.some(d=>typeof d!="string"||!d.trim()))throw new TypeError("Table column group must be a non-empty name or an array of non-empty names.");if(!a.length){r.push(o);continue}let s=r;const c=[];let u;for(const d of a){c.push(d);const f=JSON.stringify(c);let h=n.get(f);h||(h={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,c]))}`,title:d,children:[]},n.set(f,h),s.push(h)),u=h,s=h.children}u&&o.groupAlign!==void 0&&(u.groupAlign=o.groupAlign),s.push(o)}return r}function Lg(e,t){const r=e.sortData;if(!r)return e;const n=new Map,i=new Set;function o(d,f){var h;for(const p of d){const m=p.getKey();m&&(n.set(m,f),p.defaultVisible===!1&&i.add(m),(h=p.children)!=null&&h.length&&o(p.children,m))}}o(t,null);const a=new Set;function s(d,f){return d.some(h=>{if(!h||typeof h.k!="string"||h.c!==void 0&&!Array.isArray(h.c))return!0;const{k:p,c:m}=h;return a.has(p)||n.has(p)&&n.get(p)!==f?!0:(a.add(p),m?s(m,p):!1)})}if(!(Array.isArray(r)?s(r,null):typeof r!="object"||Object.keys(r).some(d=>n.has(d)&&n.get(d)!==null)))return e;const u=e.visibleData&&M({},e.visibleData);if(u)for(const d of i)u[d]===!0&&delete u[d];return ne(M({},e),{sortData:void 0,visibleData:u})}function Hg(e){const t=l.reactive(new Map),r=new WeakMap,n=new Set;function i(c){return typeof c.getRule=="function"?c.getRule():c}function o(c){let u=r.get(c);if(!u){const f={};u={rule:c,pending:f,getPending(h,p){return f[h]&&f[h].value||p},setPending(h,p,m){f[h]={origin:p,value:l.reactive(m)}}},r.set(c,u)}const d=Ja(u,c.options,{onLoad:f=>t.set(c,f),onUpdate:f=>t.set(c,f),onReload:()=>{t.set(c,[]),o(c)}});t.set(c,d)}function a(c,u){for(const d of c){const f=i(d);u.has(f)||(u.add(f),typeof f.options=="function"?o(f):t.delete(f),Array.isArray(f.children)&&a(f.children,u))}}l.watchEffect(()=>{const c=new Set;a(e(),c);for(const u of n)c.has(u)||(n.delete(u),t.delete(u));c.forEach(u=>n.add(u))});function s(c,u,d){const f=i(c),h=t.get(f),p=[...u,f.field?`field:${f.field}`:`index:${d}`],m=Array.isArray(f.children)?gl(f.children.map((b,S)=>s(b,p,S)),p):f.children,g=Array.isArray(m)&&m.some((b,S)=>b!==f.children[S]);let y=f;return(typeof f.options=="function"||g)&&(y=ne(M(M({},f),typeof f.options=="function"?{options:h}:{}),{children:m})),ml(y,{includeChildren:!1})}return l.computed(()=>gl(e().map((c,u)=>s(c,[],u))))}function yl(e,t){for(const r of e){if(r.field===t)return r;if(r.children){const n=yl(r.children,t);if(n)return n}}}function zg(e,t,r,n){var o;if(!r)return e;const i=(o=r.footerFormatter)!=null?o:Yn(r).formatter;return i?i({cellValue:e,row:t,column:n!=null?n:r}):e}function Ug(e,t,r,n,i){var h;if(typeof e.labelField!="string"||!e.labelField.trim()||!Array.isArray(e.fields))throw new TypeError("AbTable footerSummary requires a labelField and a fields array.");const o=new Set([e.labelField]),a=[],s=[],c=p=>{if(!p.trim()||o.has(p)||["__proto__","constructor","prototype"].includes(p))throw new TypeError(`AbTable footerSummary has an invalid or duplicate field: "${p}".`);o.add(p)};if(["__proto__","constructor","prototype"].includes(e.labelField))throw new TypeError("AbTable footerSummary has an invalid labelField.");for(const p of e.fields)if(typeof p=="string")c(p),a.push(p);else{if(!p||typeof p!="object"||Array.isArray(p)||!Object.keys(p).length)throw new TypeError("AbTable footerSummary fields must be field names or objects of callbacks.");for(const[m,g]of Object.entries(p)){if(c(m),typeof g!="function")throw new TypeError(`AbTable footerSummary handler for "${m}" must be a function.`);s.push([m,g])}}const u={};for(const p of a){let m=null;for(const g of t){const y=g[p];if(!(y==null||typeof y=="string"&&!y.trim())){if(typeof y!="number"&&typeof y!="string"||!Number.isFinite(Number(y)))throw new TypeError(`AbTable footerSummary field "${p}" must contain numbers or numeric strings.`);if(m=(m!=null?m:0)+Number(y),!Number.isFinite(m))throw new RangeError(`AbTable footerSummary total for "${p}" is not finite.`)}}u[p]=m}for(const[p,m]of s){const g=t.length?m({rows:t,totals:Object.freeze(M({},u))}):null;if(g!==null&&(typeof g!="number"||!Number.isFinite(g)))throw new TypeError(`AbTable footerSummary handler for "${p}" must return a finite number or null.`);u[p]=g}const d=M({[e.labelField]:(h=e.label)!=null?h:n},u),f=M({},d);for(const[p,m]of Object.entries(u))f[p]=m===null?"-":zg(m,d,yl(r,p),i(p));return f}const bl=l.defineComponent({name:"AbTable",__name:"ab-table",props:l.mergeModels({id:{},title:{},rule:{default:()=>[]},queryHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},pagerClassName:{},pagerConfig:{},pagerEnable:{type:Boolean,default:!0},locale:{default:"zh-cn"},idField:{},idFieldTable:{},permiPrefix:{},compactMode:{type:Boolean},parentIdField:{},accordion:{type:Boolean},hasChildField:{},lazyMethod:{},isCurrent:{type:Boolean},dragable:{type:Boolean},absDragable:{type:Boolean},rowClassName:{},headerCellClassName:{},cellClassName:{},rowStyle:{},editable:{type:Boolean},singleSelect:{type:Boolean},multiSelect:{type:Boolean},validRules:{},sortable:{type:Boolean,default:!0},sortLocally:{type:Boolean},footerSummary:{},maxHeight:{},offsetTop:{},autoHeight:{type:Boolean},readonly:{type:Boolean,default:!0}},{query:{},queryModifiers:{}}),emits:l.mergeModels(["update:modelValue","changed","cellClick","current-change","after-loaded","operated"],["update:query"]),setup(e,{expose:t,emit:r}){var Ts;const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(null),c=l.ref(),u=l.ref();l.inject("abToolbarRef",null);const d=l.ref([]),f=l.ref(i.id||String((Ts=l.getCurrentInstance())==null?void 0:Ts.uid)||a.path),h=Hg(()=>i.rule),p=l.computed(()=>{const J=[];return i.editable&&zo(i.rule||[],Q=>Q.field&&Q.edit?J.push(Q.field):void 0),J}),m=({column:J})=>{var Q;return typeof i.headerCellClassName=="function"?i.headerCellClassName({column:J}):(Q=p.value)!=null&&Q.includes(J.field)?"primary":null},g=l.computed(()=>!(!i.readonly||i.multiSelect||i.singleSelect)),{wsCache:y}=Ce(),b=l.computed(()=>y.getCurrentSize||"default"),S=l.computed(()=>$a(b.value)),$={useKey:!0,resizable:!0},L=l.reactive({useKey:!0,isHover:!0,isCurrent:i.isCurrent,drag:i.dragable}),R=i.compactMode?{padding:!1,height:30}:void 0,T=i.dragable?l.reactive({trigger:"row",showGuidesStatus:!0}):void 0,E=l.reactive({immediate:!0,storage:!0,restoreStore:({$table:J,storeData:Q})=>{const re=Lg(Q,J.getFullColumns());return re!==Q&&console.warn("[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored."),re}}),k=l.reactive({filename:`${i.title||(a==null?void 0:a.meta.title)}_${de().format("YYYYMMDD")}`,columns:Uo(vt(i.rule,J=>J.field!==fe.OPERATE),J=>({field:J.field}))}),V=(J,Q)=>ye(this,null,function*(){var ce;const re=u.value,xe=vt(i.rule,le=>(le==null?void 0:le.field)&&(le==null?void 0:le.field)!=="operate"&&!le.hidden),be=!!i.parentIdField&&((ce=w.value)==null?void 0:ce.expandAll);if(Q){const le=re==null?void 0:re.getCheckboxRecords();if(!(le==null?void 0:le.length))return;re==null||re.exportData({data:le,columns:xe,isAllExpand:be,filename:J})}else re==null||re.exportData({columns:xe,isAllExpand:be,filename:J})}),q=J=>{var Q,re;return(re=(Q=u.value)==null?void 0:Q.getColumnByField)==null?void 0:re.call(Q,J)},U=l.computed(()=>i.footerSummary?[Ug(i.footerSummary,d.value,h.value,o("table.total"),q)]:[]),x=l.useModel(e,"query"),_=l.ref(0),F=l.ref(1),A=l.ref(10),C=l.ref(""),B=l.ref(""),I=l.ref(""),W=l.computed(()=>{var J,Q,re,xe,be,ce,le,Re,Ue,qe;return{pageNo:(Q=(J=i.pagerConfig)==null?void 0:J.pageNoField)!=null?Q:"pageNo",pageSize:(xe=(re=i.pagerConfig)==null?void 0:re.pageSizeField)!=null?xe:"pageSize",sortFieldTable:(ce=(be=i.pagerConfig)==null?void 0:be.sortFieldTableField)!=null?ce:"sortFieldTable",sortField:(Re=(le=i.pagerConfig)==null?void 0:le.sortFieldField)!=null?Re:"sortField",sortType:(qe=(Ue=i.pagerConfig)==null?void 0:Ue.sortTypeField)!=null?qe:"sortType"}}),Z=l.computed(()=>{var J;return((J=i.pagerConfig)==null?void 0:J.layouts)||["Home","PrevJump","PrevPage","Number","NextPage","NextJump","End","Sizes","FullJump","Total"]});function X(){var Re,Ue,qe,mt,Ot,vr;const J=(Re=x.value)!=null?Re:{},Q=W.value,re=(Ue=J[Q.pageNo])!=null?Ue:1,xe=(qe=J[Q.pageSize])!=null?qe:10,be=(mt=J[Q.sortFieldTable])!=null?mt:"",ce=(Ot=J[Q.sortField])!=null?Ot:"",le=(vr=J[Q.sortType])!=null?vr:"";if(!Number.isInteger(re)||Number(re)<1||!Number.isInteger(xe)||Number(xe)<1)throw new TypeError("AbTable pageNo and pageSize must be positive integers.");if(typeof be!="string"||typeof ce!="string"||typeof le!="string")throw new TypeError("AbTable sort fields must be strings.");F.value=Number(re),A.value=Number(xe),C.value=be,B.value=ce,I.value=le}const P=re=>ye(this,[re],function*({currentPage:J,pageSize:Q}){F.value=J,A.value=Q,yield sn()}),H=l.reactive({trigger:"cell",remote:!i.sortLocally}),G=xe=>ye(this,[xe],function*({field:J,order:Q,column:re}){var be,ce,le,Re,Ue;if(!Q)C.value=(be=i.idFieldTable)!=null?be:"",B.value=i.idField||"id",I.value="desc";else{const qe=(Re=(le=(ce=re.params)==null?void 0:ce.sortFieldTable)!=null?le:i.idFieldTable)!=null?Re:"",mt=((Ue=re.params)==null?void 0:Ue.sortField)||J;if(typeof qe!="string"||typeof mt!="string")throw new TypeError("AbTable column sortFieldTable and sortField must be strings.");C.value=qe,B.value=mt.replace(/[A-Z]/g,Ot=>"_"+Ot.toLowerCase()),I.value=Q}yield Pi()}),ie=l.computed(()=>i.editable&&!g.value?{trigger:"click",mode:"row",showStatus:!0}:void 0),pe=l.ref(i.editable),K=l.computed(()=>!i.parentIdField),w=l.computed(()=>{if(!i.parentIdField)return;const J={transform:!0,accordion:i.accordion,rowField:i.idField||"id",parentField:i.parentIdField||"parentId",hasChildField:i.hasChildField||"hasChildren",expandAll:!0};return typeof i.lazyMethod=="function"&&(J.lazy=!0,J.loadMethod=i.lazyMethod),J}),v=i.singleSelect?{labelField:"name",trigger:"row"}:void 0,O=Pp(J=>n("current-change",{newValue:J}),100),N=({row:J,column:Q})=>{if((Q==null?void 0:Q.field)===fe.OPERATE)return;const re=u.value;(!i.editable||g.value)&&(re==null||re.clearCheckboxRow()),re==null||re.setCheckboxRow(J,!0),n("cellClick",{row:J,column:Q})},z=()=>{var Q;const J=(Q=u.value)==null?void 0:Q.getRadioRecord();O(J)},ae=l.computed(()=>i.multiSelect||typeof i.multiSelect=="undefined"&&i.editable);L.isCurrent=ae.value||i.singleSelect||i.absDragable||i.isCurrent;const oe=l.reactive({highlight:i.multiSelect&&i.editable,range:!i.parentIdField}),me=()=>{var Q;const J=(Q=u.value)==null?void 0:Q.getCheckboxRecords();O(J)},Ae=({newValue:J,column:Q})=>{(Q==null?void 0:Q.field)!==fe.OPERATE&&O(J)};let Te=l.ref(i.maxHeight||0);const De={mini:36,small:40,medium:44,large:48};let we=De[S.value||"medium"]||De.medium;const Be=l.ref([10,15,20,50,100]),He=()=>{var Ue,qe,mt,Ot,vr,Es,ks,_s,Fs;if(!i.autoHeight){i.maxHeight&&(Te.value=i.maxHeight);return}(qe=(Ue=u.value)==null?void 0:Ue.cellConfig)!=null&&qe.height&&(we=u.value.cellConfig.height);const J=(mt=s.value)==null?void 0:mt.parentElement,Q=((vr=(Ot=J==null?void 0:J.querySelector(".ab-toolbar"))==null?void 0:Ot.getBoundingClientRect())==null?void 0:vr.height)||0,re=(Ta(i.rule)||0)*we,xe=((_s=(ks=(Es=c.value)==null?void 0:Es.$el)==null?void 0:ks.getBoundingClientRect())==null?void 0:_s.height)||0,be=(((Fs=J==null?void 0:J.getBoundingClientRect())==null?void 0:Fs.height)||500)-Q-xe;if(i.offsetTop){const Ii=window.innerHeight-(i.offsetTop||0);Te.value=Math.max(be,Ii)}else Te.value=be;if(Te.value<=0)return;const ce=Te.value-re-(i.pagerEnable?we*1.5:0);let le=Math.min(Math.max(Math.round(ce/we),10),100);i.footerSummary&&(le-=1);const Re=[...Be.value];Re.includes(le)||(Re.push(le),Re.sort((Ii,Kw)=>Ii-Kw)),Be.value=Re,A.value=le,console.warn("calculateTableHeight: ",Ta(i.rule))},At=l.ref(!1);let ze=0;function sn(){return ye(this,null,function*(){var Q,re;if(!i.queryHandler)return;const J=++ze;At.value=!0;try{const xe=W.value,be=ne(M({},x.value),{[xe.pageNo]:F.value,[xe.pageSize]:A.value,[xe.sortFieldTable]:C.value,[xe.sortField]:B.value,[xe.sortType]:I.value}),ce=yield i.queryHandler(be),le=Array.isArray(ce)?ce:(Q=ce==null?void 0:ce.data)!=null?Q:ce==null?void 0:ce.list;if(!Array.isArray(le))throw new TypeError("AbTable queryHandler must return an array or an object containing a data or list array.");if(J!==ze)return;d.value=le,_.value=Array.isArray(ce)?ce.length:(re=ce.total)!=null?re:le.length}finally{J===ze&&(At.value=!1)}})}l.onMounted(()=>ye(this,null,function*(){X(),He(),yield sn()}));function Jw(){return ye(this,null,function*(){F.value=1,yield sn()})}function Pi(){return ye(this,null,function*(){yield sn()})}return t({reload:Jw,refresh:Pi,resize:()=>He(),tableRef:u,exportData:V}),(J,Q)=>{const re=l.resolveComponent("vxe-table"),xe=l.resolveComponent("vxe-pager");return l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:s,class:"ab-table"},[l.createVNode(re,{ref_key:"tableRef",ref:u,id:f.value,data:d.value,stripe:K.value,loading:At.value,"column-config":$,"row-config":L,"row-drag-config":l.unref(T),"cell-config":l.unref(R),"custom-config":E,"tree-config":w.value,"row-class-name":e.rowClassName,"header-cell-class-name":m,"cell-class-name":e.cellClassName,"row-style":e.rowStyle,border:"inner",size:S.value,"max-height":l.unref(Te),"edit-config":ie.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":pe.value,"show-overflow":"","show-header-overflow":"","show-footer-overflow":"","auto-resize":"","show-footer":!!e.footerSummary,"footer-data":U.value,"sort-config":H,onSortChange:G,"radio-config":l.unref(v),onRadioChange:z,"checkbox-config":oe,onCheckboxChange:me,onCheckboxAll:me,onCurrentChange:Ae,"export-config":k,onCellClick:N},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(be,ce)=>(l.openBlock(),l.createBlock(Nh,{key:be.field||ce,rule:be,idx:ce,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:Pi},null,8,["rule","idx","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))),128))]),_:1},8,["id","data","stripe","loading","row-config","row-drag-config","cell-config","custom-config","tree-config","row-class-name","cell-class-name","row-style","size","max-height","edit-config","edit-rules","keep-source","show-footer","footer-data","sort-config","radio-config","checkbox-config","export-config"]),e.pagerEnable?(l.openBlock(),l.createBlock(xe,{key:0,ref_key:"pagerRef",ref:c,"class-name":e.pagerClassName,"page-sizes":Be.value,"current-page":F.value,"onUpdate:currentPage":Q[0]||(Q[0]=be=>F.value=be),"page-size":A.value,"onUpdate:pageSize":Q[1]||(Q[1]=be=>A.value=be),total:_.value,size:S.value,layouts:Z.value,onPageChange:P},null,8,["class-name","page-sizes","current-page","page-size","total","size","layouts"])):l.createCommentVNode("",!0)],512)}}});/**
|
|
12
|
+
* (c) Iconify
|
|
13
|
+
*
|
|
14
|
+
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
15
|
+
* files at https://github.com/iconify/iconify
|
|
16
|
+
*
|
|
17
|
+
* Licensed under MIT.
|
|
18
|
+
*
|
|
19
|
+
* @license MIT
|
|
20
|
+
* @version 3.1.1
|
|
21
|
+
*/const wl=Object.freeze({left:0,top:0,width:16,height:16}),Yr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),dr=Object.freeze(M(M({},wl),Yr)),ci=Object.freeze(ne(M({},dr),{body:"",hidden:!1}));function qg(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function vl(e,t){const r=qg(e,t);for(const n in ci)n in Yr?n in e&&!(n in r)&&(r[n]=Yr[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Yg(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(r[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=n[a]&&n[a].parent,c=s&&o(s);c&&(i[a]=[s].concat(c))}return i[a]}return Object.keys(r).concat(Object.keys(n)).forEach(o),i}function Gg(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=vl(n[s]||i[s],o)}return a(t),r.forEach(a),vl(e,o)}function Wg(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),r.push(i)});const n=Yg(e);for(const i in n){const o=n[i];o&&(t(i,Gg(e,i,o)),r.push(i))}return r}const fr=/^[a-z0-9]+(-[a-z0-9]+)*$/,zt=(e,t,r,n="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),c=i.pop(),u={provider:i.length>0?i[0]:n,prefix:c,name:s};return t&&!Gr(u)?null:u}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:n,prefix:a.shift(),name:a.join("-")};return t&&!Gr(s)?null:s}if(r&&n===""){const s={provider:n,prefix:"",name:o};return t&&!Gr(s,r)?null:s}return null},Gr=(e,t)=>e?!!((e.provider===""||e.provider.match(fr))&&(t&&e.prefix===""||e.prefix.match(fr))&&e.name.match(fr)):!1,Jg=M({provider:"",aliases:{},not_found:{}},wl);function ui(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Kg(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ui(e,Jg))return null;const r=t.icons;for(const i in r){const o=r[i];if(!i.match(fr)||typeof o.body!="string"||!ui(o,ci))return null}const n=t.aliases||Object.create(null);for(const i in n){const o=n[i],a=o.parent;if(!i.match(fr)||typeof a!="string"||!r[a]&&!n[a]||!ui(o,ci))return null}return t}const Wr=Object.create(null);function Qg(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function rt(e,t){const r=Wr[e]||(Wr[e]=Object.create(null));return r[t]||(r[t]=Qg(e,t))}function di(e,t){return Kg(t)?Wg(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Zg(e,t,r){try{if(typeof r.body=="string")return e.icons[t]=M({},r),!0}catch(n){}return!1}function Xg(e,t){let r=[];return(typeof e=="string"?[e]:Object.keys(Wr)).forEach(i=>{(typeof i=="string"&&typeof t=="string"?[t]:Object.keys(Wr[i]||{})).forEach(a=>{const s=rt(i,a);r=r.concat(Object.keys(s.icons).map(c=>(i!==""?"@"+i+":":"")+a+":"+c))})}),r}let fi=!1;function ey(e){return fi}function pr(e){const t=typeof e=="string"?zt(e,!0,fi):e;if(t){const r=rt(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function ty(e,t){const r=zt(e,!0,fi);if(!r)return!1;const n=rt(r.provider,r.prefix);return Zg(n,r.name,t)}function xl(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const r=e.prefix;if(!Gr({provider:t,prefix:r,name:"a"}))return!1;const n=rt(t,r);return!!di(n,e)}function ry(e){return!!pr(e)}function ny(e){const t=pr(e);return t?M(M({},dr),t):null}const Sl=Object.freeze({width:null,height:null}),Cl=Object.freeze(M(M({},Sl),Yr)),iy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,oy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function pi(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(iy);if(n===null||!n.length)return e;const i=[];let o=n.shift(),a=oy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*r)/r)}else i.push(o);if(o=n.shift(),o===void 0)return i.join("");a=!a}}const ay=e=>e==="unset"||e==="undefined"||e==="none";function Jr(e,t){const r=M(M({},dr),e),n=M(M({},Cl),t),i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(m=>{const g=[],y=m.hFlip,b=m.vFlip;let S=m.rotate;y?b?S+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):b&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let $;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:$=i.height/2+i.top,g.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:$=i.width/2+i.left,g.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}S%2===1&&(i.left!==i.top&&($=i.left,i.left=i.top,i.top=$),i.width!==i.height&&($=i.width,i.width=i.height,i.height=$)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=n.width,s=n.height,c=i.width,u=i.height;let d,f;a===null?(f=s===null?"1em":s==="auto"?u:s,d=pi(f,c/u)):(d=a==="auto"?c:a,f=s===null?pi(d,u/c):s==="auto"?u:s);const h={},p=(m,g)=>{ay(g)||(h[m]=g.toString())};return p("width",d),p("height",f),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:h,body:o}}const ly=/\sid="(\S+)"/g,sy="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let cy=0;function $l(e,t=sy){const r=[];let n;for(;n=ly.exec(e);)r.push(n[1]);if(!r.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(o=>{const a=typeof t=="function"?t(o):t+(cy++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const kt={local:!0,session:!0},Tl={local:new Set,session:new Set};let hi=!1;function uy(e){hi=e}const El="iconify2",hr="iconify",kl=hr+"-count",_l=hr+"-version",Fl=36e5,dy=168;function mi(e,t){try{return e.getItem(t)}catch(r){}}function gi(e,t,r){try{return e.setItem(t,r),!0}catch(n){}}function Al(e,t){try{e.removeItem(t)}catch(r){}}function yi(e,t){return gi(e,kl,t.toString())}function bi(e){return parseInt(mi(e,kl))||0}let Kr=typeof window=="undefined"?{}:window;function Ol(e){const t=e+"Storage";try{if(Kr&&Kr[t]&&typeof Kr[t].length=="number")return Kr[t]}catch(r){}kt[e]=!1}function Rl(e,t){const r=Ol(e);if(!r)return;const n=mi(r,_l);if(n!==El){if(n){const s=bi(r);for(let c=0;c<s;c++)Al(r,hr+c.toString())}gi(r,_l,El),yi(r,0);return}const i=Math.floor(Date.now()/Fl)-dy,o=s=>{const c=hr+s.toString(),u=mi(r,c);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>i&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,s))return!0}catch(d){}Al(r,c)}};let a=bi(r);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,yi(r,a)):Tl[e].add(s))}function Ml(){if(!hi){uy(!0);for(const e in kt)Rl(e,t=>{const r=t.data,n=t.provider,i=r.prefix,o=rt(n,i);if(!di(o,r).length)return!1;const a=r.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Dl(e,t){switch(e){case"local":case"session":kt[e]=t;break;case"all":for(const r in kt)kt[r]=t;break}}const wi=Object.create(null);function Pl(e,t){wi[e]=t}function vi(e){return wi[e]||wi[""]}function xi(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Qr=Object.create(null),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Zr=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Zr.push(mr.shift()):Zr.push(mr.pop());Qr[""]=xi({resources:["https://api.iconify.design"].concat(Zr)});function Il(e,t){const r=xi(t);return r===null?!1:(Qr[e]=r,!0)}function Xr(e){return Qr[e]}function fy(){return Object.keys(Qr)}let en=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}})();function py(e){en=e}function hy(){return en}function my(e,t){const r=Xr(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let i=0;r.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";n=r.maxURL-i-r.path.length-o.length}return n}function gy(e){return e===404}const yy=(e,t,r)=>{const n=[],i=my(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return r.forEach((c,u)=>{s+=c.length+1,s>=i&&u>0&&(n.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=c.length),a.icons.push(c)}),n.push(a),n};function by(e){if(typeof e=="string"){const t=Xr(e);if(t)return t.path}return"/"}const wy={prepare:yy,send:(e,t,r)=>{if(!en){r("abort",424);return}let n=by(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),c=new URLSearchParams({icons:s});n+=o+".json?"+c.toString();break}case"custom":{const o=t.uri;n+=o.slice(0,1)==="/"?o.slice(1):o;break}default:r("abort",400);return}let i=503;en(e+n).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{r(gy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?r("abort",o):r("next",i)});return}setTimeout(()=>{r("success",o)})}).catch(()=>{r("next",i)})}};function vy(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let n={provider:"",prefix:"",name:""};return e.forEach(i=>{if(n.name===i.name&&n.prefix===i.prefix&&n.provider===i.provider)return;n=i;const o=i.provider,a=i.prefix,s=i.name,c=r[o]||(r[o]=Object.create(null)),u=c[a]||(c[a]=rt(o,a));let d;s in u.icons?d=t.loaded:a===""||u.missing.has(s)?d=t.missing:d=t.pending;const f={provider:o,prefix:a,name:s};d.push(f)}),t}function Bl(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(i=>i.id!==t))})}function xy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==i)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:n,prefix:i,name:u});else if(e.missing.has(u))a.missing.push({provider:n,prefix:i,name:u});else return r=!0,!0;return!1}),a.pending.length!==s&&(r||Bl([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Sy=0;function Cy(e,t,r){const n=Sy++,i=Bl.bind(null,r,n);if(!t.pending.length)return i;const o={id:n,icons:t,callback:e,abort:i};return r.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function $y(e,t=!0,r=!1){const n=[];return e.forEach(i=>{const o=typeof i=="string"?zt(i,t,r):i;o&&n.push(o)}),n}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ey(e,t,r,n){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let T=e.resources.slice(0);for(a=[];T.length>1;){const E=Math.floor(Math.random()*T.length);a.push(T[E]),T=T.slice(0,E).concat(T.slice(E+1))}a=a.concat(T)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let c="pending",u=0,d,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function m(){f&&(clearTimeout(f),f=null)}function g(){c==="pending"&&(c="aborted"),m(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function y(T,E){E&&(p=[]),typeof T=="function"&&p.push(T)}function b(){return{startTime:s,payload:t,status:c,queriesSent:u,queriesPending:h.length,subscribe:y,abort:g}}function S(){c="failed",p.forEach(T=>{T(void 0,d)})}function $(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function L(T,E,k){const V=E!=="success";switch(h=h.filter(q=>q!==T),c){case"pending":break;case"failed":if(V||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){d=k,S();return}if(V){d=k,h.length||(a.length?R():S());return}if(m(),$(),!e.random){const q=e.resources.indexOf(T.resource);q!==-1&&q!==e.index&&(e.index=q)}c="completed",p.forEach(q=>{q(k)})}function R(){if(c!=="pending")return;m();const T=a.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{m(),c==="pending"&&($(),S())},e.timeout);return}S();return}const E={status:"pending",resource:T,callback:(k,V)=>{L(E,k,V)}};h.push(E),u++,f=setTimeout(R,e.rotate),r(T,t,E.callback)}return setTimeout(R),b}function jl(e){const t=M(M({},Ty),e);let r=[];function n(){r=r.filter(s=>s().status==="pending")}function i(s,c,u){const d=Ey(t,s,c,(f,h)=>{n(),u&&u(f,h)});return r.push(d),d}function o(s){return r.find(c=>s(c))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:n}}function Nl(){}const Si=Object.create(null);function ky(e){if(!Si[e]){const t=Xr(e);if(!t)return;const r=jl(t),n={config:t,redundancy:r};Si[e]=n}return Si[e]}function Vl(e,t,r){let n,i;if(typeof e=="string"){const o=vi(e);if(!o)return r(void 0,424),Nl;i=o.send;const a=ky(e);a&&(n=a.redundancy)}else{const o=xi(e);if(o){n=jl(o);const a=e.resources?e.resources[0]:"",s=vi(a);s&&(i=s.send)}}return!n||!i?(r(void 0,424),Nl):n.query(t,i,r)().abort}function _y(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in kt)Rl(n,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function Fy(e,t){hi||Ml();function r(n){let i;if(!kt[n]||!(i=Ol(n)))return;const o=Tl[n];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=bi(i),!yi(i,a+1))return;const s={cached:Math.floor(Date.now()/Fl),provider:e.provider,data:t};return gi(i,hr+a.toString(),JSON.stringify(s))}t.lastModified&&!_y(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Ll(){}function Ay(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,xy(e)}))}function Oy(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=vi(r)))return;o.prepare(r,n,i).forEach(s=>{Vl(r,s,c=>{if(typeof c!="object")s.icons.forEach(u=>{e.missing.add(u)});else try{const u=di(e,c);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),Fy(e,c)}catch(u){console.error(u)}Ay(e)})})}))}const Ry=e=>{const r=rt(e.provider,e.prefix).pendingIcons;return!!(r&&r.has(e.name))},Ci=(e,t)=>{const r=$y(e,!0,ey()),n=vy(r);if(!n.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(n.loaded,n.missing,n.pending,Ll)}),()=>{c=!1}}const i=Object.create(null),o=[];let a,s;return n.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===s&&u===a)return;a=u,s=d,o.push(rt(u,d));const f=i[u]||(i[u]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,h=rt(u,d),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[u][d].push(f))}),o.forEach(c=>{const{provider:u,prefix:d}=c;i[u][d].length&&Oy(c,i[u][d])}),t?Cy(t,n,o):Ll},My=e=>new Promise((t,r)=>{const n=typeof e=="string"?zt(e,!0):e;if(!n){r(e);return}Ci([n||e],i=>{if(i.length&&n){const o=pr(n);if(o){t(M(M({},dr),o));return}}r(e)})});function Hl(e,t){const r=M({},e);for(const n in t){const i=t[n],o=typeof i;n in Sl?(i===null||i&&(o==="string"||o==="number"))&&(r[n]=i):o===typeof r[n]&&(r[n]=n==="rotate"?i%4:i)}return r}const tn=ne(M({},Cl),{inline:!1}),$i="iconify",Ti="iconify-inline",ht="iconifyData"+Date.now();let _t=[];function gr(e){for(let t=0;t<_t.length;t++){const r=_t[t];if((typeof r.node=="function"?r.node():r.node)===e)return r}}function zl(e,t=!1){let r=gr(e);return r?(r.temporary&&(r.temporary=t),r):(r={node:e,temporary:t},_t.push(r),r)}function Dy(){if(document.documentElement)return zl(document.documentElement);_t.push({node:()=>document.documentElement})}function Py(e){_t=_t.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function yr(){return _t}function Iy(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let br=null;const By={childList:!0,subtree:!0,attributes:!0};function Ul(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,br&&br(e)}))}function jy(e,t){if(!e.observer)return;const r=e.observer;if(!r.pendingScan)for(let n=0;n<t.length;n++){const i=t[n];if(i.addedNodes&&i.addedNodes.length>0||i.type==="attributes"&&i.target[ht]!==void 0){r.paused||Ul(e);return}}}function ql(e,t){e.observer.instance.observe(t,By)}function rn(e){let t=e.observer;if(t&&t.instance)return;const r=typeof e.node=="function"?e.node():e.node;!r||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(jy.bind(null,e)),ql(e,r),t.paused||Ul(e))}function Yl(){yr().forEach(rn)}function Gl(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ny(e){const t=br!==null;if(br!==e&&(br=e,t&&yr().forEach(Gl)),t){Yl();return}Iy(Yl)}function Ei(e){(e?[e]:yr()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const r=t.observer;if(r.paused++,r.paused>1||!r.instance)return;r.instance.disconnect()})}function Vy(e){if(e){const t=gr(e);t&&Ei(t)}else Ei()}function ki(e){(e?[e]:yr()).forEach(t=>{if(!t.observer){rn(t);return}const r=t.observer;if(r.paused&&(r.paused--,!r.paused)){const n=typeof t.node=="function"?t.node():t.node;if(n)r.instance?ql(t,n):rn(t);else return}})}function Ly(e){if(e){const t=gr(e);t&&ki(t)}else ki()}function Wl(e,t=!1){const r=zl(e,t);return rn(r),r}function Jl(e){const t=gr(e);t&&(Gl(t),Py(e))}function Hy(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const r=e.customisations,n=t.customisations;for(const i in tn)if(r[i]!==n[i])return!0;return!1}function zy(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(i){for(;i<0;)i+=4;return i%4}if(r===""){const i=parseInt(e);return isNaN(i)?0:n(i)}else if(r!==e){let i=0;switch(r){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-r.length));return isNaN(o)?0:(o=o/i,o%1===0?n(o):0)}}return t}const Uy=/[\s,]+/;function qy(e,t){t.split(Uy).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Yy=["width","height"],Gy=["inline","hFlip","vFlip"];function Wy(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Jy(e){const t=e.getAttribute("data-icon"),r=typeof t=="string"&&zt(t,!0);if(!r)return null;const n=ne(M({},tn),{inline:e.classList&&e.classList.contains(Ti)});Yy.forEach(s=>{const c=e.getAttribute("data-"+s);c&&(n[s]=c)});const i=e.getAttribute("data-rotate");typeof i=="string"&&(n.rotate=zy(i));const o=e.getAttribute("data-flip");typeof o=="string"&&qy(n,o),Gy.forEach(s=>{const c="data-"+s,u=Wy(e.getAttribute(c),c);typeof u=="boolean"&&(n[s]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:r,customisations:n,mode:a}}const Ky="svg."+$i+", i."+$i+", span."+$i+", i."+Ti+", span."+Ti;function Qy(e){const t=[];return e.querySelectorAll(Ky).forEach(r=>{const n=r[ht]||r.tagName.toLowerCase()!=="svg"?Jy(r):null;n&&t.push({node:r,props:n})}),t}function Kl(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}let wr;function Zy(){try{wr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){wr=null}}function Xy(e){return wr===void 0&&Zy(),wr?wr.createHTML(e):e}function Ql(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(r=>{e[r]&&t.add("iconify--"+e[r])}),t}function Zl(e,t,r,n){const i=e.classList;if(n){const a=n.classList;Array.from(a).forEach(s=>{i.add(s)})}const o=[];return t.forEach(a=>{i.contains(a)?r.has(a)&&o.push(a):(i.add(a),o.push(a))}),r.forEach(a=>{t.has(a)||i.remove(a)}),o}function Xl(e,t,r){const n=e.style;(r||[]).forEach(o=>{n.removeProperty(o)});const i=[];for(const o in t)n.getPropertyValue(o)||(i.push(o),n.setProperty(o,t[o]));return i}function es(e,t,r){let n;try{n=document.createElement("span")}catch(m){return e}const i=t.customisations,o=Jr(r,i),a=e[ht],s=Kl($l(o.body),M({"aria-hidden":"true",role:"img"},o.attributes));n.innerHTML=Xy(s);const c=n.childNodes[0],u=e.attributes;for(let m=0;m<u.length;m++){const g=u.item(m),y=g.name;y!=="class"&&!c.hasAttribute(y)&&c.setAttribute(y,g.value)}const d=Ql(t.icon),f=Zl(c,d,new Set(a&&a.addedClasses),e),h=Xl(c,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),p=ne(M({},t),{status:"loaded",addedClasses:f,addedStyles:h});return c[ht]=p,e.parentNode&&e.parentNode.replaceChild(c,e),c}function eb(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tb(e){return"data:image/svg+xml,"+eb(e)}function rb(e){return'url("'+tb(e)+'")'}const nb={display:"inline-block"},_i={"background-color":"currentColor"},ts={"background-color":"transparent"},rs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ns={"-webkit-mask":_i,mask:_i,background:ts};for(const e in ns){const t=ns[e];for(const r in rs)t[e+"-"+r]=rs[r]}function is(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ib(e,t,r,n){const i=t.customisations,o=Jr(r,i),a=o.attributes,s=e[ht],c=Kl(o.body,ne(M({},a),{width:r.width+"",height:r.height+""})),u=Ql(t.icon),d=Zl(e,u,new Set(s&&s.addedClasses)),f=rb(c),h=M(M({"--svg":f,width:is(a.width),height:is(a.height)},nb),n?_i:ts);i.inline&&(h["vertical-align"]="-0.125em");const p=Xl(e,h,s&&s.addedStyles),m=ne(M({},t),{status:"loaded",addedClasses:d,addedStyles:p});return e[ht]=m,e}let nn=!1;function ob(){nn||(nn=!0,setTimeout(()=>{nn&&(nn=!1,Ut())}))}function Ut(e,t=!1){const r=Object.create(null);function n(i,o){const{provider:a,prefix:s,name:c}=i,u=rt(a,s),d=u.icons[c];if(d)return{status:"loaded",icon:d};if(u.missing.has(c))return{status:"missing"};if(o&&!Ry(i)){const f=r[a]||(r[a]=Object.create(null));(f[s]||(f[s]=new Set)).add(c)}return{status:"loading"}}(e?[e]:yr()).forEach(i=>{const o=typeof i.node=="function"?i.node():i.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function c(u,d,f){if(s||(s=!0,Ei(i)),u.tagName.toUpperCase()!=="SVG"){const h=d.mode,p=h==="mask"||(h==="bg"?!1:h==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof p=="boolean"){ib(u,d,M(M({},dr),f),p);return}}es(u,d,f)}Qy(o).forEach(({node:u,props:d})=>{const f=u[ht];if(!f){const{status:p,icon:m}=n(d.icon,!0);if(m){c(u,d,m);return}a=a||p==="loading",u[ht]=ne(M({},d),{status:p});return}let h;if(Hy(f,d)){if(h=n(d.icon,f.name!==d.name),!h.icon){a=a||h.status==="loading",Object.assign(f,ne(M({},d),{status:h.status}));return}}else{if(f.status!=="loading")return;if(h=n(d.icon,!1),!h.icon){f.status=h.status;return}}c(u,d,h.icon)}),i.temporary&&!a?Jl(o):t&&a?Wl(o,!0):s&&i.observer&&ki(i)});for(const i in r){const o=r[i];for(const a in o){const s=o[a];Ci(Array.from(s).map(c=>({provider:i,prefix:a,name:c})),ob)}}}function ab(e){const t=gr(e);t?Ut(t):Ut({node:e,temporary:!0},!0)}function os(e,t,r=!1){const n=pr(e);if(!n)return null;const i=zt(e),o=Hl(tn,t||{}),a=es(document.createElement("span"),{name:e,icon:i,customisations:o},n);return r?a.outerHTML:a}function lb(){return"3.1.1"}function sb(e,t){return os(e,t,!1)}function cb(e,t){return os(e,t,!0)}function ub(e,t){const r=pr(e);if(!r)return null;const n=Hl(tn,t||{});return Jr(r,n)}function db(e){e?ab(e):Ut()}if(typeof document!="undefined"&&typeof window!="undefined"){Dy();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!xl(n))&&console.error(r)}catch(i){console.error(r)}})}setTimeout(()=>{Ny(Ut),Ut()})}function fb(e,t){Dl(e,t!==!1)}function pb(e){Dl(e,!0)}if(Pl("",wy),typeof document!="undefined"&&typeof window!="undefined"){Ml();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const n="IconifyProviders["+r+"] is invalid.";try{const i=t[r];if(typeof i!="object"||!i||i.resources===void 0)continue;Il(r,i)||console.error(n)}catch(i){console.error(n)}}}}const as={_api:{getAPIConfig:Xr,setAPIModule:Pl,sendAPIQuery:Vl,setFetch:py,getFetch:hy,listAPIProviders:fy},addAPIProvider:Il,loadIcons:Ci,loadIcon:My,iconExists:ry,getIcon:ny,listIcons:Xg,addIcon:ty,addCollection:xl,replaceIDs:$l,calculateSize:pi,buildIcon:Jr,getVersion:lb,renderSVG:sb,renderHTML:cb,renderIcon:ub,scan:db,observe:Wl,stopObserving:Jl,pauseObserver:Vy,resumeObserver:Ly,enableCache:fb,disableCache:pb};try{self.Iconify===void 0&&(self.Iconify=as)}catch(e){}const hb=["xlink:href"],mb=["data-icon"],gb=l.defineComponent({name:"AbIcon",__name:"ab-icon",props:{icon:{},color:{},size:{default:16},svgClass:{}},setup(e){const t=e,r=l.ref(null),n=l.computed(()=>{var c;return(c=t.icon)==null?void 0:c.startsWith("svg-icon:")}),i=l.computed(()=>{var c;return l.unref(n)?`#icon-${(c=t.icon)==null?void 0:c.split("svg-icon:")[1]}`:t.icon}),o=l.computed(()=>{const{color:c,size:u}=t;return{fontSize:`${u}px`,height:"1em",color:c}}),a=l.computed(()=>{const{svgClass:c}=t;return`iconify ${c}`}),s=c=>ye(this,null,function*(){if(l.unref(n))return;const u=l.unref(r);if(!u||(yield l.nextTick(),!c))return;const d=as.renderSVG(c,{});if(d)u.textContent="",u.appendChild(d);else{const f=document.createElement("span");f.className="iconify",f.dataset.icon=c,u.textContent="",u.appendChild(f)}});return l.watch(()=>t.icon,c=>{s(c)}),(c,u)=>{const d=l.resolveComponent("ElIcon");return l.openBlock(),l.createBlock(d,{class:"ab-icon",color:e.color,size:e.size},{default:l.withCtx(()=>[n.value?(l.openBlock(),l.createElementBlock("svg",{key:0,class:l.normalizeClass(a.value)},[l.createElementVNode("use",{"xlink:href":i.value},null,8,hb)],2)):(l.openBlock(),l.createElementBlock("span",{key:1,ref_key:"elRef",ref:r,class:l.normalizeClass(c.$attrs.class),style:l.normalizeStyle(o.value)},[l.createElementVNode("span",{class:l.normalizeClass(a.value),"data-icon":i.value},null,10,mb)],6))]),_:1},8,["color","size"])}}}),yb=l.defineComponent({name:"AbCheckbox",inheritAttrs:!1,__name:"ab-checkbox",props:{abFormInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElCheckboxButton":"ElCheckbox"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),c=l.ref(s.value),u=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){c.value=p;return}h(p)}),l.watch(a,p=>{if(!s.value&&Array.isArray(p)&&p.length>0&&r.input){const m=u.value.map(y=>y.value);let g=null;p.forEach(y=>{m.indexOf(y)===-1&&(g=y)}),g!=null&&(c.value=g)}},{immediate:!0});function d(p){const b=p,{value:m,label:g}=b;return xr(b,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=[...$t(a.value)],g=m.indexOf(c.value);c.value=p,g>-1&&(m.splice(g,1),m.push(p),f(m))}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-checkbox-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value===null?void 0:a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(b,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${b.value}`},{ref_for:!0},d(b),{label:b.value,value:b.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b.label||b.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,value:c.value||void 0,label:c.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":c.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(b=>b!=="default"),b=>({name:b,fn:l.withCtx(S=>[l.renderSlot(p.$slots,b,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),bb=l.defineComponent({name:"AbRadio",inheritAttrs:!1,__name:"ab-radio",props:{abFormInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElRadioButton":"ElRadio"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),c=l.ref(s.value),u=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){c.value=p;return}h(p)}),l.watch(a,p=>{!s.value&&p!=null&&r.input&&!u.value.some(m=>m.value===p)&&(c.value=p)},{immediate:!0});function d(p){const b=p,{value:m,label:g}=b;return xr(b,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=c.value;c.value=p,a.value===m&&f(p)}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-radio-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(b,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${b.value}`},{ref_for:!0},d(b),{label:b.value,value:b.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b.label||b.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,checked:!1,value:c.value||void 0,label:c.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":c.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(b=>b!=="default"),b=>({name:b,fn:l.withCtx(S=>[l.renderSlot(p.$slots,b,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),wb={class:"p-option__left"},vb={class:"p-option__right"},xb={class:"p-option__left"},Sb={key:0,class:"p-option__right"},Cb={key:1,class:"p-option__right"},$b=l.defineComponent({name:"AbSelect",inheritAttrs:!1,__name:"ab-select",props:{abFormInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String,showValue:Boolean,showKey:Boolean,showCode:Boolean},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.toRef(r,"modelValue"),a=l.computed(()=>{var f;const d=(f=r.abFormInject)==null?void 0:f.options;return Array.isArray(d)?d:[]}),{wsCache:s}=Ce(),c=l.computed(()=>s.getCurrentSize||"default");function u(d){n("update:modelValue",d)}return l.onMounted(()=>{n("fc.el",i.value)}),(d,f)=>{const h=l.resolveComponent("el-option"),p=l.resolveComponent("el-option-group"),m=l.resolveComponent("el-select");return l.openBlock(),l.createBlock(m,l.mergeProps(d.$attrs,{"model-value":o.value,"onUpdate:modelValue":u,ref_key:"el",ref:i}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(g,y)=>{var b,S;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.unref(ue)(g,"options")?(l.openBlock(),l.createBlock(p,{label:g.label,key:`${y}-${g.label}`},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(j).trueArray(g.options)?g.options:[],($,L)=>(l.openBlock(),l.createBlock(h,l.mergeProps({key:`${L}-${$.value}`},{ref_for:!0},$),null,16))),128))]),_:2},1032,["label"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.showValue?(l.openBlock(),l.createBlock(h,{key:0,label:g==null?void 0:g.label,value:g==null?void 0:g.value,class:l.normalizeClass((b=g==null?void 0:g.class)!=null?b:"")},{default:l.withCtx(()=>[l.createElementVNode("span",wb,l.toDisplayString(g==null?void 0:g.label),1),l.createElementVNode("span",vb,l.toDisplayString(g==null?void 0:g.value),1)]),_:2},1032,["label","value","class"])):e.showKey||e.showCode?(l.openBlock(),l.createBlock(h,{key:1,label:g==null?void 0:g.label,value:g==null?void 0:g.value,size:c.value,class:l.normalizeClass((S=g==null?void 0:g.class)!=null?S:"")},{default:l.withCtx(()=>[l.createElementVNode("span",xb,l.toDisplayString(g==null?void 0:g.label),1),e.showKey?(l.openBlock(),l.createElementBlock("span",Sb,l.toDisplayString(g==null?void 0:g.key),1)):l.createCommentVNode("",!0),e.showCode?(l.openBlock(),l.createElementBlock("span",Cb,l.toDisplayString(g==null?void 0:g.code),1)):l.createCommentVNode("",!0)]),_:2},1032,["label","value","size","class"])):(l.openBlock(),l.createBlock(h,{key:2,label:g==null?void 0:g.label,value:g==null?void 0:g.value},null,8,["label","value"]))],64))],64)}),256)),l.renderSlot(d.$slots,"default")]),_:3},16,["model-value"])}}}),Tb=l.defineComponent({name:"abTree",inheritAttrs:!1,abFormParser:{mergeProp(e){const t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:["update:modelValue","fc.el"],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)},setValue(){if(!this.$refs.tree)return;this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys($t(this.modelValue))}},render(){return l.createVNode(l.resolveComponent("ElTree"),l.mergeProps(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),Eb=l.defineComponent({name:"AbTimePicker",inheritAttrs:!1,__name:"ab-time-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,u=>o.value=u);const{wsCache:a}=Ce(),s=l.computed(()=>a.getCurrentSize||"default");function c(u){n("update:modelValue",u)}return l.onMounted(()=>{n("fc.el",i.value)}),(u,d)=>{const f=l.resolveComponent("el-time-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i},u.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:c}),null,16,["modelValue","size"])}}}),kb=l.defineComponent({name:"AbColorPicker",inheritAttrs:!1,__name:"ab-color-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,u=>o.value=u);const{wsCache:a}=Ce(),s=l.computed(()=>a.getCurrentSize||"default");function c(u){n("update:modelValue",u)}return l.onMounted(()=>{n("fc.el",i.value)}),(u,d)=>{const f=l.resolveComponent("el-color-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i,class:"ab-color-picker"},u.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:c}),null,16,["modelValue","size"])}}}),_b={class:"ab-input-range"},Fb={key:0,class:"range-prefix"},Ab={key:3,class:"range-suffix"},Ob=l.defineComponent({name:"AbInputRange",__name:"ab-input-range",props:l.mergeModels({abFormInject:{},prefix:{},suffix:{},clearable:{type:Boolean,default:!0},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,{t:i}=Ke(),o=l.useModel(e,"modelValue"),a=l.computed(()=>{var h,p,m,g;return[(p=(h=o.value)==null?void 0:h[0])!=null?p:null,(g=(m=o.value)==null?void 0:m[1])!=null?g:null]}),s=l.computed(()=>{var h;return n.readonly===!0||((h=n.abFormInject)==null?void 0:h.readonly)===!0});function c(h,p){const m=[...a.value];return m[h]=p===""?null:p,m}function u(h,p){o.value=c(h,p)}const{wsCache:d}=Ce(),f=l.computed(()=>d.getCurrentSize||"default");return(h,p)=>{var y,b;const m=l.resolveComponent("el-text"),g=l.resolveComponent("el-input");return l.openBlock(),l.createElementBlock("div",_b,[e.prefix?(l.openBlock(),l.createElementBlock("span",Fb,l.toDisplayString(e.prefix),1)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[0]),1)]),_:1}),p[4]||(p[4]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[1]),1)]),_:1})],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createVNode(g,{"model-value":(y=a.value[0])!=null?y:"",size:f.value,placeholder:l.unref(i)("min"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[0]||(p[0]=S=>u(0,S)),onChange:p[1]||(p[1]=S=>r("change",c(0,S)))},null,8,["model-value","size","placeholder","clearable"]),p[5]||(p[5]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(g,{"model-value":(b=a.value[1])!=null?b:"",size:f.value,placeholder:l.unref(i)("max"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[2]||(p[2]=S=>u(1,S)),onChange:p[3]||(p[3]=S=>r("change",c(1,S)))},null,8,["model-value","size","placeholder","clearable"])],64)),e.suffix?(l.openBlock(),l.createElementBlock("span",Ab,l.toDisplayString(e.suffix),1)):l.createCommentVNode("",!0)])}}}),Rb={class:"ab-time-period w-full"},Mb={class:"start-time"},Db={key:0},Pb={class:"end-time"},Ib=l.defineComponent({name:"AbTimePeriod",__name:"ab-time-period",props:l.mergeModels({abFormInject:{},startTime:{default:"08:00"},endTime:{default:"18:00"},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.useModel(e,"modelValue"),o=l.computed(()=>{var g;return n.readonly===!0||((g=n.abFormInject)==null?void 0:g.readonly)===!0});function a(g){const y=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(g.trim()),b=y?Number(y[1]):NaN,S=y?Number(y[2]):NaN,$=y!=null&&y[3]?Number(y[3]):0;if(!y||b>24||S>59||$>59||b===24&&(S!==0||$!==0))throw new TypeError(`Invalid time "${g}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return b*3600+S*60+$}function s(g){const y=Math.floor(g/3600),b=Math.floor(g%3600/60),S=g%60,$=`${String(y).padStart(2,"0")}:${String(b).padStart(2,"0")}`;return S?`${$}:${String(S).padStart(2,"0")}`:$}const c=l.computed(()=>{const g=a(n.startTime),y=a(n.endTime);if(g>=y)throw new RangeError("timePeriod requires startTime before endTime.");return[g,y]}),u=l.computed(()=>{var g,y,b,S,$,L;return[((g=i.value)==null?void 0:g[0])===""?null:(b=(y=i.value)==null?void 0:y[0])!=null?b:null,((S=i.value)==null?void 0:S[1])===""?null:(L=($=i.value)==null?void 0:$[1])!=null?L:null]}),d=l.computed(()=>{const[g,y]=c.value,b=u.value[0]===null?g:a(u.value[0]),S=u.value[1]===null?y:a(u.value[1]);if(u.value[0]!==null&&u.value[1]!==null&&b>S)throw new RangeError("timePeriod start value must be before or equal to end value.");return[b,S]});l.computed(()=>d.value.some(g=>g<c.value[0]||g>c.value[1]));const f=l.computed(()=>{const g=y=>Math.min(c.value[1],Math.max(c.value[0],y));return[g(d.value[0]),g(d.value[1])]});function h(g){if(!Array.isArray(g)||g.length!==2)throw new TypeError("timePeriod slider must provide a pair of values.");return[u.value[0]!==null&&g[0]===f.value[0]?u.value[0]:s(g[0]),u.value[1]!==null&&g[1]===f.value[1]?u.value[1]:s(g[1])]}function p(g){i.value=h(g)}function m(g){r("change",h(g))}return(g,y)=>{var S,$;const b=l.resolveComponent("el-slider");return l.openBlock(),l.createElementBlock("div",Rb,[l.createElementVNode("div",Mb,l.toDisplayString((S=u.value[0])!=null?S:"--:--"),1),o.value?(l.openBlock(),l.createElementBlock("div",Db,"~")):(l.openBlock(),l.createBlock(b,{key:1,class:l.normalizeClass({"is-empty":u.value[0]==null&&u.value[1]==null}),"model-value":f.value,range:"",step:30,min:c.value[0],max:c.value[1],"format-tooltip":s,"format-value-text":s,"onUpdate:modelValue":p,onChange:m},null,8,["class","model-value","min","max"])),l.createElementVNode("div",Pb,l.toDisplayString(($=u.value[1])!=null?$:"--:--"),1)])}}}),ls=Symbol("archbiz-upload-apis");function Bb(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()&&e!=="new")return e}function ss(e){const t=e.split(/[?#]/,1)[0].split("/").pop()||e;try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}const jb={class:"ab-upload-file"},Nb={key:1,role:"alert"},Vb={class:"ab-upload-file__list"},Lb={key:0},Hb={key:1,role:"alert"},cs=l.defineComponent({name:"AbUploadFile",__name:"ab-upload-file",props:{modelValue:{},apis:{},abFormInject:{},idFieldTable:{},businessCode:{},fileType:{default:()=>["doc","xls","txt","pdf"]},fileSize:{default:5},limit:{default:5},drag:{type:Boolean},isShowTip:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},delEnabled:{type:Boolean,default:!0},preEnabled:{type:Boolean,default:!0},dowEnabled:{type:Boolean,default:!0},coverEnabled:{type:Boolean},autoCover:{type:Boolean}},emits:["update:modelValue","preview","error","reload"],setup(e,{expose:t,emit:r}){const n=e,i=r,{t:o}=Ke(),a=Ea(),s=l.inject(ls,void 0);function c(){var H;const P=(H=n.apis)!=null?H:s;if(!P)throw new Error("Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.");return P}c();const u=l.computed(()=>{var P;return n.disabled||n.readonly||((P=n.abFormInject)==null?void 0:P.readonly)===!0}),d=l.computed(()=>{var H;const P=n.abFormInject;return Bb(P!=null&&P.idField?(H=P.formValue)==null?void 0:H[P.idField]:void 0)}),f=l.ref([]),h=l.ref(""),p=l.ref(!1),m=l.ref(!1),g=new Set;let y=1,b=0,S=0,$,L;function R(P){var H,G;return{businessType:(G=n.idFieldTable)!=null?G:(H=n.abFormInject)==null?void 0:H.idFieldTable,businessCode:n.businessCode,businessId:P}}function T(P){a.error(P instanceof Error?P.message:String(P)),i("error",P)}function E(){i("update:modelValue",f.value.flatMap(P=>P.url?[P.url]:[]))}function k(P){const H=P.name.includes(".")?P.name.slice(P.name.lastIndexOf(".")+1).toLowerCase():"";return{url:P.url,name:P.name,extension:H,fileId:P.fileId}}function V(P){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(P)}const q=P=>{if(f.value.length+S>=n.limit)return a.error(o("upload.tooMany")),!1;const H=P.name.includes(".")?P.name.slice(P.name.lastIndexOf(".")+1).toLowerCase():"";return n.fileType.length&&!n.fileType.some(G=>G.toLowerCase().replace(/^\./,"")===H)?(a.error(o("upload.invalidType")),!1):P.size>n.fileSize*1024*1024?(a.error(o("upload.tooLarge")),!1):(S++,!0)};function U(P){S=Math.max(0,S-1);const H=b,G=l.reactive({uid:y++,name:P.file.name,status:"uploading"});f.value.push(G);const ie=ye(this,null,function*(){try{const pe=yield c().upload({file:P.file}),K=pe==null?void 0:pe.data;if(!K||K.id==null||typeof K.url!="string"||!K.url||typeof K.name!="string"||!K.name)throw new TypeError("Upload API must return data with id, name and url.");if(H!==b)return;Object.assign(G,{fileId:K.id,url:K.url,name:K.name,size:K.size,status:"pending"}),E()}catch(pe){throw H===b&&(G.status="failed",G.error=pe instanceof Error?pe.message:String(pe)),pe}});return g.add(ie),ie.then(()=>{g.delete(ie),H===b&&d.value!==void 0&&C()},()=>{g.delete(ie)}),ie}const x=P=>T(P);function _(){return ye(this,null,function*(){yield Promise.allSettled([...g]);const P=f.value.find(H=>H.status==="failed");if(P)throw new Error(P.error||o("upload.failed"))})}function F(P,H){return ye(this,null,function*(){if(L&&(yield L),yield Promise.allSettled([...g]),H!==b||d.value!==P)return;const G=f.value.filter(v=>v.status==="pending"&&v.fileId!=null);if(G.length)try{if(yield c().attach(ne(M({},R(P)),{fileIds:G.map(v=>v.fileId),isCover:n.autoCover&&G.length===1&&V(G[0].name)?1:0})),H!==b||d.value!==P)return;G.forEach(v=>{v.status="recent",v.error=void 0})}catch(v){throw H===b&&d.value===P&&G.forEach(O=>{O.error=v instanceof Error?v.message:String(v)}),v}const ie=yield c().list(ne(M({},R(P)),{pageSize:1e3}));if(!ie||!Array.isArray(ie.list))throw new TypeError("Upload list API must return a list array.");if(H!==b||d.value!==P)return;if(ie.list.some(v=>!v||v.fileId==null||typeof v.name!="string"||!v.name||typeof v.url!="string"||!v.url))throw new TypeError("Upload list entries must have fileId, name and url.");const pe=f.value.filter(v=>v.status!=="linked"&&v.status!=="recent"),K=ie.list.map(v=>({uid:y++,id:v.id,fileId:v.fileId,name:v.name,url:v.url,size:v.size,isCover:v.isCover,status:"linked"})),w=f.value.filter(v=>v.status==="recent"&&!K.some(O=>O.fileId===v.fileId));f.value=[...K,...w,...pe],h.value="",E()})}function A(){const P=d.value;if(P===void 0)return Promise.reject(new Error(o("upload.missingBusinessId")));if($)return $.then(()=>A());const H=F(P,b);return $=H,p.value=!0,H.then(()=>{$===H&&($=void 0,p.value=!1)},()=>{$===H&&($=void 0,p.value=!1)}),H}function C(){const P=b;A().catch(H=>{P===b&&(h.value=H instanceof Error?H.message:String(H),T(H))})}function B(){return ye(this,null,function*(){yield _(),yield A()})}function I(){C()}function W(P){m.value=!0;const H=P();L=H,H.then(()=>{L===H&&(L=void 0,m.value=!1)},()=>{L===H&&(L=void 0,m.value=!1)}),H.catch(T)}function Z(P){W(()=>ye(this,null,function*(){const H=b;if(P.status==="linked"&&d.value!==void 0||P.status==="recent"){const G=d.value;if(G===void 0||P.fileId==null)throw new Error(o("upload.missingBusinessId"));yield c().remove(ne(M({},R(G)),{fileId:P.fileId}))}H===b&&(f.value=f.value.filter(G=>G.uid!==P.uid),E(),i("reload"))}))}function X(P){W(()=>ye(this,null,function*(){const H=b;if(P.id==null)throw new Error(o("upload.missingBusinessId"));const G=P.isCover?0:1;yield c().setCover(P.id,G),H===b&&(P.isCover=G,i("reload"))}))}return l.watch(()=>n.modelValue,P=>{const H=P!=null?P:[],G=f.value,ie=[...G],pe=H.map(K=>{const w=ie.findIndex(v=>v.url===K);return w>=0?ie.splice(w,1)[0]:{uid:y++,name:ss(K),url:K,status:"linked"}});f.value=[...pe,...G.filter(K=>K.status==="uploading"||K.status==="failed")]},{immediate:!0,deep:!0}),l.watch(d,(P,H)=>{var G;H!==void 0&&P!==H&&(b++,$=void 0,p.value=!1,h.value="",f.value=((G=n.modelValue)!=null?G:[]).map(ie=>({uid:y++,name:ss(ie),url:ie,status:"linked"}))),P!==void 0&&C()},{immediate:!0}),l.onBeforeUnmount(()=>{b++}),t({waitForUploads:_,waitForAssociations:B,retryAssociations:I}),(P,H)=>{const G=l.resolveComponent("el-button"),ie=l.resolveComponent("el-upload"),pe=l.resolveComponent("el-link");return l.openBlock(),l.createElementBlock("div",jb,[u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ie,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(K=>`.${K.replace(/^\./,"")}`).join(","),"before-upload":q,"http-request":U,"on-error":x},l.createSlots({default:l.withCtx(()=>[l.createVNode(G,{type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.select")),1)]),_:1})]),_:2},[e.isShowTip?{name:"tip",fn:l.withCtx(()=>[l.createElementVNode("div",null,l.toDisplayString(l.unref(o)("upload.tip"))+": "+l.toDisplayString(e.fileType.join("/"))+"; "+l.toDisplayString(e.fileSize)+" MB",1)]),key:"0"}:void 0]),1032,["drag","multiple","accept"])),h.value?(l.openBlock(),l.createElementBlock("div",Nb,[l.createTextVNode(l.toDisplayString(h.value)+" ",1),u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(G,{key:0,link:"",onClick:I},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1}))])):l.createCommentVNode("",!0),l.createElementVNode("ul",Vb,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.value,K=>(l.openBlock(),l.createElementBlock("li",{key:K.uid,class:"ab-upload-file__item"},[l.createElementVNode("span",null,l.toDisplayString(K.name),1),K.status==="uploading"?(l.openBlock(),l.createElementBlock("span",Lb,l.toDisplayString(l.unref(o)("upload.uploading")),1)):l.createCommentVNode("",!0),K.error?(l.openBlock(),l.createElementBlock("span",Hb,l.toDisplayString(K.error),1)):l.createCommentVNode("",!0),K.url&&e.preEnabled?(l.openBlock(),l.createBlock(G,{key:2,link:"",onClick:w=>i("preview",k(K))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.preview")),1)]),_:1},8,["onClick"])):l.createCommentVNode("",!0),K.url&&e.dowEnabled?(l.openBlock(),l.createBlock(pe,{key:3,href:K.url,target:"_blank",download:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.download")),1)]),_:1},8,["href"])):l.createCommentVNode("",!0),!u.value&&e.coverEnabled&&K.id!=null&&V(K.name)?(l.openBlock(),l.createBlock(G,{key:4,disabled:p.value||m.value,link:"",onClick:w=>X(K)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(K.isCover?l.unref(o)("upload.unsetCover"):l.unref(o)("upload.setCover")),1)]),_:2},1032,["disabled","onClick"])):l.createCommentVNode("",!0),!u.value&&K.status==="pending"&&K.error?(l.openBlock(),l.createBlock(G,{key:5,link:"",onClick:I},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1})):l.createCommentVNode("",!0),!u.value&&e.delEnabled&&K.status!=="uploading"?(l.openBlock(),l.createBlock(G,{key:6,disabled:p.value||m.value,link:"",onClick:w=>Z(K)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.delete")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)]))),128))])])}}}),zb=[gb,yb,bb,$b,Tb,Eb,kb,Ob,Ib,cs],us={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},ds="datePicker",Ub={name:ds,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce((e,t)=>(e[t]=$e(ds,{type:t.toLowerCase()}),e),{}),mergeProp(e){var r;const t=e.prop.props;t.valueFormat||(t.valueFormat=us[(r=t.type)!=null?r:""]||us.date)}},Fi="hidden",qb={name:Fi,maker:{[Fi]:(e,t)=>$e(Fi)("",e,t)},render(){return[]}},Ai="input",fs=["password","url","email","text","textarea"].reduce((e,t)=>(e[t]=$e(Ai,{type:t}),e),{});fs.idate=$e(Ai,{type:"date"});const Yb={name:Ai,maker:fs,mergeProp(e){const{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},on={name:"inputNumber"},Gb={name:"textarea",mergeProp(e){const{props:t}=e.prop;t.type="textarea",t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},ps="slider",Wb={name:ps,maker:{sliderRange:$e(ps,{range:!0})},toFormValue(e,t){let r=Array.isArray(e),n=t.prop.props,i=n.min||0,o;return n.range===!0?o=r?e:[i,parseFloat(e)||i]:o=r?parseFloat(e[0])||i:parseFloat(e),o}},Oi="timePicker",Jb={name:Oi,maker:{time:$e(Oi,e=>e.props.isRange=!1),timeRange:$e(Oi,e=>e.props.isRange=!0)},mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},Kb={name:"FcRow",render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},hs={name:"select",toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?$t(e):e}},Qb=ne(M({},hs),{name:"treeSelect"}),Zb={name:"text",render(e,t){const r=t.$handle.api.getValue(t.field),n=Yn(t.prop).formatter,i=typeof n=="function"?n({cellValue:r,column:t.rule,row:t.$handle.api.formData()}):r,o=String(i!=null?i:"");return Ph(t.prop.link)?l.h(Aa,{link:t.prop.link,value:r,row:t.$handle.api.formData()},{default:()=>o}):l.h(D.ElText,null,{default:()=>o})}},ms={name:"radio"},Xb=ne(M({},ms),{name:"checkbox"}),ew={name:"switch"},tw={name:"cascader"},rw={name:"colorPicker",render(e,t){var r,n,i;if(((i=(n=(r=t==null?void 0:t.$handle)==null?void 0:r.vm)==null?void 0:n.props)==null?void 0:i.readonly)===!0){const o=t.$handle.api.getValue(t.field),a=typeof o=="string"?o:void 0;return l.h("span",{class:"ab-color-picker__readonly",style:{backgroundColor:a,color:a?da.getContrast(a):ah.black},title:a},String(o!=null?o:""))}return t.$render.defaultRender(t,e)}},nw=[Ub,qb,Yb,on,ne(M({},on),{name:"number"}),ne(M({},on),{name:"inputCurrency"}),ne(M({},on),{name:"inputPercent"}),Zb,Gb,Wb,Jb,Kb,hs,Qb,ms,Xb,ew,tw,rw],se="el",iw={input:se+"-input",number:se+"-input-number",inputNumber:se+"-input-number",inputCurrency:se+"-input-number",inputPercent:se+"-input-number",inputRange:"ab-input-range",text:se+"-text",divider:se+"-divider",select:"ab-select",treeSelect:se+"-tree-select",datePicker:se+"-date-picker",timePicker:"ab-time-picker",cascader:se+"-cascader",colorPicker:"ab-colorPicker",timePeriod:"ab-time-period",uploadFile:"ab-upload-file",textarea:se+"-input",button:se+"-button",icon:"ab-icon",slider:se+"-slider",rate:se+"-rate",upload:"ab-upload",popover:se+"-popover",tooltip:se+"-tooltip",timeSelect:se+"-time-select",switch:se+"-switch",checkbox:"ab-checkbox",radio:"ab-radio",formItem:se+"-form-item",form:se+"-form",frame:"ab-frame",col:se+"-col",row:se+"-row",tree:"ab-tree",inputTag:se+"-input-tag",inputOtp:se+"-input-otp",mention:se+"-mention",transfer:se+"-transfer",autoComplete:se+"-autocomplete",auto:se+"-autocomplete",group:"ab-group",array:"ab-group",object:"ab-sub-form",subForm:"ab-sub-form"};function ow(){return{form:{inline:!0,labelPosition:"right",labelWidth:"120px",fieldWidth:"238px",disabled:!1,size:void 0},row:{show:!1,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}}const{t:an}=Ke(),aw=new Set(["input","inputnumber","textarea","password","inputtag"]),gs=new Set(["select","datepicker","timepicker","treeselect","cascader","autocomplete"]);function lw(e){return e.type==="tooltip"}function ys(e,t){ue(e,t)&&j.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function ct(e){return e===!1}function sw(e,t){ue(e,t)&&!j.Object(e[t])&&(e[t]={show:!!e[t]})}function Ri(e){const t=M({},e);return delete t.children,t}const cw={validate(){const e=this.form();return e?e.validate():new Promise(t=>t())},validateField(e){return new Promise((t,r)=>{const n=this.form();n?n.validateField(e,(i,o)=>{o?r(o):t(i)}):t(void 0)})},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,r,n){var i,o;n||(o=(i=this.vm.refs[e.wrapRef])==null?void 0:i.validate("change"))==null||o.catch(()=>{})},tidyOptions(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{sw(e,t)}),e},tidyRule({prop:e}){return ys(e,"title"),ys(e,"info"),e},mergeProp(e){var s,c,u,f,h,p,m,g;const d=ml(M(M({},e.rule),e.prop),{includeChildren:((u=(c=(s=this.$handle)==null?void 0:s.vm)==null?void 0:c.props)==null?void 0:u.readonly)!==!0}),{children:r}=d,n=xr(d,["children"]);Object.assign(e.prop,n),r!==e.rule.children&&(e.rule.children=r);const i=String(e.rule.type||e.type||"").replace(/[-_]/g,"").toLowerCase(),o=(m=(h=(f=e.refRule)==null?void 0:f.__$title)==null?void 0:h.value)!=null?m:typeof e.rule.title=="object"?(p=e.rule.title)==null?void 0:p.title:e.rule.title;if((aw.has(i)||gs.has(i))&&o!==void 0&&o!==null&&o!==""){(g=e.prop).props||(g.props={}),this.$handle.api.getLocale();const y=gs.has(i)?an("pleaseSelect"):an("pleaseEnter");ue(e.prop.props,"placeholder")||(e.prop.props.placeholder=`${y}${ir(o)}`);const b=String(e.prop.props.type||"").toLowerCase();(i==="datepicker"||i==="timepicker")&&(b.endsWith("range")||e.prop.props.isRange===!0)&&(ue(e.prop.props,"startPlaceholder")||(e.prop.props.startPlaceholder=`${y}${an("rangeStart")}${ir(o)}`),ue(e.prop.props,"endPlaceholder")||(e.prop.props.endPlaceholder=`${y}${an("rangeEnd")}${ir(o)}`))}const a={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(y=>{e.prop[y]=at([this.options[y]||{},e.prop[y]||{}],a[y])})},getDefaultOptions(){return ow()},update(){const e=this.options.form,t=M({},e);delete t.fieldWidth,this.rule={props:M({},t),on:{submit:r=>{r.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:r}=this,n=this.options.form;ee(this.rule,{key:e,ref:t,class:[n.className,n.class,"ab-form",this.$handle.preview?"is-preview":""]}),ee(this.rule.props,{model:r.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,ct(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){var h;const r=e.prop,n=`${this.key}${e.key}`,i=r.col,o=this.isTitle(r)&&r.wrap.title!==!1,a=!(i!=null&&i.labelWidth)&&!o?0:i==null?void 0:i.labelWidth,s=e.input?(h=this.options.form)==null?void 0:h.fieldWidth:"",{inline:c,col:u}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;const f=(j.Undef(r.wrap.show)?!e.input:ct(r.wrap.show))?t:this.$r(at([r.wrap,ne(M({props:ne(M({labelWidth:a===void 0?a:ir(a),label:o?r.title.title:void 0},Ri(r.wrap||{})),{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,"ab-form-item")},s?{style:{"--ab-field-width":ir(s)}}:{}),{key:`${n}fi`,ref:e.wrapRef,type:"formItem"})]),M({default:()=>t},o?{label:()=>this.makeInfo(r,n,e)}:{}));return c===!0||ct(u)||ct(i.show)?f:this.makeCol(r,n,[f])},isTitle(e){if(this.options.form.title===!1)return!1;const t=e.title;return!(!t.title&&!t.native||ct(t.show))},makeInfo(e,t,r){var d,f,h,p,m,g;const n=M({},e.title),i=M({},e.info),o=lw(i),a=this.options.form,s=this.getSlot("title"),c=[s?s({title:(f=(d=r.refRule)==null?void 0:d.__$title)==null?void 0:f.value,rule:r.rule,options:this.options}):((p=(h=r.refRule)==null?void 0:h.__$title)==null?void 0:p.value)+(a.labelSuffix||a["label-suffix"]||"")];if(!ct(i.show)&&(i.info||i.native)&&!ct(i.icon)){const y={type:i.type||"popover",props:Ri(i),key:`${t}pop`};delete y.props.icon,delete y.props.show,delete y.props.info,delete y.props.align,delete y.props.native;const b="content";i.info&&!ue(y.props,b)&&(y.props[b]=(g=(m=r.refRule)==null?void 0:m.__$info)==null?void 0:g.value),c[i.align!=="left"?"unshift":"push"](this.$r(at([i,y]),{[n.slot||(o?"default":"reference")]:()=>this.$r({type:"ElIcon",style:"top:2px",key:`${t}i`},{default:()=>this.$r({type:i.icon===!0?"icon-warning":i.icon})},!0)}))}const u=at([n,{props:Ri(n),key:`${t}tit`,class:"ab-form-title",type:n.type||"span",on:{click:(...y)=>{this.$handle.targetHook(r,"titleClick",{args:y})}}}]);return delete u.props.show,delete u.props.title,delete u.props.native,this.$r(u,c)},makeCol(e,t,r){const n=M({},e.col);return delete n.show,this.$r({class:this.$render.mergeClass(n.class,"ab-form-col"),type:"col",props:n||{span:24},key:`${t}col`},r)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"ab-form-row"),key:`${this.key}row`},e)},makeFormBtn(){let e=[];if(ct(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),ct(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;const t=this.$r({type:"formItem",class:"ab-form-item",key:`${this.key}fb`},e);return this.rule.props.inline===!0?t:this.$r({type:"col",class:"ab-form-col ab-form-footer",props:{span:24},key:`${this.key}fc`},[t])},makeResetBtn(){const e=M({},this.options.resetBtn),t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-reset-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(r):r.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){const e=M({},this.options.submitBtn),t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-submit-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(r):r.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},Ft={};uw(Ft),dw(Ft),fw(Ft),pw(Ft),hw(Ft),mw(Ft);function uw(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","inputTag","inputOtp","mention","transfer","treeSelect","radio","rate"].forEach(t=>{e[t]=$e(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function dw(e){e.treeSelectMultiple=$e("treeSelect",{multiple:!0})}function fw(e){const t="select",r="multiple";e.selectMultiple=$e(t,{[r]:!0}),e.selectOne=$e(t,{[r]:!1})}function pw(e){const t="tree",r={treeSelected:"selected",treeChecked:"checked"};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,{type:r[i]}),n),e)}function hw(e){const t="upload",r={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,o=>o.props({uploadType:r[i][0],maxLength:r[i][1]})),n),e),e.uploadImage=e.image,e.uploadFile=e.file}function mw(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};return Object.keys(t).reduce((r,n)=>(r[n]=$e("frame",i=>i.props({type:t[n][0],maxLength:t[n][1]})),r),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function bs(e,t){return j.Boolean(e)?e={show:e}:!j.Undef(e)&&!j.Object(e)&&(e={show:t}),e}function gw(e,t){return{formEl(){return t.$manager.form()},wrapEl(r){const n=t.getFieldCtx(r);if(n)return t.vm.refs[n.wrapRef]},validate(r){return new Promise((n,i)=>{const o=e.children,a=[t.$manager.validate()];o.filter(s=>!s.isScope).forEach(s=>{a.push(s.validate())}),Promise.all(a).then(()=>{n(!0),r&&r(!0)}).catch(s=>{i(s),r&&r(s),t.vm.emit("validate-fail",s,{api:e}),t.emitEvent("validate-fail",s,{api:e})})})},validateField(r,n){return new Promise((i,o)=>{const s=typeof r=="object"?Xe(r):t.getCtx(r);if(!s){i(null),n&&n(null);return}const c=t.subForm[s.id],u=[t.$manager.validateField(s.id)];$t(c).filter(d=>!d.isScope).forEach(d=>{u.push(d.validate())}),Promise.all(u).then(()=>{i(null),n&&n(null)}).catch(d=>{o(d),n&&n(d),t.vm.emit("validate-field-fail",d,{field:r,api:e})})})},validateFields(r,n){return new Promise((i,o)=>{Array.isArray(r)||(r=[r]);const a=r.map(s=>e.validateField(s));Promise.all(a).then(()=>{i(null),n&&n(null)}).catch(s=>{o(s),n&&n(s)})})},clearValidateState(r,n=!0){e.helper.tidyFields(r).forEach(i=>{n&&this.clearSubValidateState(i),t.getCtxs(i).forEach(o=>{t.$manager.clearValidateState(o)})})},clearSubValidateState(r){e.helper.tidyFields(r).forEach(n=>{t.getCtxs(n).forEach(i=>{const o=t.subForm[i.id];o&&(Array.isArray(o)?o.forEach(a=>{a.clearValidateState()}):o&&o.clearValidateState())})})},btn:{loading:(r=!0)=>{e.submitBtnProps({loading:!!r})},disabled:(r=!0)=>{e.submitBtnProps({disabled:!!r})},show:(r=!0)=>{e.submitBtnProps({show:!!r})}},resetBtn:{loading:(r=!0)=>{e.resetBtnProps({loading:!!r})},disabled:(r=!0)=>{e.resetBtnProps({disabled:!!r})},show:(r=!0)=>{e.resetBtnProps({show:!!r})}},submitBtnProps:(r={})=>{let n=bs(t.options.submitBtn,!0);ee(n,r),t.options.submitBtn=n,e.refreshOptions()},resetBtnProps:(r={})=>{let n=bs(t.options.resetBtn,!1);ee(n,r),t.options.resetBtn=n,e.refreshOptions()},submit(r,n){return new Promise((i,o)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let s=e.formData();t.beforeSubmit(s).then(()=>{j.Function(r)&&te(()=>r(s,e)),j.Function(t.options.onSubmit)&&te(()=>t.options.onSubmit(s,e)),t.vm.emit("submit",s,e),i(s)}).catch(()=>{})}).catch((...s)=>{j.Function(n)&&te(()=>n(e,...s)),o(...s)})})}}}const ws={name:"required",load(e,t,r){const n=yw(e.getValue());let i;if(n.required===!1)e.clearProp(),r==null||r.clearValidateState([t==null?void 0:t.field]);else{const o=M({required:!0,validator(s,c,u){a(),j.empty(c)?u(o.message):u()}},n),a=()=>{var c;const s=(c=t==null?void 0:t.__fc__.refRule.__$title)==null?void 0:c.value;if(i!==s)if(i=s,!n.message)o.message=(r==null?void 0:r.t("required",{title:s}))||s+((r==null?void 0:r.getLocale())==="en"?" is required":"不能为空");else{const u=n.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);u&&(o.message=r==null?void 0:r.t(u[1],{title:s}))}};a(),e.getProp().validate=[o]}r==null||r.sync(t)},watch(e,t,r){ws.load(e,t,r)}};function yw(e){return j.Boolean(e)?{required:e}:j.String(e)?{message:e}:j.Undef(e)?{required:!1}:j.Function(e)?{validator:e}:j.Object(e)?e:{}}function bw(e,t){const r=e;r.componentAlias(iw),zb.forEach(o=>{const a=o;r.component(a.name,a)}),r.register(ws),nw.forEach(o=>{r.parser(o)});const n=Ft;Object.keys(n).forEach(o=>{r.maker[o]=n[o]});const i=typeof window!="undefined"?window.ElementPlus:void 0;i&&r.useApp((o,a)=>{a.use(i)})}function ww(){return pl({ui:"element-plus",version:"0.1.1",manager:cw,extendApi:gw,install:bw,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}const vs=l.defineComponent({name:"abDrawer",__name:"ab-drawer",props:l.mergeModels({visible:{type:Boolean,default:!1},detailLevel:{default:1}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=e,r=l.useModel(e,"visible"),n=l.computed(()=>t.detailLevel&&t.detailLevel<5?`${76-t.detailLevel*8}%`:"32%");return(i,o)=>{const a=l.resolveComponent("el-drawer");return l.openBlock(),l.createBlock(a,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),"with-header":!1,"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:n.value},{default:l.withCtx(()=>[l.renderSlot(i.$slots,"default")]),_:3},8,["modelValue","size"])}}}),vw=(e,t)=>{e.component("ab-drawer",vs)};var Mi=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,Sw=Object.getOwnPropertyNames,Cw=Object.prototype.hasOwnProperty,$w=(e,t)=>{for(var r in t)Mi(e,r,{get:t[r],enumerable:!0})},Tw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sw(t))!Cw.call(e,i)&&i!==r&&Mi(e,i,{get:()=>t[i],enumerable:!(n=xw(t,i))||n.enumerable});return e},Ew=e=>Tw(Mi({},"__esModule",{value:!0}),e),xs={};$w(xs,{default:()=>_w});var kw=Ew(xs),_w={vxe:{base:{pleaseInput:"请输入",pleaseSelect:"请选择",comma:",",fullStop:"。"},loading:{text:"加载中..."},error:{downErr:"下载失败",errLargeData:"当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿",groupFixed:"如果使用分组表头,冻结列必须按组设置",groupMouseRange:'分组表头与 "{0}" 不能同时使用,这可能会出现错误',groupTag:'分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',scrollErrProp:'启用虚拟滚动后不支持该参数 "{0}"',errConflicts:'参数 "{0}" 与 "{1}" 有冲突',modelConflicts:'绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误',notSupportProp:'当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',reqSupportProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会出现错误',notConflictProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突',unableInsert:"无法插入到指定位置,请检查参数是否正确",useErr:'安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',barUnableLink:"工具栏无法关联表格",expandContent:'展开行的插槽应该是 "content",请检查是否正确',reqComp:'缺少 "{0}" 组件,请检查是否正确安装。 https://vxeui.com/#/start/useUI/useGlobal',reqModule:'缺少 "{0}" 模块',reqProp:'缺少必要的 "{0}" 参数,这可能会导致出现错误',emptyProp:'参数 "{0}" 不允许为空',errProp:'不支持的参数 "{0}",可能为 "{1}"',colRepet:'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',notFunc:'方法 "{0}" 不存在',errFunc:'参数 "{0}" 不是一个方法',notValidators:'全局校验 "{0}" 不存在',notFormats:'全局格式化 "{0}" 不存在',notCommands:'全局指令 "{0}" 不存在',notSlot:'插槽 "{0}" 不存在',noTree:'树结构不支持 "{0}"',noGroup:'数据分组后不支持 "{0}"',notProp:'不支持的参数 "{0}"',returnErr:'参数 "{0}" 的返回值期望是 "{1}" 实际是 "{2}"',notSupportReturn:'当返回值为 "{0}" 时的参数应该使用用 "{1}" 而不是 "{2}"',checkProp:'当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',coverProp:'"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',uniField:'字段名 "{0}" 重复定义,这可能会出现错误',repeatKey:'主键重复 {0}="{1}",这可能会出现错误',repeatProp:'参数重复 {0}="{1}",这可能会出现错误',delFunc:'方法 "{0}" 已废弃,请使用 "{1}"',delProp:'参数 "{0}" 已废弃,请使用 "{1}"',delEvent:'事件 "{0}" 已废弃,请使用 "{1}"',removeProp:'参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误',errFormat:'全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用',notType:'不支持的文件类型 "{0}"',notExp:"该浏览器不支持导入/导出功能",impFields:"导入失败,请检查字段名和数据格式是否正确",treeNotImp:"树表格不支持导入",treeCrossDrag:"只能拖拽第一层级",treeDragChild:"父级不能拖拽到自己的子级中",reqPlugin:'扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"超过支持的最大数据量 {0} 行,这可能会导致出现错误",useNew:"不建议使用 {0},请使用 {1}",errorVersion:"版本不匹配,当前版本 {0},最低支持版本为 {1}",errMaxVersion:"版本不匹配,当前版本 {0},最高支持版本为 {1}"},table:{emptyText:"暂无数据",allTitle:"全选/取消",seqTitle:"序号",actionTitle:"操作",confirmFilter:"筛选",resetFilter:"重置",allFilter:"全部",sortAsc:"升序:最低到最高",sortDesc:"降序:最高到最低",filter:"对所选的列启用筛选",impSuccess:"成功导入 {0} 条记录",expLoading:"正在导出中",expSuccess:"导出成功",expError:"导出失败",expFilename:"导出_{0}",expOriginFilename:"导出_源_{0}",customTitle:"个性化设置",customAll:"全部",customConfirm:"确认",customClose:"关闭",customCancel:"取消",customRestore:"恢复默认",maxFixedCol:"最大冻结列的数量不能超过 {0} 个",maxGroupCol:"最大分组字段的数量不能超过 {0} 个",dragTip:"移动:{0}",resizeColTip:"宽:{0} 像素",resizeRowTip:"高:{0} 像素",rowGroupContentTotal:"{0}({1})",menuLoading:"加载中..."},grid:{selectOneRecord:"请至少选择一条记录!",deleteSelectRecord:"您确定要删除所选记录吗?",removeSelectRecord:"您确定要移除所选记录吗?",dataUnchanged:"数据未改动!",delSuccess:"成功删除所选记录!",saveSuccess:"保存成功!",operError:"发生错误,操作失败!"},select:{clear:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索",loadingText:"加载中...",emptyText:"暂无数据",maxSize:"最大可选择的数量不能超过 {0} 个",overSizeErr:"已超出最大可选数量 {0} 个,超出部分将被忽略!",searchEmpty:"未匹配到数据!"},list:{allChecked:"全选",dragTip:"移动:{0}"},tree:{searchEmpty:"未匹配到数据!",dragTip:"移动:{0}"},treeSelect:{clearChecked:"清除",allChecked:"全选",allExpand:"全部展开",clearExpand:"全部收起",total:"已选 {0} 项",filterCount:"共找到 {0} 条记录",close:"关闭",search:"搜索",emptyText:"暂无数据"},tableSelect:{filterCount:"共找到 {0} 条记录"},pager:{goto:"前往",gotoTitle:"页数",pagesize:"{0}条/页",total:"共 {0} 条记录",pageClassifier:"页",homePage:"首页",homePageTitle:"首页",prevPage:"上一页",prevPageTitle:"上一页",nextPage:"下一页",nextPageTitle:"下一页",prevJump:"向上跳页",prevJumpTitle:"向上跳页",nextJump:"向下跳页",nextJumpTitle:"向下跳页",endPage:"末页",endPageTitle:"末页"},alert:{title:"系统提示"},button:{confirm:"确认",cancel:"取消",clear:"清除"},filter:{search:"搜索"},custom:{cstmTitle:"个性化设置",cstmRestore:"恢复默认",cstmCancel:"取消",cstmConfirm:"确定",cstmConfirmRestore:"请确认是否恢复成默认列配置?",cstmDragTarget:"移动:{0}",setting:{colSort:"排序",sortHelpTip:"点击图标开始拖动",colTitle:"列标题",colResizable:"列宽(像素)",colVisible:"是否显示",colFixed:"冻结列",colFixedMax:"冻结列({0})",colAlign:"对齐方式",colHeadAlign:"表头对齐方式",colFootAlign:"表尾对齐方式",fixedLeft:"左",fixedUnset:"无",fixedRight:"右",alignLeft:"左",alignCenter:"中",alignRight:"右",moveUp:"上移",moveDn:"下移",putTop:"置顶",putBottom:"置尾",moveUpTitle:"点击向上移动",moveDnTitle:"点击向下移动",putTopTitle:"点击置顶",putBottomTitle:"点击置尾",anLeftTitle:"左对齐",anCenterTitle:"居中",anRightTitle:"右对齐"}},import:{modes:{covering:"覆盖方式(直接覆盖表格数据)",insert:"底部追加(在表格的底部追加新数据)",insertTop:"顶部追加(在表格的顶部追加新数据)",insertBottom:"底部追加(在表格的底部追加新数据)"},impTitle:"导入数据",impFile:"文件名",impSelect:"选择文件",impType:"文件类型",impOpts:"参数设置",impMode:"导入模式",impConfirm:"导入",impCancel:"取消"},export:{types:{csv:"CSV (逗号分隔)(*.csv)",html:"网页(*.html)",xml:"XML 数据(*.xml)",txt:"文本文件(制表符分隔)(*.txt)",xls:"Excel 97-2003 工作簿(*.xls)",xlsx:"Excel 工作簿(*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"空数据",current:"当前数据(当前页的数据)",selected:"选中数据(当前页选中的数据)",all:"全量数据(包括所有分页的数据)"},printTitle:"打印数据",expTitle:"导出数据",expName:"文件名",expNamePlaceholder:"请输入文件名",expSheetName:"标题",expSheetNamePlaceholder:"请输入标题",expType:"保存类型",expMode:"选择数据",expCurrentColumn:"全部字段",expColumn:"选择字段",widthMode:"列宽设置",wModeTitle:"设置打印时列宽的渲染方式",wdModes:{default:"默认",auto:"自适应(根据内容自适应列宽)",scale:"等比例(根据页面比例渲染列宽)"},expOpts:"参数设置",expOptHeader:"表头",expHeaderTitle:"是否需要表头",expOptFooter:"表尾",expFooterTitle:"是否需要表尾",expOptColgroup:"分组表头",expOptTitle:"列标题",expTitleTitle:"是否为列标题,否则显示为列的字段名",expColgroupTitle:"如果存在,则支持带有分组结构的表头",expOptMerge:"合并",expMergeTitle:"如果存在,则支持带有合并结构的单元格",expOptAllExpand:"展开树",expAllExpandTitle:"如果存在,则支持将带有层级结构的数据全部展开",expOptTreeAllExpand:"展开树",expTreeAllExpandTitle:"如果存在,则自动展开所有树层级",expOptRowGroupAllExpand:"展开分组",expRowGroupAllExpandTitle:"如果存在,则自动展开所有分组层级",expOptUseStyle:"样式",expUseStyleTitle:"如果存在,则支持带样式的单元格",expOptOriginal:"源数据",expOriginalTitle:"如果为源数据,则支持导入到表格中",expPrint:"打印",expConfirm:"导出",expCancel:"取消"},modal:{errTitle:"错误提示",zoomMin:"最小化",zoomIn:"最大化",zoomOut:"还原",close:"关闭",miniMaxSize:"最小化窗口的数量不能超过 {0} 个",footPropErr:"show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用"},drawer:{close:"关闭"},form:{folding:"收起",unfolding:"展开"},toolbar:{import:"导入",export:"导出",print:"打印",refresh:"刷新",zoomIn:"全屏",zoomOut:"还原",custom:"个性化设置",customAll:"全部",customConfirm:"确认",customRestore:"重置",fixedLeft:"冻结在左侧",fixedRight:"冻结在右侧",cancelFixed:"取消冻结列"},iconPicker:{search:"搜索",emptyText:"暂无数据"},datePicker:{yearTitle:"{0} 年"},dateRangePicker:{pleaseRange:"请选择开始日期与结束日期"},input:{date:{m1:"01 月",m2:"02 月",m3:"03 月",m4:"04 月",m5:"05 月",m6:"06 月",m7:"07 月",m8:"08 月",m9:"09 月",m10:"10 月",m11:"11 月",m12:"12 月",quarterLabel:"{0} 年",monthLabel:"{0} 年",dayLabel:"{0} 年 {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"yyyy 年第 WW 周",month:"yyyy-MM",quarter:"yyyy 年第 q 季度",year:"yyyy"},weeks:{w:"",w0:"周日",w1:"周一",w2:"周二",w3:"周三",w4:"周四",w5:"周五",w6:"周六"},months:{m0:"一月",m1:"二月",m2:"三月",m3:"四月",m4:"五月",m5:"六月",m6:"七月",m7:"八月",m8:"九月",m9:"十月",m10:"十一月",m11:"十二月"},quarters:{q1:"第一季度",q2:"第二季度",q3:"第三季度",q4:"第四季度"}}},calendar:{yearLabel:"{0} 年",monthLabel:"{0} 月"},cascader:{clearChecked:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索"},numberInput:{currencySymbol:"¥"},imagePreview:{popupTitle:"预览",operBtn:{zoomOut:"缩小",zoomIn:"放大",pctFull:"等比例缩放",pct11:"显示原始尺寸",rotateLeft:"向左旋转",rotateRight:"向右旋转",print:"点击打印图片",download:"点击下载图片"}},upload:{fileBtnText:"点击或拖拽上传",imgBtnText:"点击或拖拽上传",dragPlaceholder:"请把文件拖放到这个区域即可上传",imgSizeHint:"单张{0}",imgCountHint:"最多{0}张",fileTypeHint:"支持 {0} 文件类型",fileSizeHint:"单个文件大小不超过{0}",fileCountHint:"最多可上传{0}个文件",uploadTypeErr:"文件类型不匹配!",overCountErr:"最多只能选择{0}个文件!",overCountExtraErr:"已超出最大数量{0}个,超出的{1}个文件将被忽略!",overSizeErr:"文件大小最大不能超过{0}!",manualUpload:"点击上传",reUpload:"重新上传",uploadProgress:"上传中 {0}%",uploadErr:"上传失败",uploadSuccess:"上传成功",moreBtnText:"更多({0})",moreImgBtnText:"图片({0})",moreFileBtnText:"文件({0})",viewItemTitle:"点击查看",morePopup:{readTitle:"查看列表",imageTitle:"上传图片",fileTitle:"上传文件"}},empty:{defText:"暂无数据"},colorPicker:{clear:"清除",confirm:"确认",copySuccess:"已复制到剪贴板:{0}",hex:"十六进制"},formDesign:{formName:"表单名称",defFormTitle:"未命名的表单",widgetPropTab:"控件属性",widgetFormTab:"表单属性",error:{wdFormUni:"该类型的控件在表单中只允许添加一个",wdSubUni:"该类型的控件在子表中只允许添加一个"},styleSetting:{btn:"样式设置",title:"表单的样式设置",layoutTitle:"控件布局",verticalLayout:"上下布局",horizontalLayout:"横向布局",styleTitle:"标题样式",boldTitle:"标题加粗",fontBold:"加粗",fontNormal:"常规",colonTitle:"显示冒号",colonVisible:"显示",colonHidden:"隐藏",alignTitle:"对齐方式",widthTitle:"标题宽度",alignLeft:"居左",alignRight:"居右",unitPx:"像素",unitPct:"百分比"},widget:{group:{base:"基础控件",layout:"布局控件",system:"系统控件",module:"模块控件",chart:"图表控件",advanced:"高级控件"},copyTitle:"副本_{0}",component:{input:"输入框",textarea:"文本域",select:"下拉选择",row:"一行多列",title:"标题",text:"文本",subtable:"子表",VxeSwitch:"是/否",VxeInput:"输入框",VxeNumberInput:"数字",VxeDatePicker:"日期",VxeTextarea:"文本域",VxeSelect:"下拉选择",VxeTreeSelect:"树形选择",VxeRadioGroup:"单选框",VxeCheckboxGroup:"复选框",VxeUploadFile:"文件",VxeUploadImage:"图片",VxeRate:"评分",VxeSlider:"滑块"},row:{placeholder:"控件位置"}},widgetProp:{name:"控件名称",placeholder:"提示语",required:"必填校验",multiple:"允许多选",displaySetting:{name:"显示设置",pc:"电脑端",mobile:"手机端",visible:"显示",hidden:"隐藏"},dataSource:{name:"数据源",defValue:"选项{0}",addOption:"添加选项",batchEditOption:"批量编辑",batchEditTip:"每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。",batchEditSubTip:"每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。",buildOption:"生成选项"},rowProp:{colSize:"列数",col2:"两列",col3:"三列",col4:"四列",col6:"六列",layout:"布局"},textProp:{name:"内容",alignTitle:"对齐方式",alignLeft:"居左",alignCenter:"居中",alignRight:"居右",colorTitle:"字体颜色",sizeTitle:"字体大小",boldTitle:"字体加粗",fontNormal:"常规",fontBold:"加粗"},subtableProp:{seqTitle:"序号",showSeq:"显示序号",showCheckbox:"允许多选",errSubDrag:"子表不支持该控件,请使用其他控件",colPlace:"将控件拖拽进来"},uploadProp:{limitFileCount:"文件数量限制",limitFileSize:"文件大小限制",multiFile:"允许上传多个文件",limitImgCount:"图片数量限制",limitImgSize:"图片大小限制",multiImg:"允许上传多张图片"},rules:{required:"必填字段"}}},listDesign:{fieldSettingTab:"字段设置",listSettingTab:"参数设置",searchTitle:"查询条件",listTitle:"列表字段",searchField:"查询字段",listField:"列表字段",activeBtn:{ActionButtonUpdate:"编辑",ActionButtonDelete:"删除"},search:{addBtn:"编辑",emptyText:"未配置查询条件",editPopupTitle:"编辑查询字段"},searchPopup:{colTitle:"标题",saveBtn:"保存"}},text:{copySuccess:"已复制到剪贴板",copyError:"当前环境不支持该操作"},countdown:{formats:{yyyy:"年",MM:"月",dd:"天",HH:"时",mm:"分",ss:"秒"}},contextMenu:{loadingText:"加载中..."},switch:{onText:"打开",offText:"关闭"},gantt:{tFullFormat:{year:"{yyyy}年",quarter:"{yyyy}年第{q}季度",month:"{yyyy}年{MM}月",week:"{yyyy}年第{W}周",day:"{yyyy}年{MM}月 {eLabel}",date:"{yyyy}年{MM}月{dd}日",hour:"{yyyy}年{MM}月{dd}日{HH}时",minute:"{yyyy}年{MM}月{dd}日{HH}时{mm}分",second:"{yyyy}年{MM}月{dd}日{HH}时{mm}分{ss}秒"},tSimpleFormat:{year:"{yyyy}年",quarter:"{q}季度",month:"{M}月",week:"{W}周",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}年",quarter:"{start.q}~{end.q}季度",month:"{start.M}~{end.M}月",week:"{start.W}~{end.W}周",day:"{eStartLabel}~{eEndLabel}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"},days:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"}},plugins:{extendCellArea:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",selectErr:"无法操作指定区域的单元格",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作",cpInvalidErr:"该操作无法进行,您选择的区域中存在被禁止的列({0})"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},body:{row:"行:{0}",col:"列:{0}"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},extendPivotTable:{aggregation:{grouping:"分组",values:"值",groupPlaceholder:"拖至此处进行分组",valuesPlaceholder:"拖至此处进行聚合",dragExistCol:"该列已存在",sortHelpTip:"点击图标开始拖动"},aggFuncs:{sum:"求和",count:"计数",avg:"平均值",min:"最小值",max:"最大值",first:"首个值",last:"末尾值"}},filterComplexInput:{menus:{fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧"},cases:{equal:"等于",gt:"大于",lt:"小于",begin:"开头是",endin:"结尾是",include:"包含",isSensitive:"区分大小写"}},filterCombination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",isAfter:"在以下日期之后",eqAfter:"在以下日期之后或与之相同",isBefore:"在以下日期之前",eqBefore:"在以下日期之前或与之相同",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",before:"之前",after:"之后",tomorrow:"明天",today:"今天",yesterday:"昨天",nextWeek:"下周",thisWeek:"本周",lastWeek:"上周",nextMonth:"下月",thisMonth:"本月",lastMonth:"上月",nextYear:"明年",thisYear:"今年",lastYear:"去年",yearToDate:"本年度截止到现在",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},empty:"(空白)",notData:"无匹配项"}},pro:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},renderer:{search:"搜索",cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},combination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结到左侧",fixedRight:"冻结到右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},empty:"(空白)",notData:"无匹配项"}}}};const Fw=jt(kw);var Di=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Ow=Object.getOwnPropertyNames,Rw=Object.prototype.hasOwnProperty,Mw=(e,t)=>{for(var r in t)Di(e,r,{get:t[r],enumerable:!0})},Dw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ow(t))!Rw.call(e,i)&&i!==r&&Di(e,i,{get:()=>t[i],enumerable:!(n=Aw(t,i))||n.enumerable});return e},Pw=e=>Dw(Di({},"__esModule",{value:!0}),e),Ss={};Mw(Ss,{default:()=>Bw});var Iw=Pw(Ss),Bw={vxe:{base:{pleaseInput:"Please enter",pleaseSelect:"Please select",comma:",",fullStop:"."},loading:{text:"Loading..."},error:{downErr:"Download failed",errLargeData:"When the bound data volume is too large, please use {0}; otherwise, performance may lag",groupFixed:"If grouped headers are used, fixed columns must be set by group",groupMouseRange:'Grouped headers cannot be used together with "{0}", which may cause errors',groupTag:'Group columns should use "{0}" instead of "{1}", which may cause errors',scrollErrProp:'The parameter "{0}" is not supported after virtual scrolling is enabled',errConflicts:'Parameter "{0}" conflicts with "{1}"',modelConflicts:'The bound field value "{0}" conflicts with "{1}", which will cause errors',notSupportProp:'When parameter "{0}" is enabled, "{1}" is not supported; it should be "{2}", otherwise errors may occur',reqSupportProp:'When using "{0}", "{1}" should be set, otherwise errors may occur',notConflictProp:'When using "{0}", "{1}" should be set, otherwise functional conflicts may occur',unableInsert:"Unable to insert at the specified position. Please check whether the parameters are correct",useErr:'An error occurred while installing the "{0}" module. The order may be incorrect; dependent modules must be installed before Table',barUnableLink:"The toolbar cannot be linked to the table",expandContent:'The slot for the expanded row should be "content". Please check whether it is correct',reqComp:'Missing "{0}" component. Please check whether it is installed correctly. https://vxeui.com/#/start/useUI/useGlobal',reqModule:'Missing "{0}" module',reqProp:'Missing required parameter "{0}", which may cause errors',emptyProp:'Parameter "{0}" cannot be empty',errProp:'Unsupported parameter "{0}", possibly "{1}"',colRepet:'column.{0}="{1}" is duplicated, which may cause some features to be unavailable',notFunc:'Method "{0}" does not exist',errFunc:'Parameter "{0}" is not a method',notValidators:'Global validator "{0}" does not exist',notFormats:'Global formatter "{0}" does not exist',notCommands:'Global command "{0}" does not exist',notSlot:'Slot "{0}" does not exist',noTree:'Tree structure does not support "{0}"',noGroup:'"{0}" is not supported after data grouping',notProp:'Unsupported parameter "{0}"',returnErr:'The return value of parameter "{0}" is expected to be "{1}" but is actually "{2}"',notSupportReturn:'When the return value is "{0}", the parameter should use "{1}" instead of "{2}"',checkProp:'Large data volumes may cause checkbox lag. It is recommended to set parameter "{0}" to improve rendering speed',coverProp:'Parameter "{1}" of "{0}" is defined repeatedly, which may cause errors',uniField:'Field name "{0}" is defined repeatedly, which may cause errors',repeatKey:'Duplicate primary key {0}="{1}", which may cause errors',repeatProp:'Duplicate parameter {0}="{1}", which may cause errors',delFunc:'Method "{0}" is deprecated. Please use "{1}"',delProp:'Parameter "{0}" is deprecated. Please use "{1}"',delEvent:'Event "{0}" is deprecated. Please use "{1}"',removeProp:'Parameter "{0}" is deprecated and not recommended, which may cause errors',errFormat:'Global formatting content should be defined using "VXETable.formats". Mounting "formatter={0}" is no longer recommended',notType:'Unsupported file type "{0}"',notExp:"This browser does not support import/export",impFields:"Import failed. Please check whether field names and data formats are correct",treeNotImp:"Tree table does not support import",treeCrossDrag:"Only the first level can be dragged",treeDragChild:"A parent cannot be dragged into its own children",reqPlugin:'Extension plugin "{1}" is not installed. https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"Exceeds the maximum supported data volume of {0} rows, which may cause errors",useNew:"{0} is not recommended. Please use {1}",errorVersion:"Version mismatch. Current version is {0}, minimum supported version is {1}",errMaxVersion:"Version mismatch. Current version is {0}, maximum supported version is {1}"},table:{emptyText:"No data",allTitle:"Select all/Clear",seqTitle:"No.",actionTitle:"Actions",confirmFilter:"Filter",resetFilter:"Reset",allFilter:"All",sortAsc:"Ascending: lowest to highest",sortDesc:"Descending: highest to lowest",filter:"Enable filtering for the selected column",impSuccess:"Successfully imported {0} records",expLoading:"Exporting",expSuccess:"Export successful",expError:"Export failed",expFilename:"Export_{0}",expOriginFilename:"Export_Source_{0}",customTitle:"Custom settings",customAll:"All",customConfirm:"Confirm",customClose:"Close",customCancel:"Cancel",customRestore:"Restore defaults",maxFixedCol:"The maximum number of fixed columns cannot exceed {0}",maxGroupCol:"The maximum number of grouped fields cannot exceed {0}",dragTip:"Move: {0}",resizeColTip:"Width: {0} px",resizeRowTip:"Height: {0} px",rowGroupContentTotal:"{0} ({1})",menuLoading:"Loading..."},grid:{selectOneRecord:"Please select at least one record!",deleteSelectRecord:"Are you sure you want to delete the selected records?",removeSelectRecord:"Are you sure you want to remove the selected records?",dataUnchanged:"Data has not changed!",delSuccess:"Selected records deleted successfully!",saveSuccess:"Saved successfully!",operError:"An error occurred. Operation failed!"},select:{clear:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search",loadingText:"Loading...",emptyText:"No data",maxSize:"The maximum number of selectable items cannot exceed {0}",overSizeErr:"The maximum selectable count of {0} has been exceeded. The excess will be ignored!",searchEmpty:"No matching data!"},list:{allChecked:"All",dragTip:"Move: {0}"},tree:{searchEmpty:"No matching data!",dragTip:"Move: {0}"},treeSelect:{clearChecked:"Clear",allChecked:"All",allExpand:"Expand all",clearExpand:"Collapse all",total:"{0} selected",filterCount:"{0} records found",close:"Close",search:"Search",emptyText:"No data"},tableSelect:{filterCount:"{0} records found"},pager:{goto:"Go to",gotoTitle:"Page",pagesize:"{0}/page",total:"Total {0} records",pageClassifier:"Page",homePage:"Home",homePageTitle:"Home",prevPage:"Previous",prevPageTitle:"Previous",nextPage:"Next",nextPageTitle:"Next",prevJump:"Jump up",prevJumpTitle:"Jump up",nextJump:"Jump down",nextJumpTitle:"Jump down",endPage:"Last",endPageTitle:"Last"},alert:{title:"System prompt"},button:{confirm:"Confirm",cancel:"Cancel",clear:"Clear"},filter:{search:"Search"},custom:{cstmTitle:"Custom settings",cstmRestore:"Restore defaults",cstmCancel:"Cancel",cstmConfirm:"OK",cstmConfirmRestore:"Are you sure you want to restore the default column configuration?",cstmDragTarget:"Move: {0}",setting:{colSort:"Sort",sortHelpTip:"Click the icon to start dragging",colTitle:"Column title",colResizable:"Column width (px)",colVisible:"Visible",colFixed:"Fixed column",colFixedMax:"Fixed columns ({0})",colAlign:"Alignment",colHeadAlign:"Header alignment",colFootAlign:"Footer alignment",fixedLeft:"Left",fixedUnset:"None",fixedRight:"Right",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",moveUp:"Up",moveDn:"Down",putTop:"Top",putBottom:"Bottom",moveUpTitle:"Click to move up",moveDnTitle:"Click to move down",putTopTitle:"Click to move to top",putBottomTitle:"Click to move to bottom",anLeftTitle:"Align left",anCenterTitle:"Align center",anRightTitle:"Align right"}},import:{modes:{covering:"Cover (directly overwrite table data)",insert:"Append at bottom (append new data to the bottom of the table)",insertTop:"Append at top (append new data to the top of the table)",insertBottom:"Append at bottom (append new data to the bottom of the table)"},impTitle:"Import data",impFile:"File name",impSelect:"Select file",impType:"File type",impOpts:"Options",impMode:"Import mode",impConfirm:"Import",impCancel:"Cancel"},export:{types:{csv:"CSV (comma separated)(*.csv)",html:"Web page (*.html)",xml:"XML data (*.xml)",txt:"Text file (tab separated)(*.txt)",xls:"Excel 97-2003 Workbook (*.xls)",xlsx:"Excel workbook (*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"Empty data",current:"Current data (data on the current page)",selected:"Selected data (data selected on the current page)",all:"All data (including data on all pages)"},printTitle:"Print data",expTitle:"Export data",expName:"File name",expNamePlaceholder:"Please enter a file name",expSheetName:"Title",expSheetNamePlaceholder:"Please enter a title",expType:"Save type",expMode:"Select data",expCurrentColumn:"All fields",expColumn:"Select fields",widthMode:"Column width settings",wModeTitle:"Set how column widths are rendered when printing",wdModes:{default:"Default",auto:"Auto (adjust column widths based on content)",scale:"Scale (render column widths according to page scale)"},expOpts:"Options",expOptHeader:"Header",expHeaderTitle:"Whether a header is needed",expOptFooter:"Footer",expFooterTitle:"Whether a footer is needed",expOptColgroup:"Grouped header",expOptTitle:"Column titles",expTitleTitle:"Whether to use column titles; otherwise, display field names",expColgroupTitle:"If present, supports headers with grouped structure",expOptMerge:"Merge",expMergeTitle:"If present, supports cells with merged structure",expOptAllExpand:"Expand tree",expAllExpandTitle:"If present, supports fully expanding hierarchical data",expOptTreeAllExpand:"Expand tree",expTreeAllExpandTitle:"If present, automatically expands all tree levels",expOptRowGroupAllExpand:"Expand groups",expRowGroupAllExpandTitle:"If present, automatically expands all group levels",expOptUseStyle:"Styles",expUseStyleTitle:"If present, supports styled cells",expOptOriginal:"Source data",expOriginalTitle:"If source data, supports importing into the table",expPrint:"Print",expConfirm:"Export",expCancel:"Cancel"},modal:{errTitle:"Error",zoomMin:"Minimize",zoomIn:"Maximize",zoomOut:"Restore",close:"Close",miniMaxSize:"The number of minimized windows cannot exceed {0}",footPropErr:"show-footer is only used to enable the footer and must be used with show-confirm-button | show-cancel-button | slots"},drawer:{close:"Close"},form:{folding:"Collapse",unfolding:"Expand"},toolbar:{import:"Import",export:"Export",print:"Print",refresh:"Refresh",zoomIn:"Fullscreen",zoomOut:"Restore",custom:"Custom settings",customAll:"All",customConfirm:"Confirm",customRestore:"Reset",fixedLeft:"Freeze left",fixedRight:"Freeze right",cancelFixed:"Unfreeze"},iconPicker:{search:"Search",emptyText:"No data"},datePicker:{yearTitle:"{0}"},dateRangePicker:{pleaseRange:"Please select a start date and an end date"},input:{date:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec",quarterLabel:"{0}",monthLabel:"{0}",dayLabel:"{0} {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"Week WW, yyyy",month:"yyyy-MM",quarter:"Qq yyyy",year:"yyyy"},weeks:{w:"",w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},months:{m0:"January",m1:"February",m2:"March",m3:"April",m4:"May",m5:"June",m6:"July",m7:"August",m8:"September",m9:"October",m10:"November",m11:"December"},quarters:{q1:"Q1",q2:"Q2",q3:"Q3",q4:"Q4"}}},calendar:{yearLabel:"{0}",monthLabel:"{0}"},cascader:{clearChecked:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search"},numberInput:{currencySymbol:"$"},imagePreview:{popupTitle:"Preview",operBtn:{zoomOut:"Zoom out",zoomIn:"Zoom in",pctFull:"Fit to page",pct11:"Original size",rotateLeft:"Rotate left",rotateRight:"Rotate right",print:"Click to print image",download:"Click to download image"}},upload:{fileBtnText:"Click or drag to upload",imgBtnText:"Click or drag to upload",dragPlaceholder:"Drag files here to upload",imgSizeHint:"Single image {0}",imgCountHint:"Up to {0} images",fileTypeHint:"Supports {0} file types",fileSizeHint:"Single file size must not exceed {0}",fileCountHint:"Up to {0} files can be uploaded",uploadTypeErr:"File type mismatch!",overCountErr:"You can select up to {0} files!",overCountExtraErr:"The maximum count of {0} has been exceeded. The excess {1} files will be ignored!",overSizeErr:"File size cannot exceed {0}!",manualUpload:"Click to upload",reUpload:"Re-upload",uploadProgress:"Uploading {0}%",uploadErr:"Upload failed",uploadSuccess:"Upload successful",moreBtnText:"More ({0})",moreImgBtnText:"Images ({0})",moreFileBtnText:"Files ({0})",viewItemTitle:"Click to view",morePopup:{readTitle:"View list",imageTitle:"Upload images",fileTitle:"Upload files"}},empty:{defText:"No data"},colorPicker:{clear:"Clear",confirm:"Confirm",copySuccess:"Copied to clipboard: {0}",hex:"HEX"},formDesign:{formName:"Form name",defFormTitle:"Untitled form",widgetPropTab:"Widget properties",widgetFormTab:"Form properties",error:{wdFormUni:"Only one widget of this type can be added to the form",wdSubUni:"Only one widget of this type can be added to the subtable"},styleSetting:{btn:"Style settings",title:"Form style settings",layoutTitle:"Widget layout",verticalLayout:"Vertical layout",horizontalLayout:"Horizontal layout",styleTitle:"Title style",boldTitle:"Bold title",fontBold:"Bold",fontNormal:"Normal",colonTitle:"Show colon",colonVisible:"Show",colonHidden:"Hide",alignTitle:"Alignment",widthTitle:"Title width",alignLeft:"Left",alignRight:"Right",unitPx:"px",unitPct:"%"},widget:{group:{base:"Basic widgets",layout:"Layout widgets",system:"System widgets",module:"Module widgets",chart:"Chart widgets",advanced:"Advanced widgets"},copyTitle:"Copy_{0}",component:{input:"Input",textarea:"Textarea",select:"Select",row:"Row with multiple columns",title:"Title",text:"Text",subtable:"Subtable",VxeSwitch:"Yes/No",VxeInput:"Input",VxeNumberInput:"Number",VxeDatePicker:"Date",VxeTextarea:"Textarea",VxeSelect:"Select",VxeTreeSelect:"Tree select",VxeRadioGroup:"Radio group",VxeCheckboxGroup:"Checkbox group",VxeUploadFile:"File",VxeUploadImage:"Image",VxeRate:"Rate",VxeSlider:"Slider"},row:{placeholder:"widget position"}},widgetProp:{name:"Widget name",placeholder:"Placeholder",required:"Required validation",multiple:"Allow multiple selection",displaySetting:{name:"Display settings",pc:"Desktop",mobile:"Mobile",visible:"Visible",hidden:"Hidden"},dataSource:{name:"Data source",defValue:"Option {0}",addOption:"Add option",batchEditOption:"Batch edit",batchEditTip:"Each line corresponds to one option. You can copy and paste directly from tables, Excel, or WPS.",batchEditSubTip:"Each line corresponds to one option. For groups, sub-items can start with spaces or tabs. You can copy and paste directly from tables, Excel, or WPS.",buildOption:"Generate options"},rowProp:{colSize:"Columns",col2:"Two columns",col3:"Three columns",col4:"Four columns",col6:"Six columns",layout:"Layout"},textProp:{name:"Content",alignTitle:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",colorTitle:"Font color",sizeTitle:"Font size",boldTitle:"Bold font",fontNormal:"Normal",fontBold:"Bold"},subtableProp:{seqTitle:"No.",showSeq:"Show row number",showCheckbox:"Allow multiple selection",errSubDrag:"This widget is not supported in subtables. Please use another widget",colPlace:"Drag a widget here"},uploadProp:{limitFileCount:"File count limit",limitFileSize:"File size limit",multiFile:"Allow uploading multiple files",limitImgCount:"Image count limit",limitImgSize:"Image size limit",multiImg:"Allow uploading multiple images"},rules:{required:"Required field"}}},listDesign:{fieldSettingTab:"Field settings",listSettingTab:"Options",searchTitle:"Search conditions",listTitle:"List fields",searchField:"Search field",listField:"List field",activeBtn:{ActionButtonUpdate:"Edit",ActionButtonDelete:"Delete"},search:{addBtn:"Edit",emptyText:"No search conditions configured",editPopupTitle:"Edit search field"},searchPopup:{colTitle:"Title",saveBtn:"Save"}},text:{copySuccess:"Copied to clipboard",copyError:"This operation is not supported in the current environment"},countdown:{formats:{yyyy:"Year",MM:"Month",dd:"Day",HH:"Hour",mm:"Minute",ss:"Second"}},contextMenu:{loadingText:"Loading..."},switch:{onText:"On",offText:"Off"},gantt:{tFullFormat:{year:"{yyyy}",quarter:"Q{q} {yyyy}",month:"{MM}/{yyyy}",week:"Week {W}, {yyyy}",day:"{MM}/{dd}/{yyyy} {eLabel}",date:"{MM}/{dd}/{yyyy}",hour:"{MM}/{dd}/{yyyy} {HH}:00",minute:"{MM}/{dd}/{yyyy} {HH}:{mm}",second:"{MM}/{dd}/{yyyy} {HH}:{mm}:{ss}"},tSimpleFormat:{year:"{yyyy}",quarter:"Q{q}",month:"{M}",week:"W{W}",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}",quarter:"Q{start.q}~Q{end.q}",month:"{start.M}~{end.M}",week:"W{start.W}~W{end.W}",day:"{sE}~{eE}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},days:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"}},plugins:{extendCellArea:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",selectErr:"Cannot operate on cells in the specified area",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation",cpInvalidErr:"This operation cannot be performed because the selected area contains prohibited columns ({0})"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},body:{row:"Row: {0}",col:"Column: {0}"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},extendPivotTable:{aggregation:{grouping:"Group",values:"Values",groupPlaceholder:"Drag here to group",valuesPlaceholder:"Drag here to aggregate",dragExistCol:"This column already exists",sortHelpTip:"Click the icon to start dragging"},aggFuncs:{sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max",first:"First",last:"Last"}},filterComplexInput:{menus:{fixedColumn:"Fixed column",fixedGroup:"Fixed group",cancelFixed:"Unfix",fixedLeft:"Fix left",fixedRight:"Fix right"},cases:{equal:"Equals",gt:"Greater",lt:"Less",begin:"Begins",endin:"Ends",include:"Contains",isSensitive:"Case sensitive"}},filterCombination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Available? Represents a single character<br/>Use * Represents any multiple characters"},cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Start",notbegin:"It's not at the beginning",endin:"End",notendin:"The ending is not",include:"Include",exclude:"Not included",between:"Between",isAfter:"Is after",eqAfter:"Is on or after",isBefore:"Is before",eqBefore:"Is on or before",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",before:"Before",after:"After",tomorrow:"Tomorrow",today:"Today",yesterday:"Yesterday",nextWeek:"Next Week",thisWeek:"This Week",lastWeek:"Last Week",nextMonth:"Next Month",thisMonth:"This Month",lastMonth:"Last Month",nextYear:"Next Year",thisYear:"This Year",lastYear:"Last Year",yearToDate:"Year to Date",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},empty:"(blank)",notData:"No matches"}},pro:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},renderer:{search:"Search",cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Begins",notbegin:"Not begin",endin:"Ends",notendin:"Not end",include:"Contains",exclude:"Not contain",between:"Between",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},combination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Use ? for a single character<br/>Use * for any number of characters"},empty:"(blank)",notData:"No matches"}}}};const jw=jt(Iw);Mt.VxeUI.setI18n("zh-CN",Fw),Mt.VxeUI.setI18n("en-US",jw);const Nw=(e,t)=>{e.component("ab-drawer",vs),e.component("ab-table",bl),e.component("ab-table-detail",ka);const{isZhCN:r}=Ce();r()?Mt.VxeUI.setLanguage("zh-CN"):Mt.VxeUI.setLanguage("en-US")},Vw={class:"ab-detail__title"},Lw=l.defineComponent({name:"AbDetail",__name:"ab-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open","close"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(),c=l.ref({}),u=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.readonly);l.watch(()=>i.readonly,x=>f.value=x,{immediate:!0}),l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");const h=l.computed(()=>i.id),p=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),m=l.computed(()=>p.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:f.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),g=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),y=()=>{var x;f.value=!1,(x=c.value)==null||x.refresh()},b=()=>ye(this,null,function*(){T.value=!0;let x;p.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!p.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),T.value=!1}),S=()=>{var x;f.value=!0,(x=c.value)==null||x.refresh()},$=()=>V(),L=l.computed(()=>{let x=dt(g.value.find(_=>_.type!==fe.OPERATE&&_.field===fe.OPERATE));return x||(x={type:"ElRow",field:fe.OPERATE,title:"操作",width:260,fixed:"right",children:[]}),x.children=vt(x==null?void 0:x.children,_=>_.field!==fe.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!f.value},on:{click:y}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:f.value},on:{click:b}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:f.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:$}}),x}),R=l.computed(()=>l.reactive(vt(g.value,x=>x.type!==fe.OPERATE&&x.field!==fe.OPERATE).map(x=>Nf(x,(_,F)=>{if(F==="component"&&_&&typeof _=="object")return l.markRaw(l.toRaw(_))})))),T=l.ref(!1),E=()=>ye(this,null,function*(){T.value=!0,console.log("abDetail.init: ",h==null?void 0:h.value,L.value),h.value&&typeof i.getHandler=="function"?d.value=yield i.getHandler(h.value):d.value={},T.value=!1});l.onMounted(()=>E());const k=(x=void 0,_=!1)=>ye(this,null,function*(){var F,A;if(f.value=_,T.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=dt(x)||{};(F=i.rule)==null||F.forEach(B=>{const I=typeof B.getRule=="function"?B.getRule():B;I.field&&I.field!==fe.OPERATE&&typeof(C==null?void 0:C[I.field])=="undefined"&&typeof I.edit=="undefined"&&typeof I.itemRender=="undefined"&&(C[I.field]="")}),d.value=C}yield l.nextTick(),(A=c.value)==null||A.refresh(),n("open",d.value),T.value=!1}),V=()=>{f.value=!0,d.value={},n("close")};return t({open:k,close:V,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):V(),reload:()=>ye(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,f.value)})}),(x,_)=>{const F=l.resolveComponent("el-card"),A=l.resolveComponent("ab-form"),C=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(F,{class:"ab-detail__header w-full sticky top-0 z-9",shadow:"never"},{default:l.withCtx(()=>[l.createElementVNode("div",Vw,l.toDisplayString(m.value),1),l.withDirectives(l.createVNode(jr,{class:"ab-detail__opr","permi-prefix":e.permiPrefix,rule:L.value,"model-value":d.value,api:u.value,"onUpdate:api":_[0]||(_[0]=B=>u.value=B),plain:"",readonly:f.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,T.value]])]),_:1}),l.createVNode(F,{class:"ab-detail__form",shadow:"never"},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(A,{ref_key:"formRef",ref:s,rule:R.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=B=>d.value=B),api:c.value,"onUpdate:api":_[2]||(_[2]=B=>c.value=B),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:f.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,T.value]])]),_:1})],64)}}}),Hw=(e,t)=>{e.component("ab-detail",Lw)},zw={key:0,class:"ab-toolbar__title"},Uw={class:"ab-toolbar__title"},qw=l.defineComponent({name:"AbToolbar",__name:"ab-toolbar",props:l.mergeModels({title:{},permiPrefix:{},rule:{},queryHandler:{},refreshEnable:{type:Boolean,default:!0},exportEnable:{type:Boolean,default:!1},settingEnable:{type:Boolean,default:!0},btnTreeEnable:{type:Boolean},classNmae:{}},{vertical:{type:Boolean,default:!1},verticalModifiers:{}}),emits:["update:vertical"],setup(e,{expose:t}){const r=e,n=l.inject("abTableRef",null),i=ut.useRoute(),{wsCache:o}=Ce(),a=l.computed(()=>o.getCurrentSize||"default"),s=l.computed(()=>$a(a.value));l.useModel(e,"vertical");const c=l.ref(!1),u=l.computed(()=>{var g;if(!r.rule||Array.isArray(r.rule)&&!((g=r.rule)!=null&&g.length))return;const p=dt(r.rule);return Array.isArray(p)?{type:"ElRow",children:[...p]}:p}),d=l.computed(()=>{var p;if(r.queryHandler)return r.queryHandler;if(typeof((p=n==null?void 0:n.value)==null?void 0:p.reload)=="function")return n.value.reload}),f=l.ref();return l.onMounted(()=>{var p;(p=n.value)==null||p.tableRef.connect(f.value)}),t({getTitle:()=>r.title}),(p,m)=>{const g=l.resolveComponent("vxe-toolbar");return l.openBlock(),l.createBlock(g,{ref_key:"toolbarRef",ref:f,class:"ab-toolbar","class-name":e.classNmae,size:s.value,loading:c.value,export:e.exportEnable,refresh:e.refreshEnable,"refresh-options":e.refreshEnable&&d.value?{queryMethod:d.value}:void 0,custom:!!e.settingEnable},{buttons:l.withCtx(()=>[e.title?(l.openBlock(),l.createElementBlock("div",zw,[l.renderSlot(p.$slots,"icon"),l.createTextVNode(" "+l.toDisplayString(e.title),1)])):l.renderSlot(p.$slots,"buttons",{},()=>{var y,b;return[l.createElementVNode("div",Uw,l.toDisplayString(((b=(y=l.unref(i))==null?void 0:y.meta)==null?void 0:b.title)||""),1)]},void 0,1)]),tools:l.withCtx(()=>[l.renderSlot(p.$slots,"tools"),l.createVNode(jr,{"permi-prefix":e.permiPrefix,rule:u.value,plain:""},null,8,["permi-prefix","rule"])]),_:3},8,["class-name","size","loading","export","refresh","refresh-options","custom"])}}}),Yw=(e,t)=>{e.component("ab-toolbar",qw)},ln=ww();typeof window!="undefined"&&(window.abForm=ln);const Gw=ln.maker;function Ww(e,t){t!=null&&t.upload&&e.provide(ls,t.upload),qt(e,{AbForm:ln}),eh(e),vw(e),Nw(e),Hw(e),Yw(e)}Y.AbForm=ln,Y.AbTable=bl,Y.AbTableDetail=ka,Y.AbTableEnum=fe,Y.AbUploadFile=cs,Y.CACHE_KEY=ot,Y.en=qo,Y.getCurrentSize=Zo,Y.getLang=rr,Y.getTheme=Jo,Y.getUser=ea,Y.isDark=Ko,Y.isZhCN=xt,Y.maker=Gw,Y.setCurrentSize=Qo,Y.setLang=Go,Y.setTheme=Wo,Y.setUser=Xo,Y.setupArchbizKit=Ww,Y.useCache=Ce,Y.zhCN=Yo,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
|