sunyard-szyy-ui 0.7.17 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.mjs +2051 -1854
  3. package/dist/utils/index.cjs +5 -0
  4. package/dist/utils/index.js +5 -0
  5. package/es/components/feedback/index.mjs +1 -0
  6. package/es/components/feedback/style/css.mjs +1 -0
  7. package/es/components/feedback/style/index.mjs +1 -0
  8. package/es/components/svg-icon/index.mjs +1 -0
  9. package/es/components/svg-icon/style/css.mjs +1 -0
  10. package/es/components/svg-icon/style/index.mjs +1 -0
  11. package/es/feedback/index.d.ts +2 -0
  12. package/es/feedback/index.d.ts.map +1 -0
  13. package/es/feedback/src/feedback.d.ts +53 -0
  14. package/es/feedback/src/feedback.d.ts.map +1 -0
  15. package/es/feedback/src/feedback.mjs +1 -0
  16. package/es/feedback/style/css.d.ts +7 -0
  17. package/es/feedback/style/css.d.ts.map +1 -0
  18. package/es/feedback/style/index.d.ts +7 -0
  19. package/es/feedback/style/index.d.ts.map +1 -0
  20. package/es/hooks/dist/index.mjs +1 -1
  21. package/es/index.d.ts +6 -2
  22. package/es/index.d.ts.map +1 -1
  23. package/es/index.mjs +3 -3
  24. package/es/loading/src/loading.d.ts.map +1 -1
  25. package/es/loading/src/loading.mjs +1 -1
  26. package/es/make-installer.mjs +1 -1
  27. package/es/svg-icon/index.d.ts +2 -0
  28. package/es/svg-icon/index.d.ts.map +1 -0
  29. package/es/svg-icon/src/svg-icon.d.ts +187 -0
  30. package/es/svg-icon/src/svg-icon.d.ts.map +1 -0
  31. package/es/svg-icon/src/svg-icon.mjs +1 -0
  32. package/es/svg-icon/style/css.d.ts +3 -0
  33. package/es/svg-icon/style/css.d.ts.map +1 -0
  34. package/es/svg-icon/style/index.d.ts +3 -0
  35. package/es/svg-icon/style/index.d.ts.map +1 -0
  36. package/es/version.d.ts +1 -1
  37. package/es/version.d.ts.map +1 -1
  38. package/es/version.mjs +2 -2
  39. package/lib/components/feedback/index.js +1 -0
  40. package/lib/components/feedback/style/css.js +1 -0
  41. package/lib/components/feedback/style/index.js +1 -0
  42. package/lib/components/svg-icon/index.js +1 -0
  43. package/lib/components/svg-icon/style/css.js +1 -0
  44. package/lib/components/svg-icon/style/index.js +1 -0
  45. package/lib/feedback/index.d.ts +2 -0
  46. package/lib/feedback/src/feedback.d.ts +53 -0
  47. package/lib/feedback/src/feedback.js +1 -0
  48. package/lib/feedback/style/css.d.ts +7 -0
  49. package/lib/feedback/style/index.d.ts +7 -0
  50. package/lib/hooks/dist/index.js +1 -1
  51. package/lib/index.d.ts +6 -2
  52. package/lib/index.js +2 -2
  53. package/lib/loading/src/loading.js +1 -1
  54. package/lib/make-installer.js +1 -1
  55. package/lib/svg-icon/index.d.ts +2 -0
  56. package/lib/svg-icon/src/svg-icon.d.ts +187 -0
  57. package/lib/svg-icon/src/svg-icon.js +1 -0
  58. package/lib/svg-icon/style/css.d.ts +3 -0
  59. package/lib/svg-icon/style/index.d.ts +3 -0
  60. package/lib/version.d.ts +1 -1
  61. package/lib/version.js +2 -2
  62. package/package.json +4 -4
  63. package/theme-chalk/index.css +1 -1
  64. package/theme-chalk/src/index.scss +1 -0
  65. package/theme-chalk/src/svg-icon.scss +12 -0
  66. package/theme-chalk/svg-icon.css +1 -0
@@ -1,7 +1,7 @@
1
- (function(h,y){typeof exports=="object"&&typeof module!="undefined"?y(exports,require("@sunyard-szyy-ui/utils"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","@sunyard-szyy-ui/utils","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],y):(h=typeof globalThis!="undefined"?globalThis:h||self,y(h.SunyardSzyyUI={},h.utils,h.Vue,h.hooks,h.adapter,h.iconsVue,h.Sortable))})(this,function(h,y,e,B,f,v,$e){"use strict";var qs=Object.defineProperty,js=Object.defineProperties;var Ks=Object.getOwnPropertyDescriptors;var It=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable;var $t=(h,y,e)=>y in h?qs(h,y,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[y]=e,E=(h,y)=>{for(var e in y||(y={}))Gs.call(y,e)&&$t(h,e,y[e]);if(It)for(var e of It(y))Ws.call(y,e)&&$t(h,e,y[e]);return h},Z=(h,y)=>js(h,Ks(y));var Ie=(h,y,e)=>new Promise((B,f)=>{var v=de=>{try{ye(e.next(de))}catch(Se){f(Se)}},$e=de=>{try{ye(e.throw(de))}catch(Se){f(Se)}},ye=de=>de.done?B(de.value):Promise.resolve(de.value).then(v,$e);ye((e=e.apply(h,y)).next())});/*!
2
- * sunyard-szyy-ui v0.7.17
1
+ (function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d.SunyardSzyyUI={},d.Vue,d.hooks,d.utils,d.adapter,d.iconsVue,d.Sortable))})(this,function(d,e,w,b,u,v,Ue){"use strict";var xr=Object.defineProperty,Pr=Object.defineProperties;var Br=Object.getOwnPropertyDescriptors;var Oe=Object.getOwnPropertySymbols;var Xt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable;var Zt=(d,e,w)=>e in d?xr(d,e,{enumerable:!0,configurable:!0,writable:!0,value:w}):d[e]=w,T=(d,e)=>{for(var w in e||(e={}))Xt.call(e,w)&&Zt(d,w,e[w]);if(Oe)for(var w of Oe(e))vt.call(e,w)&&Zt(d,w,e[w]);return d},J=(d,e)=>Pr(d,Br(e));var en=(d,e)=>{var w={};for(var b in d)Xt.call(d,b)&&e.indexOf(b)<0&&(w[b]=d[b]);if(d!=null&&Oe)for(var b of Oe(d))e.indexOf(b)<0&&vt.call(d,b)&&(w[b]=d[b]);return w};var Be=(d,e,w)=>new Promise((b,u)=>{var v=fe=>{try{Se(w.next(fe))}catch(ge){u(ge)}},Ue=fe=>{try{Se(w.throw(fe))}catch(ge){u(ge)}},Se=fe=>fe.done?b(fe.value):Promise.resolve(fe.value).then(v,Ue);Se((w=w.apply(d,e)).next())});/*!
2
+ * sunyard-szyy-ui v0.8.0
3
3
  * (c) 2026 Sunyard SZYY Base Team
4
- */const ye=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("autocomplete"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.highlight)==null?void 0:a.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleSelect)==null?void 0:a.call(t,n)}}),()=>e.h(f.AdapterAutocomplete,e.mergeProps({ref:l,class:r.b()},c),i)}}),de=y.withInstall(ye),Se=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=B.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),Lt=y.withInstall(Se),Et=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=B.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),Mt=y.withInstall(Et),Ft=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("button"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterButton,e.mergeProps({ref:l,class:r.b()},c),i)}}),Q=y.withInstall(Ft),Dt=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=B.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),zt=y.withInstall(Dt),Ot=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=B.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),We=y.withInstall(Ot),Ht=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=B.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),Ut=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=B.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),Ye=y.withInstall(Ht),Qe=y.withInstall(Ut),qt=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=B.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),jt=y.withInstall(qt),Kt=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("color-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({show:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterColorPicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),Gt=y.withInstall(Kt),Wt=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=B.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),Yt=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=B.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),Qt=y.withInstall(Wt),Jt=y.withInstall(Yt),Zt=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Xt(o){return o.some(s=>{var c;const r=(c=s.type)==null?void 0:c.name;return!!r&&Zt.has(r)})}const vt=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=B.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const c={class:o.b()};if(!("direction"in s)&&r.default){const i=r.default();Xt(i)&&(c.direction="vertical")}return e.h(f.AdapterContainer,e.mergeProps(c,s),r)}}}),en=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=B.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),tn=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=B.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),nn=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=B.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),on=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=B.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),sn=y.withInstall(vt),rn=y.withInstall(en),ln=y.withInstall(tn),an=y.withInstall(nn),cn=y.withInstall(on),dn=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),c=e.useSlots(),i=e.ref();return s({}),()=>e.h(f.AdapterConfigProvider,e.mergeProps({ref:i},r),c)}}),pn=y.withInstall(dn),fn=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("date-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterDatePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),Je=y.withInstall(fn),mn=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("date-time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterDatePicker,e.mergeProps({ref:l,class:r.b(),type:"datetime"},c),i)}}),un=y.withInstall(mn),hn=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=B.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),yn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=B.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),Sn=y.withInstall(hn),gn=y.withInstall(yn,"SyDescriptionsItem"),bn=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=B.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),Cn=y.withInstall(bn),wn=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=B.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),An=y.withInstall(wn),kn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=B.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),Ze=y.withInstall(kn),Nn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=B.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),xn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=B.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),Pn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=B.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),Bn=y.withInstall(Nn),Vn=y.withInstall(xn),_n=y.withInstall(Pn),Rn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=B.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),Xe=y.withInstall(Rn),Tn=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("form"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({validate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validate)==null?void 0:a.call(t,...n)},validateField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validateField)==null?void 0:a.call(t,...n)},resetFields:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.resetFields)==null?void 0:a.call(t,...n)},scrollToField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollToField)==null?void 0:a.call(t,...n)},clearValidate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearValidate)==null?void 0:a.call(t,...n)}}),()=>e.h(f.AdapterForm,e.mergeProps({ref:l,class:r.b()},c),i)}}),In=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("form-item"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({resetField:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterFormItem,e.mergeProps({ref:l,class:r.b()},c),i)}}),ve=y.withInstall(Tn),et=y.withInstall(In),$n=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(f.AdapterIcon,e.mergeProps(o),s)}}),me=y.withInstall($n),Ln=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("image"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterImage,e.mergeProps({ref:l,class:r.b()},c),i)}}),En=y.withInstall(Ln),Mn=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("input"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterInput,e.mergeProps({ref:l,class:r.b()},c),i)}}),Le=y.withInstall(Mn),Fn=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("input-number"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterInputNumber,e.mergeProps({ref:l,class:r.b()},c),i)}}),tt=y.withInstall(Fn),Dn=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=B.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),zn=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=B.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),On=y.withInstall(Dn),Hn=y.withInstall(zn),Un=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=B.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),qn=y.withInstall(Un),pe="sy-loading",Ee="element-loading-custom-class";function jn(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function Kn(o){if(o==null||o==="")return pe;const s=String(e.unref(o));return s.includes(pe)?s:`${pe} ${s}`}function Gn(o){if(o===void 0)return{customClass:pe};const s=E({},o),r=s.customClass;return r===void 0?s.customClass=pe:typeof r=="string"&&(s.customClass=`${pe} ${r}`),s}function nt(o,s){if(!s.value)return s;if(jn(s.value))return Z(E({},s),{value:Z(E({},s.value),{customClass:Kn(s.value.customClass)})});const r=o.getAttribute(Ee);return r?r.includes(pe)||o.setAttribute(Ee,`${pe} ${r}`):o.setAttribute(Ee,pe),s}const se=f.AdapterLoadingDirective,Ne=(o,s)=>f.AdapterLoading.service(Gn(o),s);Object.defineProperty(Ne,"_context",{get(){return f.AdapterLoading.service._context},set(o){f.AdapterLoading.service._context=o}});const xe={mounted(o,s,r,c){var i;(i=se.mounted)==null||i.call(se,o,nt(o,s),r,c)},updated(o,s,r,c){var i;(i=se.updated)==null||i.call(se,o,nt(o,s),r,c)},unmounted(o,s,r,c){var i;(i=se.unmounted)==null||i.call(se,o,s,r,c)},get _context(){return se._context},set _context(o){se._context=o}},Wn={install(o){Ne._context=o._context,xe._context=o._context,o.directive("loading",xe),o.config.globalProperties.$loading=Ne},directive:xe,service:Ne},Yn=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=B.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),Qn=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=B.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),Jn=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=B.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),Zn=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=B.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Xn=y.withInstall(Yn),vn=y.withInstall(Qn),eo=y.withInstall(Jn),to=y.withInstall(Zn),Pe="sy-message";function ge(o){if(o===void 0)return{customClass:Pe};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Pe};const s=o;return Z(E({},s),{customClass:s.customClass?`${Pe} ${s.customClass}`:Pe})}const Me=(o,s)=>f.AdapterMessage(ge(o),s);Me.closeAll=o=>f.AdapterMessage.closeAll(o),Me.closeAllByPlacement=o=>f.AdapterMessage.closeAllByPlacement(o);const ue=Me;ue.success=(o,s)=>f.AdapterMessage.success(ge(o),s),ue.warning=(o,s)=>f.AdapterMessage.warning(ge(o),s),ue.info=(o,s)=>f.AdapterMessage.info(ge(o),s),ue.error=(o,s)=>f.AdapterMessage.error(ge(o),s),Object.defineProperty(ue,"_context",{get(){return f.AdapterMessage._context},set(o){f.AdapterMessage._context=o}});const Fe="sy-message-box";function Be(o){return o?Z(E({},o),{customClass:o.customClass?`${Fe} ${o.customClass}`:Fe}):{customClass:Fe}}const be=(o,s)=>f.AdapterMessageBox(Be(o),s);be.alert=(...o)=>{const[s,r,c,i]=o;return f.AdapterMessageBox.alert(s,r,Be(c),i)},be.confirm=(...o)=>{const[s,r,c,i]=o;return f.AdapterMessageBox.confirm(s,r,Be(c),i)},be.prompt=(...o)=>{const[s,r,c,i]=o;return f.AdapterMessageBox.prompt(s,r,Be(c),i)},be.close=()=>f.AdapterMessageBox.close();const ot=be;Object.defineProperty(ot,"_context",{get(){return f.AdapterMessageBox._context},set(o){f.AdapterMessageBox._context=o}});const Ve="sy-notification";function Ce(o){if(o===void 0)return{customClass:Ve};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Ve};const s=o;return Z(E({},s),{customClass:s.customClass?`${Ve} ${s.customClass}`:Ve})}const he=(o,s)=>f.AdapterNotification(Ce(o),s);he.success=(o,s)=>f.AdapterNotification.success(Ce(o),s),he.warning=(o,s)=>f.AdapterNotification.warning(Ce(o),s),he.info=(o,s)=>f.AdapterNotification.info(Ce(o),s),he.error=(o,s)=>f.AdapterNotification.error(Ce(o),s),he.closeAll=()=>f.AdapterNotification.closeAll();const st=he;Object.defineProperty(st,"_context",{get(){return f.AdapterNotification._context},set(o){f.AdapterNotification._context=o}});const no=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=B.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),rt=y.withInstall(no),oo=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=B.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),so=y.withInstall(oo);function ro(o,s){var n;const r=E({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const lo=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=B.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=ro(s,o.b());return e.h(f.AdapterPopover,e.mergeProps(c,{popperClass:i}),r)}}}),ao=y.withInstall(lo),co=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=B.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),io=y.withInstall(co),po=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=B.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),fo=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=B.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),De=y.withInstall(po),lt=y.withInstall(fo),mo=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=B.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),at=y.withInstall(mo),uo=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("scrollbar"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,n)},setScrollLeft:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,n)},update:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=l.value)==null?void 0:n.wrapRef}}),()=>e.h(f.AdapterScrollbar,e.mergeProps({ref:l,class:r.b()},c),i)}}),ho=y.withInstall(uo),yo=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),So=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=B.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),ct=y.withInstall(yo),it=y.withInstall(So),go=f.AdapterSelectV2,bo=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("select-v2"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(go,e.mergeProps({ref:l,class:r.b()},c),i)}}),Co=y.withInstall(bo),wo=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("skeleton"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get uiLoading(){var n;return(n=l.value)==null?void 0:n.uiLoading}}),()=>e.h(f.AdapterSkeleton,e.mergeProps({ref:l,class:r.b()},c),i)}}),Ao=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=B.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),ko=y.withInstall(wo),No=y.withInstall(Ao),xo=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=B.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),c=e.ref();return()=>e.h(f.AdapterSlider,e.mergeProps({ref:c,class:o.b()},s),r)}}),Po=y.withInstall(xo),Bo=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=B.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),Vo=y.withInstall(Bo),_o=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=B.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),Ro=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=B.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),To=y.withInstall(_o),Io=y.withInstall(Ro),$o=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("switch"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterSwitch,e.mergeProps({ref:l,class:r.b()},c),i)}}),_e=y.withInstall($o),Lo=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("table"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowSelection)==null?void 0:a.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowExpansion)==null?void 0:a.call(t,...n)},setCurrentRow:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentRow)==null?void 0:a.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFilter)==null?void 0:a.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.sort)==null?void 0:a.call(t,...n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,...n)},setScrollLeft:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,...n)}}),()=>e.h(f.AdapterTable,e.mergeProps({ref:l,class:r.b()},c),i)}}),Eo=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=B.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const c=r.default?Z(E({},r),{default:(...i)=>{var l;return((l=r.default(...i))!=null?l:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(f.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(f.AdapterTableColumn,e.mergeProps({class:o.b()},s),c)}}}),ze=y.withInstall(Lo),ae=y.withInstall(Eo),Mo=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("tabs"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get currentName(){var n;return(n=l.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=l.value)==null?void 0:n.tabNavRef}}),()=>e.h(f.AdapterTabs,e.mergeProps({ref:l,class:r.b()},c),i)}}),Fo=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=B.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),Do=y.withInstall(Mo),zo=y.withInstall(Fo),Oo=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("tag"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({ref:()=>l.value}),()=>e.h(f.AdapterTag,e.mergeProps({ref:l,class:r.b()},c),i)}}),Re=y.withInstall(Oo),Ho=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=B.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(f.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Uo=y.withInstall(Ho),qo=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterTimePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),dt=y.withInstall(qo),jo=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("time-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(f.AdapterTimeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),pt=y.withInstall(jo);function Ko(o,s){var n;const r=E({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const Go=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=B.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Ko(s,o.b());return e.h(f.AdapterTooltip,e.mergeProps(c,{popperClass:i}),r)}}}),fe=y.withInstall(Go),Wo=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("tree"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({filter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,...n)},updateKeyChildren:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.updateKeyChildren)==null?void 0:a.call(t,...n)},getCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedNodes)==null?void 0:a.call(t,...n)},getCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedKeys)==null?void 0:a.call(t,...n)},setCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedNodes)==null?void 0:a.call(t,...n)},setCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedKeys)==null?void 0:a.call(t,...n)},setChecked:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setChecked)==null?void 0:a.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:a.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:a.call(t,...n)},getCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentKey)==null?void 0:a.call(t,...n)},getCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentNode)==null?void 0:a.call(t,...n)},setCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentKey)==null?void 0:a.call(t,...n)},setCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentNode)==null?void 0:a.call(t,...n)},getNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getNode)==null?void 0:a.call(t,...n)},remove:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.remove)==null?void 0:a.call(t,...n)},append:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.append)==null?void 0:a.call(t,...n)},insertBefore:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertBefore)==null?void 0:a.call(t,...n)},insertAfter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertAfter)==null?void 0:a.call(t,...n)}}),()=>e.h(f.AdapterTree,e.mergeProps({ref:l,class:r.b()},c),i)}}),Yo=y.withInstall(Wo),Qo=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("tree-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,n)},updateKeyChildren:(n,t)=>{var a,u;return(u=(a=l.value)==null?void 0:a.updateKeyChildren)==null?void 0:u.call(a,n,t)}}),()=>e.h(f.AdapterTreeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),Jo=y.withInstall(Qo),Zo=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=B.useNamespace("upload"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({abort:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.abort)==null?void 0:a.call(t,n)},submit:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFiles)==null?void 0:a.call(t,n)},handleStart:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleStart)==null?void 0:a.call(t,n)},handleRemove:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleRemove)==null?void 0:a.call(t,n)}}),()=>e.h(f.AdapterUpload,e.mergeProps({ref:l,class:r.b()},c),i)}}),Xo=y.withInstall(Zo),vo={input:Le,"input-number":tt,"time-picker":dt,"time-select":pt,autocomplete:f.AdapterAutocomplete,switch:_e,slider:f.AdapterSlider,"color-picker":f.AdapterColorPicker},Oe={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function es(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const He=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),c=e.computed({get:()=>o.modelValue,set:S=>s("update:modelValue",S)}),i=e.computed(()=>{var S,p;return(p=(S=o.schema.fieldNames)==null?void 0:S.label)!=null?p:"label"}),l=e.computed(()=>{var S,p;return(p=(S=o.schema.fieldNames)==null?void 0:S.value)!=null?p:"value"}),n=e.computed(()=>{var S,p;return(p=(S=o.schema.fieldNames)==null?void 0:S.children)!=null?p:"children"}),t=e.computed(()=>{var S;return o.schema.options!=null?o.schema.options:(S=r.value.get(o.schema.field))!=null?S:[]}),a=e.computed(()=>{const{label:S,value:p}={label:i.value,value:l.value};return S==="label"&&p==="value"?t.value:t.value.map(m=>Z(E({},m),{label:m[S],value:m[p]}))}),u=e.computed(()=>{const S=E({},o.schema.props),{label:p,value:m,children:_}={label:i.value,value:l.value,children:n.value};return Z(E({},S),{props:Z(E({},S.props),{label:p,children:_}),nodeKey:m})}),k=e.computed(()=>{const S=E({},o.schema.props),{label:p,value:m,children:_}={label:i.value,value:l.value,children:n.value};return Z(E({},S),{props:Z(E({},S.props),{label:p,value:m,children:_})})}),A=e.computed(()=>E({},o.schema.props)),I=e.computed(()=>{var p,m,_;const S=(m=(p=o.schema.props)==null?void 0:p.type)!=null?m:"";return["daterange","datetimerange","monthrange","yearrange"].includes(S)||!!((_=o.schema.props)!=null&&_.isRange)}),M=e.computed(()=>{var p,m;if(((p=o.schema.props)==null?void 0:p.placeholder)!=null)return o.schema.props.placeholder;const S=(m=o.schema.component)!=null?m:"input";return["input","input-number","autocomplete"].includes(S)?"请输入":"请选择"}),C=e.computed(()=>{var S;return((S=o.schema.props)==null?void 0:S.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),b=e.computed(()=>{var p,m,_;const S=E({},o.schema.props);return I.value?Z(E({},S),{rangeSeparator:(p=S.rangeSeparator)!=null?p:"至",startPlaceholder:(m=S.startPlaceholder)!=null?m:"开始时间",endPlaceholder:(_=S.endPlaceholder)!=null?_:"结束时间",clearable:C.value}):Z(E({},S),{placeholder:M.value,clearable:C.value})});return()=>{var P,x,$,F,w,R,V,K;const{schema:S}=o,p=(P=S.component)!=null?P:"input",m=es(S.events),_={modelValue:c.value,"onUpdate:modelValue":U=>c.value=U};if(S.render)return S.render(o.model);if(p==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((x=c.value)!=null?x:""));if(p==="select")return e.h(ct,Z(E(E(E({},_),A.value),m),{placeholder:M.value,clearable:C.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(U=>e.h(it,{key:U[l.value],label:U[i.value],value:U[l.value]})))});if(p==="select-v2")return e.h(f.AdapterSelectV2,Z(E(E(E({},_),A.value),m),{placeholder:M.value,clearable:C.value,options:a.value,style:"width: 100%"}));if(p==="tree-select"){const U=(F=($=o.schema.props)==null?void 0:$.data)!=null?F:t.value;return e.h(f.AdapterTreeSelect,Z(E(E(E({},_),u.value),m),{placeholder:M.value,clearable:C.value,data:U,style:"width: 100%"}))}if(p==="cascader"){const U=(R=(w=o.schema.props)==null?void 0:w.options)!=null?R:t.value;return e.h(We,Z(E(E(E({},_),k.value),m),{placeholder:M.value,clearable:C.value,options:U,style:"width: 100%"}))}if(p==="radio"||p==="radio-button"){const U=p==="radio"?De:at;return e.h(lt,E(E(E({},_),A.value),m),{default:()=>t.value.map(X=>e.h(U,{key:X[l.value],value:X[l.value]},{default:()=>String(X[i.value])}))})}if(p==="checkbox")return e.h(Qe,E(E(E({},_),A.value),m),{default:()=>t.value.map(U=>e.h(Ye,{key:U[l.value],value:U[l.value]},{default:()=>String(U[i.value])}))});if(p==="date-picker")return e.h(Je,Z(E(E(E({},_),b.value),m),{style:"width: 100%"}));const z=vo[p];if(z){const U=(K=(V=Oe[p])==null?void 0:V.call(Oe,{placeholder:M.value,clearable:C.value}))!=null?K:{};return e.h(z,E(E(E(E({},_),A.value),m),U))}return e.h(Le,Z(E(E(E({},_),A.value),m),{placeholder:M.value,clearable:C.value,style:"width: 100%"}))}}}),ts=2,ns=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{},labelWidth:{},labelPosition:{},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){var ce,ie;const c=e.useSlots(),i=o,l=(ce=e.inject(y.SY_UI_CONFIG_KEY,{}).proForm)!=null?ce:{},n=(ie=y.getMasterConfig(y.detectMicroAppName()).proForm)!=null?ie:{},t=e.computed(()=>{var g,L,T;return(T=(L=(g=n.cols)!=null?g:i.cols)!=null?L:l.cols)!=null?T:4}),a=e.computed(()=>{var g,L,T;return(T=(L=(g=n.labelWidth)!=null?g:i.labelWidth)!=null?L:l.labelWidth)!=null?T:"auto"}),u=e.computed(()=>{var g,L,T;return(T=(L=(g=n.labelPosition)!=null?g:i.labelPosition)!=null?L:l.labelPosition)!=null?T:"right"}),k=e.computed(()=>{var g,L;return(L=(g=n.size)!=null?g:i.size)!=null?L:l.size}),A=r;B.useNamespace("pro-form");const I=e.ref(),M=e.ref(i.defaultCollapsed),C=e.ref("xl");function b(){const g=window.innerWidth;return g<768?"xs":g<992?"sm":g<1200?"md":g<1920?"lg":"xl"}function S(){C.value=b()}e.onMounted(()=>{C.value=b(),window.addEventListener("resize",S)}),e.onUnmounted(()=>{window.removeEventListener("resize",S)});const p=e.computed(()=>i.schema.filter(g=>typeof g.hidden=="function"?!g.hidden(i.model):!g.hidden).sort((g,L)=>{var T,q;return((T=g.order)!=null?T:0)-((q=L.order)!=null?q:0)}));function m(g){var T,q,G;const L=C.value;return(G=(q=(T=g[L])==null?void 0:T.span)!=null?q:g.span)!=null?G:1}function _(g){var T,q,G;const L=C.value;return(G=(q=(T=g[L])==null?void 0:T.offset)!=null?q:g.offset)!=null?G:0}const z=e.computed(()=>{var T,q,G,ne,oe,re;const g=t.value;if(typeof g=="number")return g;const L=C.value;return(re=(oe=(ne=(G=(q=(T=g==null?void 0:g[L])!=null?T:g==null?void 0:g.xl)!=null?q:g==null?void 0:g.lg)!=null?G:g==null?void 0:g.md)!=null?ne:g==null?void 0:g.sm)!=null?oe:g==null?void 0:g.xs)!=null?re:4}),P=e.computed(()=>{const g=i.collapsible;return typeof g=="number"&&g>0?g:1}),x=e.computed(()=>{if(!i.collapsible)return-1;const g=i.buttonAlign==="inline"&&(i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons),L=z.value*P.value-(g?ts:0);if(L<=0)return 0;let T=0;for(let q=0;q<p.value.length;q++){const G=p.value[q];if(T+=m(G)+_(G),T>L)return q}return-1}),$=e.computed(()=>x.value>=0),F=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${z.value}, 1fr)`,gap:"0 16px"}));function w(g){const L=z.value,T=Math.min(m(g),L),q=_(g),G={gridColumn:`span ${T}`};return q>0&&(G.marginLeft=`calc(${q/L*100}% + ${q*16}px)`),G}const R=e.computed(()=>{const g=z.value,L=p.value,T=i.collapsible&&M.value&&x.value>=0?x.value:L.length;let q=0;for(let G=0;G<T;G++){const ne=m(L[G]),oe=_(L[G]),re=q+ne+oe;q=re>=g?re%g:re}return q}),V=e.computed(()=>{const g=R.value;return{gridColumn:`${g===0?1:g+1} / -1`}}),K={left:"flex-start",center:"center",right:"flex-end"},U=e.computed(()=>{var L;const g={justifyContent:(L=K[i.buttonAlign])!=null?L:"flex-start"};if(i.buttonAlign==="left"&&u.value!=="top"){const T=a.value;T&&T!=="auto"&&(g.paddingLeft=typeof T=="number"?`${T}px`:String(T))}return g}),X=e.computed(()=>i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons);function J(g,L){i.model[g]=L}function ee(){var g;(g=I.value)==null||g.validate(L=>{L&&A("search",i.model)})}function te(){var g,L;for(const T of i.schema)J(T.field,(g=T.defaultValue)!=null?g:null);(L=I.value)==null||L.clearValidate(),A("reset",i.model)}return s({formRef:I,validate:g=>{var L;return(L=I.value)==null?void 0:L.validate(g)},validateField:(g,L)=>{var T;return(T=I.value)==null?void 0:T.validateField(g,L)},resetFields:te,clearValidate:g=>{var L;return(L=I.value)==null?void 0:L.clearValidate(g)}}),(g,L)=>(e.openBlock(),e.createBlock(e.unref(ve),{ref_key:"formRef",ref:I,class:"sy-pro-form",model:o.model,"label-width":a.value,"label-position":u.value,disabled:o.disabled,size:k.value,onSubmit:L[2]||(L[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle(F.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(T,q)=>{var G;return e.openBlock(),e.createElementBlock(e.Fragment,{key:T.field},[!o.collapsible||!M.value||x.value<0||q<x.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(w(T))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),T.component==="slot"?e.renderSlot(g.$slots,T.field,{key:0,item:T}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(et),e.mergeProps({prop:T.field,label:(G=T.label)!=null?G:""},{ref_for:!0},T.labelWidth!=null?{labelWidth:T.labelWidth}:{},{rules:T.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(He,{"model-value":o.model[T.field],schema:T,model:o.model,"onUpdate:modelValue":ne=>J(T.field,ne)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[T.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(T.label),1),e.createVNode(e.unref(fe),{content:T.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(me),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(v.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(g.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(X.value||o.collapsible&&$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(V.value)},[e.renderSlot(g.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",loading:o.loading,onClick:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(g.$slots,"extra-buttons")]),o.collapsible&&$.value?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",link:"",onClick:L[0]||(L[0]=T=>M.value=!M.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.value?"展开":"合并")+" ",1),e.createVNode(e.unref(me),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M.value?e.unref(v.ArrowDown):e.unref(v.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(X.value||o.collapsible&&$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle(U.value)},[e.renderSlot(g.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",loading:o.loading,onClick:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(g.$slots,"extra-buttons")]),o.collapsible&&$.value?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",link:"",onClick:L[1]||(L[1]=T=>M.value=!M.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.value?"展开":"合并")+" ",1),e.createVNode(e.unref(me),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M.value?e.unref(v.ArrowDown):e.unref(v.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}});function os(o){const s=new Set,r=e.computed(()=>e.unref(o)),c=e.computed(()=>r.value.map(w=>w.field));function i(){return e.unref(o)}function l(){e.isRef(o)&&(o.value=[...o.value])}function n(){const w=new Set,R=new Set;for(const V of i())V!=null&&V.field&&(w.has(V.field)&&R.add(V.field),w.add(V.field));R.forEach(V=>{s.has(V)||(s.add(V),console.warn(`[useProFormSchema] duplicated field detected: "${V}".`))})}function t(w){return u(w)>-1}function a(w){return i().find(R=>R.field===w)}function u(w){return i().findIndex(R=>R.field===w)}function k(w){return!(!(w!=null&&w.field)||t(w.field))}function A(w,R){const V=a(w);return V?(Object.assign(V,R),l(),n(),!0):!1}function I(w,R){const V=u(w);if(V<0||!(R!=null&&R.field))return!1;const K=a(w);return R.field!==w&&K&&t(R.field)?!1:(i().splice(V,1,R),l(),n(),!0)}function M(w,R){var K;const V=a(w);return V?(V.props=E(E({},(K=V.props)!=null?K:{}),R),l(),!0):!1}function C(w,R){var K;const V=a(w);return V?(V.events=E(E({},(K=V.events)!=null?K:{}),R),l(),!0):!1}function b(w,R){const V=a(w);return V?(V.options=R,l(),!0):!1}function S(w){return A(w,{hidden:!1})}function p(w){return A(w,{hidden:!0})}function m(w,R){const V=a(w);return!V||typeof V.hidden=="function"&&R===void 0?!1:(V.hidden=R!=null?R:!V.hidden,l(),!0)}function _(w){return k(w)?(i().push(w),l(),n(),!0):!1}function z(w){return k(w)?(i().unshift(w),l(),n(),!0):!1}function P(w,R){if(!k(R))return!1;const V=u(w);return V<0?!1:(i().splice(V,0,R),l(),n(),!0)}function x(w,R){if(!k(R))return!1;const V=u(w);return V<0?!1:(i().splice(V+1,0,R),l(),n(),!0)}function $(w){const R=u(w);return R<0?!1:(i().splice(R,1),l(),!0)}function F(w,R){const V=a(w);return V?(R(V),l(),n(),!0):!1}return n(),{schema:r,fields:c,has:t,get:a,getIndex:u,set:A,replace:I,setProps:M,setEvents:C,setOptions:b,show:S,hide:p,toggle:m,append:_,prepend:z,insertBefore:P,insertAfter:x,remove:$,update:F}}const ft=y.withInstall(ns);function ss(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),c=e.computed(()=>s.value.map(n=>n[o]));function i(n){s.value=n}function l(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:c,selectionChange:i,clearSelection:l}}function rs(o){const{request:s,params:r,searchParam:c,postData:i,requestError:l,pagination:n=!0,staticData:t,initialPageSize:a}=o,u=e.ref(!1),k=e.ref([]),A=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),I=e.reactive({}),M=e.reactive({}),C=e.computed(()=>{if(!(t!=null&&t.value))return k.value;if(!n)return t.value;const x=(A.pageNum-1)*A.pageSize;return t.value.slice(x,x+A.pageSize)});function b(x,$){for(const[F,w]of Object.entries(x))(w!=null&&w!==""||w===!1||w===0)&&($[F]=w)}function S(){const x={};return b(M,x),c!=null&&c.value&&b(c.value,x),x}function p(){return Ie(this,null,function*(){var x,$,F;if(t!=null&&t.value){A.total=t.value.length;return}if(s)try{u.value=!0;const w=S(),R=E(E(E({},I),w),(x=r==null?void 0:r.value)!=null?x:{});n&&(R.pageNum=A.pageNum,R.pageSize=A.pageSize);const V=yield s(R);if(!V.success){l==null||l(V);return}let K=($=V.data)!=null?$:[];i&&(K=i(K)),k.value=K,n&&(A.total=(F=V.total)!=null?F:0)}catch(w){l==null||l(w)}finally{u.value=!1}})}function m(){A.pageNum=1,p()}function _(){var x;A.pageNum=1;for(const $ of Object.keys(M))M[$]=(x=I[$])!=null?x:null;p()}function z(x){A.pageSize=x,A.pageNum=1,p()}function P(x){A.pageNum=x,p()}return r&&e.watch(r,()=>p(),{deep:!0}),{loading:u,tableData:k,pageable:A,processTableData:C,searchParam:M,searchInitParam:I,getTableList:p,search:m,reset:_,handleSizeChange:z,handleCurrentChange:P}}function mt(o){var r;const s=[];for(const c of o)(r=c.children)!=null&&r.length?s.push(c,...mt(c.children)):s.push(c);return s}const ut={border:!1,stripe:!1,rowKey:"id",type:"custom",searchCols:4,panelCols:1,filterChipWidth:140,filterChipMax:3,pageSizes:[10,20,50,100],pageLayout:"total, sizes, prev, pager, next, jumper",autoHeight:!1};function ls(o,s,r,c={}){var re,Te,we,D;const l=(re=e.inject(y.SY_UI_CONFIG_KEY,{}).proTable)!=null?re:{},n=(Te=y.getMasterConfig(y.detectMicroAppName()).proTable)!=null?Te:{},t=new Proxy(o,{get(d,N,O){const H=n[N];if(H!==void 0)return H;const W=Reflect.get(d,N,O);if(W!==void 0)return W;const Y=N;if(Y in l&&l[Y]!==void 0)return l[Y];const j=N;if(j in ut)return ut[j]}}),a=t,u=e.ref(),k=e.ref(),A=e.ref(),I=e.ref(a.type!=="unify"&&a.type!=="custom"),M=e.ref(null),C=e.computed(()=>e.reactive(mt(o.columns))),b=e.ref(new Map);function S(d){return Ie(this,null,function*(){var O;if(!d.enum||!d.prop)return;const N=d.enum;if(typeof N=="function"){b.value.set(d.prop,[]);try{const H=yield N();b.value.set(d.prop,H)}catch(H){}}else b.value.set(d.prop,Array.isArray(N)?N:(O=N.value)!=null?O:[])})}e.provide("proTableEnumMap",b),e.provide("proTableSlots",r);const p=e.computed(()=>C.value.filter(d=>{var N,O;return((N=d.search)==null?void 0:N.component)||((O=d.search)==null?void 0:O.render)}).sort((d,N)=>{var O,H,W,Y;return((H=(O=d.search)==null?void 0:O.order)!=null?H:0)-((Y=(W=N.search)==null?void 0:W.order)!=null?Y:0)})),m=e.computed(()=>p.value.filter(d=>{var N;return!!((N=d.search)!=null&&N.quick)}).sort((d,N)=>{var W,Y,j,le,Ae,ke;const O=typeof((W=d.search)==null?void 0:W.quick)=="object"&&(j=(Y=d.search)==null?void 0:Y.quick.order)!=null?j:0,H=typeof((le=N.search)==null?void 0:le.quick)=="object"&&(ke=(Ae=N.search)==null?void 0:Ae.quick.order)!=null?ke:0;return O-H})),_=e.computed(()=>p.value.map(d=>{var N,O,H,W,Y,j,le,Ae,ke,St,gt,bt,Ct,wt,At,kt,Nt;return{field:(H=(O=(N=d.search)==null?void 0:N.key)!=null?O:d.prop)!=null?H:"",label:d.label,component:(W=d.search)==null?void 0:W.component,props:(Y=d.search)==null?void 0:Y.props,options:(()=>{var xt,Pt,Bt,Vt,_t,Rt,Tt;if(((xt=d.search)==null?void 0:xt.options)!==void 0){const Ge=d.search.options;return Array.isArray(Ge)?Ge:(Pt=e.unref(Ge))!=null?Pt:void 0}if(!(!d.enum||(Vt=(Bt=d.search)==null?void 0:Bt.component)!=null&&Vt.includes("tree")))return typeof d.enum=="function"?(Rt=b.value.get((_t=d.prop)!=null?_t:""))!=null?Rt:void 0:Array.isArray(d.enum)?d.enum:(Tt=e.unref(d.enum))!=null?Tt:void 0})(),fieldNames:d.fieldNames,defaultValue:(j=d.search)==null?void 0:j.defaultValue,hidden:(le=d.search)==null?void 0:le.hidden,span:(Ae=d.search)==null?void 0:Ae.span,offset:(ke=d.search)==null?void 0:ke.offset,order:(St=d.search)==null?void 0:St.order,render:(gt=d.search)==null?void 0:gt.render,xs:(bt=d.search)==null?void 0:bt.xs,sm:(Ct=d.search)==null?void 0:Ct.sm,md:(wt=d.search)==null?void 0:wt.md,lg:(At=d.search)==null?void 0:At.lg,xl:(kt=d.search)==null?void 0:kt.xl,labelWidth:(Nt=d.search)==null?void 0:Nt.labelWidth}})),z=e.ref({}),P={};function x(){var d,N,O,H,W;for(const Y of Object.keys(z.value))delete z.value[Y];for(const Y of Object.keys(P))delete P[Y];for(const Y of p.value){const j=(O=(N=(d=Y.search)==null?void 0:d.key)!=null?N:Y.prop)!=null?O:"",le=(W=(H=Y.search)==null?void 0:H.defaultValue)!=null?W:null;z.value[j]=le,P[j]=le}}const{loading:$,processTableData:F,pageable:w,getTableList:R,handleSizeChange:V,handleCurrentChange:K}=rs({request:o.request,params:e.toRef(o,"params"),searchParam:z,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:(D=(we=a.pageSize)!=null?we:l.pageSize)!=null?D:10});function U(){Object.assign(w,{pageNum:1}),R(),s("search")}function X(){x(),Object.assign(w,{pageNum:1}),R(),s("reset")}const{selectedList:J,isSelected:ee,selectedListIds:te,selectionChange:ce,clearSelection:ie}=ss(a.rowKey);function g(){var d,N;ie(),(N=(d=u.value)==null?void 0:d.clearSelection)==null||N.call(d)}function L(d){var N;M.value=d[(N=a.rowKey)!=null?N:"id"]}function T(){var d,N;M.value=null,(N=(d=u.value)==null?void 0:d.setCurrentRow)==null||N.call(d,void 0)}function q(d){R()}function G(d){return a.toolButton===!0?!0:a.toolButton===!1?!1:a.toolButton.includes(d)}function ne(){I.value=!I.value}function oe(){var d,N;(N=(d=A.value)==null?void 0:d.open)==null||N.call(d)}return e.onMounted(()=>Ie(this,null,function*(){for(const d of C.value)S(d);x(),o.manualRequest||R()})),{props:t,tableAttrs:c,tableRef:u,formRef:k,colSettingRef:A,flatColumns:C,enumMap:b,searchColumns:p,quickSearchColumns:m,searchSchema:_,searchParam:z,searchInitParam:P,loading:$,tableData:F,pageable:w,selectedList:J,selectedListIds:te,isSelected:ee,radio:M,isShowSearch:I,getTableList:R,search:U,reset:X,clearSelection:g,clearRadio:T,handleSizeChange:V,handleCurrentChange:K,onSortChange:q,onRadioChange:L,selectionChange:ce,showToolBtn:G,toggleSearch:ne,openColSetting:oe}}const as={key:1,style:{color:"var(--el-text-color-placeholder)"}},cs=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,c=e.ref(!1),i=e.computed(()=>r.columns.filter(a=>{if(a.type&&["selection","index","expand","radio","sort"].includes(a.type))return!1;const u=a.isSetting;return u===void 0||u===!0}));e.computed(()=>i.value.every(a=>a.isShow!==!1)),e.computed(()=>{const a=i.value.length,u=i.value.filter(k=>k.isShow!==!1).length;return u>0&&u<a});const l=new WeakMap;function n(){i.value.forEach(a=>{l.has(a)||l.set(a,{isShow:a.isShow!==!1,sortable:a.sortable})})}function t(){n(),c.value=!0}return s({open:t}),(a,u)=>(e.openBlock(),e.createBlock(e.unref(Ze),{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=k=>c.value=k),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
4
+ */const Se=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("autocomplete"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.highlight)==null?void 0:l.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.handleSelect)==null?void 0:l.call(t,n)}}),()=>e.h(u.AdapterAutocomplete,e.mergeProps({ref:a,class:r.b()},c),i)}}),fe=b.withInstall(Se),ge=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=w.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),tn=b.withInstall(ge),nn=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=w.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),on=b.withInstall(nn),sn=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("button"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterButton,e.mergeProps({ref:a,class:r.b()},c),i)}}),Q=b.withInstall(sn),rn=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=w.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),an=b.withInstall(rn),ln=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=w.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),it=b.withInstall(ln),cn=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=w.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),dn=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=w.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),dt=b.withInstall(cn),ft=b.withInstall(dn),fn=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=w.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),mn=b.withInstall(fn),pn=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("color-picker"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({show:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterColorPicker,e.mergeProps({ref:a,class:r.b()},c),i)}}),un=b.withInstall(pn),hn=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=w.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),yn=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=w.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),Sn=b.withInstall(hn),gn=b.withInstall(yn),bn=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Cn(o){return o.some(s=>{var c;const r=(c=s.type)==null?void 0:c.name;return!!r&&bn.has(r)})}const wn=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=w.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const c={class:o.b()};if(!("direction"in s)&&r.default){const i=r.default();Cn(i)&&(c.direction="vertical")}return e.h(u.AdapterContainer,e.mergeProps(c,s),r)}}}),An=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=w.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),kn=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=w.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),Nn=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=w.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),xn=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=w.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),Pn=b.withInstall(wn),Bn=b.withInstall(An),Vn=b.withInstall(kn),_n=b.withInstall(Nn),Tn=b.withInstall(xn),In=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),c=e.useSlots(),i=e.ref();return s({}),()=>e.h(u.AdapterConfigProvider,e.mergeProps({ref:i},r),c)}}),Rn=b.withInstall(In),En=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("date-picker"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterDatePicker,e.mergeProps({ref:a,class:r.b()},c),i)}}),mt=b.withInstall(En),$n=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("date-time-picker"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterDatePicker,e.mergeProps({ref:a,class:r.b(),type:"datetime"},c),i)}}),Mn=b.withInstall($n),Ln=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=w.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),Fn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=w.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),Dn=b.withInstall(Ln),zn=b.withInstall(Fn,"SyDescriptionsItem"),On=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=w.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),Un=b.withInstall(On),Hn=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=w.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),qn=b.withInstall(Hn),jn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=w.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),pt=b.withInstall(jn),Kn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=w.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),Gn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=w.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),Yn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=w.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),Wn=b.withInstall(Kn),Qn=b.withInstall(Gn),Jn=b.withInstall(Yn),Zn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=w.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),ut=b.withInstall(Zn),Ve="sy-message";function be(o){if(o===void 0)return{customClass:Ve};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Ve};const s=o;return J(T({},s),{customClass:s.customClass?`${Ve} ${s.customClass}`:Ve})}const He=(o,s)=>u.AdapterMessage(be(o),s);He.closeAll=o=>u.AdapterMessage.closeAll(o),He.closeAllByPlacement=o=>u.AdapterMessage.closeAllByPlacement(o);const se=He;se.success=(o,s)=>u.AdapterMessage.success(be(o),s),se.warning=(o,s)=>u.AdapterMessage.warning(be(o),s),se.info=(o,s)=>u.AdapterMessage.info(be(o),s),se.error=(o,s)=>u.AdapterMessage.error(be(o),s),Object.defineProperty(se,"_context",{get(){return u.AdapterMessage._context},set(o){u.AdapterMessage._context=o}});const qe="sy-message-box";function _e(o){return o?J(T({},o),{customClass:o.customClass?`${qe} ${o.customClass}`:qe}):{customClass:qe}}const Ce=(o,s)=>u.AdapterMessageBox(_e(o),s);Ce.alert=(...o)=>{const[s,r,c,i]=o;return u.AdapterMessageBox.alert(s,r,_e(c),i)},Ce.confirm=(...o)=>{const[s,r,c,i]=o;return u.AdapterMessageBox.confirm(s,r,_e(c),i)},Ce.prompt=(...o)=>{const[s,r,c,i]=o;return u.AdapterMessageBox.prompt(s,r,_e(c),i)},Ce.close=()=>u.AdapterMessageBox.close();const Te=Ce;Object.defineProperty(Te,"_context",{get(){return u.AdapterMessageBox._context},set(o){u.AdapterMessageBox._context=o}});const Ie="sy-notification";function we(o){if(o===void 0)return{customClass:Ie};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Ie};const s=o;return J(T({},s),{customClass:s.customClass?`${Ie} ${s.customClass}`:Ie})}const he=(o,s)=>u.AdapterNotification(we(o),s);he.success=(o,s)=>u.AdapterNotification.success(we(o),s),he.warning=(o,s)=>u.AdapterNotification.warning(we(o),s),he.info=(o,s)=>u.AdapterNotification.info(we(o),s),he.error=(o,s)=>u.AdapterNotification.error(we(o),s),he.closeAll=()=>u.AdapterNotification.closeAll();const ue=he;Object.defineProperty(ue,"_context",{get(){return u.AdapterNotification._context},set(o){u.AdapterNotification._context=o}});const Xn=2e3,vn=4500,je="提示",Ke={success:"成功",warning:"警告",info:"提示",error:"错误"};function Ae(o,s){var c;const r=typeof o=="string"?{message:o}:T({},o);return T(J(T({},r),{duration:(c=r.duration)!=null?c:Xn}),s?{type:s}:{})}function eo(o){var s;return o&&(s=Ke[o])!=null?s:Ke.info}function ke(o,s){var c,i;const r=typeof o=="string"?{message:o}:T({},o);return T(J(T({},r),{title:(c=r.title)!=null?c:eo(s!=null?s:r.type),duration:(i=r.duration)!=null?i:vn}),s?{type:s}:{})}function ht(o){return se(Ae(o))}function Ge(o){return se.success(Ae(o,"success"))}function Re(o){return se.error(Ae(o,"error"))}function Ee(o){return se.warning(Ae(o,"warning"))}function Ye(o){return se.info(Ae(o,"info"))}function We(o){return Re(o)}function yt(o){return ue(ke(o))}function St(o){return ue.success(ke(o,"success"))}function gt(o){return ue.error(ke(o,"error"))}function Qe(o){return ue.warning(ke(o,"warning"))}function bt(o){return ue.info(ke(o,"info"))}function Je(o,s=je,r){return Te.alert(o,s,T({autofocus:!1},r))}function Ze(c,i){return Be(this,arguments,function*(o,s,r=je){const p=typeof s=="function"?{callback:s,title:r}:s!=null?s:{},{callback:n,title:t=je}=p,l=en(p,["callback","title"]);try{return yield Te.confirm(o,t,T({autofocus:!1,confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"},l)),yield n==null?void 0:n(!0),!0}catch(N){return yield n==null?void 0:n(!1),!1}})}const to=Ge,no=Re,oo=Ee,so=Ye,ro=Je,ao=Ze,lo=We,co={message:ht,success:Ge,error:Re,warn:Ee,warning:Ee,info:Ye,alert:Je,confirm:Ze,notify:yt,notifySuccess:St,notifyError:gt,notifyWarn:Qe,notifyWarning:Qe,notifyInfo:bt,errorInfo:We},io=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("form"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({validate:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.validate)==null?void 0:l.call(t,...n)},validateField:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.validateField)==null?void 0:l.call(t,...n)},resetFields:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.resetFields)==null?void 0:l.call(t,...n)},scrollToField:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.scrollToField)==null?void 0:l.call(t,...n)},clearValidate:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.clearValidate)==null?void 0:l.call(t,...n)}}),()=>e.h(u.AdapterForm,e.mergeProps({ref:a,class:r.b()},c),i)}}),fo=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("form-item"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({resetField:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterFormItem,e.mergeProps({ref:a,class:r.b()},c),i)}}),Ct=b.withInstall(io),wt=b.withInstall(fo),mo=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(u.AdapterIcon,e.mergeProps(o),s)}}),ye=b.withInstall(mo),po=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("image"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterImage,e.mergeProps({ref:a,class:r.b()},c),i)}}),uo=b.withInstall(po),ho=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("input"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterInput,e.mergeProps({ref:a,class:r.b()},c),i)}}),Xe=b.withInstall(ho),yo=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("input-number"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterInputNumber,e.mergeProps({ref:a,class:r.b()},c),i)}}),At=b.withInstall(yo),So=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=w.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),go=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=w.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),bo=b.withInstall(So),Co=b.withInstall(go),wo=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=w.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),Ao=b.withInstall(wo),me="sy-loading",ve="element-loading-custom-class";function ko(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function No(o){if(o==null||o==="")return me;const s=String(e.unref(o));return s.includes(me)?s:`${me} ${s}`}function xo(o){if(o===void 0)return{customClass:me};const s=T({},o),r=s.customClass;return r===void 0?s.customClass=me:typeof r=="string"&&(s.customClass=`${me} ${r}`),s}function kt(o,s){if(!s.value)return s;if(ko(s.value))return J(T({},s),{value:J(T({},s.value),{customClass:No(s.value.customClass)})});const r=o.getAttribute(ve);return r?r.includes(me)||o.setAttribute(ve,`${me} ${r}`):o.setAttribute(ve,me),s}const re=u.AdapterLoadingDirective,$e=(o,s)=>u.AdapterLoading.service(xo(o),s);Object.defineProperty($e,"_context",{get(){return u.AdapterLoading.service._context},set(o){u.AdapterLoading.service._context=o}});const Me={mounted(o,s,r,c){var i;(i=re.mounted)==null||i.call(re,o,kt(o,s),r,c)},updated(o,s,r,c){var i;(i=re.updated)==null||i.call(re,o,kt(o,s),r,c)},unmounted(o,s,r,c){var i;(i=re.unmounted)==null||i.call(re,o,s,r,c)},get _context(){return re._context},set _context(o){re._context=o}},Po={install(o){$e._context=o._context,Me._context=o._context,o.directive("loading")||o.directive("loading",Me),o.config.globalProperties.$loading=$e},directive:Me,service:$e},Bo=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=w.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),Vo=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=w.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),_o=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=w.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),To=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=w.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Io=b.withInstall(Bo),Ro=b.withInstall(Vo),Eo=b.withInstall(_o),$o=b.withInstall(To),Mo=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=w.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),Nt=b.withInstall(Mo),Lo=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=w.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),Fo=b.withInstall(Lo);function Do(o,s){var n;const r=T({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const a=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:a.length?a:[s]}}const zo=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=w.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Do(s,o.b());return e.h(u.AdapterPopover,e.mergeProps(c,{popperClass:i}),r)}}}),Oo=b.withInstall(zo),Uo=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=w.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),Ho=b.withInstall(Uo),qo=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=w.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),jo=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=w.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),et=b.withInstall(qo),xt=b.withInstall(jo),Ko=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=w.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),Pt=b.withInstall(Ko),Go=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("scrollbar"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.scrollTo)==null?void 0:l.call(t,...n)},setScrollTop:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.setScrollTop)==null?void 0:l.call(t,n)},setScrollLeft:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.setScrollLeft)==null?void 0:l.call(t,n)},update:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=a.value)==null?void 0:n.wrapRef}}),()=>e.h(u.AdapterScrollbar,e.mergeProps({ref:a,class:r.b()},c),i)}}),Yo=b.withInstall(Go),Wo=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("select"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterSelect,e.mergeProps({ref:a,class:r.b()},c),i)}}),Qo=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=w.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),Bt=b.withInstall(Wo),Vt=b.withInstall(Qo),Jo=u.AdapterSelectV2,Zo=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("select-v2"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.scrollTo)==null?void 0:l.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(Jo,e.mergeProps({ref:a,class:r.b()},c),i)}}),Xo=b.withInstall(Zo),vo=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("skeleton"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({get uiLoading(){var n;return(n=a.value)==null?void 0:n.uiLoading}}),()=>e.h(u.AdapterSkeleton,e.mergeProps({ref:a,class:r.b()},c),i)}}),es=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=w.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),ts=b.withInstall(vo),ns=b.withInstall(es),os=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=w.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),c=e.ref();return()=>e.h(u.AdapterSlider,e.mergeProps({ref:c,class:o.b()},s),r)}}),ss=b.withInstall(os),rs=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=w.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),as=b.withInstall(rs),ls=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=w.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),cs=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=w.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),is=b.withInstall(ls),ds=b.withInstall(cs),fs=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("switch"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterSwitch,e.mergeProps({ref:a,class:r.b()},c),i)}}),Le=b.withInstall(fs),ms=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("table"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.toggleRowSelection)==null?void 0:l.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.toggleRowExpansion)==null?void 0:l.call(t,...n)},setCurrentRow:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setCurrentRow)==null?void 0:l.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.clearFilter)==null?void 0:l.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.sort)==null?void 0:l.call(t,...n)},scrollTo:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.scrollTo)==null?void 0:l.call(t,...n)},setScrollTop:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setScrollTop)==null?void 0:l.call(t,...n)},setScrollLeft:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setScrollLeft)==null?void 0:l.call(t,...n)}}),()=>e.h(u.AdapterTable,e.mergeProps({ref:a,class:r.b()},c),i)}}),ps=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=w.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const c=r.default?J(T({},r),{default:(...i)=>{var a;return((a=r.default(...i))!=null?a:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(u.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(u.AdapterTableColumn,e.mergeProps({class:o.b()},s),c)}}}),tt=b.withInstall(ms),ce=b.withInstall(ps),us=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("tabs"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({get currentName(){var n;return(n=a.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=a.value)==null?void 0:n.tabNavRef}}),()=>e.h(u.AdapterTabs,e.mergeProps({ref:a,class:r.b()},c),i)}}),hs=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=w.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),ys=b.withInstall(us),Ss=b.withInstall(hs),gs=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("tag"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({ref:()=>a.value}),()=>e.h(u.AdapterTag,e.mergeProps({ref:a,class:r.b()},c),i)}}),Fe=b.withInstall(gs),bs=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=w.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(u.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Cs=b.withInstall(bs),ws=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("time-picker"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterTimePicker,e.mergeProps({ref:a,class:r.b()},c),i)}}),_t=b.withInstall(ws),As=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("time-select"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(u.AdapterTimeSelect,e.mergeProps({ref:a,class:r.b()},c),i)}}),Tt=b.withInstall(As);function ks(o,s){var n;const r=T({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const a=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:a.length?a:[s]}}const Ns=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=w.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=ks(s,o.b());return e.h(u.AdapterTooltip,e.mergeProps(c,{popperClass:i}),r)}}}),pe=b.withInstall(Ns),xs=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("tree"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({filter:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.filter)==null?void 0:l.call(t,...n)},updateKeyChildren:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.updateKeyChildren)==null?void 0:l.call(t,...n)},getCheckedNodes:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getCheckedNodes)==null?void 0:l.call(t,...n)},getCheckedKeys:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getCheckedKeys)==null?void 0:l.call(t,...n)},setCheckedNodes:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setCheckedNodes)==null?void 0:l.call(t,...n)},setCheckedKeys:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setCheckedKeys)==null?void 0:l.call(t,...n)},setChecked:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setChecked)==null?void 0:l.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:l.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:l.call(t,...n)},getCurrentKey:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getCurrentKey)==null?void 0:l.call(t,...n)},getCurrentNode:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getCurrentNode)==null?void 0:l.call(t,...n)},setCurrentKey:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setCurrentKey)==null?void 0:l.call(t,...n)},setCurrentNode:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.setCurrentNode)==null?void 0:l.call(t,...n)},getNode:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.getNode)==null?void 0:l.call(t,...n)},remove:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.remove)==null?void 0:l.call(t,...n)},append:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.append)==null?void 0:l.call(t,...n)},insertBefore:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.insertBefore)==null?void 0:l.call(t,...n)},insertAfter:(...n)=>{var t,l;return(l=(t=a.value)==null?void 0:t.insertAfter)==null?void 0:l.call(t,...n)}}),()=>e.h(u.AdapterTree,e.mergeProps({ref:a,class:r.b()},c),i)}}),Ps=b.withInstall(xs),Bs=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("tree-select"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({focus:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.filter)==null?void 0:l.call(t,n)},updateKeyChildren:(n,t)=>{var l,p;return(p=(l=a.value)==null?void 0:l.updateKeyChildren)==null?void 0:p.call(l,n,t)}}),()=>e.h(u.AdapterTreeSelect,e.mergeProps({ref:a,class:r.b()},c),i)}}),Vs=b.withInstall(Bs),_s=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=w.useNamespace("upload"),c=e.useAttrs(),i=e.useSlots(),a=e.ref();return s({abort:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.abort)==null?void 0:l.call(t,n)},submit:()=>{var n,t;return(t=(n=a.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.clearFiles)==null?void 0:l.call(t,n)},handleStart:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.handleStart)==null?void 0:l.call(t,n)},handleRemove:n=>{var t,l;return(l=(t=a.value)==null?void 0:t.handleRemove)==null?void 0:l.call(t,n)}}),()=>e.h(u.AdapterUpload,e.mergeProps({ref:a,class:r.b()},c),i)}}),Ts=b.withInstall(_s),De=Symbol("SY_SVG_ICON_REGISTRY_KEY");function Is(o){e.provide(De,o)}function Rs(o,s){o.provide(De,s)}const Es=e.defineComponent({name:"SySvgIcon",inheritAttrs:!1,props:{name:{type:String,required:!0},size:{type:[Number,String],default:"1em"},color:{type:String,default:""},fallbackName:{type:String,default:""},registry:{type:Object,default:void 0},silent:{type:Boolean,default:!1}},setup(o){const s=w.useNamespace("svg-icon"),r=e.useAttrs(),c=e.inject(De,void 0),i=e.computed(()=>{var t,l;return(l=(t=o.registry)!=null?t:c)!=null?l:{}}),a=e.computed(()=>{const t=typeof o.size=="number"?`${o.size}px`:o.size;return T({width:t,height:t},o.color?{color:o.color}:{})}),n=e.computed(()=>{const t=i.value,l=t[o.name];if(l)return l;if(o.fallbackName){const p=t[o.fallbackName];if(p)return p}return null});return()=>{const t=e.mergeProps({class:[s.b(),s.is("missing",!n.value)],style:a.value,"aria-hidden":r["aria-label"]?void 0:"true"},r);return n.value?e.h(n.value,t):e.h("svg",t)}}}),$s=b.withInstall(Es),Ms={input:Xe,"input-number":At,"time-picker":_t,"time-select":Tt,autocomplete:u.AdapterAutocomplete,switch:Le,slider:u.AdapterSlider,"color-picker":u.AdapterColorPicker},nt={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function Ls(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const ot=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),c=e.computed({get:()=>o.modelValue,set:y=>s("update:modelValue",y)}),i=e.computed(()=>{var y,m;return(m=(y=o.schema.fieldNames)==null?void 0:y.label)!=null?m:"label"}),a=e.computed(()=>{var y,m;return(m=(y=o.schema.fieldNames)==null?void 0:y.value)!=null?m:"value"}),n=e.computed(()=>{var y,m;return(m=(y=o.schema.fieldNames)==null?void 0:y.children)!=null?m:"children"}),t=e.computed(()=>{var y;return o.schema.options!=null?o.schema.options:(y=r.value.get(o.schema.field))!=null?y:[]}),l=e.computed(()=>{const{label:y,value:m}={label:i.value,value:a.value};return y==="label"&&m==="value"?t.value:t.value.map(h=>J(T({},h),{label:h[y],value:h[m]}))}),p=e.computed(()=>{const y=T({},o.schema.props),{label:m,value:h,children:_}={label:i.value,value:a.value,children:n.value};return J(T({},y),{props:J(T({},y.props),{label:m,children:_}),nodeKey:h})}),N=e.computed(()=>{const y=T({},o.schema.props),{label:m,value:h,children:_}={label:i.value,value:a.value,children:n.value};return J(T({},y),{props:J(T({},y.props),{label:m,value:h,children:_})})}),k=e.computed(()=>T({},o.schema.props)),E=e.computed(()=>{var m,h,_;const y=(h=(m=o.schema.props)==null?void 0:m.type)!=null?h:"";return["daterange","datetimerange","monthrange","yearrange"].includes(y)||!!((_=o.schema.props)!=null&&_.isRange)}),L=e.computed(()=>{var m,h;if(((m=o.schema.props)==null?void 0:m.placeholder)!=null)return o.schema.props.placeholder;const y=(h=o.schema.component)!=null?h:"input";return["input","input-number","autocomplete"].includes(y)?"请输入":"请选择"}),C=e.computed(()=>{var y;return((y=o.schema.props)==null?void 0:y.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),g=e.computed(()=>{var m,h,_;const y=T({},o.schema.props);return E.value?J(T({},y),{rangeSeparator:(m=y.rangeSeparator)!=null?m:"至",startPlaceholder:(h=y.startPlaceholder)!=null?h:"开始时间",endPlaceholder:(_=y.endPlaceholder)!=null?_:"结束时间",clearable:C.value}):J(T({},y),{placeholder:L.value,clearable:C.value})});return()=>{var B,P,$,F,A,I,V,K;const{schema:y}=o,m=(B=y.component)!=null?B:"input",h=Ls(y.events),_={modelValue:c.value,"onUpdate:modelValue":H=>c.value=H};if(y.render)return y.render(o.model);if(m==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((P=c.value)!=null?P:""));if(m==="select")return e.h(Bt,J(T(T(T({},_),k.value),h),{placeholder:L.value,clearable:C.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(H=>e.h(Vt,{key:H[a.value],label:H[i.value],value:H[a.value]})))});if(m==="select-v2")return e.h(u.AdapterSelectV2,J(T(T(T({},_),k.value),h),{placeholder:L.value,clearable:C.value,options:l.value,style:"width: 100%"}));if(m==="tree-select"){const H=(F=($=o.schema.props)==null?void 0:$.data)!=null?F:t.value;return e.h(u.AdapterTreeSelect,J(T(T(T({},_),p.value),h),{placeholder:L.value,clearable:C.value,data:H,style:"width: 100%"}))}if(m==="cascader"){const H=(I=(A=o.schema.props)==null?void 0:A.options)!=null?I:t.value;return e.h(it,J(T(T(T({},_),N.value),h),{placeholder:L.value,clearable:C.value,options:H,style:"width: 100%"}))}if(m==="radio"||m==="radio-button"){const H=m==="radio"?et:Pt;return e.h(xt,T(T(T({},_),k.value),h),{default:()=>t.value.map(X=>e.h(H,{key:X[a.value],value:X[a.value]},{default:()=>String(X[i.value])}))})}if(m==="checkbox")return e.h(ft,T(T(T({},_),k.value),h),{default:()=>t.value.map(H=>e.h(dt,{key:H[a.value],value:H[a.value]},{default:()=>String(H[i.value])}))});if(m==="date-picker")return e.h(mt,J(T(T(T({},_),g.value),h),{style:"width: 100%"}));const z=Ms[m];if(z){const H=(K=(V=nt[m])==null?void 0:V.call(nt,{placeholder:L.value,clearable:C.value}))!=null?K:{};return e.h(z,T(T(T(T({},_),k.value),h),H))}return e.h(Xe,J(T(T(T({},_),k.value),h),{placeholder:L.value,clearable:C.value,style:"width: 100%"}))}}}),Fs=2,Ds=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{},labelWidth:{},labelPosition:{},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){var ie,de;const c=e.useSlots(),i=o,a=(ie=e.inject(b.SY_UI_CONFIG_KEY,{}).proForm)!=null?ie:{},n=(de=b.getMasterConfig(b.detectMicroAppName()).proForm)!=null?de:{},t=e.computed(()=>{var S,M,R;return(R=(M=(S=n.cols)!=null?S:i.cols)!=null?M:a.cols)!=null?R:4}),l=e.computed(()=>{var S,M,R;return(R=(M=(S=n.labelWidth)!=null?S:i.labelWidth)!=null?M:a.labelWidth)!=null?R:"auto"}),p=e.computed(()=>{var S,M,R;return(R=(M=(S=n.labelPosition)!=null?S:i.labelPosition)!=null?M:a.labelPosition)!=null?R:"right"}),N=e.computed(()=>{var S,M;return(M=(S=n.size)!=null?S:i.size)!=null?M:a.size}),k=r;w.useNamespace("pro-form");const E=e.ref(),L=e.ref(i.defaultCollapsed),C=e.ref("xl");function g(){const S=window.innerWidth;return S<768?"xs":S<992?"sm":S<1200?"md":S<1920?"lg":"xl"}function y(){C.value=g()}e.onMounted(()=>{C.value=g(),window.addEventListener("resize",y)}),e.onUnmounted(()=>{window.removeEventListener("resize",y)});const m=e.computed(()=>i.schema.filter(S=>typeof S.hidden=="function"?!S.hidden(i.model):!S.hidden).sort((S,M)=>{var R,q;return((R=S.order)!=null?R:0)-((q=M.order)!=null?q:0)}));function h(S){var R,q,G;const M=C.value;return(G=(q=(R=S[M])==null?void 0:R.span)!=null?q:S.span)!=null?G:1}function _(S){var R,q,G;const M=C.value;return(G=(q=(R=S[M])==null?void 0:R.offset)!=null?q:S.offset)!=null?G:0}const z=e.computed(()=>{var R,q,G,ne,oe,ae;const S=t.value;if(typeof S=="number")return S;const M=C.value;return(ae=(oe=(ne=(G=(q=(R=S==null?void 0:S[M])!=null?R:S==null?void 0:S.xl)!=null?q:S==null?void 0:S.lg)!=null?G:S==null?void 0:S.md)!=null?ne:S==null?void 0:S.sm)!=null?oe:S==null?void 0:S.xs)!=null?ae:4}),B=e.computed(()=>{const S=i.collapsible;return typeof S=="number"&&S>0?S:1}),P=e.computed(()=>{if(!i.collapsible)return-1;const S=i.buttonAlign==="inline"&&(i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons),M=z.value*B.value-(S?Fs:0);if(M<=0)return 0;let R=0;for(let q=0;q<m.value.length;q++){const G=m.value[q];if(R+=h(G)+_(G),R>M)return q}return-1}),$=e.computed(()=>P.value>=0),F=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${z.value}, 1fr)`,gap:"0 16px"}));function A(S){const M=z.value,R=Math.min(h(S),M),q=_(S),G={gridColumn:`span ${R}`};return q>0&&(G.marginLeft=`calc(${q/M*100}% + ${q*16}px)`),G}const I=e.computed(()=>{const S=z.value,M=m.value,R=i.collapsible&&L.value&&P.value>=0?P.value:M.length;let q=0;for(let G=0;G<R;G++){const ne=h(M[G]),oe=_(M[G]),ae=q+ne+oe;q=ae>=S?ae%S:ae}return q}),V=e.computed(()=>{const S=I.value;return{gridColumn:`${S===0?1:S+1} / -1`}}),K={left:"flex-start",center:"center",right:"flex-end"},H=e.computed(()=>{var M;const S={justifyContent:(M=K[i.buttonAlign])!=null?M:"flex-start"};if(i.buttonAlign==="left"&&p.value!=="top"){const R=l.value;R&&R!=="auto"&&(S.paddingLeft=typeof R=="number"?`${R}px`:String(R))}return S}),X=e.computed(()=>i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons);function Z(S,M){i.model[S]=M}function ee(){var S;(S=E.value)==null||S.validate(M=>{M&&k("search",i.model)})}function te(){var S,M;for(const R of i.schema)Z(R.field,(S=R.defaultValue)!=null?S:null);(M=E.value)==null||M.clearValidate(),k("reset",i.model)}return s({formRef:E,validate:S=>{var M;return(M=E.value)==null?void 0:M.validate(S)},validateField:(S,M)=>{var R;return(R=E.value)==null?void 0:R.validateField(S,M)},resetFields:te,clearValidate:S=>{var M;return(M=E.value)==null?void 0:M.clearValidate(S)}}),(S,M)=>(e.openBlock(),e.createBlock(e.unref(Ct),{ref_key:"formRef",ref:E,class:"sy-pro-form",model:o.model,"label-width":l.value,"label-position":p.value,disabled:o.disabled,size:N.value,onSubmit:M[2]||(M[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle(F.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(R,q)=>{var G;return e.openBlock(),e.createElementBlock(e.Fragment,{key:R.field},[!o.collapsible||!L.value||P.value<0||q<P.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(A(R))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),R.component==="slot"?e.renderSlot(S.$slots,R.field,{key:0,item:R}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(wt),e.mergeProps({prop:R.field,label:(G=R.label)!=null?G:""},{ref_for:!0},R.labelWidth!=null?{labelWidth:R.labelWidth}:{},{rules:R.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(ot,{"model-value":o.model[R.field],schema:R,model:o.model,"onUpdate:modelValue":ne=>Z(R.field,ne)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[R.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(R.label),1),e.createVNode(e.unref(pe),{content:R.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(ye),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(v.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(S.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(X.value||o.collapsible&&$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(V.value)},[e.renderSlot(S.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",loading:o.loading,onClick:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(S.$slots,"extra-buttons")]),o.collapsible&&$.value?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",link:"",onClick:M[0]||(M[0]=R=>L.value=!L.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.value?"展开":"合并")+" ",1),e.createVNode(e.unref(ye),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value?e.unref(v.ArrowDown):e.unref(v.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(X.value||o.collapsible&&$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle(H.value)},[e.renderSlot(S.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",loading:o.loading,onClick:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(S.$slots,"extra-buttons")]),o.collapsible&&$.value?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",link:"",onClick:M[1]||(M[1]=R=>L.value=!L.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.value?"展开":"合并")+" ",1),e.createVNode(e.unref(ye),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value?e.unref(v.ArrowDown):e.unref(v.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}});function zs(o){const s=new Set,r=e.computed(()=>e.unref(o)),c=e.computed(()=>r.value.map(A=>A.field));function i(){return e.unref(o)}function a(){e.isRef(o)&&(o.value=[...o.value])}function n(){const A=new Set,I=new Set;for(const V of i())V!=null&&V.field&&(A.has(V.field)&&I.add(V.field),A.add(V.field));I.forEach(V=>{s.has(V)||(s.add(V),console.warn(`[useProFormSchema] duplicated field detected: "${V}".`))})}function t(A){return p(A)>-1}function l(A){return i().find(I=>I.field===A)}function p(A){return i().findIndex(I=>I.field===A)}function N(A){return!(!(A!=null&&A.field)||t(A.field))}function k(A,I){const V=l(A);return V?(Object.assign(V,I),a(),n(),!0):!1}function E(A,I){const V=p(A);if(V<0||!(I!=null&&I.field))return!1;const K=l(A);return I.field!==A&&K&&t(I.field)?!1:(i().splice(V,1,I),a(),n(),!0)}function L(A,I){var K;const V=l(A);return V?(V.props=T(T({},(K=V.props)!=null?K:{}),I),a(),!0):!1}function C(A,I){var K;const V=l(A);return V?(V.events=T(T({},(K=V.events)!=null?K:{}),I),a(),!0):!1}function g(A,I){const V=l(A);return V?(V.options=I,a(),!0):!1}function y(A){return k(A,{hidden:!1})}function m(A){return k(A,{hidden:!0})}function h(A,I){const V=l(A);return!V||typeof V.hidden=="function"&&I===void 0?!1:(V.hidden=I!=null?I:!V.hidden,a(),!0)}function _(A){return N(A)?(i().push(A),a(),n(),!0):!1}function z(A){return N(A)?(i().unshift(A),a(),n(),!0):!1}function B(A,I){if(!N(I))return!1;const V=p(A);return V<0?!1:(i().splice(V,0,I),a(),n(),!0)}function P(A,I){if(!N(I))return!1;const V=p(A);return V<0?!1:(i().splice(V+1,0,I),a(),n(),!0)}function $(A){const I=p(A);return I<0?!1:(i().splice(I,1),a(),!0)}function F(A,I){const V=l(A);return V?(I(V),a(),n(),!0):!1}return n(),{schema:r,fields:c,has:t,get:l,getIndex:p,set:k,replace:E,setProps:L,setEvents:C,setOptions:g,show:y,hide:m,toggle:h,append:_,prepend:z,insertBefore:B,insertAfter:P,remove:$,update:F}}const It=b.withInstall(Ds);function Os(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),c=e.computed(()=>s.value.map(n=>n[o]));function i(n){s.value=n}function a(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:c,selectionChange:i,clearSelection:a}}function Us(o){const{request:s,params:r,searchParam:c,postData:i,requestError:a,pagination:n=!0,staticData:t,initialPageSize:l}=o,p=e.ref(!1),N=e.ref([]),k=e.reactive({pageNum:1,pageSize:l!=null?l:10,total:0}),E=e.reactive({}),L=e.reactive({}),C=e.computed(()=>{if(!(t!=null&&t.value))return N.value;if(!n)return t.value;const P=(k.pageNum-1)*k.pageSize;return t.value.slice(P,P+k.pageSize)});function g(P,$){for(const[F,A]of Object.entries(P))(A!=null&&A!==""||A===!1||A===0)&&($[F]=A)}function y(){const P={};return g(L,P),c!=null&&c.value&&g(c.value,P),P}function m(){return Be(this,null,function*(){var P,$,F;if(t!=null&&t.value){k.total=t.value.length;return}if(s)try{p.value=!0;const A=y(),I=T(T(T({},E),A),(P=r==null?void 0:r.value)!=null?P:{});n&&(I.pageNum=k.pageNum,I.pageSize=k.pageSize);const V=yield s(I);if(!V.success){a==null||a(V);return}let K=($=V.data)!=null?$:[];i&&(K=i(K)),N.value=K,n&&(k.total=(F=V.total)!=null?F:0)}catch(A){a==null||a(A)}finally{p.value=!1}})}function h(){k.pageNum=1,m()}function _(){var P;k.pageNum=1;for(const $ of Object.keys(L))L[$]=(P=E[$])!=null?P:null;m()}function z(P){k.pageSize=P,k.pageNum=1,m()}function B(P){k.pageNum=P,m()}return r&&e.watch(r,()=>m(),{deep:!0}),{loading:p,tableData:N,pageable:k,processTableData:C,searchParam:L,searchInitParam:E,getTableList:m,search:h,reset:_,handleSizeChange:z,handleCurrentChange:B}}function Rt(o){var r;const s=[];for(const c of o)(r=c.children)!=null&&r.length?s.push(c,...Rt(c.children)):s.push(c);return s}const Et={border:!1,stripe:!1,rowKey:"id",type:"custom",searchCols:4,panelCols:1,filterChipWidth:140,filterChipMax:3,pageSizes:[10,20,50,100],pageLayout:"total, sizes, prev, pager, next, jumper",autoHeight:!1};function Hs(o,s,r,c={}){var ae,ze,Ne,D;const a=(ae=e.inject(b.SY_UI_CONFIG_KEY,{}).proTable)!=null?ae:{},n=(ze=b.getMasterConfig(b.detectMicroAppName()).proTable)!=null?ze:{},t=new Proxy(o,{get(f,x,O){const U=n[x];if(U!==void 0)return U;const Y=Reflect.get(f,x,O);if(Y!==void 0)return Y;const W=x;if(W in a&&a[W]!==void 0)return a[W];const j=x;if(j in Et)return Et[j]}}),l=t,p=e.ref(),N=e.ref(),k=e.ref(),E=e.ref(l.type!=="unify"&&l.type!=="custom"),L=e.ref(null),C=e.computed(()=>e.reactive(Rt(o.columns))),g=e.ref(new Map);function y(f){return Be(this,null,function*(){var O;if(!f.enum||!f.prop)return;const x=f.enum;if(typeof x=="function"){g.value.set(f.prop,[]);try{const U=yield x();g.value.set(f.prop,U)}catch(U){}}else g.value.set(f.prop,Array.isArray(x)?x:(O=x.value)!=null?O:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const m=e.computed(()=>C.value.filter(f=>{var x,O;return((x=f.search)==null?void 0:x.component)||((O=f.search)==null?void 0:O.render)}).sort((f,x)=>{var O,U,Y,W;return((U=(O=f.search)==null?void 0:O.order)!=null?U:0)-((W=(Y=x.search)==null?void 0:Y.order)!=null?W:0)})),h=e.computed(()=>m.value.filter(f=>{var x;return!!((x=f.search)!=null&&x.quick)}).sort((f,x)=>{var Y,W,j,le,xe,Pe;const O=typeof((Y=f.search)==null?void 0:Y.quick)=="object"&&(j=(W=f.search)==null?void 0:W.quick.order)!=null?j:0,U=typeof((le=x.search)==null?void 0:le.quick)=="object"&&(Pe=(xe=x.search)==null?void 0:xe.quick.order)!=null?Pe:0;return O-U})),_=e.computed(()=>m.value.map(f=>{var x,O,U,Y,W,j,le,xe,Pe,Lt,Ft,Dt,zt,Ot,Ut,Ht,qt;return{field:(U=(O=(x=f.search)==null?void 0:x.key)!=null?O:f.prop)!=null?U:"",label:f.label,component:(Y=f.search)==null?void 0:Y.component,props:(W=f.search)==null?void 0:W.props,options:(()=>{var jt,Kt,Gt,Yt,Wt,Qt,Jt;if(((jt=f.search)==null?void 0:jt.options)!==void 0){const ct=f.search.options;return Array.isArray(ct)?ct:(Kt=e.unref(ct))!=null?Kt:void 0}if(!(!f.enum||(Yt=(Gt=f.search)==null?void 0:Gt.component)!=null&&Yt.includes("tree")))return typeof f.enum=="function"?(Qt=g.value.get((Wt=f.prop)!=null?Wt:""))!=null?Qt:void 0:Array.isArray(f.enum)?f.enum:(Jt=e.unref(f.enum))!=null?Jt:void 0})(),fieldNames:f.fieldNames,defaultValue:(j=f.search)==null?void 0:j.defaultValue,hidden:(le=f.search)==null?void 0:le.hidden,span:(xe=f.search)==null?void 0:xe.span,offset:(Pe=f.search)==null?void 0:Pe.offset,order:(Lt=f.search)==null?void 0:Lt.order,render:(Ft=f.search)==null?void 0:Ft.render,xs:(Dt=f.search)==null?void 0:Dt.xs,sm:(zt=f.search)==null?void 0:zt.sm,md:(Ot=f.search)==null?void 0:Ot.md,lg:(Ut=f.search)==null?void 0:Ut.lg,xl:(Ht=f.search)==null?void 0:Ht.xl,labelWidth:(qt=f.search)==null?void 0:qt.labelWidth}})),z=e.ref({}),B={};function P(){var f,x,O,U,Y;for(const W of Object.keys(z.value))delete z.value[W];for(const W of Object.keys(B))delete B[W];for(const W of m.value){const j=(O=(x=(f=W.search)==null?void 0:f.key)!=null?x:W.prop)!=null?O:"",le=(Y=(U=W.search)==null?void 0:U.defaultValue)!=null?Y:null;z.value[j]=le,B[j]=le}}const{loading:$,processTableData:F,pageable:A,getTableList:I,handleSizeChange:V,handleCurrentChange:K}=Us({request:o.request,params:e.toRef(o,"params"),searchParam:z,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:(D=(Ne=l.pageSize)!=null?Ne:a.pageSize)!=null?D:10});function H(){Object.assign(A,{pageNum:1}),I(),s("search")}function X(){P(),Object.assign(A,{pageNum:1}),I(),s("reset")}const{selectedList:Z,isSelected:ee,selectedListIds:te,selectionChange:ie,clearSelection:de}=Os(l.rowKey);function S(){var f,x;de(),(x=(f=p.value)==null?void 0:f.clearSelection)==null||x.call(f)}function M(f){var x;L.value=f[(x=l.rowKey)!=null?x:"id"]}function R(){var f,x;L.value=null,(x=(f=p.value)==null?void 0:f.setCurrentRow)==null||x.call(f,void 0)}function q(f){I()}function G(f){return l.toolButton===!0?!0:l.toolButton===!1?!1:l.toolButton.includes(f)}function ne(){E.value=!E.value}function oe(){var f,x;(x=(f=k.value)==null?void 0:f.open)==null||x.call(f)}return e.onMounted(()=>Be(this,null,function*(){for(const f of C.value)y(f);P(),o.manualRequest||I()})),{props:t,tableAttrs:c,tableRef:p,formRef:N,colSettingRef:k,flatColumns:C,enumMap:g,searchColumns:m,quickSearchColumns:h,searchSchema:_,searchParam:z,searchInitParam:B,loading:$,tableData:F,pageable:A,selectedList:Z,selectedListIds:te,isSelected:ee,radio:L,isShowSearch:E,getTableList:I,search:H,reset:X,clearSelection:S,clearRadio:R,handleSizeChange:V,handleCurrentChange:K,onSortChange:q,onRadioChange:M,selectionChange:ie,showToolBtn:G,toggleSearch:ne,openColSetting:oe}}const qs={key:1,style:{color:"var(--el-text-color-placeholder)"}},js=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,c=e.ref(!1),i=e.computed(()=>r.columns.filter(l=>{if(l.type&&["selection","index","expand","radio","sort"].includes(l.type))return!1;const p=l.isSetting;return p===void 0||p===!0}));e.computed(()=>i.value.every(l=>l.isShow!==!1)),e.computed(()=>{const l=i.value.length,p=i.value.filter(N=>N.isShow!==!1).length;return p>0&&p<l});const a=new WeakMap;function n(){i.value.forEach(l=>{a.has(l)||a.set(l,{isShow:l.isShow!==!1,sortable:l.sortable})})}function t(){n(),c.value=!0}return s({open:t}),(l,p)=>(e.openBlock(),e.createBlock(e.unref(pt),{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=N=>c.value=N),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
5
5
  <sy-checkbox :model-value="checkAll" :indeterminate="isIndeterminate" @change="onCheckAll"> 全部显示 </sy-checkbox>
6
6
  <sy-button type="primary" link @click="onReset">重置</sy-button>
7
- </div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(ze),{data:i.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...u[1]||(u[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(ae),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:k})=>{var A,I;return[e.createTextVNode(e.toDisplayString((I=(A=k.label)!=null?A:k.prop)!=null?I:"—"),1)]}),_:1}),e.createVNode(e.unref(ae),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:k})=>[e.createVNode(e.unref(_e),{"model-value":k.isShow!==!1,"onUpdate:modelValue":A=>{k.isShow=A}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(ae),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:k})=>[typeof k.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(_e),{key:0,modelValue:k.sortable,"onUpdate:modelValue":A=>k.sortable=A},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",as,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),Ue=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const c=o.context.flatColumns,i=e.ref();function l(){var n,t;(t=(n=i.value)==null?void 0:n.open)==null||t.call(n)}return s({open:l}),(n,t)=>(e.openBlock(),e.createBlock(cs,{ref_key:"innerRef",ref:i,columns:e.unref(c)},null,8,["columns"]))}}),is={key:0,class:"sy-pro-table__pagination"},qe=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,c=s.context.pageable,i=s.context.handleSizeChange,l=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(c).total>0?(e.openBlock(),e.createElementBlock("div",is,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(rt),{"current-page":e.unref(c).pageNum,"onUpdate:currentPage":t[0]||(t[0]=a=>e.unref(c).pageNum=a),"page-size":e.unref(c).pageSize,"onUpdate:pageSize":t[1]||(t[1]=a=>e.unref(c).pageSize=a),total:e.unref(c).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(i),onCurrentChange:e.unref(l)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),je=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,c=r.context.props,i=r.context.searchParam,l=r.context.searchSchema,n=r.context.search,t=r.context.reset,a=e.ref();return s({validate:u=>{var k,A;return(A=(k=a.value)==null?void 0:k.validate)==null?void 0:A.call(k,u)},resetFields:()=>{var u,k;return(k=(u=a.value)==null?void 0:u.resetFields)==null?void 0:k.call(u)},clearValidate:u=>{var k,A;return(A=(k=a.value)==null?void 0:k.clearValidate)==null?void 0:A.call(k,u)},formRef:a}),(u,k)=>(e.openBlock(),e.createBlock(e.unref(ft),{ref_key:"innerFormRef",ref:a,model:e.unref(i),schema:e.unref(l),cols:o.cols,"label-width":e.unref(c).searchLabelWidth,"label-position":e.unref(c).searchLabelPosition,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(n),onReset:e.unref(t)},null,8,["model","schema","cols","label-width","label-position","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),ds=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),c=e.inject("proTableSlots",{}),i=e.computed(()=>{const C=s.column.isShow;return C===void 0?!0:e.unref(C)}),l=e.computed(()=>{var b,S,p,m;const C=s.column.enum;return typeof C=="function"?(S=r.value.get((b=s.column.prop)!=null?b:""))!=null?S:[]:C?e.unref(C):(m=r.value.get((p=s.column.prop)!=null?p:""))!=null?m:[]});function n(C){var _,z;const{fieldNames:b}=s.column,S=(_=b==null?void 0:b.label)!=null?_:"label",p=(z=b==null?void 0:b.value)!=null?z:"value",m=l.value.find(P=>P[p]===C);return m?m[S]:String(C!=null?C:"")}function t(C){var m;const{fieldNames:b}=s.column,S=(m=b==null?void 0:b.value)!=null?m:"value",p=l.value.find(_=>_[S]===C);return(p==null?void 0:p.tagType)||void 0}function a(C){return C.split(".").reduce((S,p,m)=>m===0?S+p:S+p.charAt(0).toUpperCase()+p.slice(1),"")}function u(C){var z;const{column:b}=s;if(b.render)return b.render(C);if(b.type==="expand"){const P="expand";return c[P]?c[P](C):null}const S=(z=b.prop)!=null?z:"",p=C.row[S],m=a(S);if(c[m])return c[m](C);if(b.isFilterEnum!==!1&&l.value.length>0){if(b.tag){const P=t(p);return e.h(Re,P?{type:P}:{},()=>n(p))}return e.h("span",{},n(p))}return b.tag?e.h(Re,{},()=>String(p!=null?p:"")):e.h("span",{},String(p!=null?p:""))}function k(C){var p,m;const{column:b}=s;if(b.headerRender)return b.headerRender(C);const S=`${a((p=b.prop)!=null?p:"")}Header`;return c[S]?c[S](C):(m=b.label)!=null?m:""}const A=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>c.expand?c.expand(C.scope):null}}),I=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>k(C.scope)}}),M=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>u(C.scope)}});return(C,b)=>{var p;const S=e.resolveComponent("ProTableColumn",!0);return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(p=o.column.children)!=null&&p.length?(e.openBlock(),e.createBlock(e.unref(ae),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,m=>{var _;return e.openBlock(),e.createBlock(S,{key:(_=m.prop)!=null?_:m.label,column:m},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(ae),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(ae),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(m=>[e.createVNode(e.unref(A),{scope:m},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(ae),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(m=>[e.createVNode(e.unref(De),{modelValue:m.row.__radioSelected,"onUpdate:modelValue":_=>m.row.__radioSelected=_,value:!0,onChange:()=>C.$emit("radioChange",m.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(ae),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(Re),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(me),null,{default:e.withCtx(()=>[e.createVNode(e.unref(v.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(ae),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(m=>[e.createVNode(e.unref(I),{scope:m},null,8,["scope"])]),default:e.withCtx(m=>[e.createVNode(e.unref(M),{scope:m},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),ps={class:"sy-pro-table__table"},fs={class:"sy-pro-table__empty"},Ke=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},tableMaxHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.tableAttrs,i=e.computed(()=>s.tableHeight),l=e.computed(()=>s.tableMaxHeight),n=s.context.tableRef,t=s.context.loading,a=s.context.tableData,u=s.context.flatColumns,k=s.context.selectionChange,A=s.context.onSortChange,I=s.context.onRadioChange;function M(b){n.value=b}function C(){var p;if(!r.columns.some(m=>m.type==="sort")||!n.value)return;const S=(p=n.value.$el)==null?void 0:p.querySelector("tbody");S&&$e.create(S,{handle:".move",animation:150,onEnd({newIndex:m,oldIndex:_}){var x;if(m===_)return;const z=a.value,P=z.splice(_,1)[0];z.splice(m,0,P),(x=s.onDragSort)==null||x.call(s,{newIndex:m,oldIndex:_})}})}return e.onMounted(()=>{e.nextTick(()=>C())}),(b,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",ps,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(ze),e.mergeProps(e.unref(c),{ref:M,height:i.value,"max-height":l.value,data:e.unref(a),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(k),onSortChange:e.unref(A)}),{append:e.withCtx(()=>[e.renderSlot(b.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(b.$slots,"empty",{},()=>[e.createElementVNode("div",fs,[e.createVNode(e.unref(Xe),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(b.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),p=>{var m,_;return e.openBlock(),e.createBlock(ds,{key:(_=(m=p.prop)!=null?m:p.label)!=null?_:p.type,column:p,onRadioChange:e.unref(I)},null,8,["column","onRadioChange"])}),128))]),_:3},16,["height","max-height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(f.AdapterLoadingDirective),e.unref(t)]])])],2112))}}),ms={key:0,class:"sy-pro-table__search"},us={class:"sy-pro-table__main"},hs={key:0,class:"sy-pro-table__header"},ys={class:"sy-pro-table__header-left"},Ss={class:"sy-pro-table__header-right"},gs=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var $;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,a=s.context.getTableList,u=s.context.openColSetting,k=s.context.toggleSearch,A=s.context.showToolBtn,I=s.context.formRef,M=s.context.colSettingRef,C=e.ref(),b=e.ref(void 0),S=e.ref(void 0),p=($=e.inject(y.SY_UI_CONFIG_KEY,{}).proTable)!=null?$:{};function m(){var J,ee;const F=C.value;if(!F)return;const w=F.querySelector(".sy-pro-table__table"),R=F.querySelector(".sy-pro-table__pagination");if(!w)return;const V=w.getBoundingClientRect().top,K=R?R.getBoundingClientRect().height:0,U=(ee=(J=r.heightOffset)!=null?J:p.heightOffset)!=null?ee:0,X=Math.floor(window.innerHeight-V-K-U);return X>80?X:void 0}function _(){if(r.height!==void 0){b.value=r.height,S.value=void 0;return}if(r.autoHeight===!0){b.value=m(),S.value=void 0;return}if(r.maxHeight!==void 0){b.value=void 0,S.value=r.maxHeight;return}b.value=void 0,S.value=m()}e.watch(c,()=>e.nextTick(_));let z=null;e.onMounted(()=>{e.nextTick(_),window.addEventListener("resize",_),C.value&&(z=new ResizeObserver(_),z.observe(C.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",_),z==null||z.disconnect()});function P(F){I.value=F}function x(F){M.value=F}return(F,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:C,class:"sy-pro-table sy-pro-table--classic"},[!e.unref(r).tableOnly&&e.unref(r).showSearch&&e.unref(c)&&e.unref(i).length>0?(e.openBlock(),e.createElementBlock("div",ms,[e.createVNode(je,{ref:P,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",us,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",hs,[e.createElementVNode("div",ys,[e.createCommentVNode(" 业务操作按钮(新增/导出等),始终可见 "),e.renderSlot(F.$slots,"busActions"),e.createCommentVNode(" 批量操作,仅在有选中行时追加显示 "),e.unref(t)?e.renderSlot(F.$slots,"batchActions",{key:0,selectedList:e.unref(l),selectedListIds:e.unref(n),isSelected:e.unref(t)}):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",Ss,[e.createCommentVNode(" 用户自定义工具按钮(追加在系统按钮之前) "),e.renderSlot(F.$slots,"toolButton"),e.createCommentVNode(" 系统工具按钮,始终渲染 "),e.unref(A)("refresh")?(e.openBlock(),e.createBlock(e.unref(fe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Refresh),circle:"",onClick:e.unref(a)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(A)("setting")?(e.openBlock(),e.createBlock(e.unref(fe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Operation),circle:"",onClick:e.unref(u)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(A)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(fe),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Search),circle:"",onClick:e.unref(k)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])),e.createVNode(Ke,{context:o.context,"table-height":b.value,"table-max-height":S.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(F.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(F.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(F.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(qe,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(F.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(Ue,{ref:x,context:o.context},null,8,["context"])],512))}}),ht=e.defineComponent({__name:"CustomFilterChip",props:{column:{},model:{},modelValue:{},width:{}},emits:["search","remove","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var u,k,A,I,M,C,b;const t=r.column,a=(()=>{var S,p,m,_,z,P,x;if(((S=t.search)==null?void 0:S.options)!==void 0){const $=t.search.options;return Array.isArray($)?$:(p=e.unref($))!=null?p:void 0}if(!(!t.enum||(_=(m=t.search)==null?void 0:m.component)!=null&&_.includes("tree")))return typeof t.enum=="function"?(P=i.value.get((z=t.prop)!=null?z:""))!=null?P:void 0:Array.isArray(t.enum)?t.enum:(x=e.unref(t.enum))!=null?x:void 0})();return{field:(A=(k=(u=t.search)==null?void 0:u.key)!=null?k:t.prop)!=null?A:"",label:t.label,component:(I=t.search)==null?void 0:I.component,props:Z(E({},(M=t.search)==null?void 0:M.props),{clearable:!1}),options:a,fieldNames:t.fieldNames,defaultValue:(C=t.search)==null?void 0:C.defaultValue,render:(b=t.search)==null?void 0:b.render}});function n(t){c("update:modelValue",t)}return(t,a)=>{var u,k,A;return e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__custom-filter-chip",onKeyup:a[1]||(a[1]=e.withKeys(I=>c("search"),["enter"]))},[e.createElementVNode("div",{class:"sy-pro-table__custom-filter-chip-control",style:e.normalizeStyle({width:`${(A=(k=(u=r.column.search)==null?void 0:u.chipWidth)!=null?k:r.width)!=null?A:100}px`})},[e.createVNode(He,{schema:l.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":n},null,8,["schema","model","model-value"])],4),e.createElementVNode("span",{class:"sy-pro-table__custom-filter-chip-close",onClick:a[0]||(a[0]=e.withModifiers(I=>c("remove"),["stop"]))},[e.createVNode(e.unref(me),null,{default:e.withCtx(()=>[e.createVNode(e.unref(v.Close))]),_:1})])],32)}}}),yt=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var k;const a=(k=r.column.search)==null?void 0:k.quick,u=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof u=="number"?`${u}px`:u}}),n=e.computed(()=>{var k,A,I,M,C,b,S;const a=r.column,u=(()=>{var p,m,_,z,P,x,$;if(((p=a.search)==null?void 0:p.options)!==void 0){const F=a.search.options;return Array.isArray(F)?F:(m=e.unref(F))!=null?m:void 0}if(!(!a.enum||(z=(_=a.search)==null?void 0:_.component)!=null&&z.includes("tree")))return typeof a.enum=="function"?(x=i.value.get((P=a.prop)!=null?P:""))!=null?x:void 0:Array.isArray(a.enum)?a.enum:($=e.unref(a.enum))!=null?$:void 0})();return{field:(I=(A=(k=a.search)==null?void 0:k.key)!=null?A:a.prop)!=null?I:"",label:a.label,component:(M=a.search)==null?void 0:M.component,props:(C=a.search)==null?void 0:C.props,options:u,fieldNames:a.fieldNames,defaultValue:(b=a.search)==null?void 0:b.defaultValue,render:(S=a.search)==null?void 0:S.render}});function t(a){c("update:modelValue",a)}return(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(l.value),onKeyup:u[0]||(u[0]=e.withKeys(k=>c("search"),["enter"]))},[e.createVNode(He,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),bs={class:"sy-pro-table__custom-search"},Cs=e.defineComponent({__name:"CustomSearchBar",props:{quickSearchColumns:{},searchParam:{},showAdvanced:{type:Boolean},filterActive:{type:Boolean}},emits:["search","toggleAdvanced","updateParam"],setup(o,{emit:s}){const r=s;function c(){r("search")}return(i,l)=>(e.openBlock(),e.createElementBlock("div",bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.quickSearchColumns,n=>{var t,a,u,k,A;return e.openBlock(),e.createBlock(yt,{key:(a=(t=n.search)==null?void 0:t.key)!=null?a:n.prop,"model-value":o.searchParam[(A=(k=(u=n.search)==null?void 0:u.key)!=null?k:n.prop)!=null?A:""],column:n,model:o.searchParam,"onUpdate:modelValue":I=>{var M,C,b;return r("updateParam",(b=(C=(M=n.search)==null?void 0:M.key)!=null?C:n.prop)!=null?b:"",I)},onSearch:c},null,8,["model-value","column","model","onUpdate:modelValue"])}),128)),e.createVNode(e.unref(fe),{content:"查询",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{class:"sy-pro-table__custom-search-btn",icon:e.unref(v.Search),onClick:c},null,8,["icon"])]),_:1}),o.showAdvanced?(e.openBlock(),e.createBlock(e.unref(fe),{key:0,content:"高级筛选",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{class:e.normalizeClass(["sy-pro-table__custom-filter-btn",{"is-active":o.filterActive}]),icon:e.unref(v.Filter),onClick:l[0]||(l[0]=n=>r("toggleAdvanced"))},null,8,["class","icon"])]),_:1})):e.createCommentVNode("v-if",!0)]))}}),ws={class:"sy-pro-table__custom-panel-inner"},As={class:"sy-pro-table__custom-panel-footer"},ks=e.defineComponent({__name:"CustomSearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""},cols:{default:1}},emits:["close","panelSearch"],setup(o,{emit:s}){const r=o,c=s,i=e.computed(()=>{const C=typeof r.cols=="number"?r.cols:1;return{width:`${Math.max(360,C*280+32)}px`}}),l=r.context.search,n=r.context.reset;function t(){l(),c("panelSearch"),c("close")}function a(){n(),c("close")}const u=r.context.formRef,k=e.ref();function A(C){u.value=C}let I=null;function M(C){var S;const b=C.composedPath();for(const p of b){const m=p;if(m!=null&&m.classList&&(m===k.value||r.excludeSelector&&((S=m.matches)!=null&&S.call(m,r.excludeSelector))||m.classList.contains("el-popper")||m.classList.contains("el-overlay")||m.classList.contains("el-picker__popper")||m.classList.contains("el-select__popper")||m.classList.contains("el-select-dropdown")||m.classList.contains("el-date-picker")||m.classList.contains("el-date-range-picker")))return}c("close")}return e.watch(()=>r.visible,C=>{I==null||I(),I=null,C&&e.nextTick(()=>{document.addEventListener("mousedown",M,!0),I=()=>document.removeEventListener("mousedown",M,!0)})}),e.onBeforeUnmount(()=>I==null?void 0:I()),(C,b)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:k,class:"sy-pro-table__custom-panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",ws,[e.createVNode(je,{ref:A,context:o.context,cols:r.cols,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context","cols"]),e.createElementVNode("div",As,[e.createVNode(e.unref(Q),{onClick:a},{default:e.withCtx(()=>[...b[0]||(b[0]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(Q),{type:"primary",onClick:t},{default:e.withCtx(()=>[...b[1]||(b[1]=[e.createTextVNode("查询",-1)])]),_:1})])])],4),[[e.vShow,o.visible]])]),_:1}))}}),Ns={class:"sy-pro-table__main sy-pro-table__main--custom"},xs={key:0,class:"sy-pro-table__header sy-pro-table__header--custom"},Ps={class:"sy-pro-table__custom-batch"},Bs={class:"sy-pro-table__custom-batch-count"},Vs={class:"sy-pro-table__header-left"},_s={class:"sy-pro-table__header-right sy-pro-table__header-right--custom"},Rs={class:"sy-pro-table__custom-panel-inner sy-pro-table__chip-overflow-list"},Ts=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var we;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,u=s.context.isSelected,k=s.context.search,A=s.context.toggleSearch,I=s.context.showToolBtn,M=s.context.getTableList,C=s.context.openColSetting,b=s.context.colSettingRef,S=s.context.clearSelection,p=s.context.searchInitParam,m=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),_=e.computed(()=>{const D=new Set(l.value.map(d=>{var N,O,H;return(H=(O=(N=d.search)==null?void 0:N.key)!=null?O:d.prop)!=null?H:""}));return i.value.filter(d=>{var N,O,H;return!D.has((H=(O=(N=d.search)==null?void 0:N.key)!=null?O:d.prop)!=null?H:"")})}),z=e.ref(new Set),P=e.computed(()=>_.value.map(D=>{var O,H,W;const d=(W=(H=(O=D.search)==null?void 0:O.key)!=null?H:D.prop)!=null?W:"";if(!z.value.has(d))return null;const N=n.value[d];return N==null||N===""||Array.isArray(N)&&N.length===0?null:{key:d,column:D}}).filter(D=>D!==null)),x=e.computed(()=>{var d;const D=(d=r.filterChipMax)!=null?d:3;return P.value.slice(0,D)}),$=e.computed(()=>{var d;const D=(d=r.filterChipMax)!=null?d:3;return P.value.slice(D)}),F=e.ref(!1),w=e.ref(),R=e.ref(null),V=e.ref(null),K=e.computed(()=>{const D=V.value,d=g.value;if(!D||!d)return{left:"16px"};const N=d.getBoundingClientRect(),O=D.getBoundingClientRect();return{left:`${Math.round(O.left-N.left)}px`}});function U(){F.value=!F.value}e.watch($,D=>{D.length===0&&(F.value=!1)});function X(D){var O,H,W;const d=D.composedPath(),N=(H=(O=R.value)==null?void 0:O.$el)!=null?H:R.value;for(const Y of d){const j=Y;if(j!=null&&j.classList&&(j===w.value||(W=N==null?void 0:N.contains)!=null&&W.call(N,j)||j===N||j.classList.contains("el-popper")||j.classList.contains("el-overlay")||j.classList.contains("el-picker__popper")||j.classList.contains("el-select__popper")||j.classList.contains("el-select-dropdown")||j.classList.contains("el-date-picker")||j.classList.contains("el-date-range-picker")))return}F.value=!1}let J=null;e.watch(F,D=>{J==null||J(),J=null,D&&e.nextTick(()=>{document.addEventListener("mousedown",X,!0),J=()=>document.removeEventListener("mousedown",X,!0)})}),e.onBeforeUnmount(()=>J==null?void 0:J());function ee(){z.value=new Set(_.value.map(D=>{var d,N,O;return(O=(N=(d=D.search)==null?void 0:d.key)!=null?N:D.prop)!=null?O:""}).filter(D=>{const d=n.value[D];return d!=null&&d!==""&&!(Array.isArray(d)&&d.length===0)}))}function te(D,d){n.value[D]=d}function ce(D){var d;n.value[D]=(d=p[D])!=null?d:void 0,z.value.delete(D),k()}function ie(){_.value.forEach(D=>{var N,O,H,W;const d=(H=(O=(N=D.search)==null?void 0:N.key)!=null?O:D.prop)!=null?H:"";n.value[d]=(W=p[d])!=null?W:void 0}),z.value.clear(),k()}const g=e.ref(),L=e.ref(void 0),T=e.ref(void 0),q=(we=e.inject(y.SY_UI_CONFIG_KEY,{}).proTable)!=null?we:{};function G(){var j,le;const D=g.value;if(!D)return;const d=D.querySelector(".sy-pro-table__table"),N=D.querySelector(".sy-pro-table__pagination");if(!d)return;const O=d.getBoundingClientRect().top,H=N?N.getBoundingClientRect().height:0,W=(le=(j=r.heightOffset)!=null?j:q.heightOffset)!=null?le:0,Y=Math.floor(window.innerHeight-O-H-W);return Y>80?Y:void 0}function ne(){if(r.height!==void 0){L.value=r.height,T.value=void 0;return}if(r.autoHeight===!0){L.value=G(),T.value=void 0;return}if(r.maxHeight!==void 0){L.value=void 0,T.value=r.maxHeight;return}L.value=void 0,T.value=G()}let oe=null;e.onMounted(()=>{e.nextTick(ne),window.addEventListener("resize",ne),g.value&&(oe=new ResizeObserver(ne),oe.observe(g.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",ne),oe==null||oe.disconnect()});function re(D){b.value=D}function Te(){c.value&&A()}return(D,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:g,class:"sy-pro-table sy-pro-table--custom"},[e.createElementVNode("div",Ns,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",xs,[e.createCommentVNode(" 批量操作模式:选中行时替换整个 header "),e.unref(u)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Ps,[e.createElementVNode("span",Bs,"已选 "+e.toDisplayString(e.unref(t).length)+" 条数据",1),d[1]||(d[1]=e.createElementVNode("span",{class:"sy-pro-table__custom-batch-divider"},null,-1)),e.renderSlot(D.$slots,"batchActions",{selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(u)})]),e.createVNode(e.unref(Q),{class:"sy-pro-table__custom-batch-close",icon:e.unref(v.Close),circle:"",onClick:e.unref(S)},null,8,["icon","onClick"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 正常模式 "),e.createCommentVNode(" 左侧:快速查询 + 高级筛选 + 已应用筛选 tags "),e.createElementVNode("div",Vs,[e.createVNode(Cs,{"quick-search-columns":e.unref(l),"search-param":e.unref(n),"show-advanced":e.unref(r).showSearch&&e.unref(I)("search")&&e.unref(i).length>0,"filter-active":m.value||P.value.length>0,onSearch:e.unref(k),onToggleAdvanced:e.unref(A),onUpdateParam:d[0]||(d[0]=(N,O)=>e.unref(n)[N]=O)},null,8,["quick-search-columns","search-param","show-advanced","filter-active","onSearch","onToggleAdvanced"]),e.createCommentVNode(" chips 行整体包一个 div,用于精确计算 overflow panel 的对齐 left "),P.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chipsRowRef",ref:V,class:"sy-pro-table__chip-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,N=>(e.openBlock(),e.createBlock(ht,{key:N.key,column:N.column,model:e.unref(n),"model-value":e.unref(n)[N.key],width:e.unref(r).filterChipWidth,"onUpdate:modelValue":O=>te(N.key,O),onSearch:e.unref(k),onRemove:O=>ce(N.key)},null,8,["column","model","model-value","width","onUpdate:modelValue","onSearch","onRemove"]))),128)),e.createCommentVNode(" 超出 filterChipMax 时的折叠入口 "),$.value.length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,ref_key:"overflowBtnRef",ref:R,class:"sy-pro-table__custom-filter-more",size:"small",type:"primary",plain:"",onClick:U},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString($.value.length),1)]),_:1},512)):e.createCommentVNode("v-if",!0),$.value.length===0?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,link:"",size:"small",class:"sy-pro-table__custom-filter-clear",onClick:ie},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("清空",-1)])]),_:1})):e.createCommentVNode("v-if",!0)],512)):e.createCommentVNode("v-if",!0)]),e.createCommentVNode(" 右侧:业务操作按钮 + 工具按钮 + 刷新 + 列设置 "),e.createElementVNode("div",_s,[e.renderSlot(D.$slots,"busActions"),e.renderSlot(D.$slots,"toolButton"),e.unref(I)("refresh")?(e.openBlock(),e.createBlock(e.unref(fe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Refresh),circle:"",onClick:e.unref(M)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(I)("setting")?(e.openBlock(),e.createBlock(e.unref(fe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Operation),circle:"",onClick:e.unref(C)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])],64))])),e.createVNode(Ke,{context:o.context,"table-height":L.value,"table-max-height":T.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(D.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(D.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(D.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(qe,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(D.$slots,"pagination")]),_:3},8,["context"])]),e.createCommentVNode(" 两个浮层面板放在最外层容器下,避免被 __main 的 overflow:hidden 裁剪 "),e.createVNode(ks,{context:o.context,visible:m.value,cols:e.unref(r).panelCols,"exclude-selector":".sy-pro-table__custom-filter-btn",onClose:Te,onPanelSearch:ee},null,8,["context","visible","cols"]),e.createCommentVNode(" overflow chip 浮层:与第一个 chip 左对齐 "),e.createVNode(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"overflowPanelRef",ref:w,class:"sy-pro-table__custom-panel",style:e.normalizeStyle(K.value)},[e.createElementVNode("div",Rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,N=>(e.openBlock(),e.createBlock(ht,{key:N.key,column:N.column,model:e.unref(n),"model-value":e.unref(n)[N.key],width:e.unref(r).filterChipWidth,"onUpdate:modelValue":O=>te(N.key,O),onSearch:e.unref(k),onRemove:O=>ce(N.key)},null,8,["column","model","model-value","width","onUpdate:modelValue","onSearch","onRemove"]))),128)),e.createVNode(e.unref(Q),{link:"",size:"small",class:"sy-pro-table__custom-filter-clear",onClick:ie},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("清空全部",-1)])]),_:1})])],4),[[e.vShow,F.value]])]),_:1}),e.createVNode(Ue,{ref:re,context:o.context},null,8,["context"])],512))}}),Is={class:"sy-pro-table__unify-panel-inner"},$s={class:"sy-pro-table__unify-panel-footer"},Ls=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""},cols:{default:1}},emits:["close"],setup(o,{emit:s}){const r=o,c=s,i=e.computed(()=>{const C=typeof r.cols=="number"?r.cols:1;return{width:`${Math.max(360,C*280+32)}px`}}),l=r.context.search,n=r.context.reset;function t(){l(),c("close")}function a(){n(),c("close")}const u=r.context.formRef,k=e.ref();function A(C){u.value=C}let I=null;function M(C){var S;const b=C.target;b&&((S=k.value)!=null&&S.contains(b)||r.excludeSelector&&b.closest(r.excludeSelector)||b.closest(".el-popper")||b.closest(".el-overlay")||c("close"))}return e.watch(()=>r.visible,C=>{I==null||I(),I=null,C&&e.nextTick(()=>{document.addEventListener("mousedown",M,!0),I=()=>document.removeEventListener("mousedown",M,!0)})}),e.onBeforeUnmount(()=>I==null?void 0:I()),(C,b)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:k,class:"sy-pro-table__unify-panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",Is,[e.createVNode(je,{ref:A,context:o.context,cols:r.cols,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context","cols"]),e.createElementVNode("div",$s,[e.createVNode(e.unref(Q),{onClick:a},{default:e.withCtx(()=>[...b[0]||(b[0]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(Q),{type:"primary",onClick:t},{default:e.withCtx(()=>[...b[1]||(b[1]=[e.createTextVNode("查询",-1)])]),_:1})])])],4),[[e.vShow,o.visible]])]),_:1}))}}),Es={class:"sy-pro-table__main sy-pro-table__main--unify"},Ms={key:0,class:"sy-pro-table__header sy-pro-table__header--unify"},Fs={class:"sy-pro-table__header-left"},Ds={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},zs=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var F;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,u=s.context.isSelected,k=s.context.search,A=s.context.toggleSearch,I=s.context.showToolBtn,M=s.context.colSettingRef,C=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),b=e.ref(),S=e.ref(void 0),p=e.ref(void 0),m=(F=e.inject(y.SY_UI_CONFIG_KEY,{}).proTable)!=null?F:{};function _(){var ee,te;const w=b.value;if(!w)return;const R=w.querySelector(".sy-pro-table__table"),V=w.querySelector(".sy-pro-table__pagination");if(!R)return;const K=R.getBoundingClientRect().top,U=V?V.getBoundingClientRect().height:0,X=(te=(ee=r.heightOffset)!=null?ee:m.heightOffset)!=null?te:0,J=Math.floor(window.innerHeight-K-U-X);return J>80?J:void 0}function z(){if(r.height!==void 0){S.value=r.height,p.value=void 0;return}if(r.autoHeight===!0){S.value=_(),p.value=void 0;return}if(r.maxHeight!==void 0){S.value=void 0,p.value=r.maxHeight;return}S.value=void 0,p.value=_()}let P=null;e.onMounted(()=>{e.nextTick(z),window.addEventListener("resize",z),b.value&&(P=new ResizeObserver(z),P.observe(b.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",z),P==null||P.disconnect()});function x(w){M.value=w}function $(){c.value&&A()}return(w,R)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:b,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",Es,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",Ms,[e.createElementVNode("div",Fs,[e.createCommentVNode(" 业务操作按钮(新增/导出等),始终可见 "),e.renderSlot(w.$slots,"busActions"),e.createCommentVNode(" 批量操作,仅在有选中行时追加显示 "),e.unref(u)?e.renderSlot(w.$slots,"batchActions",{key:0,selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(u)}):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",Ds,[e.createCommentVNode(" 快速搜索始终渲染 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),V=>{var K,U,X,J,ee;return e.openBlock(),e.createBlock(yt,{key:(U=(K=V.search)==null?void 0:K.key)!=null?U:V.prop,modelValue:e.unref(n)[(ee=(J=(X=V.search)==null?void 0:X.key)!=null?J:V.prop)!=null?ee:""],"onUpdate:modelValue":te=>{var ce,ie,g;return e.unref(n)[(g=(ie=(ce=V.search)==null?void 0:ce.key)!=null?ie:V.prop)!=null?g:""]=te},column:V,model:e.unref(n),onSearch:e.unref(k)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(l).length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",onClick:e.unref(k)},{default:e.withCtx(()=>[...R[0]||(R[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(I)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(A)},{default:e.withCtx(()=>[...R[1]||(R[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 工具按钮区,用户可通过 #toolButton 追加自定义工具 "),e.renderSlot(w.$slots,"toolButton")])])),e.createVNode(Ke,{context:o.context,"table-height":S.value,"table-max-height":p.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(w.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(w.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(w.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(qe,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(w.$slots,"pagination")]),_:3},8,["context"])]),e.createCommentVNode(" 面板放在最外层容器下,避免被 __main 的 overflow:hidden 裁剪 "),e.createVNode(Ls,{context:o.context,visible:C.value,cols:e.unref(r).panelCols,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:$},null,8,["context","visible","cols"]),e.createVNode(Ue,{ref:x,context:o.context},null,8,["context"])],512))}}),Os=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{},border:{type:Boolean},stripe:{type:Boolean},showSearch:{type:Boolean,default:!0},searchCols:{},panelCols:{},filterChipWidth:{},filterChipMax:{},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{},pageSize:{},pageLayout:{},type:{},height:{},maxHeight:{},autoHeight:{type:Boolean},heightOffset:{},tableOnly:{type:Boolean,default:!1},searchLabelWidth:{},searchLabelPosition:{}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const c=o,i=r,l=e.useSlots(),n=e.useAttrs(),t=ls(c,i,l,n);function a(u){i("dragSort",u)}return s({tableRef:t.tableRef,formRef:t.formRef,tableData:t.tableData,enumMap:t.enumMap,pageable:t.pageable,searchParam:t.searchParam,searchInitParam:t.searchInitParam,isSelected:t.isSelected,selectedList:t.selectedList,selectedListIds:t.selectedListIds,radio:t.radio,getTableList:t.getTableList,search:t.search,reset:t.reset,clearSelection:t.clearSelection,clearRadio:t.clearRadio,handleSizeChange:t.handleSizeChange,handleCurrentChange:t.handleCurrentChange}),(u,k)=>e.unref(t).props.type==="classic"?(e.openBlock(),e.createBlock(gs,{key:0,context:e.unref(t),"on-drag-sort":a},e.createSlots({batchActions:e.withCtx(A=>[e.unref(l).batchActions?e.renderSlot(u.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},A))):e.renderSlot(u.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},A)))]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[e.unref(l).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"busActions")]),key:"0"}:void 0,e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"toolButton")]),key:"1"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"append")]),key:"2"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"empty")]),key:"3"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"])):e.unref(t).props.type==="unify"?(e.openBlock(),e.createBlock(zs,{key:1,context:e.unref(t),"on-drag-sort":a},e.createSlots({batchActions:e.withCtx(A=>[e.unref(l).batchActions?e.renderSlot(u.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},A))):e.renderSlot(u.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},A)))]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[e.unref(l).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"busActions")]),key:"0"}:void 0,e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"toolButton")]),key:"1"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"append")]),key:"2"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"empty")]),key:"3"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(Ts,{key:2,context:e.unref(t),"on-drag-sort":a},e.createSlots({batchActions:e.withCtx(A=>[e.unref(l).batchActions?e.renderSlot(u.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},A))):e.renderSlot(u.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},A)))]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[e.unref(l).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"busActions")]),key:"0"}:void 0,e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"toolButton")]),key:"1"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"append")]),key:"2"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"empty")]),key:"3"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"]))}});function Hs(o){const s=e.computed(()=>e.unref(o));function r(){e.isRef(o)&&(o.value=[...o.value])}function c(P,x){var $;for(const F of P)if(x(F)===!0||($=F.children)!=null&&$.length&&c(F.children,x))return!0;return!1}function i(P){let x;return c(e.unref(o),$=>{if($.prop===P)return x=$,!0}),x}function l(P){return!!i(P)}function n(P,x){const $=i(P);return $?(Object.assign($,x),r(),!0):!1}function t(P){return n(P,{isShow:!0})}function a(P){return n(P,{isShow:!1})}function u(P,x){return n(P,{enum:x})}function k(P,x){return n(P,{width:x})}function A(P,x){return n(P,{label:x})}function I(P){let x;return c(e.unref(o),$=>{var F;if(((F=$.search)==null?void 0:F.key)===P||$.prop===P)return x=$,!0}),x}function M(P){var x;return(x=I(P))==null?void 0:x.search}function C(P){return!!M(P)}function b(P){var $;const x=I(P);if(x)return($=x.search)!=null||(x.search={}),x.search}function S(P,x){const $=b(P);return $?(Object.assign($,x),r(),!0):!1}function p(P,x){var F;const $=b(P);return $?($.props=E(E({},(F=$.props)!=null?F:{}),x),r(),!0):!1}function m(P,x){const $=b(P);return $?($.options=x,r(),!0):!1}function _(P){return S(P,{hidden:!1})}function z(P){return S(P,{hidden:!0})}return{columns:s,hasColumn:l,getColumn:i,setColumn:n,showColumn:t,hideColumn:a,setColumnEnum:u,setColumnWidth:k,setColumnLabel:A,search:{has:C,get:M,set:S,setProps:p,setOptions:m,show:_,hide:z}}}const Us=y.withInstall(Os);Object.defineProperty(h,"SY_UI_CONFIG_KEY",{enumerable:!0,get:()=>y.SY_UI_CONFIG_KEY}),h.SyAlert=Lt,h.SyAside=ln,h.SyAutocomplete=de,h.SyBacktop=Mt,h.SyButton=Q,h.SyCard=zt,h.SyCascader=We,h.SyCheckbox=Ye,h.SyCheckboxButton=jt,h.SyCheckboxGroup=Qe,h.SyCol=Hn,h.SyCollapse=Qt,h.SyCollapseItem=Jt,h.SyColorPicker=Gt,h.SyConfigProvider=pn,h.SyContainer=sn,h.SyDatePicker=Je,h.SyDateTimePicker=un,h.SyDescriptions=Sn,h.SyDescriptionsItem=gn,h.SyDialog=Cn,h.SyDivider=An,h.SyDrawer=Ze,h.SyDropdown=Bn,h.SyDropdownItem=_n,h.SyDropdownMenu=Vn,h.SyEmpty=Xe,h.SyFooter=cn,h.SyForm=ve,h.SyFormItem=et,h.SyHeader=rn,h.SyIcon=me,h.SyImage=En,h.SyInput=Le,h.SyInputNumber=tt,h.SyLink=qn,h.SyLoading=Wn,h.SyLoadingDirective=xe,h.SyMain=an,h.SyMenu=Xn,h.SyMenuItem=eo,h.SyMenuItemGroup=to,h.SyMessage=ue,h.SyMessageBox=ot,h.SyNotification=st,h.SyOption=it,h.SyPagination=rt,h.SyPopconfirm=so,h.SyPopover=ao,h.SyProForm=ft,h.SyProTable=Us,h.SyProgress=io,h.SyRadio=De,h.SyRadioButton=at,h.SyRadioGroup=lt,h.SyRow=On,h.SyScrollbar=ho,h.SySelect=ct,h.SySelectV2=Co,h.SySkeleton=ko,h.SySkeletonItem=No,h.SySlider=Po,h.SySpace=Vo,h.SyStep=Io,h.SySteps=To,h.SySubMenu=vn,h.SySwitch=_e,h.SyTabPane=zo,h.SyTable=ze,h.SyTableColumn=ae,h.SyTabs=Do,h.SyTag=Re,h.SyText=Uo,h.SyTimePicker=dt,h.SyTimeSelect=pt,h.SyTooltip=fe,h.SyTree=Yo,h.SyTreeSelect=Jo,h.SyUpload=Xo,h.useProFormSchema=os,h.useProTableColumns=Hs,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
7
+ </div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(tt),{data:i.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...p[1]||(p[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(ce),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:N})=>{var k,E;return[e.createTextVNode(e.toDisplayString((E=(k=N.label)!=null?k:N.prop)!=null?E:"—"),1)]}),_:1}),e.createVNode(e.unref(ce),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[e.createVNode(e.unref(Le),{"model-value":N.isShow!==!1,"onUpdate:modelValue":k=>{N.isShow=k}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(ce),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[typeof N.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Le),{key:0,modelValue:N.sortable,"onUpdate:modelValue":k=>N.sortable=k},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",qs,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),st=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const c=o.context.flatColumns,i=e.ref();function a(){var n,t;(t=(n=i.value)==null?void 0:n.open)==null||t.call(n)}return s({open:a}),(n,t)=>(e.openBlock(),e.createBlock(js,{ref_key:"innerRef",ref:i,columns:e.unref(c)},null,8,["columns"]))}}),Ks={key:0,class:"sy-pro-table__pagination"},rt=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,c=s.context.pageable,i=s.context.handleSizeChange,a=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(c).total>0?(e.openBlock(),e.createElementBlock("div",Ks,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(Nt),{"current-page":e.unref(c).pageNum,"onUpdate:currentPage":t[0]||(t[0]=l=>e.unref(c).pageNum=l),"page-size":e.unref(c).pageSize,"onUpdate:pageSize":t[1]||(t[1]=l=>e.unref(c).pageSize=l),total:e.unref(c).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(i),onCurrentChange:e.unref(a)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),at=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,c=r.context.props,i=r.context.searchParam,a=r.context.searchSchema,n=r.context.search,t=r.context.reset,l=e.ref();return s({validate:p=>{var N,k;return(k=(N=l.value)==null?void 0:N.validate)==null?void 0:k.call(N,p)},resetFields:()=>{var p,N;return(N=(p=l.value)==null?void 0:p.resetFields)==null?void 0:N.call(p)},clearValidate:p=>{var N,k;return(k=(N=l.value)==null?void 0:N.clearValidate)==null?void 0:k.call(N,p)},formRef:l}),(p,N)=>(e.openBlock(),e.createBlock(e.unref(It),{ref_key:"innerFormRef",ref:l,model:e.unref(i),schema:e.unref(a),cols:o.cols,"label-width":e.unref(c).searchLabelWidth,"label-position":e.unref(c).searchLabelPosition,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(n),onReset:e.unref(t)},null,8,["model","schema","cols","label-width","label-position","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),Gs=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),c=e.inject("proTableSlots",{}),i=e.computed(()=>{const C=s.column.isShow;return C===void 0?!0:e.unref(C)}),a=e.computed(()=>{var g,y,m,h;const C=s.column.enum;return typeof C=="function"?(y=r.value.get((g=s.column.prop)!=null?g:""))!=null?y:[]:C?e.unref(C):(h=r.value.get((m=s.column.prop)!=null?m:""))!=null?h:[]});function n(C){var _,z;const{fieldNames:g}=s.column,y=(_=g==null?void 0:g.label)!=null?_:"label",m=(z=g==null?void 0:g.value)!=null?z:"value",h=a.value.find(B=>B[m]===C);return h?h[y]:String(C!=null?C:"")}function t(C){var h;const{fieldNames:g}=s.column,y=(h=g==null?void 0:g.value)!=null?h:"value",m=a.value.find(_=>_[y]===C);return(m==null?void 0:m.tagType)||void 0}function l(C){return C.split(".").reduce((y,m,h)=>h===0?y+m:y+m.charAt(0).toUpperCase()+m.slice(1),"")}function p(C){var z;const{column:g}=s;if(g.render)return g.render(C);if(g.type==="expand"){const B="expand";return c[B]?c[B](C):null}const y=(z=g.prop)!=null?z:"",m=C.row[y],h=l(y);if(c[h])return c[h](C);if(g.isFilterEnum!==!1&&a.value.length>0){if(g.tag){const B=t(m);return e.h(Fe,B?{type:B}:{},()=>n(m))}return e.h("span",{},n(m))}return g.tag?e.h(Fe,{},()=>String(m!=null?m:"")):e.h("span",{},String(m!=null?m:""))}function N(C){var m,h;const{column:g}=s;if(g.headerRender)return g.headerRender(C);const y=`${l((m=g.prop)!=null?m:"")}Header`;return c[y]?c[y](C):(h=g.label)!=null?h:""}const k=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>c.expand?c.expand(C.scope):null}}),E=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>N(C.scope)}}),L=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>p(C.scope)}});return(C,g)=>{var m;const y=e.resolveComponent("ProTableColumn",!0);return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(m=o.column.children)!=null&&m.length?(e.openBlock(),e.createBlock(e.unref(ce),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,h=>{var _;return e.openBlock(),e.createBlock(y,{key:(_=h.prop)!=null?_:h.label,column:h},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(ce),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(ce),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(h=>[e.createVNode(e.unref(k),{scope:h},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(ce),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(h=>[e.createVNode(e.unref(et),{modelValue:h.row.__radioSelected,"onUpdate:modelValue":_=>h.row.__radioSelected=_,value:!0,onChange:()=>C.$emit("radioChange",h.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(ce),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(Fe),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(ye),null,{default:e.withCtx(()=>[e.createVNode(e.unref(v.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(ce),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(h=>[e.createVNode(e.unref(E),{scope:h},null,8,["scope"])]),default:e.withCtx(h=>[e.createVNode(e.unref(L),{scope:h},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),Ys={class:"sy-pro-table__table"},Ws={class:"sy-pro-table__empty"},lt=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},tableMaxHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.tableAttrs,i=e.computed(()=>s.tableHeight),a=e.computed(()=>s.tableMaxHeight),n=s.context.tableRef,t=s.context.loading,l=s.context.tableData,p=s.context.flatColumns,N=s.context.selectionChange,k=s.context.onSortChange,E=s.context.onRadioChange;function L(g){n.value=g}function C(){var m;if(!r.columns.some(h=>h.type==="sort")||!n.value)return;const y=(m=n.value.$el)==null?void 0:m.querySelector("tbody");y&&Ue.create(y,{handle:".move",animation:150,onEnd({newIndex:h,oldIndex:_}){var P;if(h===_)return;const z=l.value,B=z.splice(_,1)[0];z.splice(h,0,B),(P=s.onDragSort)==null||P.call(s,{newIndex:h,oldIndex:_})}})}return e.onMounted(()=>{e.nextTick(()=>C())}),(g,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",Ys,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(tt),e.mergeProps(e.unref(c),{ref:L,height:i.value,"max-height":a.value,data:e.unref(l),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(N),onSortChange:e.unref(k)}),{append:e.withCtx(()=>[e.renderSlot(g.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(g.$slots,"empty",{},()=>[e.createElementVNode("div",Ws,[e.createVNode(e.unref(ut),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(g.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),m=>{var h,_;return e.openBlock(),e.createBlock(Gs,{key:(_=(h=m.prop)!=null?h:m.label)!=null?_:m.type,column:m,onRadioChange:e.unref(E)},null,8,["column","onRadioChange"])}),128))]),_:3},16,["height","max-height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(u.AdapterLoadingDirective),e.unref(t)]])])],2112))}}),Qs={key:0,class:"sy-pro-table__search"},Js={class:"sy-pro-table__main"},Zs={key:0,class:"sy-pro-table__header"},Xs={class:"sy-pro-table__header-left"},vs={class:"sy-pro-table__header-right"},er=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var $;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,a=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,l=s.context.getTableList,p=s.context.openColSetting,N=s.context.toggleSearch,k=s.context.showToolBtn,E=s.context.formRef,L=s.context.colSettingRef,C=e.ref(),g=e.ref(void 0),y=e.ref(void 0),m=($=e.inject(b.SY_UI_CONFIG_KEY,{}).proTable)!=null?$:{};function h(){var Z,ee;const F=C.value;if(!F)return;const A=F.querySelector(".sy-pro-table__table"),I=F.querySelector(".sy-pro-table__pagination");if(!A)return;const V=A.getBoundingClientRect().top,K=I?I.getBoundingClientRect().height:0,H=(ee=(Z=r.heightOffset)!=null?Z:m.heightOffset)!=null?ee:0,X=Math.floor(window.innerHeight-V-K-H);return X>80?X:void 0}function _(){if(r.height!==void 0){g.value=r.height,y.value=void 0;return}if(r.autoHeight===!0){g.value=h(),y.value=void 0;return}if(r.maxHeight!==void 0){g.value=void 0,y.value=r.maxHeight;return}g.value=void 0,y.value=h()}e.watch(c,()=>e.nextTick(_));let z=null;e.onMounted(()=>{e.nextTick(_),window.addEventListener("resize",_),C.value&&(z=new ResizeObserver(_),z.observe(C.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",_),z==null||z.disconnect()});function B(F){E.value=F}function P(F){L.value=F}return(F,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:C,class:"sy-pro-table sy-pro-table--classic"},[!e.unref(r).tableOnly&&e.unref(r).showSearch&&e.unref(c)&&e.unref(i).length>0?(e.openBlock(),e.createElementBlock("div",Qs,[e.createVNode(at,{ref:B,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Js,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",Zs,[e.createElementVNode("div",Xs,[e.createCommentVNode(" 业务操作按钮(新增/导出等),始终可见 "),e.renderSlot(F.$slots,"busActions"),e.createCommentVNode(" 批量操作,仅在有选中行时追加显示 "),e.unref(t)?e.renderSlot(F.$slots,"batchActions",{key:0,selectedList:e.unref(a),selectedListIds:e.unref(n),isSelected:e.unref(t)}):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",vs,[e.createCommentVNode(" 用户自定义工具按钮(追加在系统按钮之前) "),e.renderSlot(F.$slots,"toolButton"),e.createCommentVNode(" 系统工具按钮,始终渲染 "),e.unref(k)("refresh")?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Refresh),circle:"",onClick:e.unref(l)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(k)("setting")?(e.openBlock(),e.createBlock(e.unref(pe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Operation),circle:"",onClick:e.unref(p)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(k)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(pe),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Search),circle:"",onClick:e.unref(N)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])),e.createVNode(lt,{context:o.context,"table-height":g.value,"table-max-height":y.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(F.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(F.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(F.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(rt,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(F.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(st,{ref:P,context:o.context},null,8,["context"])],512))}}),$t=e.defineComponent({__name:"CustomFilterChip",props:{column:{},model:{},modelValue:{},width:{}},emits:["search","remove","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),a=e.computed(()=>{var p,N,k,E,L,C,g;const t=r.column,l=(()=>{var y,m,h,_,z,B,P;if(((y=t.search)==null?void 0:y.options)!==void 0){const $=t.search.options;return Array.isArray($)?$:(m=e.unref($))!=null?m:void 0}if(!(!t.enum||(_=(h=t.search)==null?void 0:h.component)!=null&&_.includes("tree")))return typeof t.enum=="function"?(B=i.value.get((z=t.prop)!=null?z:""))!=null?B:void 0:Array.isArray(t.enum)?t.enum:(P=e.unref(t.enum))!=null?P:void 0})();return{field:(k=(N=(p=t.search)==null?void 0:p.key)!=null?N:t.prop)!=null?k:"",label:t.label,component:(E=t.search)==null?void 0:E.component,props:J(T({},(L=t.search)==null?void 0:L.props),{clearable:!1}),options:l,fieldNames:t.fieldNames,defaultValue:(C=t.search)==null?void 0:C.defaultValue,render:(g=t.search)==null?void 0:g.render}});function n(t){c("update:modelValue",t)}return(t,l)=>{var p,N,k;return e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__custom-filter-chip",onKeyup:l[1]||(l[1]=e.withKeys(E=>c("search"),["enter"]))},[e.createElementVNode("div",{class:"sy-pro-table__custom-filter-chip-control",style:e.normalizeStyle({width:`${(k=(N=(p=r.column.search)==null?void 0:p.chipWidth)!=null?N:r.width)!=null?k:100}px`})},[e.createVNode(ot,{schema:a.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":n},null,8,["schema","model","model-value"])],4),e.createElementVNode("span",{class:"sy-pro-table__custom-filter-chip-close",onClick:l[0]||(l[0]=e.withModifiers(E=>c("remove"),["stop"]))},[e.createVNode(e.unref(ye),null,{default:e.withCtx(()=>[e.createVNode(e.unref(v.Close))]),_:1})])],32)}}}),Mt=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),a=e.computed(()=>{var N;const l=(N=r.column.search)==null?void 0:N.quick,p=typeof l=="object"&&(l==null?void 0:l.width)||220;return{width:typeof p=="number"?`${p}px`:p}}),n=e.computed(()=>{var N,k,E,L,C,g,y;const l=r.column,p=(()=>{var m,h,_,z,B,P,$;if(((m=l.search)==null?void 0:m.options)!==void 0){const F=l.search.options;return Array.isArray(F)?F:(h=e.unref(F))!=null?h:void 0}if(!(!l.enum||(z=(_=l.search)==null?void 0:_.component)!=null&&z.includes("tree")))return typeof l.enum=="function"?(P=i.value.get((B=l.prop)!=null?B:""))!=null?P:void 0:Array.isArray(l.enum)?l.enum:($=e.unref(l.enum))!=null?$:void 0})();return{field:(E=(k=(N=l.search)==null?void 0:N.key)!=null?k:l.prop)!=null?E:"",label:l.label,component:(L=l.search)==null?void 0:L.component,props:(C=l.search)==null?void 0:C.props,options:p,fieldNames:l.fieldNames,defaultValue:(g=l.search)==null?void 0:g.defaultValue,render:(y=l.search)==null?void 0:y.render}});function t(l){c("update:modelValue",l)}return(l,p)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(a.value),onKeyup:p[0]||(p[0]=e.withKeys(N=>c("search"),["enter"]))},[e.createVNode(ot,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),tr={class:"sy-pro-table__custom-search"},nr=e.defineComponent({__name:"CustomSearchBar",props:{quickSearchColumns:{},searchParam:{},showAdvanced:{type:Boolean},filterActive:{type:Boolean}},emits:["search","toggleAdvanced","updateParam"],setup(o,{emit:s}){const r=s;function c(){r("search")}return(i,a)=>(e.openBlock(),e.createElementBlock("div",tr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.quickSearchColumns,n=>{var t,l,p,N,k;return e.openBlock(),e.createBlock(Mt,{key:(l=(t=n.search)==null?void 0:t.key)!=null?l:n.prop,"model-value":o.searchParam[(k=(N=(p=n.search)==null?void 0:p.key)!=null?N:n.prop)!=null?k:""],column:n,model:o.searchParam,"onUpdate:modelValue":E=>{var L,C,g;return r("updateParam",(g=(C=(L=n.search)==null?void 0:L.key)!=null?C:n.prop)!=null?g:"",E)},onSearch:c},null,8,["model-value","column","model","onUpdate:modelValue"])}),128)),e.createVNode(e.unref(pe),{content:"查询",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{class:"sy-pro-table__custom-search-btn",icon:e.unref(v.Search),onClick:c},null,8,["icon"])]),_:1}),o.showAdvanced?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,content:"高级筛选",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{class:e.normalizeClass(["sy-pro-table__custom-filter-btn",{"is-active":o.filterActive}]),icon:e.unref(v.Filter),onClick:a[0]||(a[0]=n=>r("toggleAdvanced"))},null,8,["class","icon"])]),_:1})):e.createCommentVNode("v-if",!0)]))}}),or={class:"sy-pro-table__custom-panel-inner"},sr={class:"sy-pro-table__custom-panel-footer"},rr=e.defineComponent({__name:"CustomSearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""},cols:{default:1}},emits:["close","panelSearch"],setup(o,{emit:s}){const r=o,c=s,i=e.computed(()=>{const C=typeof r.cols=="number"?r.cols:1;return{width:`${Math.max(360,C*280+32)}px`}}),a=r.context.search,n=r.context.reset;function t(){a(),c("panelSearch"),c("close")}function l(){n(),c("close")}const p=r.context.formRef,N=e.ref();function k(C){p.value=C}let E=null;function L(C){var y;const g=C.composedPath();for(const m of g){const h=m;if(h!=null&&h.classList&&(h===N.value||r.excludeSelector&&((y=h.matches)!=null&&y.call(h,r.excludeSelector))||h.classList.contains("el-popper")||h.classList.contains("el-overlay")||h.classList.contains("el-picker__popper")||h.classList.contains("el-select__popper")||h.classList.contains("el-select-dropdown")||h.classList.contains("el-date-picker")||h.classList.contains("el-date-range-picker")))return}c("close")}return e.watch(()=>r.visible,C=>{E==null||E(),E=null,C&&e.nextTick(()=>{document.addEventListener("mousedown",L,!0),E=()=>document.removeEventListener("mousedown",L,!0)})}),e.onBeforeUnmount(()=>E==null?void 0:E()),(C,g)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:N,class:"sy-pro-table__custom-panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",or,[e.createVNode(at,{ref:k,context:o.context,cols:r.cols,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context","cols"]),e.createElementVNode("div",sr,[e.createVNode(e.unref(Q),{onClick:l},{default:e.withCtx(()=>[...g[0]||(g[0]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(Q),{type:"primary",onClick:t},{default:e.withCtx(()=>[...g[1]||(g[1]=[e.createTextVNode("查询",-1)])]),_:1})])])],4),[[e.vShow,o.visible]])]),_:1}))}}),ar={class:"sy-pro-table__main sy-pro-table__main--custom"},lr={key:0,class:"sy-pro-table__header sy-pro-table__header--custom"},cr={class:"sy-pro-table__custom-batch"},ir={class:"sy-pro-table__custom-batch-count"},dr={class:"sy-pro-table__header-left"},fr={class:"sy-pro-table__header-right sy-pro-table__header-right--custom"},mr={class:"sy-pro-table__custom-panel-inner sy-pro-table__chip-overflow-list"},pr=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var Ne;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,a=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,l=s.context.selectedListIds,p=s.context.isSelected,N=s.context.search,k=s.context.toggleSearch,E=s.context.showToolBtn,L=s.context.getTableList,C=s.context.openColSetting,g=s.context.colSettingRef,y=s.context.clearSelection,m=s.context.searchInitParam,h=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),_=e.computed(()=>{const D=new Set(a.value.map(f=>{var x,O,U;return(U=(O=(x=f.search)==null?void 0:x.key)!=null?O:f.prop)!=null?U:""}));return i.value.filter(f=>{var x,O,U;return!D.has((U=(O=(x=f.search)==null?void 0:x.key)!=null?O:f.prop)!=null?U:"")})}),z=e.ref(new Set),B=e.computed(()=>_.value.map(D=>{var O,U,Y;const f=(Y=(U=(O=D.search)==null?void 0:O.key)!=null?U:D.prop)!=null?Y:"";if(!z.value.has(f))return null;const x=n.value[f];return x==null||x===""||Array.isArray(x)&&x.length===0?null:{key:f,column:D}}).filter(D=>D!==null)),P=e.computed(()=>{var f;const D=(f=r.filterChipMax)!=null?f:3;return B.value.slice(0,D)}),$=e.computed(()=>{var f;const D=(f=r.filterChipMax)!=null?f:3;return B.value.slice(D)}),F=e.ref(!1),A=e.ref(),I=e.ref(null),V=e.ref(null),K=e.computed(()=>{const D=V.value,f=S.value;if(!D||!f)return{left:"16px"};const x=f.getBoundingClientRect(),O=D.getBoundingClientRect();return{left:`${Math.round(O.left-x.left)}px`}});function H(){F.value=!F.value}e.watch($,D=>{D.length===0&&(F.value=!1)});function X(D){var O,U,Y;const f=D.composedPath(),x=(U=(O=I.value)==null?void 0:O.$el)!=null?U:I.value;for(const W of f){const j=W;if(j!=null&&j.classList&&(j===A.value||(Y=x==null?void 0:x.contains)!=null&&Y.call(x,j)||j===x||j.classList.contains("el-popper")||j.classList.contains("el-overlay")||j.classList.contains("el-picker__popper")||j.classList.contains("el-select__popper")||j.classList.contains("el-select-dropdown")||j.classList.contains("el-date-picker")||j.classList.contains("el-date-range-picker")))return}F.value=!1}let Z=null;e.watch(F,D=>{Z==null||Z(),Z=null,D&&e.nextTick(()=>{document.addEventListener("mousedown",X,!0),Z=()=>document.removeEventListener("mousedown",X,!0)})}),e.onBeforeUnmount(()=>Z==null?void 0:Z());function ee(){z.value=new Set(_.value.map(D=>{var f,x,O;return(O=(x=(f=D.search)==null?void 0:f.key)!=null?x:D.prop)!=null?O:""}).filter(D=>{const f=n.value[D];return f!=null&&f!==""&&!(Array.isArray(f)&&f.length===0)}))}function te(D,f){n.value[D]=f}function ie(D){var f;n.value[D]=(f=m[D])!=null?f:void 0,z.value.delete(D),N()}function de(){_.value.forEach(D=>{var x,O,U,Y;const f=(U=(O=(x=D.search)==null?void 0:x.key)!=null?O:D.prop)!=null?U:"";n.value[f]=(Y=m[f])!=null?Y:void 0}),z.value.clear(),N()}const S=e.ref(),M=e.ref(void 0),R=e.ref(void 0),q=(Ne=e.inject(b.SY_UI_CONFIG_KEY,{}).proTable)!=null?Ne:{};function G(){var j,le;const D=S.value;if(!D)return;const f=D.querySelector(".sy-pro-table__table"),x=D.querySelector(".sy-pro-table__pagination");if(!f)return;const O=f.getBoundingClientRect().top,U=x?x.getBoundingClientRect().height:0,Y=(le=(j=r.heightOffset)!=null?j:q.heightOffset)!=null?le:0,W=Math.floor(window.innerHeight-O-U-Y);return W>80?W:void 0}function ne(){if(r.height!==void 0){M.value=r.height,R.value=void 0;return}if(r.autoHeight===!0){M.value=G(),R.value=void 0;return}if(r.maxHeight!==void 0){M.value=void 0,R.value=r.maxHeight;return}M.value=void 0,R.value=G()}let oe=null;e.onMounted(()=>{e.nextTick(ne),window.addEventListener("resize",ne),S.value&&(oe=new ResizeObserver(ne),oe.observe(S.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",ne),oe==null||oe.disconnect()});function ae(D){g.value=D}function ze(){c.value&&k()}return(D,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:S,class:"sy-pro-table sy-pro-table--custom"},[e.createElementVNode("div",ar,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",lr,[e.createCommentVNode(" 批量操作模式:选中行时替换整个 header "),e.unref(p)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",cr,[e.createElementVNode("span",ir,"已选 "+e.toDisplayString(e.unref(t).length)+" 条数据",1),f[1]||(f[1]=e.createElementVNode("span",{class:"sy-pro-table__custom-batch-divider"},null,-1)),e.renderSlot(D.$slots,"batchActions",{selectedList:e.unref(t),selectedListIds:e.unref(l),isSelected:e.unref(p)})]),e.createVNode(e.unref(Q),{class:"sy-pro-table__custom-batch-close",icon:e.unref(v.Close),circle:"",onClick:e.unref(y)},null,8,["icon","onClick"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 正常模式 "),e.createCommentVNode(" 左侧:快速查询 + 高级筛选 + 已应用筛选 tags "),e.createElementVNode("div",dr,[e.createVNode(nr,{"quick-search-columns":e.unref(a),"search-param":e.unref(n),"show-advanced":e.unref(r).showSearch&&e.unref(E)("search")&&e.unref(i).length>0,"filter-active":h.value||B.value.length>0,onSearch:e.unref(N),onToggleAdvanced:e.unref(k),onUpdateParam:f[0]||(f[0]=(x,O)=>e.unref(n)[x]=O)},null,8,["quick-search-columns","search-param","show-advanced","filter-active","onSearch","onToggleAdvanced"]),e.createCommentVNode(" chips 行整体包一个 div,用于精确计算 overflow panel 的对齐 left "),B.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chipsRowRef",ref:V,class:"sy-pro-table__chip-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,x=>(e.openBlock(),e.createBlock($t,{key:x.key,column:x.column,model:e.unref(n),"model-value":e.unref(n)[x.key],width:e.unref(r).filterChipWidth,"onUpdate:modelValue":O=>te(x.key,O),onSearch:e.unref(N),onRemove:O=>ie(x.key)},null,8,["column","model","model-value","width","onUpdate:modelValue","onSearch","onRemove"]))),128)),e.createCommentVNode(" 超出 filterChipMax 时的折叠入口 "),$.value.length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,ref_key:"overflowBtnRef",ref:I,class:"sy-pro-table__custom-filter-more",size:"small",type:"primary",plain:"",onClick:H},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString($.value.length),1)]),_:1},512)):e.createCommentVNode("v-if",!0),$.value.length===0?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,link:"",size:"small",class:"sy-pro-table__custom-filter-clear",onClick:de},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("清空",-1)])]),_:1})):e.createCommentVNode("v-if",!0)],512)):e.createCommentVNode("v-if",!0)]),e.createCommentVNode(" 右侧:业务操作按钮 + 工具按钮 + 刷新 + 列设置 "),e.createElementVNode("div",fr,[e.renderSlot(D.$slots,"busActions"),e.renderSlot(D.$slots,"toolButton"),e.unref(E)("refresh")?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Refresh),circle:"",onClick:e.unref(L)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(E)("setting")?(e.openBlock(),e.createBlock(e.unref(pe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q),{icon:e.unref(v.Operation),circle:"",onClick:e.unref(C)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])],64))])),e.createVNode(lt,{context:o.context,"table-height":M.value,"table-max-height":R.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(D.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(D.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(D.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(rt,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(D.$slots,"pagination")]),_:3},8,["context"])]),e.createCommentVNode(" 两个浮层面板放在最外层容器下,避免被 __main 的 overflow:hidden 裁剪 "),e.createVNode(rr,{context:o.context,visible:h.value,cols:e.unref(r).panelCols,"exclude-selector":".sy-pro-table__custom-filter-btn",onClose:ze,onPanelSearch:ee},null,8,["context","visible","cols"]),e.createCommentVNode(" overflow chip 浮层:与第一个 chip 左对齐 "),e.createVNode(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"overflowPanelRef",ref:A,class:"sy-pro-table__custom-panel",style:e.normalizeStyle(K.value)},[e.createElementVNode("div",mr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,x=>(e.openBlock(),e.createBlock($t,{key:x.key,column:x.column,model:e.unref(n),"model-value":e.unref(n)[x.key],width:e.unref(r).filterChipWidth,"onUpdate:modelValue":O=>te(x.key,O),onSearch:e.unref(N),onRemove:O=>ie(x.key)},null,8,["column","model","model-value","width","onUpdate:modelValue","onSearch","onRemove"]))),128)),e.createVNode(e.unref(Q),{link:"",size:"small",class:"sy-pro-table__custom-filter-clear",onClick:de},{default:e.withCtx(()=>[...f[3]||(f[3]=[e.createTextVNode("清空全部",-1)])]),_:1})])],4),[[e.vShow,F.value]])]),_:1}),e.createVNode(st,{ref:ae,context:o.context},null,8,["context"])],512))}}),ur={class:"sy-pro-table__unify-panel-inner"},hr={class:"sy-pro-table__unify-panel-footer"},yr=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""},cols:{default:1}},emits:["close"],setup(o,{emit:s}){const r=o,c=s,i=e.computed(()=>{const C=typeof r.cols=="number"?r.cols:1;return{width:`${Math.max(360,C*280+32)}px`}}),a=r.context.search,n=r.context.reset;function t(){a(),c("close")}function l(){n(),c("close")}const p=r.context.formRef,N=e.ref();function k(C){p.value=C}let E=null;function L(C){var y;const g=C.target;g&&((y=N.value)!=null&&y.contains(g)||r.excludeSelector&&g.closest(r.excludeSelector)||g.closest(".el-popper")||g.closest(".el-overlay")||c("close"))}return e.watch(()=>r.visible,C=>{E==null||E(),E=null,C&&e.nextTick(()=>{document.addEventListener("mousedown",L,!0),E=()=>document.removeEventListener("mousedown",L,!0)})}),e.onBeforeUnmount(()=>E==null?void 0:E()),(C,g)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:N,class:"sy-pro-table__unify-panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",ur,[e.createVNode(at,{ref:k,context:o.context,cols:r.cols,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context","cols"]),e.createElementVNode("div",hr,[e.createVNode(e.unref(Q),{onClick:l},{default:e.withCtx(()=>[...g[0]||(g[0]=[e.createTextVNode("重置",-1)])]),_:1}),e.createVNode(e.unref(Q),{type:"primary",onClick:t},{default:e.withCtx(()=>[...g[1]||(g[1]=[e.createTextVNode("查询",-1)])]),_:1})])])],4),[[e.vShow,o.visible]])]),_:1}))}}),Sr={class:"sy-pro-table__main sy-pro-table__main--unify"},gr={key:0,class:"sy-pro-table__header sy-pro-table__header--unify"},br={class:"sy-pro-table__header-left"},Cr={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},wr=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var F;const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,a=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,l=s.context.selectedListIds,p=s.context.isSelected,N=s.context.search,k=s.context.toggleSearch,E=s.context.showToolBtn,L=s.context.colSettingRef,C=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),g=e.ref(),y=e.ref(void 0),m=e.ref(void 0),h=(F=e.inject(b.SY_UI_CONFIG_KEY,{}).proTable)!=null?F:{};function _(){var ee,te;const A=g.value;if(!A)return;const I=A.querySelector(".sy-pro-table__table"),V=A.querySelector(".sy-pro-table__pagination");if(!I)return;const K=I.getBoundingClientRect().top,H=V?V.getBoundingClientRect().height:0,X=(te=(ee=r.heightOffset)!=null?ee:h.heightOffset)!=null?te:0,Z=Math.floor(window.innerHeight-K-H-X);return Z>80?Z:void 0}function z(){if(r.height!==void 0){y.value=r.height,m.value=void 0;return}if(r.autoHeight===!0){y.value=_(),m.value=void 0;return}if(r.maxHeight!==void 0){y.value=void 0,m.value=r.maxHeight;return}y.value=void 0,m.value=_()}let B=null;e.onMounted(()=>{e.nextTick(z),window.addEventListener("resize",z),g.value&&(B=new ResizeObserver(z),B.observe(g.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",z),B==null||B.disconnect()});function P(A){L.value=A}function $(){c.value&&k()}return(A,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:g,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",Sr,[e.unref(r).tableOnly?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",gr,[e.createElementVNode("div",br,[e.createCommentVNode(" 业务操作按钮(新增/导出等),始终可见 "),e.renderSlot(A.$slots,"busActions"),e.createCommentVNode(" 批量操作,仅在有选中行时追加显示 "),e.unref(p)?e.renderSlot(A.$slots,"batchActions",{key:0,selectedList:e.unref(t),selectedListIds:e.unref(l),isSelected:e.unref(p)}):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",Cr,[e.createCommentVNode(" 快速搜索始终渲染 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),V=>{var K,H,X,Z,ee;return e.openBlock(),e.createBlock(Mt,{key:(H=(K=V.search)==null?void 0:K.key)!=null?H:V.prop,modelValue:e.unref(n)[(ee=(Z=(X=V.search)==null?void 0:X.key)!=null?Z:V.prop)!=null?ee:""],"onUpdate:modelValue":te=>{var ie,de,S;return e.unref(n)[(S=(de=(ie=V.search)==null?void 0:ie.key)!=null?de:V.prop)!=null?S:""]=te},column:V,model:e.unref(n),onSearch:e.unref(N)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(a).length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:0,type:"primary",onClick:e.unref(N)},{default:e.withCtx(()=>[...I[0]||(I[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(E)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(Q),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(k)},{default:e.withCtx(()=>[...I[1]||(I[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 工具按钮区,用户可通过 #toolButton 追加自定义工具 "),e.renderSlot(A.$slots,"toolButton")])])),e.createVNode(lt,{context:o.context,"table-height":y.value,"table-max-height":m.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(A.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(A.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(A.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(rt,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(A.$slots,"pagination")]),_:3},8,["context"])]),e.createCommentVNode(" 面板放在最外层容器下,避免被 __main 的 overflow:hidden 裁剪 "),e.createVNode(yr,{context:o.context,visible:C.value,cols:e.unref(r).panelCols,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:$},null,8,["context","visible","cols"]),e.createVNode(st,{ref:P,context:o.context},null,8,["context"])],512))}}),Ar=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{},border:{type:Boolean},stripe:{type:Boolean},showSearch:{type:Boolean,default:!0},searchCols:{},panelCols:{},filterChipWidth:{},filterChipMax:{},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{},pageSize:{},pageLayout:{},type:{},height:{},maxHeight:{},autoHeight:{type:Boolean},heightOffset:{},tableOnly:{type:Boolean,default:!1},searchLabelWidth:{},searchLabelPosition:{}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const c=o,i=r,a=e.useSlots(),n=e.useAttrs(),t=Hs(c,i,a,n);function l(p){i("dragSort",p)}return s({tableRef:t.tableRef,formRef:t.formRef,tableData:t.tableData,enumMap:t.enumMap,pageable:t.pageable,searchParam:t.searchParam,searchInitParam:t.searchInitParam,isSelected:t.isSelected,selectedList:t.selectedList,selectedListIds:t.selectedListIds,radio:t.radio,getTableList:t.getTableList,search:t.search,reset:t.reset,clearSelection:t.clearSelection,clearRadio:t.clearRadio,handleSizeChange:t.handleSizeChange,handleCurrentChange:t.handleCurrentChange}),(p,N)=>e.unref(t).props.type==="classic"?(e.openBlock(),e.createBlock(er,{key:0,context:e.unref(t),"on-drag-sort":l},e.createSlots({batchActions:e.withCtx(k=>[e.unref(a).batchActions?e.renderSlot(p.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},k))):e.renderSlot(p.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},k)))]),default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[e.unref(a).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"busActions")]),key:"0"}:void 0,e.unref(a).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"toolButton")]),key:"1"}:void 0,e.unref(a).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"append")]),key:"2"}:void 0,e.unref(a).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"empty")]),key:"3"}:void 0,e.unref(a).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"])):e.unref(t).props.type==="unify"?(e.openBlock(),e.createBlock(wr,{key:1,context:e.unref(t),"on-drag-sort":l},e.createSlots({batchActions:e.withCtx(k=>[e.unref(a).batchActions?e.renderSlot(p.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},k))):e.renderSlot(p.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},k)))]),default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[e.unref(a).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"busActions")]),key:"0"}:void 0,e.unref(a).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"toolButton")]),key:"1"}:void 0,e.unref(a).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"append")]),key:"2"}:void 0,e.unref(a).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"empty")]),key:"3"}:void 0,e.unref(a).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(pr,{key:2,context:e.unref(t),"on-drag-sort":l},e.createSlots({batchActions:e.withCtx(k=>[e.unref(a).batchActions?e.renderSlot(p.$slots,"batchActions",e.normalizeProps(e.mergeProps({key:0},k))):e.renderSlot(p.$slots,"tableHeader",e.normalizeProps(e.mergeProps({key:1},k)))]),default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[e.unref(a).busActions?{name:"busActions",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"busActions")]),key:"0"}:void 0,e.unref(a).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"toolButton")]),key:"1"}:void 0,e.unref(a).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"append")]),key:"2"}:void 0,e.unref(a).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"empty")]),key:"3"}:void 0,e.unref(a).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"pagination")]),key:"4"}:void 0]),1032,["context"]))}});function kr(o){const s=e.computed(()=>e.unref(o));function r(){e.isRef(o)&&(o.value=[...o.value])}function c(B,P){var $;for(const F of B)if(P(F)===!0||($=F.children)!=null&&$.length&&c(F.children,P))return!0;return!1}function i(B){let P;return c(e.unref(o),$=>{if($.prop===B)return P=$,!0}),P}function a(B){return!!i(B)}function n(B,P){const $=i(B);return $?(Object.assign($,P),r(),!0):!1}function t(B){return n(B,{isShow:!0})}function l(B){return n(B,{isShow:!1})}function p(B,P){return n(B,{enum:P})}function N(B,P){return n(B,{width:P})}function k(B,P){return n(B,{label:P})}function E(B){let P;return c(e.unref(o),$=>{var F;if(((F=$.search)==null?void 0:F.key)===B||$.prop===B)return P=$,!0}),P}function L(B){var P;return(P=E(B))==null?void 0:P.search}function C(B){return!!L(B)}function g(B){var $;const P=E(B);if(P)return($=P.search)!=null||(P.search={}),P.search}function y(B,P){const $=g(B);return $?(Object.assign($,P),r(),!0):!1}function m(B,P){var F;const $=g(B);return $?($.props=T(T({},(F=$.props)!=null?F:{}),P),r(),!0):!1}function h(B,P){const $=g(B);return $?($.options=P,r(),!0):!1}function _(B){return y(B,{hidden:!1})}function z(B){return y(B,{hidden:!0})}return{columns:s,hasColumn:a,getColumn:i,setColumn:n,showColumn:t,hideColumn:l,setColumnEnum:p,setColumnWidth:N,setColumnLabel:k,search:{has:C,get:L,set:y,setProps:m,setOptions:h,show:_,hide:z}}}const Nr=b.withInstall(Ar);Object.defineProperty(d,"SY_UI_CONFIG_KEY",{enumerable:!0,get:()=>b.SY_UI_CONFIG_KEY}),d.SY_SVG_ICON_REGISTRY_KEY=De,d.SyAlert=tn,d.SyAside=Vn,d.SyAutocomplete=fe,d.SyBacktop=on,d.SyButton=Q,d.SyCard=an,d.SyCascader=it,d.SyCheckbox=dt,d.SyCheckboxButton=mn,d.SyCheckboxGroup=ft,d.SyCol=Co,d.SyCollapse=Sn,d.SyCollapseItem=gn,d.SyColorPicker=un,d.SyConfigProvider=Rn,d.SyContainer=Pn,d.SyDatePicker=mt,d.SyDateTimePicker=Mn,d.SyDescriptions=Dn,d.SyDescriptionsItem=zn,d.SyDialog=Un,d.SyDivider=qn,d.SyDrawer=pt,d.SyDropdown=Wn,d.SyDropdownItem=Jn,d.SyDropdownMenu=Qn,d.SyEmpty=ut,d.SyFeedback=co,d.SyFooter=Tn,d.SyForm=Ct,d.SyFormItem=wt,d.SyHeader=Bn,d.SyIcon=ye,d.SyImage=uo,d.SyInput=Xe,d.SyInputNumber=At,d.SyLink=Ao,d.SyLoading=Po,d.SyLoadingDirective=Me,d.SyMain=_n,d.SyMenu=Io,d.SyMenuItem=Eo,d.SyMenuItemGroup=$o,d.SyMessage=se,d.SyMessageBox=Te,d.SyNotification=ue,d.SyOption=Vt,d.SyPagination=Nt,d.SyPopconfirm=Fo,d.SyPopover=Oo,d.SyProForm=It,d.SyProTable=Nr,d.SyProgress=Ho,d.SyRadio=et,d.SyRadioButton=Pt,d.SyRadioGroup=xt,d.SyRow=bo,d.SyScrollbar=Yo,d.SySelect=Bt,d.SySelectV2=Xo,d.SySkeleton=ts,d.SySkeletonItem=ns,d.SySlider=ss,d.SySpace=as,d.SyStep=ds,d.SySteps=is,d.SySubMenu=Ro,d.SySvgIcon=$s,d.SySwitch=Le,d.SyTabPane=Ss,d.SyTable=tt,d.SyTableColumn=ce,d.SyTabs=ys,d.SyTag=Fe,d.SyText=Cs,d.SyTimePicker=_t,d.SyTimeSelect=Tt,d.SyTooltip=pe,d.SyTree=Ps,d.SyTreeSelect=Vs,d.SyUpload=Ts,d.alert=Je,d.commonMsgAlert=ro,d.commonMsgConfirm=ao,d.commonMsgError=no,d.commonMsgErrorInfo=lo,d.commonMsgInfo=so,d.commonMsgSuccess=to,d.commonMsgWarn=oo,d.confirm=Ze,d.error=Re,d.errorInfo=We,d.info=Ye,d.installSySvgIcons=Rs,d.message=ht,d.notify=yt,d.notifyError=gt,d.notifyInfo=bt,d.notifySuccess=St,d.notifyWarn=Qe,d.provideSySvgIcons=Is,d.success=Ge,d.useProFormSchema=zs,d.useProTableColumns=kr,d.warn=Ee,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});