@archbiz/element-plus 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,9 @@
1
1
  /*!
2
2
  * Archbiz
3
- * @archbiz/element-plus v0.1.1
3
+ * @archbiz/element-plus v0.1.3
4
4
  * (c) 2018-2026 Dio Zhu
5
5
  * Released under the MIT License.
6
6
  */
7
- "use strict";var As=Object.defineProperty,Os=Object.defineProperties;var Ps=Object.getOwnPropertyDescriptors;var yr=Object.getOwnPropertySymbols;var ji=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable;var ln=(e,t,r)=>t in e?As(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))ji.call(t,r)&&ln(e,r,t[r]);if(yr)for(var r of yr(t))Ni.call(t,r)&&ln(e,r,t[r]);return e},re=(e,t)=>Os(e,Ps(t));var Lt=(e,t)=>{var r={};for(var n in e)ji.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yr)for(var n of yr(e))t.indexOf(n)<0&&Ni.call(e,n)&&(r[n]=e[n]);return r};var be=(e,t,r)=>ln(e,typeof t!="symbol"?t+"":t,r);var me=(e,t,r)=>new Promise((n,i)=>{var o=u=>{try{s(r.next(u))}catch(c){i(c)}},a=u=>{try{s(r.throw(u))}catch(c){i(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,a);s((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus"),l=require("vue"),sn=require("@element-plus/icons-vue"),lr=require("vue-router"),Mr=require("vxe-pc-ui");function Rs(e){e.useApp((t,r)=>{r.component(L.ElForm.name)||r.use(L.ElForm),r.component(L.ElButton.name)||r.use(L.ElButton),r.component(L.ElRow.name)||r.use(L.ElRow),r.component(L.ElCol.name)||r.use(L.ElCol),r.component(L.ElInput.name)||r.use(L.ElInput),r.component(L.ElInputNumber.name)||r.use(L.ElInputNumber),r.component(L.ElCascader.name)||r.use(L.ElCascader),r.component(L.ElPopover.name)||r.use(L.ElPopover),r.component(L.ElTooltip.name)||r.use(L.ElTooltip),r.component(L.ElAutocomplete.name)||r.use(L.ElAutocomplete),r.component(L.ElCheckboxGroup.name)||r.use(L.ElCheckboxGroup),r.component(L.ElCheckboxButton.name)||r.use(L.ElCheckboxButton),r.component(L.ElRadioGroup.name)||r.use(L.ElRadioGroup),r.component(L.ElRadioButton.name)||r.use(L.ElRadioButton),r.component(L.ElRadio.name)||r.use(L.ElRadio),r.component(L.ElDialog.name)||r.use(L.ElDialog),r.component(L.ElDivider.name)||r.use(L.ElDivider),r.component(L.ElCheckbox.name)||r.use(L.ElCheckbox),r.component(L.ElSelect.name)||r.use(L.ElSelect),r.component(L.ElTree.name)||r.use(L.ElTree),r.component(L.ElUpload.name)||r.use(L.ElUpload),r.component(L.ElSlider.name)||r.use(L.ElSlider),r.component(L.ElRate.name)||r.use(L.ElRate),r.component(L.ElColorPicker.name)||r.use(L.ElColorPicker),r.component(L.ElSwitch.name)||r.use(L.ElSwitch),r.component(L.ElDatePicker.name)||r.use(L.ElDatePicker),r.component(L.ElIcon.name)||r.use(L.ElIcon),r.component(L.ElTimePicker.name)||r.use(L.ElTimePicker),r.component(L.ElProgress.name)||r.use(L.ElProgress),r.component(L.ElInputTag.name)||r.use(L.ElInputTag),r.component(L.ElText.name)||r.use(L.ElText),r.component(L.ElTransfer.name)||r.use(L.ElTransfer),r.component(L.ElTreeSelect.name)||r.use(L.ElTreeSelect),r.component(L.ElMention.name)||r.use(L.ElMention)})}const Ms=(e,t)=>{const{AbForm:r}=t||{};r.use(Rs),e.use(r)};var sa=typeof global=="object"&&global&&global.Object===Object&&global,Ds=typeof self=="object"&&self&&self.Object===Object&&self,ze=sa||Ds||Function("return this")(),Je=ze.Symbol,ua=Object.prototype,Is=ua.hasOwnProperty,Bs=ua.toString,Ht=Je?Je.toStringTag:void 0;function js(e){var t=Is.call(e,Ht),r=e[Ht];try{e[Ht]=void 0;var n=!0}catch(o){}var i=Bs.call(e);return n&&(t?e[Ht]=r:delete e[Ht]),i}var Ns=Object.prototype,Vs=Ns.toString;function Ls(e){return Vs.call(e)}var Hs="[object Null]",zs="[object Undefined]",Vi=Je?Je.toStringTag:void 0;function $t(e){return e==null?e===void 0?zs:Hs:Vi&&Vi in Object(e)?js(e):Ls(e)}function Ke(e){return e!=null&&typeof e=="object"}var Us="[object Symbol]";function Ur(e){return typeof e=="symbol"||Ke(e)&&$t(e)==Us}function ca(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 Te=Array.isArray,Li=Je?Je.prototype:void 0,Hi=Li?Li.toString:void 0;function da(e){if(typeof e=="string")return e;if(Te(e))return ca(e,da)+"";if(Ur(e))return Hi?Hi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var qs=/\s/;function Ys(e){for(var t=e.length;t--&&qs.test(e.charAt(t)););return t}var Gs=/^\s+/;function Ws(e){return e&&e.slice(0,Ys(e)+1).replace(Gs,"")}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var zi=NaN,Js=/^[-+]0x[0-9a-f]+$/i,Ks=/^0b[01]+$/i,Qs=/^0o[0-7]+$/i,Zs=parseInt;function Ui(e){if(typeof e=="number")return e;if(Ur(e))return zi;if(Ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ws(e);var r=Ks.test(e);return r||Qs.test(e)?Zs(e.slice(2),r?2:8):Js.test(e)?zi:+e}function qr(e){return e}var Xs="[object AsyncFunction]",eu="[object Function]",tu="[object GeneratorFunction]",ru="[object Proxy]";function Xn(e){if(!Ae(e))return!1;var t=$t(e);return t==eu||t==tu||t==Xs||t==ru}var un=ze["__core-js_shared__"],qi=function(){var e=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nu(e){return!!qi&&qi in e}var iu=Function.prototype,ou=iu.toString;function Tt(e){if(e!=null){try{return ou.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var au=/[\\^$.*+?()[\]{}|]/g,lu=/^\[object .+?Constructor\]$/,su=Function.prototype,uu=Object.prototype,cu=su.toString,du=uu.hasOwnProperty,fu=RegExp("^"+cu.call(du).replace(au,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pu(e){if(!Ae(e)||nu(e))return!1;var t=Xn(e)?fu:lu;return t.test(Tt(e))}function hu(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=hu(e,t);return pu(r)?r:void 0}var On=Et(ze,"WeakMap"),Yi=Object.create,mu=function(){function e(){}return function(t){if(!Ae(t))return{};if(Yi)return Yi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function gu(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 yu(){}function vu(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var bu=800,wu=16,xu=Date.now;function Su(e){var t=0,r=0;return function(){var n=xu(),i=wu-(n-r);if(r=n,i>0){if(++t>=bu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cu(e){return function(){return e}}var Dr=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),$u=Dr?function(e,t){return Dr(e,"toString",{configurable:!0,enumerable:!1,value:Cu(t),writable:!0})}:qr,Tu=Su($u);function fa(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Eu(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 ku(e){return e!==e}function _u(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Fu(e,t,r){return t===t?_u(e,t,r):Eu(e,ku,r)}function Au(e,t){var r=e==null?0:e.length;return!!r&&Fu(e,t,0)>-1}var Ou=9007199254740991,Pu=/^(?:0|[1-9]\d*)$/;function Yr(e,t){var r=typeof e;return t=t==null?Ou:t,!!t&&(r=="number"||r!="symbol"&&Pu.test(e))&&e>-1&&e%1==0&&e<t}function ei(e,t,r){t=="__proto__"&&Dr?Dr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function sr(e,t){return e===t||e!==e&&t!==t}var Ru=Object.prototype,Mu=Ru.hasOwnProperty;function ti(e,t,r){var n=e[t];(!(Mu.call(e,t)&&sr(n,r))||r===void 0&&!(t in e))&&ei(e,t,r)}function Du(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=void 0;u===void 0&&(u=e[s]),i?ei(r,s,u):ti(r,s,u)}return r}var Gi=Math.max;function Iu(e,t,r){return t=Gi(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Gi(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),gu(e,this,s)}}function Bu(e,t){return Tu(Iu(e,t,qr),e+"")}var ju=9007199254740991;function ri(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ju}function Bt(e){return e!=null&&ri(e.length)&&!Xn(e)}function Nu(e,t,r){if(!Ae(r))return!1;var n=typeof t;return(n=="number"?Bt(r)&&Yr(t,r.length):n=="string"&&t in r)?sr(r[t],e):!1}function Vu(e){return Bu(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&&Nu(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 Lu=Object.prototype;function ni(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lu;return e===r}function Hu(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var zu="[object Arguments]";function Wi(e){return Ke(e)&&$t(e)==zu}var pa=Object.prototype,Uu=pa.hasOwnProperty,qu=pa.propertyIsEnumerable,Ir=Wi(function(){return arguments}())?Wi:function(e){return Ke(e)&&Uu.call(e,"callee")&&!qu.call(e,"callee")};function Yu(){return!1}var ha=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ji=ha&&typeof module=="object"&&module&&!module.nodeType&&module,Gu=Ji&&Ji.exports===ha,Ki=Gu?ze.Buffer:void 0,Wu=Ki?Ki.isBuffer:void 0,tr=Wu||Yu,Ju="[object Arguments]",Ku="[object Array]",Qu="[object Boolean]",Zu="[object Date]",Xu="[object Error]",ec="[object Function]",tc="[object Map]",rc="[object Number]",nc="[object Object]",ic="[object RegExp]",oc="[object Set]",ac="[object String]",lc="[object WeakMap]",sc="[object ArrayBuffer]",uc="[object DataView]",cc="[object Float32Array]",dc="[object Float64Array]",fc="[object Int8Array]",pc="[object Int16Array]",hc="[object Int32Array]",mc="[object Uint8Array]",gc="[object Uint8ClampedArray]",yc="[object Uint16Array]",vc="[object Uint32Array]",ge={};ge[cc]=ge[dc]=ge[fc]=ge[pc]=ge[hc]=ge[mc]=ge[gc]=ge[yc]=ge[vc]=!0;ge[Ju]=ge[Ku]=ge[sc]=ge[Qu]=ge[uc]=ge[Zu]=ge[Xu]=ge[ec]=ge[tc]=ge[rc]=ge[nc]=ge[ic]=ge[oc]=ge[ac]=ge[lc]=!1;function bc(e){return Ke(e)&&ri(e.length)&&!!ge[$t(e)]}function ii(e){return function(t){return e(t)}}var ma=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kt=ma&&typeof module=="object"&&module&&!module.nodeType&&module,wc=Kt&&Kt.exports===ma,cn=wc&&sa.process,Rt=function(){try{var e=Kt&&Kt.require&&Kt.require("util").types;return e||cn&&cn.binding&&cn.binding("util")}catch(t){}}(),Qi=Rt&&Rt.isTypedArray,oi=Qi?ii(Qi):bc,xc=Object.prototype,Sc=xc.hasOwnProperty;function ga(e,t){var r=Te(e),n=!r&&Ir(e),i=!r&&!n&&tr(e),o=!r&&!n&&!i&&oi(e),a=r||n||i||o,s=a?Hu(e.length,String):[],u=s.length;for(var c in e)(t||Sc.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Yr(c,u)))&&s.push(c);return s}function ya(e,t){return function(r){return e(t(r))}}var Cc=ya(Object.keys,Object),$c=Object.prototype,Tc=$c.hasOwnProperty;function Ec(e){if(!ni(e))return Cc(e);var t=[];for(var r in Object(e))Tc.call(e,r)&&r!="constructor"&&t.push(r);return t}function ai(e){return Bt(e)?ga(e):Ec(e)}function kc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var _c=Object.prototype,Fc=_c.hasOwnProperty;function Ac(e){if(!Ae(e))return kc(e);var t=ni(e),r=[];for(var n in e)n=="constructor"&&(t||!Fc.call(e,n))||r.push(n);return r}function va(e){return Bt(e)?ga(e,!0):Ac(e)}var Oc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pc=/^\w*$/;function li(e,t){if(Te(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ur(e)?!0:Pc.test(e)||!Oc.test(e)||t!=null&&e in Object(t)}var rr=Et(Object,"create");function Rc(){this.__data__=rr?rr(null):{},this.size=0}function Mc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Dc="__lodash_hash_undefined__",Ic=Object.prototype,Bc=Ic.hasOwnProperty;function jc(e){var t=this.__data__;if(rr){var r=t[e];return r===Dc?void 0:r}return Bc.call(t,e)?t[e]:void 0}var Nc=Object.prototype,Vc=Nc.hasOwnProperty;function Lc(e){var t=this.__data__;return rr?t[e]!==void 0:Vc.call(t,e)}var Hc="__lodash_hash_undefined__";function zc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rr&&t===void 0?Hc:t,this}function bt(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])}}bt.prototype.clear=Rc;bt.prototype.delete=Mc;bt.prototype.get=jc;bt.prototype.has=Lc;bt.prototype.set=zc;function Uc(){this.__data__=[],this.size=0}function Gr(e,t){for(var r=e.length;r--;)if(sr(e[r][0],t))return r;return-1}var qc=Array.prototype,Yc=qc.splice;function Gc(e){var t=this.__data__,r=Gr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Yc.call(t,r,1),--this.size,!0}function Wc(e){var t=this.__data__,r=Gr(t,e);return r<0?void 0:t[r][1]}function Jc(e){return Gr(this.__data__,e)>-1}function Kc(e,t){var r=this.__data__,n=Gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,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=Uc;it.prototype.delete=Gc;it.prototype.get=Wc;it.prototype.has=Jc;it.prototype.set=Kc;var nr=Et(ze,"Map");function Qc(){this.size=0,this.__data__={hash:new bt,map:new(nr||it),string:new bt}}function Zc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wr(e,t){var r=e.__data__;return Zc(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Xc(e){var t=Wr(this,e).delete(e);return this.size-=t?1:0,t}function ed(e){return Wr(this,e).get(e)}function td(e){return Wr(this,e).has(e)}function rd(e,t){var r=Wr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ot(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])}}ot.prototype.clear=Qc;ot.prototype.delete=Xc;ot.prototype.get=ed;ot.prototype.has=td;ot.prototype.set=rd;var nd="Expected a function";function si(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nd);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(si.Cache||ot),r}si.Cache=ot;var id=500;function od(e){var t=si(e,function(n){return r.size===id&&r.clear(),n}),r=t.cache;return t}var ad=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ld=/\\(\\)?/g,sd=od(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ad,function(r,n,i,o){t.push(i?o.replace(ld,"$1"):n||r)}),t});function ba(e){return e==null?"":da(e)}function ui(e,t){return Te(e)?e:li(e,t)?[e]:sd(ba(e))}function ur(e){if(typeof e=="string"||Ur(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wa(e,t){t=ui(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ur(t[r++])];return r&&r==n?e:void 0}function We(e,t,r){var n=e==null?void 0:wa(e,t);return n===void 0?r:n}function ud(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xa=ya(Object.getPrototypeOf,Object),cd="[object Object]",dd=Function.prototype,fd=Object.prototype,Sa=dd.toString,pd=fd.hasOwnProperty,hd=Sa.call(Object);function md(e){if(!Ke(e)||$t(e)!=cd)return!1;var t=xa(e);if(t===null)return!0;var r=pd.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Sa.call(r)==hd}function gd(){if(!arguments.length)return[];var e=arguments[0];return Te(e)?e:[e]}function yd(){this.__data__=new it,this.size=0}function vd(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function bd(e){return this.__data__.get(e)}function wd(e){return this.__data__.has(e)}var xd=200;function Sd(e,t){var r=this.__data__;if(r instanceof it){var n=r.__data__;if(!nr||n.length<xd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(e,t),this.size=r.size,this}function He(e){var t=this.__data__=new it(e);this.size=t.size}He.prototype.clear=yd;He.prototype.delete=vd;He.prototype.get=bd;He.prototype.has=wd;He.prototype.set=Sd;var Ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zi=Ca&&typeof module=="object"&&module&&!module.nodeType&&module,Cd=Zi&&Zi.exports===Ca,Xi=Cd?ze.Buffer:void 0,eo=Xi?Xi.allocUnsafe:void 0;function $a(e,t){if(t)return e.slice();var r=e.length,n=eo?eo(r):new e.constructor(r);return e.copy(n),n}function Ta(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 $d(){return[]}var Td=Object.prototype,Ed=Td.propertyIsEnumerable,to=Object.getOwnPropertySymbols,kd=to?function(e){return e==null?[]:(e=Object(e),Ta(to(e),function(t){return Ed.call(e,t)}))}:$d;function _d(e,t,r){var n=t(e);return Te(e)?n:ud(n,r(e))}function Pn(e){return _d(e,ai,kd)}var Rn=Et(ze,"DataView"),Mn=Et(ze,"Promise"),Ot=Et(ze,"Set"),ro="[object Map]",Fd="[object Object]",no="[object Promise]",io="[object Set]",oo="[object WeakMap]",ao="[object DataView]",Ad=Tt(Rn),Od=Tt(nr),Pd=Tt(Mn),Rd=Tt(Ot),Md=Tt(On),Le=$t;(Rn&&Le(new Rn(new ArrayBuffer(1)))!=ao||nr&&Le(new nr)!=ro||Mn&&Le(Mn.resolve())!=no||Ot&&Le(new Ot)!=io||On&&Le(new On)!=oo)&&(Le=function(e){var t=$t(e),r=t==Fd?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Ad:return ao;case Od:return ro;case Pd:return no;case Rd:return io;case Md:return oo}return t});var Dd=Object.prototype,Id=Dd.hasOwnProperty;function Bd(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Id.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Br=ze.Uint8Array;function ci(e){var t=new e.constructor(e.byteLength);return new Br(t).set(new Br(e)),t}function jd(e,t){var r=ci(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Nd=/\w*$/;function Vd(e){var t=new e.constructor(e.source,Nd.exec(e));return t.lastIndex=e.lastIndex,t}var lo=Je?Je.prototype:void 0,so=lo?lo.valueOf:void 0;function Ld(e){return so?Object(so.call(e)):{}}function Ea(e,t){var r=t?ci(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Hd="[object Boolean]",zd="[object Date]",Ud="[object Map]",qd="[object Number]",Yd="[object RegExp]",Gd="[object Set]",Wd="[object String]",Jd="[object Symbol]",Kd="[object ArrayBuffer]",Qd="[object DataView]",Zd="[object Float32Array]",Xd="[object Float64Array]",ef="[object Int8Array]",tf="[object Int16Array]",rf="[object Int32Array]",nf="[object Uint8Array]",of="[object Uint8ClampedArray]",af="[object Uint16Array]",lf="[object Uint32Array]";function sf(e,t,r){var n=e.constructor;switch(t){case Kd:return ci(e);case Hd:case zd:return new n(+e);case Qd:return jd(e);case Zd:case Xd:case ef:case tf:case rf:case nf:case of:case af:case lf:return Ea(e,r);case Ud:return new n;case qd:case Wd:return new n(e);case Yd:return Vd(e);case Gd:return new n;case Jd:return Ld(e)}}function ka(e){return typeof e.constructor=="function"&&!ni(e)?mu(xa(e)):{}}var uf="[object Map]";function cf(e){return Ke(e)&&Le(e)==uf}var uo=Rt&&Rt.isMap,df=uo?ii(uo):cf,ff="[object Set]";function pf(e){return Ke(e)&&Le(e)==ff}var co=Rt&&Rt.isSet,hf=co?ii(co):pf,mf=1,_a="[object Arguments]",gf="[object Array]",yf="[object Boolean]",vf="[object Date]",bf="[object Error]",Fa="[object Function]",wf="[object GeneratorFunction]",xf="[object Map]",Sf="[object Number]",Aa="[object Object]",Cf="[object RegExp]",$f="[object Set]",Tf="[object String]",Ef="[object Symbol]",kf="[object WeakMap]",_f="[object ArrayBuffer]",Ff="[object DataView]",Af="[object Float32Array]",Of="[object Float64Array]",Pf="[object Int8Array]",Rf="[object Int16Array]",Mf="[object Int32Array]",Df="[object Uint8Array]",If="[object Uint8ClampedArray]",Bf="[object Uint16Array]",jf="[object Uint32Array]",he={};he[_a]=he[gf]=he[_f]=he[Ff]=he[yf]=he[vf]=he[Af]=he[Of]=he[Pf]=he[Rf]=he[Mf]=he[xf]=he[Sf]=he[Aa]=he[Cf]=he[$f]=he[Tf]=he[Ef]=he[Df]=he[If]=he[Bf]=he[jf]=!0;he[bf]=he[Fa]=he[kf]=!1;function Qt(e,t,r,n,i,o){var a,s=t&mf;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ae(e))return e;var u=Te(e);if(u)a=Bd(e);else{var c=Le(e),d=c==Fa||c==wf;if(tr(e))return $a(e,s);if(c==Aa||c==_a||d&&!i)a=d?{}:ka(e);else{if(!he[c])return i?e:{};a=sf(e,c,s)}}o||(o=new He);var f=o.get(e);if(f)return f;o.set(e,a),hf(e)?e.forEach(function(m){a.add(Qt(m,t,r,m,e,o))}):df(e)&&e.forEach(function(m,g){a.set(g,Qt(m,t,r,g,e,o))});var h=Pn,p=u?void 0:h(e);return fa(p||e,function(m,g){p&&(g=m,m=e[g]),ti(a,g,Qt(m,t,r,g,e,o))}),a}var Nf=1,Vf=4;function st(e){return Qt(e,Nf|Vf)}var Lf=1,Hf=4;function zf(e,t){return t=typeof t=="function"?t:void 0,Qt(e,Lf|Hf,t)}function Uf(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 qf="__lodash_hash_undefined__";function Yf(e){return this.__data__.set(e,qf),this}function Gf(e){return this.__data__.has(e)}function ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ot;++t<r;)this.add(e[t])}ir.prototype.add=ir.prototype.push=Yf;ir.prototype.has=Gf;function Wf(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 Oa(e,t){return e.has(t)}var Jf=1,Kf=2;function Pa(e,t,r,n,i,o){var a=r&Jf,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=r&Kf?new ir: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(!Wf(t,function(v,S){if(!Oa(p,S)&&(m===v||i(m,v,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 Qf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function di(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Zf=1,Xf=2,ep="[object Boolean]",tp="[object Date]",rp="[object Error]",np="[object Map]",ip="[object Number]",op="[object RegExp]",ap="[object Set]",lp="[object String]",sp="[object Symbol]",up="[object ArrayBuffer]",cp="[object DataView]",fo=Je?Je.prototype:void 0,dn=fo?fo.valueOf:void 0;function dp(e,t,r,n,i,o,a){switch(r){case cp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case up:return!(e.byteLength!=t.byteLength||!o(new Br(e),new Br(t)));case ep:case tp:case ip:return sr(+e,+t);case rp:return e.name==t.name&&e.message==t.message;case op:case lp:return e==t+"";case np:var s=Qf;case ap:var u=n&Zf;if(s||(s=di),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=Xf,a.set(e,t);var d=Pa(s(e),s(t),n,i,o,a);return a.delete(e),d;case sp:if(dn)return dn.call(e)==dn.call(t)}return!1}var fp=1,pp=Object.prototype,hp=pp.hasOwnProperty;function mp(e,t,r,n,i,o){var a=r&fp,s=Pn(e),u=s.length,c=Pn(t),d=c.length;if(u!=d&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:hp.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<u;){h=s[f];var v=e[h],S=t[h];if(n)var $=a?n(S,v,h,t,e,o):n(v,S,h,e,t,o);if(!($===void 0?v===S||i(v,S,r,n,o):$)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var V=e.constructor,P=t.constructor;V!=P&&"constructor"in e&&"constructor"in t&&!(typeof V=="function"&&V instanceof V&&typeof P=="function"&&P instanceof P)&&(g=!1)}return o.delete(e),o.delete(t),g}var gp=1,po="[object Arguments]",ho="[object Array]",vr="[object Object]",yp=Object.prototype,mo=yp.hasOwnProperty;function vp(e,t,r,n,i,o){var a=Te(e),s=Te(t),u=a?ho:Le(e),c=s?ho:Le(t);u=u==po?vr:u,c=c==po?vr:c;var d=u==vr,f=c==vr,h=u==c;if(h&&tr(e)){if(!tr(t))return!1;a=!0,d=!1}if(h&&!d)return o||(o=new He),a||oi(e)?Pa(e,t,r,n,i,o):dp(e,t,u,r,n,i,o);if(!(r&gp)){var p=d&&mo.call(e,"__wrapped__"),m=f&&mo.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,y=m?t.value():t;return o||(o=new He),i(g,y,r,n,o)}}return h?(o||(o=new He),mp(e,t,r,n,i,o)):!1}function Jr(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ke(e)&&!Ke(t)?e!==e&&t!==t:vp(e,t,r,n,Jr,i)}var bp=1,wp=2;function xp(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],u=e[s],c=a[1];if(a[2]){if(u===void 0&&!(s in e))return!1}else{var d=new He,f;if(!(f===void 0?Jr(c,u,bp|wp,n,d):f))return!1}}return!0}function Ra(e){return e===e&&!Ae(e)}function Sp(e){for(var t=ai(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ra(i)]}return t}function Ma(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Cp(e){var t=Sp(e);return t.length==1&&t[0][2]?Ma(t[0][0],t[0][1]):function(r){return r===e||xp(r,e,t)}}function $p(e,t){return e!=null&&t in Object(e)}function Tp(e,t,r){t=ui(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=ur(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&&ri(i)&&Yr(a,i)&&(Te(e)||Ir(e)))}function Ep(e,t){return e!=null&&Tp(e,t,$p)}var kp=1,_p=2;function Fp(e,t){return li(e)&&Ra(t)?Ma(ur(e),t):function(r){var n=We(r,e);return n===void 0&&n===t?Ep(r,e):Jr(t,n,kp|_p)}}function Ap(e){return function(t){return t==null?void 0:t[e]}}function Op(e){return function(t){return wa(t,e)}}function Pp(e){return li(e)?Ap(ur(e)):Op(e)}function Da(e){return typeof e=="function"?e:e==null?qr:typeof e=="object"?Te(e)?Fp(e[0],e[1]):Cp(e):Pp(e)}function Rp(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[++i];if(r(o[u],u,o)===!1)break}return t}}var Ia=Rp();function Mp(e,t){return e&&Ia(e,t,ai)}function Dp(e,t){return function(r,n){if(r==null)return r;if(!Bt(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 fi=Dp(Mp),fn=function(){return ze.Date.now()},Ip="Expected a function",Bp=Math.max,jp=Math.min;function Np(e,t,r){var n,i,o,a,s,u,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Ip);t=Ui(t)||0,Ae(r)&&(d=!!r.leading,f="maxWait"in r,o=f?Bp(Ui(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,c=T,a=e.apply(k,E),a}function m(T){return c=T,s=setTimeout(v,t),d?p(T):a}function g(T){var E=T-u,k=T-c,N=t-E;return f?jp(N,o-k):N}function y(T){var E=T-u,k=T-c;return u===void 0||E>=t||E<0||f&&k>=o}function v(){var T=fn();if(y(T))return S(T);s=setTimeout(v,g(T))}function S(T){return s=void 0,h&&n?p(T):(n=i=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,n=u=i=s=void 0}function V(){return s===void 0?a:S(fn())}function P(){var T=fn(),E=y(T);if(n=arguments,i=this,u=T,E){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(v,t),p(u)}return s===void 0&&(s=setTimeout(v,t)),a}return P.cancel=$,P.flush=V,P}function Dn(e,t,r){(r!==void 0&&!sr(e[t],r)||r===void 0&&!(t in e))&&ei(e,t,r)}function Vp(e){return Ke(e)&&Bt(e)}function In(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Lp(e){return Du(e,va(e))}function Hp(e,t,r,n,i,o,a){var s=In(e,r),u=In(t,r),c=a.get(u);if(c){Dn(e,r,c);return}var d=o?o(s,u,r+"",e,t,a):void 0,f=d===void 0;if(f){var h=Te(u),p=!h&&tr(u),m=!h&&!p&&oi(u);d=u,h||p||m?Te(s)?d=s:Vp(s)?d=vu(s):p?(f=!1,d=$a(u,!0)):m?(f=!1,d=Ea(u,!0)):d=[]:md(u)||Ir(u)?(d=s,Ir(s)?d=Lp(s):(!Ae(s)||Xn(s))&&(d=ka(u))):f=!1}f&&(a.set(u,d),i(d,u,n,o,a),a.delete(u)),Dn(e,r,d)}function Ba(e,t,r,n,i){e!==t&&Ia(t,function(o,a){if(i||(i=new He),Ae(o))Hp(e,t,a,r,Ba,n,i);else{var s=n?n(In(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),Dn(e,a,s)}},va)}function zp(e){return typeof e=="function"?e:qr}function ja(e,t){var r=Te(e)?fa:fi;return r(e,zp(t))}function Up(e,t){var r=[];return fi(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function wt(e,t){var r=Te(e)?Ta:Up;return r(e,Da(t))}function qp(e,t){var r=-1,n=Bt(e)?Array(e.length):[];return fi(e,function(i,o,a){n[++r]=t(i,o,a)}),n}function Na(e,t){var r=Te(e)?ca:qp;return r(e,Da(t))}function jr(e,t){return Jr(e,t)}var br=Vu(function(e,t,r){Ba(e,t,r)});function Yp(e,t,r,n){if(!Ae(e))return e;t=ui(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=ur(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var d=s[u];c=void 0,c===void 0&&(c=Ae(d)?d:Yr(t[i+1])?[]:{})}ti(s,u,c),s=s[u]}return e}function xe(e,t,r){return e==null?e:Yp(e,t,r)}function Gp(e){return ba(e).toLowerCase()}var Wp=1/0,Jp=Ot&&1/di(new Ot([,-0]))[1]==Wp?function(e){return new Ot(e)}:yu,Kp=200;function Qp(e,t,r){var n=-1,i=Au,o=e.length,a=!0,s=[],u=s;if(o>=Kp){var c=Jp(e);if(c)return di(c);a=!1,i=Oa,u=new ir}else u=s;e:for(;++n<o;){var d=e[n],f=d;if(d=d!==0?d:0,a&&f===f){for(var h=u.length;h--;)if(u[h]===f)continue e;s.push(d)}else i(u,f,r)||(u!==s&&u.push(f),s.push(d))}return s}function Zp(e){return e&&e.length?Qp(e):[]}const Va={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"}},La={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:"返回"}},Se=(e="localStorage")=>({wsCache:e==="localStorage"?window.localStorage:window.sessionStorage,setLang:Ha,getLang:cr,isZhCN:xt,setTheme:za,getTheme:Ua,isDark:qa,setCurrentSize:Ya,getCurrentSize:Ga,setUser:Wa,getUser:Ja}),at={IS_DARK:"isDark",LANG:"lang",THEME:"theme",LAYOUT:"layout",CURRENT_SIZE:"currentSize",USER:"user"},Ha=(e="")=>{const{wsCache:t}=Se();t.setItem(at.LANG,e)},cr=()=>{const{wsCache:e}=Se();return e.getItem(at.LANG)},xt=()=>{const e=cr()||"";return!e||Gp(e)==="zh-cn"},za=e=>{const{wsCache:t}=Se();t.setItem(at.THEME,JSON.stringify(e||"{}"))},Ua=()=>{const{wsCache:e}=Se(),t=e.getItem(at.THEME);return t?JSON.parse(t):void 0},qa=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,Ya=(e="")=>{const{wsCache:t}=Se();t.setItem(at.CURRENT_SIZE,e)},Ga=()=>{const{wsCache:e}=Se();return e.getItem(at.CURRENT_SIZE)},Wa=e=>{const{wsCache:t}=Se();t.setItem(at.USER,JSON.stringify(e||"{}"))},Ja=()=>{const{wsCache:e}=Se(),t=e.getItem(at.USER),r=t?JSON.parse(t):{};return r.permissions=new Set(r.permissions||[]),r},Xp=cr()||"zh-cn",Xe=e=>({t:r=>We(Xp==="zh-cn"?La:Va,r,r)});function eh(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 th(e,t,r){if(!t.length||e==null&&!r.size)return e;const n=R({},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(u=>{var c;return(c=n[u])!=null?c:null});if(a)for(;s.length&&s[s.length-1]===null;)s.pop();n[i]=s.every(u=>u===null)?null:s,o.forEach(u=>delete n[u])}else r.has(i)&&!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=null);return n}function rh(e,t){if(!t.length||e==null)return e;const r=R({},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 u;r[a]=Array.isArray(o)&&(u=o[s])!=null?u:null}),delete r[n]}return r}const nh=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}=Xe(),a=l.useModel(e,"modelValue"),s=l.ref(n.collapse),u=l.ref(),c=l.ref(),d=l.computed(()=>eh(n.rule.map(N))),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(()=>th(a.value,d.value,f));let p;function m(_,F){const A=R({},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=rh(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(sn.ArrowDown)},on:{click:x}}]});l.watchEffect(()=>{g.children[2].children=[o(s.value?"unexpand":"expand")],g.children[2].props.icon=s.value?l.markRaw(sn.ArrowUp):l.markRaw(sn.ArrowDown)}),l.watch(()=>n.rule,()=>{s.value=n.collapse});const y=l.computed(()=>[...n.rule.filter(_=>N(_).hidden!==!0),g]),v=l.computed(()=>n.rule.filter(_=>N(_).hidden===!0).map(_=>l.shallowReactive(re(R({},N(_)),{hidden:!1}))));function S(_,F=new Set){for(const A of _){if(!A||typeof A!="object")continue;const C=N(A);if(typeof C.field=="string"&&F.add(C.field),Array.isArray(C.children)&&S(C.children,F),Array.isArray(C.control))for(const I of C.control)Array.isArray(I.rule)&&S(I.rule,F)}return F}const $=l.computed(()=>S(y.value)),V=l.computed(()=>S(v.value));function P(_){if(h.value==null)return h.value;const F=R({},h.value);for(const A of _)delete F[A];return F}const T=l.computed(_=>{const F=P(V.value);return jr(F,_)?_:F}),E=l.computed(_=>{const F=P($.value);return jr(F,_)?_:F});l.watch(()=>a.value,_=>q());function k(){return me(this,null,function*(){var _,F;(_=u.value)==null||_.resetFields(),yield l.nextTick(),(F=c.value)==null||F.resetFields()})}function N(_){return typeof _.getRule=="function"?_.getRule():_}function q(){var _;(_=i==null?void 0:i.value)==null||_.reload(),r("query",a.value)}function U(){return me(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,u.value)),api:u.value,"onUpdate:api":F[1]||(F[1]=C=>u.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:v.value,"model-value":E.value,"onUpdate:modelValue":F[2]||(F[2]=C=>m(C,c.value)),api:c.value,"onUpdate:api":F[3]||(F[3]=C=>c.value=C)},null,8,["rule","model-value","api"])],512),[[l.vShow,s.value]])]),_:1})],2)}}}),ih=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},oh=ih(nh,[["__scopeId","data-v-bfc6a8b4"]]),ah=(e,t)=>{e.component("ab-search",oh)};function Mt(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function Ka(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function De(e,t,r){e&&t&&(e[t]=r)}function ht(e,t){e&&t&&delete e[t]}var go=e=>Object.prototype.toString.call(e).slice(8,-1),B={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&&!B.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=go(e);return t==="Function"||t==="AsyncFunction"},getType(e){return go(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e},Date:e=>B.type(e,"Date"),Object:e=>B.type(e,"Object"),String:e=>B.type(e,"String"),Boolean:e=>B.type(e,"Boolean"),Array:e=>B.type(e,"Array"),Number:e=>B.type(e,"Number")};function fe(e,t){return{}.hasOwnProperty.call(e,t)}function Kr(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)||B.Object(i)){let o=Reflect.get(e,n)===void 0;if(Array.isArray(i))o&&De(e,n,[]);else{let a=i;if(a._clone&&r!==void 0)if(r)i=a.getRule(),o&&De(e,n,{});else{De(e,n,a._clone());continue}else o&&De(e,n,{})}Reflect.set(e,n,Kr(Reflect.get(e,n),i,r))}else if(De(e,n,i),!B.Undef(i)){let o=i;B.Undef(o.__json)||Reflect.set(Reflect.get(e,n),"__json",o.__json),B.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 St(e){return Kr({},{value:e}).value}function Qa(e,t,r){return`[archbiz ${e}]: ${t}`}function pi(e,t){console.error(Qa("err",e))}function lh(e){pi(e instanceof Error?e.toString():String(e)),console.error(e)}var Za=["props"],Xa=["class","style","directives"],el=["on","hook"],Bn="[[T-FORM-PREFIX-",jn="-T-FORM-SUFFIX]]";function pn(e){return Function(`return ${e}`)()}function or(e,t){let r=Kr(Array.isArray(e)?[]:{},e,!0),n=JSON.stringify(r,function(i,o){var u;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=(u=a.__origin)!=null?u:o;if(!a.__emit)return`${Bn}${s}${jn}`},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(jn)>0&&r.indexOf(Bn)===0)r=r.replace(jn,"").replace(Bn,""),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 u=s[0].api.getGlobalEvent(o);if(typeof u=="function")return u.apply(this,s)};return a.__json=e,a.__inject=!0,a}else if(r.indexOf("$FNX:")===0){let o=pn(`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=pn(r)}catch(o){i=pn(`function ${r}`)}return i.__json=e,i}catch(i){pi(`解析失败:${r}
7
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("element-plus"),u=require("vue"),d=require("@element-plus/icons-vue"),f=require("vue-router"),p=require("vxe-pc-ui");function m(e){e.useApp((e,t)=>{t.component(l.ElForm.name)||t.use(l.ElForm),t.component(l.ElButton.name)||t.use(l.ElButton),t.component(l.ElRow.name)||t.use(l.ElRow),t.component(l.ElCol.name)||t.use(l.ElCol),t.component(l.ElInput.name)||t.use(l.ElInput),t.component(l.ElInputNumber.name)||t.use(l.ElInputNumber),t.component(l.ElCascader.name)||t.use(l.ElCascader),t.component(l.ElPopover.name)||t.use(l.ElPopover),t.component(l.ElTooltip.name)||t.use(l.ElTooltip),t.component(l.ElAutocomplete.name)||t.use(l.ElAutocomplete),t.component(l.ElCheckboxGroup.name)||t.use(l.ElCheckboxGroup),t.component(l.ElCheckboxButton.name)||t.use(l.ElCheckboxButton),t.component(l.ElRadioGroup.name)||t.use(l.ElRadioGroup),t.component(l.ElRadioButton.name)||t.use(l.ElRadioButton),t.component(l.ElRadio.name)||t.use(l.ElRadio),t.component(l.ElDialog.name)||t.use(l.ElDialog),t.component(l.ElDivider.name)||t.use(l.ElDivider),t.component(l.ElCheckbox.name)||t.use(l.ElCheckbox),t.component(l.ElSelect.name)||t.use(l.ElSelect),t.component(l.ElTree.name)||t.use(l.ElTree),t.component(l.ElUpload.name)||t.use(l.ElUpload),t.component(l.ElSlider.name)||t.use(l.ElSlider),t.component(l.ElRate.name)||t.use(l.ElRate),t.component(l.ElColorPicker.name)||t.use(l.ElColorPicker),t.component(l.ElSwitch.name)||t.use(l.ElSwitch),t.component(l.ElDatePicker.name)||t.use(l.ElDatePicker),t.component(l.ElIcon.name)||t.use(l.ElIcon),t.component(l.ElTimePicker.name)||t.use(l.ElTimePicker),t.component(l.ElProgress.name)||t.use(l.ElProgress),t.component(l.ElInputTag.name)||t.use(l.ElInputTag),t.component(l.ElText.name)||t.use(l.ElText),t.component(l.ElTransfer.name)||t.use(l.ElTransfer),t.component(l.ElTreeSelect.name)||t.use(l.ElTreeSelect),t.component(l.ElMention.name)||t.use(l.ElMention)})}var h=(e,t)=>{let{AbForm:n}=t||{};n.use(m),e.use(n)},g=typeof global==`object`&&global&&global.Object===Object&&global,_=typeof self==`object`&&self&&self.Object===Object&&self,v=g||_||Function(`return this`)(),y=v.Symbol,b=Object.prototype,x=b.hasOwnProperty,S=b.toString,C=y?y.toStringTag:void 0;function w(e){var t=x.call(e,C),n=e[C];try{e[C]=void 0;var r=!0}catch(e){}var i=S.call(e);return r&&(t?e[C]=n:delete e[C]),i}var T=Object.prototype.toString;function E(e){return T.call(e)}var D=`[object Null]`,ee=`[object Undefined]`,O=y?y.toStringTag:void 0;function k(e){return e==null?e===void 0?ee:D:O&&O in Object(e)?w(e):E(e)}function A(e){return typeof e==`object`&&!!e}var te=`[object Symbol]`;function j(e){return typeof e==`symbol`||A(e)&&k(e)==te}function M(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var N=Array.isArray,ne=1/0,re=y?y.prototype:void 0,ie=re?re.toString:void 0;function ae(e){if(typeof e==`string`)return e;if(N(e))return M(e,ae)+``;if(j(e))return ie?ie.call(e):``;var t=e+``;return t==`0`&&1/e==-ne?`-0`:t}var oe=/\s/;function se(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var ce=/^\s+/;function le(e){return e&&e.slice(0,se(e)+1).replace(ce,``)}function P(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var ue=NaN,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^0o[0-7]+$/i,me=parseInt;function he(e){if(typeof e==`number`)return e;if(j(e))return ue;if(P(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=P(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=le(e);var n=fe.test(e);return n||pe.test(e)?me(e.slice(2),n?2:8):de.test(e)?ue:+e}function ge(e){return e}var _e=`[object AsyncFunction]`,ve=`[object Function]`,ye=`[object GeneratorFunction]`,be=`[object Proxy]`;function xe(e){if(!P(e))return!1;var t=k(e);return t==ve||t==ye||t==_e||t==be}var Se=v[`__core-js_shared__`],Ce=function(){var e=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function we(e){return!!Ce&&Ce in e}var Te=Function.prototype.toString;function Ee(e){if(e!=null){try{return Te.call(e)}catch(e){}try{return e+``}catch(e){}}return``}var De=/[\\^$.*+?()[\]{}|]/g,Oe=/^\[object .+?Constructor\]$/,ke=Function.prototype,Ae=Object.prototype,je=ke.toString,Me=Ae.hasOwnProperty,Ne=RegExp(`^`+je.call(Me).replace(De,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Pe(e){return!P(e)||we(e)?!1:(xe(e)?Ne:Oe).test(Ee(e))}function Fe(e,t){return e==null?void 0:e[t]}function Ie(e,t){var n=Fe(e,t);return Pe(n)?n:void 0}var Le=Ie(v,`WeakMap`),Re=Object.create,ze=function(){function e(){}return function(t){if(!P(t))return{};if(Re)return Re(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Be(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ve(){}function He(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Ue=800,We=16,Ge=Date.now;function Ke(e){var t=0,n=0;return function(){var r=Ge(),i=We-(r-n);if(n=r,i>0){if(++t>=Ue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function qe(e){return function(){return e}}var Je=function(){try{var e=Ie(Object,`defineProperty`);return e({},``,{}),e}catch(e){}}(),Ye=Ke(Je?function(e,t){return Je(e,`toString`,{configurable:!0,enumerable:!1,value:qe(t),writable:!0})}:ge);function Xe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Ze(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Qe(e){return e!==e}function $e(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function et(e,t,n){return t===t?$e(e,t,n):Ze(e,Qe,n)}function tt(e,t){return!!(e!=null&&e.length)&&et(e,t,0)>-1}var nt=9007199254740991,rt=/^(?:0|[1-9]\d*)$/;function it(e,t){var n=typeof e;return t=t==null?nt:t,!!t&&(n==`number`||n!=`symbol`&&rt.test(e))&&e>-1&&e%1==0&&e<t}function at(e,t,n){t==`__proto__`&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ot(e,t){return e===t||e!==e&&t!==t}var st=Object.prototype.hasOwnProperty;function ct(e,t,n){var r=e[t];(!(st.call(e,t)&&ot(r,n))||n===void 0&&!(t in e))&&at(e,t,n)}function lt(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?at(n,s,c):ct(n,s,c)}return n}var ut=Math.max;function dt(e,t,n){return t=ut(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=ut(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Be(e,this,s)}}function ft(e,t){return Ye(dt(e,t,ge),e+``)}var pt=9007199254740991;function mt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=pt}function ht(e){return e!=null&&mt(e.length)&&!xe(e)}function gt(e,t,n){if(!P(n))return!1;var r=typeof t;return(r==`number`?ht(n)&&it(t,n.length):r==`string`&&t in n)?ot(n[t],e):!1}function _t(e){return ft(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&gt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var vt=Object.prototype;function yt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||vt)}function bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var xt=`[object Arguments]`;function St(e){return A(e)&&k(e)==xt}var Ct=Object.prototype,wt=Ct.hasOwnProperty,Tt=Ct.propertyIsEnumerable,Et=St(function(){return arguments}())?St:function(e){return A(e)&&wt.call(e,`callee`)&&!Tt.call(e,`callee`)};function Dt(){return!1}var Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?v.Buffer:void 0,jt=(At?At.isBuffer:void 0)||Dt,Mt=`[object Arguments]`,Nt=`[object Array]`,Pt=`[object Boolean]`,Ft=`[object Date]`,It=`[object Error]`,Lt=`[object Function]`,Rt=`[object Map]`,zt=`[object Number]`,Bt=`[object Object]`,Vt=`[object RegExp]`,Ht=`[object Set]`,Ut=`[object String]`,Wt=`[object WeakMap]`,Gt=`[object ArrayBuffer]`,Kt=`[object DataView]`,qt=`[object Float32Array]`,Jt=`[object Float64Array]`,Yt=`[object Int8Array]`,Xt=`[object Int16Array]`,Zt=`[object Int32Array]`,Qt=`[object Uint8Array]`,$t=`[object Uint8ClampedArray]`,en=`[object Uint16Array]`,tn=`[object Uint32Array]`,F={};F[qt]=F[Jt]=F[Yt]=F[Xt]=F[Zt]=F[Qt]=F[$t]=F[en]=F[tn]=!0,F[Mt]=F[Nt]=F[Gt]=F[Pt]=F[Kt]=F[Ft]=F[It]=F[Lt]=F[Rt]=F[zt]=F[Bt]=F[Vt]=F[Ht]=F[Ut]=F[Wt]=!1;function nn(e){return A(e)&&mt(e.length)&&!!F[k(e)]}function rn(e){return function(t){return e(t)}}var an=typeof exports==`object`&&exports&&!exports.nodeType&&exports,on=an&&typeof module==`object`&&module&&!module.nodeType&&module,sn=on&&on.exports===an&&g.process,cn=function(){try{return on&&on.require&&on.require(`util`).types||sn&&sn.binding&&sn.binding(`util`)}catch(e){}}(),ln=cn&&cn.isTypedArray,un=ln?rn(ln):nn,dn=Object.prototype.hasOwnProperty;function fn(e,t){var n=N(e),r=!n&&Et(e),i=!n&&!r&&jt(e),a=!n&&!r&&!i&&un(e),o=n||r||i||a,s=o?bt(e.length,String):[],c=s.length;for(var l in e)(t||dn.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||it(l,c)))&&s.push(l);return s}function pn(e,t){return function(n){return e(t(n))}}var mn=pn(Object.keys,Object),hn=Object.prototype.hasOwnProperty;function gn(e){if(!yt(e))return mn(e);var t=[];for(var n in Object(e))hn.call(e,n)&&n!=`constructor`&&t.push(n);return t}function _n(e){return ht(e)?fn(e):gn(e)}function vn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var yn=Object.prototype.hasOwnProperty;function bn(e){if(!P(e))return vn(e);var t=yt(e),n=[];for(var r in e)(r!=`constructor`||!t&&yn.call(e,r))&&n.push(r);return n}function xn(e){return ht(e)?fn(e,!0):bn(e)}var Sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cn=/^\w*$/;function wn(e,t){if(N(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||j(e)?!0:Cn.test(e)||!Sn.test(e)||t!=null&&e in Object(t)}var Tn=Ie(Object,`create`);function En(){this.__data__=Tn?Tn(null):{},this.size=0}function Dn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var On=`__lodash_hash_undefined__`,kn=Object.prototype.hasOwnProperty;function An(e){var t=this.__data__;if(Tn){var n=t[e];return n===On?void 0:n}return kn.call(t,e)?t[e]:void 0}var jn=Object.prototype.hasOwnProperty;function Mn(e){var t=this.__data__;return Tn?t[e]!==void 0:jn.call(t,e)}var Nn=`__lodash_hash_undefined__`;function Pn(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Tn&&t===void 0?Nn:t,this}function Fn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Fn.prototype.clear=En,Fn.prototype.delete=Dn,Fn.prototype.get=An,Fn.prototype.has=Mn,Fn.prototype.set=Pn;function In(){this.__data__=[],this.size=0}function Ln(e,t){for(var n=e.length;n--;)if(ot(e[n][0],t))return n;return-1}var Rn=Array.prototype.splice;function zn(e){var t=this.__data__,n=Ln(t,e);return n<0?!1:(n==t.length-1?t.pop():Rn.call(t,n,1),--this.size,!0)}function Bn(e){var t=this.__data__,n=Ln(t,e);return n<0?void 0:t[n][1]}function Vn(e){return Ln(this.__data__,e)>-1}function Hn(e,t){var n=this.__data__,r=Ln(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Un(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Un.prototype.clear=In,Un.prototype.delete=zn,Un.prototype.get=Bn,Un.prototype.has=Vn,Un.prototype.set=Hn;var Wn=Ie(v,`Map`);function Gn(){this.size=0,this.__data__={hash:new Fn,map:new(Wn||Un),string:new Fn}}function Kn(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function qn(e,t){var n=e.__data__;return Kn(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Jn(e){var t=qn(this,e).delete(e);return this.size-=+!!t,t}function Yn(e){return qn(this,e).get(e)}function Xn(e){return qn(this,e).has(e)}function Zn(e,t){var n=qn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qn.prototype.clear=Gn,Qn.prototype.delete=Jn,Qn.prototype.get=Yn,Qn.prototype.has=Xn,Qn.prototype.set=Zn;var $n=`Expected a function`;function er(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError($n);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(er.Cache||Qn),n}er.Cache=Qn;var tr=500;function nr(e){var t=er(e,function(e){return n.size===tr&&n.clear(),e}),n=t.cache;return t}var rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,ar=nr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(rr,function(e,n,r,i){t.push(r?i.replace(ir,`$1`):n||e)}),t});function or(e){return e==null?``:ae(e)}function sr(e,t){return N(e)?e:wn(e,t)?[e]:ar(or(e))}var cr=1/0;function lr(e){if(typeof e==`string`||j(e))return e;var t=e+``;return t==`0`&&1/e==-cr?`-0`:t}function ur(e,t){t=sr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lr(t[n++])];return n&&n==r?e:void 0}function dr(e,t,n){var r=e==null?void 0:ur(e,t);return r===void 0?n:r}function fr(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var pr=pn(Object.getPrototypeOf,Object),mr=`[object Object]`,hr=Function.prototype,gr=Object.prototype,_r=hr.toString,vr=gr.hasOwnProperty,yr=_r.call(Object);function br(e){if(!A(e)||k(e)!=mr)return!1;var t=pr(e);if(t===null)return!0;var n=vr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&_r.call(n)==yr}function xr(){if(!arguments.length)return[];var e=arguments[0];return N(e)?e:[e]}function Sr(){this.__data__=new Un,this.size=0}function Cr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function wr(e){return this.__data__.get(e)}function Tr(e){return this.__data__.has(e)}var Er=200;function Dr(e,t){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!Wn||r.length<Er-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qn(r)}return n.set(e,t),this.size=n.size,this}function Or(e){var t=this.__data__=new Un(e);this.size=t.size}Or.prototype.clear=Sr,Or.prototype.delete=Cr,Or.prototype.get=wr,Or.prototype.has=Tr,Or.prototype.set=Dr;function kr(e,t){return e&&lt(t,_n(t),e)}function Ar(e,t){return e&&lt(t,xn(t),e)}var jr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Mr=jr&&typeof module==`object`&&module&&!module.nodeType&&module,Nr=Mr&&Mr.exports===jr?v.Buffer:void 0,Pr=Nr?Nr.allocUnsafe:void 0;function Fr(e,t){if(t)return e.slice();var n=e.length,r=Pr?Pr(n):new e.constructor(n);return e.copy(r),r}function Ir(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Lr(){return[]}var Rr=Object.prototype.propertyIsEnumerable,zr=Object.getOwnPropertySymbols,Br=zr?function(e){return e==null?[]:(e=Object(e),Ir(zr(e),function(t){return Rr.call(e,t)}))}:Lr;function Vr(e,t){return lt(e,Br(e),t)}var Hr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)fr(t,Br(e)),e=pr(e);return t}:Lr;function Ur(e,t){return lt(e,Hr(e),t)}function Wr(e,t,n){var r=t(e);return N(e)?r:fr(r,n(e))}function Gr(e){return Wr(e,_n,Br)}function Kr(e){return Wr(e,xn,Hr)}var qr=Ie(v,`DataView`),Jr=Ie(v,`Promise`),Yr=Ie(v,`Set`),Xr=`[object Map]`,Zr=`[object Object]`,Qr=`[object Promise]`,$r=`[object Set]`,ei=`[object WeakMap]`,ti=`[object DataView]`,ni=Ee(qr),ri=Ee(Wn),ii=Ee(Jr),ai=Ee(Yr),oi=Ee(Le),si=k;(qr&&si(new qr(new ArrayBuffer(1)))!=ti||Wn&&si(new Wn)!=Xr||Jr&&si(Jr.resolve())!=Qr||Yr&&si(new Yr)!=$r||Le&&si(new Le)!=ei)&&(si=function(e){var t=k(e),n=t==Zr?e.constructor:void 0,r=n?Ee(n):``;if(r)switch(r){case ni:return ti;case ri:return Xr;case ii:return Qr;case ai:return $r;case oi:return ei}return t});var ci=si,li=Object.prototype.hasOwnProperty;function ui(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&li.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var di=v.Uint8Array;function fi(e){var t=new e.constructor(e.byteLength);return new di(t).set(new di(e)),t}function pi(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var mi=/\w*$/;function hi(e){var t=new e.constructor(e.source,mi.exec(e));return t.lastIndex=e.lastIndex,t}var gi=y?y.prototype:void 0,_i=gi?gi.valueOf:void 0;function vi(e){return _i?Object(_i.call(e)):{}}function yi(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var bi=`[object Boolean]`,xi=`[object Date]`,Si=`[object Map]`,Ci=`[object Number]`,wi=`[object RegExp]`,Ti=`[object Set]`,Ei=`[object String]`,Di=`[object Symbol]`,Oi=`[object ArrayBuffer]`,ki=`[object DataView]`,Ai=`[object Float32Array]`,ji=`[object Float64Array]`,Mi=`[object Int8Array]`,Ni=`[object Int16Array]`,Pi=`[object Int32Array]`,Fi=`[object Uint8Array]`,Ii=`[object Uint8ClampedArray]`,Li=`[object Uint16Array]`,Ri=`[object Uint32Array]`;function zi(e,t,n){var r=e.constructor;switch(t){case Oi:return fi(e);case bi:case xi:return new r(+e);case ki:return pi(e,n);case Ai:case ji:case Mi:case Ni:case Pi:case Fi:case Ii:case Li:case Ri:return yi(e,n);case Si:return new r;case Ci:case Ei:return new r(e);case wi:return hi(e);case Ti:return new r;case Di:return vi(e)}}function Bi(e){return typeof e.constructor==`function`&&!yt(e)?ze(pr(e)):{}}var Vi=`[object Map]`;function Hi(e){return A(e)&&ci(e)==Vi}var Ui=cn&&cn.isMap,Wi=Ui?rn(Ui):Hi,Gi=`[object Set]`;function Ki(e){return A(e)&&ci(e)==Gi}var qi=cn&&cn.isSet,Ji=qi?rn(qi):Ki,Yi=1,Xi=2,Zi=4,Qi=`[object Arguments]`,$i=`[object Array]`,ea=`[object Boolean]`,ta=`[object Date]`,na=`[object Error]`,ra=`[object Function]`,ia=`[object GeneratorFunction]`,aa=`[object Map]`,oa=`[object Number]`,sa=`[object Object]`,ca=`[object RegExp]`,la=`[object Set]`,ua=`[object String]`,da=`[object Symbol]`,fa=`[object WeakMap]`,pa=`[object ArrayBuffer]`,ma=`[object DataView]`,ha=`[object Float32Array]`,ga=`[object Float64Array]`,_a=`[object Int8Array]`,va=`[object Int16Array]`,ya=`[object Int32Array]`,ba=`[object Uint8Array]`,xa=`[object Uint8ClampedArray]`,Sa=`[object Uint16Array]`,Ca=`[object Uint32Array]`,I={};I[Qi]=I[$i]=I[pa]=I[ma]=I[ea]=I[ta]=I[ha]=I[ga]=I[_a]=I[va]=I[ya]=I[aa]=I[oa]=I[sa]=I[ca]=I[la]=I[ua]=I[da]=I[ba]=I[xa]=I[Sa]=I[Ca]=!0,I[na]=I[ra]=I[fa]=!1;function wa(e,t,n,r,i,a){var o,s=t&Yi,c=t&Xi,l=t&Zi;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!P(e))return e;var u=N(e);if(u){if(o=ui(e),!s)return He(e,o)}else{var d=ci(e),f=d==ra||d==ia;if(jt(e))return Fr(e,s);if(d==sa||d==Qi||f&&!i){if(o=c||f?{}:Bi(e),!s)return c?Ur(e,Ar(o,e)):Vr(e,kr(o,e))}else{if(!I[d])return i?e:{};o=zi(e,d,s)}}a||(a=new Or);var p=a.get(e);if(p)return p;a.set(e,o),Ji(e)?e.forEach(function(r){o.add(wa(r,t,n,r,e,a))}):Wi(e)&&e.forEach(function(r,i){o.set(i,wa(r,t,n,i,e,a))});var m=u?void 0:(l?c?Kr:Gr:c?xn:_n)(e);return Xe(m||e,function(r,i){m&&(i=r,r=e[i]),ct(o,i,wa(r,t,n,i,e,a))}),o}var Ta=1,Ea=4;function Da(e){return wa(e,Ta|Ea)}var Oa=1,ka=4;function Aa(e,t){return t=typeof t==`function`?t:void 0,wa(e,Oa|ka,t)}function ja(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}var Ma=`__lodash_hash_undefined__`;function Na(e){return this.__data__.set(e,Ma),this}function Pa(e){return this.__data__.has(e)}function Fa(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Qn;++t<n;)this.add(e[t])}Fa.prototype.add=Fa.prototype.push=Na,Fa.prototype.has=Pa;function Ia(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function La(e,t){return e.has(t)}var Ra=1,za=2;function Ba(e,t,n,r,i,a){var o=n&Ra,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&za?new Fa:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ia(t,function(e,t){if(!La(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Va(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Ha(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ua=1,Wa=2,Ga=`[object Boolean]`,Ka=`[object Date]`,qa=`[object Error]`,Ja=`[object Map]`,Ya=`[object Number]`,Xa=`[object RegExp]`,Za=`[object Set]`,Qa=`[object String]`,$a=`[object Symbol]`,eo=`[object ArrayBuffer]`,to=`[object DataView]`,no=y?y.prototype:void 0,ro=no?no.valueOf:void 0;function io(e,t,n,r,i,a,o){switch(n){case to:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case eo:return!(e.byteLength!=t.byteLength||!a(new di(e),new di(t)));case Ga:case Ka:case Ya:return ot(+e,+t);case qa:return e.name==t.name&&e.message==t.message;case Xa:case Qa:return e==t+``;case Ja:var s=Va;case Za:var c=r&Ua;if(s||(s=Ha),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Wa,o.set(e,t);var u=Ba(s(e),s(t),r,i,a,o);return o.delete(e),u;case $a:if(ro)return ro.call(e)==ro.call(t)}return!1}var ao=1,oo=Object.prototype.hasOwnProperty;function so(e,t,n,r,i,a){var o=n&ao,s=Gr(e),c=s.length;if(c!=Gr(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:oo.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var co=1,lo=`[object Arguments]`,uo=`[object Array]`,fo=`[object Object]`,po=Object.prototype.hasOwnProperty;function mo(e,t,n,r,i,a){var o=N(e),s=N(t),c=o?uo:ci(e),l=s?uo:ci(t);c=c==lo?fo:c,l=l==lo?fo:l;var u=c==fo,d=l==fo,f=c==l;if(f&&jt(e)){if(!jt(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Or),o||un(e)?Ba(e,t,n,r,i,a):io(e,t,c,n,r,i,a);if(!(n&co)){var p=u&&po.call(e,`__wrapped__`),m=d&&po.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new Or),i(h,g,n,r,a)}}return f?(a||(a=new Or),so(e,t,n,r,i,a)):!1}function ho(e,t,n,r,i){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:mo(e,t,n,r,ho,i)}var go=1,_o=2;function vo(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Or;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?ho(u,l,go|_o,r,d):f))return!1}}return!0}function yo(e){return e===e&&!P(e)}function bo(e){for(var t=_n(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,yo(i)]}return t}function xo(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function So(e){var t=bo(e);return t.length==1&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||vo(n,e,t)}}function Co(e,t){return e!=null&&t in Object(e)}function wo(e,t,n){t=sr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=lr(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&mt(i)&&it(o,i)&&(N(e)||Et(e)))}function To(e,t){return e!=null&&wo(e,t,Co)}var Eo=1,Do=2;function Oo(e,t){return wn(e)&&yo(t)?xo(lr(e),t):function(n){var r=dr(n,e);return r===void 0&&r===t?To(n,e):ho(t,r,Eo|Do)}}function ko(e){return function(t){return t==null?void 0:t[e]}}function Ao(e){return function(t){return ur(t,e)}}function jo(e){return wn(e)?ko(lr(e)):Ao(e)}function Mo(e){return typeof e==`function`?e:e==null?ge:typeof e==`object`?N(e)?Oo(e[0],e[1]):So(e):jo(e)}function No(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Po=No();function Fo(e,t){return e&&Po(e,t,_n)}function Io(e,t){return function(n,r){if(n==null)return n;if(!ht(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Lo=Io(Fo),Ro=function(){return v.Date.now()},zo=`Expected a function`,Bo=Math.max,Vo=Math.min;function Ho(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(zo);t=he(t)||0,P(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Bo(he(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Vo(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=Ro();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Ro())}function x(){var e=Ro(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Uo(e,t,n){(n!==void 0&&!ot(e[t],n)||n===void 0&&!(t in e))&&at(e,t,n)}function Wo(e){return A(e)&&ht(e)}function Go(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}function Ko(e){return lt(e,xn(e))}function qo(e,t,n,r,i,a,o){var s=Go(e,n),c=Go(t,n),l=o.get(c);if(l)Uo(e,n,l);else{var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=N(c),p=!f&&jt(c),m=!f&&!p&&un(c);u=c,f||p||m?N(s)?u=s:Wo(s)?u=He(s):p?(d=!1,u=Fr(c,!0)):m?(d=!1,u=yi(c,!0)):u=[]:br(c)||Et(c)?(u=s,Et(s)?u=Ko(s):(!P(s)||xe(s))&&(u=Bi(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Uo(e,n,u)}}function Jo(e,t,n,r,i){e!==t&&Po(t,function(a,o){if(i||(i=new Or),P(a))qo(e,t,o,n,Jo,r,i);else{var s=r?r(Go(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Uo(e,o,s)}},xn)}function Yo(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Xo(e){return typeof e==`function`?e:ge}function Zo(e,t){return(N(e)?Xe:Lo)(e,Xo(t))}function Qo(e,t){var n=[];return Lo(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function $o(e,t){return(N(e)?Ir:Qo)(e,Mo(t,3))}function es(e,t){var n=-1,r=ht(e)?Array(e.length):[];return Lo(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function ts(e,t){return(N(e)?M:es)(e,Mo(t,3))}function ns(e,t){return ho(e,t)}var rs=_t(function(e,t,n){Jo(e,t,n)});function is(e,t,n,r){if(!P(e))return e;t=sr(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=lr(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=P(u)?u:it(t[i+1])?[]:{})}ct(s,c,l),s=s[c]}return e}function L(e,t,n){return e==null?e:is(e,t,n)}function as(e){return or(e).toLowerCase()}var os=Yr&&1/Ha(new Yr([,-0]))[1]==1/0?function(e){return new Yr(e)}:Ve,ss=200;function cs(e,t,n){var r=-1,i=tt,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=Yo;else if(a>=ss){var l=t?null:os(e);if(l)return Ha(l);o=!1,i=La,c=new Fa}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function ls(e){return e&&e.length?cs(e):[]}var us={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`}},ds={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:`返回`}},R=(e=`localStorage`)=>({wsCache:e===`localStorage`?window.localStorage:window.sessionStorage,setLang:ps,getLang:ms,isZhCN:hs,setTheme:gs,getTheme:_s,isDark:vs,setCurrentSize:ys,getCurrentSize:bs,setUser:xs,getUser:Ss}),fs={IS_DARK:`isDark`,LANG:`lang`,THEME:`theme`,LAYOUT:`layout`,CURRENT_SIZE:`currentSize`,USER:`user`},ps=(e=``)=>{let{wsCache:t}=R();t.setItem(fs.LANG,e)},ms=()=>{let{wsCache:e}=R();return e.getItem(fs.LANG)},hs=()=>{let e=ms()||``;return!e||as(e)===`zh-cn`},gs=e=>{let{wsCache:t}=R();t.setItem(fs.THEME,JSON.stringify(e||`{}`))},_s=()=>{let{wsCache:e}=R(),t=e.getItem(fs.THEME);return t?JSON.parse(t):void 0},vs=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,ys=(e=``)=>{let{wsCache:t}=R();t.setItem(fs.CURRENT_SIZE,e)},bs=()=>{let{wsCache:e}=R();return e.getItem(fs.CURRENT_SIZE)},xs=e=>{let{wsCache:t}=R();t.setItem(fs.USER,JSON.stringify(e||`{}`))},Ss=()=>{let{wsCache:e}=R(),t=e.getItem(fs.USER),n=t?JSON.parse(t):{};return n.permissions=new Set(n.permissions||[]),n},Cs=ms()||`zh-cn`,z=e=>({t:e=>dr(Cs===`zh-cn`?ds:us,e,e)});function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ws(e)}function Ts(e,t){if(ws(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ws(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Es(e){var t=Ts(e,`string`);return ws(t)==`symbol`?t:t+``}function B(e,t,n){return(t=Es(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ds(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ds(Object(n),!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Os(e){let t=new Set(e.map(e=>e.field).filter(Boolean)),n=new Set;return e.flatMap(e=>{if(e.rangeFields===void 0)return[];let r=e.rangeFields;if(typeof e.field!=`string`||!e.field||!Array.isArray(r)||!r.length||r.some(e=>typeof e!=`string`||!e||t.has(e)||n.has(e))||new Set(r).size!==r.length)throw TypeError(`Invalid rangeFields for search rule "${e.field}": expected distinct fields that do not conflict with other rules.`);return r.forEach(e=>n.add(e)),[{field:e.field,fields:r,trimTrailingNulls:e.type===`cascader`}]})}function ks(e,t,n){if(!t.length||e==null&&!n.size)return e;let r=V({},e);for(let{field:e,fields:i,trimTrailingNulls:a}of t)if(i.some(e=>Object.prototype.hasOwnProperty.call(r,e))){let t=i.map(e=>{var t;return(t=r[e])==null?null:t});if(a)for(;t.length&&t[t.length-1]===null;)t.pop();r[e]=t.every(e=>e===null)?null:t,i.forEach(e=>delete r[e])}else n.has(e)&&!Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=null);return r}function As(e,t){if(!t.length||e==null)return e;let n=V({},e);for(let{field:e,fields:r}of t){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let t=n[e];if(t!=null&&t!==``&&!Array.isArray(t))throw TypeError(`Invalid range value for search rule "${e}": expected an array or an empty value.`);r.forEach((e,r)=>{var i;n[e]=Array.isArray(t)?(i=t[r])==null?null:i:null}),delete n[e]}return n}function js(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){js(a,r,i,o,s,`next`,e)}function s(e){js(a,r,i,o,s,`throw`,e)}o(void 0)})}}var Ms=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,u.defineComponent)(V(V({},{name:`AbSearch`}),{},{__name:`ab-search`,props:(0,u.mergeModels)({rule:{},compactMode:{type:Boolean,default:!1},collapse:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,u.mergeModels)([`update:modelValue`,`query`,`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,r=e,i=(0,u.inject)(`abTableRef`,null),{t:a}=z(),o=(0,u.useModel)(e,`modelValue`),s=(0,u.ref)(r.collapse),c=(0,u.ref)(),l=(0,u.ref)(),f=(0,u.computed)(()=>Os(r.rule.map(ee))),p=(0,u.reactive)(new Set);(0,u.watch)(()=>f.value.map(({field:e,fields:t})=>({field:e,present:o.value!=null&&t.some(e=>Object.prototype.hasOwnProperty.call(o.value,e))})),e=>{let t=new Set(e.map(({field:e})=>e));for(let e of p)t.has(e)||p.delete(e);for(let{field:t,present:n}of e)n&&p.add(t)},{immediate:!0,flush:`sync`});let m=(0,u.computed)(()=>ks(o.value,f.value,p)),h;function g(e,t){var n;let r=V({},(n=h)==null?m.value:n);for(let n of t.fields())Object.prototype.hasOwnProperty.call(e,n)?r[n]=e[n]:delete r[n];h=r,o.value=As(r,f.value),(0,u.nextTick)(()=>{h===r&&(h=void 0)})}let _=(0,u.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`}},a(`search`)],props:{type:`primary`},on:{click:k}},{type:`ElButton`,native:!0,children:[{type:`icon`,props:{icon:`ep:refresh`}},a(`reset`)],props:{type:`default`},on:{click:E}},{type:`ElButton`,native:!0,children:[a(`expand`)],props:{type:`primary`,link:!0,icon:(0,u.markRaw)(d.ArrowDown)},on:{click:te}}]});(0,u.watchEffect)(()=>{_.children[2].children=[a(s.value?`unexpand`:`expand`)],_.children[2].props.icon=s.value?(0,u.markRaw)(d.ArrowUp):(0,u.markRaw)(d.ArrowDown)}),(0,u.watch)(()=>r.rule,()=>{s.value=r.collapse});let v=(0,u.computed)(()=>[...r.rule.filter(e=>ee(e).hidden!==!0),_]),y=(0,u.computed)(()=>r.rule.filter(e=>ee(e).hidden===!0).map(e=>(0,u.shallowReactive)(V(V({},ee(e)),{},{hidden:!1}))));function b(e,t=new Set){for(let n of e){if(!n||typeof n!=`object`)continue;let e=ee(n);if(typeof e.field==`string`&&t.add(e.field),Array.isArray(e.children)&&b(e.children,t),Array.isArray(e.control))for(let n of e.control)Array.isArray(n.rule)&&b(n.rule,t)}return t}let x=(0,u.computed)(()=>b(v.value)),S=(0,u.computed)(()=>b(y.value));function C(e){if(m.value==null)return m.value;let t=V({},m.value);for(let n of e)delete t[n];return t}let w=(0,u.computed)(e=>{let t=C(S.value);return ns(t,e)?e:t}),T=(0,u.computed)(e=>{let t=C(x.value);return ns(t,e)?e:t});(0,u.watch)(()=>o.value,e=>O());function E(){return D.apply(this,arguments)}function D(){return D=H(function*(){var e,t;(e=c.value)==null||e.resetFields(),yield(0,u.nextTick)(),(t=l.value)==null||t.resetFields()}),D.apply(this,arguments)}function ee(e){return typeof e.getRule==`function`?e.getRule():e}function O(){var e;i==null||(e=i.value)==null||e.reload(),n(`query`,o.value)}function k(){return A.apply(this,arguments)}function A(){return A=H(function*(){yield(0,u.nextTick)(),O()}),A.apply(this,arguments)}function te(){s.value=!s.value}return(t,n)=>{let r=(0,u.resolveComponent)(`ab-form`);return(0,u.openBlock)(),(0,u.createElementBlock)(`section`,{class:(0,u.normalizeClass)([`ab-search`,e.compactMode?`compact`:``])},[(0,u.createVNode)(r,{rule:v.value,"model-value":w.value,"onUpdate:modelValue":n[0]||(n[0]=e=>g(e,c.value)),api:c.value,"onUpdate:api":n[1]||(n[1]=e=>c.value=e)},null,8,[`rule`,`model-value`,`api`]),(0,u.createVNode)(u.Transition,{name:`ab-search-expand`,mode:`out-in`,appear:``,persisted:``},{default:(0,u.withCtx)(()=>[(0,u.withDirectives)((0,u.createElementVNode)(`div`,null,[(0,u.createVNode)(r,{rule:y.value,"model-value":T.value,"onUpdate:modelValue":n[2]||(n[2]=e=>g(e,l.value)),api:l.value,"onUpdate:api":n[3]||(n[3]=e=>l.value=e)},null,8,[`rule`,`model-value`,`api`])],512),[[u.vShow,s.value]])]),_:1})],2)}}})),[[`__scopeId`,`data-v-bfc6a8b4`]]),Ns=(e,t)=>{e.component(`ab-search`,Ms)};function Ps(e){let t=e.replace(/([A-Z])/g,`-$1`).toLocaleLowerCase();return t.indexOf(`-`)===0&&(t=t.substr(1)),t}function Fs(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function U(e,t,n){e&&t&&(e[t]=n)}function Is(e,t){e&&t&&delete e[t]}var Ls=e=>Object.prototype.toString.call(e).slice(8,-1),W={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&&!W.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=Ls(e);return t===`Function`||t===`AsyncFunction`},getType(e){return Ls(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e==`string`&&!e},Date:e=>W.type(e,`Date`),Object:e=>W.type(e,`Object`),String:e=>W.type(e,`String`),Boolean:e=>W.type(e,`Boolean`),Array:e=>W.type(e,`Array`),Number:e=>W.type(e,`Number`)};function G(e,t){return{}.hasOwnProperty.call(e,t)}function Rs(e,t={},n){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=Reflect.get(t,r);if(Array.isArray(i)||W.Object(i)){let t=Reflect.get(e,r)===void 0;if(Array.isArray(i))t&&U(e,r,[]);else{let a=i;if(a._clone&&n!==void 0){if(n)i=a.getRule(),t&&U(e,r,{});else{U(e,r,a._clone());continue}}else t&&U(e,r,{})}Reflect.set(e,r,Rs(Reflect.get(e,r),i,n))}else if(U(e,r,i),!W.Undef(i)){let t=i;W.Undef(t.__json)||Reflect.set(Reflect.get(e,r),`__json`,t.__json),W.Undef(t.__origin)||Reflect.set(Reflect.get(e,r),`__origin`,t.__origin)}}return n!==void 0&&Array.isArray(e)?e.filter(e=>!e||!e.__ctrl):e}function zs(e){return Rs({},{value:e}).value}function Bs(e,t,n){return`[archbiz ${e}]: ${t}`+(n?`
10
8
 
11
- err: ${String(i)}`);return}}function tl(e,t){return JSON.parse(e,function(r,n){return typeof n=="string"?Qe(n,t):n})}var tt=(e,t={},r={})=>{let n=[...Za,...r.normal||[]],i=[...Xa,...r.array||[]],o=[...el,...r.functional||[]],a=r.props||[];return e.reduce((s,u)=>{for(let c in u)if(s[c])if(a.indexOf(c)>-1)s[c]=tt([u[c]],s[c]);else if(n.indexOf(c)>-1)s[c]=R(R({},s[c]),u[c]);else if(i.indexOf(c)>-1){let d=s[c]instanceof Array?s[c]:[s[c]],f=u[c]instanceof Array?u[c]:[u[c]];s[c]=[...d,...f]}else if(o.indexOf(c)>-1)for(let d in u[c])if(s[c][d]){let f=s[c][d]instanceof Array?s[c][d]:[s[c][d]],h=u[c][d]instanceof Array?u[c][d]:[u[c][d]];s[c][d]=[...f,...h]}else s[c][d]=u[c][d];else if(c==="hook")for(let d in u[c])s[c][d]?s[c][d]=sh(s[c][d],u[c][d]):s[c][d]=u[c][d];else s[c]=u[c];else s[c]=n.indexOf(c)>-1||o.indexOf(c)>-1||a.indexOf(c)>-1?R({},u[c]):i.indexOf(c)>-1?u[c]instanceof Array?[...u[c]]:typeof u[c]=="object"?R({},u[c]):u[c]:u[c];return s},t)},sh=(e,t)=>function(...r){e&&e.apply(this,r),t&&t.apply(this,r)};function ut(e,t){let r=null;return function(...n){r!==null&&clearTimeout(r),r=setTimeout(()=>e.apply(this,n),t)}}function ct(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 X(e,...t){return(Object.assign||function(r,...n){for(let i of n)for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&De(r,o,Reflect.get(i,o));return r})(e,...t)}function rl(e){return typeof e!="object"||!e?e:Array.isArray(e)?[...e]:R({},e)}function uh(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 ch(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nn(e){return ch(e)?e:Promise.resolve(e)}function kt(e){return Array.isArray(e)?e:e==null||e===""?[]:[e]}function Pe(e){return nl(e==null?void 0:e.replace(/(-[a-z])/g,function(t){return t.replace("-","").toLocaleUpperCase()}))}function nl(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function zt(e){return e?typeof e=="object"?JSON.stringify(e,null,2):String(e):""}var dh=0;function Qr(){let e=370+ ++dh;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}function il(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=il(o[i],t,r);if(a)return a}}}var fh={black:"#182327"},ph={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},Ve={h:0,s:0,l:0},wr={h:0,s:0,l:0};function hn(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 hh=/^#([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*\)/,ol=class mt{constructor(t,r,n,i){be(this,"isColor",!0);be(this,"r",1);be(this,"g",1);be(this,"b",1);be(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"?hh.test(t):typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=16777215&&t.toString(6).length===6}static getRandomStyle(t){return t?Ue.random().setA(t).getStyle():Ue.random().getStyle()}static getDarken(t,r=.8){return Ue.set(t).getHSL(xr),Ue.setHSL(xr.h,xr.s,xr.l*r).getStyle()}static getLighten(t,r=1.2){return this.getDarken(t,r)}static getContrast(t){return Ue.set(t),Ue.getContrastString()}static getArray(t){return Ue.set(t).toArray()}static getComplementary(t){return Ue.set(t),Ue.getComplementaryString()}static getMoreTransparent(t,r){return Ue.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=mh(t,1),r=Ut(r,0,1),n=Ut(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=hn(a,o,t+1/3),this.g=hn(a,o,t),this.b=hn(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,u=parseInt(n[3],10)/100,c=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0);return this.setHSL(a,s,u,c)}}}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=ph[t.toLowerCase()];return r===void 0?console.warn("Color: Unknown color "+t):this.setHex(r),this}clone(){return new mt(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 mt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new mt){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 mt(n,i,o)}getHex(){return Ut(this.r*255,0,255)<<16^Ut(this.g*255,0,255)<<8^Ut(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,u,c=(a+o)/2;if(a===o)s=0,u=0;else{let d=o-a;switch(u=c<=.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=u,t.l=c,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 mt){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 mt(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(Ve),Ve.h+=t,Ve.s+=r,Ve.l+=n,this.setHSL(Ve.h,Ve.s,Ve.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(Ve),t.getHSL(wr);let n=mn(Ve.h,wr.h,r),i=mn(Ve.s,wr.s,r),o=mn(Ve.l,wr.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}},Ut=(e,t,r)=>Math.max(t,Math.min(r,e)),mh=(e,t)=>(e%t+t)%t,mn=(e,t,r)=>(1-r)*e+r*t,Ue=new ol,xr={h:0,s:0,l:0};function al(){let e=window.localStorage.getItem("user"),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function gn(e,t){let r=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(r=yh(e)),t&&t.length>0&&(r||(r=vh(t))),r)}var gh="*:*:*",yh=(e=[])=>{var r;let t=al();return((r=t==null?void 0:t.permissions)==null?void 0:r.has(gh))||e.some(n=>{var i;return(i=t==null?void 0:t.permissions)==null?void 0:i.has(n)})};function vh(e){var t;if(e&&e instanceof Array&&e.length>0){let r=e;return!!(((t=al())==null?void 0:t.roles)||[]).some(n=>n==="super_admin"||r.includes(n))}return console.error("permission.hasRole"),!1}var dr=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 ll={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",c="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+)?$/,v=/\[([^\]]+)]|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 I=String(F);return!I||I.length>=A?F:""+Array(A+1-I.length).join(C)+F},V={s:$,z:function(F){var A=-F.utcOffset(),C=Math.abs(A),I=Math.floor(C/60),D=C%60;return(A<=0?"+":"-")+$(I,2,"0")+":"+$(D,2,"0")},m:function F(A,C){if(A.date()<C.date())return-F(C,A);var I=12*(C.year()-A.year())+(C.month()-A.month()),D=A.clone().add(I,f),G=C-D<0,Q=A.clone().add(I+(G?-1:1),f);return+(-(I+(C-D)/(G?D-Q:Q-D))||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:c,D:m,h:u,m:s,s:a,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},P="en",T={};T[P]=S;var E="$isDayjsObject",k=function(F){return F instanceof x||!(!F||!F[E])},N=function F(A,C,I){var D;if(!A)return P;if(typeof A=="string"){var G=A.toLowerCase();T[G]&&(D=G),C&&(T[G]=C,D=G);var Q=A.split("-");if(!D&&Q.length>1)return F(Q[0])}else{var Z=A.name;T[Z]=A,D=Z}return!I&&D&&(P=D),D||!I&&P},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=V;U.l=N,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=N(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(I){var D=I.date,G=I.utc;if(D===null)return new Date(NaN);if(U.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Q=D.match(y);if(Q){var Z=Q[2]-1||0,M=(Q[7]||"0").substring(0,3);return G?new Date(Date.UTC(Q[1],Z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,M)):new Date(Q[1],Z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,M)}}return new Date(D)}(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,I){var D=q(C);return this.startOf(I)<=D&&D<=this.endOf(I)},A.isAfter=function(C,I){return q(C)<this.startOf(I)},A.isBefore=function(C,I){return this.endOf(I)<q(C)},A.$g=function(C,I,D){return U.u(C)?this[I]:this.set(D,C)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(C,I){var D=this,G=!!U.u(I)||I,Q=U.p(C),Z=function(w,O){var j=U.w(D.$u?Date.UTC(D.$y,O,w):new Date(D.$y,O,w),D);return G?j:j.endOf(c)},M=function(w,O){return U.w(D.toDate()[w].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(O)),D)},H=this.$W,Y=this.$M,ne=this.$D,ue="set"+(this.$u?"UTC":"");switch(Q){case p:return G?Z(1,0):Z(31,11);case f:return G?Z(1,Y):Z(0,Y+1);case d:var J=this.$locale().weekStart||0,b=(H<J?H+7:H)-J;return Z(G?ne-b:ne+(6-b),Y);case c:case m:return M(ue+"Hours",0);case u:return M(ue+"Minutes",1);case s:return M(ue+"Seconds",2);case a:return M(ue+"Milliseconds",3);default:return this.clone()}},A.endOf=function(C){return this.startOf(C,!1)},A.$set=function(C,I){var D,G=U.p(C),Q="set"+(this.$u?"UTC":""),Z=(D={},D[c]=Q+"Date",D[m]=Q+"Date",D[f]=Q+"Month",D[p]=Q+"FullYear",D[u]=Q+"Hours",D[s]=Q+"Minutes",D[a]=Q+"Seconds",D[o]=Q+"Milliseconds",D)[G],M=G===c?this.$D+(I-this.$W):I;if(G===f||G===p){var H=this.clone().set(m,1);H.$d[Z](M),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else Z&&this.$d[Z](M);return this.init(),this},A.set=function(C,I){return this.clone().$set(C,I)},A.get=function(C){return this[U.p(C)]()},A.add=function(C,I){var D,G=this;C=Number(C);var Q=U.p(I),Z=function(Y){var ne=q(G);return U.w(ne.date(ne.date()+Math.round(Y*C)),G)};if(Q===f)return this.set(f,this.$M+C);if(Q===p)return this.set(p,this.$y+C);if(Q===c)return Z(1);if(Q===d)return Z(7);var M=(D={},D[s]=n,D[u]=i,D[a]=r,D)[Q]||1,H=this.$d.getTime()+C*M;return U.w(H,this)},A.subtract=function(C,I){return this.add(-1*C,I)},A.format=function(C){var I=this,D=this.$locale();if(!this.isValid())return D.invalidDate||g;var G=C||"YYYY-MM-DDTHH:mm:ssZ",Q=U.z(this),Z=this.$H,M=this.$m,H=this.$M,Y=D.weekdays,ne=D.months,ue=D.meridiem,J=function(O,j,z,oe){return O&&(O[j]||O(I,G))||z[j].slice(0,oe)},b=function(O){return U.s(Z%12||12,O,"0")},w=ue||function(O,j,z){var oe=O<12?"AM":"PM";return z?oe.toLowerCase():oe};return G.replace(v,function(O,j){return j||function(z){switch(z){case"YY":return String(I.$y).slice(-2);case"YYYY":return U.s(I.$y,4,"0");case"M":return H+1;case"MM":return U.s(H+1,2,"0");case"MMM":return J(D.monthsShort,H,ne,3);case"MMMM":return J(ne,H);case"D":return I.$D;case"DD":return U.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return J(D.weekdaysMin,I.$W,Y,2);case"ddd":return J(D.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(Z);case"HH":return U.s(Z,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return w(Z,M,!0);case"A":return w(Z,M,!1);case"m":return String(M);case"mm":return U.s(M,2,"0");case"s":return String(I.$s);case"ss":return U.s(I.$s,2,"0");case"SSS":return U.s(I.$ms,3,"0");case"Z":return Q}return null}(O)||Q.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(C,I,D){var G,Q=this,Z=U.p(I),M=q(C),H=(M.utcOffset()-this.utcOffset())*n,Y=this-M,ne=function(){return U.m(Q,M)};switch(Z){case p:G=ne()/12;break;case f:G=ne();break;case h:G=ne()/3;break;case d:G=(Y-H)/6048e5;break;case c:G=(Y-H)/864e5;break;case u:G=Y/i;break;case s:G=Y/n;break;case a:G=Y/r;break;default:G=Y}return D?G:U.a(G)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return T[this.$L]},A.locale=function(C,I){if(!C)return this.$L;var D=this.clone(),G=N(C,I,!0);return G&&(D.$L=G),D},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",u],["$W",c],["$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=N,q.isDayjs=k,q.unix=function(F){return q(1e3*F)},q.en=T[P],q.Ls=T,q.p={},q})})(ll);var bh=ll.exports;const ce=jt(bh);var wh={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r,n,i=1e3,o=6e4,a=36e5,s=864e5,u=31536e6,c=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:u,months:c,days:s,hours:a,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof V},m=function(T,E,k){return new V(T,k,E.$l)},g=function(T){return n.p(T)+"s"},y=function(T){return T<0},v=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:""}},V=function(){function T(k,N,q){var U=this;if(this.$d={},this.$l=q,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),N)return m(k*h[g(N)],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(N,q){return N+(k.$d[q]||0)*h[q]},0)},E.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=v(k/u),k%=u,this.$d.months=v(k/c),k%=c,this.$d.days=v(k/s),k%=s,this.$d.hours=v(k/a),k%=a,this.$d.minutes=v(k/o),k%=o,this.$d.seconds=v(k/i),k%=i,this.$d.milliseconds=k},E.toISOString=function(){var k=$(this.$d.years,"Y"),N=$(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||N.negative||U.negative||x.negative||_.negative||A.negative,I=x.format||_.format||A.format?"T":"",D=(C?"-":"")+"P"+k.format+N.format+U.format+I+x.format+_.format+A.format;return D==="P"||D==="-P"?"P0D":D},E.toJSON=function(){return this.toISOString()},E.format=function(k){var N=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 N.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 N=this.$ms,q=g(k);return q==="milliseconds"?N%=1e3:N=q==="weeks"?v(N/h[q]):this.$d[q],N||0},E.add=function(k,N,q){var U;return U=N?k*h[g(N)]:p(k)?k.$ms:m(k,this).$ms,m(this.$ms+U*(q?-1:1),this)},E.subtract=function(k,N){return this.add(k,N,!0)},E.locale=function(k){var N=this.clone();return N.$l=k,N},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}(),P=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 N=E.prototype.add,q=E.prototype.subtract;E.prototype.add=function(U,x){return p(U)?P(this,U,1):N.bind(this)(U,x)},E.prototype.subtract=function(U,x){return p(U)?P(this,U,-1):q.bind(this)(U,x)}}})})(wh);var sl={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){return function(r,n){var i=n.prototype,o=i.format;i.format=function(a){var s=this,u=this.$locale();if(!this.isValid())return o.bind(this)(a);var c=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 u.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return u.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return c.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)}}})})(sl);var xh=sl.exports;const Sh=jt(xh);var ul={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r="day";return function(n,i,o){var a=function(c){return c.add(4-c.isoWeekday(),r)},s=i.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-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(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=s.startOf;s.startOf=function(c,d){var f=this.$utils(),h=!!f.u(d)||d;return f.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,d)}}})})(ul);var Ch=ul.exports;const $h=jt(Ch);var cl={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,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]+/,u={},c=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(v){this[y]=+v}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var S=v.match(/([+-]|\d\d)/g),$=60*S[1]+(+S[2]||0);return $===0?0:S[0]==="+"?-$:$}(y)}],h=function(y){var v=u[y];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(y,v){var S,$=u.meridiem;if($){for(var V=1;V<=24;V+=1)if(y.indexOf($(V,0,v))>-1){S=V>12;break}}else S=y===(v?"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 v=u.ordinal,S=y.match(/\d+/);if(this.day=S[0],v)for(var $=1;$<=31;$+=1)v($).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 v=h("months"),S=(h("monthsShort")||v.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 v=h("months").indexOf(y)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(y){this.year=c(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(y){var v,S;v=y,S=u&&u.formats;for(var $=(y=v.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),V=$.length,P=0;P<V;P+=1){var T=$[P],E=m[T],k=E&&E[0],N=E&&E[1];$[P]=N?{regex:k,parser:N}:T.replace(/^\[|\]$/g,"")}return function(q){for(var U={},x=0,_=0;x<V;x+=1){var F=$[x];if(typeof F=="string")_+=F.length;else{var A=F.regex,C=F.parser,I=q.slice(_),D=A.exec(I)[0];C.call(U,D),q=q.replace(D,"")}}return function(G){var Q=G.afternoon;if(Q!==void 0){var Z=G.hours;Q?Z<12&&(G.hours+=12):Z===12&&(G.hours=0),delete G.afternoon}}(U),U}}return function(y,v,S){S.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var $=v.prototype,V=$.parse;$.parse=function(P){var T=P.date,E=P.utc,k=P.args;this.$u=E;var N=k[1];if(typeof N=="string"){var q=k[2]===!0,U=k[3]===!0,x=q||U,_=k[2];U&&(_=k[2]),u=this.$locale(),!q&&_&&(u=S.Ls[_]),this.$d=function(I,D,G,Q){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*I);var Z=g(D)(I),M=Z.year,H=Z.month,Y=Z.day,ne=Z.hours,ue=Z.minutes,J=Z.seconds,b=Z.milliseconds,w=Z.zone,O=Z.week,j=new Date,z=Y||(M||H?1:j.getDate()),oe=M||j.getFullYear(),ie=0;M&&!H||(ie=H>0?H-1:j.getMonth());var pe,Ee=ne||0,Ce=ue||0,Oe=J||0,ve=b||0;return w?new Date(Date.UTC(oe,ie,z,Ee,Ce,Oe,ve+60*w.offset*1e3)):G?new Date(Date.UTC(oe,ie,z,Ee,Ce,Oe,ve)):(pe=new Date(oe,ie,z,Ee,Ce,Oe,ve),O&&(pe=Q(pe).week(O).toDate()),pe)}catch(Re){return new Date("")}}(T,N,E,S),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),x&&T!=this.format(N)&&(this.$d=new Date("")),u={}}else if(N instanceof Array)for(var F=N.length,A=1;A<=F;A+=1){k[1]=N[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 V.call(this,P)}}})})(cl);var Th=cl.exports;const Eh=jt(Th),kh=cr()==="zh-cn";ce.extend($h);ce.extend(Sh);ce.extend(Eh);function nt(e){return typeof e=="undefined"||e==="undefined"||e==="null"||e===null||e===""||isNaN(e)}function _h(e){if(nt(e))return e;let t="";return kh?t=Intl.NumberFormat("zh-CN",{style:"currency",currency:"CNY"}).format(e):t=Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e),t}function Fh(e){return nt(e)?e:(Math.round(e*100)/100).toLocaleString()}function Ah(e){return nt(e)?e:Math.round(e*100)/100+" %"}function _e(e,t="YYYY-MM-DD"){if(e==null||e==="")return e;const r=ce(e);return r.isValid()?r.format(t):e}function Oh(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 nt(t)?"":t;const o=a=>!0;return Array.isArray(t)?i.push(...wt(e,a=>t.includes(String(a.value))&&o())):i.push(...wt(e,a=>(a.value===t||String(a.value)===String(t))&&o())),i!=null&&i.length?Zp(Uf(Na(i,r))).join("、"):Array.isArray(t)||nt(t)?"":t}const yo=({cellValue:e}={},t="YYYY-MM-DD HH:mm")=>_e(e,t),yn=({cellValue:e}={},t="YYYY")=>_e(e,t),vn=({cellValue:e}={},t="Q")=>e==null||e===""||!ce(e).isValid()?e:xt()?_e(e,"YYYY")+"年"+_e(e,t)+"季度":"Quarter "+_e(e,t)+", "+_e(e,"YYYY"),bn=({cellValue:e}={},t="MM")=>e==null||e===""||!ce(e).isValid()?e:xt()?_e(e,"YYYY")+"年 "+_e(e,t)+"月":_e(e,t)+"/"+_e(e,"YYYY"),Ph=({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&&!ce(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},vo=({cellValue:e,itemValue:t}={})=>((typeof e=="undefined"||e===null)&&(e=t),nt(e)?e:Fh(e)),bo=({cellValue:e}={})=>nt(e)?e:Ah(e),wo=({cellValue:e,itemValue:t}={})=>(nt(e)&&(e=t),nt(e)?e:_h(e)),Rh=new Map([["radio",xo],["checkbox",xo],["switch",Mh],["treeSelect",Dh],["cascader",Ih],["inputNumber",()=>typeof vo=="function"?vo:void 0],["inputCurrency",()=>typeof wo=="function"?wo:void 0],["inputPercent",()=>typeof bo=="function"?bo:void 0],["datePicker",Bh],["timePicker",jh]]);function hi(e){var n;if(typeof e.formatter=="function")return re(R({},e),{formatter:e.formatter});const t=Rh.get((n=e.type)!=null?n:"");let r;return t?r=t(e):Array.isArray(e.options)&&e.options.length>0&&(r=Nh(e)),re(R({},e),{formatter:r})}function dl(e,t){if(typeof e!="string"||typeof t!="string"||t==="YYYY-wo")return e;const r=t==="x"||t==="X"?ce(Number(e)*(t==="X"?1e3:1)):ce(e,t,!0);return r.isValid()?r:e}function xo(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,u;const a=Array.isArray(t)?t.find(c=>(c==null?void 0:c.value)===o):void 0;return(u=(s=a==null?void 0:a.label)!=null?s:o)!=null?u:""}).join("、")}function Mh(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 Dh(e){var s,u,c,d,f,h,p;const t=(s=e.props)!=null?s:{},r=(u=t.props)!=null?u:{},n=e.optionsTo==="props.data"&&Array.isArray(e.options)?e.options:t.data,i=(f=(d=(c=r.value)!=null?c: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 v=Array.isArray(n)?il(n,y,{valueField:i,childrenField:a}):void 0;return(S=v==null?void 0:v[o])!=null?S:y}).join("、")}function fl(e,t,r,n){for(const i of e){if(jr(i[r],t))return[i];const o=i[n];if(Array.isArray(o)){const a=fl(o,t,r,n);if(a)return[i,...a]}}}function Ih(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:[],u=(y=t.separator)!=null?y:" / ",c=t.showAllLevels!==!1;function d(v){let S;if(r.emitPath===!1){const $=fl(s,v,i,a);S=$?$.map(V=>{var P;return(P=V[o])!=null?P:V[i]}):[v]}else{const $=Array.isArray(v)?v:[v];let V=s;S=$.map(P=>{var k;const T=V.find(N=>jr(N[i],P)),E=T==null?void 0:T[a];return V=Array.isArray(E)?E:[],(k=T==null?void 0:T[o])!=null?k:P})}return(c?S:S.slice(-1)).join(u)}return({cellValue:v})=>v==null||v===""?"":r.multiple===!0?(Array.isArray(v)?v:[v]).map(d).join("、"):d(v)}const wn={year:yn,years:yn,yearrange:yn,quarter:vn,quarters:vn,quarterrange:vn,month:bn,months:bn,monthrange:bn,week:Ph,datetime:yo,datetimerange:yo};function Bh(e){var n,i;const t=(i=(n=e.props)==null?void 0:n.type)!=null?i:"date",r=o=>{var s,u,c,d;if(o==null||o==="")return"";const a=dl(o,(s=e.props)==null?void 0:s.valueFormat);return(u=e.props)!=null&&u.format?_e(a,e.props.format):(d=(c=wn[t])==null?void 0:c.call(wn,{cellValue:a}))!=null?d:_e(a)};return({cellValue:o})=>{var s,u;if(!Array.isArray(o))return r(o);if(o.every(c=>c==null||c===""))return"";const a=t.endsWith("range")?(u=(s=e.props)==null?void 0:s.rangeSeparator)!=null?u:" - ":"、";return o.map(r).join(a)}}function jh(e){const t=r=>{var i,o,a,s;if(r==null||r==="")return"";const n=dl(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 Nh(e){return({cellValue:t})=>Oh(e.options,t)}function pl(e="small"){return e==="large"?"medium":e==="default"?"small":"mini"}const de={DETAIL:"detail",DEL:"del",ADD:"add",EDIT:"edit",SAVE:"save",CREATE:"create",READ:"read",UPDATE:"update",EXPORT:"export",OPERATE:"OPERATE"};function So(e){let t=0;for(const r of e)r.group&&(t=Math.max(t,gd(r.group).length));return t+1}const hl=()=>{const{t:e}=Xe();return{info(t){L.ElMessage.info(t)},error(t){L.ElMessage.error(t)},success(t){L.ElMessage.success(t)},warning(t){L.ElMessage.warning(t)},alert(t){L.ElMessageBox.alert(t,e("common.confirmTitle"))},alertError(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"error"})},alertSuccess(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"success"})},alertWarning(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"warning"})},notify(t){L.ElNotification.info(t)},notifyError(t){L.ElNotification.error(t)},notifySuccess(t){L.ElNotification.success(t)},notifyWarning(t){L.ElNotification.warning(t)},confirm(t,r){return L.ElMessageBox.confirm(t,r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},delConfirm(t,r){return L.ElMessageBox.confirm(t||e("common.delMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},exportConfirm(t,r){return L.ElMessageBox.confirm(t||e("common.exportMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},prompt(t,r){return L.ElMessageBox.prompt(t,r,{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})}}},Zr=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}=Xe(),a=hl(),s=l.inject("abTableDetailRef",void 0),u=l.inject("abTableRef",void 0),{wsCache:c}=Se(),d=l.computed(()=>c.getCurrentSize||"default"),f=l.useModel(e,"api"),h=l.computed(()=>{var V;if(!i.rule||Array.isArray(i.rule)&&!((V=i.rule)!=null&&V.length))return;const $=Array.isArray(i.rule)?{type:"ElRow",children:[...st(i.rule)],native:!0}:re(R({},st(i.rule)),{native:!0});return delete $.field,ja($==null?void 0:$.children,P=>{xe(P,"props.plain",i.plain),xe(P,"props.link",i.link),xe(P,"props.size",d.value),P.field===de.CREATE?(xe(P,"children",[{type:"icon",props:{icon:"ep:plus"}},o(`action.${de.CREATE}`)]),xe(P,"props",{type:"primary",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",m),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",p)):P.field===de.DETAIL?(xe(P,"children",[{type:"icon",props:{icon:"ep:view"}},o(`action.${de.DETAIL}`)]),xe(P,"props",{type:"primary",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",g)):P.field===de.DEL?(xe(P,"children",[{type:"icon",props:{icon:"ep:delete"}},o(`action.${de.DEL}`)]),xe(P,"props",{type:"danger",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",v),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",y)):P.field===de.EXPORT&&(xe(P,"children",[{type:"icon",props:{icon:"ep:download"}},o(`action.${de.EXPORT}`)]),xe(P,"props",{type:"warning",plain:i.plain,link:i.link}),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",S)),xe(P,"native",!0)}),[$]});function p(){return!gn([`${i.permiPrefix}:create`],["admin"])}function m(){var $,V;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((V=s==null?void 0:s.value)==null||V.toggle(!0,i.modelValue,!1))}function g(){var $,V;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((V=s==null?void 0:s.value)==null||V.toggle(!0,i.modelValue,i.readonly))}function y(){return!gn([`${i.permiPrefix}:delete`],["admin"])}function v(){return me(this,null,function*(){var V,P;(yield a.delConfirm().catch(T=>T))==="confirm"&&(typeof i.deleteHandler=="function"&&i.idField&&(yield i.deleteHandler((V=i.modelValue)==null?void 0:V[i.idField])),yield l.nextTick(),(P=u==null?void 0:u.value)==null||P.remove(i.modelValue),n("refresh"))})}function S(){return!gn([`${i.permiPrefix}:export`],["admin"])}return t({}),($,V)=>{const P=l.resolveComponent("ab-form");return l.openBlock(),l.createBlock(P,{rule:h.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":V[0]||(V[0]=T=>f.value=T)},null,8,["rule","model-value","api"])}}}),Vh={class:"ab-table-detail__title"},ml=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}=Xe(),a=lr.useRoute(),s=l.ref(),u=l.ref({}),c=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():_)}),v=()=>{var x;h.value=!1,(x=u.value)==null||x.refresh()},S=()=>me(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=u.value)==null||x.refresh()},V=()=>N(),P=l.computed(()=>{const x=st(y.value.find(_=>_.type!==de.OPERATE&&_.field===de.OPERATE));if(x)return x.children=wt(x==null?void 0:x.children,_=>_.field!==de.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:v}},{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:V}}),x}),T=l.computed(()=>l.reactive(y.value.filter(x=>x.type!==de.OPERATE&&x.field!==de.OPERATE).map(x=>st(x)))),E=l.ref(!1),k=(x=void 0,_=!1)=>me(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=st(x)||{};(F=i.rule)==null||F.forEach(I=>{const D=typeof I.getRule=="function"?I.getRule():I;D.field&&D.field!==de.OPERATE&&typeof(C==null?void 0:C[D.field])=="undefined"&&typeof D.edit=="undefined"&&typeof D.itemRender=="undefined"&&(C[D.field]="")}),d.value=C}yield l.nextTick(),(A=u.value)==null||A.refresh(),n("open",d.value),E.value=!1}),N=()=>{h.value=!0,f.value=!1,d.value={}};return t({open:k,close:N,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):N(),reload:()=>me(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]=I=>f.value=I),"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",Vh,l.toDisplayString(g.value),1),l.withDirectives(l.createVNode(Zr,{class:"ab-table-detail__opr","permi-prefix":e.permiPrefix,rule:P.value,"model-value":d.value,api:c.value,"onUpdate:api":_[0]||(_[0]=I=>c.value=I),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]=I=>d.value=I),api:u.value,"onUpdate:api":_[2]||(_[2]=I=>u.value=I),"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 gl(e){return typeof e=="object"&&e!==null&&"name"in e&&typeof e.name=="string"}function Lh(e){return typeof e=="string"||typeof e=="function"||gl(e)}function xn(e){return e==null||typeof e=="string"||typeof e=="number"?e:String(e)}function Co(e){if(e!=null)return typeof e=="string"||typeof e=="number"?e:String(e)}function Hh(e,t,r){if(t==null||t==="")return;if(typeof e=="function")return e(r);if(typeof e=="string")return{name:e,query:{id:xn(t)}};if(!gl(e))return;const n={name:e.name},i=e.query;typeof i=="string"?n.query={[i]:xn(t)}:i&&(n.query={},Object.keys(i).forEach(a=>{const s=i[a];n.query[a]=xn(r[s])}));const o=e.params;if(typeof o=="string"){const a=Co(t);a!==void 0&&(n.params={[o]:a})}else o&&(n.params={},Object.keys(o).forEach(a=>{const s=o[a],u=Co(r[s]);u!==void 0&&(n.params[a]=u)}));return n}const zh={class:"ab-router-link"},yl=l.defineComponent({name:"AbRouterLink",__name:"ab-router-link",props:{link:{},value:{},row:{}},setup(e){const t=e,r=l.computed(()=>Hh(t.link,t.value,t.row));return(n,i)=>{const o=l.resolveComponent("ab-icon");return l.openBlock(),l.createElementBlock("div",zh,[l.createVNode(o,{icon:"ep:link",size:16}),r.value?(l.openBlock(),l.createBlock(l.unref(lr.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)])}}}),Uh=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 c;return!((c=n.rule)!=null&&c.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 c,d,f,h,p;return re(R({},n.rule.params),{sortField:(d=n.rule.sortField)!=null?d:(c=n.rule.params)==null?void 0:c.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(()=>hi(n.rule).formatter);function u({cellValue:c,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:c,row:d,column:f}))}return l.inject("abTableDetailRef",void 0),(c,d)=>{var m,g,y,v,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:(v=e.rule)==null?void 0:v.fixed,visible:i.value,"class-name":(S=e.rule)!=null&&S.cellArrow?"items-center":""},{default:l.withCtx($=>{var V,P;return[e.rule.type==="ElRow"&&e.rule.field===l.unref(de).OPERATE?(l.openBlock(),l.createBlock(Zr,{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},[(V=e.rule)!=null&&V.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=>u({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(yl,{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),(P=e.rule)!=null&&P.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))}}}),qh=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!==de.OPERATE:!n.rule.type&&!!n.rule.title)});return(o,a)=>{var c,d,f;const s=l.resolveComponent("ab-table-columns",!0),u=l.resolveComponent("vxe-colgroup");return i.value?(l.openBlock(),l.createBlock(u,{key:0,field:e.rule.field,title:(c=e.rule)==null?void 0:c.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},re(R({},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(Uh,{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 Or(e,t){if(!e||e===t)return;let r=e.props.abFormInject;if(r)return r;if(e.parent)return Or(e.parent,t)}function $o(){let e=l.getCurrentInstance();if(!e)throw Error("AbForm lifecycle hook requires an active Vue component.");return e}function Yh(){return typeof document<"u"&&typeof document.createElement=="function"&&document.head!=null}function Gh(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=$o();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:u,subForm:c,inFor:d}=l.toRefs(n),f=l.reactive({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...s.value||[]]}),h=JSON.stringify(u.value||{}),p=new e(i),m=p.api(),g=d.value,y=()=>{if(o){let E=Or(i,o);if(E){let k;if(g){let N=E.getSubForm();k=Array.isArray(N)?[...N]:N?[N]:[],k.push(m)}else k=m;E.subForm(k)}}},v=()=>{let E=Or(i,o);if(E)if(g){let k=kt(E.getSubForm()),N=k.indexOf(m);N>-1&&k.splice(N,1)}else E.subForm()},S=null;l.onBeforeMount(()=>{Yh()&&l.watchEffect(()=>{let E="",k=n.option&&n.option.globalClass||{};Object.keys(k).forEach(N=>{let q="",U=k[N].style;U&&Object.keys(U).forEach(x=>{q+=Mt(x)+":"+U[x]+";"}),k[N].content&&(q+=k[N].content+";"),q&&(E+=`.${N}{${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 $=ut(()=>{p.bus.$emit("$loadData.$topForm")},100),V=ut(function(){p.bus.$emit("$loadData.$scopeForm")},100),P=ut(()=>{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",V),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",V),v(),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(u,E=>{if(or(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"}),re(R({fc:l.markRaw(p),parent:o&&l.markRaw(o),top:l.markRaw(a),fapi:l.markRaw(m)},l.toRefs(f)),{getGroupInject:()=>Or(i,o),refresh(){++f.unique},renderRule(){f.renderRule=[...s.value||[]]},updateValue(E){if(f.destroyed)return;let k=or(E);h!==k&&(h=k,i.emit("update:modelValue",E),l.nextTick(()=>{P(),o?c.value||V():($(),V())}))}})},created(){let n=$o();n.emit("update:api",n.setupState.fapi),n.setupState.fc.init()}})}var vl=["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"],mi=["validate","children","control"],gi=["effect","deep","renderSlots"];function bl(){return[...vl,...Za,...Xa,...el,...mi,...gi]}function Vn(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function wl(e,t){return xl([e],t||!1)[0]}function xl(e,t){return Kr([],[...e],t||!1)}var Wh={array:mi,normal:gi};function rt(e,t){return tt(Array.isArray(t)?t:[t],e,Wh),e}function To(e){let t=typeof e.getRule=="function"?e.getRule():e;return t.type||(t.type="text"),t}function Jh(e,t){return e?(Object.keys(t||{}).forEach(r=>{t!=null&&t[r]&&(e[r]=rt(e[r]||{},t[r]))}),e):t}function Sl(e,t){Object.defineProperties(e,Object.keys(t).reduce((r,n)=>(r[n]={get(){return t[n]()}},r),{}))}function Ye(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function ee(e,t){try{return e()}catch(r){lh(r)}return t}function Sr(){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(B.Function(o)){let a=o(...n||[]);Array.isArray(a)?i.push(...a):i.push(a)}else B.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=B.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 Eo(e){let t=R({},e.props||{}),r=e.on||{};return Object.keys(r).forEach(n=>{n.indexOf("-")>0&&(n=Pe(n));let i=`on${Ka(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 Cr(e,t){return Object.setPrototypeOf(e,t),e}var ko=(e,t)=>typeof e=="string"?String(t):typeof e=="number"?Number(t):t,Pt={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(ko(e,t)),"!=":(e,t)=>!Pt["=="](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(ko(r[0],t))>-1},notOn(e,t){return!Pt.on(e,t)},in(e,t){let r=t;return r&&r.indexOf&&r.indexOf(e)>-1},notIn(e,t){return!Pt.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 B.empty(e)},notEmpty(e){return!B.empty(e)},pattern(e,t){return new RegExp(t,"g").test(e)}};function ke(e,t){return(typeof t=="string"?t.split("."):t||[]).forEach(r=>{e!=null&&(e=e[r])}),e}function Kh(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 _o(e){let t=e.split("."),r=[],n="";return t.forEach((i,o)=>{o===0?n=i:n+="."+i,r.push(n)}),r.join(" && ")}function Cl(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:Cl(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 $l(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var Tl=class{constructor(e,t,r,n,i){be(this,"_data");be(this,"event");this._data=re(R({},$l()),{type:e,title:t,field:r,value:n,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return De(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 rt(this._data,{[e]:i}),this}_clone(){let e=new this.constructor;return e._data=wl(this._data),e}};function El(e){e.forEach(t=>{Object.defineProperty(Tl.prototype,t,{configurable:!0,enumerable:!0,writable:!0,value:function(r,n){return this.setAttribute(t,r,n,arguments.length>=2)}})})}El(bl());function $e(e,t){return(r,n,i,o={})=>{let a=new Tl(e,r,n,i,o);return typeof t=="function"?t(a):t&&a.setAttribute("props",t),a}}var Qh=$e("");function Zh(e,t,r){let n=Qh("",t);return n._data.type=e,n._data.title=r,n}function Xh(){return{create:Zh,factory:$e}}function em(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function Fo(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function kl(e){if(typeof XMLHttpRequest>"u")return;let t=new XMLHttpRequest,r=e.action||"";t.upload&&e.onProgress&&t.upload.addEventListener("progress",a=>{var u;let s=a;s.percent=s.total>0?s.loaded/s.total*100:0,(u=e.onProgress)==null||u.call(e,s)});let n=e.query;if(n){let a=typeof n=="string"?n:Object.keys(n).reduce((u,c)=>{let d=n[c];return u[c]=d==null?"":String(d),u},{}),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,em(r,t),Fo(t)):e.onSuccess(Fo(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 c;let u=(c=e.data)==null?void 0:c[s];a.append(s,typeof Blob<"u"&&u instanceof Blob?u:String(u))}),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 Ao(e,t,r){return new Promise((n,i)=>{(t||kl)(re(R({},e),{onSuccess(o){let a=u=>u,s=Qe(e.parse);typeof s=="function"?a=(u,c,d)=>s(u,c,d):typeof s=="string"&&(a=u=>ke(u,s)),Nn(a(o,e.targetRule,r)).then(n)},onError(o){i(o)}}))})}function qt(e){return St(e)}function tm(e){function t(o){return B.Undef(o)?o=e.fields():Array.isArray(o)||(o=[o]),o}function r(o,a,s){B.Undef(o)?o=Object.keys(R(R({},e.fieldCtx),e.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(u=>{let c=e.fieldCtx[u]||e.nameCtx[u];c&&c.forEach(d=>{De(d.rule,a,s),e.$render.clearCache(d)})})}function n(){let o=e.subForm;return Object.keys(o).reduce((a,s)=>{let u=o[s];return u&&(Array.isArray(u)?a.push(...u):a.push(u)),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 R({},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]=qt(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?qt(a.rule.value):e.options.appendValue!==!1&&fe(e.appendData,o)?qt(e.appendData[o]):void 0},coverValue(o){let a=R({},o||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(s=>{let u=e.fieldCtx[s];if(u){let c=fe(o,s);u.forEach(d=>{d.rule.value=c?o[s]:void 0}),delete a[s]}}),X(e.appendData,a)},!0)},setValue(o){let a=o;arguments.length>=2&&(a={[o]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(a).forEach(s=>{let u=e.fieldCtx[s];if(!u)return e.appendData[s]=a[s];u.forEach(c=>{c.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&&Ye(o);if(a)return a.rm(),a.origin},fields:()=>e.fields(),append:(o,a,s)=>{let u=e.sort.length-1,c,d=e.getCtx(a);if(d)if(s){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return;u=d.rule.children.length-1}else u=d.root.indexOf(d.origin),c=d.root;else c=e.rules;c.splice(u+1,0,o)},prepend:(o,a,s)=>{let u=0,c,d=e.getCtx(a);if(d)if(s){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return}else u=d.root.indexOf(d.origin),c=d.root;else c=e.rules;c.splice(u,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(u=>{De(u.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 u=e.fieldCtx[s][0];return a[s]=o?u.origin:u.rule,a},{})},component(o){return Object.keys(e.nameCtx).reduce((a,s)=>{let u=e.nameCtx[s].map(c=>o?c.origin:c.rule);return a[s]=u.length===1?u[0]:u,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=B.Object(o)?Ye(o):e.getCtxs(o);a&&(a=Array.isArray(a)?a:[a],a.forEach(s=>{if(!s.deleted){let u=e.subForm[s.id];u&&(Array.isArray(u)?u.forEach(c=>{c.refresh()}):u&&u.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=>{X(s.rule,a)})},updateRules(o){Object.keys(o).forEach(a=>{i.updateRule(a,o[a])})},mergeRule:(o,a)=>{e.getCtxs(o).forEach(s=>{rt(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(u=>{let c=e.ctxs[u];c.rule.type===o&&(s=a?c.origin:c.rule)}),s},findTypes(o,a){let s=[];return Object.keys(e.ctxs).forEach(u=>{let c=e.ctxs[u];c.rule.type===o&&s.push(a?c.origin:c.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(u=>u.rule);return s.length===1?s[0]:s}},setEffect(o,a,s){let u=e.getCtx(o);u&&a&&(a[0]==="$"&&(a=a.substr(1)),fe(u.rule,"$"+a)&&De(u.rule,"$"+a,s),fe(u.rule,"effect")||(u.rule.effect={}),De(u.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=qt(s.defaultValue)})}),l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{i.clearValidateState(o)})})}),o!=null||(B.Function(e.options.onReset)&&ee(()=>e.options.onReset(i)),e.vm.emit("reset",i))},method(o,a){let s=i.el(o);if(!s||!s[a])throw Error(Qa("err",`${a} 方法不存在`));return(...u)=>s[a](...u)},exec(o,a,...s){return ee(()=>i.method(o,a)(...s))},toJson(o){return or(i.rule,o)},trigger(o,a,...s){let u=i.el(o);u&&u.$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 u=s.$el===void 0?s:s.$el;if(!u)return;let c=u.nodeType===1?u:u.firstElementChild;c&&typeof c.scrollIntoView=="function"&&c.scrollIntoView(a)},focus(o){let a=i.el(o);if(!a)return;let s=d=>!d||typeof d.focus!="function"?!1:(ee(()=>d.focus()),!0);if(s(a))return;let u=a.$el===void 0?a:a.$el;if(s(u))return;let c=u&&(u.nodeType===1?u:u.firstElementChild);s(c)||c&&c.querySelector&&s(c.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?Ye(o):e.getCtx(o),u=s?s.rule:a?o:i.getRule(o);if(!u)return[];let c=[];return(d=>{d&&d.forEach(f=>{typeof f=="object"&&(f.field&&c.push(f),c.push(...i.getChildrenRuleList(f)))})})(s?s.loadChildrenPending():u.children),c},getParentRule(o){return(typeof o=="object"?Ye(o):e.getCtx(o)).parent.rule},getParentSubRule(o){let a=typeof o=="object"?Ye(o):e.getCtx(o);if(a){let s=a.getParentGroup();if(s)return s.rule}},getChildrenFormData(o,a){return i.getChildrenRuleList(o).reduce((s,u)=>((u.ignore!==!0||a===!0)&&(s[u.field]=qt(u.value)),s),{})},setChildrenFormData(o,a,s){let u=i.getChildrenRuleList(o);e.deferSyncValue(()=>{u.forEach(c=>{fe(a,c.field)?c.value=a[c.field]:s&&(c.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 u=i.options.globalData[o];u?u.type==="fetch"?i.fetch(u).then(c=>{a(c)}).catch(s):a(u.data):a(e.fc.loadData[o])})},emitGlobalEvent(o,...a){let s=i.getGlobalEvent(o);if(s){let u=e.getInjectData({},void 0);return u.args=[...a],a.unshift(u),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 u=typeof o=="object"?Ye(o):e.getCtx(o);return u?e.$render.createRuleVnode(u,a,s):void 0},renderChildren(o,a,s){let u=typeof o=="object"?Ye(o):e.getCtx(o);return u?e.$render.createChildrenVnodes(u,a,s):void 0},nextTick(o){e.bus.$once("next-tick",o),e.refresh()},nextRefresh(o){e.nextRefresh(),o&&ee(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 u=R({},o);u=e.loadFetchVar(u);let c=d=>{ee(()=>u.onError&&u.onError(d)),s(d)};e.beforeFetch(u).then(()=>Ao(u,e.fc.create.fetch,i).then(d=>{ee(()=>u.onSuccess&&u.onSuccess(d)),a(d)}).catch(d=>{c(d)})).catch(d=>{c(d)})})},watchFetch(o,a,s,u){return e.fc.watchLoadData((c,d)=>{let f=R({},o);if(f=e.loadFetchVar(f,c),u&&u(f,d)===!1)return;let h=p=>{ee(()=>f.onError&&f.onError(p)),s&&s(p)};e.beforeFetch(f).then(()=>Ao(f,e.fc.create.fetch,i).then(p=>{ee(()=>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)=>{ee(()=>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 rm(e){X(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 At={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 _l(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 u=n;if(B.Function(n)){let c=n,d=ee(()=>c({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&&B.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)}),u=i,e.setPending(r,n,u)):(u=d||i,e.setPending(r,n,u),o&&o(u))}return u}function Fl(e,t,r={}){let n=R({key:"options",origin:t,def:[]},r);return"loadPending"in e?e.loadPending(n):_l(e,n)}function nm(e){X(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(t){let r=n=>{if(n){let i;return t.rule.field&&(i=n.slots["field-"+Mt(t.rule.field)]||n.slots["field-"+t.rule.field]),i||(i=n.slots["type-"+Mt(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=Sr();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?B.String(i)?`${i};--ab-number-color:${n}`:Array.isArray(i)?i.concat({"--ab-number-color":n}):re(R({},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 rt({},[o["*"]||o.default||{},o[n]||o[i]||{}])})),t.prop=rt({},[this.cacheConfig[t.trueType].value,t.prop])},setOptions(t){let r=Fl(t,t.prop.options);t.prop.options=r,t.prop.optionsTo&&r&&ct(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=>{ct(t.prop,n,r[n])})},parseSide(t,r){return B.Object(t)?rt({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,u=a.preview;if(a.hidden){this.setCache(t,void 0,r);return}o=(...c)=>{var g,y,v,S,$,V;let d={rule:i,prop:a,preview:u,api:this.$handle.api,model:a.model||{},slotValue:c};c.length&&i.slotUpdate&&ee(()=>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(P=>{f[P]=(...T)=>{if(B.Function(a.renderSlots[P]))return ee(()=>a.renderSlots[P](...T));let E=this.parseSide(a.renderSlots[P],t);return this.renderRule(E)}});let p=this.getTypeSlot(t),m;if(p)d.children=f,m=p(d);else{let P=rl(f);if(u)m=t.parser.preview(P,t);else{let T=t.parser,E=T!==At,k=E&&Object.prototype.hasOwnProperty.call(T,"render");if(E&&!k&&t.input&&((v=(y=(g=t.$handle)==null?void 0:g.vm)==null?void 0:y.props)==null?void 0:v.readonly)===!0){let N=typeof this.$handle.getParser=="function"?this.$handle.getParser({type:"text",originType:"text",trueType:"text"}):(S=this.fc.parsers)==null?void 0:S.text;m=N&&N!==T?N.render(P,t):T.render(P,t)}else m=T.render(P,t)}}return m=this.renderSides(m,t),($=a.title)!=null&&$.show&&(a.wrap=R({show:!0},a.wrap||{}),a.native||(a.native=!1)),(t.input||!B.Undef(a.native)||((V=a.col)==null?void 0:V.show)===!0)&&a.native!==!0&&(this.fc.targeabFormDriver("updateWrap",t),m=this.$manager.makeWrap(t,m)),t.none&&(m=Array.isArray(m)?m.map(P=>!P||!P.__v_isVNode?P:this.none(P)):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 X(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),u={callback:o.modelCallback,modelField:s,value:this.$handle.geabFormData(t)};a.push({on:R({[`update:${s}`]:u.callback},t.prop.modelEmit?{[t.prop.modelEmit]:o.modelEmit}:{}),props:{[s]:u.value}}),t.prop.model=u}return tt(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(!B.trueArray(t))return{};let n=Sr();return t.map(i=>{if(i){if(B.String(i)||B.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(nl(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=Sr();return this.renderSlot(i,t,t.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule(t,r,n){if(!t)return;if(B.String(t)||B.Number(t))return`${t}`;let i;if(n)i=t.type;else if(i=t.is,t.type){i=Pe(t.type);let s=this.vNode.aliasMap[i];s&&(i=Pe(s))}if(!i)return;let o=Sr();B.trueArray(t.children)&&t.children.forEach(s=>{s&&o.setSlot(s==null?void 0:s.slot,()=>this.renderRule(s))});let a=R({},t);return delete a.type,delete a.is,this.vNode.make(i,a,o.mergeBag(r).getSlots())}})}var im=1;function Ln(e){X(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:im++}),Sl(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}rm(Ln),nm(Ln);function om(e){X(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(B.Function(r)&&(n!==!1&&!B.Undef(n)||r.__inject))return this.inject(t,r,n);if(!i&&Array.isArray(r)&&r[0]&&(B.String(r[0])||B.Function(r[0])))return this.parseEventLst(t,r,n,!0);if(B.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,u=n.emit||[];return B.trueArray(u)&&u.forEach(c=>{if(!c)return;let d,f=i||o||a;if(B.Object(c)&&(d=c.inject,c=c.name,f=c.prefix||f),f){let h=Mt(`${f}-${c}`),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[Pe(c)]=p;else{let m=d||s||this.options.injectEvent;r[Pe(c)]=B.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=Kh(t),a=c=>{let d=!1,f;if(n&&c.indexOf("$form.")===0){let h=c.split(".");h.shift(),fe(n.value,h[0])&&(d=!0,f=r?r({id:"$form."+h[0]+"_"+n.rule.__fc__.id,getValue:()=>ke(n.value,h)}):ke(n.value,h))}return d||(f=r?r(c):this.fc.getLoadData(c)),f},s=c=>{let d=[];c.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("."))},u;if(o.forEach(c=>{let d=c.split("||"),f=d[0].trim();if(f){let h=(d[1]||"").trim(),p=Cl(f),m=ee(()=>s(p));(m==null||m==="")&&d.length>1&&(m=h),u=m,t=t.replaceAll(`{{${c}}}`,m!=null?m:"")}}),o.length===1&&i===`{{${o[0]}}}`)return u}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(u=>{s[o(u)]=o(t[a][u])}),t[a]=s}}),t}})}var Oo=["hook:updated","hook:mounted"];function am(e){X(e.prototype,{usePage(){let t=this.options.page;if(!t)return;let r=25,n=lm(this.rules);if(B.Object(t)){let i=t;i.first&&(r=parseInt(String(i.first),10)||r),i.limit&&(n=parseInt(String(i.limit),10)||n)}X(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(Oo,t),this.bus.$emit("page-end")):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Oo,t)}})}function lm(e){return e.length<31?31:Math.ceil(e.length/3)}function sm(e){X(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 um(e){Object.defineProperties(e.origin,{__fc__:Vn(l.markRaw(e))}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Vn(l.markRaw(e))})}function Al(e,t,r){let n=Qr(),i=!!t.field;X(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:R({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?St(r):void 0,field:t.field||void 0}),this.updateKey(),um(this),this.update(e,!0)}X(Al.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 _l(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=Qr(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=Pe(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=R({},this.rule);delete e.children,delete e.validate,this.prop=rt({},[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=!(B.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),X(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),X(this,{root:[]})},this.input)})},update(e,t){X(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 cm(e){X(e.prototype,{nextRefresh(t){let r=this.loadedId;l.nextTick(()=>{r===this.loadedId&&(t?t():this.refresh())})},parseRule(t){let r=To(t);return Object.defineProperties(r,{__origin__:Vn(t)}),dm(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;B.trueArray(n)&&tt([{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 u=this.sort.indexOf(s.__fc__.id);return u>-1?u:n(a-1)},i=(a,s)=>{B.trueArray(a)&&this._loadRule(a,s)},o=t.map((a,s)=>{if(r&&!B.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 u=To(a),c=()=>!!(u.field&&this.fieldCtx[u.field]&&this.fieldCtx[u.field][0]!==a.__fc__);this.fc.targeabFormDriver("loadRule",{rule:u,api:this.api},this.fc),this.ruleEffect(u,"init",{repeat:c()}),c()&&this.vm.emit("repeat-field",a,this.api);let d=a.__fc__||null,f=!1,h=d!==null,p=u.value;if(h){let y=d;if(p=y.defaultValue,y.deleted){if(Po(y))return;y.update(this)}else if(!y.check(this)){if(Po(y))return;t[s]=a=a._clone?a._clone():tl(or(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 Al(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,B.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=fm(t),n=[],i=this.api;if(!r.length)return!1;for(let s=0;s<r.length;s++){let u=r[s],c=u.handle||function(f){let h=Pt;return(h[u.condition||"=="]||h["=="])(f,u.value)};if(!B.trueArray(u.rule))continue;let d=re(R({},u),{valid:ee(()=>c(t.rule.value,i)),ctrl:pm(t,u.rule),isHidden:B.String(u.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:u,rule:c,prepend:d,append:f,child:h,ctrl:p,method:m})=>{if(s)u?t.ctrlRule.push({__ctrl:!0,children:c,valid:u}):p&&t.ctrlRule.splice(t.ctrlRule.indexOf(p)>>>0,1),o[u?"push":"unshift"](()=>{m==="disabled"||m==="enabled"?this.api.disabled(!u,c):m==="display"||m==="show"?this.api.display(u,c):m==="required"?(c.forEach(g=>{this.api.setEffect(g,"required",u)}),u||this.api.clearValidateState(c)):this.api.hidden(!u,c)});else if(u){a=!0;let g={type:"fragment",native:!0,__ctrl:!0,children:c};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=Ye(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=R({},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 dm(e){let t=$l();return Object.keys(t).forEach(r=>{fe(e,r)||(e[r]=t[r])}),e}function fm(e){let t=e.rule.control||[];return B.Object(t)?[t]:t}function pm(e,t){for(let r=0;r<e.ctrlRule.length;r++){let n=e.ctrlRule[r];if(n.children===t)return n}}function Po(e){return!!e.rule.__ctrl}function hm(e){X(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&&fe(i,a)?o[a]=r[a]:fe(this.api.form,a)?this.api.form[a]=r[a]:this.api.top!==this.api&&fe(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),De(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&&fe(this.appendData,t.field)||B.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),ee(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,Ro)!==JSON.stringify(r,Ro)},isQuote(t,r){return(r instanceof Function||B.Object(r)||Array.isArray(r))&&r===t.rule.value},refreshUpdate(t,r,n,i){if(B.Function(t.rule.update)){let o=ee(()=>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;B.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 Ro(e,t){return typeof t=="function"?""+t:t}var mm=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],Yt=Symbol("oldValue"),gm=["$condition","$variableVal","$val","$form","$scope","$group","$rule"],ym=["$formulas","$form","$scope","$group","$rule","$api"],$r=new Map,vm=1e3;function Mo(e,t){let r=e.join(",")+"|"+t,n=$r.get(r);return n||($r.size>=vm&&$r.clear(),n=Function(...e,t),$r.set(r,n)),n}function bm(e){X(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++)ee(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=Pe(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]||At},bindParser(t){t.setParser(this.getParser(t))},getType(t){let r=this.fc.CreateNode.aliasMap,n=r[t]||r[Pe(t)||t]||t;return Pe(n)},noWatch(t){this.noWatchFn||(this.noWatchFn=t),ee(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx(t){let r=bl().filter(a=>a[0]!=="_"&&a[0]!=="$"&&mm.indexOf(a)===-1),n={},i=(a,s,u)=>(c,d)=>{let f=s.value;if(!this.isBreakWatch())if(u&&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)):u&&(B.Function(d)&&(d=t.getPending("children",[])),B.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 u=t.refRule[a],c=a==="children",d=i(a,u,c);t.watch.push(l.watch(c?()=>B.Function(u.value)?u.value:[...u.value||[]]:()=>u.value,d,{deep:!c,flush:c?"sync":"pre"})),s&&d(u.value,void 0)};if(r.forEach(a=>{t.refRule[a]=l.toRef(t.rule,a),fe(t.rule,a)&&o(a)}),t.watch.push(l.watch(()=>Object.keys(t.rule).join("|"),()=>{r.forEach(a=>{!n[a]&&fe(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 c,d;let u=s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return u?this.api.t(u[1],{title:(d=(c=t.refRule)==null?void 0:c.__$title)==null?void 0:d.value}):s};return kt(t.rule.validate).map(s=>{let u=R({},s);if(u.message&&(u.message=a(u.message)),B.Function(u.validator)){let c=t;u.validator=function(...d){return s.validator.call({that:this,id:c.id,field:c.field,rule:c.rule,api:c.$handle.api},...d)}}if(u.adapter){if(typeof u.error=="object"){let c=R({},u.error);Object.keys(c).forEach(d=>{c[d]=a(c[d])}),u.error=c}return this.adapterValidate(u,t)}return u})}),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 u=l.computed(()=>{let d=a[s];if(!d)return;let f=this.compute(t,d);return(d.linkage||d.linkageVariable)&&f===Yt?Yt:f}),c=d=>{s==="value"?this.onInput(t,d):s[0]==="$"?this.api.setEffect(t.id,s,d):ct(t.rule,s,d)};(s==="value"?[void 0,null,""].indexOf(t.rule.value)>-1:u.value!==ke(t.rule,s))&&c(u.value),t.watch.push(l.watch(u,d=>{d!==Yt&&this.scheduleComputedUpdate(()=>c(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&&ee(()=>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&&ee(()=>t.validator(n,i));a&&B.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(B.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=u=>i==="len"?u===o:i==="maxLen"?u<=o:u>=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(u=>!(u 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=u=>{if(u=Array.isArray(u)?{mode:"AND",group:u}:u,!B.trueArray(u.group))return!0;let c=u.mode==="OR",d=!0;for(let f=0;f<u.group.length;f++){let h=u.group[f],p,m=null,g=null;if(h.variable)g=this.fc.getLoadData(h.variable);else if(h.field)m=_o(h.field||"");else if(!h.mode)return!0;let y=h.compare;if(y&&(y=_o(y||"")),p=h.mode?o(h):Pt[h.condition]?B.Function(h.handler)?ee(()=>h.handler(this.api,t.rule)):ee(()=>Mo(gm,`with($form){with($scope){with(this){with($group){ return $condition['${h.condition}'](${h.variable?"$variableVal":m}, ${y||"$val"}); }}}}`).call(this.api.form,Pt,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,c&&p)return!0;c||d&&(d=p)}return!c&&d},a=r,s=o(a);return s=a.invert===!0?!s:s,a.linkage?s?ee(()=>this.computeValue(a.linkage,t,i),void 0):Yt:a.linkageVariable?s?ee(()=>this.fc.getLoadData(a.linkageVariable),void 0):Yt:s}if(B.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 ee(n,void 0)},computeValue(t,r,n){let i=this,o=Object.keys(this.fc.formulas).reduce((a,s)=>(a[s]=function(...u){return i.fc.formulas[s].call({that:this,rule:r.rule,api:i.api,fc:i.fc},...u)},a),{});return ee(()=>Mo(ym,`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&&!B.String(i)&&i.__fc__&&i.__fc__.parent===t&&this.rmCtx(i.__fc__)}),B.trueArray(r)&&(this.loadChildren(r,t),this.bus.$emit("update",this.api))})},rmSub(t){B.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;ht(this.ctxs,r),ht(this.formData,r),ht(this.subForm,r),ht(this.vm.setupState.ctxInject,r);let a=t.getParentGroup();a&&this.subRuleData[a.id]&&ht(this.subRuleData[a.id],n),t.group&&ht(this.subRuleData,r),i&&this.rmIdCtx(t,n,"field"),o&&this.rmIdCtx(t,o,"name"),i&&!fe(this.fieldCtx,n)&&ht(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(t.parser.loadChildren!==!1){let u=t.getPending("children",t.rule.children);B.trueArray(u)&&u.forEach(c=>c&&c.__fc__&&this.rmCtx(c.__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 wm(e){X(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[Pe("on-"+t)||"on-"+t];if(n){let i=Qe(n);B.Function(i)&&ee(()=>i(...r))}this.bus.$emit(t,...r)},targetHook(t,r,n){var u,c,d,f;let i=(c=(u=t.prop)==null?void 0:u.hook)==null?void 0:c[r],o=(h,p)=>{h&&(Array.isArray(h)?h:[h]).forEach(m=>{ee(()=>m(re(R({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"+Ka(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 xm(e){X(e.prototype,{useProvider(){let t=this.fc.providers;Object.keys(t).forEach(r=>{let n=t[r];B.Function(n)&&(n=n(this.fc)),n._c=Cm(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(fe(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(fe(t,"$"+r))return t["$"+r];if(fe(t,"effect")&&fe(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 u=o||Object.keys(r).reduce((c,d)=>(d[0]==="$"&&(c[d.substr(1)]=r[d]),c),R({},r.effect||{}));Object.keys(u).forEach(c=>{let d=this.providers[c];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=R({value:u[c],getValue:()=>this.getEffect(r,c)},s||{});t&&(h.getProp=()=>t.effectData(c),h.clearProp=()=>t.clearEffectData(c),h.mergeProp=p=>rt(h.getProp(),[p]),h.id=t.id),this.bus.$emit(`p:${c}:${f}:${+!!d.input}`,a,[h,r,this.api])})}})}function Sm(e){return e.filter(function(t,r,n){return n.indexOf(t,0)===r})}function Cm(e){let t=e.components;if(Array.isArray(t)){let r=Sm(t.filter(n=>n!=="*"));return r.length?r:!1}return B.String(t)?[t]:!1}function qe(e){Sl(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}}),X(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(Ln,[this]),this.api=e.extendApiFn.reduce((t,r)=>{let n=ee(()=>r(t,this));return n&&n!==t&&X(t,n),t},tm(this))}X(qe.prototype,{initData(e){X(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=R(R(R({},St(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&&ee(()=>this.options.beforeFetch(e,{api:this.api}));n&&B.Function(n.then)?n.then(t).catch(r):t()})},beforeFetch(e){return new Promise((t,r)=>{let n=e&&e.beforeFetch&&ee(()=>e.beforeFetch(e,{api:this.api}));n&&B.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&&ee(()=>this.options.beforeSubmit(e,{api:this.api}));n&&B.Function(n.then)?n.then(t).catch(r):n===!1?r():t()})}}),om(qe),am(qe),sm(qe),cm(qe),hm(qe),bm(qe),wm(qe),xm(qe);var Sn=l.defineComponent({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render(){return this.vnode}});function $m(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 Do(e,t){let r=e.directives;return r?(Array.isArray(r)||(r=[r]),l.withDirectives(t,r.reduce((n,i)=>n.concat($m(i)),[]))):t}function Tm(){let e={};const r=class r{constructor(i){be(this,"aliasMap",e);be(this,"vm");be(this,"handle");this.vm=i.vm,this.handle=i}make(i,o,a){return Do(o,this.h(i,Eo(o),a))}makeComponent(i,o,a){try{return Do(o,l.createVNode(i,Eo(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 u=s.appContext.config.isNativeTag(i),c=this.handle.fc.prop.components[i];!c&&u&&delete o.abFormInject;try{return l.createVNode(c||(u?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=Mt(o),s=o.toLocaleLowerCase(),u=i[o];r.alias(o,u),[o,a,s].forEach(c=>{Object.assign(r.prototype,{[c]:function(d,f){return this.make(e[o]||c,d,f)}})})})}};be(r,"aliasMap",e);let t=r;return t}function Em(e){class t extends km{}return Object.assign(t.prototype,e),t}var km=class{constructor(e){be(this,"$handle");be(this,"vm");be(this,"$render");be(this,"$r");be(this,"options");be(this,"ref");be(this,"mergeOptionsRule");be(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=Qr()}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 tt(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 Nr(e,t){return Reflect.get(e,t)}function yi(e,t,r){Reflect.set(e,t,r)}function vi(e,t){Reflect.deleteProperty(e,t)}var _m=function(e){return{name:"loadData",_fn:[],loaded(t,r,n){this.deleted(t),l.nextTick(()=>{let i=kt(t.getValue()),o=[];i.forEach(a=>{if(a&&(a.attr||a.template||a.handler)){let s=c=>{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,c,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null):a.handler&&B.Function(a.handler)?a.handler(c,r,n):e.$handle.loadStrVar(`{{${a.attr}}}`,c,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null),(f==null||f==="")&&a.default!=null&&(f=a.default),a.copy!==!1&&(f=St(f));let h=a.modify?r:t.getProp();a.to==="child"?h.children?h.children[0]=f:h.children=[f]:ct(h,a.to||"options",f),n.sync(r)},u=e.watchLoadData(c=>s(c));s=ut(s,a.wait||300),a.watch===!1?u():o.push(u)}}),yi(this._fn,t.id,o)})},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=Nr(this._fn,t.id))==null||r.forEach(n=>{n()}),vi(this._fn,t.id),t.clearProp()}}},Fm=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 u=typeof s=="object",c=f=>{let h=u?s:null,p=e.t(u?h==null?void 0:h.attr:s,u&&(h==null?void 0:h.params)||null,f),m=u&&(h!=null&&h.modify)?r:t.getProp();a==="child"?m.children?m.children[0]=p:m.children=[p]:ct(m,a,p),n.sync(r)},d=e.watchLoadData(f=>c(f));c=ut(c,(typeof s=="object"?s.wait:0)||300),typeof s!="object"||s.watch!==!1?o.push(d):d()}}),yi(this._fn,t.id,o)},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=Nr(this._fn,t.id))==null||r.forEach(n=>{n()}),vi(this._fn,t.id),t.clearProp()}}},Ol={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=B.Object(n)&&n!==null?n:{method:n},o=i.method,a=re(R({},i),{validator(...s){let u=Ye(t);if(u&&typeof u=="object"&&"id"in u)return r.exec(u.id,typeof o=="string"?o:"abFormValidate",...s,{attr:e,rule:t,api:r})}});delete a.method,e.getProp().validate=[a]}},watch(e,t,r){Ol.load(e,t,r)}},Am={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 u=t(typeof s=="function"?s(o,a):s),c=h=>{h===void 0?i.clearProp():ct(i.getProp(),(u==null?void 0:u.to)||"options",h),h!=null&&(u!=null&&u.key)&&e.$handle.options.globalData[u.key]&&e.fetchCache.set(e.$handle.options.globalData[u.key],{status:!0,data:h}),a.sync(o)};if(!u||!u.action&&!u.key){c(void 0);return}u=St(u),u.to||(u.to="options");let d=u.onError,f=()=>!i.getValue()&&(i.clearProp(),a.sync(o),!0);yi(n._fn,i.id,e.watchLoadData(ut((h,p)=>{var y;if(p&&(u==null?void 0:u.watch)===!1)return(y=Nr(n._fn,i.id))==null?void 0:y();if(u!=null&&u.key){e.targetRule=o;let v=h(`$globalData.${u.key}`);if(delete e.targetRule,v){if(f())return;c(v)}return}let m=e.$handle.loadFetchVar(St(u),h,o),g=re(R({headers:{}},m),{onSuccess(v,S){if(f())return;let $=P=>S?P:fe(P,"data")?ke(P,"data"):P,V=Qe(m.parse);typeof V=="function"?$=P=>V(P,o,a):typeof V=="string"&&($=P=>ke(P,V)),Nn($(v)).then(P=>{c(P)})},onError(v){if(c(void 0),!f())if(typeof d=="function")d(v,o,a);else{let S=v&&typeof v=="object"&&"message"in v?v.message:void 0;pi(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(v=>{g.onSuccess(v,!0)}).catch(v=>{g.onError(v)}):ee(()=>e.create.fetch(g,{inject:i,rule:o,api:a}))}).catch(()=>{})},u.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=Nr(this._fn,i.id))==null||o(),vi(this._fn,i.id),i.clearProp()}};return n},loadData:_m,t:Fm,componentValidate:Ol},Om={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=>B.String(t)).join("")}}};function Pm(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 Rm(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function Mm(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function bi(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:ke(i,r):i}function Dm(e){return bi(Pm,e)}function Im(e){return bi(Rm,e)}function Bm(e){return bi(Mm,e)}var jm=typeof global=="object"&&global&&global.Object===Object&&global,Nm=typeof self=="object"&&self&&self.Object===Object&&self,wi=jm||Nm||Function("return this")(),Dt=wi.Symbol,Pl=Object.prototype,Vm=Pl.hasOwnProperty,Lm=Pl.toString,Gt=Dt?Dt.toStringTag:void 0;function Hm(e){var t=Vm.call(e,Gt),r=e[Gt];try{e[Gt]=void 0;var n=!0}catch(o){}var i=Lm.call(e);return n&&(t?e[Gt]=r:delete e[Gt]),i}var zm=Object.prototype.toString;function Um(e){return zm.call(e)}var qm="[object Null]",Ym="[object Undefined]",Io=Dt?Dt.toStringTag:void 0;function Rl(e){return e==null?e===void 0?Ym:qm:Io&&Io in Object(e)?Hm(e):Um(e)}function Gm(e){return typeof e=="object"&&!!e}var Wm="[object Symbol]";function xi(e){return typeof e=="symbol"||Gm(e)&&Rl(e)==Wm}function Jm(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 Si=Array.isArray,Bo=Dt?Dt.prototype:void 0,jo=Bo?Bo.toString:void 0;function Ml(e){if(typeof e=="string")return e;if(Si(e))return Jm(e,Ml)+"";if(xi(e))return jo?jo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Dl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Km="[object AsyncFunction]",Qm="[object Function]",Zm="[object GeneratorFunction]",Xm="[object Proxy]";function eg(e){if(!Dl(e))return!1;var t=Rl(e);return t==Qm||t==Zm||t==Km||t==Xm}var Cn=wi["__core-js_shared__"],No=function(){var e=/[^.]+$/.exec(Cn&&Cn.keys&&Cn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tg(e){return!!No&&No in e}var rg=Function.prototype.toString;function ng(e){if(e!=null){try{return rg.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ig=/[\\^$.*+?()[\]{}|]/g,og=/^\[object .+?Constructor\]$/,ag=Function.prototype,lg=Object.prototype,sg=ag.toString,ug=lg.hasOwnProperty,cg=RegExp("^"+sg.call(ug).replace(ig,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dg(e){return!Dl(e)||tg(e)?!1:(eg(e)?cg:og).test(ng(e))}function fg(e,t){return e==null?void 0:e[t]}function Il(e,t){var r=fg(e,t);return dg(r)?r:void 0}function pg(e,t){return e===t||e!==e&&t!==t}var hg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mg=/^\w*$/;function gg(e,t){if(Si(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||xi(e)?!0:mg.test(e)||!hg.test(e)||t!=null&&e in Object(t)}var Wt=Il(Object,"create"),yg="__lodash_hash_undefined__",vg=Object.prototype.hasOwnProperty,bg=Object.prototype.hasOwnProperty,wg="__lodash_hash_undefined__";function gt(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])}}gt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},gt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},gt.prototype.get=function(e){var t=this.__data__;if(Wt){var r=t[e];return r===yg?void 0:r}return vg.call(t,e)?t[e]:void 0},gt.prototype.has=function(e){var t=this.__data__;return Wt?t[e]!==void 0:bg.call(t,e)},gt.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=Wt&&t===void 0?wg:t,this};function Tr(e,t){for(var r=e.length;r--;)if(pg(e[r][0],t))return r;return-1}var xg=Array.prototype.splice;function Ft(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])}}Ft.prototype.clear=function(){this.__data__=[],this.size=0},Ft.prototype.delete=function(e){var t=this.__data__,r=Tr(t,e);return r<0?!1:(r==t.length-1?t.pop():xg.call(t,r,1),--this.size,!0)},Ft.prototype.get=function(e){var t=this.__data__,r=Tr(t,e);return r<0?void 0:t[r][1]},Ft.prototype.has=function(e){return Tr(this.__data__,e)>-1},Ft.prototype.set=function(e,t){var r=this.__data__,n=Tr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var Sg=Il(wi,"Map");function Cg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Er(e,t){var r=e.__data__;return Cg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function yt(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])}}yt.prototype.clear=function(){this.size=0,this.__data__={hash:new gt,map:new(Sg||Ft),string:new gt}},yt.prototype.delete=function(e){var t=Er(this,e).delete(e);return this.size-=+!!t,t},yt.prototype.get=function(e){return Er(this,e).get(e)},yt.prototype.has=function(e){return Er(this,e).has(e)},yt.prototype.set=function(e,t){var r=Er(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var $g="Expected a function";function Ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError($g);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(Ci.Cache||yt),r}Ci.Cache=yt;var Tg=500;function Eg(e){var t=Ci(e,function(n){return r.size===Tg&&r.clear(),n}),r=t.cache;return t}var kg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_g=/\\(\\)?/g,Fg=Eg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(kg,function(r,n,i,o){t.push(i?o.replace(_g,"$1"):n||r)}),t});function Ag(e){return e==null?"":Ml(e)}function Og(e,t){return Si(e)?e:gg(e,t)?[e]:Fg(Ag(e))}function Pg(e){if(typeof e=="string"||xi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rg(e,t){t=Og(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Pg(t[r++])];return r&&r==n?e:void 0}function Mg(e,t,r){var n=e==null?void 0:Rg(e,t);return n===void 0?r:n}var Dg={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"}},Ig={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}必须为数字"}},aa,Bg=((aa=window.localStorage)==null?void 0:aa.getItem("lang"))||"zh-cn",la,jg=(la=(e=>({t:t=>Mg(Bg==="zh-cn"?Ig:Dg,t,t)}))())==null?void 0:la.t;function $n(...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 Ng(e={}){let t=e.key||[],r=e.array||[],n=e.normal||[];vl.push(...t),mi.push(...r),gi.push(...n),El([...t,...r,...n])}var Vg=1,Me={},Vo=Symbol("defValue");function Bl(e){let t={[Sn.name||"fcFragment"]:Sn},r={},n={},i={},o={},a=[],s=[],u=e.extendApi?[e.extendApi]:[],c=R({},Am),d=Xh(),f={global:{}},h=e.isMobile===!0,p=l.reactive({$mobile:h}),m=Tm(),g={},y={};Ng(e.attrs||{});function v(b){let w=Me[b];if(Array.isArray(w))return w.map(O=>O.api());if(w)return w.api()}function S(b){a.push(b)}function $(...b){let w=$n(...b);w.id&&w.prop&&(n[w.id]=w.prop)}function V(...b){let w=$n(...b);w.id&&w.prop&&(c[w.id]=B.Function(w.prop)?w.prop:re(R({},w.prop),{name:w.id}))}function P(b){m.use(b)}function T(...b){let w=b[0];if(arguments.length===0)return At;if(typeof w=="string"&&arguments.length===1)return r[Pe(w)||w];let O=$n(...b);if(!O.id||!O.prop)return At;let j=Pe(O.id),z=O.prop,oe=z.merge===!0?r[j]:void 0;r[j]=Cr(z,oe||At),d[j]=$e(j),z.maker&&X(d,z.maker)}function E(b,w){let O,j=w;if(typeof b=="string"){if(O=b,j===void 0)return t[O]}else{let pe=b;O=pe.displayName||pe.name,j=b}if(!O||!j)return;let z=Pe(O),oe=Mt(O);t[O]=j,t[z]=j,t[oe]=j,delete m.aliasMap[O],delete m.aliasMap[z],delete m.aliasMap[oe],delete r[O],delete r[z],delete r[oe];let ie=j.abFormParser;ie&&T(O,ie)}function k(){return Gh(Y,t,n)}function N(b,w){let O=k();return l.createApp({data(){return l.reactive({rule:b,option:w})},render(){return l.h(O,R({ref:"fc"},this.$data))}})}function q(){return Sn}function U(b,w){let O=Reflect.get(b,"install");return B.Function(O)?O(x,w):typeof b=="function"&&b(x,w),this}let x=function(b,w){let O=N(b,w||{});a.forEach(z=>{ee(()=>z(x,O))});let j=document.createElement("div");return((w==null?void 0:w.el)||document.body).appendChild(j),O.mount(j).$refs.fc.fapi};Cr(x,y);function _(b){let w=R({},e);return b?w.inherit={components:t,parsers:r,directives:n,modelFields:i,providers:c,useApps:a,maker:d,formulas:g,loadData:p}:delete w.inherit,Bl(w)}function F(b,w){i[b]=w}function A(b,w){g[b]=w}function C(b,w){let O=o[b]||{},j=O.parsers||{};w.parsers&&Object.keys(w.parsers).forEach(z=>{j[z]=Cr(w.parsers[z],At)}),w.name=b,o[b]=re(R(R({},O),w),{parsers:j})}function I(b){b&&Object.keys(Me).forEach(w=>{(Array.isArray(Me[w])?Me[w]:[Me[w]]).forEach(O=>{O.bus.$emit("$loadData."+b)})})}function D(b,w){ct(p,b,w),I(b)}function G(b,w){let O=(...j)=>ee(()=>w(...j));O._driver=!0,D(b,O)}function Q(b,w){let O=(b||"").split(".");b=O.shift()||"";let j=O.join(".");if(fe(p,b)||(p[b]=Vo),p[b]!==Vo){let z=p[b];return z&&z._driver?z=z(j):O.length&&(z=ke(z,O)),z==null||z===""?w:z}return w}function Z(b){u.push(b)}function M(b){delete p[b],I(b)}function H(b,w){s.push({name:b,callback:w})}function Y(b){X(this,{id:Vg++,create:x,vm:b,manager:Em(e.manager||{}),parsers:r,providers:c,modelFields:i,formulas:g,isMobile:h,rules:b.props.rule,name:b.props.name||Qr(),inFor:b.props.inFor,prop:{components:t,directives:n},get:null,drivers:o,renderDriver:null,refreshData:I,loadData:p,CreateNode:m,bus:uh(),unwatch:new Set,options:l.ref({}),extendApiFn:u,fetchCache:new WeakMap,tmpData:l.reactive({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),s.forEach(w=>{this.bus.$on(w.name,w.callback)}),l.nextTick(()=>{l.watch(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),X(b.appContext.components,t),X(b.appContext.directives,n),this.$handle=Reflect.construct(qe,[this]),this.name&&(this.inFor?(Me[this.name]||(Me[this.name]=[]),Me[this.name].push(this)):Me[this.name]=this)}Y.isMobile=h,X(Y.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(b,...w){this.bus.$emit(b,...w);let O=this.renderDriver;if(O&&O[b])return ee(()=>O[b](...w))},t(b,w,O){let j=O?O("$t."+b):this.globalLanguageDriver(b);return j!=null||(j=""),j&&w&&Object.keys(w).forEach(z=>{let oe=RegExp(`{${z}}`,"g");j=j.replace(oe,w[z])}),j},globalDataDriver(b){var oe;let w=b.split("."),O=w.shift()||"",j=(oe=this.options.value)==null?void 0:oe.globalData,z=j==null?void 0:j[O];if(z){if(z.type==="static")return ke(z.data,w);{let ie,pe=this.fetchCache.get(z);if(pe){if(pe.status&&(ie=ke(pe.data,w)),!pe.loading)return ie;pe.loading=!1,this.fetchCache.set(z,pe)}else this.fetchCache.set(z,{status:!1});let Ee=ut(()=>{Oe();let ve=this.fetchCache.get(z);j&&Object.values(j).indexOf(z)!==-1?(ve&&(ve.loading=!0,this.fetchCache.set(z,ve)),this.bus.$emit("$loadData.$globalData."+O)):this.fetchCache.delete(z)},z.wait||600),Ce=ve=>{this.fetchCache.set(z,{status:!0,data:ve}),this.bus.$emit("$loadData.$globalData."+O)},Oe=this.watchLoadData((ve,Re)=>{if(Re&&z.watch===!1)return Oe();if(Re){Ee();return}let Ie=this.$handle.loadFetchVar(rl(z),ve);Ie.targetRule=this.targetRule,this.$handle.api.fetch(Ie).then(ft=>{Ce(ft)}).catch(()=>{Ce(null)})});return z.watch===!1&&Oe(),ie}}},getLocale(){let b=this.vm.setupState.top.props.locale;return b&&typeof b=="object"?b.name:typeof b=="string"?b:"zh-cn"},globalLanguageDriver(b){var z;let w=this.vm.setupState.top.props.t,O=this.vm.setupState.top.props.locale,j;return w&&(j=ee(()=>w(b))),j==null&&O&&typeof O=="object"&&(j=ke(O,b)),j!=null||(j=ke((((z=this.options.value)==null?void 0:z.language)||{})[this.getLocale()]||{},b),j!=null||(j=jg(b))),j},globalVarDriver(b){var z,oe;let w=b.split("."),O=w.shift()||"",j=(oe=(z=this.options.value)==null?void 0:z.globalVariable)==null?void 0:oe[O];if(j){let ie=B.Function(j)?j:Qe(j.handle);if(ie)return ke(ie((...pe)=>this.$handle.api.getData(...pe),this.$handle.api),w)}},setData(b,w,O){O?D(b,w):(ct(this.vm.setupState.top.setupState.fc.tmpData,b,w),this.bus.$emit("$loadData."+b))},getLoadData(b,w){let O=null;if(b!=null){let j=b.split("."),z=j.shift();if(O=ke(this.vm.setupState.top.setupState.fc.tmpData,b),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(j.join(".")),j=[];else if(z==="$var")O=this.globalVarDriver(j.join(".")),j=[];else if(z==="$locale")O=this.getLocale(),j=[];else if(z==="$t")O=this.globalLanguageDriver(j.join(".")),j=[];else{if(z==="$preview")return this.$handle.preview;O=Q(b),j=[]}O&&j.length&&(O=ke(O,j))}return O==null||O===""?w:O},watchLoadData(b,w){let O={},j=ie=>{this.get||(this.get=z),ee(()=>{b(z,ie)}),this.get===z&&(this.get=void 0)},z=(ie,pe)=>{let Ee;if(typeof ie=="object"&&(Ee=ie.getValue,ie=ie.id),O[ie])return O[ie].val;let Ce=l.computed(()=>Ee?Ee():this.getLoadData(ie,pe)),Oe=ie.split("."),ve=Oe.shift(),Re=Oe.shift()||"",Ie=ut(()=>{let Be=Ee?Ee():this.getLoadData(ie,pe);if(O[ie])((Be instanceof Function||B.Object(Be)||Array.isArray(Be))&&Be===O[ie].val||JSON.stringify(Be)!==JSON.stringify(O[ie].val))&&(O[ie].val=Be,j(!0));else return},w||0),ft=l.watch(Ce,Be=>{Ie()});return this.bus.$on("$loadData."+ve,Ie),Re&&this.bus.$on("$loadData."+ve+"."+Re,Ie),O[ie]={fn:()=>{this.bus.$off("$loadData."+ve,Ie),Re&&this.bus.$off("$loadData."+ve+"."+Re,Ie),ft()},val:Ce.value},Ce.value};j(!1);let oe=()=>{Object.keys(O).forEach(ie=>O[ie].fn()),O={},this.unwatch.delete(oe)};return this.unwatch.add(oe),oe},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let b=R({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},St(f)),w=this.isSub();w&&(b=this.mergeOptions(b,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),b=this.mergeOptions(b,this.vm.props.option);let O=this.api();this.targeabFormDriver("initOptions",b,{api:O,isSubForm:w}),this.updateOptions(b)},mergeOptions(b,w,O){return w=R({},w||{}),O&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(j=>{delete w[j]}),w.global&&(b.global=Jh(b.global,w.global),delete w.global),this.$handle.$manager.mergeOptions([w],b),b},updateOptions(b){this.options.value=this.mergeOptions(this.options.value,b),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(ee(()=>this.$handle.lifecycle("beforeUnmount")),this.name)if(this.inFor){let b=Me[this.name].indexOf(this);Me[this.name].splice(b,1)}else delete Me[this.name];s.forEach(b=>{this.bus.$off(b.name,b.callback)}),this.tmpData={},[...this.unwatch].forEach(b=>b()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit("next-tick",this.$handle.api))}});function ne(b){X(b,{version:e.version,ui:e.ui,isMobile:h,extendApi:Z,getData:Q,setDataDriver:G,setData:D,removeData:M,refreshData:I,maker:d,component:E,directive:$,setModelField:F,seabFormula:A,setDriver:C,register:V,$vnode:q,parser:T,use:U,factory:_,componentAlias:P,copyRule:wl,copyRules:xl,mergeRule:rt,fetch:kl,$form:k,parseFn:Qe,parseJson:tl,toJson:or,useApp:S,getApi:v,on:H})}function ue(b){X(b,{create:x,install(w,O){f=R(R({},f),O||{});let j=`_installedAbForm${h?"Mobile":""}_${e.ui}`,z=w;if(z[j]===!0)return;z[j]=!0;let oe=function(pe,Ee={}){return x(pe,Ee)};ne(oe),w.config.globalProperties.$abForm=oe;let ie=k();w.component(ie.name,ie),a.forEach(pe=>{ee(()=>pe(b,w))})}})}if(ne(y),ue(y),G("$cookie",Dm),G("$localStorage",Im),G("$sessionStorage",Bm),m.use({fragment:"fcFragment"}),e.install&&x.use(e),S((b,w)=>{w.mixin({props:["abFormInject"],emits:["fc.updateValue","fc.el"]})}),T(Om),e.inherit){let b=e.inherit;b.components&&X(t,b.components),b.parsers&&X(r,b.parsers),b.directives&&X(n,b.directives),b.modelFields&&X(i,b.modelFields),b.providers&&X(c,b.providers),b.useApps&&X(a,b.useApps),b.maker&&X(d,b.maker),b.loadData&&X(p,b.loadData),b.formulas&&X(g,b.formulas)}let J=k();return Cr(J,y),Object.defineProperties(J,{fetch:{get(){return y.fetch},set(b){y.fetch=b}}}),J.util=y,J}const{t:Ge}=Xe(),{isZhCN:Lg}=Se(),Hg=["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)"],Lo={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:[Lg()?"¥":"$"]}]},inputPercent:{align:"right",children:[{type:"span",slot:"suffix",children:["%"]}]},switch:{align:"center"},colorPicker:{props:{showAlpha:!0,predefine:Hg}},divider:{props:{contentPosition:"left"}}};function jl(e,t={}){const{type:r,disabledDate:n,shortcuts:i}=e||{};let o=Lo[r||""];if(r==="datePicker"){if(n===!0&&(o=br({},o,{props:{disabledDate:Ug}})),i===!0){const p=We(e,"props.type")==="daterange";o=br({},o,{props:{shortcuts:p?Yg:qg}})}}else r==="treeSelect"&&We(e,"props.multiple")&&(o=br({},o,Lo.treeSelectMultiple));if(!o)return e;const a=t.includeChildren!==!1,f=o,{children:s}=f,u=Lt(f,["children"]),d=br({},a?o:u,e);return a&&s?re(R({},d),{children:zg(s,e.children)}):d}function zg(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 Ug(e){return e.getTime()>Date.now()}const qg=[{text:Ge("today"),value:()=>ce().startOf("day").valueOf()},{text:Ge("yesterday"),value:()=>ce().subtract(1,"days").startOf("day").valueOf()},{text:Ge("lastWeek"),value:()=>ce().subtract(1,"weeks").startOf("week").valueOf()}],Yg=[{text:Ge("today"),value:()=>[ce().startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("yesterday"),value:()=>[ce().subtract(1,"days").startOf("day").valueOf(),ce().subtract(1,"days").endOf("day").valueOf()]},{text:Ge("lastWeek"),value:()=>[ce().subtract(1,"weeks").startOf("week").valueOf(),ce().subtract(1,"weeks").endOf("week").valueOf()]},{text:Ge("last7"),value:()=>[ce().subtract(7,"days").startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("last30"),value:()=>[ce().subtract(30,"days").startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("thisMonth"),value:()=>[ce().startOf("month").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("thisYear"),value:()=>[ce().startOf("year").valueOf(),ce().endOf("day").valueOf()]}];function Ho(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 u=[];let c;for(const d of a){u.push(d);const f=JSON.stringify(u);let h=n.get(f);h||(h={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,u]))}`,title:d,children:[]},n.set(f,h),s.push(h)),c=h,s=h.children}c&&o.groupAlign!==void 0&&(c.groupAlign=o.groupAlign),s.push(o)}return r}function Gg(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 c=e.visibleData&&R({},e.visibleData);if(c)for(const d of i)c[d]===!0&&delete c[d];return re(R({},e),{sortData:void 0,visibleData:c})}function Wg(e){const t=l.reactive(new Map),r=new WeakMap,n=new Set;function i(u){return typeof u.getRule=="function"?u.getRule():u}function o(u){let c=r.get(u);if(!c){const f={};c={rule:u,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(u,c)}const d=Fl(c,u.options,{onLoad:f=>t.set(u,f),onUpdate:f=>t.set(u,f),onReload:()=>{t.set(u,[]),o(u)}});t.set(u,d)}function a(u,c){for(const d of u){const f=i(d);c.has(f)||(c.add(f),typeof f.options=="function"?o(f):t.delete(f),Array.isArray(f.children)&&a(f.children,c))}}l.watchEffect(()=>{const u=new Set;a(e(),u);for(const c of n)u.has(c)||(n.delete(c),t.delete(c));u.forEach(c=>n.add(c))});function s(u,c,d){const f=i(u),h=t.get(f),p=[...c,f.field?`field:${f.field}`:`index:${d}`],m=Array.isArray(f.children)?Ho(f.children.map((v,S)=>s(v,p,S)),p):f.children,g=Array.isArray(m)&&m.some((v,S)=>v!==f.children[S]);let y=f;return(typeof f.options=="function"||g)&&(y=re(R(R({},f),typeof f.options=="function"?{options:h}:{}),{children:m})),jl(y,{includeChildren:!1})}return l.computed(()=>Ho(e().map((u,c)=>s(u,[],c))))}function Nl(e,t){for(const r of e){if(r.field===t)return r;if(r.children){const n=Nl(r.children,t);if(n)return n}}}function Jg(e,t,r,n){var o;if(!r)return e;const i=(o=r.footerFormatter)!=null?o:hi(r).formatter;return i?i({cellValue:e,row:t,column:n!=null?n:r}):e}function Kg(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=[],u=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")u(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(u(m),typeof g!="function")throw new TypeError(`AbTable footerSummary handler for "${m}" must be a function.`);s.push([m,g])}}const c={};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.`)}}c[p]=m}for(const[p,m]of s){const g=t.length?m({rows:t,totals:Object.freeze(R({},c))}):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.`);c[p]=g}const d=R({[e.labelField]:(h=e.label)!=null?h:n},c),f=R({},d);for(const[p,m]of Object.entries(c))f[p]=m===null?"-":Jg(m,d,Nl(r,p),i(p));return f}const Vl=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 Ri;const n=r,i=e,{t:o}=Xe(),a=lr.useRoute(),s=l.ref(null),u=l.ref(),c=l.ref();l.inject("abToolbarRef",null);const d=l.ref([]),f=l.ref(i.id||String((Ri=l.getCurrentInstance())==null?void 0:Ri.uid)||a.path),h=Wg(()=>i.rule),p=l.computed(()=>{const W=[];return i.editable&&ja(i.rule||[],K=>K.field&&K.edit?W.push(K.field):void 0),W}),m=({column:W})=>{var K;return typeof i.headerCellClassName=="function"?i.headerCellClassName({column:W}):(K=p.value)!=null&&K.includes(W.field)?"primary":null},g=l.computed(()=>!(!i.readonly||i.multiSelect||i.singleSelect)),{wsCache:y}=Se(),v=l.computed(()=>y.getCurrentSize||"default"),S=l.computed(()=>pl(v.value)),$={useKey:!0,resizable:!0},V=l.reactive({useKey:!0,isHover:!0,isCurrent:i.isCurrent,drag:i.dragable}),P=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:W,storeData:K})=>{const te=Gg(K,W.getFullColumns());return te!==K&&console.warn("[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored."),te}}),k=l.reactive({filename:`${i.title||(a==null?void 0:a.meta.title)}_${ce().format("YYYYMMDD")}`,columns:Na(wt(i.rule,W=>W.field!==de.OPERATE),W=>({field:W.field}))}),N=(W,K)=>me(this,null,function*(){var le;const te=c.value,we=wt(i.rule,ae=>(ae==null?void 0:ae.field)&&(ae==null?void 0:ae.field)!=="operate"&&!ae.hidden),ye=!!i.parentIdField&&((le=b.value)==null?void 0:le.expandAll);if(K){const ae=te==null?void 0:te.getCheckboxRecords();if(!(ae==null?void 0:ae.length))return;te==null||te.exportData({data:ae,columns:we,isAllExpand:ye,filename:W})}else te==null||te.exportData({columns:we,isAllExpand:ye,filename:W})}),q=W=>{var K,te;return(te=(K=c.value)==null?void 0:K.getColumnByField)==null?void 0:te.call(K,W)},U=l.computed(()=>i.footerSummary?[Kg(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(""),I=l.ref(""),D=l.ref(""),G=l.computed(()=>{var W,K,te,we,ye,le,ae,Fe,je,Ne;return{pageNo:(K=(W=i.pagerConfig)==null?void 0:W.pageNoField)!=null?K:"pageNo",pageSize:(we=(te=i.pagerConfig)==null?void 0:te.pageSizeField)!=null?we:"pageSize",sortFieldTable:(le=(ye=i.pagerConfig)==null?void 0:ye.sortFieldTableField)!=null?le:"sortFieldTable",sortField:(Fe=(ae=i.pagerConfig)==null?void 0:ae.sortFieldField)!=null?Fe:"sortField",sortType:(Ne=(je=i.pagerConfig)==null?void 0:je.sortTypeField)!=null?Ne:"sortType"}}),Q=l.computed(()=>{var W;return((W=i.pagerConfig)==null?void 0:W.layouts)||["Home","PrevJump","PrevPage","Number","NextPage","NextJump","End","Sizes","FullJump","Total"]});function Z(){var Fe,je,Ne,lt,pt,Vt;const W=(Fe=x.value)!=null?Fe:{},K=G.value,te=(je=W[K.pageNo])!=null?je:1,we=(Ne=W[K.pageSize])!=null?Ne:10,ye=(lt=W[K.sortFieldTable])!=null?lt:"",le=(pt=W[K.sortField])!=null?pt:"",ae=(Vt=W[K.sortType])!=null?Vt:"";if(!Number.isInteger(te)||Number(te)<1||!Number.isInteger(we)||Number(we)<1)throw new TypeError("AbTable pageNo and pageSize must be positive integers.");if(typeof ye!="string"||typeof le!="string"||typeof ae!="string")throw new TypeError("AbTable sort fields must be strings.");F.value=Number(te),A.value=Number(we),C.value=ye,I.value=le,D.value=ae}const M=te=>me(this,[te],function*({currentPage:W,pageSize:K}){F.value=W,A.value=K,yield gr()}),H=l.reactive({trigger:"cell",remote:!i.sortLocally}),Y=we=>me(this,[we],function*({field:W,order:K,column:te}){var ye,le,ae,Fe,je;if(!K)C.value=(ye=i.idFieldTable)!=null?ye:"",I.value=i.idField||"id",D.value="desc";else{const Ne=(Fe=(ae=(le=te.params)==null?void 0:le.sortFieldTable)!=null?ae:i.idFieldTable)!=null?Fe:"",lt=((je=te.params)==null?void 0:je.sortField)||W;if(typeof Ne!="string"||typeof lt!="string")throw new TypeError("AbTable column sortFieldTable and sortField must be strings.");C.value=Ne,I.value=lt.replace(/[A-Z]/g,pt=>"_"+pt.toLowerCase()),D.value=K}yield on()}),ne=l.computed(()=>i.editable&&!g.value?{trigger:"click",mode:"row",showStatus:!0}:void 0),ue=l.ref(i.editable),J=l.computed(()=>!i.parentIdField),b=l.computed(()=>{if(!i.parentIdField)return;const W={transform:!0,accordion:i.accordion,rowField:i.idField||"id",parentField:i.parentIdField||"parentId",hasChildField:i.hasChildField||"hasChildren",expandAll:!0};return typeof i.lazyMethod=="function"&&(W.lazy=!0,W.loadMethod=i.lazyMethod),W}),w=i.singleSelect?{labelField:"name",trigger:"row"}:void 0,O=Np(W=>n("current-change",{newValue:W}),100),j=({row:W,column:K})=>{if((K==null?void 0:K.field)===de.OPERATE)return;const te=c.value;(!i.editable||g.value)&&(te==null||te.clearCheckboxRow()),te==null||te.setCheckboxRow(W,!0),n("cellClick",{row:W,column:K})},z=()=>{var K;const W=(K=c.value)==null?void 0:K.getRadioRecord();O(W)},oe=l.computed(()=>i.multiSelect||typeof i.multiSelect=="undefined"&&i.editable);V.isCurrent=oe.value||i.singleSelect||i.absDragable||i.isCurrent;const ie=l.reactive({highlight:i.multiSelect&&i.editable,range:!i.parentIdField}),pe=()=>{var K;const W=(K=c.value)==null?void 0:K.getCheckboxRecords();O(W)},Ee=({newValue:W,column:K})=>{(K==null?void 0:K.field)!==de.OPERATE&&O(W)};let Ce=l.ref(i.maxHeight||0);const Oe={mini:36,small:40,medium:44,large:48};let ve=Oe[S.value||"medium"]||Oe.medium;const Re=l.ref([10,15,20,50,100]),Ie=()=>{var je,Ne,lt,pt,Vt,Mi,Di,Ii,Bi;if(!i.autoHeight){i.maxHeight&&(Ce.value=i.maxHeight);return}(Ne=(je=c.value)==null?void 0:je.cellConfig)!=null&&Ne.height&&(ve=c.value.cellConfig.height);const W=(lt=s.value)==null?void 0:lt.parentElement,K=((Vt=(pt=W==null?void 0:W.querySelector(".ab-toolbar"))==null?void 0:pt.getBoundingClientRect())==null?void 0:Vt.height)||0,te=(So(i.rule)||0)*ve,we=((Ii=(Di=(Mi=u.value)==null?void 0:Mi.$el)==null?void 0:Di.getBoundingClientRect())==null?void 0:Ii.height)||0,ye=(((Bi=W==null?void 0:W.getBoundingClientRect())==null?void 0:Bi.height)||500)-K-we;if(i.offsetTop){const an=window.innerHeight-(i.offsetTop||0);Ce.value=Math.max(ye,an)}else Ce.value=ye;if(Ce.value<=0)return;const le=Ce.value-te-(i.pagerEnable?ve*1.5:0);let ae=Math.min(Math.max(Math.round(le/ve),10),100);i.footerSummary&&(ae-=1);const Fe=[...Re.value];Fe.includes(ae)||(Fe.push(ae),Fe.sort((an,Fs)=>an-Fs)),Re.value=Fe,A.value=ae,console.warn("calculateTableHeight: ",So(i.rule))},ft=l.ref(!1);let Be=0;function gr(){return me(this,null,function*(){var K,te;if(!i.queryHandler)return;const W=++Be;ft.value=!0;try{const we=G.value,ye=re(R({},x.value),{[we.pageNo]:F.value,[we.pageSize]:A.value,[we.sortFieldTable]:C.value,[we.sortField]:I.value,[we.sortType]:D.value}),le=yield i.queryHandler(ye),ae=Array.isArray(le)?le:(K=le==null?void 0:le.data)!=null?K:le==null?void 0:le.list;if(!Array.isArray(ae))throw new TypeError("AbTable queryHandler must return an array or an object containing a data or list array.");if(W!==Be)return;d.value=ae,_.value=Array.isArray(le)?le.length:(te=le.total)!=null?te:ae.length}finally{W===Be&&(ft.value=!1)}})}l.onMounted(()=>me(this,null,function*(){Z(),Ie(),yield gr()}));function _s(){return me(this,null,function*(){F.value=1,yield gr()})}function on(){return me(this,null,function*(){yield gr()})}return t({reload:_s,refresh:on,resize:()=>Ie(),tableRef:c,exportData:N}),(W,K)=>{const te=l.resolveComponent("vxe-table"),we=l.resolveComponent("vxe-pager");return l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:s,class:"ab-table"},[l.createVNode(te,{ref_key:"tableRef",ref:c,id:f.value,data:d.value,stripe:J.value,loading:ft.value,"column-config":$,"row-config":V,"row-drag-config":l.unref(T),"cell-config":l.unref(P),"custom-config":E,"tree-config":b.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(Ce),"edit-config":ne.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":ue.value,"show-overflow":"","show-header-overflow":"","show-footer-overflow":"","auto-resize":"","show-footer":!!e.footerSummary,"footer-data":U.value,"sort-config":H,onSortChange:Y,"radio-config":l.unref(w),onRadioChange:z,"checkbox-config":ie,onCheckboxChange:pe,onCheckboxAll:pe,onCurrentChange:Ee,"export-config":k,onCellClick:j},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(ye,le)=>(l.openBlock(),l.createBlock(qh,{key:ye.field||le,rule:ye,idx:le,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:on},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(we,{key:0,ref_key:"pagerRef",ref:u,"class-name":e.pagerClassName,"page-sizes":Re.value,"current-page":F.value,"onUpdate:currentPage":K[0]||(K[0]=ye=>F.value=ye),"page-size":A.value,"onUpdate:pageSize":K[1]||(K[1]=ye=>A.value=ye),total:_.value,size:S.value,layouts:Q.value,onPageChange:M},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 Ll=Object.freeze({left:0,top:0,width:16,height:16}),Vr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fr=Object.freeze(R(R({},Ll),Vr)),Hn=Object.freeze(re(R({},fr),{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 zo(e,t){const r=Qg(e,t);for(const n in Hn)n in Vr?n in e&&!(n in r)&&(r[n]=Vr[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Zg(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,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(r).concat(Object.keys(n)).forEach(o),i}function Xg(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=zo(n[s]||i[s],o)}return a(t),r.forEach(a),zo(e,o)}function ey(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=Zg(e);for(const i in n){const o=n[i];o&&(t(i,Xg(e,i,o)),r.push(i))}return r}const Zt=/^[a-z0-9]+(-[a-z0-9]+)*$/,Nt=(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(),u=i.pop(),c={provider:i.length>0?i[0]:n,prefix:u,name:s};return t&&!Pr(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:n,prefix:a.shift(),name:a.join("-")};return t&&!Pr(s)?null:s}if(r&&n===""){const s={provider:n,prefix:"",name:o};return t&&!Pr(s,r)?null:s}return null},Pr=(e,t)=>e?!!((e.provider===""||e.provider.match(Zt))&&(t&&e.prefix===""||e.prefix.match(Zt))&&e.name.match(Zt)):!1,ty=R({provider:"",aliases:{},not_found:{}},Ll);function Tn(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function ry(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tn(e,ty))return null;const r=t.icons;for(const i in r){const o=r[i];if(!i.match(Zt)||typeof o.body!="string"||!Tn(o,Hn))return null}const n=t.aliases||Object.create(null);for(const i in n){const o=n[i],a=o.parent;if(!i.match(Zt)||typeof a!="string"||!r[a]&&!n[a]||!Tn(o,Hn))return null}return t}const Lr=Object.create(null);function ny(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ze(e,t){const r=Lr[e]||(Lr[e]=Object.create(null));return r[t]||(r[t]=ny(e,t))}function $i(e,t){return ry(t)?ey(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function iy(e,t,r){try{if(typeof r.body=="string")return e.icons[t]=R({},r),!0}catch(n){}return!1}function oy(e,t){let r=[];return(typeof e=="string"?[e]:Object.keys(Lr)).forEach(i=>{(typeof i=="string"&&typeof t=="string"?[t]:Object.keys(Lr[i]||{})).forEach(a=>{const s=Ze(i,a);r=r.concat(Object.keys(s.icons).map(u=>(i!==""?"@"+i+":":"")+a+":"+u))})}),r}let Ti=!1;function ay(e){return Ti}function pr(e){const t=typeof e=="string"?Nt(e,!0,Ti):e;if(t){const r=Ze(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function ly(e,t){const r=Nt(e,!0,Ti);if(!r)return!1;const n=Ze(r.provider,r.prefix);return iy(n,r.name,t)}function Hl(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const r=e.prefix;if(!Pr({provider:t,prefix:r,name:"a"}))return!1;const n=Ze(t,r);return!!$i(n,e)}function sy(e){return!!pr(e)}function uy(e){const t=pr(e);return t?R(R({},fr),t):null}const zl=Object.freeze({width:null,height:null}),Ul=Object.freeze(R(R({},zl),Vr)),cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zn(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(cy);if(n===null||!n.length)return e;const i=[];let o=n.shift(),a=dy.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 fy=e=>e==="unset"||e==="undefined"||e==="none";function Xr(e,t){const r=R(R({},fr),e),n=R(R({},Ul),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,v=m.vFlip;let S=m.rotate;y?v?S+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):v&&(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,u=i.width,c=i.height;let d,f;a===null?(f=s===null?"1em":s==="auto"?c:s,d=zn(f,u/c)):(d=a==="auto"?u:a,f=s===null?zn(d,c/u):s==="auto"?c:s);const h={},p=(m,g)=>{fy(g)||(h[m]=g.toString())};return p("width",d),p("height",f),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+u.toString()+" "+c.toString(),{attributes:h,body:o}}const py=/\sid="(\S+)"/g,hy="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let my=0;function ql(e,t=hy){const r=[];let n;for(;n=py.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+(my++).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 vt={local:!0,session:!0},Yl={local:new Set,session:new Set};let Ei=!1;function gy(e){Ei=e}const Uo="iconify2",ar="iconify",Gl=ar+"-count",qo=ar+"-version",Wl=36e5,yy=168;function Un(e,t){try{return e.getItem(t)}catch(r){}}function ki(e,t,r){try{return e.setItem(t,r),!0}catch(n){}}function Yo(e,t){try{e.removeItem(t)}catch(r){}}function qn(e,t){return ki(e,Gl,t.toString())}function Yn(e){return parseInt(Un(e,Gl))||0}let kr=typeof window=="undefined"?{}:window;function Jl(e){const t=e+"Storage";try{if(kr&&kr[t]&&typeof kr[t].length=="number")return kr[t]}catch(r){}vt[e]=!1}function Kl(e,t){const r=Jl(e);if(!r)return;const n=Un(r,qo);if(n!==Uo){if(n){const s=Yn(r);for(let u=0;u<s;u++)Yo(r,ar+u.toString())}ki(r,qo,Uo),qn(r,0);return}const i=Math.floor(Date.now()/Wl)-yy,o=s=>{const u=ar+s.toString(),c=Un(r,u);if(typeof c=="string"){try{const d=JSON.parse(c);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){}Yo(r,u)}};let a=Yn(r);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,qn(r,a)):Yl[e].add(s))}function Ql(){if(!Ei){gy(!0);for(const e in vt)Kl(e,t=>{const r=t.data,n=t.provider,i=r.prefix,o=Ze(n,i);if(!$i(o,r).length)return!1;const a=r.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Zl(e,t){switch(e){case"local":case"session":vt[e]=t;break;case"all":for(const r in vt)vt[r]=t;break}}const Gn=Object.create(null);function Xl(e,t){Gn[e]=t}function Wn(e){return Gn[e]||Gn[""]}function _i(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 en=Object.create(null),Jt=["https://api.simplesvg.com","https://api.unisvg.com"],Rr=[];for(;Jt.length>0;)Jt.length===1||Math.random()>.5?Rr.push(Jt.shift()):Rr.push(Jt.pop());en[""]=_i({resources:["https://api.iconify.design"].concat(Rr)});function es(e,t){const r=_i(t);return r===null?!1:(en[e]=r,!0)}function tn(e){return en[e]}function vy(){return Object.keys(en)}const by=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}};let Hr=by();function wy(e){Hr=e}function xy(){return Hr}function Sy(e,t){const r=tn(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 Cy(e){return e===404}const $y=(e,t,r)=>{const n=[],i=Sy(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return r.forEach((u,c)=>{s+=u.length+1,s>=i&&c>0&&(n.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),n.push(a),n};function Ty(e){if(typeof e=="string"){const t=tn(e);if(t)return t.path}return"/"}const Ey=(e,t,r)=>{if(!Hr){r("abort",424);return}let n=Ty(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});n+=o+".json?"+u.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;Hr(e+n).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{r(Cy(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)})},ky={prepare:$y,send:Ey};function _y(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,u=r[o]||(r[o]=Object.create(null)),c=u[a]||(u[a]=Ze(o,a));let d;s in c.icons?d=t.loaded:a===""||c.missing.has(s)?d=t.missing:d=t.pending;const f={provider:o,prefix:a,name:s};d.push(f)}),t}function ts(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(i=>i.id!==t))})}function Fy(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(u=>{if(u.prefix!==i)return!0;const c=u.name;if(e.icons[c])a.loaded.push({provider:n,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:n,prefix:i,name:c});else return r=!0,!0;return!1}),a.pending.length!==s&&(r||ts([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ay=0;function Oy(e,t,r){const n=Ay++,i=ts.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 Py(e,t=!0,r=!1){const n=[];return e.forEach(i=>{const o=typeof i=="string"?Nt(i,t,r):i;o&&n.push(o)}),n}var Ry={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function My(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 u="pending",c=0,d,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function m(){f&&(clearTimeout(f),f=null)}function g(){u==="pending"&&(u="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 v(){return{startTime:s,payload:t,status:u,queriesSent:c,queriesPending:h.length,subscribe:y,abort:g}}function S(){u="failed",p.forEach(T=>{T(void 0,d)})}function $(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function V(T,E,k){const N=E!=="success";switch(h=h.filter(q=>q!==T),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){d=k,S();return}if(N){d=k,h.length||(a.length?P():S());return}if(m(),$(),!e.random){const q=e.resources.indexOf(T.resource);q!==-1&&q!==e.index&&(e.index=q)}u="completed",p.forEach(q=>{q(k)})}function P(){if(u!=="pending")return;m();const T=a.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&($(),S())},e.timeout);return}S();return}const E={status:"pending",resource:T,callback:(k,N)=>{V(E,k,N)}};h.push(E),c++,f=setTimeout(P,e.rotate),r(T,t,E.callback)}return setTimeout(P),v}function rs(e){const t=R(R({},Ry),e);let r=[];function n(){r=r.filter(s=>s().status==="pending")}function i(s,u,c){const d=My(t,s,u,(f,h)=>{n(),c&&c(f,h)});return r.push(d),d}function o(s){return r.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:n}}function Go(){}const En=Object.create(null);function Dy(e){if(!En[e]){const t=tn(e);if(!t)return;const r=rs(t),n={config:t,redundancy:r};En[e]=n}return En[e]}function ns(e,t,r){let n,i;if(typeof e=="string"){const o=Wn(e);if(!o)return r(void 0,424),Go;i=o.send;const a=Dy(e);a&&(n=a.redundancy)}else{const o=_i(e);if(o){n=rs(o);const a=e.resources?e.resources[0]:"",s=Wn(a);s&&(i=s.send)}}return!n||!i?(r(void 0,424),Go):n.query(t,i,r)().abort}function Iy(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in vt)Kl(n,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function By(e,t){Ei||Ql();function r(n){let i;if(!vt[n]||!(i=Jl(n)))return;const o=Yl[n];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=Yn(i),!qn(i,a+1))return;const s={cached:Math.floor(Date.now()/Wl),provider:e.provider,data:t};return ki(i,ar+a.toString(),JSON.stringify(s))}t.lastModified&&!Iy(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Wo(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Fy(e)}))}function Ny(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=Wn(r)))return;o.prepare(r,n,i).forEach(s=>{ns(r,s,u=>{if(typeof u!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=$i(e,u);if(!c.length)return;const d=e.pendingIcons;d&&c.forEach(f=>{d.delete(f)}),By(e,u)}catch(c){console.error(c)}jy(e)})})}))}const Vy=e=>{const r=Ze(e.provider,e.prefix).pendingIcons;return!!(r&&r.has(e.name))},Fi=(e,t)=>{const r=Py(e,!0,ay()),n=_y(r);if(!n.pending.length){let u=!0;return t&&setTimeout(()=>{u&&t(n.loaded,n.missing,n.pending,Wo)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return n.pending.forEach(u=>{const{provider:c,prefix:d}=u;if(d===s&&c===a)return;a=c,s=d,o.push(Ze(c,d));const f=i[c]||(i[c]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(u=>{const{provider:c,prefix:d,name:f}=u,h=Ze(c,d),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][d].push(f))}),o.forEach(u=>{const{provider:c,prefix:d}=u;i[c][d].length&&Ny(u,i[c][d])}),t?Oy(t,n,o):Wo},Ly=e=>new Promise((t,r)=>{const n=typeof e=="string"?Nt(e,!0):e;if(!n){r(e);return}Fi([n||e],i=>{if(i.length&&n){const o=pr(n);if(o){t(R(R({},fr),o));return}}r(e)})});function is(e,t){const r=R({},e);for(const n in t){const i=t[n],o=typeof i;n in zl?(i===null||i&&(o==="string"||o==="number"))&&(r[n]=i):o===typeof r[n]&&(r[n]=n==="rotate"?i%4:i)}return r}const rn=re(R({},Ul),{inline:!1}),kn="iconify",Jn="iconify-inline",dt="iconifyData"+Date.now();let Ct=[];function hr(e){for(let t=0;t<Ct.length;t++){const r=Ct[t];if((typeof r.node=="function"?r.node():r.node)===e)return r}}function os(e,t=!1){let r=hr(e);return r?(r.temporary&&(r.temporary=t),r):(r={node:e,temporary:t},Ct.push(r),r)}function Hy(){if(document.documentElement)return os(document.documentElement);Ct.push({node:()=>document.documentElement})}function zy(e){Ct=Ct.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function mr(){return Ct}function Uy(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Xt=null;const qy={childList:!0,subtree:!0,attributes:!0};function as(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Xt&&Xt(e)}))}function Yy(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[dt]!==void 0){r.paused||as(e);return}}}function ls(e,t){e.observer.instance.observe(t,qy)}function zr(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(Yy.bind(null,e)),ls(e,r),t.paused||as(e))}function Jo(){mr().forEach(zr)}function ss(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 Gy(e){const t=Xt!==null;if(Xt!==e&&(Xt=e,t&&mr().forEach(ss)),t){Jo();return}Uy(Jo)}function Kn(e){(e?[e]:mr()).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 Wy(e){if(e){const t=hr(e);t&&Kn(t)}else Kn()}function Qn(e){(e?[e]:mr()).forEach(t=>{if(!t.observer){zr(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?ls(t,n):zr(t);else return}})}function Jy(e){if(e){const t=hr(e);t&&Qn(t)}else Qn()}function us(e,t=!1){const r=os(e,t);return zr(r),r}function cs(e){const t=hr(e);t&&(ss(t),zy(e))}function Ky(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const r=e.customisations,n=t.customisations;for(const i in rn)if(r[i]!==n[i])return!0;return!1}function Qy(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 Zy=/[\s,]+/;function Xy(e,t){t.split(Zy).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ev=["width","height"],tv=["inline","hFlip","vFlip"];function rv(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function nv(e){const t=e.getAttribute("data-icon"),r=typeof t=="string"&&Nt(t,!0);if(!r)return null;const n=re(R({},rn),{inline:e.classList&&e.classList.contains(Jn)});ev.forEach(s=>{const u=e.getAttribute("data-"+s);u&&(n[s]=u)});const i=e.getAttribute("data-rotate");typeof i=="string"&&(n.rotate=Qy(i));const o=e.getAttribute("data-flip");typeof o=="string"&&Xy(n,o),tv.forEach(s=>{const u="data-"+s,c=rv(e.getAttribute(u),u);typeof c=="boolean"&&(n[s]=c)});const a=e.getAttribute("data-mode");return{name:t,icon:r,customisations:n,mode:a}}const iv="svg."+kn+", i."+kn+", span."+kn+", i."+Jn+", span."+Jn;function ov(e){const t=[];return e.querySelectorAll(iv).forEach(r=>{const n=r[dt]||r.tagName.toLowerCase()!=="svg"?nv(r):null;n&&t.push({node:r,props:n})}),t}function ds(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 er;function av(){try{er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){er=null}}function lv(e){return er===void 0&&av(),er?er.createHTML(e):e}function fs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(r=>{e[r]&&t.add("iconify--"+e[r])}),t}function ps(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 hs(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 ms(e,t,r){let n;try{n=document.createElement("span")}catch(m){return e}const i=t.customisations,o=Xr(r,i),a=e[dt],s=ds(ql(o.body),R({"aria-hidden":"true",role:"img"},o.attributes));n.innerHTML=lv(s);const u=n.childNodes[0],c=e.attributes;for(let m=0;m<c.length;m++){const g=c.item(m),y=g.name;y!=="class"&&!u.hasAttribute(y)&&u.setAttribute(y,g.value)}const d=fs(t.icon),f=ps(u,d,new Set(a&&a.addedClasses),e),h=hs(u,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),p=re(R({},t),{status:"loaded",addedClasses:f,addedStyles:h});return u[dt]=p,e.parentNode&&e.parentNode.replaceChild(u,e),u}function sv(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function uv(e){return"data:image/svg+xml,"+sv(e)}function cv(e){return'url("'+uv(e)+'")'}const dv={display:"inline-block"},Zn={"background-color":"currentColor"},gs={"background-color":"transparent"},Ko={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Qo={"-webkit-mask":Zn,mask:Zn,background:gs};for(const e in Qo){const t=Qo[e];for(const r in Ko)t[e+"-"+r]=Ko[r]}function Zo(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function fv(e,t,r,n){const i=t.customisations,o=Xr(r,i),a=o.attributes,s=e[dt],u=ds(o.body,re(R({},a),{width:r.width+"",height:r.height+""})),c=fs(t.icon),d=ps(e,c,new Set(s&&s.addedClasses)),f=cv(u),h=R(R({"--svg":f,width:Zo(a.width),height:Zo(a.height)},dv),n?Zn:gs);i.inline&&(h["vertical-align"]="-0.125em");const p=hs(e,h,s&&s.addedStyles),m=re(R({},t),{status:"loaded",addedClasses:d,addedStyles:p});return e[dt]=m,e}let _r=!1;function pv(){_r||(_r=!0,setTimeout(()=>{_r&&(_r=!1,It())}))}function It(e,t=!1){const r=Object.create(null);function n(i,o){const{provider:a,prefix:s,name:u}=i,c=Ze(a,s),d=c.icons[u];if(d)return{status:"loaded",icon:d};if(c.missing.has(u))return{status:"missing"};if(o&&!Vy(i)){const f=r[a]||(r[a]=Object.create(null));(f[s]||(f[s]=new Set)).add(u)}return{status:"loading"}}(e?[e]:mr()).forEach(i=>{const o=typeof i.node=="function"?i.node():i.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function u(c,d,f){if(s||(s=!0,Kn(i)),c.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"){fv(c,d,R(R({},fr),f),p);return}}ms(c,d,f)}ov(o).forEach(({node:c,props:d})=>{const f=c[dt];if(!f){const{status:p,icon:m}=n(d.icon,!0);if(m){u(c,d,m);return}a=a||p==="loading",c[dt]=re(R({},d),{status:p});return}let h;if(Ky(f,d)){if(h=n(d.icon,f.name!==d.name),!h.icon){a=a||h.status==="loading",Object.assign(f,re(R({},d),{status:h.status}));return}}else{if(f.status!=="loading")return;if(h=n(d.icon,!1),!h.icon){f.status=h.status;return}}u(c,d,h.icon)}),i.temporary&&!a?cs(o):t&&a?us(o,!0):s&&i.observer&&Qn(i)});for(const i in r){const o=r[i];for(const a in o){const s=o[a];Fi(Array.from(s).map(u=>({provider:i,prefix:a,name:u})),pv)}}}function hv(e){const t=hr(e);t?It(t):It({node:e,temporary:!0},!0)}function ys(e,t,r=!1){const n=pr(e);if(!n)return null;const i=Nt(e),o=is(rn,t||{}),a=ms(document.createElement("span"),{name:e,icon:i,customisations:o},n);return r?a.outerHTML:a}function mv(){return"3.1.1"}function gv(e,t){return ys(e,t,!1)}function yv(e,t){return ys(e,t,!0)}function vv(e,t){const r=pr(e);if(!r)return null;const n=is(rn,t||{});return Xr(r,n)}function bv(e){e?hv(e):It()}if(typeof document!="undefined"&&typeof window!="undefined"){Hy();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"||!Hl(n))&&console.error(r)}catch(i){console.error(r)}})}setTimeout(()=>{Gy(It),It()})}function wv(e,t){Zl(e,t!==!1)}function xv(e){Zl(e,!0)}Xl("",ky);if(typeof document!="undefined"&&typeof window!="undefined"){Ql();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;es(r,i)||console.error(n)}catch(i){console.error(n)}}}}const Sv={getAPIConfig:tn,setAPIModule:Xl,sendAPIQuery:ns,setFetch:wy,getFetch:xy,listAPIProviders:vy},vs={_api:Sv,addAPIProvider:es,loadIcons:Fi,loadIcon:Ly,iconExists:sy,getIcon:uy,listIcons:oy,addIcon:ly,addCollection:Hl,replaceIDs:ql,calculateSize:zn,buildIcon:Xr,getVersion:mv,renderSVG:gv,renderHTML:yv,renderIcon:vv,scan:bv,observe:us,stopObserving:cs,pauseObserver:Wy,resumeObserver:Jy,enableCache:wv,disableCache:xv};try{self.Iconify===void 0&&(self.Iconify=vs)}catch(e){}const Cv=["xlink:href"],$v=["data-icon"],Tv=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 u;return(u=t.icon)==null?void 0:u.startsWith("svg-icon:")}),i=l.computed(()=>{var u;return l.unref(n)?`#icon-${(u=t.icon)==null?void 0:u.split("svg-icon:")[1]}`:t.icon}),o=l.computed(()=>{const{color:u,size:c}=t;return{fontSize:`${c}px`,height:"1em",color:u}}),a=l.computed(()=>{const{svgClass:u}=t;return`iconify ${u}`}),s=u=>me(this,null,function*(){if(l.unref(n))return;const c=l.unref(r);if(!c||(yield l.nextTick(),!u))return;const d=vs.renderSVG(u,{});if(d)c.textContent="",c.appendChild(d);else{const f=document.createElement("span");f.className="iconify",f.dataset.icon=u,c.textContent="",c.appendChild(f)}});return l.watch(()=>t.icon,u=>{s(u)}),(u,c)=>{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,Cv)],2)):(l.openBlock(),l.createElementBlock("span",{key:1,ref_key:"elRef",ref:r,class:l.normalizeClass(u.$attrs.class),style:l.normalizeStyle(o.value)},[l.createElementVNode("span",{class:l.normalizeClass(a.value),"data-icon":i.value},null,10,$v)],6))]),_:1},8,["color","size"])}}}),Ev=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",""),u=l.ref(s.value),c=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){u.value=p;return}h(p)}),l.watch(a,p=>{if(!s.value&&Array.isArray(p)&&p.length>0&&r.input){const m=c.value.map(y=>y.value);let g=null;p.forEach(y=>{m.indexOf(y)===-1&&(g=y)}),g!=null&&(u.value=g)}},{immediate:!0});function d(p){const v=p,{value:m,label:g}=v;return Lt(v,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=[...kt(a.value)],g=m.indexOf(u.value);u.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(c.value,(v,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${v.value}`},{ref_for:!0},d(v),{label:v.value,value:v.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.label||v.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:u.value||void 0,label:u.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":u.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(v=>v!=="default"),v=>({name:v,fn:l.withCtx(S=>[l.renderSlot(p.$slots,v,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),kv=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",""),u=l.ref(s.value),c=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){u.value=p;return}h(p)}),l.watch(a,p=>{!s.value&&p!=null&&r.input&&!c.value.some(m=>m.value===p)&&(u.value=p)},{immediate:!0});function d(p){const v=p,{value:m,label:g}=v;return Lt(v,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=u.value;u.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(c.value,(v,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${v.value}`},{ref_for:!0},d(v),{label:v.value,value:v.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.label||v.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:u.value||void 0,label:u.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":u.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(v=>v!=="default"),v=>({name:v,fn:l.withCtx(S=>[l.renderSlot(p.$slots,v,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),_v={class:"p-option__left"},Fv={class:"p-option__right"},Av={class:"p-option__left"},Ov={key:0,class:"p-option__right"},Pv={key:1,class:"p-option__right"},Rv=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}=Se(),u=l.computed(()=>s.getCurrentSize||"default");function c(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":c,ref_key:"el",ref:i}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(g,y)=>{var v,S;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.unref(fe)(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(B).trueArray(g.options)?g.options:[],($,V)=>(l.openBlock(),l.createBlock(h,l.mergeProps({key:`${V}-${$.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((v=g==null?void 0:g.class)!=null?v:"")},{default:l.withCtx(()=>[l.createElementVNode("span",_v,l.toDisplayString(g==null?void 0:g.label),1),l.createElementVNode("span",Fv,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:u.value,class:l.normalizeClass((S=g==null?void 0:g.class)!=null?S:"")},{default:l.withCtx(()=>[l.createElementVNode("span",Av,l.toDisplayString(g==null?void 0:g.label),1),e.showKey?(l.openBlock(),l.createElementBlock("span",Ov,l.toDisplayString(g==null?void 0:g.key),1)):l.createCommentVNode("",!0),e.showCode?(l.openBlock(),l.createElementBlock("span",Pv,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"])}}}),Mv="abTree",Dv=l.defineComponent({name:Mv,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(kt(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)}}),Iv=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,c=>o.value=c);const{wsCache:a}=Se(),s=l.computed(()=>a.getCurrentSize||"default");function u(c){n("update:modelValue",c)}return l.onMounted(()=>{n("fc.el",i.value)}),(c,d)=>{const f=l.resolveComponent("el-time-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i},c.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:u}),null,16,["modelValue","size"])}}}),Bv=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,c=>o.value=c);const{wsCache:a}=Se(),s=l.computed(()=>a.getCurrentSize||"default");function u(c){n("update:modelValue",c)}return l.onMounted(()=>{n("fc.el",i.value)}),(c,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"},c.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:u}),null,16,["modelValue","size"])}}}),jv={class:"ab-input-range"},Nv={key:0,class:"range-prefix"},Vv={key:3,class:"range-suffix"},Lv=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}=Xe(),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 u(h,p){const m=[...a.value];return m[h]=p===""?null:p,m}function c(h,p){o.value=u(h,p)}const{wsCache:d}=Se(),f=l.computed(()=>d.getCurrentSize||"default");return(h,p)=>{var y,v;const m=l.resolveComponent("el-text"),g=l.resolveComponent("el-input");return l.openBlock(),l.createElementBlock("div",jv,[e.prefix?(l.openBlock(),l.createElementBlock("span",Nv,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=>c(0,S)),onChange:p[1]||(p[1]=S=>r("change",u(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":(v=a.value[1])!=null?v:"",size:f.value,placeholder:l.unref(i)("max"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[2]||(p[2]=S=>c(1,S)),onChange:p[3]||(p[3]=S=>r("change",u(1,S)))},null,8,["model-value","size","placeholder","clearable"])],64)),e.suffix?(l.openBlock(),l.createElementBlock("span",Vv,l.toDisplayString(e.suffix),1)):l.createCommentVNode("",!0)])}}}),Hv={class:"ab-time-period w-full"},zv={class:"start-time"},Uv={key:0},qv={class:"end-time"},Yv=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()),v=y?Number(y[1]):NaN,S=y?Number(y[2]):NaN,$=y!=null&&y[3]?Number(y[3]):0;if(!y||v>24||S>59||$>59||v===24&&(S!==0||$!==0))throw new TypeError(`Invalid time "${g}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return v*3600+S*60+$}function s(g){const y=Math.floor(g/3600),v=Math.floor(g%3600/60),S=g%60,$=`${String(y).padStart(2,"0")}:${String(v).padStart(2,"0")}`;return S?`${$}:${String(S).padStart(2,"0")}`:$}const u=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]}),c=l.computed(()=>{var g,y,v,S,$,V;return[((g=i.value)==null?void 0:g[0])===""?null:(v=(y=i.value)==null?void 0:y[0])!=null?v:null,((S=i.value)==null?void 0:S[1])===""?null:(V=($=i.value)==null?void 0:$[1])!=null?V:null]}),d=l.computed(()=>{const[g,y]=u.value,v=c.value[0]===null?g:a(c.value[0]),S=c.value[1]===null?y:a(c.value[1]);if(c.value[0]!==null&&c.value[1]!==null&&v>S)throw new RangeError("timePeriod start value must be before or equal to end value.");return[v,S]});l.computed(()=>d.value.some(g=>g<u.value[0]||g>u.value[1]));const f=l.computed(()=>{const g=y=>Math.min(u.value[1],Math.max(u.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[c.value[0]!==null&&g[0]===f.value[0]?c.value[0]:s(g[0]),c.value[1]!==null&&g[1]===f.value[1]?c.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 v=l.resolveComponent("el-slider");return l.openBlock(),l.createElementBlock("div",Hv,[l.createElementVNode("div",zv,l.toDisplayString((S=c.value[0])!=null?S:"--:--"),1),o.value?(l.openBlock(),l.createElementBlock("div",Uv,"~")):(l.openBlock(),l.createBlock(v,{key:1,class:l.normalizeClass({"is-empty":c.value[0]==null&&c.value[1]==null}),"model-value":f.value,range:"",step:30,min:u.value[0],max:u.value[1],"format-tooltip":s,"format-value-text":s,"onUpdate:modelValue":p,onChange:m},null,8,["class","model-value","min","max"])),l.createElementVNode("div",qv,l.toDisplayString(($=c.value[1])!=null?$:"--:--"),1)])}}}),bs=Symbol("archbiz-upload-apis");function Gv(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()&&e!=="new")return e}function Xo(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 Wv={class:"ab-upload-file"},Jv={key:1,role:"alert"},Kv={class:"ab-upload-file__list"},Qv={key:0},Zv={key:1,role:"alert"},ws=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}=Xe(),a=hl(),s=l.inject(bs,void 0);function u(){var H;const M=(H=n.apis)!=null?H:s;if(!M)throw new Error("Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.");return M}u();const c=l.computed(()=>{var M;return n.disabled||n.readonly||((M=n.abFormInject)==null?void 0:M.readonly)===!0}),d=l.computed(()=>{var H;const M=n.abFormInject;return Gv(M!=null&&M.idField?(H=M.formValue)==null?void 0:H[M.idField]:void 0)}),f=l.ref([]),h=l.ref(""),p=l.ref(!1),m=l.ref(!1),g=new Set;let y=1,v=0,S=0,$,V;function P(M){var H,Y;return{businessType:(Y=n.idFieldTable)!=null?Y:(H=n.abFormInject)==null?void 0:H.idFieldTable,businessCode:n.businessCode,businessId:M}}function T(M){a.error(M instanceof Error?M.message:String(M)),i("error",M)}function E(){i("update:modelValue",f.value.flatMap(M=>M.url?[M.url]:[]))}function k(M){const H=M.name.includes(".")?M.name.slice(M.name.lastIndexOf(".")+1).toLowerCase():"";return{url:M.url,name:M.name,extension:H,fileId:M.fileId}}function N(M){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(M)}const q=M=>{if(f.value.length+S>=n.limit)return a.error(o("upload.tooMany")),!1;const H=M.name.includes(".")?M.name.slice(M.name.lastIndexOf(".")+1).toLowerCase():"";return n.fileType.length&&!n.fileType.some(Y=>Y.toLowerCase().replace(/^\./,"")===H)?(a.error(o("upload.invalidType")),!1):M.size>n.fileSize*1024*1024?(a.error(o("upload.tooLarge")),!1):(S++,!0)};function U(M){S=Math.max(0,S-1);const H=v,Y=l.reactive({uid:y++,name:M.file.name,status:"uploading"});f.value.push(Y);const ne=me(this,null,function*(){try{const ue=yield u().upload({file:M.file}),J=ue==null?void 0:ue.data;if(!J||J.id==null||typeof J.url!="string"||!J.url||typeof J.name!="string"||!J.name)throw new TypeError("Upload API must return data with id, name and url.");if(H!==v)return;Object.assign(Y,{fileId:J.id,url:J.url,name:J.name,size:J.size,status:"pending"}),E()}catch(ue){throw H===v&&(Y.status="failed",Y.error=ue instanceof Error?ue.message:String(ue)),ue}});return g.add(ne),ne.then(()=>{g.delete(ne),H===v&&d.value!==void 0&&C()},()=>{g.delete(ne)}),ne}const x=M=>T(M);function _(){return me(this,null,function*(){yield Promise.allSettled([...g]);const M=f.value.find(H=>H.status==="failed");if(M)throw new Error(M.error||o("upload.failed"))})}function F(M,H){return me(this,null,function*(){if(V&&(yield V),yield Promise.allSettled([...g]),H!==v||d.value!==M)return;const Y=f.value.filter(w=>w.status==="pending"&&w.fileId!=null);if(Y.length)try{if(yield u().attach(re(R({},P(M)),{fileIds:Y.map(w=>w.fileId),isCover:n.autoCover&&Y.length===1&&N(Y[0].name)?1:0})),H!==v||d.value!==M)return;Y.forEach(w=>{w.status="recent",w.error=void 0})}catch(w){throw H===v&&d.value===M&&Y.forEach(O=>{O.error=w instanceof Error?w.message:String(w)}),w}const ne=yield u().list(re(R({},P(M)),{pageSize:1e3}));if(!ne||!Array.isArray(ne.list))throw new TypeError("Upload list API must return a list array.");if(H!==v||d.value!==M)return;if(ne.list.some(w=>!w||w.fileId==null||typeof w.name!="string"||!w.name||typeof w.url!="string"||!w.url))throw new TypeError("Upload list entries must have fileId, name and url.");const ue=f.value.filter(w=>w.status!=="linked"&&w.status!=="recent"),J=ne.list.map(w=>({uid:y++,id:w.id,fileId:w.fileId,name:w.name,url:w.url,size:w.size,isCover:w.isCover,status:"linked"})),b=f.value.filter(w=>w.status==="recent"&&!J.some(O=>O.fileId===w.fileId));f.value=[...J,...b,...ue],h.value="",E()})}function A(){const M=d.value;if(M===void 0)return Promise.reject(new Error(o("upload.missingBusinessId")));if($)return $.then(()=>A());const H=F(M,v);return $=H,p.value=!0,H.then(()=>{$===H&&($=void 0,p.value=!1)},()=>{$===H&&($=void 0,p.value=!1)}),H}function C(){const M=v;A().catch(H=>{M===v&&(h.value=H instanceof Error?H.message:String(H),T(H))})}function I(){return me(this,null,function*(){yield _(),yield A()})}function D(){C()}function G(M){m.value=!0;const H=M();V=H,H.then(()=>{V===H&&(V=void 0,m.value=!1)},()=>{V===H&&(V=void 0,m.value=!1)}),H.catch(T)}function Q(M){G(()=>me(this,null,function*(){const H=v;if(M.status==="linked"&&d.value!==void 0||M.status==="recent"){const Y=d.value;if(Y===void 0||M.fileId==null)throw new Error(o("upload.missingBusinessId"));yield u().remove(re(R({},P(Y)),{fileId:M.fileId}))}H===v&&(f.value=f.value.filter(Y=>Y.uid!==M.uid),E(),i("reload"))}))}function Z(M){G(()=>me(this,null,function*(){const H=v;if(M.id==null)throw new Error(o("upload.missingBusinessId"));const Y=M.isCover?0:1;yield u().setCover(M.id,Y),H===v&&(M.isCover=Y,i("reload"))}))}return l.watch(()=>n.modelValue,M=>{const H=M!=null?M:[],Y=f.value,ne=[...Y],ue=H.map(J=>{const b=ne.findIndex(w=>w.url===J);return b>=0?ne.splice(b,1)[0]:{uid:y++,name:Xo(J),url:J,status:"linked"}});f.value=[...ue,...Y.filter(J=>J.status==="uploading"||J.status==="failed")]},{immediate:!0,deep:!0}),l.watch(d,(M,H)=>{var Y;H!==void 0&&M!==H&&(v++,$=void 0,p.value=!1,h.value="",f.value=((Y=n.modelValue)!=null?Y:[]).map(ne=>({uid:y++,name:Xo(ne),url:ne,status:"linked"}))),M!==void 0&&C()},{immediate:!0}),l.onBeforeUnmount(()=>{v++}),t({waitForUploads:_,waitForAssociations:I,retryAssociations:D}),(M,H)=>{const Y=l.resolveComponent("el-button"),ne=l.resolveComponent("el-upload"),ue=l.resolveComponent("el-link");return l.openBlock(),l.createElementBlock("div",Wv,[c.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ne,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(J=>`.${J.replace(/^\./,"")}`).join(","),"before-upload":q,"http-request":U,"on-error":x},l.createSlots({default:l.withCtx(()=>[l.createVNode(Y,{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",Jv,[l.createTextVNode(l.toDisplayString(h.value)+" ",1),c.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Y,{key:0,link:"",onClick:D},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1}))])):l.createCommentVNode("",!0),l.createElementVNode("ul",Kv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.value,J=>(l.openBlock(),l.createElementBlock("li",{key:J.uid,class:"ab-upload-file__item"},[l.createElementVNode("span",null,l.toDisplayString(J.name),1),J.status==="uploading"?(l.openBlock(),l.createElementBlock("span",Qv,l.toDisplayString(l.unref(o)("upload.uploading")),1)):l.createCommentVNode("",!0),J.error?(l.openBlock(),l.createElementBlock("span",Zv,l.toDisplayString(J.error),1)):l.createCommentVNode("",!0),J.url&&e.preEnabled?(l.openBlock(),l.createBlock(Y,{key:2,link:"",onClick:b=>i("preview",k(J))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.preview")),1)]),_:1},8,["onClick"])):l.createCommentVNode("",!0),J.url&&e.dowEnabled?(l.openBlock(),l.createBlock(ue,{key:3,href:J.url,target:"_blank",download:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.download")),1)]),_:1},8,["href"])):l.createCommentVNode("",!0),!c.value&&e.coverEnabled&&J.id!=null&&N(J.name)?(l.openBlock(),l.createBlock(Y,{key:4,disabled:p.value||m.value,link:"",onClick:b=>Z(J)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(J.isCover?l.unref(o)("upload.unsetCover"):l.unref(o)("upload.setCover")),1)]),_:2},1032,["disabled","onClick"])):l.createCommentVNode("",!0),!c.value&&J.status==="pending"&&J.error?(l.openBlock(),l.createBlock(Y,{key:5,link:"",onClick:D},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1})):l.createCommentVNode("",!0),!c.value&&e.delEnabled&&J.status!=="uploading"?(l.openBlock(),l.createBlock(Y,{key:6,disabled:p.value||m.value,link:"",onClick:b=>Q(J)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.delete")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)]))),128))])])}}}),Xv=[Tv,Ev,kv,Rv,Dv,Iv,Bv,Lv,Yv,ws],ea={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"},ta="datePicker",eb={name:ta,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce((e,t)=>(e[t]=$e(ta,{type:t.toLowerCase()}),e),{}),mergeProp(e){var r;const t=e.prop.props;t.valueFormat||(t.valueFormat=ea[(r=t.type)!=null?r:""]||ea.date)}},_n="hidden",tb={name:_n,maker:{[_n]:(e,t)=>$e(_n)("",e,t)},render(){return[]}},Ai="input",xs=["password","url","email","text","textarea"].reduce((e,t)=>(e[t]=$e(Ai,{type:t}),e),{});xs.idate=$e(Ai,{type:"date"});const rb={name:Ai,maker:xs,mergeProp(e){const{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},Fr={name:"inputNumber"},nb="textarea",ib={name:nb,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)}},ra="slider",ob={name:ra,maker:{sliderRange:$e(ra,{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}},Fn="timePicker",ab={name:Fn,maker:{time:$e(Fn,e=>e.props.isRange=!1),timeRange:$e(Fn,e=>e.props.isRange=!0)},mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},lb={name:"FcRow",render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},sb="select",Ss={name:sb,toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?kt(e):e}},ub=re(R({},Ss),{name:"treeSelect"}),cb={name:"text",render(e,t){const r=t.$handle.api.getValue(t.field),n=hi(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 Lh(t.prop.link)?l.h(yl,{link:t.prop.link,value:r,row:t.$handle.api.formData()},{default:()=>o}):l.h(L.ElText,null,{default:()=>o})}},Cs={name:"radio"},db=re(R({},Cs),{name:"checkbox"}),fb={name:"switch"},pb={name:"cascader"},hb={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?ol.getContrast(a):fh.black},title:a},String(o!=null?o:""))}return t.$render.defaultRender(t,e)}},mb=[eb,tb,rb,Fr,re(R({},Fr),{name:"number"}),re(R({},Fr),{name:"inputCurrency"}),re(R({},Fr),{name:"inputPercent"}),cb,ib,ob,ab,lb,Ss,ub,Cs,db,fb,pb,hb],se="el",gb={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 yb(){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:Ar}=Xe(),vb=new Set(["input","inputnumber","textarea","password","inputtag"]),na=new Set(["select","datepicker","timepicker","treeselect","cascader","autocomplete"]);function bb(e){return e.type==="tooltip"}function ia(e,t){fe(e,t)&&B.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function et(e){return e===!1}function wb(e,t){fe(e,t)&&!B.Object(e[t])&&(e[t]={show:!!e[t]})}function An(e){const t=R({},e);return delete t.children,t}const xb={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=>{wb(e,t)}),e},tidyRule({prop:e}){return ia(e,"title"),ia(e,"info"),e},mergeProp(e){var s,u,c,f,h,p,m,g;const d=jl(R(R({},e.rule),e.prop),{includeChildren:((c=(u=(s=this.$handle)==null?void 0:s.vm)==null?void 0:u.props)==null?void 0:c.readonly)!==!0}),{children:r}=d,n=Lt(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((vb.has(i)||na.has(i))&&o!==void 0&&o!==null&&o!==""){(g=e.prop).props||(g.props={}),this.$handle.api.getLocale();const y=na.has(i)?Ar("pleaseSelect"):Ar("pleaseEnter");fe(e.prop.props,"placeholder")||(e.prop.props.placeholder=`${y}${zt(o)}`);const v=String(e.prop.props.type||"").toLowerCase();(i==="datepicker"||i==="timepicker")&&(v.endsWith("range")||e.prop.props.isRange===!0)&&(fe(e.prop.props,"startPlaceholder")||(e.prop.props.startPlaceholder=`${y}${Ar("rangeStart")}${zt(o)}`),fe(e.prop.props,"endPlaceholder")||(e.prop.props.endPlaceholder=`${y}${Ar("rangeEnd")}${zt(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]=tt([this.options[y]||{},e.prop[y]||{}],a[y])})},getDefaultOptions(){return yb()},update(){const e=this.options.form,t=R({},e);delete t.fieldWidth,this.rule={props:R({},t),on:{submit:r=>{r.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:r}=this,n=this.options.form;X(this.rule,{key:e,ref:t,class:[n.className,n.class,"ab-form",this.$handle.preview?"is-preview":""]}),X(this.rule.props,{model:r.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,et(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:u,col:c}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;const f=(B.Undef(r.wrap.show)?!e.input:et(r.wrap.show))?t:this.$r(tt([r.wrap,re(R({props:re(R({labelWidth:a===void 0?a:zt(a),label:o?r.title.title:void 0},An(r.wrap||{})),{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,"ab-form-item")},s?{style:{"--ab-field-width":zt(s)}}:{}),{key:`${n}fi`,ref:e.wrapRef,type:"formItem"})]),R({default:()=>t},o?{label:()=>this.makeInfo(r,n,e)}:{}));return u===!0||et(c)||et(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||et(t.show))},makeInfo(e,t,r){var d,f,h,p,m,g;const n=R({},e.title),i=R({},e.info),o=bb(i),a=this.options.form,s=this.getSlot("title"),u=[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(!et(i.show)&&(i.info||i.native)&&!et(i.icon)){const y={type:i.type||"popover",props:An(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 v="content";i.info&&!fe(y.props,v)&&(y.props[v]=(g=(m=r.refRule)==null?void 0:m.__$info)==null?void 0:g.value),u[i.align!=="left"?"unshift":"push"](this.$r(tt([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 c=tt([n,{props:An(n),key:`${t}tit`,class:"ab-form-title",type:n.type||"span",on:{click:(...y)=>{this.$handle.targetHook(r,"titleClick",{args:y})}}}]);return delete c.props.show,delete c.props.title,delete c.props.native,this.$r(c,u)},makeCol(e,t,r){const n=R({},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(et(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),et(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=R({},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=R({},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])}},_t={};Sb(_t);Cb(_t);$b(_t);Tb(_t);Eb(_t);kb(_t);function Sb(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 Cb(e){e.treeSelectMultiple=$e("treeSelect",{multiple:!0})}function $b(e){const t="select",r="multiple";e.selectMultiple=$e(t,{[r]:!0}),e.selectOne=$e(t,{[r]:!1})}function Tb(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 Eb(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 kb(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 oa(e,t){return B.Boolean(e)?e={show:e}:!B.Undef(e)&&!B.Object(e)&&(e={show:t}),e}function _b(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"?Ye(r):t.getCtx(r);if(!s){i(null),n&&n(null);return}const u=t.subForm[s.id],c=[t.$manager.validateField(s.id)];kt(u).filter(d=>!d.isScope).forEach(d=>{c.push(d.validate())}),Promise.all(c).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=oa(t.options.submitBtn,!0);X(n,r),t.options.submitBtn=n,e.refreshOptions()},resetBtnProps:(r={})=>{let n=oa(t.options.resetBtn,!1);X(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(()=>{B.Function(r)&&ee(()=>r(s,e)),B.Function(t.options.onSubmit)&&ee(()=>t.options.onSubmit(s,e)),t.vm.emit("submit",s,e),i(s)}).catch(()=>{})}).catch((...s)=>{B.Function(n)&&ee(()=>n(e,...s)),o(...s)})})}}}const $s={name:"required",load(e,t,r){const n=Fb(e.getValue());let i;if(n.required===!1)e.clearProp(),r==null||r.clearValidateState([t==null?void 0:t.field]);else{const o=R({required:!0,validator(s,u,c){a(),B.empty(u)?c(o.message):c()}},n),a=()=>{var u;const s=(u=t==null?void 0:t.__fc__.refRule.__$title)==null?void 0:u.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 c=n.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);c&&(o.message=r==null?void 0:r.t(c[1],{title:s}))}};a(),e.getProp().validate=[o]}r==null||r.sync(t)},watch(e,t,r){$s.load(e,t,r)}};function Fb(e){return B.Boolean(e)?{required:e}:B.String(e)?{message:e}:B.Undef(e)?{required:!1}:B.Function(e)?{validator:e}:B.Object(e)?e:{}}function Ab(e,t){const r=e;r.componentAlias(gb),Xv.forEach(o=>{const a=o;r.component(a.name,a)}),r.register($s),mb.forEach(o=>{r.parser(o)});const n=_t;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 Ob(){return Bl({ui:"element-plus",version:"0.1.1",manager:xb,extendApi:_b,install:Ab,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}const Ts=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"])}}}),Pb=(e,t)=>{e.component("ab-drawer",Ts)};var Oi=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,Mb=Object.getOwnPropertyNames,Db=Object.prototype.hasOwnProperty,Ib=(e,t)=>{for(var r in t)Oi(e,r,{get:t[r],enumerable:!0})},Bb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mb(t))!Db.call(e,i)&&i!==r&&Oi(e,i,{get:()=>t[i],enumerable:!(n=Rb(t,i))||n.enumerable});return e},jb=e=>Bb(Oi({},"__esModule",{value:!0}),e),Es={};Ib(Es,{default:()=>Vb});var Nb=jb(Es),Vb={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 Lb=jt(Nb);var Pi=Object.defineProperty,Hb=Object.getOwnPropertyDescriptor,zb=Object.getOwnPropertyNames,Ub=Object.prototype.hasOwnProperty,qb=(e,t)=>{for(var r in t)Pi(e,r,{get:t[r],enumerable:!0})},Yb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zb(t))!Ub.call(e,i)&&i!==r&&Pi(e,i,{get:()=>t[i],enumerable:!(n=Hb(t,i))||n.enumerable});return e},Gb=e=>Yb(Pi({},"__esModule",{value:!0}),e),ks={};qb(ks,{default:()=>Jb});var Wb=Gb(ks),Jb={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 Kb=jt(Wb);Mr.VxeUI.setI18n("zh-CN",Lb);Mr.VxeUI.setI18n("en-US",Kb);const Qb=(e,t)=>{e.component("ab-drawer",Ts),e.component("ab-table",Vl),e.component("ab-table-detail",ml);const{isZhCN:r}=Se();r()?Mr.VxeUI.setLanguage("zh-CN"):Mr.VxeUI.setLanguage("en-US")},Zb={class:"ab-detail__title"},Xb=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}=Xe(),a=lr.useRoute(),s=l.ref(),u=l.ref({}),c=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=u.value)==null||x.refresh()},v=()=>me(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=u.value)==null||x.refresh()},$=()=>N(),V=l.computed(()=>{let x=st(g.value.find(_=>_.type!==de.OPERATE&&_.field===de.OPERATE));return x||(x={type:"ElRow",field:de.OPERATE,title:"操作",width:260,fixed:"right",children:[]}),x.children=wt(x==null?void 0:x.children,_=>_.field!==de.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:v}},{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}),P=l.computed(()=>l.reactive(wt(g.value,x=>x.type!==de.OPERATE&&x.field!==de.OPERATE).map(x=>zf(x,(_,F)=>{if(F==="component"&&_&&typeof _=="object")return l.markRaw(l.toRaw(_))})))),T=l.ref(!1),E=()=>me(this,null,function*(){T.value=!0,console.log("abDetail.init: ",h==null?void 0:h.value,V.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)=>me(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=st(x)||{};(F=i.rule)==null||F.forEach(I=>{const D=typeof I.getRule=="function"?I.getRule():I;D.field&&D.field!==de.OPERATE&&typeof(C==null?void 0:C[D.field])=="undefined"&&typeof D.edit=="undefined"&&typeof D.itemRender=="undefined"&&(C[D.field]="")}),d.value=C}yield l.nextTick(),(A=u.value)==null||A.refresh(),n("open",d.value),T.value=!1}),N=()=>{f.value=!0,d.value={},n("close")};return t({open:k,close:N,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):N(),reload:()=>me(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",Zb,l.toDisplayString(m.value),1),l.withDirectives(l.createVNode(Zr,{class:"ab-detail__opr","permi-prefix":e.permiPrefix,rule:V.value,"model-value":d.value,api:c.value,"onUpdate:api":_[0]||(_[0]=I=>c.value=I),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:P.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=I=>d.value=I),api:u.value,"onUpdate:api":_[2]||(_[2]=I=>u.value=I),"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)}}}),ew=(e,t)=>{e.component("ab-detail",Xb)},tw={key:0,class:"ab-toolbar__title"},rw={class:"ab-toolbar__title"},nw=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=lr.useRoute(),{wsCache:o}=Se(),a=l.computed(()=>o.getCurrentSize||"default"),s=l.computed(()=>pl(a.value));l.useModel(e,"vertical");const u=l.ref(!1),c=l.computed(()=>{var g;if(!r.rule||Array.isArray(r.rule)&&!((g=r.rule)!=null&&g.length))return;const p=st(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:u.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",tw,[l.renderSlot(p.$slots,"icon"),l.createTextVNode(" "+l.toDisplayString(e.title),1)])):l.renderSlot(p.$slots,"buttons",{},()=>{var y,v;return[l.createElementVNode("div",rw,l.toDisplayString(((v=(y=l.unref(i))==null?void 0:y.meta)==null?void 0:v.title)||""),1)]},void 0,1)]),tools:l.withCtx(()=>[l.renderSlot(p.$slots,"tools"),l.createVNode(Zr,{"permi-prefix":e.permiPrefix,rule:c.value,plain:""},null,8,["permi-prefix","rule"])]),_:3},8,["class-name","size","loading","export","refresh","refresh-options","custom"])}}}),iw=(e,t)=>{e.component("ab-toolbar",nw)},nn=Ob();typeof window!="undefined"&&(window.abForm=nn);const ow=nn.maker;function aw(e,t){t!=null&&t.upload&&e.provide(bs,t.upload),Ms(e,{AbForm:nn}),ah(e),Pb(e),Qb(e),ew(e),iw(e)}exports.AbForm=nn;exports.AbTable=Vl;exports.AbTableDetail=ml;exports.AbTableEnum=de;exports.AbUploadFile=ws;exports.CACHE_KEY=at;exports.en=Va;exports.getCurrentSize=Ga;exports.getLang=cr;exports.getTheme=Ua;exports.getUser=Ja;exports.isDark=qa;exports.isZhCN=xt;exports.maker=ow;exports.setCurrentSize=Ya;exports.setLang=Ha;exports.setTheme=za;exports.setUser=Wa;exports.setupArchbizKit=aw;exports.useCache=Se;exports.zhCN=La;
9
+ rule: `+JSON.stringify(typeof n.getRule==`function`?n.getRule():n):``)}function Vs(e,t){console.error(Bs(`err`,e,t))}function Hs(e){Vs(e instanceof Error?e.toString():String(e)),console.error(e)}var Us=[`props`],Ws=[`class`,`style`,`directives`],Gs=[`on`,`hook`],Ks=`[[T-FORM-PREFIX-`,qs=`-T-FORM-SUFFIX]]`;function Js(e){return Function(`return ${e}`)()}function Ys(e,t){let n=Rs(Array.isArray(e)?[]:{},e,!0),r=JSON.stringify(n,function(e,t){var n;if(typeof t==`object`&&t&&Reflect.get(t,`_isVue`)===!0)return;if(typeof t!=`function`)return t;let r=t;if(r.__json)return r.__json;let i=(n=r.__origin)==null?t:n;if(!r.__emit)return`${Ks}${i}${qs}`},t);if(r===void 0)throw TypeError(`Unable to serialize the provided value as JSON.`);return r}function Xs(e,t){if(typeof e!=`string`||e.length<=4)return e;let n=e.trim(),r=!1;try{if(n.indexOf(qs)>0&&n.indexOf(Ks)===0)n=n.replace(qs,``).replace(Ks,``),r=!0;else if(n.indexOf(`$FN:`)===0)n=n.substring(4),r=!0;else if(n.indexOf(`$EXEC:`)===0)n=n.substring(6),r=!0;else if(n.indexOf(`$GLOBAL:`)===0){let t=n.substring(8),r=function(...e){let n=e[0].api.getGlobalEvent(t);if(typeof n==`function`)return n.apply(this,e)};return r.__json=e,r.__inject=!0,r}else if(n.indexOf(`$FNX:`)===0){let t=Js(`function($inject){\n${n.substring(5)}\n}`);return t.__json=e,t.__inject=!0,t}else(!t&&n.indexOf(`function `)===0&&n!==`function `||!t&&n.indexOf(`function(`)===0&&n!==`function(`)&&(r=!0);if(!r)return e;let i;try{i=Js(n)}catch(e){i=Js(`function ${n}`)}return i.__json=e,i}catch(e){Vs(`解析失败:${n}\n\nerr: ${String(e)}`);return}}function Zs(e,t){return JSON.parse(e,function(e,n){return typeof n==`string`?Xs(n,t):n})}function Qs(e){"@babel/helpers - typeof";return Qs=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qs(e)}function $s(e,t){if(Qs(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Qs(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ec(e){var t=$s(e,`string`);return Qs(t)==`symbol`?t:t+``}function tc(e,t,n){return(t=ec(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nc(Object(n),!0).forEach(function(t){tc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ic=(e,t={},n={})=>{let r=[...Us,...n.normal||[]],i=[...Ws,...n.array||[]],a=[...Gs,...n.functional||[]],o=n.props||[];return e.reduce((e,t)=>{for(let n in t)if(e[n]){if(o.indexOf(n)>-1)e[n]=ic([t[n]],e[n]);else if(r.indexOf(n)>-1)e[n]=rc(rc({},e[n]),t[n]);else if(i.indexOf(n)>-1){let r=e[n]instanceof Array?e[n]:[e[n]],i=t[n]instanceof Array?t[n]:[t[n]];e[n]=[...r,...i]}else if(a.indexOf(n)>-1)for(let r in t[n])if(e[n][r]){let i=e[n][r]instanceof Array?e[n][r]:[e[n][r]],a=t[n][r]instanceof Array?t[n][r]:[t[n][r]];e[n][r]=[...i,...a]}else e[n][r]=t[n][r];else if(n===`hook`)for(let r in t[n])e[n][r]?e[n][r]=ac(e[n][r],t[n][r]):e[n][r]=t[n][r];else e[n]=t[n]}else e[n]=r.indexOf(n)>-1||a.indexOf(n)>-1||o.indexOf(n)>-1?rc({},t[n]):i.indexOf(n)>-1?t[n]instanceof Array?[...t[n]]:typeof t[n]==`object`?rc({},t[n]):t[n]:t[n];return e},t)},ac=(e,t)=>function(...n){e&&e.apply(this,n),t&&t.apply(this,n)};function oc(e,t){let n=null;return function(...r){n!==null&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function sc(e,t,n){let r=e,i;return(t||``).split(`.`).forEach(e=>{i&&(r[i]&&typeof r[i]==`object`||(r[i]={}),r=r[i]),i=e}),r[String(i)]=n,r}function K(e,...t){return(Object.assign||function(e,...t){for(let n of t)for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&U(e,t,Reflect.get(n,t));return e})(e,...t)}function cc(e){return typeof e!=`object`||!e?e:Array.isArray(e)?[...e]:rc({},e)}function lc(e=new Map){let t={$on(t,n){let r=e.get(t);r&&r.push(n)||e.set(t,[n])},$once(e,n){n._once=!0,t.$on(e,n)},$off(t,n){let r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},$emit(n,...r){(e.get(n)||[]).slice().forEach(e=>{`_once`in e&&e._once&&(t.$off(n,e),delete e._once),e(...r)}),(e.get(`*`)||[]).slice().forEach(e=>{e(n,r)})}};return t}function uc(e){return e&&typeof e==`object`&&typeof e.then==`function`}function dc(e){return uc(e)?e:Promise.resolve(e)}function fc(e){return Array.isArray(e)?e:e==null||e===``?[]:[e]}function q(e){return pc(e==null?void 0:e.replace(/(-[a-z])/g,function(e){return e.replace(`-`,``).toLocaleUpperCase()}))}function pc(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function mc(e){return e?typeof e==`object`?JSON.stringify(e,null,2):String(e):``}var hc=0;function gc(){let e=370+ ++hc;return`F`+Math.random().toString(36).substr(3,3)+Number(`${Date.now()}`).toString(36)+e.toString(36)+`c`}function _c(e,t,n={}){let{valueField:r=`value`,childrenField:i=`children`}=n;for(let a of e){if(a[r]===t)return a;if(Array.isArray(a[i])){let e=_c(a[i],t,n);if(e)return e}}}var vc,yc={transparent:`rgba(1, 1, 1, 0)`,green:`#45b787`,darkGreen:`#21532fff`,blue:`#6e9bc5`,darkBlue:`#2775b6`,red:`#F26666`,darkRed:`#D95970`,brown:`#ECD2B9`,darkBrown:`#BF9D8A`,yellow:`#ECDEC0`,darkYellow:`#D0AC57`,lightGray:`#e0e0e0`,gray:`#beb6b6`,darkGray:`#918883`,white:`#F2F2F2`,darkWhite:`#ececec`,lightBlack:`#2E3032`,black:`#182327`,blackAlpha5:`rgba(0, 0, 0, 0.5)`},bc={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},xc={h:0,s:0,l:0},Sc={h:0,s:0,l:0};function Cc(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var wc=/^#([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*\)/;vc=Symbol.iterator;var Tc=class e{constructor(e,t,n,r){return tc(this,`isColor`,!0),tc(this,`r`,1),tc(this,`g`,1),tc(this,`b`,1),tc(this,`a`,1),t===void 0&&n===void 0?this.set(e):this.setRGBA(e,t,n,r)}static isColor(e){return typeof e==`string`?wc.test(e):typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=16777215&&e.toString(6).length===6}static getRandomStyle(e){return e?kc.random().setA(e).getStyle():kc.random().getStyle()}static getDarken(e,t=.8){return kc.set(e).getHSL(Ac),kc.setHSL(Ac.h,Ac.s,Ac.l*t).getStyle()}static getLighten(e,t=1.2){return this.getDarken(e,t)}static getContrast(e){return kc.set(e),kc.getContrastString()}static getArray(e){return kc.set(e).toArray()}static getComplementary(e){return kc.set(e),kc.getComplementaryString()}static getMoreTransparent(e,t){return kc.set(e).setA(t).getStyle()}set(e){return e&&e.isColor?this.copy(e):typeof e==`number`?this.setHex(e):typeof e==`string`&&this.setStyle(e),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(e){return this.r=e,this.g=e,this.b=e,this.a=1,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this.a=1,this}setR(e){return this.r=e,this}setG(e){return this.g=e,this}setB(e){return this.b=e,this}setA(e){return this.a=e,this}setRGB(e,t,n){return this.setRGBA(e,t,n,this.a)}setRGBA(e,t,n,r=1){return this.r=e,this.g=t,this.b=n,this.a=r,this}setHSL(e,t,n,r=1){if(e=Dc(e,1),t=Ec(t,0,1),n=Ec(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Cc(i,r,e+1/3),this.g=Cc(i,r,e),this.b=Cc(i,r,e-1/3)}return this.a=r,this}setStyle(e){let t;if(t=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e,n=t[1],r=t[2];switch(n){case`rgb`:case`rgba`:if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,this.a=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,this.a=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0),this;break;case`hsl`:case`hsla`:if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){let t=parseFloat(e[1])/360,n=parseInt(e[2],10)/100,r=parseInt(e[3],10)/100,i=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0);return this.setHSL(t,n,r,i)}}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){let e=t[1],n=e.length;if(n===3)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this.a=1,this;if(n===6)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this.a=1,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=bc[e.toLowerCase()];return t===void 0?console.warn(`Color: Unknown color `+e):this.setHex(t),this}clone(){return new e(this.r,this.g,this.b,this.a)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}getRGB(t=new e){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new e){let n=this.a,r=n*this.r+(1-n)*t.r,i=n*this.g+(1-n)*t.g,a=n*this.b+(1-n)*t.b;return new e(r,i,a)}getHex(){return Ec(this.r*255,0,255)<<16^Ec(this.g*255,0,255)<<8^(Ec(this.b*255,0,255)|0)}getHSL(e){let t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),a=Math.min(t,n,r),o=0,s,c=(a+i)/2;if(a===i)o=0,s=0;else{let e=i-a;switch(s=c<=.5?e/(i+a):e/(2-i-a),i){case t:o=(n-r)/e+(n<r?6:0);break;case n:o=(r-t)/e+2;break;case r:o=(t-n)/e+4}o/=6}return e.h=o,e.s=s,e.l=c,e}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 e=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return e+=(255-e)*(255-this.a*255)/255,e}getContrastString(){return this.getBrightness()>125?`#2f2f2f`:`#f2f2f2`}getComplementary(t=new e){let n=this.toArray(),r=[0,0,0,1];for(let e=0;e<n.length;e++)if(e<3)r[e]=1-n[e];else if(e===3)n[e]>1||n[e]<=0?r[e]=1:r[e]=Math.max(Math.min(parseFloat(n[e].toFixed(2)),1),0);else continue;return t.setRGBA(r[0],r[1],r[2],parseFloat(r[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(t===void 0||t>=1)return this.getHexString();let n=this.getRGBByBg(),r=n.r*t+(1-t),i=n.g*t+(1-t),a=n.b*t+(1-t);return new e(r,i,a).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(e,t,n){return this.getHSL(xc),xc.h+=e,xc.s+=t,xc.l+=n,this.setHSL(xc.h,xc.s,xc.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(xc),e.getHSL(Sc);let n=Oc(xc.h,Sc.h,t),r=Oc(xc.s,Sc.s,t),i=Oc(xc.l,Sc.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this.a=e[t+3],this}toArray(e=[0,0,0,0],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e[t+3]=this.a,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),e.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[vc](){yield this.r,yield this.g,yield this.b}},Ec=(e,t,n)=>Math.max(t,Math.min(n,e)),Dc=(e,t)=>(e%t+t)%t,Oc=(e,t,n)=>(1-n)*e+n*t,kc=new Tc,Ac={h:0,s:0,l:0};function jc(){let e=window.localStorage.getItem(`user`),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function Mc(e,t){let n=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(n=Pc(e)),t&&t.length>0&&(n=n||Fc(t)),n)}var Nc=`*:*:*`,Pc=(e=[])=>{var t;let n=jc();return(n==null||(t=n.permissions)==null?void 0:t.has(Nc))||e.some(e=>{var t;return n==null||(t=n.permissions)==null?void 0:t.has(e)})};function Fc(e){if(e&&e instanceof Array&&e.length>0){let t=e,n=jc();return!!((n==null?void 0:n.roles)||[]).some(e=>e===`super_admin`||t.includes(e))}return console.error(`permission.hasRole`),!1}var Ic=o(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(n,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,g={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(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),Lc=o(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(n,(function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms;return f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Rc=o(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(n,(function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`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(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),zc=o(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(n,(function(){"use strict";return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),`day`)},i=t.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,i,a,o,s=r(this),c=(t=this.isoWeekYear(),i=this.$u,a=(i?n.utc:n)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(c,`week`)+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):a.bind(this)(e,t)}}}))})),Bc=o(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(n,(function(){"use strict";var e={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`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch(e){return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),J=c(Ic(),1);Lc();var Vc=c(Rc(),1),Hc=c(zc(),1),Uc=c(Bc(),1),Wc=ms()===`zh-cn`;J.default.extend(Hc.default),J.default.extend(Vc.default),J.default.extend(Uc.default);function Gc(e){return e===void 0||e===`undefined`||e===`null`||e===null||e===``||isNaN(e)}function Kc(e){if(Gc(e))return e;let t=``;return t=Wc?Intl.NumberFormat(`zh-CN`,{style:`currency`,currency:`CNY`}).format(e):Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e),t}function qc(e){return Gc(e)?e:(Math.round(e*100)/100).toLocaleString()}function Jc(e){return Gc(e)?e:Math.round(e*100)/100+` %`}function Y(e,t=`YYYY-MM-DD`){if(e==null||e===``)return e;let n=(0,J.default)(e);return n.isValid()?n.format(t):e}function Yc(e,t,n=`label`,r){let i=[];if(Array.isArray(t)&&!t.length)return``;if(Array.isArray(t))for(let e=0,n=t.length;e<n;e++)t[e]=String(t[e]).trim().normalize();else t=String(t).trim().normalize();if(!(e!=null&&e.length))return Gc(t)?``:t;let a=e=>!r||!Array.isArray(r)||!(r!=null&&r.length)||r.some(t=>!t||typeof t!=`object`||Object.entries(t).every(([t,n])=>{let r=e==null?void 0:e[t];return n==null?r===n:Array.isArray(n)?n.some(e=>String(r)===String(e)):Array.isArray(r)?r.some(e=>String(e)===String(n)):String(r)===String(n)}));return Array.isArray(t)?i.push(...$o(e,e=>t.includes(String(e.value))&&a(e))):i.push(...$o(e,e=>(e.value===t||String(e.value)===String(t))&&a(e))),i!=null&&i.length?ls(ja(ts(i,n))).join(`、`):Array.isArray(t)||Gc(t)?``:t}var Xc=({cellValue:e}={},t=`YYYY-MM-DD HH:mm`)=>Y(e,t),Zc=({cellValue:e}={},t=`YYYY`)=>Y(e,t),Qc=({cellValue:e}={},t=`Q`)=>e==null||e===``||!(0,J.default)(e).isValid()?e:hs()?Y(e,`YYYY`)+`年`+Y(e,t)+`季度`:`Quarter `+Y(e,t)+`, `+Y(e,`YYYY`),$c=({cellValue:e}={},t=`MM`)=>e==null||e===``||!(0,J.default)(e).isValid()?e:hs()?Y(e,`YYYY`)+`年 `+Y(e,t)+`月`:Y(e,t)+`/`+Y(e,`YYYY`),el=({cellValue:e}={},t=`W`)=>{if(e==null||e===``)return e;let n=typeof e==`string`&&/^(\d{4})-(\d{1,2})(?:st|nd|rd|th|周)$/i.exec(e);if(!n&&!(0,J.default)(e).isValid())return e;let r=n?n[1]:Y(e,`GGGG`),i=n?n[2]:Y(e,t);return hs()?r+`年第`+i+`周`:`Week `+i+`, `+r},tl=({cellValue:e,itemValue:t}={})=>(e==null&&(e=t),Gc(e)?e:qc(e)),nl=({cellValue:e}={})=>Gc(e)?e:Jc(e),rl=({cellValue:e,itemValue:t}={})=>(Gc(e)&&(e=t),Gc(e)?e:Kc(e)),il=new Map([[`radio`,sl],[`checkbox`,sl],[`switch`,cl],[`treeSelect`,ll],[`cascader`,dl],[`inputNumber`,()=>typeof tl==`function`?tl:void 0],[`inputCurrency`,()=>typeof rl==`function`?rl:void 0],[`inputPercent`,()=>typeof nl==`function`?nl:void 0],[`datePicker`,pl],[`timePicker`,ml]]);function al(e){var t;if(typeof e.formatter==`function`)return V(V({},e),{},{formatter:e.formatter});let n=il.get((t=e.type)==null?``:t),r;return n?r=n(e):Array.isArray(e.options)&&e.options.length>0&&(r=hl(e)),V(V({},e),{},{formatter:r})}function ol(e,t){if(typeof e!=`string`||typeof t!=`string`||t===`YYYY-wo`)return e;let n=t===`x`||t===`X`?(0,J.default)(Number(e)*(t===`X`?1e3:1)):(0,J.default)(e,t,!0);return n.isValid()?n:e}function sl(e){var t;let n=((t=e.props)==null?void 0:t.options)||e.options;return({cellValue:e})=>e==null||e===``?``:(Array.isArray(e)?e:[e]).map(e=>{var t,r;let i=Array.isArray(n)?n.find(t=>(t==null?void 0:t.value)===e):void 0;return(t=(r=i==null?void 0:i.label)==null?e:r)==null?``:t}).join(`、`)}function cl(e){return({cellValue:t})=>{var n;let{activeValue:r=!0,inactiveValue:i=!1,activeText:a,inactiveText:o}=(n=e.props)==null?{}:n;return t===r?a||(hs()?`开启`:`On`):t===i?o||(hs()?`关闭`:`Off`):t==null?``:t}}function ll(e){var t,n,r,i,a,o,s;let c=(t=e.props)==null?{}:t,l=(n=c.props)==null?{}:n,u=e.optionsTo===`props.data`&&Array.isArray(e.options)?e.options:c.data,d=(r=(i=(a=l.value)==null?c.nodeKey:a)==null?c.valueKey:i)==null?`value`:r,f=(o=l.label)==null?`label`:o,p=(s=l.children)==null?`children`:s;return({cellValue:e})=>e==null||e===``?``:(Array.isArray(e)?e:[e]).map(e=>{var t;let n=Array.isArray(u)?_c(u,e,{valueField:d,childrenField:p}):void 0;return(t=n==null?void 0:n[f])==null?e:t}).join(`、`)}function ul(e,t,n,r){for(let i of e){if(ns(i[n],t))return[i];let e=i[r];if(Array.isArray(e)){let a=ul(e,t,n,r);if(a)return[i,...a]}}}function dl(e){var t,n,r,i,a,o;let s=(t=e.props)==null?{}:t,c=(n=s.props)==null?{}:n,l=e.optionsTo===`props.options`&&Array.isArray(e.options)?e.options:s.options,u=(r=c.value)==null?`value`:r,d=(i=c.label)==null?`label`:i,f=(a=c.children)==null?`children`:a,p=Array.isArray(l)?l:[],m=(o=s.separator)==null?` / `:o,h=s.showAllLevels!==!1;function g(e){let t;if(c.emitPath===!1){let n=ul(p,e,u,f);t=n?n.map(e=>{var t;return(t=e[d])==null?e[u]:t}):[e]}else{let n=Array.isArray(e)?e:[e],r=p;t=n.map(e=>{var t;let n=r.find(t=>ns(t[u],e)),i=n==null?void 0:n[f];return r=Array.isArray(i)?i:[],(t=n==null?void 0:n[d])==null?e:t})}return(h?t:t.slice(-1)).join(m)}return({cellValue:e})=>e==null||e===``?``:c.multiple===!0?(Array.isArray(e)?e:[e]).map(g).join(`、`):g(e)}var fl={year:Zc,years:Zc,yearrange:Zc,quarter:Qc,quarters:Qc,quarterrange:Qc,month:$c,months:$c,monthrange:$c,week:el,datetime:Xc,datetimerange:Xc};function pl(e){var t,n;let r=(t=(n=e.props)==null?void 0:n.type)==null?`date`:t,i=t=>{var n,i,a,o;if(t==null||t===``)return``;let s=ol(t,(n=e.props)==null?void 0:n.valueFormat);return(i=e.props)!=null&&i.format?Y(s,e.props.format):(a=(o=fl[r])==null?void 0:o.call(fl,{cellValue:s}))==null?Y(s):a};return({cellValue:t})=>{var n,a;if(!Array.isArray(t))return i(t);if(t.every(e=>e==null||e===``))return``;let o=r.endsWith(`range`)?(n=(a=e.props)==null?void 0:a.rangeSeparator)==null?` - `:n:`、`;return t.map(i).join(o)}}function ml(e){let t=t=>{var n,r,i,a;return t==null||t===``?``:Y(ol(t,(n=(r=e.props)==null?void 0:r.valueFormat)==null?`HH:mm`:n),(i=(a=e.props)==null?void 0:a.format)==null?`HH:mm`:i)};return({cellValue:n})=>{var r,i;return Array.isArray(n)?n.every(e=>e==null||e===``)?``:n.map(t).join((r=(i=e.props)==null?void 0:i.rangeSeparator)==null?` - `:r):t(n)}}function hl(e){return({cellValue:t})=>Yc(e.options,t)}function gl(e=`small`){return e===`large`?`medium`:e==="default"?`small`:`mini`}var X={DETAIL:`detail`,DEL:`del`,ADD:`add`,EDIT:`edit`,SAVE:`save`,CREATE:`create`,READ:`read`,UPDATE:`update`,EXPORT:`export`,OPERATE:`OPERATE`};function _l(e){let t=0;for(let n of e)n.group&&(t=Math.max(t,xr(n.group).length));return t+1}var vl=()=>{let{t:e}=z();return{info(e){l.ElMessage.info(e)},error(e){l.ElMessage.error(e)},success(e){l.ElMessage.success(e)},warning(e){l.ElMessage.warning(e)},alert(t){l.ElMessageBox.alert(t,e(`common.confirmTitle`))},alertError(t){l.ElMessageBox.alert(t,e(`common.confirmTitle`),{type:`error`})},alertSuccess(t){l.ElMessageBox.alert(t,e(`common.confirmTitle`),{type:`success`})},alertWarning(t){l.ElMessageBox.alert(t,e(`common.confirmTitle`),{type:`warning`})},notify(e){l.ElNotification.info(e)},notifyError(e){l.ElNotification.error(e)},notifySuccess(e){l.ElNotification.success(e)},notifyWarning(e){l.ElNotification.warning(e)},confirm(t,n){return l.ElMessageBox.confirm(t,n||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},delConfirm(t,n){return l.ElMessageBox.confirm(t||e(`common.delMessage`),n||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},exportConfirm(t,n){return l.ElMessageBox.confirm(t||e(`common.exportMessage`),n||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},prompt(t,n){return l.ElMessageBox.prompt(t,n,{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})}}},yl=(0,u.defineComponent)(V(V({},{name:`AbTableOperate`}),{},{__name:`ab-table-operate`,props:(0,u.mergeModels)({rule:{},modelValue:{},idField:{},idFieldTable:{},permiPrefix:{},api:{},link:{type:Boolean},plain:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},{api:{},apiModifiers:{}}),emits:(0,u.mergeModels)([`refresh`,`operated`],[`update:api`]),setup(e,{expose:t,emit:n}){let r=n,i=e,{t:a}=z(),o=vl(),s=(0,u.inject)(`abTableDetailRef`,void 0),c=(0,u.inject)(`abTableRef`,void 0),{wsCache:l}=R(),d=(0,u.computed)(()=>l.getCurrentSize||`default`),f=(0,u.useModel)(e,`api`),p=(0,u.computed)(()=>{var e;if(!i.rule||Array.isArray(i.rule)&&!((e=i.rule)!=null&&e.length))return;let t=Array.isArray(i.rule)?{type:`ElRow`,children:[...Da(i.rule)],native:!0}:V(V({},Da(i.rule)),{},{native:!0});return delete t.field,Zo(t==null?void 0:t.children,e=>{L(e,`props.plain`,i.plain),L(e,`props.link`,i.link),L(e,`props.size`,d.value),e.field===X.CREATE?(L(e,`children`,[{type:`icon`,props:{icon:`ep:plus`}},a(`action.${X.CREATE}`)]),L(e,`props`,{type:`primary`,plain:i.plain,link:i.link}),dr(e,`on.click`)||L(e,`on.click`,h),i.permiPrefix&&!dr(e,`computed.hidden`)&&L(e,`computed.hidden`,m)):e.field===X.DETAIL?(L(e,`children`,[{type:`icon`,props:{icon:`ep:view`}},a(`action.${X.DETAIL}`)]),L(e,`props`,{type:`primary`,plain:i.plain,link:i.link}),dr(e,`on.click`)||L(e,`on.click`,g)):e.field===X.DEL?(L(e,`children`,[{type:`icon`,props:{icon:`ep:delete`}},a(`action.${X.DEL}`)]),L(e,`props`,{type:`danger`,plain:i.plain,link:i.link}),dr(e,`on.click`)||L(e,`on.click`,v),i.permiPrefix&&!dr(e,`computed.hidden`)&&L(e,`computed.hidden`,_)):e.field===X.EXPORT&&(L(e,`children`,[{type:`icon`,props:{icon:`ep:download`}},a(`action.${X.EXPORT}`)]),L(e,`props`,{type:`warning`,plain:i.plain,link:i.link}),i.permiPrefix&&!dr(e,`computed.hidden`)&&L(e,`computed.hidden`,b)),L(e,`native`,!0)}),[t]});function m(){return!Mc([`${i.permiPrefix}:create`],[`admin`])}function h(){var e;if(typeof(s==null||(e=s.value)==null?void 0:e.toggle)==`function`){var t;s==null||(t=s.value)==null||t.toggle(!0,i.modelValue,!1)}}function g(){var e;if(typeof(s==null||(e=s.value)==null?void 0:e.toggle)==`function`){var t;s==null||(t=s.value)==null||t.toggle(!0,i.modelValue,i.readonly)}}function _(){return!Mc([`${i.permiPrefix}:delete`],[`admin`])}function v(){return y.apply(this,arguments)}function y(){return y=H(function*(){var e,t;(yield o.delConfirm().catch(e=>e))===`confirm`&&(typeof i.deleteHandler==`function`&&i.idField&&(yield i.deleteHandler((e=i.modelValue)==null?void 0:e[i.idField])),yield(0,u.nextTick)(),c==null||(t=c.value)==null||t.remove(i.modelValue),r(`refresh`))}),y.apply(this,arguments)}function b(){return!Mc([`${i.permiPrefix}:export`],[`admin`])}return t({}),(t,n)=>{let r=(0,u.resolveComponent)(`ab-form`);return(0,u.openBlock)(),(0,u.createBlock)(r,{rule:p.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":n[0]||(n[0]=e=>f.value=e)},null,8,[`rule`,`model-value`,`api`])}}}));function bl(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`}function xl(e){return typeof e==`string`||typeof e==`function`||bl(e)}function Sl(e){return e==null||typeof e==`string`||typeof e==`number`?e:String(e)}function Cl(e){if(e!=null)return typeof e==`string`||typeof e==`number`?e:String(e)}function wl(e,t,n){if(t==null||t===``)return;if(typeof e==`function`)return e(n);if(typeof e==`string`)return{name:e,query:{id:Sl(t)}};if(!bl(e))return;let r={name:e.name},i=e.query;typeof i==`string`?r.query={[i]:Sl(t)}:i&&(r.query={},Object.keys(i).forEach(e=>{let t=i[e];r.query[e]=Sl(n[t])}));let a=e.params;if(typeof a==`string`){let e=Cl(t);e!==void 0&&(r.params={[a]:e})}else a&&(r.params={},Object.keys(a).forEach(e=>{let t=a[e],i=Cl(n[t]);i!==void 0&&(r.params[e]=i)}));return r}var Tl={class:`ab-router-link`},El=(0,u.defineComponent)(V(V({},{name:`AbRouterLink`}),{},{__name:`ab-router-link`,props:{link:{},value:{},row:{}},setup(e){let t=e,n=(0,u.computed)(()=>wl(t.link,t.value,t.row));return(e,t)=>{let r=(0,u.resolveComponent)(`ab-icon`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,Tl,[(0,u.createVNode)(r,{icon:`ep:link`,size:16}),n.value?((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(f.RouterLink),{key:0,to:n.value,class:`ab-router-link`},{default:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`default`)]),_:3},8,[`to`])):(0,u.renderSlot)(e.$slots,`default`,{},void 0,void 0,1)])}}})),Dl=(0,u.defineComponent)(V(V({},{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}){let n=t,r=e,{t:i}=z(),a=vl(),o=(0,u.inject)(`abTableRef`,null),s=(0,u.computed)(()=>{var e;return!((e=r.rule)!=null&&e.hidden)}),c=(0,u.computed)(()=>r.sortable!==!1&&r.rule.sortable!==!1&&r.rule.sortFieldTable!==!1&&(r.rule.sortable===!0||r.rule.sortFieldTable!==void 0||!!r.idFieldTable)),l=(0,u.computed)(()=>{var e,t,n,i,a;return V(V({},r.rule.params),{},{sortField:(e=r.rule.sortField)==null?(t=r.rule.params)==null?void 0:t.sortField:e,sortFieldTable:typeof r.rule.sortFieldTable==`string`?r.rule.sortFieldTable:(n=(i=(a=r.rule.params)==null?void 0:a.sortFieldTable)==null?r.idFieldTable:i)==null?``:n})}),d=(0,u.computed)(()=>al(r.rule).formatter);(function(){var e=H(function*({row:e,rule:t},i){if(i.type===X.DETAIL)typeof i.handler==`function`?i.handler({row:e}):m(!0,e,r.readonly);else if(i.type===X.UPDATE)m(!0,e);else if(i.type===X.DEL){if((yield a.delConfirm().catch(e=>e))!==`confirm`)return;if(typeof i.handler==`function`){yield i.handler(e);return}let t=r.idField?e[r.idField]:void 0;if(t&&typeof i.deleteHandler==`function`)yield i.deleteHandler(t,e).catch(e=>{});else{var s;o==null||(s=o.value)==null||s.remove(e)}n(`refresh`),n(`operated`)}else typeof i.handler==`function`&&i.handler({row:e},i)});return function(t,n){return e.apply(this,arguments)}})();function f({cellValue:e,row:t,column:n}={}){var i;if(typeof((i=r.rule)==null||(i=i.on)==null?void 0:i.change)==`function`){var a,o;(a=r.rule)==null||(a=a.on)==null||(o=a.change)==null||o.call(a,{cellValue:e,row:t,column:n})}}let p=(0,u.inject)(`abTableDetailRef`,void 0),m=(e=!1,t=void 0,n=!1)=>{console.log(`toggleTableDetail: `,p==null?void 0:p.value,e,t,n);let r=p==null?void 0:p.value;typeof(r==null?void 0:r.toggle)==`function`&&r.toggle(e,t,n)};return(t,r)=>{var i,a,o,p,m;let h=(0,u.resolveComponent)(`el-switch`),g=(0,u.resolveComponent)(`ab-icon`),_=(0,u.resolveComponent)(`vxe-column`);return e.rule.field?((0,u.openBlock)(),(0,u.createBlock)(_,{key:1,title:e.rule.title,field:e.rule.field,sortable:c.value,params:l.value,width:((i=e.rule)==null?void 0:i.width)||`auto`,"min-width":(a=e.rule)==null?void 0:a.minWidth,align:(o=e.rule)==null?void 0:o.align,fixed:(p=e.rule)==null?void 0:p.fixed,visible:s.value,"class-name":(m=e.rule)!=null&&m.cellArrow?`items-center`:``},{default:(0,u.withCtx)(t=>{var i,a;return[e.rule.type===`ElRow`&&e.rule.field===(0,u.unref)(X).OPERATE?((0,u.openBlock)(),(0,u.createBlock)(yl,{key:0,"id-field":e.idField,"permi-prefix":e.permiPrefix,rule:e.rule,"model-value":t.row,"delete-handler":e.deleteHandler,readonly:e.readonly,link:``,onRefresh:r[0]||(r[0]=e=>n(`refresh`))},null,8,[`id-field`,`permi-prefix`,`rule`,`model-value`,`delete-handler`,`readonly`])):e.rule.field?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:1},[(i=e.rule)!=null&&i.cellRender?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:0},[e.rule.type===`switch`?((0,u.openBlock)(),(0,u.createBlock)(h,(0,u.mergeProps)({key:0},e.rule.props,{modelValue:t.row[e.rule.field],"onUpdate:modelValue":n=>t.row[e.rule.field]=n,onChange:n=>f({cellValue:t.row[e.rule.field],column:t.column,row:t.row})}),null,16,[`modelValue`,`onUpdate:modelValue`,`onChange`])):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:1},[(0,u.createTextVNode)((0,u.toDisplayString)(e.rule.type),1)],64))],64)):e.rule.link?((0,u.openBlock)(),(0,u.createBlock)(El,{key:1,link:e.rule.link,value:t.row[e.rule.field],row:t.row},{default:(0,u.withCtx)(()=>[d.value?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:0},[(0,u.createTextVNode)((0,u.toDisplayString)(d.value({cellValue:t.row[e.rule.field],column:t.column,row:t.row})),1)],64)):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:1},[(0,u.createTextVNode)((0,u.toDisplayString)(t.row[e.rule.field]),1)],64))]),_:2},1032,[`link`,`value`,`row`])):d.value?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:2},[(0,u.createTextVNode)((0,u.toDisplayString)(d.value({cellValue:t.row[e.rule.field],column:t.column,row:t.row})),1)],64)):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:3},[(0,u.createTextVNode)((0,u.toDisplayString)(t.row[e.rule.field]),1)],64))],64)):(0,u.createCommentVNode)(``,!0),(a=e.rule)!=null&&a.cellArrow?((0,u.openBlock)(),(0,u.createBlock)(g,{key:2,icon:t.row[e.rule.field]<0?`streamline:graph-arrow-decrease`:`streamline:graph-arrow-increase`,class:(0,u.normalizeClass)(t.row[e.rule.field]<0?`danger`:`success`)},null,8,[`icon`,`class`])):(0,u.createCommentVNode)(``,!0)]}),_:1},8,[`title`,`field`,`sortable`,`params`,`width`,`min-width`,`align`,`fixed`,`visible`,`class-name`])):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:0},[],64))}}})),Ol=(0,u.defineComponent)(V(V({},{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}){let n=t,r=e,i=(0,u.computed)(()=>{let{field:e,children:t}=r.rule;return!!(t!=null&&t.length)&&(e?e!==X.OPERATE:!r.rule.type&&!!r.rule.title)});return(t,a)=>{var o,s,c;let l=(0,u.resolveComponent)(`ab-table-columns`,!0),d=(0,u.resolveComponent)(`vxe-colgroup`);return i.value?((0,u.openBlock)(),(0,u.createBlock)(d,{key:0,field:e.rule.field,title:(o=e.rule)==null?void 0:o.title,"header-align":((s=e.rule)==null?void 0:s.groupAlign)||((c=e.rule)==null?void 0:c.align)||`center`},{default:(0,u.withCtx)(()=>{var t;return[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)((t=e.rule)==null?void 0:t.children,(t,i)=>((0,u.openBlock)(),(0,u.createBlock)(l,(0,u.mergeProps)({key:t.field||`${e.idx}_${i}`,ref_for:!0},V(V({},r),{},{rule:t,idx:i}),{"id-field":e.idField,onRefresh:a[0]||(a[0]=e=>n(`refresh`))}),null,16,[`id-field`]))),128))]}),_:1},8,[`field`,`title`,`header-align`])):((0,u.openBlock)(),(0,u.createBlock)(Dl,{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]=e=>n(`refresh`))},null,8,[`rule`,`id-field`,`id-field-table`,`permi-prefix`,`sortable`,`delete-handler`,`readonly`]))}}})),kl,Al;function jl(e,t){if(!e||e===t)return;let n=e.props.abFormInject;if(n)return n;if(e.parent)return jl(e.parent,t)}function Ml(){let e=(0,u.getCurrentInstance)();if(!e)throw Error(`AbForm lifecycle hook requires an active Vue component.`);return e}function Nl(){return typeof document<`u`&&typeof document.createElement==`function`&&document.head!=null}function Pl(e,t,n){return(0,u.defineComponent)({name:`AbForm`+(e.isMobile?`Mobile`:``),components:t,directives:n,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(t){let n=Ml();(0,u.provide)(`parentFC`,n);let r=(0,u.inject)(`parentFC`,null),i=r==null?n:r;if(r)for(;i.setupState.parent;)i=i.setupState.parent;let{rule:a,modelValue:o,subForm:s,inFor:c}=(0,u.toRefs)(t),l=(0,u.reactive)({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...a.value||[]]}),d=JSON.stringify(o.value||{}),f=new e(n),p=f.api(),m=c.value,h=()=>{if(r){let e=jl(n,r);if(e){let t;if(m){let n=e.getSubForm();t=Array.isArray(n)?[...n]:n?[n]:[],t.push(p)}else t=p;e.subForm(t)}}},g=()=>{let e=jl(n,r);if(e){if(m){let t=fc(e.getSubForm()),n=t.indexOf(p);n>-1&&t.splice(n,1)}else e.subForm()}},_=null;(0,u.onBeforeMount)(()=>{Nl()&&(0,u.watchEffect)(()=>{let e=``,n=t.option&&t.option.globalClass||{};Object.keys(n).forEach(t=>{let r=``,i=n[t].style;i&&Object.keys(i).forEach(e=>{r+=Ps(e)+`:`+i[e]+`;`}),n[t].content&&(r+=n[t].content+`;`),r&&(e+=`.${t}{${r}}`)}),t.option&&t.option.style&&(e+=t.option.style),_||(_=document.createElement(`style`),_.type=`text/css`,document.head.appendChild(_)),_.innerHTML=e||``})});let v=oc(()=>{f.bus.$emit(`$loadData.$topForm`)},100),y=oc(function(){f.bus.$emit(`$loadData.$scopeForm`)},100),b=oc(()=>{f.bus.$emit(`$loadData.$form`)},100),x=(...e)=>{f.bus.$emit(`change-$form.`+String(e[0]))};return(0,u.onMounted)(()=>{r&&(p.top.bus.$on(`$loadData.$form`,v),p.top.bus.$on(`change`,x)),p!==p.scope&&p.scope.bus.$on(`$loadData.$scopeForm`,y),f.mounted()}),(0,u.onBeforeUnmount)(()=>{r&&(p.top.bus.$off(`$loadData.$form`,v),p.top.bus.$off(`change`,x)),p!==p.scope&&p.scope.bus.$off(`$loadData.$scopeForm`,y),g(),l.destroyed=!0,f.unmount(),_&&_.parentNode&&_.parentNode.removeChild(_)}),(0,u.onUpdated)(()=>{f.updated()}),h(),(0,u.watch)(()=>t.option,()=>{f.initOptions(),p.refresh()},{deep:!0,flush:`sync`}),(0,u.watch)(()=>[...a.value],e=>{f.$handle.isBreakWatch()||e.length===l.renderRule.length&&e.every(e=>l.renderRule.indexOf(e)>-1)||(f.$handle.updateAppendData(),f.$handle.reloadRule(a.value),n.setupState.renderRule())}),(0,u.watch)(()=>[t.disabled,t.preview,t.readonly],()=>{p.refresh()}),(0,u.watch)(o,e=>{if(Ys(e||{})===d)return;let t=e==null?{}:e;p.config.forceCoverValue?p.coverValue(t):p.setValue(t)},{deep:!0,flush:`post`}),(0,u.watch)(()=>t.index,()=>{p.coverValue({}),f.$handle.updateAppendData(),(0,u.nextTick)(()=>{(0,u.nextTick)(()=>{p.clearValidateState()})})},{flush:`sync`}),V(V({fc:(0,u.markRaw)(f),parent:r&&(0,u.markRaw)(r),top:(0,u.markRaw)(i),fapi:(0,u.markRaw)(p)},(0,u.toRefs)(l)),{},{getGroupInject:()=>jl(n,r),refresh(){++l.unique},renderRule(){l.renderRule=[...a.value||[]]},updateValue(e){if(l.destroyed)return;let t=Ys(e);d!==t&&(d=t,n.emit(`update:modelValue`,e),(0,u.nextTick)(()=>{b(),r?s.value||y():(v(),y())}))}})},created(){let e=Ml();e.emit(`update:api`,e.setupState.fapi),e.setupState.fc.init()}})}var Fl=[`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`],Il=[`validate`,`children`,`control`],Ll=[`effect`,`deep`,`renderSlots`];function Rl(){return[...Fl,...Us,...Ws,...Gs,...Il,...Ll]}function zl(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!!t}}function Bl(e,t){return Vl([e],t||!1)[0]}function Vl(e,t){return Rs([],[...e],t||!1)}var Hl={array:Il,normal:Ll};function Ul(e,t){return ic(Array.isArray(t)?t:[t],e,Hl),e}function Wl(e){let t=typeof e.getRule==`function`?e.getRule():e;return t.type||(t.type=`text`),t}function Gl(e,t){return e?(Object.keys(t||{}).forEach(n=>{t!=null&&t[n]&&(e[n]=Ul(e[n]||{},t[n]))}),e):t}function Kl(e,t){Object.defineProperties(e,Object.keys(t).reduce((e,n)=>(e[n]={get(){return t[n]()}},e),{}))}function ql(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function Z(e,t){try{return e()}catch(e){Hs(e)}return t}function Jl(){let e={},t=e=>e||`default`;return{setSlot(n,r){n=t(n),!r||Array.isArray(r)&&r.length||(e[n]||(e[n]=[]),e[n].push(r))},getSlot(n,r){n=t(n);let i=[];return(e[n]||[]).forEach(e=>{if(Array.isArray(e))i.push(...e);else if(W.Function(e)){let t=e(...r||[]);Array.isArray(t)?i.push(...t):i.push(t)}else W.Undef(e)||i.push(e)}),i},getSlots(){let t={};return Object.keys(e).forEach(e=>{t[e]=(...t)=>this.getSlot(e,t)}),t},slotLen(n){return n=t(n),e[n]?e[n].length:0},mergeBag(e){if(!e)return this;let t=e,n=W.Function(t.getSlots)?t.getSlots():e;return Array.isArray(e)||(0,u.isVNode)(e)?this.setSlot(void 0,()=>e):Object.keys(n).forEach(e=>{this.setSlot(e,n[e])}),this}}}function Yl(e){let t=V({},e.props||{}),n=e.on||{};return Object.keys(n).forEach(e=>{e.indexOf(`-`)>0&&(e=q(e));let r=`on${Fs(e)}`;Array.isArray(t[r])?t[r]=[...t[r],n[e]]:t[r]?t[r]=[t[r],n[e]]:t[r]=n[e]}),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 Xl(e,t){return Object.setPrototypeOf(e,t),e}var Zl=(e,t)=>typeof e==`string`?String(t):typeof e==`number`?Number(t):t,Ql={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(Zl(e,t)),"!=":(e,t)=>!Ql[`==`](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){let n=e;return n&&n.indexOf&&n.indexOf(Zl(n[0],t))>-1},notOn(e,t){return!Ql.on(e,t)},in(e,t){let n=t;return n&&n.indexOf&&n.indexOf(e)>-1},notIn(e,t){return!Ql.in(e,t)},between(e,t){let n=t;return e>n[0]&&e<n[1]},notBetween(e,t){let n=t;return e<n[0]||e>n[1]},empty(e){return W.empty(e)},notEmpty(e){return!W.empty(e)},pattern(e,t){return new RegExp(t,`g`).test(e)}};function Q(e,t){return(typeof t==`string`?t.split(`.`):t||[]).forEach(t=>{e!=null&&(e=e[t])}),e}function $l(e){let t=/{{\s*(.*?)\s*}}/g,n,r={};for(;(n=t.exec(e))!==null;)n[1]&&(r[n[1]]=!0);return Object.keys(r)}function eu(e){let t=e.split(`.`),n=[],r=``;return t.forEach((e,t)=>{t===0?r=e:r+=`.`+e,n.push(r)}),n.join(` && `)}function tu(e){let t=[],n=``,r=0;for(let i=0;i<e.length;i++){let a=e[i];a===`[`?(r===0&&n&&(t.push({type:`key`,value:n}),n=``),r++,n+=a):a===`]`?(r--,n+=a,r===0&&(t.push({type:`bracket`,value:tu(n.slice(1,-1))}),n=``)):a===`.`&&r===0?n&&(n=(t.push({type:`key`,value:n}),``)):n+=a}return n&&t.push({type:`key`,value:n}),t.map(e=>e.type===`key`?{key:e.value}:{children:e.value})}function nu(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var ru=class{constructor(e,t,n,r,i){B(this,`_data`,void 0),B(this,`event`,void 0),this._data=V(V({},nu()),{},{type:e,title:t,field:n,value:r,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return U(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,n,r=!1){let i=r?{[t]:n}:t;return Ul(this._data,{[e]:i}),this}_clone(){let e=this.constructor,t=new e;return t._data=Bl(this._data),t}};function iu(e){e.forEach(e=>{Object.defineProperty(ru.prototype,e,{configurable:!0,enumerable:!0,writable:!0,value:function(t,n){return this.setAttribute(e,t,n,arguments.length>=2)}})})}iu(Rl());function $(e,t){return(n,r,i,a={})=>{let o=new ru(e,n,r,i,a);return typeof t==`function`?t(o):t&&o.setAttribute(`props`,t),o}}var au=$(``);function ou(e,t,n){let r=au(``,t);return r._data.type=e,r._data.title=n,r}function su(){return{create:ou,factory:$}}function cu(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function lu(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function uu(e){if(typeof XMLHttpRequest>`u`)return;let t=new XMLHttpRequest,n=e.action||``;t.upload&&e.onProgress&&t.upload.addEventListener(`progress`,t=>{var n;let r=t;r.percent=r.total>0?r.loaded/r.total*100:0,(n=e.onProgress)==null||n.call(e,r)});let r=e.query;if(r){let e=typeof r==`string`?r:Object.keys(r).reduce((e,t)=>{let n=r[t];return e[t]=n==null?``:String(n),e},{}),t=new URLSearchParams(e).toString();t&&(n+=n.includes(`?`)?`&${t}`:`?${t}`)}t.onerror=t=>{var n;(n=e.onError)==null||n.call(e,t)},t.onload=()=>{var r;t.status<200||t.status>=300?(r=e.onError)==null||r.call(e,cu(n,t),lu(t)):e.onSuccess(lu(t))},t.open(e.method||`get`,n,!0);let i=null;if(e.data||e.file){if(e.file||(e.dataType||``).toLowerCase()!==`json`){let t=new FormData;Object.keys(e.data||{}).forEach(n=>{var r;let i=(r=e.data)==null?void 0:r[n];t.append(n,typeof Blob<`u`&&i instanceof Blob?i:String(i))}),i=t}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 a=e.headers||{};Object.keys(a).forEach(e=>{a[e]!=null&&t.setRequestHeader(e,a[e])}),t.send(i)}function du(e,t,n){return new Promise((r,i)=>{(t||uu)(V(V({},e),{},{onSuccess(t){let i=e=>e,a=Xs(e.parse);typeof a==`function`?i=(e,t,n)=>a(e,t,n):typeof a==`string`&&(i=e=>Q(e,a)),dc(i(t,e.targetRule,n)).then(r)},onError(e){i(e)}}))})}function fu(e){return zs(e)}function pu(e){function t(t){return W.Undef(t)?t=e.fields():Array.isArray(t)||(t=[t]),t}function n(t,n,r){W.Undef(t)?t=Object.keys(V(V({},e.fieldCtx),e.nameCtx)):Array.isArray(t)||(t=[t]),t.forEach(t=>{let i=e.fieldCtx[t]||e.nameCtx[t];i&&i.forEach(t=>{U(t.rule,n,r),e.$render.clearCache(t)})})}function r(){let t=e.subForm;return Object.keys(t).reduce((e,n)=>{let r=t[n];return r&&(Array.isArray(r)?e.push(...r):e.push(r)),e},[])}let i={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(t){e.fc.options.value=t},get options(){return e.options},set options(t){e.fc.options.value=t},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 t=e.vm;for(;t&&t.setupState.fapi;)if(t.props.subForm)t=t.setupState.parent;else return t.setupState.fapi;return i.top},get children(){return r()},get siblings(){let t=e.vm.setupState.getGroupInject();if(t){let e=t.getSubForm();if(Array.isArray(e))return[...e]}},get index(){let e=i.siblings;if(e){let t=e.indexOf(i);return t>-1?t:void 0}},get formulas(){return V({},e.fc.formulas)},formData(n){if(n==null||typeof n==`boolean`){let t={};return Object.keys(e.form).forEach(r=>{(n===!0||e.ignoreFields.indexOf(r)===-1)&&(t[r]=fu(e.form[r]))}),t}return t(n).reduce((e,t)=>(e[t]=i.getValue(t),e),{})},getValue(t){let n=e.getFieldCtx(t);return n?fu(n.rule.value):e.options.appendValue!==!1&&G(e.appendData,t)?fu(e.appendData[t]):void 0},coverValue(t){let n=V({},t||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(r=>{let i=e.fieldCtx[r];if(i){let e=G(t,r);i.forEach(n=>{n.rule.value=e?t[r]:void 0}),delete n[r]}}),K(e.appendData,n)},!0)},setValue(t){let n=t;arguments.length>=2&&(n={[t]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(n).forEach(t=>{let r=e.fieldCtx[t];if(!r)return e.appendData[t]=n[t];r.forEach(e=>{e.rule.value=n[t]})})},!0)},removeField(t){let n=e.getCtx(t);return e.deferSyncValue(()=>{e.getCtxs(t).forEach(e=>{e.rm()})},!0),n?n.origin:void 0},removeRule(e){let t=e&&ql(e);if(t)return t.rm(),t.origin},fields:()=>e.fields(),append:(t,n,r)=>{let i=e.sort.length-1,a,o=e.getCtx(n);if(o){if(r){if(a=o.getPending(`children`,o.rule.children),!Array.isArray(a))return;i=o.rule.children.length-1}else i=o.root.indexOf(o.origin),a=o.root}else a=e.rules;a.splice(i+1,0,t)},prepend:(t,n,r)=>{let i=0,a,o=e.getCtx(n);if(o){if(r){if(a=o.getPending(`children`,o.rule.children),!Array.isArray(a))return}else i=o.root.indexOf(o.origin),a=o.root}else a=e.rules;a.splice(i,0,t)},hidden(t,r){n(r,`hidden`,!!t),e.refresh()},hiddenStatus(t){let n=e.getCtx(t);if(n)return!!n.rule.hidden},display(t,r){n(r,`display`,!!t),e.refresh()},displayStatus(t){let n=e.getCtx(t);if(n)return!!n.rule.display},disabled(n,r){t(r).forEach(t=>{e.getCtxs(t).forEach(e=>{U(e.rule.props,`disabled`,!!n)})}),e.refresh()},all(t){return Object.keys(e.ctxs).map(n=>{let r=e.ctxs[n];return t?r.origin:r.rule})},model(t){return e.fields().reduce((n,r)=>{let i=e.fieldCtx[r][0];return n[r]=t?i.origin:i.rule,n},{})},component(t){return Object.keys(e.nameCtx).reduce((n,r)=>{let i=e.nameCtx[r].map(e=>t?e.origin:e.rule);return n[r]=i.length===1?i[0]:i,n},{})},bind(){return i.form},reload:t=>{e.reloadRule(t)},updateOptions(t){e.fc.updateOptions(t),i.refresh()},onSubmit(e){i.updateOptions({onSubmit:e})},sync:t=>{if(Array.isArray(t)){t.forEach(e=>i.sync(e));return}let n=W.Object(t)?ql(t):e.getCtxs(t);n&&(n=Array.isArray(n)?n:[n],n.forEach(t=>{if(!t.deleted){let n=e.subForm[t.id];n&&(Array.isArray(n)?n.forEach(e=>{e.refresh()}):n&&n.refresh()),e.$render.clearCache(t)}}),e.refresh())},refresh:()=>{r().forEach(e=>{e.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),i.refresh()},hideForm:t=>{e.vm.setupState.isShow=!t},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(t,n){e.getCtxs(t).forEach(e=>{K(e.rule,n)})},updateRules(e){Object.keys(e).forEach(t=>{i.updateRule(t,e[t])})},mergeRule:(t,n)=>{e.getCtxs(t).forEach(e=>{Ul(e.rule,n)})},mergeRules(e){Object.keys(e).forEach(t=>{i.mergeRule(t,e[t])})},getRule:(t,n)=>{let r=e.getCtx(t);if(r)return n?r.origin:r.rule},findType(t,n){let r;return Object.keys(e.ctxs).forEach(i=>{let a=e.ctxs[i];a.rule.type===t&&(r=n?a.origin:a.rule)}),r},findTypes(t,n){let r=[];return Object.keys(e.ctxs).forEach(i=>{let a=e.ctxs[i];a.rule.type===t&&r.push(n?a.origin:a.rule)}),r},getRenderRule:t=>{let n=e.getCtx(t);if(n)return n.prop},getRefRule:t=>{let n=e.getCtxs(t);if(n){let e=n.map(e=>e.rule);return e.length===1?e[0]:e}},setEffect(t,n,r){let i=e.getCtx(t);i&&n&&(n[0]===`$`&&(n=n.substr(1)),G(i.rule,`$`+n)&&U(i.rule,`$`+n,r),G(i.rule,`effect`)||(i.rule.effect={}),U(i.rule.effect,n,r))},clearEffectData(t,n){let r=e.getCtx(t);r&&(n&&n[0]===`$`&&(n=n.substr(1)),r.clearEffectData(n),i.sync(t))},updateValidate(e,t,r){r?i.mergeRule(e,{validate:t}):n(e,`validate`,t)},updateValidates(e,t){Object.keys(e).forEach(n=>{i.updateValidate(n,e[n],t)})},refreshValidate(){i.refresh()},resetFields(n){t(n).forEach(t=>{e.getCtxs(t).forEach(t=>{e.$render.clearCache(t),t.rule.value=fu(t.defaultValue)})}),(0,u.nextTick)(()=>{(0,u.nextTick)(()=>{(0,u.nextTick)(()=>{i.clearValidateState(n)})})}),n!=null||(W.Function(e.options.onReset)&&Z(()=>e.options.onReset(i)),e.vm.emit(`reset`,i))},method(e,t){let n=i.el(e);if(!n||!n[t])throw Error(Bs(`err`,`${t} 方法不存在`));return(...e)=>n[t](...e)},exec(e,t,...n){return Z(()=>i.method(e,t)(...n))},toJson(e){return Ys(i.rule,e)},trigger(e,t,...n){let r=i.el(e);r&&r.$emit(t,...n)},el(t){let n=e.getCtx(t);if(n)return n.el||e.vm.refs[n.ref]},scrollTo(e,t={block:`center`,inline:`nearest`,behavior:`smooth`}){let n=i.el(e);if(!n)return;let r=n.$el===void 0?n:n.$el;if(!r)return;let a=r.nodeType===1?r:r.firstElementChild;a&&typeof a.scrollIntoView==`function`&&a.scrollIntoView(t)},focus(e){let t=i.el(e);if(!t)return;let n=e=>!e||typeof e.focus!=`function`?!1:(Z(()=>e.focus()),!0);if(n(t))return;let r=t.$el===void 0?t:t.$el;if(n(r))return;let a=r&&(r.nodeType===1?r:r.firstElementChild);n(a)||a&&a.querySelector&&n(a.querySelector(`input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])`))},closeModal:t=>{e.bus.$emit(`fc:closeModal:`+t)},getSubForm(t){let n=e.getCtx(t);return n?e.subForm[n.id]:void 0},getChildrenRuleList(t){let n=typeof t==`object`,r=n?ql(t):e.getCtx(t),a=r?r.rule:n?t:i.getRule(t);if(!a)return[];let o=[];return(e=>{e&&e.forEach(e=>{typeof e==`object`&&(e.field&&o.push(e),o.push(...i.getChildrenRuleList(e)))})})(r?r.loadChildrenPending():a.children),o},getParentRule(t){return(typeof t==`object`?ql(t):e.getCtx(t)).parent.rule},getParentSubRule(t){let n=typeof t==`object`?ql(t):e.getCtx(t);if(n){let e=n.getParentGroup();if(e)return e.rule}},getChildrenFormData(e,t){return i.getChildrenRuleList(e).reduce((e,n)=>((n.ignore!==!0||t===!0)&&(e[n.field]=fu(n.value)),e),{})},setChildrenFormData(t,n,r){let a=i.getChildrenRuleList(t);e.deferSyncValue(()=>{a.forEach(e=>{G(n,e.field)?e.value=n[e.field]:r&&(e.value=void 0)})})},getGlobalEvent(e){let t=i.options.globalEvent[e];if(t)return typeof t==`object`&&(t=t.handle),Xs(t)},getGlobalData(t){return new Promise((n,r)=>{let a=i.options.globalData[t];a?a.type===`fetch`?i.fetch(a).then(e=>{n(e)}).catch(r):n(a.data):n(e.fc.loadData[t])})},emitGlobalEvent(t,...n){let r=i.getGlobalEvent(t);if(r){let t=e.getInjectData({},void 0);return t.args=[...n],n.unshift(t),r.apply(null,n)}},setGlobalData(e,t){i.setData(`$globalData.`+e,t)},setGlobalVar(e,t){i.setData(`$var.`+e,t)},renderRule(t,n,r){let i=typeof t==`object`?ql(t):e.getCtx(t);return i?e.$render.createRuleVnode(i,n,r):void 0},renderChildren(t,n,r){let i=typeof t==`object`?ql(t):e.getCtx(t);return i?e.$render.createChildrenVnodes(i,n,r):void 0},nextTick(t){e.bus.$once(`next-tick`,t),e.refresh()},nextRefresh(t){e.nextRefresh(),t&&Z(t)},deferSyncValue(t,n){e.deferSyncValue(t,n)},emit(t,...n){e.vm.emitsOptions&&!e.vm.emitsOptions[t]&&(e.vm.emitsOptions[t]=null),e.vm.emit(t,...n)},bus:e.bus,getCurrenabFormRule(){var t;return(t=e.vm.setupState.getGroupInject())==null?void 0:t.rule},fetch(t){return new Promise((n,r)=>{let a=V({},t);a=e.loadFetchVar(a);let o=e=>{Z(()=>a.onError&&a.onError(e)),r(e)};e.beforeFetch(a).then(()=>du(a,e.fc.create.fetch,i).then(e=>{Z(()=>a.onSuccess&&a.onSuccess(e)),n(e)}).catch(e=>{o(e)})).catch(e=>{o(e)})})},watchFetch(t,n,r,a){return e.fc.watchLoadData((o,s)=>{let c=V({},t);if(c=e.loadFetchVar(c,o),a&&a(c,s)===!1)return;let l=e=>{Z(()=>c.onError&&c.onError(e)),r&&r(e)};e.beforeFetch(c).then(()=>du(c,e.fc.create.fetch,i).then(e=>{Z(()=>c.onSuccess&&c.onSuccess(e)),n&&n(e,s)}).catch(e=>{l(e)})).catch(e=>{l(e)})},t.wait==null?1e3:t.wait)},getData(t,n){return e.fc.get?e.fc.get(t,n):e.fc.getLoadData(t,n)},watchData(t){return e.fc.watchLoadData((e,n)=>{Z(()=>t(e,n))})},setData(t,n,r){return e.fc.setData(t,n,r)},refreshData(t){return e.fc.refreshData(t)},t(t,n){return e.fc.t(t,n)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:n}};return[`on`,`once`,`off`].forEach(t=>{i[t]=function(...n){e.bus[`$${t}`](...n)}}),i.changeValue=i.changeField=i.setValue,i}function mu(e){K(e.prototype,{initCache(){this.clearCacheAll()},clearCache(e){if(e.rule.cache)return;let t=this.cache[e.id];t?((t.use===!0||t.parent)&&this.$handle.refresh(),t.parent&&this.clearCache(t.parent),this.cache[e.id]=null):e.parent&&this.clearCache(e.parent)},clearCacheAll(){this.cache={}},setCache(e,t,n){this.cache[e.id]={vnode:t,use:!1,parent:n,slot:e.rule.slot}},getCache(e){let t=this.cache[e.id];if(t)return t.use=!0,t.vnode}})}var hu={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 gu(e,t){let{key:n,origin:r,def:i,onLoad:a,onReload:o,onUpdate:s}=t;if(e.pending[n]&&e.pending[n].origin===r)return e.getPending(n,i);delete e.pending[n];let c=r;if(W.Function(r)){let t=r,l=Z(()=>t({rule:e.rule,api:e.$api,update:t=>{let a=t||i,o=e.getPending(n,i);e.setPending(n,r,a),s&&s(a,o)},reload:()=>{let t=e.getPending(n,i);delete e.pending[n],o&&o(t),e.$api&&e.$api.sync(e.rule)}}));l&&W.Function(l.then)?(l.then(t=>{let o=t||i;e.setPending(n,r,o),a&&a(o),e.$api&&e.$api.sync(e.rule)}).catch(e=>{console.error(e)}),c=i,e.setPending(n,r,c)):(c=l||i,e.setPending(n,r,c),a&&a(c))}return c}function _u(e,t,n={}){let r=V({key:`options`,origin:t,def:[]},n);return`loadPending`in e?e.loadPending(r):gu(e,r)}function vu(e){K(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(e){let t=n=>{if(n){let r;return e.rule.field&&(r=n.slots[`field-`+Ps(e.rule.field)]||n.slots[`field-`+e.rule.field]),r||(r=n.slots[`type-`+Ps(e.type)]||n.slots[`type-`+e.type]),r||t(n.setupState.parent)}};return t(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender(),this.applyShowNumber(this.$manager.rule);let e=Jl();return this.sort.forEach(t=>{this.renderSlot(e,this.$handle.ctxs[t])}),this.$manager.render(e)},applyShowNumber(e){let t=this.$handle.options||{};if(!t.showNumber||!e)return;e.class=this.mergeClass(e.class,`is-numbered`),t.showNumber===`chinese`&&(e.class=this.mergeClass(e.class,`is-number-chinese`));let n=t.numberColor,r=(t.form||{}).style;e.style=n?W.String(r)?`${r};--ab-number-color:${n}`:Array.isArray(r)?r.concat({"--ab-number-color":n}):V(V({},r||{}),{},{"--ab-number-color":n}):r},renderSlot(e,t,n){if(this.isFragment(t)){t.initProp(),this.mergeGlobal(t),t.initNone();let n=this.renderChildren(t.loadChildrenPending(),t),r=n.default;r&&e.setSlot(t.rule.slot,()=>r()),delete n.default,e.mergeBag(n)}else e.setSlot(t.rule.slot,this.renderCtx(t,n))},mergeGlobal(e){if(!this.$handle.options.global)return;let{trueType:t,originType:n,type:r}=e;this.cacheConfig[t]||(this.cacheConfig[t]=(0,u.computed)(()=>{let e=this.$handle.options.global;return Ul({},[e[`*`]||e.default||{},e[n]||e[r]||{}])})),e.prop=Ul({},[this.cacheConfig[e.trueType].value,e.prop])},setOptions(e){let t=_u(e,e.prop.options);e.prop.options=t,e.prop.optionsTo&&t&&sc(e.prop,e.prop.optionsTo,t)},deepSet(e){let t=e.prop.deep;t&&Object.keys(t).sort((e,t)=>e.length<t.length?-1:1).forEach(n=>{sc(e.prop,n,t[n])})},parseSide(e,t){return W.Object(e)?Ul({props:{abFormInject:t.prop.props.abFormInject}},e):e},renderSides(e,t,n){let r=t[n?`rule`:`prop`];return[this.renderRule(this.parseSide(r.prefix,t)),e,this.renderRule(this.parseSide(r.suffix,t))]},renderId(e,t){let n=this.$handle[t===`field`?`fieldCtx`:`nameCtx`][e];return n?n.map(e=>this.renderCtx(e,e.parent)):void 0},renderCtx(e,t){try{var n;if(e.type===`hidden`)return;let r=e.rule;if(this.force||!this.cache[e.id]||((n=this.cache[e.id])==null?void 0:n.slot)!==r.slot){let n;e.initProp(),this.mergeGlobal(e),e.initNone(),this.$manager.tidyRule(e),this.deepSet(e),this.setOptions(e),this.ctxProp(e);let i=e.prop;i.preview=!!(i.preview==null?this.$handle.preview:i.preview),i.props.abFormInject=this.injectProp(e);let a=i.cache!==!1,o=i.preview;if(i.hidden){this.setCache(e,void 0,t);return}n=(...n)=>{var s,c;let l={rule:r,prop:i,preview:o,api:this.$handle.api,model:i.model||{},slotValue:n};n.length&&r.slotUpdate&&Z(()=>r.slotUpdate(l));let u={},d=e.loadChildrenPending();e.parser.renderChildren?u=e.parser.renderChildren(d,e):e.parser.loadChildren!==!1&&(u=this.renderChildren(d,e)),Object.keys(i.renderSlots||{}).forEach(t=>{u[t]=(...n)=>{if(W.Function(i.renderSlots[t]))return Z(()=>i.renderSlots[t](...n));let r=this.parseSide(i.renderSlots[t],e);return this.renderRule(r)}});let f=this.getTypeSlot(e),p;if(f)l.children=u,p=f(l);else{let t=cc(u);if(o)p=e.parser.preview(t,e);else{var m;let n=e.parser,r=n!==hu,i=r&&Object.prototype.hasOwnProperty.call(n,`render`);if(r&&!i&&e.input&&((m=e.$handle)==null||(m=m.vm)==null||(m=m.props)==null?void 0:m.readonly)===!0){var h;let r=typeof this.$handle.getParser==`function`?this.$handle.getParser({type:`text`,originType:`text`,trueType:`text`}):(h=this.fc.parsers)==null?void 0:h.text;p=r&&r!==n?r.render(t,e):n.render(t,e)}else p=n.render(t,e)}}return p=this.renderSides(p,e),(s=i.title)!=null&&s.show&&(i.wrap=V({show:!0},i.wrap||{}),i.native||(i.native=!1)),(e.input||!W.Undef(i.native)||((c=i.col)==null?void 0:c.show)===!0)&&i.native!==!0&&(this.fc.targeabFormDriver(`updateWrap`,e),p=this.$manager.makeWrap(e,p)),e.none&&(p=Array.isArray(p)?p.map(e=>!e||!e.__v_isVNode?e:this.none(e)):this.none(p)),a&&this.setCache(e,()=>this.stable(p),t),p},this.setCache(e,n,t)}return(...t)=>{let n=this.getCache(e);if(n)return n(...t);if(this.cache[e.id])return;let r=this.renderCtx(e,e.parent);if(r)return r()}}catch(e){console.error(e);return}},none(e){if(e)return e.props.class=this.mergeClass(e.props.class,`ab-none`),e},mergeClass(e,t){if(Array.isArray(e))e.push(t);else return e?[e,t]:t;return e},stable(e){return(Array.isArray(e)?e:[e]).forEach(e=>{e&&e.__v_isVNode&&e.children&&typeof e.children==`object`&&(e.children.$stable=!0,this.stable(e.children))}),e},getModelField(e){var t,n,r;return e.prop.modelField||e.parser.modelField||((t=this.fc.modelFields)==null?void 0:t[this.vNode.aliasMap[e.type]])||((n=this.fc.modelFields)==null?void 0:n[e.type])||((r=this.fc.modelFields)==null?void 0:r[e.originType])||`modelValue`},isFragment(e){return e.type===`fragment`||e.type===`template`},injectProp(e){let t=this.vm.setupState;if(!t.ctxInject[e.id]){let n={api:this.$handle.api,form:this.fc.create,subForm:t=>{this.$handle.addSubForm(e,t)},getSubForm:()=>this.$handle.subForm[e.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[e.wrapRef],options:[],children:[],preview:!1,get readonly(){return e.$handle.vm.props.readonly},get idField(){return e.$handle.vm.props.idField},get idFieldTable(){return e.$handle.vm.props.idFieldTable},get formValue(){return e.$handle.vm.props.modelValue},id:e.id,field:e.field,rule:e.rule,input:e.input,t:(...e)=>this.$handle.api.t(...e),updateValue:t=>{this.$handle.onUpdateValue(e,t)}};t.ctxInject[e.id]=n}let n=t.ctxInject[e.id];return K(n,{preview:e.prop.preview,options:e.prop.options,children:e.loadChildrenPending()}),n},ensureCtxHandlers(e){if(e.handlers)return e.handlers;let t=this,n={vnodeMounted(n){n.el.__rule__=e.rule,t.onMounted(e,n.el)},vnodeBeforeUnmount(){t.$handle.effect(e,`beforeUnmount`),t.$handle.targetHook(e,`beforeUnmount`)},fcUpdateValue(n){t.$handle.onUpdateValue(e,n)},fcEl(t){e.exportEl=t,t&&((t.$el||t).__rule__=e.rule)},modelCallback(n){t.tmpInput&&t.tmpInput(e.field,n,e.rule),t.onInput(e,n)},modelEmit(){t.onEmitInput(e)}};return e.handlers=n,n},ctxProp(e){let{ref:t,key:n,rule:r}=e;this.$manager.mergeProp(e),e.parser.mergeProp(e);let i=this.ensureCtxHandlers(e),a=[{ref:t,key:r.key||`${n}fc`,slot:void 0,on:{vnodeMounted:i.vnodeMounted,vnodeBeforeUnmount:i.vnodeBeforeUnmount,"fc.updateValue":i.fcUpdateValue,"fc.el":i.fcEl}}];if(e.input){this.vm.props.disabled===!0&&(e.prop.props.disabled=!0);let t=this.getModelField(e),n={callback:i.modelCallback,modelField:t,value:this.$handle.geabFormData(e)};a.push({on:V({[`update:${t}`]:n.callback},e.prop.modelEmit?{[e.prop.modelEmit]:i.modelEmit}:{}),props:{[t]:n.value}}),e.prop.model=n}return ic(a,e.prop),e.prop},onMounted(e,t){e.el=this.vm.refs[e.ref]||t,e.parser.mounted(e),this.$handle.effect(e,`mounted`),this.$handle.targetHook(e,`mounted`)},onInput(e,t){e.prop.modelEmit?this.$handle.onBaseInput(e,t):this.$handle.onInput(e,t)},onEmitInput(e){this.$handle.setValue(e,e.parser.toValue(e.modelValue,e),e.modelValue)},renderChildren(e,t){if(!W.trueArray(e))return{};let n=Jl();return e.map(r=>{if(r){if(W.String(r)||W.Number(r))return n.setSlot(null,`${r}`);if(r.__fc__)return this.renderSlot(n,r.__fc__,t);r.type&&(0,u.nextTick)(()=>{this.$handle.loadChildren(e,t),this.$handle.refresh()})}}),n.getSlots()},defaultRender(e,t){let n=e.prop;return n.component?typeof n.component==`string`?this.vNode.make(n.component,n,t):this.vNode.makeComponent(n.component,n,t):this.vNode[e.type]?this.vNode[e.type](n,t):this.vNode[e.originType]?this.vNode[e.originType](n,t):this.vNode.make(pc(n.type),n,t)},createChildrenVnodes(e,t,n){this.force=n!==!1,this.tmpInput=t;let r=this.renderChildren(e.rule.children,e);return this.force=!1,this.tmpInput=null,r},createRuleVnode(e,t,n){this.force=n!==!1,this.tmpInput=t;let r=Jl();return this.renderSlot(r,e,e.parent),this.force=!1,this.tmpInput=null,r.getSlots()},renderRule(e,t,n){if(!e)return;if(W.String(e)||W.Number(e))return`${e}`;let r;if(n)r=e.type;else if(r=e.is,e.type){r=q(e.type);let t=this.vNode.aliasMap[r];t&&(r=q(t))}if(!r)return;let i=Jl();W.trueArray(e.children)&&e.children.forEach(e=>{e&&i.setSlot(e==null?void 0:e.slot,()=>this.renderRule(e))});let a=V({},e);return delete a.type,delete a.is,this.vNode.make(r,a,i.mergeBag(t).getSlots())}})}var yu=1;function bu(e){K(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:yu++}),Kl(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}mu(bu),vu(bu);function xu(e){K(e.prototype,{parseInjectEvent(e,t){let n=e.inject||this.options.injectEvent;return this.parseEventLst(e,t,n)},parseEventLst(e,t,n,r){return Object.keys(t).forEach(i=>{let a=this.parseEvent(e,t[i],n,r);a&&(t[i]=a)}),t},parseEvent(e,t,n,r){if(W.Function(t)&&(n!==!1&&!W.Undef(n)||t.__inject))return this.inject(e,t,n);if(!r&&Array.isArray(t)&&t[0]&&(W.String(t[0])||W.Function(t[0])))return this.parseEventLst(e,t,n,!0);if(W.String(t)){let r=Xs(t);if(r&&t!==r){let t=r;return t.__inject?this.parseEvent(e,t,n,!0):t}}},parseEmit(e){let t={},n=e.rule,{emitPrefix:r,field:i,name:a,inject:o}=n,s=n.emit||[];return W.trueArray(s)&&s.forEach(e=>{if(!e)return;let s,c=r||i||a;if(W.Object(e)&&(s=e.inject,e=e.name,c=e.prefix||c),c){let r=Ps(`${c}-${e}`),i=(...e)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[r]&&(this.vm.emitsOptions[r]=null),this.vm.emit(r,...e),this.vm.emit(`emit-event`,r,...e),this.bus.$emit(r,...e)};if(i.__emit=!0,!s&&o===!1)t[q(e)]=i;else{let r=s||o||this.options.injectEvent;t[q(e)]=W.Undef(r)?i:this.inject(n,i,r)}}}),e.computed.on=t,t},getInjectData(e,t){let n=e.__fc__&&e.__fc__.$api,{option:r,rule:i}=(e.__fc__&&e.__fc__.$handle.vm||this.vm).props;return{$f:n||this.api,api:n||this.api,rule:i,self:e.__origin__,option:r,inject:t}},inject(e,t,n){if(t.__origin){if(this.watching&&!this.loading)return t;t=t.__origin}let r=this,i=function(...i){let a=r.getInjectData(e,n);return a.args=[...i],i.unshift(a),t.apply(this,i)};return i.__origin=t,i.__json=t.__json,i},loadStrVar(e,t,n){if(e&&typeof e==`string`&&e.indexOf(`{{`)>-1&&e.indexOf(`}}`)>-1){let r=e,i=$l(e),a=e=>{let r=!1,i;if(n&&e.indexOf(`$form.`)===0){let a=e.split(`.`);a.shift(),G(n.value,a[0])&&(r=!0,i=t?t({id:`$form.`+a[0]+`_`+n.rule.__fc__.id,getValue:()=>Q(n.value,a)}):Q(n.value,a))}return r||(i=t?t(e):this.fc.getLoadData(e)),i},o=e=>{let t=[];e.forEach(e=>{e.key?t.push(e.key):e.children&&t.push(o(e.children))});let n=!1;return t.forEach((e,r)=>{e!=null&&(e.indexOf(`'`)===0||e.indexOf(`"`)===0)&&(t[r]=e.slice(1,-1),n=!0)}),t.length===1&&(n||!isNaN(Number(t[0])))?t[0]:a(t.join(`.`))},s;if(i.forEach(t=>{let n=t.split(`||`),r=n[0].trim();if(r){var i;let a=(n[1]||``).trim(),c=tu(r),l=Z(()=>o(c));(l==null||l===``)&&n.length>1&&(l=a),s=l,e=e.replaceAll(`{{${t}}}`,(i=l)==null?``:i)}}),i.length===1&&r===`{{${i[0]}}}`)return s}return e},loadFetchVar(e,t,n){let r;n&&n.__fc__&&(r=n.__fc__.getParentGroup()),!r&&e.targetRule&&e.targetRule.__fc__&&(r=e.targetRule.__fc__.getParentGroup());let i=e=>this.loadStrVar(e,t,r?{rule:n,value:this.subRuleData[r.id]||{}}:null);return e.action=i(e.action||``),[`headers`,`data`,`query`].forEach(t=>{if(e[t]){let n=Array.isArray(e[t])?[]:{};Object.keys(e[t]).forEach(r=>{n[i(r)]=i(e[t][r])}),e[t]=n}}),e}})}var Su=[`hook:updated`,`hook:mounted`];function Cu(e){K(e.prototype,{usePage(){let e=this.options.page;if(!e)return;let t=25,n=wu(this.rules);if(W.Object(e)){let r=e;r.first&&(t=parseInt(String(r.first),10)||t),r.limit&&(n=parseInt(String(r.limit),10)||n)}K(this,{first:t,limit:n,pageEnd:this.rules.length<=t}),this.bus.$on(`page-end`,()=>this.vm.emit(`page-end`,this.api)),this.pageLoad()},pageLoad(){let e=()=>{this.pageEnd?(this.bus.$off(Su,e),this.bus.$emit(`page-end`)):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Su,e)}})}function wu(e){return e.length<31?31:Math.ceil(e.length/3)}function Tu(e){K(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(e){this.clearNextTick(),this.nextTick=setTimeout(()=>{e(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function Eu(e){Object.defineProperties(e.origin,{__fc__:zl((0,u.markRaw)(e),!0)}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:zl((0,u.markRaw)(e),!0)})}function Du(e,t,n){let r=gc(),i=!!t.field;K(this,{id:r,ref:r,wrapRef:r+`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:V({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?zs(n):void 0,field:t.field||void 0}),this.updateKey(),Eu(this),this.update(e,!0)}K(Du.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:e=>{this.$handle&&this.$handle.loadChildren(e,this)},onUpdate:(e,t)=>{this.$handle&&(e===t?this.$handle.loadChildren(e,this):this.$handle.updateChildren(this,e,t))},onReload:e=>{this.$handle?this.$handle.updateChildren(this,[],e):delete this.pending.children}})},loadPending(e){return gu(this,e)},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,n){this.pending[e]={origin:t,value:(0,u.reactive)(n)}},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=gc(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=q(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var e,t;let n=V({},this.rule);delete n.children,delete n.validate,this.prop=Ul({},[n,...Object.keys(this.payload).map(e=>this.payload[e]),this.computed]),n.col&&((e=n.col)==null?void 0:e.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((t=this.refRule)==null||(t=t.__$validate)==null?void 0:t.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(W.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),K(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 e=this.root.indexOf(this.origin);e>-1&&(this.root.splice(e,1),this.$handle&&this.$handle.refresh())};this.deleted?e():this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),K(this,{root:[]})},this.input)})},update(e,t){K(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 Ou(e){K(e.prototype,{nextRefresh(e){let t=this.loadedId;(0,u.nextTick)(()=>{t===this.loadedId&&(e?e():this.refresh())})},parseRule(e){let t=Wl(e);return Object.defineProperties(t,{__origin__:zl(e,!0)}),ku(t),this.appendValue(t),[t,t.prefix,t.suffix].forEach(e=>{e&&this.loadFn(e,t)}),this.loadCtrl(t),t.update&&(t.update=Xs(t.update)),t},loadFn(e,t){[`on`,`props`,`deep`].forEach(n=>{e[n]&&this.parseInjectEvent(t,e[n])})},loadCtrl(e){e.control&&e.control.forEach(e=>{e.handle&&(e.handle=Xs(e.handle))})},syncProp(e){let t=e.rule,n=t.sync;W.trueArray(n)&&ic([{on:n.reduce((e,n)=>(e[typeof n==`object`&&n.event||`update:${n}`]=e=>{t.props[typeof n==`object`&&n.prop||n]=e,this.vm.emit(`sync`,n,e,t,this.fapi)},e),{})}],e.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(e,t){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit(`load-start`),this._loadRule(e,t),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit(`load-end`),this.$render.clearCache(t)},_loadRule(e,t){let n=t=>{let r=e[t-1];if(!r||!r.__fc__)return t>0?n(t-1):-1;let i=this.sort.indexOf(r.__fc__.id);return i>-1?i:n(t-1)},r=(e,t)=>{W.trueArray(e)&&this._loadRule(e,t)},i=e.map((i,a)=>{if(t&&!W.Object(i)||!this.pageEnd&&!t&&a>=this.first)return;if(i.__fc__&&i.__fc__.root===e&&this.ctxs[i.__fc__.id])return r(i.__fc__.loadChildrenPending(),i.__fc__),i.__fc__;let o=Wl(i),s=()=>!!(o.field&&this.fieldCtx[o.field]&&this.fieldCtx[o.field][0]!==i.__fc__);this.fc.targeabFormDriver(`loadRule`,{rule:o,api:this.api},this.fc),this.ruleEffect(o,`init`,{repeat:s()}),s()&&this.vm.emit(`repeat-field`,i,this.api);let c=i.__fc__||null,l=!1,u=c!==null,d=o.value;if(u){let t=c;if(d=t.defaultValue,t.deleted){if(Mu(t))return;t.update(this)}else if(!t.check(this)){if(Mu(t))return;e[a]=i=i._clone?i._clone():Zs(Ys(i)),c=null,l=!0}}if(c)c.originType!==c.rule.type&&c.updateType(),this.bindParser(c),this.appendValue(c.rule),c.parent&&c.parent!==t&&this.rmSubRuleData(c);else{let e=this.parseRule(i);c=new Du(this,e,d),this.bindParser(c)}this.parseEmit(c),this.syncProp(c),c.parent=t||null,c.root=e,this.setCtx(c),!l&&!u&&(this.effect(c,`load`),this.targetHook(c,`load`)),this.effect(c,`created`);let f=c.loadChildrenPending();if(c.parser.loadChildren===!1||r(f,c),!t){let e=n(a);e>-1||!a?this.sort.splice(e+1,0,c.id):this.sort.push(c.id)}let p=c.rule;return c.updated||(c.updated=!0,W.Function(p.update)&&this.bus.$once(`load-end`,()=>{this.refreshUpdate(c,p.value,`init`)}),this.effect(c,`loaded`)),this.refreshControl(c)&&(this.cycleLoad=!0),c}).filter(e=>!!e);t&&(t.children=i)},refreshControl(e){return e.input&&e.rule.control&&this.useCtrl(e)},useCtrl(e){let t=Au(e),n=[],r=this.api;if(!t.length)return!1;for(let i=0;i<t.length;i++){let a=t[i],o=a.handle||function(e){let t=Ql;return(t[a.condition||`==`]||t[`==`])(e,a.value)};if(!W.trueArray(a.rule))continue;let s=V(V({},a),{},{valid:Z(()=>o(e.rule.value,r)),ctrl:ju(e,a.rule),isHidden:W.String(a.rule[0])});s.valid&&s.ctrl||!s.valid&&!s.ctrl&&!s.isHidden||n.push(s)}if(!n.length)return!1;let i=[],a=!1;return this.deferSyncValue(()=>{n.reverse().forEach(({isHidden:t,valid:n,rule:o,prepend:s,append:c,child:l,ctrl:u,method:d})=>{if(t)n?e.ctrlRule.push({__ctrl:!0,children:o,valid:n}):u&&e.ctrlRule.splice(e.ctrlRule.indexOf(u)>>>0,1),i[n?`push`:`unshift`](()=>{d===`disabled`||d===`enabled`?this.api.disabled(!n,o):d===`display`||d===`show`?this.api.display(n,o):d===`required`?(o.forEach(e=>{this.api.setEffect(e,`required`,n)}),n||this.api.clearValidateState(o)):this.api.hidden(!n,o)});else if(n){a=!0;let t={type:`fragment`,native:!0,__ctrl:!0,children:o};e.ctrlRule.push(t),this.bus.$once(`load-start`,()=>{s?r.prepend(t,s,l):c||l?r.append(t,c||e.id,l):e.root.splice(e.root.indexOf(e.origin)+1,0,t)})}else{e.ctrlRule.splice(e.ctrlRule.indexOf(u),1);let t=ql(u);t&&t.rm()}})}),i.length&&(this.loading?i.length&&this.bus.$once(`load-end`,()=>{i.forEach(e=>e())}):i.length&&(0,u.nextTick)(()=>{i.forEach(e=>e())})),this.vm.emit(`control`,e.origin,this.api),this.effect(e,`control`),a},reloadRule(e){return this._reloadRule(e)},_reloadRule(e){e||(e=this.rules);let t=V({},this.ctxs);this.clearNextTick(),this.initData(e),this.fc.rules=e,this.deferSyncValue(()=>{this.bus.$once(`load-end`,()=>{Object.keys(t).filter(e=>this.ctxs[e]===void 0).forEach(e=>this.rmCtx(t[e])),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 ku(e){let t=nu();return Object.keys(t).forEach(n=>{G(e,n)||(e[n]=t[n])}),e}function Au(e){let t=e.rule.control||[];return W.Object(t)?[t]:t}function ju(e,t){for(let n=0;n<e.ctrlRule.length;n++){let r=e.ctrlRule[n];if(r.children===t)return r}}function Mu(e){return!!e.rule.__ctrl}function Nu(e){K(e.prototype,{setValue(e,t,n,r){e.deleted||(e.rule.value=t,this.changeStatus=!0,this.seabFormData(e,n),this.$render.clearCache(e),this.nextRefresh(),this.syncValue(),this.valueChange(e,t),this.vm.emit(`change`,e.field,t,e.origin,this.api,r||!1),this.effect(e,`value`),this.targetHook(e,`value`,{value:t}),this.emitEvent(`change`,e.field,t,{rule:e.origin,api:this.api,setFlag:r||!1}),r&&(0,u.nextTick)(()=>{(0,u.nextTick)(()=>{(0,u.nextTick)(()=>{this.api.clearValidateState(e.id)})})}),this.$manager.fieldChange(e,t,n,r))},onInput(e,t){let n;e.input&&(this.isQuote(e,n=e.parser.toValue(t,e))||this.isChange(e,t))&&this.setValue(e,n,t)},onUpdateValue(e,t){this.deferSyncValue(()=>{let n=e.getParentGroup(),r=n?this.subRuleData[n.id]:null,i={};Object.keys(t||{}).forEach(e=>{r&&G(r,e)?i[e]=t[e]:G(this.api.form,e)?this.api.form[e]=t[e]:this.api.top!==this.api&&G(this.api.top.form,e)&&(this.api.top.form[e]=t[e])}),Object.keys(i).length&&this.api.setChildrenFormData(n.rule,i)})},onBaseInput(e,t){this.seabFormData(e,t),this.$render.clearCache(e),this.nextRefresh()},seabFormData(e,t){e.modelValue=t;let n=e.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][e.field]=e.rule.value),U(this.formData,e.id,t)},rmSubRuleData(e){let t=e.getParentGroup();t&&this.subRuleData[t.id]&&delete this.subRuleData[t.id][e.field]},geabFormData(e){return this.formData[e.id]},syncForm(){let e=(0,u.reactive)({}),t=this.fields(),n=[];this.options.appendValue!==!1&&Object.keys(this.appendData).forEach(n=>{t.indexOf(n)===-1&&(e[n]=(0,u.toRef)(this.appendData,n))}),t.forEach(t=>{let r=(this.fieldCtx[t]||[]).filter(e=>!this.isIgnore(e))[0];r||(r=this.fieldCtx[t][0],n.push(t)),e[t]=(0,u.toRef)(r.rule,`value`)}),this.form=e,this.ignoreFields=n,this.syncValue()},isIgnore(e){return e.rule.ignore===!0||(e.rule.ignore===`hidden`||this.options.ignoreHiddenFields)&&e.hasHidden()},appendValue(e){(e.field&&G(this.appendData,e.field)||W.Undef(e.value)&&this.options.forceCoverValue)&&(e.value=this.appendData[e.field],delete this.appendData[e.field])},addSubForm(e,t){this.subForm[e.id]=t},deferSyncValue(e,t){this.deferSyncFn||(this.deferSyncFn=e),this.deferSyncFn.sync||(this.deferSyncFn.sync=t),Z(e),this.deferSyncFn===e&&(this.deferSyncFn=null,e.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;let e={};Object.keys(this.form).forEach(t=>{this.ignoreFields.indexOf(t)===-1&&(e[t]=this.form[t])}),this.vm.setupState.updateValue(e)},isChange(e,t){let n=this.geabFormData(e);if(n===t)return!1;let r=typeof n;return r===typeof t&&(r===`string`||r===`boolean`||r===`number`&&Number.isFinite(n)&&Number.isFinite(t))?!0:JSON.stringify(n,Pu)!==JSON.stringify(t,Pu)},isQuote(e,t){return(t instanceof Function||W.Object(t)||Array.isArray(t))&&t===e.rule.value},refreshUpdate(e,t,n,r){if(W.Function(e.rule.update)){let i=Z(()=>e.rule.update(t,e.origin,this.api,{origin:n||`change`,linkField:r}));if(i===void 0)return;e.rule.hidden=i===!0}},valueChange(e,t){this.refreshRule(e,t),this.bus.$emit(`change-`+e.field,t)},refreshRule(e,t,n,r){this.refreshControl(e)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit(`update`,this.api),this.refresh()),this.refreshUpdate(e,t,n,r)},appendLink(e){let t=e.rule.link;W.trueArray(t)&&t.forEach(t=>{let n=()=>this.refreshRule(e,e.rule.value,`link`,t);this.bus.$on(`change-`+t,n),e.linkOn.push(()=>this.bus.$off(`change-`+t,n))})},fields(){return Object.keys(this.fieldCtx)}})}function Pu(e,t){return typeof t==`function`?``+t:t}var Fu=[`field`,`value`,`vm`,`template`,`name`,`config`,`control`,`inject`,`sync`,`payload`,`optionsTo`,`update`,`slotUpdate`,`computed`,`component`,`cache`],Iu=Symbol(`oldValue`),Lu=[`$condition`,`$variableVal`,`$val`,`$form`,`$scope`,`$group`,`$rule`],Ru=[`$formulas`,`$form`,`$scope`,`$group`,`$rule`,`$api`],zu=new Map,Bu=1e3;function Vu(e,t){let n=e.join(`,`)+`|`+t,r=zu.get(n);return r||(zu.size>=Bu&&zu.clear(),r=Function(...e,t),zu.set(n,r)),r}function Hu(e){K(e.prototype,{scheduleComputedUpdate(e){(this._computedQueue||(this._computedQueue=[])).push(e),this._computedFlushing||this._computedScheduled||(this._computedScheduled=!0,setTimeout(()=>{this._computedScheduled=!1,this._computedFlushing=!0;try{let e=this._computedQueue||[];this._computedQueue=[];for(let t=0;t<e.length;t++)Z(e[t]),this._computedQueue&&this._computedQueue.length&&(e.push(...this._computedQueue),this._computedQueue=[])}finally{this._computedFlushing=!1}}))},getCtx(e){return this.getFieldCtx(e)||this.getNameCtx(e)[0]||this.ctxs[e]},getCtxs(e){return this.fieldCtx[e]||this.nameCtx[e]||(this.ctxs[e]?[this.ctxs[e]]:[])},setIdCtx(e,t,n){let r=`${n}Ctx`;this[r][t]?this[r][t].push(e):this[r][t]=[e]},rmIdCtx(e,t,n){let r=`${n}Ctx`,i=this[r][t];if(!i)return!1;let a=i.splice(i.indexOf(e)>>>0,1).length>0;return i.length||delete this[r][t],a},getFieldCtx(e){return(this.fieldCtx[e]||[])[0]},getNameCtx(e){return this.nameCtx[e]||[]},setCtx(e){let{id:t,field:n,name:r,rule:i}=e;this.ctxs[t]=e,r&&this.setIdCtx(e,r,`name`),e.input&&(this.setIdCtx(e,n,`field`),this.seabFormData(e,e.parser.toFormValue(i.value,e)),this.isMounted&&!this.reloading&&this.vm.emit(`change`,e.field,i.value,e.origin,this.api,!1,!0))},getParser(e){let t=this.fc.parsers,n=this.fc.renderDriver,r=q(e.type)||e.type;if(n){let t=n.parsers||{},i=t[e.originType]||t[r]||t[e.trueType];if(i)return i}return t[e.originType]||t[r]||t[e.trueType]||hu},bindParser(e){e.setParser(this.getParser(e))},getType(e){let t=this.fc.CreateNode.aliasMap;return q(t[e]||t[q(e)||e]||e)},noWatch(e){this.noWatchFn||(this.noWatchFn=e),Z(e),this.noWatchFn===e&&(this.noWatchFn=null)},watchCtx(e){let t=Rl().filter(e=>e[0]!==`_`&&e[0]!==`$`&&Fu.indexOf(e)===-1),n={},r=(t,n,r)=>(i,a)=>{let o=n.value;if(!this.isBreakWatch()){if(r&&e.parser.loadChildren===!1)this.$render.clearCache(e),this.nextRefresh();else{if(this.watching=!0,(0,u.nextTick)(()=>{this.targetHook(e,`watch`,{key:t,oldValue:a,newValue:o})}),t===`hidden`&&!!o!=!!a&&(0,u.nextTick)(()=>{this.targetHook(e,`hidden`,{value:o})}),t===`ignore`&&e.input||t===`hidden`&&(e.rule.ignore===`hidden`||this.options.ignoreHiddenFields))this.syncForm();else if(t===`link`){e.link();return}else[`props`,`on`,`deep`].indexOf(t)>-1?(this.parseInjectEvent(e.rule,o||{}),t===`props`&&e.input&&this.seabFormData(e,e.parser.toFormValue(e.rule.value,e))):t===`emit`?this.parseEmit(e):[`prefix`,`suffix`].indexOf(t)>-1?o&&this.loadFn(o,e.rule):t===`type`?(e.updateType(),this.bindParser(e)):r&&(W.Function(a)&&(a=e.getPending(`children`,[])),W.Function(o)&&(o=e.loadChildrenPending()),this.updateChildren(e,o,a));this.$render.clearCache(e),this.refresh(),this.watching=!1}}},i=(t,i=!1)=>{if(n[t])return;n[t]=!0;let a=e.refRule[t],o=t===`children`,s=r(t,a,o);e.watch.push((0,u.watch)(o?()=>W.Function(a.value)?a.value:[...a.value||[]]:()=>a.value,s,{deep:!o,flush:o?`sync`:`pre`})),i&&s(a.value,void 0)};if(t.forEach(t=>{e.refRule[t]=(0,u.toRef)(e.rule,t),G(e.rule,t)&&i(t)}),e.watch.push((0,u.watch)(()=>Object.keys(e.rule).join(`|`),()=>{t.forEach(t=>{!n[t]&&G(e.rule,t)&&i(t,!0)})})),e.refRule.__$title=(0,u.computed)(()=>{let t=(typeof e.rule.title==`object`?e.rule.title.title:e.rule.title)||``;if(t){let e=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(t=this.api.t(e[1]))}return t}),e.refRule.__$info=(0,u.computed)(()=>{let t=(typeof e.rule.info==`object`?e.rule.info.info:e.rule.info)||``;if(t){let e=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(t=this.api.t(e[1]))}return t}),e.refRule.__$validate=(0,u.computed)(()=>{let t=t=>{var n;let r=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return r?this.api.t(r[1],{title:(n=e.refRule)==null||(n=n.__$title)==null?void 0:n.value}):t};return fc(e.rule.validate).map(n=>{let r=V({},n);if(r.message&&(r.message=t(r.message)),W.Function(r.validator)){let t=e;r.validator=function(...e){return n.validator.call({that:this,id:t.id,field:t.field,rule:t.rule,api:t.$handle.api},...e)}}if(r.adapter){if(typeof r.error==`object`){let e=V({},r.error);Object.keys(e).forEach(n=>{e[n]=t(e[n])}),r.error=e}return this.adapterValidate(r,e)}return r})}),e.input){let t=(0,u.toRef)(e.rule,`value`);e.watch.push((0,u.watch)(()=>t.value,()=>{let n=e.parser.toFormValue(t.value,e);this.isChange(e,n)&&this.setValue(e,t.value,n,!0)}))}this.bus.$once(`load-end`,()=>{let t=e.rule.computed;t&&(typeof t!=`object`&&(t={value:t}),Object.keys(t).forEach(n=>{let r=(0,u.computed)(()=>{let r=t[n];if(!r)return;let i=this.compute(e,r);return(r.linkage||r.linkageVariable)&&i===Iu?Iu:i}),i=t=>{n===`value`?this.onInput(e,t):n[0]===`$`?this.api.setEffect(e.id,n,t):sc(e.rule,n,t)};(n===`value`?[void 0,null,``].indexOf(e.rule.value)>-1:r.value!==Q(e.rule,n))&&i(r.value),e.watch.push((0,u.watch)(r,e=>{e!==Iu&&this.scheduleComputedUpdate(()=>i(e))},{deep:!0}))}))}),this.watchEffect(e)},adapterValidate(e,t){return this.$manager.adapterValidate({required:e.required,message:e.message,trigger:e.trigger},(n,r)=>{if((e.beforeValidate&&Z(()=>e.beforeValidate({value:n,api:this.api,validate:e,rule:t.rule})))===!1)r();else{let i=this.validator(t,n,e);if(i){let n=``;typeof e.error==`object`&&(n=e.error[i]||e.error.default),!n&&typeof e.message==`string`&&(n=e.message),n||(n=this.getValidateMessage(t,{key:i,rule:e[i]})),r(n)}else if(e.validator){let t=e.validator&&Z(()=>e.validator(n,r));t&&W.Function(t.then)&&t.then(()=>r()).catch(e=>r(e))}else r()}})},getValidateMessage(e,t){var n;let r=Array.isArray(t.rule)?t.rule.join(`,`):``+t.rule;return this.api.t(t.key===`required`?t.key:`validate.`+t.key,{[t.key]:r,title:(n=e.refRule)==null||(n=n.__$title)==null?void 0:n.value})},validator(e,t,n){if(W.empty(t))return n.required?`required`:void 0;for(let[r,i]of Object.entries(n))switch(r){case`len`:case`maxLen`:case`minLen`:let n=e=>r===`len`?e===i:r===`maxLen`?e<=i:e>=i;if(Array.isArray(t)){if(!n(t.length))return r}else if(typeof t==`object`)return r;else if(!n((``+t).length))return r;break;case`pattern`:if(!(typeof i==`string`?new RegExp(i):i).test(``+t))return r;break;case`uppercase`:if(i&&(typeof t!=`string`||!/^[A-Z]*$/.test(t)))return r;break;case`lowercase`:if(i&&(typeof t!=`string`||!/^[a-z]*$/.test(t)))return r;break;case`min`:case`max`:case`positive`:case`negative`:case`integer`:case`number`:let a=Number(t);if(Number.isNaN(a)||r===`min`&&a<i||r===`max`&&a>i||r===`positive`&&a<=0||r===`negative`&&a>=0||r===`integer`&&!Number.isInteger(a))return r;break;case`equal`:if(t!==i)return r;break;case`enum`:if(Array.isArray(i)&&!i.includes(t))return r;break;case`hasKeys`:if(typeof t!=`object`||Array.isArray(i)&&i.some(e=>!(e in t)))return r;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(``+t))return r;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(``+t))return r;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(``+t))return r;break;case`phone`:if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(``+t))return r;break;case`computed`:if(!this.compute(e,i))return r}},compute(e,t){let n;if(typeof t==`object`){let n=e.getParentGroup(),r=t=>{if(t=Array.isArray(t)?{mode:`AND`,group:t}:t,!W.trueArray(t.group))return!0;let i=t.mode===`OR`,a=!0;for(let o=0;o<t.group.length;o++){let s=t.group[o],c,l=null,u=null;if(s.variable)u=this.fc.getLoadData(s.variable);else if(s.field)l=eu(s.field||``);else if(!s.mode)return!0;let d=s.compare;if(d&&(d=eu(d||``)),c=s.mode?r(s):Ql[s.condition]?W.Function(s.handler)?Z(()=>s.handler(this.api,e.rule)):Z(()=>Vu(Lu,`with($form){with($scope){with(this){with($group){ return $condition['${s.condition}'](${s.variable?`$variableVal`:l}, ${d||`$val`}); }}}}`).call(this.api.form,Ql,u,s.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},e.rule)):!1,i&&c)return!0;i||a&&(a=c)}return!i&&a},i=t,a=r(i);return a=i.invert===!0?!a:a,i.linkage?a?Z(()=>this.computeValue(i.linkage,e,n),void 0):Iu:i.linkageVariable?a?Z(()=>this.fc.getLoadData(i.linkageVariable),void 0):Iu:a}if(W.Function(t)){let r=t;n=()=>r(this.api.form,this.api,e.rule)}else{let r=e.getParentGroup();n=()=>this.computeValue(t,e,r)}return Z(n,void 0)},computeValue(e,t,n){let r=this,i=Object.keys(this.fc.formulas).reduce((e,n)=>(e[n]=function(...e){return r.fc.formulas[n].call({that:this,rule:t.rule,api:r.api,fc:r.fc},...e)},e),{});return Z(()=>Vu(Ru,`with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form,i,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},t.rule,this.api),void 0)},updateChildren(e,t,n){this.deferSyncValue(()=>{n&&n.forEach(n=>{(t||[]).indexOf(n)===-1&&n&&!W.String(n)&&n.__fc__&&n.__fc__.parent===e&&this.rmCtx(n.__fc__)}),W.trueArray(t)&&(this.loadChildren(t,e),this.bus.$emit(`update`,this.api))})},rmSub(e){W.trueArray(e)&&e.forEach(e=>{e&&e.__fc__&&this.rmCtx(e.__fc__)})},rmCtx(e){if(e.deleted)return;let{id:t,field:n,input:r,name:i}=e;Is(this.ctxs,t),Is(this.formData,t),Is(this.subForm,t),Is(this.vm.setupState.ctxInject,t);let a=e.getParentGroup();a&&this.subRuleData[a.id]&&Is(this.subRuleData[a.id],n),e.group&&Is(this.subRuleData,t),r&&this.rmIdCtx(e,n,`field`),i&&this.rmIdCtx(e,i,`name`),r&&!G(this.fieldCtx,n)&&Is(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(e.parser.loadChildren!==!1){let t=e.getPending(`children`,e.rule.children);W.trueArray(t)&&t.forEach(e=>e&&e.__fc__&&this.rmCtx(e.__fc__))}e.root===this.rules&&this.vm.setupState.renderRule()}},r);let o=this.sort.indexOf(t);return o>-1&&this.sort.splice(o,1),this.$render.clearCache(e),e.delete(),this.effect(e,`deleted`),this.targetHook(e,`deleted`),r&&!this.fieldCtx[n]&&this.vm.emit(`remove-field`,n,e.rule,this.api),e.rule.__ctrl||this.vm.emit(`remove-rule`,e.rule,this.api),e}})}function Uu(e){K(e.prototype,{mounted(){let e=()=>{this.isMounted=!0,this.lifecycle(`mounted`)};this.pageEnd?e():this.bus.$once(`page-end`,e)},lifecycle(e){this.fc.targeabFormDriver(e,this.api,this.fc),this.vm.emit(e,this.api),this.emitEvent(e,this.api)},emitEvent(e,...t){let n=this.options[e]||this.options[q(`on-`+e)||`on-`+e];if(n){let e=Xs(n);W.Function(e)&&Z(()=>e(...t))}this.bus.$emit(e,...t)},targetHook(e,t,n){var r;let i=(r=e.prop)==null||(r=r.hook)==null?void 0:r[t],a=(t,r)=>{t&&(Array.isArray(t)?t:[t]).forEach(t=>{Z(()=>t(V(V({args:Object.values(n||{})},n||{}),{},{self:e.rule,rule:e.rule,parent:r==null?void 0:r.rule,$f:this.api,api:this.api,option:this.vm.props.option})))})};a(i);let o=`deep`+Fs(t),s=e.parent;for(;s;){var c;a((c=s.prop)==null||(c=c.hook)==null?void 0:c[o],s),s=s.parent}}})}function Wu(e){K(e.prototype,{useProvider(){let e=this.fc.providers;Object.keys(e).forEach(t=>{let n=e[t];W.Function(n)&&(n=n(this.fc)),n._c=Ku(n),this.onEffect(n,t),this.providers[t]=n})},onEffect(e,t){let n=[];(e._c||[`*`]).forEach(r=>{let i=r===`*`?`*`:this.getType(r);n.indexOf(i)>-1||(n.push(i),this.bus.$on(`p:${t||e.name}:${i}:${+!!e.input}`,(t,n)=>{e[t]&&e[t](...n)}))}),e._used=n},watchEffect(e){let t={required:()=>{var t;return(G(e.rule,`$required`)?e.rule.$required:(t=e.rule)==null||(t=t.effect)==null?void 0:t.required)||!1}},n=e.rule.effect||{};Object.keys(n).forEach(e=>{t[e]=()=>n[e]}),Object.keys(e.rule).forEach(n=>{n[0]===`$`&&(t[n.substr(1)]=()=>e.rule[n])}),Object.keys(t).forEach(n=>{e.watch.push((0,u.watch)(t[n],t=>{this.effect(e,`watch`,{[n]:t})},{deep:!0}))})},ruleEffect(e,t,n){this.emitEffect({rule:e,input:!!e.field,type:this.getType(e.type)},t,n)},effect(e,t,n){this.emitEffect({rule:e.rule,input:e.input,type:e.trueType,ctx:e,custom:n},t)},getEffect(e,t){if(G(e,`$`+t))return e[`$`+t];if(G(e,`effect`)&&G(e.effect,t))return e.effect[t]},emitEffect({ctx:e,rule:t,input:n,type:r,custom:i},a,o){if(!r||[`fcFragment`,`fragment`].indexOf(r)>-1)return;let s=i||Object.keys(t).reduce((e,n)=>(n[0]===`$`&&(e[n.substr(1)]=t[n]),e),V({},t.effect||{}));Object.keys(s).forEach(i=>{let c=this.providers[i];if(!c||c.input&&!n)return;let l;if(!c._c)l=`*`;else if(c._used&&c._used.indexOf(r)>-1)l=r;else return;let u=V({value:s[i],getValue:()=>this.getEffect(t,i)},o||{});e&&(u.getProp=()=>e.effectData(i),u.clearProp=()=>e.clearEffectData(i),u.mergeProp=e=>Ul(u.getProp(),[e]),u.id=e.id),this.bus.$emit(`p:${i}:${l}:${+!!c.input}`,a,[u,t,this.api])})}})}function Gu(e){return e.filter(function(e,t,n){return n.indexOf(e,0)===t})}function Ku(e){let t=e.components;if(Array.isArray(t)){let e=Gu(t.filter(e=>e!==`*`));return e.length?e:!1}return W.String(t)?[t]:!1}function qu(e){Kl(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}}),K(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:(0,u.reactive)({}),subRuleData:(0,u.reactive)({}),subForm:{},form:(0,u.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(bu,[this]),this.api=e.extendApiFn.reduce((e,t)=>{let n=Z(()=>t(e,this));return n&&n!==e&&K(e,n),e},pu(this))}K(qu.prototype,{initData(e){K(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=V(V(V({},zs(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,n)=>{let r=this.options.beforeFetch&&Z(()=>this.options.beforeFetch(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):t()})},beforeFetch(e){return new Promise((t,n)=>{let r=e&&e.beforeFetch&&Z(()=>e.beforeFetch(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):r===!1?n():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,n)=>{let r=this.options.beforeSubmit&&Z(()=>this.options.beforeSubmit(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):r===!1?n():t()})}}),xu(qu),Cu(qu),Tu(qu),Ou(qu),Nu(qu),Hu(qu),Uu(qu),Wu(qu);var Ju=(0,u.defineComponent)({name:`fcFragment`,inheritAttrs:!1,props:[`vnode`],render(){return this.vnode}});function Yu(e){return Object.keys(e).map(t=>{let n=e[t],r=(0,u.resolveDirective)(t);if(r)return[r,n.value,n.arg,n.modifiers||{}]}).filter(e=>!!e)}function Xu(e,t){let n=e.directives;return n?(Array.isArray(n)||(n=[n]),(0,u.withDirectives)(t,n.reduce((e,t)=>e.concat(Yu(t)),[]))):t}function Zu(){let e={};class t{constructor(t){B(this,`aliasMap`,e),B(this,`vm`,void 0),B(this,`handle`,void 0),this.vm=t.vm,this.handle=t}make(e,t,n){return Xu(t,this.h(e,Yl(t),n))}makeComponent(e,t,n){try{return Xu(t,(0,u.createVNode)(e,Yl(t),n))}catch(e){return console.error(e),(0,u.createVNode)(``)}}h(e,t,n){let r=this.vm||(0,u.getCurrentInstance)();if(!r)throw Error(`Cannot create a node outside a component instance`);let i=r.appContext.config.isNativeTag(e),a=this.handle.fc.prop.components[e];!a&&i&&delete t.abFormInject;try{return(0,u.createVNode)(a||(i?e:(0,u.resolveComponent)(e)),t,n)}catch(e){return console.error(e),(0,u.createVNode)(``)}}static alias(t,n){e[t]=n}static use(n){Object.keys(n).forEach(r=>{let i=Ps(r),a=r.toLocaleLowerCase(),o=n[r];t.alias(r,o),[r,i,a].forEach(n=>{Object.assign(t.prototype,{[n]:function(t,i){return this.make(e[r]||n,t,i)}})})})}}return B(t,`aliasMap`,e),t}function Qu(e){class t extends $u{}return Object.assign(t.prototype,e),t}var $u=class{constructor(e){B(this,`$handle`,void 0),B(this,`vm`,void 0),B(this,`$render`,void 0),B(this,`$r`,void 0),B(this,`options`,void 0),B(this,`ref`,void 0),B(this,`mergeOptionsRule`,void 0),B(this,`key`,void 0),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=gc()}init(){}update(){}beforeRender(){}form(){return this.vm.refs[this.ref]}adapterValidate(e,t){return e.validator=(e,n,r)=>t(n,r),e}getSlot(e){let t=n=>n.slots[e]||(n.setupState.parent?t(n.setupState.parent):void 0);return t(this.vm)}mergeOptions(e,t){return ic(e.map(e=>this.tidyOptions(e)),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,n,r){}render(e){}};function ed(e,t){return Reflect.get(e,t)}function td(e,t,n){Reflect.set(e,t,n)}function nd(e,t){Reflect.deleteProperty(e,t)}var rd=function(e){return{name:`loadData`,_fn:[],loaded(t,n,r){this.deleted(t),(0,u.nextTick)(()=>{let i=fc(t.getValue()),a=[];i.forEach(i=>{if(i&&(i.attr||i.template||i.handler)){let o=a=>{var o;let s=n==null||(o=n.__fc__)==null?void 0:o.getParentGroup(),c;c=i.template?e.$handle.loadStrVar(i.template,a,s?{rule:n,value:e.$handle.subRuleData[s.id]||{}}:null):i.handler&&W.Function(i.handler)?i.handler(a,n,r):e.$handle.loadStrVar(`{{${i.attr}}}`,a,s?{rule:n,value:e.$handle.subRuleData[s.id]||{}}:null),(c==null||c===``)&&i.default!=null&&(c=i.default),i.copy!==!1&&(c=zs(c));let l=i.modify?n:t.getProp();i.to===`child`?l.children?l.children[0]=c:l.children=[c]:sc(l,i.to||`options`,c),r.sync(n)},s=e.watchLoadData(e=>o(e));o=oc(o,i.wait||300),i.watch===!1?s():a.push(s)}}),td(this._fn,t.id,a)})},watch(e,t,n){this.loaded(e,t,n)},deleted(e){var t;(t=ed(this._fn,e.id))==null||t.forEach(e=>{e()}),nd(this._fn,e.id),e.clearProp()}}},id=function(e){return{name:`t`,_fn:[],loaded(t,n,r){this.deleted(t);let i=t.getValue()||{},a=[];Object.keys(i).forEach(o=>{let s=i[o];if(s){let i=typeof s==`object`,c=a=>{let c=i?s:null,l=e.t(i?c==null?void 0:c.attr:s,i&&(c==null?void 0:c.params)||null,a),u=i&&c!=null&&c.modify?n:t.getProp();o===`child`?u.children?u.children[0]=l:u.children=[l]:sc(u,o,l),r.sync(n)},l=e.watchLoadData(e=>c(e));c=oc(c,(typeof s==`object`?s.wait:0)||300),typeof s!=`object`||s.watch!==!1?a.push(l):l()}}),td(this._fn,t.id,a)},watch(e,t,n){this.loaded(e,t,n)},deleted(e){var t;(t=ed(this._fn,e.id))==null||t.forEach(e=>{e()}),nd(this._fn,e.id),e.clearProp()}}},ad={name:`componentValidate`,load(e,t,n){let r=e.getValue();if(!r||typeof r==`object`&&`method`in r&&r.method===!1)e.clearProp(),n.clearValidateState([t.field]);else{let i=W.Object(r)&&r!==null?r:{method:r},a=i.method,o=V(V({},i),{},{validator(...r){let i=ql(t);if(i&&typeof i==`object`&&`id`in i)return n.exec(i.id,typeof a==`string`?a:`abFormValidate`,...r,{attr:e,rule:t,api:n})}});delete o.method,e.getProp().validate=[o]}},watch(e,t,n){ad.load(e,t,n)}},od={fetch:function(e){function t(e){return typeof e==`string`?{action:e,to:`options`}:e}function n(n,i,a){let o=n.value;r.deleted(n);let s=t(typeof o==`function`?o(i,a):o),c=t=>{t===void 0?n.clearProp():sc(n.getProp(),(s==null?void 0:s.to)||`options`,t),t!=null&&s!=null&&s.key&&e.$handle.options.globalData[s.key]&&e.fetchCache.set(e.$handle.options.globalData[s.key],{status:!0,data:t}),a.sync(i)};if(!s||!s.action&&!s.key){c(void 0);return}s=zs(s),s.to||(s.to=`options`);let l=s.onError,u=()=>!n.getValue()&&(n.clearProp(),a.sync(i),!0);td(r._fn,n.id,e.watchLoadData(oc((t,o)=>{var d;if(o&&(s==null?void 0:s.watch)===!1)return(d=ed(r._fn,n.id))==null?void 0:d();if(s!=null&&s.key){e.targetRule=i;let n=t(`$globalData.${s.key}`);if(delete e.targetRule,n){if(u())return;c(n)}return}let f=e.$handle.loadFetchVar(zs(s),t,i),p=V(V({headers:{}},f),{},{onSuccess(e,t){if(u())return;let n=e=>t?e:G(e,`data`)?Q(e,`data`):e,r=Xs(f.parse);typeof r==`function`?n=e=>r(e,i,a):typeof r==`string`&&(n=e=>Q(e,r)),dc(n(e)).then(e=>{c(e)})},onError(e){if(c(void 0),!u()){if(typeof l==`function`)l(e,i,a);else{let t=e&&typeof e==`object`&&`message`in e?e.message:void 0;Vs(t?String(t):`fetch fail ${f.action||``}`)}}}});e.$handle.beforeFetch(p,{rule:i,api:a}).then(()=>{typeof f.action==`function`?dc(f.action(i,a)).then(e=>{p.onSuccess(e,!0)}).catch(e=>{p.onError(e)}):Z(()=>e.create.fetch(p,{inject:n,rule:i,api:a}))}).catch(()=>{})},(s==null?void 0:s.wait)||600)))}let r={name:`fetch`,_fn:[],loaded(e,t,r){n(e,t,r)},watch(e,t,r){n(e,t,r)},deleted(e){var t;(t=ed(this._fn,e.id))==null||t(),nd(this._fn,e.id),e.clearProp()}};return r},loadData:rd,t:id,componentValidate:ad},sd={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(e=>W.String(e)).join(``)}}};function cd(e){e+=`=`;let t=decodeURIComponent(document.cookie).split(`;`);for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===` `;)r=r.substring(1);if(r.indexOf(e)===0){r=r.substring(e.length,r.length);try{return JSON.parse(r)}catch(e){return r}}}return null}function ld(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return t}return null}function ud(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return t}return null}function dd(e,t){if(!t)return null;let n=t.split(`.`),r=n.shift();if(!r)return null;let i=e(r);return n.length?i==null?null:Q(i,n):i}function fd(e){return dd(cd,e)}function pd(e){return dd(ld,e)}function md(e){return dd(ud,e)}var hd=typeof global==`object`&&global&&global.Object===Object&&global,gd=typeof self==`object`&&self&&self.Object===Object&&self,_d=hd||gd||Function(`return this`)(),vd=_d.Symbol,yd=Object.prototype,bd=yd.hasOwnProperty,xd=yd.toString,Sd=vd?vd.toStringTag:void 0;function Cd(e){var t=bd.call(e,Sd),n=e[Sd];try{e[Sd]=void 0;var r=!0}catch(e){}var i=xd.call(e);return r&&(t?e[Sd]=n:delete e[Sd]),i}var wd=Object.prototype.toString;function Td(e){return wd.call(e)}var Ed=`[object Null]`,Dd=`[object Undefined]`,Od=vd?vd.toStringTag:void 0;function kd(e){return e==null?e===void 0?Dd:Ed:Od&&Od in Object(e)?Cd(e):Td(e)}function Ad(e){return typeof e==`object`&&!!e}var jd=`[object Symbol]`;function Md(e){return typeof e==`symbol`||Ad(e)&&kd(e)==jd}function Nd(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Pd=Array.isArray,Fd=1/0,Id=vd?vd.prototype:void 0,Ld=Id?Id.toString:void 0;function Rd(e){if(typeof e==`string`)return e;if(Pd(e))return Nd(e,Rd)+``;if(Md(e))return Ld?Ld.call(e):``;var t=e+``;return t==`0`&&1/e==-Fd?`-0`:t}function zd(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var Bd=`[object AsyncFunction]`,Vd=`[object Function]`,Hd=`[object GeneratorFunction]`,Ud=`[object Proxy]`;function Wd(e){if(!zd(e))return!1;var t=kd(e);return t==Vd||t==Hd||t==Bd||t==Ud}var Gd=_d[`__core-js_shared__`],Kd=function(){var e=/[^.]+$/.exec(Gd&&Gd.keys&&Gd.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function qd(e){return!!Kd&&Kd in e}var Jd=Function.prototype.toString;function Yd(e){if(e!=null){try{return Jd.call(e)}catch(e){}try{return e+``}catch(e){}}return``}var Xd=/[\\^$.*+?()[\]{}|]/g,Zd=/^\[object .+?Constructor\]$/,Qd=Function.prototype,$d=Object.prototype,ef=Qd.toString,tf=$d.hasOwnProperty,nf=RegExp(`^`+ef.call(tf).replace(Xd,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function rf(e){return!zd(e)||qd(e)?!1:(Wd(e)?nf:Zd).test(Yd(e))}function af(e,t){return e==null?void 0:e[t]}function of(e,t){var n=af(e,t);return rf(n)?n:void 0}function sf(e,t){return e===t||e!==e&&t!==t}var cf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lf=/^\w*$/;function uf(e,t){if(Pd(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Md(e)?!0:lf.test(e)||!cf.test(e)||t!=null&&e in Object(t)}var df=of(Object,`create`);function ff(){this.__data__=df?df(null):{},this.size=0}function pf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var mf=`__lodash_hash_undefined__`,hf=Object.prototype.hasOwnProperty;function gf(e){var t=this.__data__;if(df){var n=t[e];return n===mf?void 0:n}return hf.call(t,e)?t[e]:void 0}var _f=Object.prototype.hasOwnProperty;function vf(e){var t=this.__data__;return df?t[e]!==void 0:_f.call(t,e)}var yf=`__lodash_hash_undefined__`;function bf(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=df&&t===void 0?yf:t,this}function xf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xf.prototype.clear=ff,xf.prototype.delete=pf,xf.prototype.get=gf,xf.prototype.has=vf,xf.prototype.set=bf;function Sf(){this.__data__=[],this.size=0}function Cf(e,t){for(var n=e.length;n--;)if(sf(e[n][0],t))return n;return-1}var wf=Array.prototype.splice;function Tf(e){var t=this.__data__,n=Cf(t,e);return n<0?!1:(n==t.length-1?t.pop():wf.call(t,n,1),--this.size,!0)}function Ef(e){var t=this.__data__,n=Cf(t,e);return n<0?void 0:t[n][1]}function Df(e){return Cf(this.__data__,e)>-1}function Of(e,t){var n=this.__data__,r=Cf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function kf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}kf.prototype.clear=Sf,kf.prototype.delete=Tf,kf.prototype.get=Ef,kf.prototype.has=Df,kf.prototype.set=Of;var Af=of(_d,`Map`);function jf(){this.size=0,this.__data__={hash:new xf,map:new(Af||kf),string:new xf}}function Mf(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Nf(e,t){var n=e.__data__;return Mf(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Pf(e){var t=Nf(this,e).delete(e);return this.size-=+!!t,t}function Ff(e){return Nf(this,e).get(e)}function If(e){return Nf(this,e).has(e)}function Lf(e,t){var n=Nf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Rf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Rf.prototype.clear=jf,Rf.prototype.delete=Pf,Rf.prototype.get=Ff,Rf.prototype.has=If,Rf.prototype.set=Lf;var zf=`Expected a function`;function Bf(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(zf);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Bf.Cache||Rf),n}Bf.Cache=Rf;var Vf=500;function Hf(e){var t=Bf(e,function(e){return n.size===Vf&&n.clear(),e}),n=t.cache;return t}var Uf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wf=/\\(\\)?/g,Gf=Hf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Uf,function(e,n,r,i){t.push(r?i.replace(Wf,`$1`):n||e)}),t});function Kf(e){return e==null?``:Rd(e)}function qf(e,t){return Pd(e)?e:uf(e,t)?[e]:Gf(Kf(e))}var Jf=1/0;function Yf(e){if(typeof e==`string`||Md(e))return e;var t=e+``;return t==`0`&&1/e==-Jf?`-0`:t}function Xf(e,t){t=qf(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Yf(t[n++])];return n&&n==r?e:void 0}function Zf(e,t,n){var r=e==null?void 0:Xf(e,t);return r===void 0?n:r}var Qf={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`}},$f={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}必须为数字`}},ep=((kl=window.localStorage)==null?void 0:kl.getItem(`lang`))||`zh-cn`,tp=(Al=(e=>({t:e=>Zf(ep===`zh-cn`?$f:Qf,e,e)}))())==null?void 0:Al.t;function np(...e){let t=e.length===1?e[0]:e[1],n=e.length===1?t==null?void 0:t.name:e[0];return{id:typeof n==`string`?n:void 0,prop:t}}function rp(e={}){let t=e.key||[],n=e.array||[],r=e.normal||[];Fl.push(...t),Il.push(...n),Ll.push(...r),iu([...t,...n,...r])}var ip=1,ap={},op=Symbol(`defValue`);function sp(e){let t={[Ju.name||`fcFragment`]:Ju},n={},r={},i={},a={},o=[],s=[],c=e.extendApi?[e.extendApi]:[],l=V({},od),d=su(),f={global:{}},p=e.isMobile===!0,m=(0,u.reactive)({$mobile:p}),h=Zu(),g={},_={};rp(e.attrs||{});function v(e){let t=ap[e];if(Array.isArray(t))return t.map(e=>e.api());if(t)return t.api()}function y(e){o.push(e)}function b(...e){let t=np(...e);t.id&&t.prop&&(r[t.id]=t.prop)}function x(...e){let t=np(...e);t.id&&t.prop&&(l[t.id]=W.Function(t.prop)?t.prop:V(V({},t.prop),{},{name:t.id}))}function S(e){h.use(e)}function C(...e){let t=e[0];if(arguments.length===0)return hu;if(typeof t==`string`&&arguments.length===1)return n[q(t)||t];let r=np(...e);if(!r.id||!r.prop)return hu;let i=q(r.id),a=r.prop,o=a.merge===!0?n[i]:void 0;n[i]=Xl(a,o||hu),d[i]=$(i),a.maker&&K(d,a.maker)}function w(e,r){let i,a=r;if(typeof e==`string`){if(i=e,a===void 0)return t[i]}else{let t=e;i=t.displayName||t.name,a=e}if(!i||!a)return;let o=q(i),s=Ps(i);t[i]=a,t[o]=a,t[s]=a,delete h.aliasMap[i],delete h.aliasMap[o],delete h.aliasMap[s],delete n[i],delete n[o],delete n[s];let c=a.abFormParser;c&&C(i,c)}function T(){return Pl(se,t,r)}function E(e,t){let n=T();return(0,u.createApp)({data(){return(0,u.reactive)({rule:e,option:t})},render(){return(0,u.h)(n,V({ref:`fc`},this.$data))}})}function D(){return Ju}function ee(e,t){let n=Reflect.get(e,`install`);return W.Function(n)?n(O,t):typeof e==`function`&&e(O,t),this}let O=function(e,t){let n=E(e,t||{});o.forEach(e=>{Z(()=>e(O,n))});let r=document.createElement(`div`);return((t==null?void 0:t.el)||document.body).appendChild(r),n.mount(r).$refs.fc.fapi};Xl(O,_);function k(a){let s=V({},e);return a?s.inherit={components:t,parsers:n,directives:r,modelFields:i,providers:l,useApps:o,maker:d,formulas:g,loadData:m}:delete s.inherit,sp(s)}function A(e,t){i[e]=t}function te(e,t){g[e]=t}function j(e,t){let n=a[e]||{},r=n.parsers||{};t.parsers&&Object.keys(t.parsers).forEach(e=>{r[e]=Xl(t.parsers[e],hu)}),t.name=e,a[e]=V(V(V({},n),t),{},{parsers:r})}function M(e){e&&Object.keys(ap).forEach(t=>{(Array.isArray(ap[t])?ap[t]:[ap[t]]).forEach(t=>{t.bus.$emit(`$loadData.`+e)})})}function N(e,t){sc(m,e,t),M(e)}function ne(e,t){let n=(...e)=>Z(()=>t(...e));n._driver=!0,N(e,n)}function re(e,t){let n=(e||``).split(`.`);e=n.shift()||``;let r=n.join(`.`);if(G(m,e)||(m[e]=op),m[e]!==op){let i=m[e];return i&&i._driver?i=i(r):n.length&&(i=Q(i,n)),i==null||i===``?t:i}return t}function ie(e){c.push(e)}function ae(e){delete m[e],M(e)}function oe(e,t){s.push({name:e,callback:t})}function se(o){K(this,{id:ip++,create:O,vm:o,manager:Qu(e.manager||{}),parsers:n,providers:l,modelFields:i,formulas:g,isMobile:p,rules:o.props.rule,name:o.props.name||gc(),inFor:o.props.inFor,prop:{components:t,directives:r},get:null,drivers:a,renderDriver:null,refreshData:M,loadData:m,CreateNode:h,bus:lc(),unwatch:new Set,options:(0,u.ref)({}),extendApiFn:c,fetchCache:new WeakMap,tmpData:(0,u.reactive)({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),s.forEach(e=>{this.bus.$on(e.name,e.callback)}),(0,u.nextTick)(()=>{(0,u.watch)(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),K(o.appContext.components,t),K(o.appContext.directives,r),this.$handle=Reflect.construct(qu,[this]),this.name&&(this.inFor?(ap[this.name]||(ap[this.name]=[]),ap[this.name].push(this)):ap[this.name]=this)}se.isMobile=p,K(se.prototype,{init(){this.isSub()&&this.unwatch.add((0,u.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(e,...t){this.bus.$emit(e,...t);let n=this.renderDriver;if(n&&n[e])return Z(()=>n[e](...t))},t(e,t,n){let r=n?n(`$t.`+e):this.globalLanguageDriver(e);return r!=null||(r=``),r&&t&&Object.keys(t).forEach(e=>{let n=RegExp(`{${e}}`,`g`);r=r.replace(n,t[e])}),r},globalDataDriver(e){var t;let n=e.split(`.`),r=n.shift()||``,i=(t=this.options.value)==null?void 0:t.globalData,a=i==null?void 0:i[r];if(a){if(a.type===`static`)return Q(a.data,n);{let e,t=this.fetchCache.get(a);if(t){if(t.status&&(e=Q(t.data,n)),!t.loading)return e;t.loading=!1,this.fetchCache.set(a,t)}else this.fetchCache.set(a,{status:!1});let o=oc(()=>{c();let e=this.fetchCache.get(a);i&&Object.values(i).indexOf(a)!==-1?(e&&(e.loading=!0,this.fetchCache.set(a,e)),this.bus.$emit(`$loadData.$globalData.`+r)):this.fetchCache.delete(a)},a.wait||600),s=e=>{this.fetchCache.set(a,{status:!0,data:e}),this.bus.$emit(`$loadData.$globalData.`+r)},c=this.watchLoadData((e,t)=>{if(t&&a.watch===!1)return c();if(t){o();return}let n=this.$handle.loadFetchVar(cc(a),e);n.targetRule=this.targetRule,this.$handle.api.fetch(n).then(e=>{s(e)}).catch(()=>{s(null)})});return a.watch===!1&&c(),e}}},getLocale(){let e=this.vm.setupState.top.props.locale;return e&&typeof e==`object`?e.name:typeof e==`string`?e:`zh-cn`},globalLanguageDriver(e){var t;let n=this.vm.setupState.top.props.t,r=this.vm.setupState.top.props.locale,i;return n&&(i=Z(()=>n(e))),i==null&&r&&typeof r==`object`&&(i=Q(r,e)),i!=null||(i=Q((((t=this.options.value)==null?void 0:t.language)||{})[this.getLocale()]||{},e),i!=null||(i=tp(e))),i},globalVarDriver(e){var t;let n=e.split(`.`),r=n.shift()||``,i=(t=this.options.value)==null||(t=t.globalVariable)==null?void 0:t[r];if(i){let e=W.Function(i)?i:Xs(i.handle);if(e)return Q(e((...e)=>this.$handle.api.getData(...e),this.$handle.api),n)}},setData(e,t,n){n?N(e,t):(sc(this.vm.setupState.top.setupState.fc.tmpData,e,t),this.bus.$emit(`$loadData.`+e))},getLoadData(e,t){let n=null;if(e!=null){let t=e.split(`.`),r=t.shift();if(n=Q(this.vm.setupState.top.setupState.fc.tmpData,e),n!=null)return n;if(r===`$topForm`)n=this.$handle.api.top.formData(!0);else if(r===`$scopeForm`)n=this.$handle.api.scope.formData(!0);else if(r===`$form`)n=this.$handle.api.formData(!0);else if(r===`$options`)n=this.options.value;else if(r===`$globalData`)n=this.globalDataDriver(t.join(`.`)),t=[];else if(r===`$var`)n=this.globalVarDriver(t.join(`.`)),t=[];else if(r===`$locale`)n=this.getLocale(),t=[];else if(r===`$t`)n=this.globalLanguageDriver(t.join(`.`)),t=[];else if(r===`$preview`)return this.$handle.preview;else n=re(e),t=[];n&&t.length&&(n=Q(n,t))}return n==null||n===``?t:n},watchLoadData(e,t){let n={},r=t=>{this.get||(this.get=i),Z(()=>{e(i,t)}),this.get===i&&(this.get=void 0)},i=(e,i)=>{let a;if(typeof e==`object`&&(a=e.getValue,e=e.id),n[e])return n[e].val;let o=(0,u.computed)(()=>a?a():this.getLoadData(e,i)),s=e.split(`.`),c=s.shift(),l=s.shift()||``,d=oc(()=>{let t=a?a():this.getLoadData(e,i);if(n[e])((t instanceof Function||W.Object(t)||Array.isArray(t))&&t===n[e].val||JSON.stringify(t)!==JSON.stringify(n[e].val))&&(n[e].val=t,r(!0));else return},t||0),f=(0,u.watch)(o,e=>{d()});return this.bus.$on(`$loadData.`+c,d),l&&this.bus.$on(`$loadData.`+c+`.`+l,d),n[e]={fn:()=>{this.bus.$off(`$loadData.`+c,d),l&&this.bus.$off(`$loadData.`+c+`.`+l,d),f()},val:o.value},o.value};r(!1);let a=()=>{Object.keys(n).forEach(e=>n[e].fn()),n={},this.unwatch.delete(a)};return this.unwatch.add(a),a},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let e=V({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},zs(f)),t=this.isSub();t&&(e=this.mergeOptions(e,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),e=this.mergeOptions(e,this.vm.props.option);let n=this.api();this.targeabFormDriver(`initOptions`,e,{api:n,isSubForm:t}),this.updateOptions(e)},mergeOptions(e,t,n){return t=V({},t||{}),n&&[`page`,`onSubmit`,`onReset`,`onCreated`,`onChange`,`onMounted`,`mounted`,`beforeUnmount`,`beforeSubmit`,`onBeforeUnmount`,`onReload`,`reload`,`formData`,`el`,`globalClass`,`style`].forEach(e=>{delete t[e]}),t.global&&(e.global=Gl(e.global,t.global),delete t.global),this.$handle.$manager.mergeOptions([t],e),e},updateOptions(e){this.options.value=this.mergeOptions(this.options.value,e),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(Z(()=>this.$handle.lifecycle(`beforeUnmount`)),this.name){if(this.inFor){let e=ap[this.name].indexOf(this);ap[this.name].splice(e,1)}else delete ap[this.name]}s.forEach(e=>{this.bus.$off(e.name,e.callback)}),this.tmpData={},[...this.unwatch].forEach(e=>e()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit(`next-tick`,this.$handle.api))}});function ce(t){K(t,{version:e.version,ui:e.ui,isMobile:p,extendApi:ie,getData:re,setDataDriver:ne,setData:N,removeData:ae,refreshData:M,maker:d,component:w,directive:b,setModelField:A,seabFormula:te,setDriver:j,register:x,$vnode:D,parser:C,use:ee,factory:k,componentAlias:S,copyRule:Bl,copyRules:Vl,mergeRule:Ul,fetch:uu,$form:T,parseFn:Xs,parseJson:Zs,toJson:Ys,useApp:y,getApi:v,on:oe})}function le(t){K(t,{create:O,install(n,r){f=V(V({},f),r||{});let i=`_installedAbForm${p?`Mobile`:``}_${e.ui}`,a=n;if(a[i]===!0)return;a[i]=!0;let s=function(e,t={}){return O(e,t,this)};ce(s),n.config.globalProperties.$abForm=s;let c=T();n.component(c.name,c),o.forEach(e=>{Z(()=>e(t,n))})}})}if(ce(_),le(_),ne(`$cookie`,fd),ne(`$localStorage`,pd),ne(`$sessionStorage`,md),h.use({fragment:`fcFragment`}),e.install&&O.use(e),y((e,t)=>{t.mixin({props:[`abFormInject`],emits:[`fc.updateValue`,`fc.el`]})}),C(sd),e.inherit){let a=e.inherit;a.components&&K(t,a.components),a.parsers&&K(n,a.parsers),a.directives&&K(r,a.directives),a.modelFields&&K(i,a.modelFields),a.providers&&K(l,a.providers),a.useApps&&K(o,a.useApps),a.maker&&K(d,a.maker),a.loadData&&K(m,a.loadData),a.formulas&&K(g,a.formulas)}let P=T();return Xl(P,_),Object.defineProperties(P,{fetch:{get(){return _.fetch},set(e){_.fetch=e}}}),P.util=_,P}function cp(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function lp(e,t){if(e==null)return{};var n,r,i=cp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var up=[`children`],{t:dp}=z(),{isZhCN:fp}=R(),pp={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:[fp()?`¥`:`$`]}]},inputPercent:{align:`right`,children:[{type:`span`,slot:`suffix`,children:[`%`]}]},switch:{align:`center`},colorPicker:{props:{showAlpha:!0,predefine:[`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)`]}},divider:{props:{contentPosition:`left`}}};function mp(e,t={}){let{type:n,disabledDate:r,shortcuts:i}=e||{},a=pp[n||``];if(n===`datePicker`){if(r===!0&&(a=rs({},a,{props:{disabledDate:gp}})),i===!0){let t=dr(e,`props.type`)===`daterange`;a=rs({},a,{props:{shortcuts:t?vp:_p}})}}else n===`treeSelect`&&dr(e,`props.multiple`)&&(a=rs({},a,pp.treeSelectMultiple));if(!a)return e;let o=t.includeChildren!==!1,{children:s}=a,c=lp(a,up),l=rs({},o?a:c,e);return o&&s?V(V({},l),{},{children:hp(s,e.children)}):l}function hp(e,t){if(t===void 0)return e;if(!Array.isArray(t))return t;let n=new Set(t.map(e=>e==null?void 0:e.slot).filter(Boolean));return[...e.filter(e=>!e.slot||!n.has(e.slot)),...t]}function gp(e){return e.getTime()>Date.now()}var _p=[{text:dp(`today`),value:()=>(0,J.default)().startOf(`day`).valueOf()},{text:dp(`yesterday`),value:()=>(0,J.default)().subtract(1,`days`).startOf(`day`).valueOf()},{text:dp(`lastWeek`),value:()=>(0,J.default)().subtract(1,`weeks`).startOf(`week`).valueOf()}],vp=[{text:dp(`today`),value:()=>[(0,J.default)().startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:dp(`yesterday`),value:()=>[(0,J.default)().subtract(1,`days`).startOf(`day`).valueOf(),(0,J.default)().subtract(1,`days`).endOf(`day`).valueOf()]},{text:dp(`lastWeek`),value:()=>[(0,J.default)().subtract(1,`weeks`).startOf(`week`).valueOf(),(0,J.default)().subtract(1,`weeks`).endOf(`week`).valueOf()]},{text:dp(`last7`),value:()=>[(0,J.default)().subtract(7,`days`).startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:dp(`last30`),value:()=>[(0,J.default)().subtract(30,`days`).startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:dp(`thisMonth`),value:()=>[(0,J.default)().startOf(`month`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:dp(`thisYear`),value:()=>[(0,J.default)().startOf(`year`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]}];function yp(e,t=[]){let n=[],r=new Map;for(let a of e){var i;let e=typeof a.group==`string`?a.group?[a.group]:[]:(i=a.group)==null?[]:i;if(!Array.isArray(e)||e.some(e=>typeof e!=`string`||!e.trim()))throw TypeError(`Table column group must be a non-empty name or an array of non-empty names.`);if(!e.length){n.push(a);continue}let o=n,s=[],c;for(let n of e){s.push(n);let e=JSON.stringify(s),i=r.get(e);i||(i={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,s]))}`,title:n,children:[]},r.set(e,i),o.push(i)),c=i,o=i.children}c&&a.groupAlign!==void 0&&(c.groupAlign=a.groupAlign),o.push(a)}return n}function bp(e,t){let n=e.sortData;if(!n)return e;let r=new Map,i=new Set;function a(e,t){for(let o of e){var n;let e=o.getKey();e&&(r.set(e,t),o.defaultVisible===!1&&i.add(e),(n=o.children)!=null&&n.length&&a(o.children,e))}}a(t,null);let o=new Set;function s(e,t){return e.some(e=>{if(!e||typeof e.k!=`string`||e.c!==void 0&&!Array.isArray(e.c))return!0;let{k:n,c:i}=e;return o.has(n)||r.has(n)&&r.get(n)!==t?!0:(o.add(n),i?s(i,n):!1)})}if(!(Array.isArray(n)?s(n,null):typeof n!=`object`||Object.keys(n).some(e=>r.has(e)&&r.get(e)!==null)))return e;let c=e.visibleData&&V({},e.visibleData);if(c)for(let e of i)c[e]===!0&&delete c[e];return V(V({},e),{},{sortData:void 0,visibleData:c})}function xp(e){let t=(0,u.reactive)(new Map),n=new WeakMap,r=new Set;function i(e){return typeof e.getRule==`function`?e.getRule():e}function a(e){let r=n.get(e);if(!r){let t={};r={rule:e,pending:t,getPending(e,n){return t[e]&&t[e].value||n},setPending(e,n,r){t[e]={origin:n,value:(0,u.reactive)(r)}}},n.set(e,r)}let i=_u(r,e.options,{onLoad:n=>t.set(e,n),onUpdate:n=>t.set(e,n),onReload:()=>{t.set(e,[]),a(e)}});t.set(e,i)}function o(e,n){for(let r of e){let e=i(r);n.has(e)||(n.add(e),typeof e.options==`function`?a(e):t.delete(e),Array.isArray(e.children)&&o(e.children,n))}}(0,u.watchEffect)(()=>{let n=new Set;o(e(),n);for(let e of r)n.has(e)||(r.delete(e),t.delete(e));n.forEach(e=>r.add(e))});function s(e,n,r){let a=i(e),o=t.get(a),c=[...n,a.field?`field:${a.field}`:`index:${r}`],l=Array.isArray(a.children)?yp(a.children.map((e,t)=>s(e,c,t)),c):a.children,u=Array.isArray(l)&&l.some((e,t)=>e!==a.children[t]),d=a;return(typeof a.options==`function`||u)&&(d=V(V(V({},a),typeof a.options==`function`?{options:o}:{}),{},{children:l})),mp(d,{includeChildren:!1})}return(0,u.computed)(()=>yp(e().map((e,t)=>s(e,[],t))))}function Sp(e,t){for(let n of e){if(n.field===t)return n;if(n.children){let e=Sp(n.children,t);if(e)return e}}}function Cp(e,t,n,r){var i;if(!n)return e;let a=(i=n.footerFormatter)==null?al(n).formatter:i;return a?a({cellValue:e,row:t,column:r==null?n:r}):e}function wp(e,t,n,r,i){var a;if(typeof e.labelField!=`string`||!e.labelField.trim()||!Array.isArray(e.fields))throw TypeError(`AbTable footerSummary requires a labelField and a fields array.`);let o=new Set([e.labelField]),s=[],c=[],l=e=>{if(!e.trim()||o.has(e)||[`__proto__`,`constructor`,`prototype`].includes(e))throw TypeError(`AbTable footerSummary has an invalid or duplicate field: "${e}".`);o.add(e)};if([`__proto__`,`constructor`,`prototype`].includes(e.labelField))throw TypeError(`AbTable footerSummary has an invalid labelField.`);for(let t of e.fields)if(typeof t==`string`)l(t),s.push(t);else{if(!t||typeof t!=`object`||Array.isArray(t)||!Object.keys(t).length)throw TypeError(`AbTable footerSummary fields must be field names or objects of callbacks.`);for(let[e,n]of Object.entries(t)){if(l(e),typeof n!=`function`)throw TypeError(`AbTable footerSummary handler for "${e}" must be a function.`);c.push([e,n])}}let u={};for(let e of s){let n=null;for(let r of t){var d;let t=r[e];if(!(t==null||typeof t==`string`&&!t.trim())){if(typeof t!=`number`&&typeof t!=`string`||!Number.isFinite(Number(t)))throw TypeError(`AbTable footerSummary field "${e}" must contain numbers or numeric strings.`);if(n=((d=n)==null?0:d)+Number(t),!Number.isFinite(n))throw RangeError(`AbTable footerSummary total for "${e}" is not finite.`)}}u[e]=n}for(let[e,n]of c){let r=t.length?n({rows:t,totals:Object.freeze(V({},u))}):null;if(r!==null&&(typeof r!=`number`||!Number.isFinite(r)))throw TypeError(`AbTable footerSummary handler for "${e}" must return a finite number or null.`);u[e]=r}let f=V({[e.labelField]:(a=e.label)==null?r:a},u),p=V({},f);for(let[e,t]of Object.entries(u))p[e]=t===null?`-`:Cp(t,f,Sp(n,e),i(e));return p}var Tp=(0,u.defineComponent)(V(V({},{name:`AbTable`}),{},{__name:`ab-table`,props:(0,u.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:(0,u.mergeModels)([`update:modelValue`,`changed`,`cellClick`,`current-change`,`after-loaded`,`operated`],[`update:query`]),setup(e,{expose:t,emit:n}){var r;let i=n,a=e,{t:o}=z(),s=(0,f.useRoute)(),c=(0,u.ref)(null),l=(0,u.ref)(),d=(0,u.ref)();(0,u.inject)(`abToolbarRef`,null);let p=(0,u.ref)([]),m=(0,u.ref)(a.id||String((r=(0,u.getCurrentInstance)())==null?void 0:r.uid)||s.path),h=xp(()=>a.rule),g=(0,u.computed)(()=>{let e=[];return a.editable&&Zo(a.rule||[],t=>t.field&&t.edit?e.push(t.field):void 0),e}),_=({column:e})=>{var t;return typeof a.headerCellClassName==`function`?a.headerCellClassName({column:e}):(t=g.value)!=null&&t.includes(e.field)?`primary`:null},v=(0,u.computed)(()=>!(!a.readonly||a.multiSelect||a.singleSelect)),{wsCache:y}=R(),b=(0,u.computed)(()=>y.getCurrentSize||`default`),x=(0,u.computed)(()=>gl(b.value)),S={useKey:!0,resizable:!0},C=(0,u.reactive)({useKey:!0,isHover:!0,isCurrent:a.isCurrent,drag:a.dragable}),w=a.compactMode?{padding:!1,height:30}:void 0,T=a.dragable?(0,u.reactive)({trigger:`row`,showGuidesStatus:!0}):void 0,E=(0,u.reactive)({immediate:!0,storage:!0,restoreStore:({$table:e,storeData:t})=>{let n=bp(t,e.getFullColumns());return n!==t&&console.warn(`[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored.`),n}}),D=(0,u.reactive)({filename:`${a.title||(s==null?void 0:s.meta.title)}_${(0,J.default)().format(`YYYYMMDD`)}`,columns:ts($o(a.rule,e=>e.field!==X.OPERATE),e=>({field:e.field}))}),ee=function(){var e=H(function*(e,t){var n;let r=d.value,i=$o(a.rule,e=>(e==null?void 0:e.field)&&(e==null?void 0:e.field)!==`operate`&&!e.hidden),o=!!a.parentIdField&&((n=fe.value)==null?void 0:n.expandAll);if(t){let t=r==null?void 0:r.getCheckboxRecords();if(!(t!=null&&t.length))return;r==null||r.exportData({data:t,columns:i,isAllExpand:o,filename:e})}else r==null||r.exportData({columns:i,isAllExpand:o,filename:e})});return function(t,n){return e.apply(this,arguments)}}(),O=e=>{var t,n;return(t=d.value)==null||(n=t.getColumnByField)==null?void 0:n.call(t,e)},k=(0,u.computed)(()=>a.footerSummary?[wp(a.footerSummary,p.value,h.value,o(`table.total`),O)]:[]),A=(0,u.useModel)(e,`query`),te=(0,u.ref)(0),j=(0,u.ref)(1),M=(0,u.ref)(10),N=(0,u.ref)(``),ne=(0,u.ref)(``),re=(0,u.ref)(``),ie=(0,u.computed)(()=>{var e,t,n,r,i,o,s,c,l,u;return{pageNo:(e=(t=a.pagerConfig)==null?void 0:t.pageNoField)==null?`pageNo`:e,pageSize:(n=(r=a.pagerConfig)==null?void 0:r.pageSizeField)==null?`pageSize`:n,sortFieldTable:(i=(o=a.pagerConfig)==null?void 0:o.sortFieldTableField)==null?`sortFieldTable`:i,sortField:(s=(c=a.pagerConfig)==null?void 0:c.sortFieldField)==null?`sortField`:s,sortType:(l=(u=a.pagerConfig)==null?void 0:u.sortTypeField)==null?`sortType`:l}}),ae=(0,u.computed)(()=>{var e;return((e=a.pagerConfig)==null?void 0:e.layouts)||[`Home`,`PrevJump`,`PrevPage`,`Number`,`NextPage`,`NextJump`,`End`,`Sizes`,`FullJump`,`Total`]});function oe(){var e,t,n,r,i,a;let o=(e=A.value)==null?{}:e,s=ie.value,c=(t=o[s.pageNo])==null?1:t,l=(n=o[s.pageSize])==null?10:n,u=(r=o[s.sortFieldTable])==null?``:r,d=(i=o[s.sortField])==null?``:i,f=(a=o[s.sortType])==null?``:a;if(!Number.isInteger(c)||Number(c)<1||!Number.isInteger(l)||Number(l)<1)throw TypeError(`AbTable pageNo and pageSize must be positive integers.`);if(typeof u!=`string`||typeof d!=`string`||typeof f!=`string`)throw TypeError(`AbTable sort fields must be strings.`);j.value=Number(c),M.value=Number(l),N.value=u,ne.value=d,re.value=f}let se=function(){var e=H(function*({currentPage:e,pageSize:t}){j.value=e,M.value=t,yield De()});return function(t){return e.apply(this,arguments)}}(),ce=(0,u.reactive)({trigger:`cell`,remote:!a.sortLocally}),le=function(){var e=H(function*({field:e,order:t,column:n}){if(t){var r,i,o,s;let c=(r=(i=(o=n.params)==null?void 0:o.sortFieldTable)==null?a.idFieldTable:i)==null?``:r,l=((s=n.params)==null?void 0:s.sortField)||e;if(typeof c!=`string`||typeof l!=`string`)throw TypeError(`AbTable column sortFieldTable and sortField must be strings.`);N.value=c,ne.value=l.replace(/[A-Z]/g,e=>`_`+e.toLowerCase()),re.value=t}else{var c;N.value=(c=a.idFieldTable)==null?``:c,ne.value=a.idField||`id`,re.value=`desc`}yield je()});return function(t){return e.apply(this,arguments)}}(),P=(0,u.computed)(()=>a.editable&&!v.value?{trigger:`click`,mode:`row`,showStatus:!0}:void 0),ue=(0,u.ref)(a.editable),de=(0,u.computed)(()=>!a.parentIdField),fe=(0,u.computed)(()=>{if(!a.parentIdField)return;let e={transform:!0,accordion:a.accordion,rowField:a.idField||`id`,parentField:a.parentIdField||`parentId`,hasChildField:a.hasChildField||`hasChildren`,expandAll:!0};return typeof a.lazyMethod==`function`&&(e.lazy=!0,e.loadMethod=a.lazyMethod),e}),pe=a.singleSelect?{labelField:`name`,trigger:`row`}:void 0,me=Ho(e=>i(`current-change`,{newValue:e}),100),he=({row:e,column:t})=>{if((t==null?void 0:t.field)===X.OPERATE)return;let n=d.value;a.editable&&!v.value||n==null||n.clearCheckboxRow(),n==null||n.setCheckboxRow(e,!0),i(`cellClick`,{row:e,column:t})},ge=()=>{var e;let t=(e=d.value)==null?void 0:e.getRadioRecord();me(t)};C.isCurrent=(0,u.computed)(()=>a.multiSelect||a.multiSelect===void 0&&a.editable).value||a.singleSelect||a.absDragable||a.isCurrent;let _e=(0,u.reactive)({highlight:a.multiSelect&&a.editable,range:!a.parentIdField}),ve=()=>{var e;let t=(e=d.value)==null?void 0:e.getCheckboxRecords();me(t)},ye=({newValue:e,column:t})=>{(t==null?void 0:t.field)!==X.OPERATE&&me(e)},be=(0,u.ref)(a.maxHeight||0),xe={mini:36,small:40,medium:44,large:48},Se=xe[x.value||`medium`]||xe.medium,Ce=(0,u.ref)([10,15,20,50,100]),we=()=>{var e,t,n,r,i;if(!a.autoHeight){a.maxHeight&&(be.value=a.maxHeight);return}(e=d.value)!=null&&(e=e.cellConfig)!=null&&e.height&&(Se=d.value.cellConfig.height);let o=(t=c.value)==null?void 0:t.parentElement,s=(o==null||(n=o.querySelector(`.ab-toolbar`))==null||(n=n.getBoundingClientRect())==null?void 0:n.height)||0,u=(_l(a.rule)||0)*Se,f=((r=l.value)==null||(r=r.$el)==null||(r=r.getBoundingClientRect())==null?void 0:r.height)||0,p=((o==null||(i=o.getBoundingClientRect())==null?void 0:i.height)||500)-s-f;if(a.offsetTop){let e=window.innerHeight-(a.offsetTop||0);be.value=Math.max(p,e)}else be.value=p;if(be.value<=0)return;let m=be.value-u-(a.pagerEnable?Se*1.5:0),h=Math.min(Math.max(Math.round(m/Se),10),100);a.footerSummary&&--h;let g=[...Ce.value];g.includes(h)||(g.push(h),g.sort((e,t)=>e-t)),Ce.value=g,M.value=h,console.warn(`calculateTableHeight: `,_l(a.rule))},Te=(0,u.ref)(!1),Ee=0;function De(){return Oe.apply(this,arguments)}function Oe(){return Oe=H(function*(){if(!a.queryHandler)return;let e=++Ee;Te.value=!0;try{var t,n;let r=ie.value,i=V(V({},A.value),{},{[r.pageNo]:j.value,[r.pageSize]:M.value,[r.sortFieldTable]:N.value,[r.sortField]:ne.value,[r.sortType]:re.value}),o=yield a.queryHandler(i),s=Array.isArray(o)?o:(t=o==null?void 0:o.data)==null?o==null?void 0:o.list:t;if(!Array.isArray(s))throw TypeError(`AbTable queryHandler must return an array or an object containing a data or list array.`);if(e!==Ee)return;p.value=s,te.value=Array.isArray(o)?o.length:(n=o.total)==null?s.length:n}finally{e===Ee&&(Te.value=!1)}}),Oe.apply(this,arguments)}(0,u.onMounted)(H(function*(){oe(),we(),yield De()}));function ke(){return Ae.apply(this,arguments)}function Ae(){return Ae=H(function*(){j.value=1,yield De()}),Ae.apply(this,arguments)}function je(){return Me.apply(this,arguments)}function Me(){return Me=H(function*(){yield De()}),Me.apply(this,arguments)}return t({reload:ke,refresh:je,resize:()=>we(),tableRef:d,exportData:ee}),(t,n)=>{let r=(0,u.resolveComponent)(`vxe-table`),i=(0,u.resolveComponent)(`vxe-pager`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,{ref_key:`containerRef`,ref:c,class:`ab-table`},[(0,u.createVNode)(r,{ref_key:`tableRef`,ref:d,id:m.value,data:p.value,stripe:de.value,loading:Te.value,"column-config":S,"row-config":C,"row-drag-config":(0,u.unref)(T),"cell-config":(0,u.unref)(w),"custom-config":E,"tree-config":fe.value,"row-class-name":e.rowClassName,"header-cell-class-name":_,"cell-class-name":e.cellClassName,"row-style":e.rowStyle,border:`inner`,size:x.value,"max-height":(0,u.unref)(be),"edit-config":P.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":ue.value,"show-overflow":``,"show-header-overflow":``,"show-footer-overflow":``,"auto-resize":``,"show-footer":!!e.footerSummary,"footer-data":k.value,"sort-config":ce,onSortChange:le,"radio-config":(0,u.unref)(pe),onRadioChange:ge,"checkbox-config":_e,onCheckboxChange:ve,onCheckboxAll:ve,onCurrentChange:ye,"export-config":D,onCellClick:he},{default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)((0,u.unref)(h),(t,n)=>((0,u.openBlock)(),(0,u.createBlock)(Ol,{key:t.field||n,rule:t,idx:n,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:je},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?((0,u.openBlock)(),(0,u.createBlock)(i,{key:0,ref_key:`pagerRef`,ref:l,"class-name":e.pagerClassName,"page-sizes":Ce.value,"current-page":j.value,"onUpdate:currentPage":n[0]||(n[0]=e=>j.value=e),"page-size":M.value,"onUpdate:pageSize":n[1]||(n[1]=e=>M.value=e),total:te.value,size:x.value,layouts:ae.value,onPageChange:se},null,8,[`class-name`,`page-sizes`,`current-page`,`page-size`,`total`,`size`,`layouts`])):(0,u.createCommentVNode)(``,!0)],512)}}})),Ep={class:`ab-table-detail__title`},Dp=(0,u.defineComponent)(V(V({},{name:`AbTableDetail`}),{},{__name:`ab-table-detail`,props:(0,u.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:(0,u.mergeModels)([`open`],[`update:modelValue`]),setup(e,{expose:t,emit:n}){let r=n,i=e,{t:a}=z(),o=(0,f.useRoute)(),s=(0,u.ref)(),c=(0,u.ref)({}),l=(0,u.ref)({}),d=(0,u.useModel)(e,`modelValue`);(0,u.ref)(i.vertical);let p=(0,u.ref)(i.visible),m=(0,u.ref)(i.readonly);(0,u.watch)(()=>i.readonly,e=>m.value=e,{immediate:!0});let h=(0,u.computed)(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:`32%`);i.id;let g=(0,u.computed)(()=>{var e,t;return!((e=d.value)!=null&&e[i.idField])||((t=d.value)==null?void 0:t[i.idField])===`new`}),_=(0,u.computed)(()=>g.value?`${a(`action.create`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`:m.value?`${a(`action.detail`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`:`${a(`action.edit`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`),v=(0,u.computed)(()=>{var e;return((e=i.rule)==null?[]:e).map(e=>typeof e.getRule==`function`?e.getRule():e)}),y=()=>{var e;m.value=!1,(e=c.value)==null||e.refresh()},b=function(){var e=H(function*(){T.value=!0;let e;g.value&&typeof i.createHandler==`function`?(e=yield i.createHandler(d.value),e&&(d.value[i.idField]=e),yield(0,u.nextTick)()):!g.value&&typeof i.updateHandler==`function`&&(e=yield i.updateHandler(d.value)),console.warn(`saveHandler: `,JSON.stringify(d.value,null,2)),T.value=!1});return function(){return e.apply(this,arguments)}}(),x=()=>{var e;m.value=!0,(e=c.value)==null||e.refresh()},S=()=>D(),C=(0,u.computed)(()=>{let e=Da(v.value.find(e=>e.type!==X.OPERATE&&e.field===X.OPERATE));if(e)return e.children=$o(e==null?void 0:e.children,e=>e.field!==X.DETAIL),e!=null&&e.children&&Array.isArray(e==null?void 0:e.children)&&e.children.push({type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:edit-pen`}},a(`action.edit`)],props:{type:`primary`},computed:{hidden:!m.value},on:{click:y}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:check`}},a(`action.save`)],props:{type:`success`,plain:!0},computed:{hidden:m.value},on:{click:b}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:refresh-right`}},a(`action.cancel`)],computed:{hidden:m.value},on:{click:x}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:back`}},a(`action.return`)],on:{click:S}}),e}),w=(0,u.computed)(()=>(0,u.reactive)(v.value.filter(e=>e.type!==X.OPERATE&&e.field!==X.OPERATE).map(e=>Da(e)))),T=(0,u.ref)(!1),E=function(){var e=H(function*(e=void 0,t=!1){var n;if(m.value=t,p.value=!0,T.value=!0,typeof i.getHandler==`function`&&e!=null&&e[i.idField]){let t=yield i.getHandler(e==null?void 0:e[i.idField]);d.value=t||{}}else{var a;let t=Da(e)||{};(a=i.rule)==null||a.forEach(e=>{let n=typeof e.getRule==`function`?e.getRule():e;n.field&&n.field!==X.OPERATE&&(t==null?void 0:t[n.field])===void 0&&n.edit===void 0&&n.itemRender===void 0&&(t[n.field]=``)}),d.value=t}yield(0,u.nextTick)(),(n=c.value)==null||n.refresh(),r(`open`,d.value),T.value=!1});return function(){return e.apply(this,arguments)}}(),D=()=>{m.value=!0,p.value=!1,d.value={}};return t({open:E,close:D,toggle:(e=!1,t=void 0,n=!1)=>e?E(t,n):D(),reload:function(){var e=H(function*(){if(typeof i.getHandler!=`function`||!d.value[i.idField]){console.error(`abTableDetail.reload: no getHandler or no idField!`);return}let e=yield i.getHandler(d.value[i.idField]);E(e,m.value)});return function(){return e.apply(this,arguments)}}()}),(t,n)=>{let r=(0,u.resolveComponent)(`ab-form`),i=(0,u.resolveComponent)(`el-drawer`),a=(0,u.resolveDirective)(`loading`);return(0,u.openBlock)(),(0,u.createBlock)(i,{modelValue:p.value,"onUpdate:modelValue":n[3]||(n[3]=e=>p.value=e),"show-close":!1,"append-to-body":``,"close-on-click-modal":``,"close-on-press-escape":``,"destroy-on-close":``,size:h.value,class:`ab-table-detail`,"header-class":`ab-table-detail__header`},{header:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,Ep,(0,u.toDisplayString)(_.value),1),(0,u.withDirectives)((0,u.createVNode)(yl,{class:`ab-table-detail__opr`,"permi-prefix":e.permiPrefix,rule:C.value,"model-value":d.value,api:l.value,"onUpdate:api":n[0]||(n[0]=e=>l.value=e),plain:``,readonly:m.value},null,8,[`permi-prefix`,`rule`,`model-value`,`api`,`readonly`]),[[a,T.value]])]),default:(0,u.withCtx)(()=>[(0,u.withDirectives)((0,u.createVNode)(r,{ref_key:`formRef`,ref:s,rule:w.value,modelValue:d.value,"onUpdate:modelValue":n[1]||(n[1]=e=>d.value=e),api:c.value,"onUpdate:api":n[2]||(n[2]=e=>c.value=e),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:m.value},null,8,[`rule`,`modelValue`,`api`,`id-field`,`id-field-table`,`readonly`]),[[a,T.value]])]),_:1},8,[`modelValue`,`size`])}}})),Op=Object.freeze({left:0,top:0,width:16,height:16}),kp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ap=Object.freeze(V(V({},Op),kp)),jp=Object.freeze(V(V({},Ap),{},{body:``,hidden:!1}));function Mp(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Np(e,t){let n=Mp(e,t);for(let r in jp)r in kp?r in e&&!(r in n)&&(n[r]=kp[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Pp(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function Fp(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Np(r[e]||i[e],a)}return o(t),n.forEach(o),Np(e,a)}function Ip(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Pp(e);for(let i in r){let a=r[i];a&&(t(i,Fp(e,i,a)),n.push(i))}return n}var Lp=/^[a-z0-9]+(-[a-z0-9]+)*$/,Rp=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!zp(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!zp(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!zp(e,n)?null:e}return null},zp=(e,t)=>e?!!((e.provider===``||e.provider.match(Lp))&&(t&&e.prefix===``||e.prefix.match(Lp))&&e.name.match(Lp)):!1,Bp=V({provider:``,aliases:{},not_found:{}},Op);function Vp(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Hp(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Vp(e,Bp))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e.match(Lp)||typeof t.body!=`string`||!Vp(t,jp))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e.match(Lp)||typeof i!=`string`||!n[i]&&!r[i]||!Vp(t,jp))return null}return t}var Up=Object.create(null);function Wp(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Gp(e,t){let n=Up[e]||(Up[e]=Object.create(null));return n[t]||(n[t]=Wp(e,t))}function Kp(e,t){return Hp(t)?Ip(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function qp(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]=V({},n),!0}catch(e){}return!1}function Jp(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Up)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Up[e]||{})).forEach(t=>{let r=Gp(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var Yp=!1;function Xp(e){return typeof e==`boolean`&&(Yp=e),Yp}function Zp(e){let t=typeof e==`string`?Rp(e,!0,Yp):e;if(t){let e=Gp(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Qp(e,t){let n=Rp(e,!0,Yp);return n?qp(Gp(n.provider,n.prefix),n.name,t):!1}function $p(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Yp&&!t&&!e.prefix){let t=!1;return Hp(e)&&(e.prefix=``,Ip(e,(e,n)=>{n&&Qp(e,n)&&(t=!0)})),t}let n=e.prefix;return zp({provider:t,prefix:n,name:`a`})?!!Kp(Gp(t,n),e):!1}function em(e){return!!Zp(e)}function tm(e){let t=Zp(e);return t?V(V({},Ap),t):null}var nm=Object.freeze({width:null,height:null}),rm=Object.freeze(V(V({},nm),kp)),im=/(-?[0-9.]*[0-9]+[0-9.]*)/g,am=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function om(e,t,n){if(t===1)return e;if(n=n||100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(im);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=am.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}var sm=e=>e===`unset`||e===`undefined`||e===`none`;function cm(e,t){let n=V(V({},Ap),e),r=V(V({},rm),t),i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=`<g transform="`+t.join(` `)+`">`+a+`</g>`)});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=om(d,c/l)):(u=o===`auto`?c:o,d=s===null?om(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{sm(t)||(f[e]=t.toString())};return p(`width`,u),p(`height`,d),f.viewBox=i.left.toString()+` `+i.top.toString()+` `+c.toString()+` `+l.toString(),{attributes:f,body:a}}var lm=/\sid="(\S+)"/g,um=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),dm=0;function fm(e,t=um){let n=[],r;for(;r=lm.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(dm++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var pm={local:!0,session:!0},mm={local:new Set,session:new Set},hm=!1;function gm(e){hm=e}var _m=`iconify2`,vm=`iconify`,ym=`iconify-count`,bm=`iconify-version`,xm=36e5,Sm=168;function Cm(e,t){try{return e.getItem(t)}catch(e){}}function wm(e,t,n){try{return e.setItem(t,n),!0}catch(e){}}function Tm(e,t){try{e.removeItem(t)}catch(e){}}function Em(e,t){return wm(e,ym,t.toString())}function Dm(e){return parseInt(Cm(e,ym))||0}var Om=typeof window>`u`?{}:window;function km(e){let t=e+`Storage`;try{if(Om&&Om[t]&&typeof Om[t].length==`number`)return Om[t]}catch(e){}pm[e]=!1}function Am(e,t){let n=km(e);if(!n)return;let r=Cm(n,bm);if(r!==_m){if(r){let e=Dm(n);for(let t=0;t<e;t++)Tm(n,vm+t.toString())}wm(n,bm,_m),Em(n,0);return}let i=Math.floor(Date.now()/xm)-Sm,a=e=>{let r=vm+e.toString(),a=Cm(n,r);if(typeof a==`string`){try{let n=JSON.parse(a);if(typeof n==`object`&&typeof n.cached==`number`&&n.cached>i&&typeof n.provider==`string`&&typeof n.data==`object`&&typeof n.data.prefix==`string`&&t(n,e))return!0}catch(e){}Tm(n,r)}},o=Dm(n);for(let t=o-1;t>=0;t--)a(t)||(t===o-1?(o--,Em(n,o)):mm[e].add(t))}function jm(){if(!hm){gm(!0);for(let e in pm)Am(e,e=>{let t=e.data,n=e.provider,r=t.prefix,i=Gp(n,r);if(!Kp(i,t).length)return!1;let a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Mm(e,t){switch(e){case`local`:case`session`:pm[e]=t;break;case`all`:for(let e in pm)pm[e]=t}}var Nm=Object.create(null);function Pm(e,t){Nm[e]=t}function Fm(e){return Nm[e]||Nm[``]}function Im(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}}for(var Lm=Object.create(null),Rm=[`https://api.simplesvg.com`,`https://api.unisvg.com`],zm=[];Rm.length>0;)Rm.length===1||Math.random()>.5?zm.push(Rm.shift()):zm.push(Rm.pop());Lm[``]=Im({resources:[`https://api.iconify.design`].concat(zm)});function Bm(e,t){let n=Im(t);return n!==null&&(Lm[e]=n,!0)}function Vm(e){return Lm[e]}function Hm(){return Object.keys(Lm)}var Um=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch(e){}})();function Wm(e){Um=e}function Gm(){return Um}function Km(e,t){let n=Vm(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function qm(e){return e===404}var Jm=(e,t,n)=>{let r=[],i=Km(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Ym(e){if(typeof e==`string`){let t=Vm(e);if(t)return t.path}return`/`}var Xm={prepare:Jm,send:(e,t,n)=>{if(!Um){n(`abort`,424);return}let r=Ym(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Um(e+r).then(e=>{let t=e.status;if(t!==200)setTimeout(()=>{n(qm(t)?`abort`:`next`,t)});else return i=501,e.json()}).then(e=>{setTimeout(typeof e!=`object`||!e?()=>{e===404?n(`abort`,e):n(`next`,i)}:()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Zm(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Gp(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Qm(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function $m(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||Qm([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var eh=0;function th(e,t,n){let r=eh++,i=Qm.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(a)}),i}function nh(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Rp(e,t,n):e;i&&r.push(i)}),r}var rh={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ih(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&(clearTimeout(d),d=null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`)u=r,v();else if(i)u=r,f.length||(o.length?x():v());else{if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function ah(e){let t=V(V({},rh),e),n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ih(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function oh(){}var sh=Object.create(null);function ch(e){if(!sh[e]){let t=Vm(e);if(!t)return;sh[e]={config:t,redundancy:ah(t)}}return sh[e]}function lh(e,t,n){let r,i;if(typeof e==`string`){let t=Fm(e);if(!t)return n(void 0,424),oh;i=t.send;let a=ch(e);a&&(r=a.redundancy)}else{let t=Im(e);if(t){r=ah(t);let n=Fm(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),oh):r.query(t,i,n)().abort}function uh(e,t){let n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(let n in pm)Am(n,n=>{let r=n.data;return n.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function dh(e,t){hm||jm();function n(n){let r;if(!pm[n]||!(r=km(n)))return;let i=mm[n],a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Dm(r),!Em(r,a+1))return;let o={cached:Math.floor(Date.now()/xm),provider:e.provider,data:t};return wm(r,vm+a.toString(),JSON.stringify(o))}(!t.lastModified||uh(e,t.lastModified))&&Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n(`local`)||n(`session`))}function fh(){}function ph(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,$m(e)}))}function mh(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;delete e.iconsToLoad;let i;r&&(i=Fm(t))&&i.prepare(t,n,r).forEach(n=>{lh(t,n,t=>{if(typeof t!=`object`)n.icons.forEach(t=>{e.missing.add(t)});else try{let n=Kp(e,t);if(!n.length)return;let r=e.pendingIcons;r&&n.forEach(e=>{r.delete(e)}),dh(e,t)}catch(e){console.error(e)}ph(e)})})}))}var hh=e=>{let t=Gp(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},gh=(e,t)=>{let n=Zm(nh(e,!0,Xp()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,fh)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Gp(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Gp(t,n),o=a.pendingIcons||(a.pendingIcons=new Set);o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let{provider:t,prefix:n}=e;r[t][n].length&&mh(e,r[t][n])}),t?th(t,n,i):fh},_h=e=>new Promise((t,n)=>{let r=typeof e==`string`?Rp(e,!0):e;r?gh([r||e],i=>{if(i.length&&r){let e=Zp(r);if(e){t(V(V({},Ap),e));return}}n(e)}):n(e)});function vh(e,t){let n=V({},e);for(let e in t){let r=t[e],i=typeof r;e in nm?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var yh=V(V({},rm),{},{inline:!1}),bh=`iconify-inline`,xh=`iconifyData`+Date.now(),Sh=[];function Ch(e){for(let t=0;t<Sh.length;t++){let n=Sh[t];if((typeof n.node==`function`?n.node():n.node)===e)return n}}function wh(e,t=!1){let n=Ch(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},Sh.push(n),n)}function Th(){if(document.documentElement)return wh(document.documentElement);Sh.push({node:()=>document.documentElement})}function Eh(e){Sh=Sh.filter(t=>e!==t&&e!==(typeof t.node==`function`?t.node():t.node))}function Dh(){return Sh}function Oh(e){let t=document;t.readyState&&t.readyState!==`loading`?e():t.addEventListener(`DOMContentLoaded`,e)}var kh=null,Ah={childList:!0,subtree:!0,attributes:!0};function jh(e){if(!e.observer)return;let t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,kh&&kh(e)}))}function Mh(e,t){if(!e.observer)return;let n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){let i=t[r];if(i.addedNodes&&i.addedNodes.length>0||i.type===`attributes`&&i.target[xh]!==void 0){n.paused||jh(e);return}}}function Nh(e,t){e.observer.instance.observe(t,Ah)}function Ph(e){let t=e.observer;if(t&&t.instance)return;let n=typeof e.node==`function`?e.node():e.node;n&&window&&(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Mh.bind(null,e)),Nh(e,n),t.paused||jh(e))}function Fh(){Dh().forEach(Ph)}function Ih(e){if(!e.observer)return;let t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Lh(e){let t=kh!==null;kh!==e&&(kh=e,t&&Dh().forEach(Ih)),t?Fh():Oh(Fh)}function Rh(e){(e?[e]:Dh()).forEach(e=>{if(!e.observer){e.observer={paused:1};return}let t=e.observer;t.paused++,t.paused>1||!t.instance||t.instance.disconnect()})}function zh(e){if(e){let t=Ch(e);t&&Rh(t)}else Rh()}function Bh(e){(e?[e]:Dh()).forEach(e=>{if(!e.observer){Ph(e);return}let t=e.observer;if(t.paused&&(t.paused--,!t.paused)){let n=typeof e.node==`function`?e.node():e.node;if(n)t.instance?Nh(e,n):Ph(e);else return}})}function Vh(e){if(e){let t=Ch(e);t&&Bh(t)}else Bh()}function Hh(e,t=!1){let n=wh(e,t);return Ph(n),n}function Uh(e){let t=Ch(e);t&&(Ih(t),Eh(e))}function Wh(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;let n=e.customisations,r=t.customisations;for(let e in yh)if(n[e]!==r[e])return!0;return!1}function Gh(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var Kh=/[\s,]+/;function qh(e,t){t.split(Kh).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var Jh=[`width`,`height`],Yh=[`inline`,`hFlip`,`vFlip`];function Xh(e,t){return e===t||e===`true`?!0:e===``||e===`false`?!1:null}function Zh(e){let t=e.getAttribute(`data-icon`),n=typeof t==`string`&&Rp(t,!0);if(!n)return null;let r=V(V({},yh),{},{inline:e.classList&&e.classList.contains(bh)});Jh.forEach(t=>{let n=e.getAttribute(`data-`+t);n&&(r[t]=n)});let i=e.getAttribute(`data-rotate`);typeof i==`string`&&(r.rotate=Gh(i));let a=e.getAttribute(`data-flip`);return typeof a==`string`&&qh(r,a),Yh.forEach(t=>{let n=`data-`+t,i=Xh(e.getAttribute(n),n);typeof i==`boolean`&&(r[t]=i)}),{name:t,icon:n,customisations:r,mode:e.getAttribute(`data-mode`)}}var Qh=`svg.iconify, i.iconify, span.iconify, i.iconify-inline, span.`+bh;function $h(e){let t=[];return e.querySelectorAll(Qh).forEach(e=>{let n=e[xh]||e.tagName.toLowerCase()!==`svg`?Zh(e):null;n&&t.push({node:e,props:n})}),t}function eg(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var tg;function ng(){try{tg=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch(e){tg=null}}function rg(e){return tg===void 0&&ng(),tg?tg.createHTML(e):e}function ig(e){let t=new Set([`iconify`]);return[`provider`,`prefix`].forEach(n=>{e[n]&&t.add(`iconify--`+e[n])}),t}function ag(e,t,n,r){let i=e.classList;if(r){let e=r.classList;Array.from(e).forEach(e=>{i.add(e)})}let a=[];return t.forEach(e=>{i.contains(e)?n.has(e)&&a.push(e):(i.add(e),a.push(e))}),n.forEach(e=>{t.has(e)||i.remove(e)}),a}function og(e,t,n){let r=e.style;(n||[]).forEach(e=>{r.removeProperty(e)});let i=[];for(let e in t)r.getPropertyValue(e)||(i.push(e),r.setProperty(e,t[e]));return i}function sg(e,t,n){let r;try{r=document.createElement(`span`)}catch(t){return e}let i=t.customisations,a=cm(n,i),o=e[xh],s=eg(fm(a.body),V({"aria-hidden":`true`,role:`img`},a.attributes));r.innerHTML=rg(s);let c=r.childNodes[0],l=e.attributes;for(let e=0;e<l.length;e++){let t=l.item(e),n=t.name;n!==`class`&&!c.hasAttribute(n)&&c.setAttribute(n,t.value)}let u=ag(c,ig(t.icon),new Set(o&&o.addedClasses),e),d=og(c,i.inline?{"vertical-align":`-0.125em`}:{},o&&o.addedStyles);return c[xh]=V(V({},t),{},{status:`loaded`,addedClasses:u,addedStyles:d}),e.parentNode&&e.parentNode.replaceChild(c,e),c}function cg(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function lg(e){return`data:image/svg+xml,`+cg(e)}function ug(e){return`url("`+lg(e)+`")`}var dg={display:`inline-block`},fg={"background-color":`currentColor`},pg={"background-color":`transparent`},mg={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},hg={"-webkit-mask":fg,mask:fg,background:pg};for(let e in hg){let t=hg[e];for(let n in mg)t[e+`-`+n]=mg[n]}function gg(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}function _g(e,t,n,r){let i=t.customisations,a=cm(n,i),o=a.attributes,s=e[xh],c=eg(a.body,V(V({},o),{},{width:n.width+``,height:n.height+``})),l=ag(e,ig(t.icon),new Set(s&&s.addedClasses)),u=V(V({"--svg":ug(c),width:gg(o.width),height:gg(o.height)},dg),r?fg:pg);i.inline&&(u[`vertical-align`]=`-0.125em`);let d=og(e,u,s&&s.addedStyles);return e[xh]=V(V({},t),{},{status:`loaded`,addedClasses:l,addedStyles:d}),e}var vg=!1;function yg(){vg||(vg=!0,setTimeout(()=>{vg&&(vg=!1,bg())}))}function bg(e,t=!1){let n=Object.create(null);function r(e,t){let{provider:r,prefix:i,name:a}=e,o=Gp(r,i),s=o.icons[a];if(s)return{status:`loaded`,icon:s};if(o.missing.has(a))return{status:`missing`};if(t&&!hh(e)){let e=n[r]||(n[r]=Object.create(null));(e[i]||(e[i]=new Set)).add(a)}return{status:`loading`}}(e?[e]:Dh()).forEach(e=>{let n=typeof e.node==`function`?e.node():e.node;if(!n||!n.querySelectorAll)return;let i=!1,a=!1;function o(t,n,r){if(a||(a=!0,Rh(e)),t.tagName.toUpperCase()!==`SVG`){let e=n.mode,i=e===`mask`||(e===`bg`?!1:e===`style`?r.body.indexOf(`currentColor`)!==-1:null);if(typeof i==`boolean`){_g(t,n,V(V({},Ap),r),i);return}}sg(t,n,r)}$h(n).forEach(({node:e,props:t})=>{let n=e[xh];if(!n){let{status:n,icon:a}=r(t.icon,!0);if(a){o(e,t,a);return}i=i||n===`loading`,e[xh]=V(V({},t),{},{status:n});return}let a;if(!Wh(n,t)){if(n.status!==`loading`)return;if(a=r(t.icon,!1),!a.icon){n.status=a.status;return}}else if(a=r(t.icon,n.name!==t.name),!a.icon){i=i||a.status===`loading`,Object.assign(n,V(V({},t),{},{status:a.status}));return}o(e,t,a.icon)}),e.temporary&&!i?Uh(n):t&&i?Hh(n,!0):a&&e.observer&&Bh(e)});for(let e in n){let t=n[e];for(let n in t){let r=t[n];gh(Array.from(r).map(t=>({provider:e,prefix:n,name:t})),yg)}}}function xg(e){let t=Ch(e);t?bg(t):bg({node:e,temporary:!0},!0)}function Sg(e,t,n=!1){let r=Zp(e);if(!r)return null;let i=Rp(e),a=vh(yh,t||{}),o=sg(document.createElement(`span`),{name:e,icon:i,customisations:a},r);return n?o.outerHTML:o}function Cg(){return`3.1.1`}function wg(e,t){return Sg(e,t,!1)}function Tg(e,t){return Sg(e,t,!0)}function Eg(e,t){let n=Zp(e);return n?cm(n,vh(yh,t||{})):null}function Dg(e){e?xg(e):bg()}if(typeof document<`u`&&typeof window<`u`){Th();let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!$p(e))&&console.error(n)}catch(e){console.error(n)}})}setTimeout(()=>{Lh(bg),bg()})}function Og(e,t){Mm(e,t!==!1)}function kg(e){Mm(e,!0)}if(Pm(``,Xm),typeof document<`u`&&typeof window<`u`){jm();let e=window;if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Bm(e,r)||console.error(n)}catch(e){console.error(n)}}}}var Ag={_api:{getAPIConfig:Vm,setAPIModule:Pm,sendAPIQuery:lh,setFetch:Wm,getFetch:Gm,listAPIProviders:Hm},addAPIProvider:Bm,loadIcons:gh,loadIcon:_h,iconExists:em,getIcon:tm,listIcons:Jp,addIcon:Qp,addCollection:$p,replaceIDs:fm,calculateSize:om,buildIcon:cm,getVersion:Cg,renderSVG:wg,renderHTML:Tg,renderIcon:Eg,scan:Dg,observe:Hh,stopObserving:Uh,pauseObserver:zh,resumeObserver:Vh,enableCache:Og,disableCache:kg};try{self.Iconify===void 0&&(self.Iconify=Ag)}catch(e){}var jg=Ag,Mg=[`xlink:href`],Ng=[`data-icon`],Pg=(0,u.defineComponent)(V(V({},{name:`AbIcon`}),{},{__name:`ab-icon`,props:{icon:{},color:{},size:{default:16},svgClass:{}},setup(e){let t=e,n=(0,u.ref)(null),r=(0,u.computed)(()=>{var e;return(e=t.icon)==null?void 0:e.startsWith(`svg-icon:`)}),i=(0,u.computed)(()=>{var e;return(0,u.unref)(r)?`#icon-${(e=t.icon)==null?void 0:e.split(`svg-icon:`)[1]}`:t.icon}),a=(0,u.computed)(()=>{let{color:e,size:n}=t;return{fontSize:`${n}px`,height:`1em`,color:e}}),o=(0,u.computed)(()=>{let{svgClass:e}=t;return`iconify ${e}`}),s=function(){var e=H(function*(e){if((0,u.unref)(r))return;let t=(0,u.unref)(n);if(!t||(yield(0,u.nextTick)(),!e))return;let i=jg.renderSVG(e,{});if(i)t.textContent=``,t.appendChild(i);else{let n=document.createElement(`span`);n.className=`iconify`,n.dataset.icon=e,t.textContent=``,t.appendChild(n)}});return function(t){return e.apply(this,arguments)}}();return(0,u.watch)(()=>t.icon,e=>{s(e)}),(t,s)=>{let c=(0,u.resolveComponent)(`ElIcon`);return(0,u.openBlock)(),(0,u.createBlock)(c,{class:`ab-icon`,color:e.color,size:e.size},{default:(0,u.withCtx)(()=>[r.value?((0,u.openBlock)(),(0,u.createElementBlock)(`svg`,{key:0,class:(0,u.normalizeClass)(o.value)},[(0,u.createElementVNode)(`use`,{"xlink:href":i.value},null,8,Mg)],2)):((0,u.openBlock)(),(0,u.createElementBlock)(`span`,{key:1,ref_key:`elRef`,ref:n,class:(0,u.normalizeClass)(t.$attrs.class),style:(0,u.normalizeStyle)(a.value)},[(0,u.createElementVNode)(`span`,{class:(0,u.normalizeClass)(o.value),"data-icon":i.value},null,10,Ng)],6))]),_:1},8,[`color`,`size`])}}})),Fg=[`value`,`label`],Ig=(0,u.defineComponent)(V(V({},{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}){let n=e,r=t,i=(0,u.ref)(),a=(0,u.computed)(()=>n.type===`button`?`ElCheckboxButton`:`ElCheckbox`),o=(0,u.toRef)(n,`modelValue`),s=(0,u.toRef)(n,`inputValue`,``),c=(0,u.ref)(s.value),l=(0,u.computed)(()=>{var e;let t=n.options||((e=n.abFormInject)==null?void 0:e.options)||[];return Array.isArray(t)?t:[]});(0,u.watch)(s,e=>{n.input?p(e):c.value=e}),(0,u.watch)(o,e=>{if(!s.value&&Array.isArray(e)&&e.length>0&&n.input){let t=l.value.map(e=>e.value),n=null;e.forEach(e=>{t.indexOf(e)===-1&&(n=e)}),n!=null&&(c.value=n)}},{immediate:!0});function d(e){let{value:t,label:n}=e;return lp(e,Fg)}function f(e){r(`update:modelValue`,e)}function p(e){let t=[...fc(o.value)],n=t.indexOf(c.value);c.value=e,n>-1&&(t.splice(n,1),t.push(e),f(t))}return(0,u.onMounted)(()=>{r(`fc.el`,i.value)}),(t,n)=>{let r=(0,u.resolveComponent)(`el-input`),s=(0,u.resolveComponent)(`el-checkbox-group`);return(0,u.openBlock)(),(0,u.createBlock)(s,(0,u.mergeProps)(t.$attrs,{"model-value":o.value===null?void 0:o.value,"onUpdate:modelValue":f,ref_key:`el`,ref:i}),(0,u.createSlots)({default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(l.value,(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(a.value),(0,u.mergeProps)({key:`${a.value}${t}-${e.value}`},{ref_for:!0},d(e),{label:e.value,value:e.value}),{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(e.label||e.value||``),1)]),_:2},1040,[`label`,`value`]))),128)),(0,u.renderSlot)(t.$slots,`default`),e.input?((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(a.value),{key:0,value:c.value||void 0,label:c.value||void 0},{default:(0,u.withCtx)(()=>[(0,u.createVNode)(r,{size:`small`,"model-value":c.value,"onUpdate:modelValue":p},null,8,[`model-value`])]),_:1},8,[`value`,`label`])):(0,u.createCommentVNode)(``,!0)]),_:2},[(0,u.renderList)(Object.keys(t.$slots).filter(e=>e!=="default"),e=>({name:e,fn:(0,u.withCtx)(n=>[(0,u.renderSlot)(t.$slots,e,(0,u.normalizeProps)((0,u.guardReactiveProps)(n==null?{}:n)))])}))]),1040,[`model-value`])}}})),Lg=[`value`,`label`],Rg=(0,u.defineComponent)(V(V({},{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}){let n=e,r=t,i=(0,u.ref)(),a=(0,u.computed)(()=>n.type===`button`?`ElRadioButton`:`ElRadio`),o=(0,u.toRef)(n,`modelValue`),s=(0,u.toRef)(n,`inputValue`,``),c=(0,u.ref)(s.value),l=(0,u.computed)(()=>{var e;let t=n.options||((e=n.abFormInject)==null?void 0:e.options)||[];return Array.isArray(t)?t:[]});(0,u.watch)(s,e=>{n.input?p(e):c.value=e}),(0,u.watch)(o,e=>{!s.value&&e!=null&&n.input&&!l.value.some(t=>t.value===e)&&(c.value=e)},{immediate:!0});function d(e){let{value:t,label:n}=e;return lp(e,Lg)}function f(e){r(`update:modelValue`,e)}function p(e){let t=c.value;c.value=e,o.value===t&&f(e)}return(0,u.onMounted)(()=>{r(`fc.el`,i.value)}),(t,n)=>{let r=(0,u.resolveComponent)(`el-input`),s=(0,u.resolveComponent)(`el-radio-group`);return(0,u.openBlock)(),(0,u.createBlock)(s,(0,u.mergeProps)(t.$attrs,{"model-value":o.value,"onUpdate:modelValue":f,ref_key:`el`,ref:i}),(0,u.createSlots)({default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(l.value,(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(a.value),(0,u.mergeProps)({key:`${a.value}${t}-${e.value}`},{ref_for:!0},d(e),{label:e.value,value:e.value}),{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(e.label||e.value||``),1)]),_:2},1040,[`label`,`value`]))),128)),(0,u.renderSlot)(t.$slots,`default`),e.input?((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(a.value),{key:0,checked:!1,value:c.value||void 0,label:c.value||void 0},{default:(0,u.withCtx)(()=>[(0,u.createVNode)(r,{size:`small`,"model-value":c.value,"onUpdate:modelValue":p},null,8,[`model-value`])]),_:1},8,[`value`,`label`])):(0,u.createCommentVNode)(``,!0)]),_:2},[(0,u.renderList)(Object.keys(t.$slots).filter(e=>e!=="default"),e=>({name:e,fn:(0,u.withCtx)(n=>[(0,u.renderSlot)(t.$slots,e,(0,u.normalizeProps)((0,u.guardReactiveProps)(n==null?{}:n)))])}))]),1040,[`model-value`])}}})),zg={class:`p-option__left`},Bg={class:`p-option__right`},Vg={class:`p-option__left`},Hg={key:0,class:`p-option__right`},Ug={key:1,class:`p-option__right`},Wg=(0,u.defineComponent)(V(V({},{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}){let n=e,r=t,i=(0,u.ref)(),a=(0,u.toRef)(n,`modelValue`),o=(0,u.computed)(()=>{var e;let t=(e=n.abFormInject)==null?void 0:e.options;return Array.isArray(t)?t:[]}),{wsCache:s}=R(),c=(0,u.computed)(()=>s.getCurrentSize||`default`);function l(e){r(`update:modelValue`,e)}return(0,u.onMounted)(()=>{r(`fc.el`,i.value)}),(t,n)=>{let r=(0,u.resolveComponent)(`el-option`),s=(0,u.resolveComponent)(`el-option-group`),d=(0,u.resolveComponent)(`el-select`);return(0,u.openBlock)(),(0,u.createBlock)(d,(0,u.mergeProps)(t.$attrs,{"model-value":a.value,"onUpdate:modelValue":l,ref_key:`el`,ref:i}),{default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(o.value,(t,n)=>{var i,a;return(0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,null,[(0,u.unref)(G)(t,`options`)?((0,u.openBlock)(),(0,u.createBlock)(s,{label:t.label,key:`${n}-${t.label}`},{default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)((0,u.unref)(W).trueArray(t.options)?t.options:[],(e,t)=>((0,u.openBlock)(),(0,u.createBlock)(r,(0,u.mergeProps)({key:`${t}-${e.value}`},{ref_for:!0},e),null,16))),128))]),_:2},1032,[`label`])):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:1},[e.showValue?((0,u.openBlock)(),(0,u.createBlock)(r,{key:0,label:t==null?void 0:t.label,value:t==null?void 0:t.value,class:(0,u.normalizeClass)((i=t==null?void 0:t.class)==null?``:i)},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`span`,zg,(0,u.toDisplayString)(t==null?void 0:t.label),1),(0,u.createElementVNode)(`span`,Bg,(0,u.toDisplayString)(t==null?void 0:t.value),1)]),_:2},1032,[`label`,`value`,`class`])):e.showKey||e.showCode?((0,u.openBlock)(),(0,u.createBlock)(r,{key:1,label:t==null?void 0:t.label,value:t==null?void 0:t.value,size:c.value,class:(0,u.normalizeClass)((a=t==null?void 0:t.class)==null?``:a)},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`span`,Vg,(0,u.toDisplayString)(t==null?void 0:t.label),1),e.showKey?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,Hg,(0,u.toDisplayString)(t==null?void 0:t.key),1)):(0,u.createCommentVNode)(``,!0),e.showCode?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,Ug,(0,u.toDisplayString)(t==null?void 0:t.code),1)):(0,u.createCommentVNode)(``,!0)]),_:2},1032,[`label`,`value`,`size`,`class`])):((0,u.openBlock)(),(0,u.createBlock)(r,{key:2,label:t==null?void 0:t.label,value:t==null?void 0:t.value},null,8,[`label`,`value`]))],64))],64)}),256)),(0,u.renderSlot)(t.$slots,`default`)]),_:3},16,[`model-value`])}}})),Gg=(0,u.defineComponent)({name:`abTree`,inheritAttrs:!1,abFormParser:{mergeProp(e){let 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;e=this.type===`selected`?this.$refs.tree.getCurrentKey():this.$refs.tree.getCheckedKeys(),this.$emit(`update:modelValue`,e)},setValue(){this.$refs.tree&&(this.type===`selected`?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(fc(this.modelValue)))}},render(){return(0,u.createVNode)((0,u.resolveComponent)(`ElTree`),(0,u.mergeProps)(this.$attrs,{ref:`tree`,onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit(`fc.el`,this.$refs.tree)}}),Kg=(0,u.defineComponent)(V(V({},{name:`AbTimePicker`,inheritAttrs:!1}),{},{__name:`ab-time-picker`,props:{modelValue:{}},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(),a=(0,u.ref)(n.modelValue);(0,u.watch)(()=>n.modelValue,e=>a.value=e);let{wsCache:o}=R(),s=(0,u.computed)(()=>o.getCurrentSize||`default`);function c(e){r(`update:modelValue`,e)}return(0,u.onMounted)(()=>{r(`fc.el`,i.value)}),(e,t)=>{let n=(0,u.resolveComponent)(`el-time-picker`);return(0,u.openBlock)(),(0,u.createBlock)(n,(0,u.mergeProps)({ref_key:`el`,ref:i},e.$attrs,{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e),size:s.value,onChange:c}),null,16,[`modelValue`,`size`])}}})),qg=(0,u.defineComponent)(V(V({},{name:`AbColorPicker`,inheritAttrs:!1}),{},{__name:`ab-color-picker`,props:{modelValue:{}},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(),a=(0,u.ref)(n.modelValue);(0,u.watch)(()=>n.modelValue,e=>a.value=e);let{wsCache:o}=R(),s=(0,u.computed)(()=>o.getCurrentSize||`default`);function c(e){r(`update:modelValue`,e)}return(0,u.onMounted)(()=>{r(`fc.el`,i.value)}),(e,t)=>{let n=(0,u.resolveComponent)(`el-color-picker`);return(0,u.openBlock)(),(0,u.createBlock)(n,(0,u.mergeProps)({ref_key:`el`,ref:i,class:`ab-color-picker`},e.$attrs,{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e),size:s.value,onChange:c}),null,16,[`modelValue`,`size`])}}})),Jg={class:`ab-input-range`},Yg={key:0,class:`range-prefix`},Xg={key:3,class:`range-suffix`},Zg=(0,u.defineComponent)(V(V({},{name:`AbInputRange`}),{},{__name:`ab-input-range`,props:(0,u.mergeModels)({abFormInject:{},prefix:{},suffix:{},clearable:{type:Boolean,default:!0},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,u.mergeModels)([`change`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,r=e,{t:i}=z(),a=(0,u.useModel)(e,`modelValue`),o=(0,u.computed)(()=>{var e,t,n,r;return[(e=(t=a.value)==null?void 0:t[0])==null?null:e,(n=(r=a.value)==null?void 0:r[1])==null?null:n]}),s=(0,u.computed)(()=>{var e;return r.readonly===!0||((e=r.abFormInject)==null?void 0:e.readonly)===!0});function c(e,t){let n=[...o.value];return n[e]=t===``?null:t,n}function l(e,t){a.value=c(e,t)}let{wsCache:d}=R(),f=(0,u.computed)(()=>d.getCurrentSize||`default`);return(t,r)=>{var a,d;let p=(0,u.resolveComponent)(`el-text`),m=(0,u.resolveComponent)(`el-input`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,Jg,[e.prefix?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,Yg,(0,u.toDisplayString)(e.prefix),1)):(0,u.createCommentVNode)(``,!0),s.value?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:1},[(0,u.createVNode)(p,{class:`ab-input-range__val`},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(o.value[0]),1)]),_:1}),r[4]||(r[4]=(0,u.createElementVNode)(`span`,{class:`range-splitter`},` ~ `,-1)),(0,u.createVNode)(p,{class:`ab-input-range__val`},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(o.value[1]),1)]),_:1})],64)):((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:2},[(0,u.createVNode)(m,{"model-value":(a=o.value[0])==null?``:a,size:f.value,placeholder:(0,u.unref)(i)(`min`),clearable:e.clearable,class:`ab-input-range__val`,"onUpdate:modelValue":r[0]||(r[0]=e=>l(0,e)),onChange:r[1]||(r[1]=e=>n(`change`,c(0,e)))},null,8,[`model-value`,`size`,`placeholder`,`clearable`]),r[5]||(r[5]=(0,u.createElementVNode)(`span`,{class:`range-splitter`},` ~ `,-1)),(0,u.createVNode)(m,{"model-value":(d=o.value[1])==null?``:d,size:f.value,placeholder:(0,u.unref)(i)(`max`),clearable:e.clearable,class:`ab-input-range__val`,"onUpdate:modelValue":r[2]||(r[2]=e=>l(1,e)),onChange:r[3]||(r[3]=e=>n(`change`,c(1,e)))},null,8,[`model-value`,`size`,`placeholder`,`clearable`])],64)),e.suffix?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,Xg,(0,u.toDisplayString)(e.suffix),1)):(0,u.createCommentVNode)(``,!0)])}}})),Qg={class:`ab-time-period w-full`},$g={class:`start-time`},e_={key:0},t_={class:`end-time`},n_=(0,u.defineComponent)(V(V({},{name:`AbTimePeriod`}),{},{__name:`ab-time-period`,props:(0,u.mergeModels)({abFormInject:{},startTime:{default:`08:00`},endTime:{default:`18:00`},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,u.mergeModels)([`change`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,r=e,i=(0,u.useModel)(e,`modelValue`),a=(0,u.computed)(()=>{var e;return r.readonly===!0||((e=r.abFormInject)==null?void 0:e.readonly)===!0}),{t:o}=z();function s(e){let t=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(e.trim()),n=t?Number(t[1]):NaN,r=t?Number(t[2]):NaN,i=t!=null&&t[3]?Number(t[3]):0;if(!t||n>24||r>59||i>59||n===24&&(r!==0||i!==0))throw TypeError(`Invalid time "${e}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return n*3600+r*60+i}function c(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,i=`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`;return r?`${i}:${String(r).padStart(2,`0`)}`:i}let l=(0,u.computed)(()=>{let e=s(r.startTime),t=s(r.endTime);if(e>=t)throw RangeError(`timePeriod requires startTime before endTime.`);return[e,t]}),d=(0,u.computed)(()=>{var e,t,n,r,a,o;return[((e=i.value)==null?void 0:e[0])===``||(t=(n=i.value)==null?void 0:n[0])==null?null:t,((r=i.value)==null?void 0:r[1])===``||(a=(o=i.value)==null?void 0:o[1])==null?null:a]}),f=(0,u.computed)(()=>{let[e,t]=l.value,n=d.value[0]===null?e:s(d.value[0]),r=d.value[1]===null?t:s(d.value[1]);if(d.value[0]!==null&&d.value[1]!==null&&n>r)throw RangeError(`timePeriod start value must be before or equal to end value.`);return[n,r]});(0,u.computed)(()=>f.value.some(e=>e<l.value[0]||e>l.value[1]));let p=(0,u.computed)(()=>{let e=e=>Math.min(l.value[1],Math.max(l.value[0],e));return[e(f.value[0]),e(f.value[1])]});function m(e){if(!Array.isArray(e)||e.length!==2)throw TypeError(`timePeriod slider must provide a pair of values.`);return[d.value[0]!==null&&e[0]===p.value[0]?d.value[0]:c(e[0]),d.value[1]!==null&&e[1]===p.value[1]?d.value[1]:c(e[1])]}function h(e){i.value=m(e)}function g(e){n(`change`,m(e))}return(e,t)=>{var n,r;let i=(0,u.resolveComponent)(`el-slider`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,Qg,[(0,u.createElementVNode)(`div`,$g,(0,u.toDisplayString)((n=d.value[0])==null?`--:--`:n),1),a.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,e_,`~`)):((0,u.openBlock)(),(0,u.createBlock)(i,{key:1,class:(0,u.normalizeClass)({"is-empty":d.value[0]==null&&d.value[1]==null}),"model-value":p.value,range:``,step:30,min:l.value[0],max:l.value[1],"format-tooltip":c,"format-value-text":c,"onUpdate:modelValue":h,onChange:g},null,8,[`class`,`model-value`,`min`,`max`])),(0,u.createElementVNode)(`div`,t_,(0,u.toDisplayString)((r=d.value[1])==null?`--:--`:r),1)])}}})),r_=Symbol(`archbiz-upload-apis`);function i_(e){if(typeof e==`number`&&Number.isFinite(e)||typeof e==`string`&&e.trim()&&e!==`new`)return e}function a_(e){let t=e.split(/[?#]/,1)[0].split(`/`).pop()||e;try{return decodeURIComponent(t)}catch(e){if(e instanceof URIError)return t;throw e}}var o_={class:`ab-upload-file`},s_={key:1,role:`alert`},c_={class:`ab-upload-file__list`},l_={key:0},u_={key:1,role:`alert`},d_=(0,u.defineComponent)(V(V({},{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:n}){let r=e,i=n,{t:a}=z(),o=vl(),s=(0,u.inject)(r_,void 0);function c(){var e;let t=(e=r.apis)==null?s:e;if(!t)throw Error(`Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.`);return t}c();let l=(0,u.computed)(()=>{var e;return r.disabled||r.readonly||((e=r.abFormInject)==null?void 0:e.readonly)===!0}),d=(0,u.computed)(()=>{var e;let t=r.abFormInject;return i_(t!=null&&t.idField?(e=t.formValue)==null?void 0:e[t.idField]:void 0)}),f=(0,u.ref)([]),p=(0,u.ref)(``),m=(0,u.ref)(!1),h=(0,u.ref)(!1),g=new Set,_=1,v=0,y=0,b,x;function S(e){var t,n;return{businessType:(t=r.idFieldTable)==null?(n=r.abFormInject)==null?void 0:n.idFieldTable:t,businessCode:r.businessCode,businessId:e}}function C(e){o.error(e instanceof Error?e.message:String(e)),i(`error`,e)}function w(){i(`update:modelValue`,f.value.flatMap(e=>e.url?[e.url]:[]))}function T(e){let t=e.name.includes(`.`)?e.name.slice(e.name.lastIndexOf(`.`)+1).toLowerCase():``;return{url:e.url,name:e.name,extension:t,fileId:e.fileId}}function E(e){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(e)}let D=e=>{if(f.value.length+y>=r.limit)return o.error(a(`upload.tooMany`)),!1;let t=e.name.includes(`.`)?e.name.slice(e.name.lastIndexOf(`.`)+1).toLowerCase():``;return r.fileType.length&&!r.fileType.some(e=>e.toLowerCase().replace(/^\./,``)===t)?(o.error(a(`upload.invalidType`)),!1):e.size>r.fileSize*1024*1024?(o.error(a(`upload.tooLarge`)),!1):(y++,!0)};function ee(e){y=Math.max(0,y-1);let t=v,n=(0,u.reactive)({uid:_++,name:e.file.name,status:`uploading`});f.value.push(n);let r=H(function*(){try{let r=yield c().upload({file:e.file}),i=r==null?void 0:r.data;if(!i||i.id==null||typeof i.url!=`string`||!i.url||typeof i.name!=`string`||!i.name)throw TypeError(`Upload API must return data with id, name and url.`);if(t!==v)return;Object.assign(n,{fileId:i.id,url:i.url,name:i.name,size:i.size,status:`pending`}),w()}catch(e){throw t===v&&(n.status=`failed`,n.error=e instanceof Error?e.message:String(e)),e}})();return g.add(r),r.then(()=>{g.delete(r),t===v&&d.value!==void 0&&N()},()=>{g.delete(r)}),r}let O=e=>C(e);function k(){return A.apply(this,arguments)}function A(){return A=H(function*(){yield Promise.allSettled([...g]);let e=f.value.find(e=>e.status===`failed`);if(e)throw Error(e.error||a(`upload.failed`))}),A.apply(this,arguments)}function te(e,t){return j.apply(this,arguments)}function j(){return j=H(function*(e,t){if(x&&(yield x),yield Promise.allSettled([...g]),t!==v||d.value!==e)return;let n=f.value.filter(e=>e.status===`pending`&&e.fileId!=null);if(n.length)try{if(yield c().attach(V(V({},S(e)),{},{fileIds:n.map(e=>e.fileId),isCover:r.autoCover&&n.length===1&&E(n[0].name)?1:0})),t!==v||d.value!==e)return;n.forEach(e=>{e.status=`recent`,e.error=void 0})}catch(r){throw t===v&&d.value===e&&n.forEach(e=>{e.error=r instanceof Error?r.message:String(r)}),r}let i=yield c().list(V(V({},S(e)),{},{pageSize:1e3}));if(!i||!Array.isArray(i.list))throw TypeError(`Upload list API must return a list array.`);if(t!==v||d.value!==e)return;if(i.list.some(e=>!e||e.fileId==null||typeof e.name!=`string`||!e.name||typeof e.url!=`string`||!e.url))throw TypeError(`Upload list entries must have fileId, name and url.`);let a=f.value.filter(e=>e.status!==`linked`&&e.status!==`recent`),o=i.list.map(e=>({uid:_++,id:e.id,fileId:e.fileId,name:e.name,url:e.url,size:e.size,isCover:e.isCover,status:`linked`})),s=f.value.filter(e=>e.status===`recent`&&!o.some(t=>t.fileId===e.fileId));f.value=[...o,...s,...a],p.value=``,w()}),j.apply(this,arguments)}function M(){let e=d.value;if(e===void 0)return Promise.reject(Error(a(`upload.missingBusinessId`)));if(b)return b.then(()=>M());let t=te(e,v);return b=t,m.value=!0,t.then(()=>{b===t&&(b=void 0,m.value=!1)},()=>{b===t&&(b=void 0,m.value=!1)}),t}function N(){let e=v;M().catch(t=>{e===v&&(p.value=t instanceof Error?t.message:String(t),C(t))})}function ne(){return re.apply(this,arguments)}function re(){return re=H(function*(){yield k(),yield M()}),re.apply(this,arguments)}function ie(){N()}function ae(e){h.value=!0;let t=e();x=t,t.then(()=>{x===t&&(x=void 0,h.value=!1)},()=>{x===t&&(x=void 0,h.value=!1)}),t.catch(C)}function oe(e){ae(H(function*(){let t=v;if(e.status===`linked`&&d.value!==void 0||e.status===`recent`){let t=d.value;if(t===void 0||e.fileId==null)throw Error(a(`upload.missingBusinessId`));yield c().remove(V(V({},S(t)),{},{fileId:e.fileId}))}t===v&&(f.value=f.value.filter(t=>t.uid!==e.uid),w(),i(`reload`))}))}function se(e){ae(H(function*(){let t=v;if(e.id==null)throw Error(a(`upload.missingBusinessId`));let n=+!e.isCover;yield c().setCover(e.id,n),t===v&&(e.isCover=n,i(`reload`))}))}return(0,u.watch)(()=>r.modelValue,e=>{let t=e==null?[]:e,n=f.value,r=[...n],i=t.map(e=>{let t=r.findIndex(t=>t.url===e);return t>=0?r.splice(t,1)[0]:{uid:_++,name:a_(e),url:e,status:`linked`}});f.value=[...i,...n.filter(e=>e.status===`uploading`||e.status===`failed`)]},{immediate:!0,deep:!0}),(0,u.watch)(d,(e,t)=>{if(t!==void 0&&e!==t){var n;v++,b=void 0,m.value=!1,p.value=``,f.value=((n=r.modelValue)==null?[]:n).map(e=>({uid:_++,name:a_(e),url:e,status:`linked`}))}e!==void 0&&N()},{immediate:!0}),(0,u.onBeforeUnmount)(()=>{v++}),t({waitForUploads:k,waitForAssociations:ne,retryAssociations:ie}),(t,n)=>{let r=(0,u.resolveComponent)(`el-button`),o=(0,u.resolveComponent)(`el-upload`),s=(0,u.resolveComponent)(`el-link`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,o_,[l.value?(0,u.createCommentVNode)(``,!0):((0,u.openBlock)(),(0,u.createBlock)(o,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(e=>`.${e.replace(/^\./,``)}`).join(`,`),"before-upload":D,"http-request":ee,"on-error":O},(0,u.createSlots)({default:(0,u.withCtx)(()=>[(0,u.createVNode)(r,{type:`primary`},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.select`)),1)]),_:1})]),_:2},[e.isShowTip?{name:`tip`,fn:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,null,(0,u.toDisplayString)((0,u.unref)(a)(`upload.tip`))+`: `+(0,u.toDisplayString)(e.fileType.join(`/`))+`; `+(0,u.toDisplayString)(e.fileSize)+` MB`,1)]),key:`0`}:void 0]),1032,[`drag`,`multiple`,`accept`])),p.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,s_,[(0,u.createTextVNode)((0,u.toDisplayString)(p.value)+` `,1),l.value?(0,u.createCommentVNode)(``,!0):((0,u.openBlock)(),(0,u.createBlock)(r,{key:0,link:``,onClick:ie},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.retry`)),1)]),_:1}))])):(0,u.createCommentVNode)(``,!0),(0,u.createElementVNode)(`ul`,c_,[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(f.value,t=>((0,u.openBlock)(),(0,u.createElementBlock)(`li`,{key:t.uid,class:`ab-upload-file__item`},[(0,u.createElementVNode)(`span`,null,(0,u.toDisplayString)(t.name),1),t.status===`uploading`?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,l_,(0,u.toDisplayString)((0,u.unref)(a)(`upload.uploading`)),1)):(0,u.createCommentVNode)(``,!0),t.error?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,u_,(0,u.toDisplayString)(t.error),1)):(0,u.createCommentVNode)(``,!0),t.url&&e.preEnabled?((0,u.openBlock)(),(0,u.createBlock)(r,{key:2,link:``,onClick:e=>i(`preview`,T(t))},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.preview`)),1)]),_:1},8,[`onClick`])):(0,u.createCommentVNode)(``,!0),t.url&&e.dowEnabled?((0,u.openBlock)(),(0,u.createBlock)(s,{key:3,href:t.url,target:`_blank`,download:``},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.download`)),1)]),_:1},8,[`href`])):(0,u.createCommentVNode)(``,!0),!l.value&&e.coverEnabled&&t.id!=null&&E(t.name)?((0,u.openBlock)(),(0,u.createBlock)(r,{key:4,disabled:m.value||h.value,link:``,onClick:e=>se(t)},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(t.isCover?(0,u.unref)(a)(`upload.unsetCover`):(0,u.unref)(a)(`upload.setCover`)),1)]),_:2},1032,[`disabled`,`onClick`])):(0,u.createCommentVNode)(``,!0),!l.value&&t.status===`pending`&&t.error?((0,u.openBlock)(),(0,u.createBlock)(r,{key:5,link:``,onClick:ie},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.retry`)),1)]),_:1})):(0,u.createCommentVNode)(``,!0),!l.value&&e.delEnabled&&t.status!==`uploading`?((0,u.openBlock)(),(0,u.createBlock)(r,{key:6,disabled:m.value||h.value,link:``,onClick:e=>oe(t)},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)((0,u.unref)(a)(`upload.delete`)),1)]),_:1},8,[`disabled`,`onClick`])):(0,u.createCommentVNode)(``,!0)]))),128))])])}}})),f_=[Pg,Ig,Rg,Wg,Gg,Kg,qg,Zg,n_,d_],p_={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`},m_=`datePicker`,h_={name:m_,maker:[`year`,`month`,`date`,`dates`,`week`,`datetime`,`datetimeRange`,`dateRange`,`monthRange`].reduce((e,t)=>(e[t]=$(m_,{type:t.toLowerCase()}),e),{}),mergeProp(e){let t=e.prop.props;if(!t.valueFormat){var n;t.valueFormat=p_[(n=t.type)==null?``:n]||p_.date}}},g_=`hidden`,__={name:g_,maker:{[g_]:(e,t)=>$(g_)(``,e,t)},render(){return[]}},v_=`input`,y_=[`password`,`url`,`email`,`text`,`textarea`].reduce((e,t)=>(e[t]=$(v_,{type:t}),e),{});y_.idate=$(v_,{type:`date`});var b_={name:v_,maker:y_,mergeProp(e){let{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize==`object`&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},x_={name:`inputNumber`},S_={name:`textarea`,mergeProp(e){let{props:t}=e.prop;t.type=`textarea`,t.autosize&&typeof t.autosize==`object`&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},C_=`slider`,w_={name:C_,maker:{sliderRange:$(C_,{range:!0})},toFormValue(e,t){let n=Array.isArray(e),r=t.prop.props,i=r.min||0,a;return a=r.range===!0?n?e:[i,parseFloat(e)||i]:n?parseFloat(e[0])||i:parseFloat(e),a}},T_=`timePicker`,E_={name:T_,maker:{time:$(T_,e=>e.props.isRange=!1),timeRange:$(T_,e=>e.props.isRange=!0)},mergeProp(e){let t=e.prop.props;t.valueFormat||(t.valueFormat=`HH:mm:ss`)}},D_={name:`FcRow`,render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},O_={name:`select`,toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?fc(e):e}},k_=V(V({},O_),{},{name:`treeSelect`}),A_={name:`text`,render(e,t){let n=t.$handle.api.getValue(t.field),r=al(t.prop).formatter,i=typeof r==`function`?r({cellValue:n,column:t.rule,row:t.$handle.api.formData()}):n,a=String(i==null?``:i);return xl(t.prop.link)?(0,u.h)(El,{link:t.prop.link,value:n,row:t.$handle.api.formData()},{default:()=>a}):(0,u.h)(l.ElText,null,{default:()=>a})}},j_={name:`radio`},M_=V(V({},j_),{},{name:`checkbox`}),N_=[h_,__,b_,x_,V(V({},x_),{},{name:`number`}),V(V({},x_),{},{name:`inputCurrency`}),V(V({},x_),{},{name:`inputPercent`}),A_,S_,w_,E_,D_,O_,k_,j_,M_,{name:`switch`},{name:`cascader`},{name:`colorPicker`,render(e,t){var n;if((t==null||(n=t.$handle)==null||(n=n.vm)==null||(n=n.props)==null?void 0:n.readonly)===!0){let e=t.$handle.api.getValue(t.field),n=typeof e==`string`?e:void 0;return(0,u.h)(`span`,{class:`ab-color-picker__readonly`,style:{backgroundColor:n,color:n?Tc.getContrast(n):yc.black},title:n},String(e==null?``:e))}return t.$render.defaultRender(t,e)}}],P_={input:`el-input`,number:`el-input-number`,inputNumber:`el-input-number`,inputCurrency:`el-input-number`,inputPercent:`el-input-number`,inputRange:`ab-input-range`,text:`el-text`,divider:`el-divider`,select:`ab-select`,treeSelect:`el-tree-select`,datePicker:`el-date-picker`,timePicker:`ab-time-picker`,cascader:`el-cascader`,colorPicker:`ab-colorPicker`,timePeriod:`ab-time-period`,uploadFile:`ab-upload-file`,textarea:`el-input`,button:`el-button`,icon:`ab-icon`,slider:`el-slider`,rate:`el-rate`,upload:`ab-upload`,popover:`el-popover`,tooltip:`el-tooltip`,timeSelect:`el-time-select`,switch:`el-switch`,checkbox:`ab-checkbox`,radio:`ab-radio`,formItem:`el-form-item`,form:`el-form`,frame:`ab-frame`,col:`el-col`,row:`el-row`,tree:`ab-tree`,inputTag:`el-input-tag`,inputOtp:`el-input-otp`,mention:`el-mention`,transfer:`el-transfer`,autoComplete:`el-autocomplete`,auto:`el-autocomplete`,group:`ab-group`,array:`ab-group`,object:`ab-sub-form`,subForm:`ab-sub-form`};function F_(){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}}}var I_=[`children`],{t:L_}=z(),R_=new Set([`input`,`inputnumber`,`textarea`,`password`,`inputtag`]),z_=new Set([`select`,`datepicker`,`timepicker`,`treeselect`,`cascader`,`autocomplete`]);function B_(e){return e.type===`tooltip`}function V_(e,t){G(e,t)&&W.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function H_(e){return e===!1}function U_(e,t){G(e,t)&&!W.Object(e[t])&&(e[t]={show:!!e[t]})}function W_(e){let t=V({},e);return delete t.children,t}var G_={validate(){let e=this.form();return e?e.validate():new Promise(e=>e())},validateField(e){return new Promise((t,n)=>{let r=this.form();r?r.validateField(e,(e,r)=>{r?n(r):t(e)}):t(void 0)})},clearValidateState(e){let t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,n,r){if(!r){var i;(i=this.vm.refs[e.wrapRef])==null||(i=i.validate(`change`))==null||i.catch(()=>{})}},tidyOptions(e){return[`submitBtn`,`resetBtn`,`row`,`info`,`wrap`,`col`,`title`].forEach(t=>{U_(e,t)}),e},tidyRule({prop:e}){return V_(e,`title`),V_(e,`info`),e},mergeProp(e){var t,n,r,i;let a=mp(V(V({},e.rule),e.prop),{includeChildren:((t=this.$handle)==null||(t=t.vm)==null||(t=t.props)==null?void 0:t.readonly)!==!0}),{children:o}=a,s=lp(a,I_);Object.assign(e.prop,s),o!==e.rule.children&&(e.rule.children=o);let c=String(e.rule.type||e.type||``).replace(/[-_]/g,``).toLowerCase(),l=(n=(r=e.refRule)==null||(r=r.__$title)==null?void 0:r.value)==null?typeof e.rule.title==`object`?(i=e.rule.title)==null?void 0:i.title:e.rule.title:n;if((R_.has(c)||z_.has(c))&&l!=null&&l!==``){var u;(u=e.prop).props||(u.props={}),this.$handle.api.getLocale();let t=z_.has(c)?L_(`pleaseSelect`):L_(`pleaseEnter`);G(e.prop.props,`placeholder`)||(e.prop.props.placeholder=`${t}${mc(l)}`);let n=String(e.prop.props.type||``).toLowerCase();c!==`datepicker`&&c!==`timepicker`||!n.endsWith(`range`)&&e.prop.props.isRange!==!0||(G(e.prop.props,`startPlaceholder`)||(e.prop.props.startPlaceholder=`${t}${L_(`rangeStart`)}${mc(l)}`),G(e.prop.props,`endPlaceholder`)||(e.prop.props.endPlaceholder=`${t}${L_(`rangeEnd`)}${mc(l)}`))}let d={info:{trigger:`hover`,placement:`top-start`,icon:!0},title:{},col:{span:24},wrap:{}};[`info`,`wrap`,`col`,`title`].forEach(t=>{e.prop[t]=ic([this.options[t]||{},e.prop[t]||{}],d[t])})},getDefaultOptions(){return F_()},update(){let e=this.options.form,t=V({},e);delete t.fieldWidth,this.rule={props:V({},t),on:{submit:e=>{e.preventDefault()}},style:e.style,type:`form`}},beforeRender(){let{key:e,ref:t,$handle:n}=this,r=this.options.form;K(this.rule,{key:e,ref:t,class:[r.className,r.class,`ab-form`,this.$handle.preview?`is-preview`:``]}),K(this.rule.props,{model:n.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,H_(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){var n;let r=e.prop,i=`${this.key}${e.key}`,a=r.col,o=this.isTitle(r)&&r.wrap.title!==!1,s=!(a!=null&&a.labelWidth)&&!o?0:a==null?void 0:a.labelWidth,c=e.input?(n=this.options.form)==null?void 0:n.fieldWidth:``,{inline:l,col:u}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;let f=(W.Undef(r.wrap.show)?!e.input:H_(r.wrap.show))?t:this.$r(ic([r.wrap,V(V({props:V(V({labelWidth:s===void 0?s:mc(s),label:o?r.title.title:void 0},W_(r.wrap||{})),{},{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,`ab-form-item`)},c?{style:{"--ab-field-width":mc(c)}}:{}),{},{key:`${i}fi`,ref:e.wrapRef,type:`formItem`})]),V({default:()=>t},o?{label:()=>this.makeInfo(r,i,e)}:{}));return l===!0||H_(u)||H_(a.show)?f:this.makeCol(r,i,[f])},isTitle(e){if(this.options.form.title===!1)return!1;let t=e.title;return!(!t.title&&!t.native||H_(t.show))},makeInfo(e,t,n){var r,i;let a=V({},e.title),o=V({},e.info),s=B_(o),c=this.options.form,l=this.getSlot(`title`),u=[l?l({title:(r=n.refRule)==null||(r=r.__$title)==null?void 0:r.value,rule:n.rule,options:this.options}):((i=n.refRule)==null||(i=i.__$title)==null?void 0:i.value)+(c.labelSuffix||c[`label-suffix`]||``)];if(!H_(o.show)&&(o.info||o.native)&&!H_(o.icon)){let e={type:o.type||`popover`,props:W_(o),key:`${t}pop`};delete e.props.icon,delete e.props.show,delete e.props.info,delete e.props.align,delete e.props.native;let r=`content`;if(o.info&&!G(e.props,r)){var d;e.props[r]=(d=n.refRule)==null||(d=d.__$info)==null?void 0:d.value}u[o.align===`left`?`push`:`unshift`](this.$r(ic([o,e]),{[a.slot||(s?`default`:`reference`)]:()=>this.$r({type:`ElIcon`,style:`top:2px`,key:`${t}i`},{default:()=>this.$r({type:o.icon===!0?`icon-warning`:o.icon})},!0)}))}let f=ic([a,{props:W_(a),key:`${t}tit`,class:`ab-form-title`,type:a.type||`span`,on:{click:(...e)=>{this.$handle.targetHook(n,`titleClick`,{args:e})}}}]);return delete f.props.show,delete f.props.title,delete f.props.native,this.$r(f,u)},makeCol(e,t,n){let r=V({},e.col);return delete r.show,this.$r({class:this.$render.mergeClass(r.class,`ab-form-col`),type:`col`,props:r||{span:24},key:`${t}col`},n)},makeRow(e){let 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(H_(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),H_(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;let 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(){let e=V({},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:()=>{let e=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(e):e.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){let e=V({},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:()=>{let e=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(e):e.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},K_={};q_(K_),J_(K_),Y_(K_),X_(K_),Z_(K_),Q_(K_);function q_(e){[`group`,`tree`,`switch`,`upload`,`autoComplete`,`checkbox`,`cascader`,`colorPicker`,`datePicker`,`frame`,`inputNumber`,`inputTag`,`inputOtp`,`mention`,`transfer`,`treeSelect`,`radio`,`rate`].forEach(t=>{e[t]=$(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function J_(e){e.treeSelectMultiple=$(`treeSelect`,{multiple:!0})}function Y_(e){let t=`select`,n=`multiple`;e.selectMultiple=$(t,{[n]:!0}),e.selectOne=$(t,{[n]:!1})}function X_(e){let t={treeSelected:`selected`,treeChecked:`checked`};Object.keys(t).reduce((e,n)=>(e[n]=$(`tree`,{type:t[n]}),e),e)}function Z_(e){let t={image:[`image`,0],file:[`file`,0],uploadFileOne:[`file`,1],uploadImageOne:[`image`,1]};Object.keys(t).reduce((e,n)=>(e[n]=$(`upload`,e=>e.props({uploadType:t[n][0],maxLength:t[n][1]})),e),e),e.uploadImage=e.image,e.uploadFile=e.file}function Q_(e){let t={frameInputs:[`input`,0],frameFiles:[`file`,0],frameImages:[`image`,0],frameInputOne:[`input`,1],frameFileOne:[`file`,1],frameImageOne:[`image`,1]};return Object.keys(t).reduce((e,n)=>(e[n]=$(`frame`,e=>e.props({type:t[n][0],maxLength:t[n][1]})),e),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function $_(e,t){return W.Boolean(e)?e={show:e}:!W.Undef(e)&&!W.Object(e)&&(e={show:t}),e}function ev(e,t){return{formEl(){return t.$manager.form()},wrapEl(e){let n=t.getFieldCtx(e);if(n)return t.vm.refs[n.wrapRef]},validate(n){return new Promise((r,i)=>{let a=e.children,o=[t.$manager.validate()];a.filter(e=>!e.isScope).forEach(e=>{o.push(e.validate())}),Promise.all(o).then(()=>{r(!0),n&&n(!0)}).catch(r=>{i(r),n&&n(r),t.vm.emit(`validate-fail`,r,{api:e}),t.emitEvent(`validate-fail`,r,{api:e})})})},validateField(n,r){return new Promise((i,a)=>{let o=typeof n==`object`?ql(n):t.getCtx(n);if(!o){i(null),r&&r(null);return}let s=t.subForm[o.id],c=[t.$manager.validateField(o.id)];fc(s).filter(e=>!e.isScope).forEach(e=>{c.push(e.validate())}),Promise.all(c).then(()=>{i(null),r&&r(null)}).catch(i=>{a(i),r&&r(i),t.vm.emit(`validate-field-fail`,i,{field:n,api:e})})})},validateFields(t,n){return new Promise((r,i)=>{Array.isArray(t)||(t=[t]);let a=t.map(t=>e.validateField(t));Promise.all(a).then(()=>{r(null),n&&n(null)}).catch(e=>{i(e),n&&n(e)})})},clearValidateState(n,r=!0){e.helper.tidyFields(n).forEach(e=>{r&&this.clearSubValidateState(e),t.getCtxs(e).forEach(e=>{t.$manager.clearValidateState(e)})})},clearSubValidateState(n){e.helper.tidyFields(n).forEach(e=>{t.getCtxs(e).forEach(e=>{let n=t.subForm[e.id];n&&(Array.isArray(n)?n.forEach(e=>{e.clearValidateState()}):n&&n.clearValidateState())})})},btn:{loading:(t=!0)=>{e.submitBtnProps({loading:!!t})},disabled:(t=!0)=>{e.submitBtnProps({disabled:!!t})},show:(t=!0)=>{e.submitBtnProps({show:!!t})}},resetBtn:{loading:(t=!0)=>{e.resetBtnProps({loading:!!t})},disabled:(t=!0)=>{e.resetBtnProps({disabled:!!t})},show:(t=!0)=>{e.resetBtnProps({show:!!t})}},submitBtnProps:(n={})=>{let r=$_(t.options.submitBtn,!0);K(r,n),t.options.submitBtn=r,e.refreshOptions()},resetBtnProps:(n={})=>{let r=$_(t.options.resetBtn,!1);K(r,n),t.options.resetBtn=r,e.refreshOptions()},submit(n,r){return new Promise((i,a)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let r=e.formData();t.beforeSubmit(r).then(()=>{W.Function(n)&&Z(()=>n(r,e)),W.Function(t.options.onSubmit)&&Z(()=>t.options.onSubmit(r,e)),t.vm.emit(`submit`,r,e),i(r)}).catch(()=>{})}).catch((...t)=>{W.Function(r)&&Z(()=>r(e,...t)),a(...t)})})}}}var tv={name:`required`,load(e,t,n){let r=nv(e.getValue()),i;if(r.required===!1)e.clearProp(),n==null||n.clearValidateState([t==null?void 0:t.field]);else{let a=V({required:!0,validator(e,t,n){o(),W.empty(t)?n(a.message):n()}},r),o=()=>{var e;let o=t==null||(e=t.__fc__.refRule.__$title)==null?void 0:e.value;if(i!==o){if(i=o,!r.message)a.message=(n==null?void 0:n.t(`required`,{title:o}))||o+((n==null?void 0:n.getLocale())===`en`?` is required`:`不能为空`);else{let e=r.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(a.message=n==null?void 0:n.t(e[1],{title:o}))}}};o(),e.getProp().validate=[a]}n==null||n.sync(t)},watch(e,t,n){tv.load(e,t,n)}};function nv(e){return W.Boolean(e)?{required:e}:W.String(e)?{message:e}:W.Undef(e)?{required:!1}:W.Function(e)?{validator:e}:W.Object(e)?e:{}}function rv(e,t){let n=e;n.componentAlias(P_),f_.forEach(e=>{let t=e;n.component(t.name,t)}),n.register(tv),N_.forEach(e=>{n.parser(e)});let r=K_;Object.keys(r).forEach(e=>{n.maker[e]=r[e]});let i=typeof window<`u`?window.ElementPlus:void 0;i&&n.useApp((e,t)=>{t.use(i)})}function iv(){return sp({ui:`element-plus`,version:`0.1.3`,manager:G_,extendApi:ev,install:rv,attrs:{normal:[`col`,`wrap`],array:[`className`],key:[`title`,`info`]}})}var av=(0,u.defineComponent)(V(V({},{name:`abDrawer`}),{},{__name:`ab-drawer`,props:(0,u.mergeModels)({visible:{type:Boolean,default:!1},detailLevel:{default:1}},{visible:{type:Boolean},visibleModifiers:{}}),emits:[`update:visible`],setup(e){let t=e,n=(0,u.useModel)(e,`visible`),r=(0,u.computed)(()=>t.detailLevel&&t.detailLevel<5?`${76-t.detailLevel*8}%`:`32%`);return(e,t)=>{let i=(0,u.resolveComponent)(`el-drawer`);return(0,u.openBlock)(),(0,u.createBlock)(i,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),"with-header":!1,"show-close":!1,"append-to-body":``,"close-on-click-modal":``,"close-on-press-escape":``,"destroy-on-close":``,size:r.value},{default:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`size`])}}})),ov=(e,t)=>{e.component(`ab-drawer`,av)},sv=o(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{default:()=>u}),t.exports=c(l);var u={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:`无匹配项`}}}}})),cv=o(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{default:()=>u}),t.exports=c(l);var u={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`}}}}})),lv=c(sv(),1),uv=c(cv(),1);p.VxeUI.setI18n(`zh-CN`,lv.default),p.VxeUI.setI18n(`en-US`,uv.default);var dv=(e,t)=>{let{fieldMap:n}=t||{};e.component(`ab-drawer`,av),e.component(`ab-table`,Tp),e.component(`ab-table-detail`,Dp);let{isZhCN:r}=R();r()?p.VxeUI.setLanguage(`zh-CN`):p.VxeUI.setLanguage(`en-US`)},fv={class:`ab-detail__title`},pv=(0,u.defineComponent)(V(V({},{name:`AbDetail`}),{},{__name:`ab-detail`,props:(0,u.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:(0,u.mergeModels)([`open`,`close`],[`update:modelValue`]),setup(e,{expose:t,emit:n}){let r=n,i=e,{t:a}=z(),o=(0,f.useRoute)(),s=(0,u.ref)(),c=(0,u.ref)({}),l=(0,u.ref)({}),d=(0,u.useModel)(e,`modelValue`);(0,u.ref)(i.vertical);let p=(0,u.ref)(i.readonly);(0,u.watch)(()=>i.readonly,e=>p.value=e,{immediate:!0}),(0,u.computed)(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:`32%`);let m=(0,u.computed)(()=>i.id),h=(0,u.computed)(()=>{var e,t;return!((e=d.value)!=null&&e[i.idField])||((t=d.value)==null?void 0:t[i.idField])===`new`}),g=(0,u.computed)(()=>h.value?`${a(`action.create`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`:p.value?`${a(`action.detail`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`:`${a(`action.edit`)} - ${i.title||(o==null?void 0:o.meta.title)||``}`),_=(0,u.computed)(()=>{var e;return((e=i.rule)==null?[]:e).map(e=>typeof e.getRule==`function`?e.getRule():e)}),v=()=>{var e;p.value=!1,(e=c.value)==null||e.refresh()},y=function(){var e=H(function*(){w.value=!0;let e;h.value&&typeof i.createHandler==`function`?(e=yield i.createHandler(d.value),e&&(d.value[i.idField]=e),yield(0,u.nextTick)()):!h.value&&typeof i.updateHandler==`function`&&(e=yield i.updateHandler(d.value)),console.warn(`saveHandler: `,JSON.stringify(d.value,null,2)),w.value=!1});return function(){return e.apply(this,arguments)}}(),b=()=>{var e;p.value=!0,(e=c.value)==null||e.refresh()},x=()=>D(),S=(0,u.computed)(()=>{let e=Da(_.value.find(e=>e.type!==X.OPERATE&&e.field===X.OPERATE));return e||(e={type:`ElRow`,field:X.OPERATE,title:`操作`,width:260,fixed:`right`,children:[]}),e.children=$o(e==null?void 0:e.children,e=>e.field!==X.DETAIL),e!=null&&e.children&&Array.isArray(e==null?void 0:e.children)&&e.children.push({type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:edit-pen`}},a(`action.edit`)],props:{type:`primary`},computed:{hidden:!p.value},on:{click:v}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:check`}},a(`action.save`)],props:{type:`success`,plain:!0},computed:{hidden:p.value},on:{click:y}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:refresh-right`}},a(`action.cancel`)],computed:{hidden:p.value},on:{click:b}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:back`}},a(`action.return`)],on:{click:x}}),e}),C=(0,u.computed)(()=>(0,u.reactive)($o(_.value,e=>e.type!==X.OPERATE&&e.field!==X.OPERATE).map(e=>Aa(e,(e,t)=>{if(t===`component`&&e&&typeof e==`object`)return(0,u.markRaw)((0,u.toRaw)(e))})))),w=(0,u.ref)(!1),T=function(){var e=H(function*(){w.value=!0,console.log(`abDetail.init: `,m==null?void 0:m.value,S.value),m.value&&typeof i.getHandler==`function`?d.value=yield i.getHandler(m.value):d.value={},w.value=!1});return function(){return e.apply(this,arguments)}}();(0,u.onMounted)(()=>T());let E=function(){var e=H(function*(e=void 0,t=!1){var n;if(p.value=t,w.value=!0,typeof i.getHandler==`function`&&e!=null&&e[i.idField]){let t=yield i.getHandler(e==null?void 0:e[i.idField]);d.value=t||{}}else{var a;let t=Da(e)||{};(a=i.rule)==null||a.forEach(e=>{let n=typeof e.getRule==`function`?e.getRule():e;n.field&&n.field!==X.OPERATE&&(t==null?void 0:t[n.field])===void 0&&n.edit===void 0&&n.itemRender===void 0&&(t[n.field]=``)}),d.value=t}yield(0,u.nextTick)(),(n=c.value)==null||n.refresh(),r(`open`,d.value),w.value=!1});return function(){return e.apply(this,arguments)}}(),D=()=>{p.value=!0,d.value={},r(`close`)};return t({open:E,close:D,toggle:(e=!1,t=void 0,n=!1)=>e?E(t,n):D(),reload:function(){var e=H(function*(){if(typeof i.getHandler!=`function`||!d.value[i.idField]){console.error(`abTableDetail.reload: no getHandler or no idField!`);return}let e=yield i.getHandler(d.value[i.idField]);E(e,p.value)});return function(){return e.apply(this,arguments)}}()}),(t,n)=>{let r=(0,u.resolveComponent)(`el-card`),i=(0,u.resolveComponent)(`ab-form`),a=(0,u.resolveDirective)(`loading`);return(0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,null,[(0,u.createVNode)(r,{class:`ab-detail__header w-full sticky top-0 z-9`,shadow:`never`},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,fv,(0,u.toDisplayString)(g.value),1),(0,u.withDirectives)((0,u.createVNode)(yl,{class:`ab-detail__opr`,"permi-prefix":e.permiPrefix,rule:S.value,"model-value":d.value,api:l.value,"onUpdate:api":n[0]||(n[0]=e=>l.value=e),plain:``,readonly:p.value},null,8,[`permi-prefix`,`rule`,`model-value`,`api`,`readonly`]),[[a,w.value]])]),_:1}),(0,u.createVNode)(r,{class:`ab-detail__form`,shadow:`never`},{default:(0,u.withCtx)(()=>[(0,u.withDirectives)((0,u.createVNode)(i,{ref_key:`formRef`,ref:s,rule:C.value,modelValue:d.value,"onUpdate:modelValue":n[1]||(n[1]=e=>d.value=e),api:c.value,"onUpdate:api":n[2]||(n[2]=e=>c.value=e),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:p.value},null,8,[`rule`,`modelValue`,`api`,`id-field`,`id-field-table`,`readonly`]),[[a,w.value]])]),_:1})],64)}}})),mv=(e,t)=>{e.component(`ab-detail`,pv)},hv={key:0,class:`ab-toolbar__title`},gv={class:`ab-toolbar__title`},_v=(0,u.defineComponent)(V(V({},{name:`AbToolbar`}),{},{__name:`ab-toolbar`,props:(0,u.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}){let n=e,r=(0,u.inject)(`abTableRef`,null),{t:i}=z(),a=(0,f.useRoute)();vl();let{wsCache:o}=R(),s=(0,u.computed)(()=>o.getCurrentSize||`default`),c=(0,u.computed)(()=>gl(s.value));(0,u.useModel)(e,`vertical`);let l=(0,u.ref)(!1),d=(0,u.computed)(()=>{var e;if(!n.rule||Array.isArray(n.rule)&&!((e=n.rule)!=null&&e.length))return;let t=Da(n.rule);return Array.isArray(t)?{type:`ElRow`,children:[...t]}:t}),p=(0,u.computed)(()=>{var e;if(n.queryHandler)return n.queryHandler;if(typeof(r==null||(e=r.value)==null?void 0:e.reload)==`function`)return r.value.reload}),m=(0,u.ref)();return(0,u.onMounted)(()=>{var e;(e=r.value)==null||e.tableRef.connect(m.value)}),t({getTitle:()=>n.title}),(t,n)=>{let r=(0,u.resolveComponent)(`vxe-toolbar`);return(0,u.openBlock)(),(0,u.createBlock)(r,{ref_key:`toolbarRef`,ref:m,class:`ab-toolbar`,"class-name":e.classNmae,size:c.value,loading:l.value,export:e.exportEnable,refresh:e.refreshEnable,"refresh-options":e.refreshEnable&&p.value?{queryMethod:p.value}:void 0,custom:!!e.settingEnable},{buttons:(0,u.withCtx)(()=>[e.title?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,hv,[(0,u.renderSlot)(t.$slots,`icon`),(0,u.createTextVNode)(` `+(0,u.toDisplayString)(e.title),1)])):(0,u.renderSlot)(t.$slots,`buttons`,{},()=>{var e;return[(0,u.createElementVNode)(`div`,gv,(0,u.toDisplayString)(((e=(0,u.unref)(a))==null||(e=e.meta)==null?void 0:e.title)||``),1)]},void 0,1)]),tools:(0,u.withCtx)(()=>[(0,u.renderSlot)(t.$slots,`tools`),(0,u.createVNode)(yl,{"permi-prefix":e.permiPrefix,rule:d.value,plain:``},null,8,[`permi-prefix`,`rule`])]),_:3},8,[`class-name`,`size`,`loading`,`export`,`refresh`,`refresh-options`,`custom`])}}})),vv=(e,t)=>{let{fieldMap:n}=t||{};e.component(`ab-toolbar`,_v)},yv=iv();typeof window<`u`&&(window.abForm=yv);var bv=yv.maker;function xv(e,t){t!=null&&t.upload&&e.provide(r_,t.upload),h(e,{AbForm:yv}),Ns(e),ov(e),dv(e),mv(e),vv(e)}exports.AbForm=yv,exports.AbTable=Tp,exports.AbTableDetail=Dp,exports.AbTableEnum=X,exports.AbUploadFile=d_,exports.CACHE_KEY=fs,exports.en=us,exports.getCurrentSize=bs,exports.getLang=ms,exports.getTheme=_s,exports.getUser=Ss,exports.isDark=vs,exports.isZhCN=hs,exports.maker=bv,exports.setCurrentSize=ys,exports.setLang=ps,exports.setTheme=gs,exports.setUser=xs,exports.setupArchbizKit=xv,exports.useCache=R,exports.zhCN=ds;