ss-component-new 1.1.232 → 1.1.233

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 (80) hide show
  1. package/dist/array-B86yviQY.cjs +7 -0
  2. package/dist/array-cs5V7Y6_.js +3652 -0
  3. package/dist/{cloneDeep-CktvOFQx.cjs → cloneDeep-E9vLiIxh.cjs} +1 -1
  4. package/dist/{cloneDeep-Dof88Xfu.js → cloneDeep-rq9zaa1w.js} +1 -1
  5. package/dist/{index-BhkmOuOr.js → index-2CGOpPmh.js} +1 -1
  6. package/dist/{index-6i92JFtr.cjs → index-8PaOrNDR.cjs} +1 -1
  7. package/dist/index-9lPgpkGK.cjs +1 -0
  8. package/dist/{index-MHmvswgz.cjs → index-B37UvP2y.cjs} +1 -1
  9. package/dist/{index-CiGPupSC.js → index-B4pDkJNU.js} +1 -1
  10. package/dist/{index-Z1xr-ejC.js → index-B6jVaGs4.js} +1 -1
  11. package/dist/{index-DtJQBHbx.js → index-BMUfxqMd.js} +1 -1
  12. package/dist/{index-DAUiPeRo.js → index-BP5hb3Um.js} +7 -7
  13. package/dist/{index-CpL7Ek4u.cjs → index-BZHTZ9C5.cjs} +1 -1
  14. package/dist/{index-BdcivI0n.js → index-BfvkRKjx.js} +9 -9
  15. package/dist/{index-D672QpxY.cjs → index-BnyrJQBl.cjs} +1 -1
  16. package/dist/{index-B27v9fmq.cjs → index-Bv7WoEDc.cjs} +1 -1
  17. package/dist/index-BvEXBAUK.js +683 -0
  18. package/dist/{index-CRzDMz2f.js → index-C3mEVJgU.js} +7 -7
  19. package/dist/{index-CTDvgz6D.js → index-C7itP7K7.js} +4 -4
  20. package/dist/{index-DXmlMdoB.cjs → index-CBl53aQj.cjs} +1 -1
  21. package/dist/{index-BS-dYA6V.cjs → index-CJyVNY4m.cjs} +1 -1
  22. package/dist/{index-CRxtHDjt.cjs → index-CMSII8_z.cjs} +1 -1
  23. package/dist/{index-CD_V87KZ.cjs → index-CO3-_vKi.cjs} +1 -1
  24. package/dist/{index-DJkyWXUQ.cjs → index-CPz8QnpI.cjs} +1 -1
  25. package/dist/{index-BHOafXrq.js → index-CU2d6hKG.js} +80 -80
  26. package/dist/{index-DBVoOuwx.js → index-CYM-4Fce.js} +5 -5
  27. package/dist/{index-B1DkFC1_.cjs → index-CZShjOok.cjs} +1 -1
  28. package/dist/{index-B5ixqHZB.cjs → index-Cs21pF86.cjs} +1 -1
  29. package/dist/{index-DTl2kpLh.js → index-Ct5RVdm9.js} +5 -5
  30. package/dist/{index-DEdZZ43j.js → index-CwAQ5Reh.js} +1 -1
  31. package/dist/{index-CrBfrGyt.cjs → index-CxIxmcBL.cjs} +1 -1
  32. package/dist/{index-Q_XvzZ_1.js → index-CxpDmVeO.js} +3 -3
  33. package/dist/{index-BS5q4oAa.js → index-D4B6hNFI.js} +5 -5
  34. package/dist/{index-Dt26RGyl.cjs → index-DEo9AxUH.cjs} +1 -1
  35. package/dist/{index-BP9e1URk.js → index-DHpBlKW-.js} +7 -7
  36. package/dist/{index-B1ACt1r8.cjs → index-DMpM6R19.cjs} +1 -1
  37. package/dist/{index-1AAX7OWr.js → index-DWNFS9b5.js} +1 -1
  38. package/dist/index-DbB9Xwdc.cjs +1 -0
  39. package/dist/{index-sjkdiuXH.cjs → index-DeFBG6ZK.cjs} +1 -1
  40. package/dist/{index-CFrZVme4.js → index-DeQ9D91f.js} +4 -4
  41. package/dist/{index-Cz4RyK4P.js → index-DoCGNjQ1.js} +8 -8
  42. package/dist/{index-DvpoH0CQ.js → index-DpDTUHhk.js} +7 -7
  43. package/dist/{index-DFsguBq1.cjs → index-DwnZLgLM.cjs} +1 -1
  44. package/dist/{index-CXHQlToy.js → index-DxC6YYBs.js} +4 -4
  45. package/dist/{index-BaGt6aM0.cjs → index-Dyw51iVc.cjs} +3 -3
  46. package/dist/{index-BoSTyMal.cjs → index-Qp0Ei1HO.cjs} +1 -1
  47. package/dist/{index-CP1rxlQW.cjs → index-V-2S_leI.cjs} +1 -1
  48. package/dist/{index-D7bfd1SP.js → index-WFYNryJI.js} +6 -6
  49. package/dist/{index-KAxfvpFC.cjs → index-aCDLjfK8.cjs} +1 -1
  50. package/dist/{index-Cy8P0O9s.cjs → index-h6PQYGka.cjs} +1 -1
  51. package/dist/{index-CewL0ZVN.js → index-p7PKGLT2.js} +4 -4
  52. package/dist/{index-By2WyWxQ.js → index-v6Bd2aVR.js} +3 -3
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-BTS3qCYJ.js → index.vue_vue_type_script_setup_true_lang-4t6RYIAB.js} +4 -4
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-CHN4GMRq.js → index.vue_vue_type_script_setup_true_lang-B8n4k43K.js} +1 -1
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-D3T3IoTp.cjs → index.vue_vue_type_script_setup_true_lang-BUlzxTym.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-Bg0LXFmQ.cjs → index.vue_vue_type_script_setup_true_lang-CpSvslDx.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BdYMXloP.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-B0m5ZMmX.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BmL8jkus.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-D3x_OVy3.js} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Ctz7x3hQ.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Cw3_IH1D.js} +8 -8
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Du4fk0u8.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-D1yEUZXC.cjs} +1 -1
  61. package/dist/{login-DnqNwFzD.js → login-DQPlWdfH.js} +2 -2
  62. package/dist/{login-TVZKm0bS.cjs → login-DwXodp2O.cjs} +1 -1
  63. package/dist/{main-DqSAQJ-I.js → main-BLNFjhWy.js} +6 -6
  64. package/dist/{main-jkBzFk0x.cjs → main-B_QUEIbJ.cjs} +1 -1
  65. package/dist/{menu-DNjiqLiy.js → menu-CAjYtlXf.js} +1 -1
  66. package/dist/{menu-xHRrBcoq.cjs → menu-hvzjfJeP.cjs} +1 -1
  67. package/dist/{modelComp-BZYWE77x.js → modelComp-B2ygsfez.js} +12 -4
  68. package/dist/modelComp-DLKJo5WV.cjs +1 -0
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +7 -7
  72. package/dist/ss-component3.cjs +1 -1
  73. package/dist/ss-component3.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/array-CX_klfYT.cjs +0 -7
  76. package/dist/array-CcAct9KU.js +0 -3587
  77. package/dist/index-BNG8jvzJ.js +0 -662
  78. package/dist/index-SZd8Ei1D.cjs +0 -1
  79. package/dist/index-kkjIPdQ2.cjs +0 -1
  80. package/dist/modelComp-Dq1Brxk6.cjs +0 -1
@@ -0,0 +1,7 @@
1
+ "use strict";const Y=require("./index-DEo9AxUH.cjs"),l=require("vue"),re=require("./index-DwnZLgLM.cjs"),q=require("./index-Dyw51iVc.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),d=require("./cloneDeep-E9vLiIxh.cjs"),se=require("./menu-hvzjfJeP.cjs"),ie=require("./index-aCDLjfK8.cjs"),cl=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),il=require("./modelComp-DLKJo5WV.cjs"),$e=require("./index.vue_vue_type_script_setup_true_lang-CpSvslDx.cjs"),ul=n=>n.match(/\((.*)\)/)[1],pe=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],ue=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],pl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],dl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"}],fl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Date"}],hl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"}],ml=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue}],ne=[{key:"Input",value:pl},{key:"Select",value:dl},{key:"Date",value:fl},{key:"TextArea",value:hl},{key:"Upload",value:ml}],yl=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],oe=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yl},{key:"background",label:"颜色",type:"Color"}],kl={class:"form-content"},gl={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(n,{emit:s}){const a=n,e=s,o=l.ref([]),t=l.ref(!1),i=l.ref([]),f=Y.useFormToTableComp(re.pinia),g=l.ref(!1),k=l.ref(),y=D=>{var b,_,c,u;const I=(_=(b=d.cloneDeep(a.itemData))==null?void 0:b.find(r=>(r==null?void 0:r.key)==="formContent"))==null?void 0:_.contents,C=d.cloneDeep(D.content);let F={};C&&((c=Object.values(C))==null?void 0:c.length)>0&&((u=Object.values(C))==null||u.forEach((r,m)=>{F[I[m].key]=r}));const v={content:F,index:a==null?void 0:a.index,buttonName:D==null?void 0:D.buttonName};e("change",v)},x=D=>{var F,v;if(!D)return;if(((F=Object.values(d.cloneDeep(D)))==null?void 0:F.length)>0){const b=(v=Object.values(d.cloneDeep(D)))==null?void 0:v.map(c=>c);let _="";b==null||b.forEach(c=>{c!==""&&c!==void 0&&(_=_===""?c:_+"/"+c)}),f.setSelectArray(b),f.setSelectString(_)}const I=d.cloneDeep(a.itemData),C=I==null?void 0:I.map(b=>{var _;return(b==null?void 0:b.key)==="formContent"&&((_=b.contents)==null||_.map((c,u)=>{var r,m,$,A,O,h,T,B,p,w,E,V,N,L,S,j,W,M,K;return c.type=c!=null&&c.type?c.type:(A=($=(m=(r=c==null?void 0:c.key)==null?void 0:r.split("$"))==null?void 0:m[1])==null?void 0:$.split("("))!=null&&A[0]?(O=pe==null?void 0:pe.find(Q=>{var ae,z,le,X;return(Q==null?void 0:Q.key)===((X=(le=(z=(ae=c==null?void 0:c.key)==null?void 0:ae.split("$"))==null?void 0:z[1])==null?void 0:le.split("("))==null?void 0:X[0])}))==null?void 0:O.value:"Input",c.options=c!=null&&c.options?c.options:((B=(T=(h=c==null?void 0:c.key)==null?void 0:h.split("$"))==null?void 0:T[1])==null?void 0:B.length)>0?(V=(E=ul((w=(p=c==null?void 0:c.key)==null?void 0:p.split("$"))==null?void 0:w[1]))==null?void 0:E.split(","))==null?void 0:V.map(Q=>({label:Q,value:Q})):[],(N=c==null?void 0:c.key)!=null&&N.includes("$")&&(c.key=(S=(L=c==null?void 0:c.key)==null?void 0:L.split("$"))==null?void 0:S[0]),c.value=Array.isArray((j=Object.values(D))==null?void 0:j[u])?(M=(W=Object.values(D))==null?void 0:W[u])==null?void 0:M[0]:(K=Object.values(D))==null?void 0:K[u],c})),b});e("contentChange",{contents:C,index:a.index})};return l.watch(()=>a.itemData,()=>{var b,_,c,u,r,m,$,A,O,h,T;const D=(b=d.cloneDeep(a.itemData))==null?void 0:b.find(B=>(B==null?void 0:B.key)==="formContent"),I=(_=d.cloneDeep(a.itemData))==null?void 0:_.find(B=>(B==null?void 0:B.key)==="formButton"),C=(c=d.cloneDeep(a.itemData))==null?void 0:c.find(B=>(B==null?void 0:B.key)==="formFlex"),F=(u=d.cloneDeep(a.itemData))==null?void 0:u.find(B=>(B==null?void 0:B.key)==="formWrap"),v=(r=d.cloneDeep(a.itemData))==null?void 0:r.find(B=>(B==null?void 0:B.key)==="enableWrap");if((F==null?void 0:F.contents)==="纵向"?t.value=!1:t.value=!0,g.value=(v==null?void 0:v.contents)===void 0?!1:v==null?void 0:v.contents,k.value=typeof(C==null?void 0:C.contents)!="boolean"?!(!(C!=null&&C.contents)===""||((m=C==null?void 0:C.contents)==null?void 0:m.toUpperCase())==="VERTICAL"):C==null?void 0:C.contents,(($=D==null?void 0:D.contents)==null?void 0:$.length)>0&&Array.isArray(D==null?void 0:D.contents)){const B=[];(A=D==null?void 0:D.contents)==null||A.forEach((E,V)=>{var N,L,S,j,W,M,K,Q,ae,z;if((E==null?void 0:E.label)!==""){let le=(E==null?void 0:E.label)??(E==null?void 0:E.key)??"",X=(E==null?void 0:E.type)??"",Z=(E==null?void 0:E.options)??[];if((N=E==null?void 0:E.key)!=null&&N.includes("$")&&(le=(L=d.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:L[0],((j=(S=d.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:S[1])==null?void 0:j.length)>0)){const[G,H]=(M=(W=d.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:W[1])==null?void 0:M.split(/[()]/);X=((K=pe.find(J=>(J==null?void 0:J.key)===G))==null?void 0:K.value)??"",((Q=H==null?void 0:H.split(","))==null?void 0:Q.length)>0&&(Z=(ae=H==null?void 0:H.split(","))==null?void 0:ae.map(J=>({label:J,value:J})))}B.push({label:le??"",name:"t"+V,type:X===""?"Input":X,value:E!=null&&E.value?E.value:(Z==null?void 0:Z.length)>0?(z=Z==null?void 0:Z[0])==null?void 0:z.value:(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??V,contents:Z??[],width:(E==null?void 0:E.width)??1})}});const p=(O=d.cloneDeep(B))==null?void 0:O.map(E=>E.value);let w="";p==null||p.forEach(E=>{E!==""&&E!==void 0&&(w=w===""?E:w+"/"+E)}),f.setSelectArray(p),f.setSelectString(w),o.value=B}else o.value=[];if(((h=I==null?void 0:I.contents)==null?void 0:h.length)>0){const B=[];(T=I==null?void 0:I.contents)==null||T.forEach((p,w)=>{(p==null?void 0:p.label)!==""&&B.push({label:(p==null?void 0:p.label)??"",id:(p==null?void 0:p.id)??w,type:(p==null?void 0:p.type)??"",background:p==null?void 0:p.background})}),i.value=B}else i.value=[]},{deep:!0,immediate:!0}),(D,I)=>(l.openBlock(),l.createElementBlock("div",kl,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:o.value,formRules:n.formRules,buttonValue:i.value,isRowFlex:k.value,isEnableWrap:g.value,onOnButtonClick:y,onChange:x,isButtonRow:t.value,key:a.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},Ne=ee._export_sfc(gl,[["__scopeId","data-v-63ad44fd"]]),ye=l.ref(0),Fe=n=>{var s;return!n||(n==null?void 0:n.length)===0?[]:(s=d.cloneDeep(n))==null?void 0:s.map(e=>(ye.value++,e={label:(e==null?void 0:e.label)??"",prop:(e==null?void 0:e.label)==="操作"?"operate":e==null?void 0:e.prop,width:e!=null&&e.width?parseInt(e.width):"",fixed:(e==null?void 0:e.fixed)??void 0,sortable:(e==null?void 0:e.sortable)??!1,align:(e==null?void 0:e.align)??"center",showOverflowTooltip:(e==null?void 0:e.showOverflowTooltip)??!0,isNotDrag:(e==null?void 0:e.isNotDrag)??!1,isEditCol:(e==null?void 0:e.isEditCol)??!1,isOperate:(e==null?void 0:e.isOperate)??!1,id:(e==null?void 0:e.id)??ye.value,children:Fe(e==null?void 0:e.children)},e))},bl=n=>{var a;return(a=d.cloneDeep(n))==null?void 0:a.map(e=>(ye.value++,e={label:(e==null?void 0:e.label)??"",prop:(e==null?void 0:e.label)==="操作"?"operate":e==null?void 0:e.prop,width:e!=null&&e.width?parseInt(e.width):"",fixed:(e==null?void 0:e.fixed)??void 0,sortable:(e==null?void 0:e.sortable)??!1,align:(e==null?void 0:e.align)??"center",showOverflowTooltip:(e==null?void 0:e.showOverflowTooltip)??!0,isNotDrag:(e==null?void 0:e.isNotDrag)??!1,isEditCol:(e==null?void 0:e.isEditCol)??!1,isOperate:(e==null?void 0:e.isOperate)??!1,id:(e==null?void 0:e.id)??ye.value,children:Fe(e==null?void 0:e.children)},e))},Le=(n,s)=>{var a;return n!=null&&n.find(e=>(e==null?void 0:e.id)===s)?(a=d.cloneDeep(n))==null?void 0:a.filter(o=>(o==null?void 0:o.id)!==s):(n=n==null?void 0:n.map(e=>(e.children=Le(e==null?void 0:e.children,s),e)),n)},je=(n,s)=>{var a;return n!=null&&n.find(e=>(e==null?void 0:e.id)===(s==null?void 0:s.id))?(a=d.cloneDeep(n))==null?void 0:a.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o=s),o)):(n=n==null?void 0:n.map(e=>(e.children=je(e==null?void 0:e.children,s),e)),n)},Ue=(n,s)=>{var a;return n!=null&&n.find(e=>{var o;return(e==null?void 0:e.id)===((o=s==null?void 0:s.contents)==null?void 0:o.id)})?(a=d.cloneDeep(n))==null?void 0:a.map(o=>{var t;return(o==null?void 0:o.id)===((t=s==null?void 0:s.contents)==null?void 0:t.id)&&(o=s==null?void 0:s.contents),o}):(n=n==null?void 0:n.map(e=>(e.children=Ue(e==null?void 0:e.children,s),e)),n)},Je=(n,s)=>{var a;return n!=null&&n.find(e=>(e==null?void 0:e.id)===(s==null?void 0:s.id))?(a=d.cloneDeep(n))==null?void 0:a.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(s.contents)),o)):(n=n==null?void 0:n.map(e=>(e.children=Je(e==null?void 0:e.children,s),e)),n)},U=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],Pe=se.defineStore("modelTableComp",{state:()=>({tableIndex:0}),actions:{setTableIndex(n){this.tableIndex=n}}}),vl={class:"table-header-child"},Cl={class:"table-header-child-main"},Dl={class:"table-header-child-content"},_l={class:"table-header-child-content-item"},El={class:"fix-button"},xl=["onClick"],$l=["onClick"],Nl=["onClick"],Al={key:0},Bl={class:"form-content"},Tl={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:s}){const a=n,e=s,o=l.ref(!1),t=l.ref(""),i=Pe(re.pinia),{tableIndex:f}=se.storeToRefs(i);l.ref(0);const g=l.ref(""),k=l.ref([]),y=l.ref([]),x=c=>{var r;o.value=!0;let u=[];U==null||U.forEach(m=>{let $=d.cloneDeep(f.value)+1;i.setTableIndex($),u.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:c[m.key],id:f.value,contents:m==null?void 0:m.options})}),c!=null&&c.children&&((r=c==null?void 0:c.children)==null?void 0:r.length)>0&&u.push({children:c==null?void 0:c.children,isFormColHidden:!0}),g.value=c==null?void 0:c.id,k.value=u,y.value=u},D=c=>{e("fixChange",d.cloneDeep(c))},I=c=>{e("deleteChange",d.cloneDeep(c))},C=c=>{o.value=!0;let u=[];U==null||U.forEach(r=>{let m=d.cloneDeep(f.value)+1;i.setTableIndex(m),u.push({label:r==null?void 0:r.label,name:r==null?void 0:r.label,type:r.type,value:"",id:f.value,contents:r==null?void 0:r.options})}),t.value=c==null?void 0:c.id,k.value=u,y.value=u},F=c=>{let u=d.cloneDeep(y.value);u=u==null?void 0:u.map(r=>(r.children||(r.value=c==null?void 0:c[r.name]),r)),y.value=u},v=()=>{var u,r;k.value=y.value;let c={};if(g.value!=="")c.id=g.value,(u=k.value)==null||u.forEach(m=>{const $=U==null?void 0:U.find(A=>(A==null?void 0:A.label)===(m==null?void 0:m.label));$?c[$.key]=m.value:m!=null&&m.children&&m.children.length>0&&(c.children=m.children)}),o.value=!1,e("fixChange",{contents:d.cloneDeep(c),id:t.value,type:"fix"});else{let m=d.cloneDeep(f.value)+1;i.setTableIndex(m),c.id="id"+f.value,(r=k.value)==null||r.forEach($=>{const A=U==null?void 0:U.find(O=>(O==null?void 0:O.label)===($==null?void 0:$.label));A?c[A.key]=$.value:$!=null&&$.children&&$.children.length>0&&(c.children=$.children)}),o.value=!1,e("fixChange",{contents:d.cloneDeep(c),id:t.value,type:"add"})}g.value="",k.value=[],y.value=[]},b=()=>{o.value=!1,g.value="",t.value="",k.value=[],y.value=[]},_=c=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{e("deleteChange",c),se.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(c,u)=>(l.openBlock(),l.createElementBlock("div",vl,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a==null?void 0:a.tableChildContents,(r,m)=>(l.openBlock(),l.createElementBlock("div",Cl,[l.createElementVNode("div",Dl,[l.createElementVNode("div",_l,l.toDisplayString(r.label),1),l.createElementVNode("div",El,[l.createElementVNode("div",{class:"icon-content",onClick:$=>C(r)},l.toDisplayString("新增"),8,xl),l.createElementVNode("div",{class:"icon-content",onClick:$=>x(r)},l.toDisplayString("修改"),8,$l),l.createElementVNode("div",{class:"icon-content",onClick:$=>_(r)},l.toDisplayString("删除"),8,Nl)])]),r!=null&&r.children&&r.children.length>0?(l.openBlock(),l.createElementBlock("div",Al,[l.createVNode(Re,{tableChildContents:r==null?void 0:r.children,onDeleteChange:I,onFixChange:D},null,8,["tableChildContents"])])):l.createCommentVNode("",!0)]))),256)),l.createVNode(q.ssDialog,{visible:o.value,onBeforeDestroy:b,width:840},{default:l.withCtx(()=>[l.createElementVNode("div",Bl,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:F},null,8,["rowContents"]))])]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{onClick:b,class:"cancel-button button"},l.toDisplayString("取消")),l.createElementVNode("div",{class:"ok-button button",onClick:v},l.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Il=ee._export_sfc(Tl,[["__scopeId","data-v-50120da7"]]),wl={class:"table-header-child"},Vl={class:"table-header-child-main"},Ol={class:"table-header-child-content"},Sl={class:"table-header-child-content-item"},Fl={class:"fix-button"},Ll=["onClick"],jl=["onClick"],Ul=["onClick"],Jl={key:0},Pl={class:"form-content"},Rl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:s}){const a=n,e=s,o=l.ref(!1),t=l.ref(""),i=Pe(re.pinia),{tableIndex:f}=se.storeToRefs(i),g=l.ref(""),k=l.ref([]),y=l.ref([]),x=c=>{e("fixChange",d.cloneDeep(c))},D=c=>{var r;o.value=!0;let u=[];U==null||U.forEach(m=>{let $=d.cloneDeep(f.value)+1;i.setTableIndex($),u.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:c[m.key],id:f.value,contents:m==null?void 0:m.options})}),c!=null&&c.children&&((r=c==null?void 0:c.children)==null?void 0:r.length)>0&&u.push({children:c==null?void 0:c.children,isFormColHidden:!0}),g.value=c==null?void 0:c.id,k.value=u,y.value=u},I=c=>{o.value=!0;let u=[];U==null||U.forEach(r=>{let m=d.cloneDeep(f.value)+1;i.setTableIndex(m),u.push({label:r==null?void 0:r.label,name:r==null?void 0:r.label,type:r.type,value:"",id:f.value,contents:r==null?void 0:r.options})}),t.value=c==null?void 0:c.id,k.value=u,y.value=u},C=c=>{let u=d.cloneDeep(y.value);u=u==null?void 0:u.map(r=>(r.children||(r.value=c==null?void 0:c[r.name]),r)),y.value=u},F=()=>{var u,r;k.value=y.value;let c={};if(g.value!=="")c.id=g.value,(u=k.value)==null||u.forEach(m=>{const $=U==null?void 0:U.find(A=>(A==null?void 0:A.label)===(m==null?void 0:m.label));$?c[$.key]=m.value:m!=null&&m.children&&m.children.length>0&&(c.children=m.children)}),o.value=!1,e("fixChange",{contents:d.cloneDeep(c),id:t.value,type:"fix"});else{let m=d.cloneDeep(f.value)+1;i.setTableIndex(m),c.id="idChild"+f.value,(r=k.value)==null||r.forEach($=>{const A=U==null?void 0:U.find(O=>(O==null?void 0:O.label)===($==null?void 0:$.label));A?c[A.key]=$.value:$!=null&&$.children&&$.children.length>0&&(c.children=$.children)}),o.value=!1,e("fixChange",{contents:d.cloneDeep(c),id:t.value,type:"add"})}g.value="",k.value=[],y.value=[]},v=()=>{o.value=!1,g.value="",t.value="",k.value=[],y.value=[]},b=c=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{e("deleteChange",c),se.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=c=>{e("deleteChange",c)};return(c,u)=>(l.openBlock(),l.createElementBlock("div",wl,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a==null?void 0:a.tableChildContents,(r,m)=>(l.openBlock(),l.createElementBlock("div",Vl,[l.createElementVNode("div",Ol,[l.createElementVNode("div",Sl,l.toDisplayString(r.label),1),l.createElementVNode("div",Fl,[l.createElementVNode("div",{class:"icon-content",onClick:$=>I(r)},l.toDisplayString("新增"),8,Ll),l.createElementVNode("div",{class:"icon-content",onClick:$=>D(r)},l.toDisplayString("修改"),8,jl),l.createElementVNode("div",{class:"icon-content",onClick:$=>b(r)},l.toDisplayString("删除"),8,Ul)])]),r!=null&&r.children&&r.children.length>0?(l.openBlock(),l.createElementBlock("div",Jl,[l.createVNode(Il,{tableChildContents:r==null?void 0:r.children,onDeleteChange:_,onFixChange:x},null,8,["tableChildContents"])])):l.createCommentVNode("",!0)]))),256)),l.createVNode(q.ssDialog,{visible:o.value,onBeforeDestroy:v,width:840},{default:l.withCtx(()=>[l.createElementVNode("div",Pl,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{onClick:v,class:"cancel-button button"},l.toDisplayString("取消")),l.createElementVNode("div",{class:"ok-button button",onClick:F},l.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Re=ee._export_sfc(Rl,[["__scopeId","data-v-aa24990b"]]),Wl={class:"table-operate-content"},zl={class:"table-operate-item"},Ml={class:"operate-title"},Gl={class:"operate-content"},ql={class:"fix-content"},Zl={class:"fix-content-label"},Hl={class:"fix-button"},Kl=["onClick"],Ql=["onClick"],Xl=["onClick"],Yl={key:0},en={class:"form-content"},ln={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,e=s,o=l.ref([]),t=l.ref(!1),i=l.ref([]),f=l.ref([]),g=l.ref([]),k=l.ref(""),y=l.ref(""),x=l.ref(0),D=()=>{t.value=!0;let r=[];U==null||U.forEach(m=>{x.value++,r.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:"",id:x.value,contents:m==null?void 0:m.options})}),f.value=r,g.value=r},I=r=>{t.value=!0;let m=[];U==null||U.forEach($=>{x.value++,m.push({label:$==null?void 0:$.label,name:$==null?void 0:$.label,type:$.type,value:"",id:x.value,contents:$==null?void 0:$.options})}),f.value=m,y.value=r==null?void 0:r.id,g.value=m},C=r=>{var m;i.value=Le(d.cloneDeep(i.value),r==null?void 0:r.id),e("change",(m=d.cloneDeep(a.originalItemContents))==null?void 0:m.map($=>{var A;return($==null?void 0:$.key)==="header"&&($.contents=(A=i.value)!=null&&A.some(O=>O==null?void 0:O.children)?[i.value]:i.value),$}))},F=r=>{var $,A,O;r.type==="fix"?r.id!==""?i.value=Ue(i.value,r):i.value=je(i.value,r==null?void 0:r.contents):i.value=Je(i.value,r),i.value=($=i.value)!=null&&$.some(h=>h==null?void 0:h.children)?[i.value]:i.value,k.value="";let m=d.cloneDeep(a.originalItemContents);(A=d.cloneDeep(a.originalItemContents))!=null&&A.find(h=>(h==null?void 0:h.key)==="header")?m=(O=d.cloneDeep(a.originalItemContents))==null?void 0:O.map(h=>((h==null?void 0:h.key)==="header"&&(h.contents=i.value),h)):m.push({key:"header",contents:i.value}),e("change",m)},v=r=>{var $;t.value=!0;let m=[];U==null||U.forEach(A=>{x.value++,m.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:r[A.key],id:x.value,contents:A==null?void 0:A.options})}),r!=null&&r.children&&(($=r==null?void 0:r.children)==null?void 0:$.length)>0&&m.push({children:r==null?void 0:r.children,isFormColHidden:!0}),k.value=r==null?void 0:r.id,y.value="",f.value=m,g.value=m},b=r=>{let m=d.cloneDeep(g.value);m=m==null?void 0:m.map($=>($.children||($.value=r==null?void 0:r[$.name]),$)),g.value=m},_=()=>{t.value=!1,k.value="",y.value="",g.value=[]},c=()=>{var $,A,O,h,T,B;f.value=g.value;let r={};if(k.value!==""?r.id=k.value:(x.value++,r.id="id"+x.value),($=f.value)==null||$.forEach(p=>{const w=U==null?void 0:U.find(E=>(E==null?void 0:E.label)===(p==null?void 0:p.label));w?r[w.key]=p.value:p!=null&&p.children&&p.children.length>0&&(r.children=p.children)}),(A=i.value)!=null&&A.find(p=>p.id===r.id))i.value=(O=i.value)==null?void 0:O.map(p=>(p.id===r.id&&(p=r),p));else{let p=d.cloneDeep(i.value);y.value===""?p.push(r):p=p==null?void 0:p.map(w=>(w.id===y.value&&(w.children||(w.children=[]),w.children.push(r)),w)),i.value=p}i.value=(h=i.value)!=null&&h.some(p=>p==null?void 0:p.children)?[i.value]:i.value,t.value=!1,k.value="",y.value="";let m=d.cloneDeep(a.originalItemContents);(T=d.cloneDeep(a.originalItemContents))!=null&&T.find(p=>(p==null?void 0:p.key)==="header")?m=(B=d.cloneDeep(a.originalItemContents))==null?void 0:B.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=i.value),p)):m.push({key:"header",contents:i.value}),e("change",m)},u=r=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var m,$;i.value=(m=d.cloneDeep(i.value))==null?void 0:m.filter(A=>(A==null?void 0:A.id)!==(r==null?void 0:r.id)),e("change",($=d.cloneDeep(a.originalItemContents))==null?void 0:$.map(A=>{var O;return(A==null?void 0:A.key)==="header"&&(A.contents=(O=i.value)!=null&&O.some(h=>h==null?void 0:h.children)?[i.value]:i.value),A})),se.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return l.watch(()=>a.originalItemContents,()=>{var r,m,$,A,O;!a.originalItemContents||a.originalItemContents.length===0||(o.value=d.cloneDeep(a.originalItemContents),i.value=(m=(r=o.value)==null?void 0:r.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:m.contents,i.value=($=i.value)==null?void 0:$.map((h,T)=>(Array.isArray(h)?h=bl(h):h={label:(h==null?void 0:h.label)??"",prop:(h==null?void 0:h.label)==="操作"?"operate":h==null?void 0:h.prop,width:h!=null&&h.width?parseInt(h.width):"",fixed:(h==null?void 0:h.fixed)??void 0,sortable:(h==null?void 0:h.sortable)??!1,align:(h==null?void 0:h.align)??"center",showOverflowTooltip:(h==null?void 0:h.showOverflowTooltip)??!0,isNotDrag:(h==null?void 0:h.isNotDrag)??!1,isEditCol:(h==null?void 0:h.isEditCol)??!1,isOperate:(h==null?void 0:h.isOperate)??!1,id:(h==null?void 0:h.id)??T},h)),i.value=(A=i.value)!=null&&A.every(h=>Array.isArray(h))?(O=i.value)==null?void 0:O[0]:i.value)},{deep:!0,immediate:!0}),(r,m)=>{const $=l.resolveComponent("svg-icon");return l.openBlock(),l.createElementBlock("div",Wl,[l.createElementVNode("div",zl,[l.createElementVNode("div",Ml,[m[1]||(m[1]=l.createElementVNode("div",null,l.toDisplayString("表头"),-1)),l.createElementVNode("div",{class:"icon-content",onClick:D},[l.createVNode($,{name:"Plus",class:"icon-size"}),m[0]||(m[0]=l.createElementVNode("div",null,l.toDisplayString("新增"),-1))])]),l.createElementVNode("div",Gl,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,(A,O)=>(l.openBlock(),l.createElementBlock("div",{key:O},[l.createElementVNode("div",ql,[l.createElementVNode("div",Zl,l.toDisplayString(A==null?void 0:A.label),1),l.createElementVNode("div",Hl,[l.createElementVNode("div",{class:"icon-content",onClick:h=>I(A)},l.toDisplayString("新增"),8,Kl),l.createElementVNode("div",{class:"icon-content",onClick:h=>v(A)},l.toDisplayString("修改"),8,Ql),l.createElementVNode("div",{class:"icon-content",onClick:h=>u(A)},l.toDisplayString("删除"),8,Xl)])]),A!=null&&A.children&&A.children.length>0?(l.openBlock(),l.createElementBlock("div",Yl,[l.createVNode(Re,{tableChildContents:A==null?void 0:A.children,onDeleteChange:C,onFixChange:F},null,8,["tableChildContents"])])):l.createCommentVNode("",!0)]))),128))])]),l.createVNode(q.ssDialog,{visible:t.value,onBeforeDestroy:_,width:840},{default:l.withCtx(()=>[l.createElementVNode("div",en,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{onClick:_,class:"cancel-button button"},l.toDisplayString("取消")),l.createElementVNode("div",{class:"ok-button button",onClick:c},l.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},nn=ee._export_sfc(ln,[["__scopeId","data-v-1a4cfddf"]]),an={class:"form-operate-content"},on={class:"form-operate-item"},sn={class:"operate-title"},rn={class:"operate-content"},tn={class:"fix-content"},cn={class:"fix-button"},un=["onClick"],pn=["onClick"],dn={class:"operate-title"},fn={class:"operate-content"},hn={class:"fix-content"},mn={class:"fix-button"},yn=["onClick"],kn=["onClick"],gn={style:{display:"flex","justify-content":"space-between"}},bn={class:"form-content"},vn={class:"form-content"},Cn={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,e=s,o=l.ref(!1),t=l.ref([]),i=l.ref([]),f=l.ref(!1),g=l.ref([]),k=l.ref([]),y=l.ref(""),x=l.ref(!1),D=l.ref(0),I=l.ref([]),C=l.ref([]),F=h=>{var B,p;o.value=!0;let T=[];(p=(B=ne==null?void 0:ne.find(w=>(w==null?void 0:w.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:B.value)==null||p.forEach(w=>{D.value++,T.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:(w==null?void 0:w.label)==="类型"&&h[w.key]===""?"Input":h[w.key],id:D.value,contents:w==null?void 0:w.options})}),y.value=h==null?void 0:h.id,t.value=T,i.value=T},v=h=>{f.value=!0;let T=[];oe==null||oe.forEach(B=>{D.value++,T.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:(B==null?void 0:B.label)==="类型"&&h[B.key]===""?"normal":h[B.key],id:D.value,contents:B==null?void 0:B.options})}),I.value=T,C.value=T,y.value=h==null?void 0:h.id};l.watch(()=>x.value,()=>{var T,B;let h=d.cloneDeep(a.originalItemContents);(T=d.cloneDeep(a.originalItemContents))!=null&&T.find(p=>(p==null?void 0:p.key)==="enableWrap")?h=(B=d.cloneDeep(a.originalItemContents))==null?void 0:B.map(p=>((p==null?void 0:p.key)==="enableWrap"&&(p.contents=!x.value),p)):h.push({key:"enableWrap",contents:!x.value}),e("change",h)},{deep:!0,immediate:!0});const b=()=>{var B,p,w,E,V;I.value=C.value;let h={};if(y.value!==""?h.id=y.value:(D.value++,h.id="id"+D.value),(B=I.value)==null||B.forEach(N=>{const L=oe==null?void 0:oe.find(S=>(S==null?void 0:S.label)===(N==null?void 0:N.label));L&&(h[L.key]=N.value)}),(p=g.value)!=null&&p.find(N=>N.id===h.id))g.value=(w=g.value)==null?void 0:w.map(N=>(N.id===h.id&&(N=h),N));else{let N=d.cloneDeep(g.value);g.value||(g.value=[]),N.push(h),g.value=N}f.value=!1,y.value="";let T=d.cloneDeep(a.originalItemContents);(E=d.cloneDeep(a.originalItemContents))!=null&&E.find(N=>(N==null?void 0:N.key)==="formButton")?T=(V=d.cloneDeep(a.originalItemContents))==null?void 0:V.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=g.value),N)):T.push({key:"formButton",contents:g.value}),e("change",T)},_=h=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,B;k.value=(T=d.cloneDeep(k.value))==null?void 0:T.filter(p=>(p==null?void 0:p.id)!==(h==null?void 0:h.id)),e("change",(B=d.cloneDeep(a.originalItemContents))==null?void 0:B.map(p=>((p==null?void 0:p.key)==="formContent"&&(p.contents=k.value),p))),se.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},c=h=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,B;g.value=(T=d.cloneDeep(g.value))==null?void 0:T.filter(p=>(p==null?void 0:p.id)!==(h==null?void 0:h.id)),e("change",(B=d.cloneDeep(a.originalItemContents))==null?void 0:B.map(p=>((p==null?void 0:p.key)==="formButton"&&(p.contents=g.value),p))),se.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},u=()=>{f.value=!0;let h=[];oe==null||oe.forEach(T=>{D.value++,h.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:(T==null?void 0:T.label)==="类型"?"normal":"",id:D.value,contents:T==null?void 0:T.options})}),I.value=h,C.value=h},r=()=>{var T,B;o.value=!0;let h=[];(B=(T=ne==null?void 0:ne.find(p=>(p==null?void 0:p.key)==="Input"))==null?void 0:T.value)==null||B.forEach(p=>{D.value++,h.push({label:p==null?void 0:p.label,name:p==null?void 0:p.label,type:p.type,value:(p==null?void 0:p.label)==="类型"?"Input":"",id:D.value,contents:p==null?void 0:p.options})}),t.value=h,i.value=h},m=h=>{let T=d.cloneDeep(C.value);T=T==null?void 0:T.map(B=>(B.value=h==null?void 0:h[B.name],B)),C.value=T},$=h=>{var T,B,p,w;if((h==null?void 0:h.类型)!==((B=(T=i.value)==null?void 0:T.find(E=>(E==null?void 0:E.label)==="类型"))==null?void 0:B.value)){let E=[];(w=(p=ne==null?void 0:ne.find(V=>(V==null?void 0:V.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:p.value)==null||w.forEach(V=>{D.value++,E.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(h==null?void 0:h[V.label])??"",id:D.value,contents:V==null?void 0:V.options})}),i.value=E,t.value=E}else{let E=d.cloneDeep(i.value);E=E==null?void 0:E.map(V=>(V.value=h==null?void 0:h[V.name],V)),i.value=E}},A=()=>{var p,w,E,V,N,L;t.value=i.value;let h={};y.value!==""?h.id=y.value:(D.value++,h.id="id"+D.value);let T=(p=ne==null?void 0:ne.find(S=>{var j,W;return(S==null?void 0:S.key)===(((W=(j=t.value)==null?void 0:j.find(M=>(M==null?void 0:M.label)==="类型"))==null?void 0:W.value)??"label")}))==null?void 0:p.value;if((w=t.value)==null||w.forEach(S=>{const j=T==null?void 0:T.find(W=>(W==null?void 0:W.label)===(S==null?void 0:S.label));j&&(h[j.key]=S.value)}),h.width=1,(E=k.value)!=null&&E.find(S=>S.id===h.id))k.value=(V=k.value)==null?void 0:V.map(S=>(S.id===h.id&&(S=h),S));else{let S=d.cloneDeep(k.value);S.push(h),k.value=S}o.value=!1,y.value="";let B=d.cloneDeep(a.originalItemContents);(N=d.cloneDeep(a.originalItemContents))!=null&&N.find(S=>(S==null?void 0:S.key)==="formContent")?B=(L=d.cloneDeep(a.originalItemContents))==null?void 0:L.map(S=>((S==null?void 0:S.key)==="formContent"&&(S.contents=k.value),S)):B.push({key:"formContent",contents:k.value}),e("change",B)},O=()=>{o.value=!1,f.value=!1,y.value="",i.value=[],C.value=[]};return l.watch(()=>a.originalItemContents,()=>{var T,B,p,w,E,V;if(!a.originalItemContents||a.originalItemContents.length===0)return;const h=d.cloneDeep(a.originalItemContents);k.value=((T=h==null?void 0:h.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:T.contents)??[],g.value=((B=h==null?void 0:h.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:B.contents)??[],x.value=((p=h==null?void 0:h.find(N=>(N==null?void 0:N.key)==="enableWrap"))==null?void 0:p.contents)!==void 0?!((w=h==null?void 0:h.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&w.contents):!0,k.value=(E=d.cloneDeep(k.value))==null?void 0:E.map((N,L)=>N={label:(N==null?void 0:N.key)??(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",contents:(N==null?void 0:N.options)??"",id:(N==null?void 0:N.id)??L,value:(N==null?void 0:N.value)??""}),g.value=(V=g.value)==null?void 0:V.map((N,L)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:(N==null?void 0:N.id)??L})},{deep:!0,immediate:!0}),(h,T)=>{const B=l.resolveComponent("svg-icon");return l.openBlock(),l.createElementBlock("div",an,[l.createElementVNode("div",on,[l.createElementVNode("div",sn,[T[2]||(T[2]=l.createElementVNode("div",null,l.toDisplayString("表单内容"),-1)),l.createElementVNode("div",{class:"icon-content",onClick:r},[l.createVNode(B,{name:"Plus",class:"icon-size"}),T[1]||(T[1]=l.createElementVNode("div",null,l.toDisplayString("新增"),-1))])]),l.createElementVNode("div",rn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(k.value,(p,w)=>(l.openBlock(),l.createElementBlock("div",{key:w},[l.createElementVNode("div",tn,[l.createElementVNode("div",null,l.toDisplayString(p.label),1),l.createElementVNode("div",cn,[l.createElementVNode("div",{class:"icon-content",onClick:E=>F(p)},l.toDisplayString("修改"),8,un),l.createElementVNode("div",{class:"icon-content",onClick:E=>_(p)},l.toDisplayString("删除"),8,pn)])])]))),128))]),l.createElementVNode("div",dn,[T[4]||(T[4]=l.createElementVNode("div",null,l.toDisplayString("表单按钮"),-1)),l.createElementVNode("div",{class:"icon-content",onClick:u},[l.createVNode(B,{name:"Plus",class:"icon-size"}),T[3]||(T[3]=l.createElementVNode("div",null,l.toDisplayString("新增"),-1))])]),l.createElementVNode("div",fn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,(p,w)=>(l.openBlock(),l.createElementBlock("div",{key:w},[l.createElementVNode("div",hn,[l.createElementVNode("div",null,l.toDisplayString(p.label),1),l.createElementVNode("div",mn,[l.createElementVNode("div",{class:"icon-content",onClick:E=>v(p)},l.toDisplayString("修改"),8,yn),l.createElementVNode("div",{class:"icon-content",onClick:E=>c(p)},l.toDisplayString("删除"),8,kn)])])]))),128))]),T[6]||(T[6]=l.createElementVNode("div",{class:"operate-title"},[l.createElementVNode("div",null,l.toDisplayString("表单布局"))],-1)),l.createElementVNode("div",gn,[T[5]||(T[5]=l.createElementVNode("div",null,l.toDisplayString("是否自动撑宽"),-1)),l.createVNode(q._sfc_main$1,{modelValue:x.value,"onUpdate:modelValue":T[0]||(T[0]=p=>x.value=p)},null,8,["modelValue"])])]),l.createVNode(q.ssDialog,{visible:o.value,onBeforeDestroy:O,width:840},{default:l.withCtx(()=>[l.createElementVNode("div",bn,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!0,onChange:$},null,8,["rowContents"]))])]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{onClick:O,class:"cancel-button button"},l.toDisplayString("取消")),l.createElementVNode("div",{class:"ok-button button",onClick:A},l.toDisplayString("确认"))])]),_:1},8,["visible"]),l.createVNode(q.ssDialog,{visible:f.value,onBeforeDestroy:O,width:840},{default:l.withCtx(()=>[l.createElementVNode("div",vn,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{onClick:O,class:"cancel-button button"},l.toDisplayString("取消")),l.createElementVNode("div",{class:"ok-button button",onClick:b},l.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ae=ee._export_sfc(Cn,[["__scopeId","data-v-d6fcac3c"]]),Dn={class:"step-module content"},_n={class:"module-data"},En={class:"step-module layout"},xn={class:"form-content"},$n=l.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,e=s,o=l.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),t=l.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),i=l.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=l.reactive({visible:!1,width:"40%",title:"步骤条"}),g=l.ref("create"),k=l.ref({}),y=l.ref([]),x=v=>{var b;k.value=v,e("change",(b=C())==null?void 0:b.compData)},D=(v,b)=>{var _,c;switch(v){case"create":(_=t.value)==null||_.forEach(u=>{u.value=""}),g.value="create",f.visible=!0;break;case"update":(c=t.value)==null||c.forEach(u=>{u.value=b[u==null?void 0:u.prop]}),g.value="update",f.visible=!0;break;case"delete":y.value.splice(b,1),g.value="delete";break}},I=v=>{var b,_,c;if((v==null?void 0:v.buttonName)==="确认"){const u=d.cloneDeep(v==null?void 0:v.content);switch(Object.keys(u).forEach(r=>{u[r]===""&&delete u[r]}),g.value){case"create":y.value.push({...u,index:((b=y.value)==null?void 0:b.length)+1});break;case"update":y.value=(_=y.value)==null?void 0:_.map(r=>r.index===(u==null?void 0:u.index)?{...r,title:u==null?void 0:u.title,description:u==null?void 0:u.description}:r);break}e("change",(c=C())==null?void 0:c.compData),f.visible=!1}else f.visible=!1},C=()=>({comp:"Step",compData:[{key:"stepList",contents:y.value},{key:"stepConfig",contents:k.value}]}),F=()=>{f.visible=!1};return l.watch(()=>a==null?void 0:a.itemContents,v=>{var b,_;v&&(k.value=((b=v==null?void 0:v.find(c=>c.key==="stepConfig"))==null?void 0:b.contents)??{},y.value=((_=v==null?void 0:v.find(c=>c.key==="stepList"))==null?void 0:_.contents)??[])},{immediate:!0}),(v,b)=>{const _=l.resolveComponent("svg-icon"),c=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",null,[l.createElementVNode("div",Dn,[b[2]||(b[2]=l.createElementVNode("h4",{class:"module-title"},"内容",-1)),l.createElementVNode("div",{class:"module-icon",onClick:b[0]||(b[0]=u=>D("create"))},[l.createVNode(_,{name:"Plus",class:"icon-size"}),b[1]||(b[1]=l.createElementVNode("div",null,"新增",-1))])]),l.createElementVNode("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y.value,(u,r)=>(l.openBlock(),l.createElementBlock("div",{class:"module-data-item",key:r},[l.createElementVNode("span",null,l.toDisplayString(u==null?void 0:u.title),1),l.createElementVNode("div",null,[l.createVNode(c,{type:"primary",size:"small",onClick:m=>D("update",{...u,index:r+1})},{default:l.withCtx(()=>b[3]||(b[3]=[l.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),l.createVNode(c,{type:"danger",size:"small",onClick:m=>D("delete",r)},{default:l.withCtx(()=>b[4]||(b[4]=[l.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),l.createElementVNode("div",En,[b[5]||(b[5]=l.createElementVNode("div",{class:"module-title"},"布局",-1)),l.createVNode(q.ssForm,{rowContents:o.value,onChange:x},null,8,["rowContents"])])]),l.createVNode(q.ssDialog,{visible:f.visible,title:f.title,onBeforeDestroy:F,width:f.width},{default:l.withCtx(()=>[l.createElementVNode("div",xn,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:i.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Nn=ee._export_sfc($n,[["__scopeId","data-v-9361c99f"]]),An={class:"step-module content"},Bn={class:"module-data"},Tn={class:"step-module layout"},In={class:"form-content"},wn=l.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,e=s,o=l.ref("create"),t=l.ref({}),i=l.ref([]),f=l.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),g=l.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),k=l.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),y=l.reactive({visible:!1,width:"40%",title:"时间线"}),x=v=>{var b;t.value=v,console.log(1212,v),e("change",(b=C())==null?void 0:b.compData)},D=(v,b)=>{var _,c;switch(v){case"create":(_=g.value)==null||_.forEach(u=>{u.value=""}),o.value="create",y.visible=!0;break;case"update":(c=g.value)==null||c.forEach(u=>{u.value=b[u==null?void 0:u.prop]}),o.value="update",y.visible=!0;break;case"delete":i.value.splice(b,1),o.value="delete";break}},I=v=>{var b,_,c,u;if((v==null?void 0:v.buttonName)==="确认"){const r=d.cloneDeep(v==null?void 0:v.content);switch(Object.keys(r).forEach(m=>{r[m]===""&&delete r[m]}),o.value){case"create":console.log(1335,i.value,r),(_=i.value)==null||_.push({...r,index:((b=i.value)==null?void 0:b.length)+1});break;case"update":i.value=(c=i.value)==null?void 0:c.map(m=>m.index===(r==null?void 0:r.index)?{...m,content:r==null?void 0:r.content,timestamp:r==null?void 0:r.timestamp}:m);break}e("change",(u=C())==null?void 0:u.compData),y.visible=!1}else y.visible=!1},C=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:i.value},{key:"timeLineConfig",contents:t.value}]}),F=()=>{y.visible=!1};return l.watch(()=>a==null?void 0:a.itemContents,v=>{var b,_;v&&(t.value=((b=v==null?void 0:v.find(c=>c.key==="timeLineConfig"))==null?void 0:b.contents)??{},i.value=((_=v==null?void 0:v.find(c=>c.key==="timeLineList"))==null?void 0:_.contents)??[])},{immediate:!0}),(v,b)=>{const _=l.resolveComponent("svg-icon"),c=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",null,[l.createElementVNode("div",An,[b[2]||(b[2]=l.createElementVNode("h4",{class:"module-title"},"内容",-1)),l.createElementVNode("div",{class:"module-icon",onClick:b[0]||(b[0]=u=>D("create"))},[l.createVNode(_,{name:"Plus",class:"icon-size"}),b[1]||(b[1]=l.createElementVNode("div",null,"新增",-1))])]),l.createElementVNode("div",Bn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,(u,r)=>(l.openBlock(),l.createElementBlock("div",{class:"module-data-item",key:r},[l.createElementVNode("span",null,l.toDisplayString(u==null?void 0:u.content),1),l.createElementVNode("div",null,[l.createVNode(c,{type:"primary",size:"small",onClick:m=>D("update",{...u,index:r+1})},{default:l.withCtx(()=>b[3]||(b[3]=[l.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),l.createVNode(c,{type:"danger",size:"small",onClick:m=>D("delete",r)},{default:l.withCtx(()=>b[4]||(b[4]=[l.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),l.createElementVNode("div",Tn,[b[5]||(b[5]=l.createElementVNode("div",{class:"module-title"},"布局",-1)),l.createVNode(q.ssForm,{rowContents:f.value,onChange:x},null,8,["rowContents"])])]),l.createVNode(q.ssDialog,{visible:y.visible,title:y.title,onBeforeDestroy:F,width:y.width},{default:l.withCtx(()=>[l.createElementVNode("div",In,[(l.openBlock(),l.createBlock(q.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Vn=ee._export_sfc(wn,[["__scopeId","data-v-40aea043"]]),On={class:"extra-content"},Sn={key:0},Fn={key:1},Ln={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:s}){const a=n,e=l.ref(0),o=l.ref(),t=l.ref(),i=s,f=l.ref(!1),g=l.ref({}),k=l.ref({}),y=l.ref();l.watch(()=>[a.itemData],()=>{var u;const c=d.cloneDeep(a.itemData);o.value=(u=d.cloneDeep(c))==null?void 0:u.map(r=>{var m;if(r.key==="extra"){let $=[];(m=r.value)==null||m.forEach(A=>{var O;$.push((O=Object.values(A))==null?void 0:O[0])}),r.value=$}return r})},{deep:!0,immediate:!0});const x=(c,u,r,m)=>{var A;let $={};((A=c==null?void 0:c[0])==null?void 0:A.contents)==="详情"&&(f.value=!0,$[u]=c,t.value=c==null?void 0:c.filter(O=>(O==null?void 0:O.key)!=="tableContentName"),g.value=$,k.value=r,y.value=m.id)},D=c=>{var O,h,T,B;const u=(h=(O=Object.values(d.cloneDeep(g.value)))==null?void 0:O[0])==null?void 0:h.filter(p=>(p==null?void 0:p.key)==="tableContentName"),r=(B=(T=Object.values(d.cloneDeep(g.value)))==null?void 0:T[0])==null?void 0:B.filter(p=>(p==null?void 0:p.key)!=="tableContentName"),m=r==null?void 0:r.map((p,w)=>{var E;return w===c.index&&(p==null?void 0:p.comp)==="Table"&&(p.compData=(E=p.compData)==null?void 0:E.map(V=>{var N,L;return(V==null?void 0:V.key)==="tableContents"&&(V.contents=(L=(N=c.content)==null?void 0:N.map(S=>{let j={};for(let W in S)W!=="id"&&(j[W]=S[W]);return j}))==null?void 0:L.map(S=>Object.values(S))),V})),p});m.unshift(u==null?void 0:u[0]);let $=d.cloneDeep(g.value),A={};for(let p in $)A[p]=m;g.value=A},I=()=>{f.value=!1,g.value={},k.value={},y.value=void 0,e.value++},C=c=>{var O,h,T,B;const u=(h=(O=Object.values(d.cloneDeep(g.value)))==null?void 0:O[0])==null?void 0:h.filter(p=>(p==null?void 0:p.key)==="tableContentName"),r=(B=(T=Object.values(d.cloneDeep(g.value)))==null?void 0:T[0])==null?void 0:B.filter(p=>(p==null?void 0:p.key)!=="tableContentName"),m=r==null?void 0:r.map((p,w)=>(w===c.index&&(p.compData=c.contents),p));m.unshift(u==null?void 0:u[0]);let $=d.cloneDeep(g.value),A={};for(let p in $)A[p]=m;g.value=A},F=()=>{var u,r;let c={};for(let m in k.value)m===((u=Object.keys(g.value))==null?void 0:u[0])?c[m]=(r=Object.values(g.value))==null?void 0:r[0]:c[m]=k.value[m];i("change",{buttonName:"编辑",index:y.value,singleContent:c},"methodData"),f.value=!1,g.value={},k.value={},y.value=void 0},v=()=>{f.value=!1,g.value={},k.value={},y.value=void 0},b=c=>{i("change",c,"methodData")},_=c=>We(c);return(c,u)=>(l.openBlock(),l.createElementBlock("div",On,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(r,m)=>(l.openBlock(),l.createElementBlock("div",{key:e.value},[(r==null?void 0:r.key)==="extra"?(l.openBlock(),l.createElementBlock("div",Sn)):(l.openBlock(),l.createElementBlock("div",Fn,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_(r.comp)),{itemData:r==null?void 0:r.compData,childItemData:r==null?void 0:r.itemChildData,key:m,index:(r==null?void 0:r.id)??m,onContentClick:x,onChange:b},null,40,["itemData","childItemData","index"]))]))]))),128)),l.createVNode(q.ssDialog,{visible:f.value,onBeforeDestroy:v},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(r,m)=>(l.openBlock(),l.createElementBlock("div",{key:m,class:"extra-dialog"},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_(r.comp)),{itemData:r==null?void 0:r.compData,onChange:D,childItemData:r==null?void 0:r.itemChildData,key:m,onContentChange:C,index:(r==null?void 0:r.id)??m,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:l.withCtx(()=>[l.createElementVNode("div",{class:"dialog-footer"},[l.createElementVNode("div",{class:"cancel-button footer-button",onClick:I},l.toDisplayString("取消")),l.createElementVNode("div",{class:"confirm-button footer-button",onClick:F},l.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},jn=ee._export_sfc(Ln,[["__scopeId","data-v-b0b2f71f"]]),Un={class:"method-content"},Jn=["onClick"],Pn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const s=l.ref([]),a=n,e=il.useModelComp(re.pinia),{itemData:o,isEdit:t}=se.storeToRefs(e),i=(k,y)=>{var D;const x=(D=y==null?void 0:y[0])==null?void 0:D.children;return k==null?void 0:k.map(I=>{var C;return I=(C=I==null?void 0:I.map((F,v)=>{var b;return{key:(b=x[v])==null?void 0:b.label,value:F}}))==null?void 0:C.filter(F=>F.key),I})};l.watch(()=>o.value,async()=>{t.value=="view"&&await g(d.cloneDeep(a.itemData))},{deep:!0});const f=async k=>{var c,u,r,m,$,A;let y={};if((c=d.cloneDeep(k.content))==null||c.forEach((O,h)=>{var T,B,p,w,E,V,N,L,S,j,W,M,K,Q,ae,z,le;if((O==null?void 0:O.comp)==="Table"){let X=(w=(p=(B=(T=O==null?void 0:O.compData)==null?void 0:T.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:B.contents)==null?void 0:p[0])==null?void 0:w.some(J=>J==null?void 0:J.children),Z=(N=(V=(E=O==null?void 0:O.compData)==null?void 0:E.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:V.contents)==null?void 0:N.map(J=>J.slice(1)),G=(M=(W=(j=(S=(L=O==null?void 0:O.compData)==null?void 0:L.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:S.contents)==null?void 0:j[0])==null?void 0:W[0])==null?void 0:M.label,H=(ae=(Q=(K=O==null?void 0:O.compData)==null?void 0:K.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Q.contents)==null?void 0:ae[0];if(X)y[G]=i(Z,H);else{const J=[];H=H.slice(1,H.length-1),H==null||H.forEach((rl,tl)=>{Z==null||Z.forEach(xe=>{J.push({key:rl.label+xe[0],value:xe[tl+1]})})}),y["form"+h]=J}}else{const X=(le=(z=O.compData)==null?void 0:z.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:le.contents;y.form={};const Z=[];X==null||X.forEach(G=>{G.key!==""&&(G={key:G==null?void 0:G.key,value:G==null?void 0:G.value},Z.push(G))}),y.form=Z}}),k.api){const O=await re.axios.post(k.api,{data:y,templateFileName:(u=k==null?void 0:k.extraContent)==null?void 0:u[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var x=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"}),D=O.headers["content-disposition"],I=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),C=I.exec(D),F=(($=(m=(r=k==null?void 0:k.extraContent)==null?void 0:r[0])==null?void 0:m.split("."))==null?void 0:$[0])+"."+((A=C[1].split("."))==null?void 0:A[1]),v=document.createElement("a"),b=window.URL.createObjectURL(x),_=/^["](.*)["]$/g;v.style.display="none",v.href=b,v.download=decodeURI(F.replace(_,"$1")),document.body.appendChild(v),v.click(),document.body.removeChild(v),window.URL.revokeObjectURL(b)}},g=async k=>{var I;const y=d.cloneDeep(k),x=y==null?void 0:y.map(async C=>{var u,r,m,$,A,O,h;const v=(u=(await re.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:C.method}})).data.result)==null?void 0:u[0],b=await re.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:v==null?void 0:v.id}}),_=await Y.getItemData((r=C==null?void 0:C.value)==null?void 0:r[0],sessionStorage.getItem("systemKey"),""),c=(m=b.data.result)==null?void 0:m[0];return{buttonName:($=v==null?void 0:v.key)==null?void 0:$.methodKey,api:(O=(A=c==null?void 0:c.value)==null?void 0:A.tableData)==null?void 0:O[0],content:_==null?void 0:_.filter(T=>T.comp!=="methodButton"),extraContent:(h=d.cloneDeep(C.value))==null?void 0:h.slice(1)}}),D=await Promise.all(x);s.value=D==null?void 0:D.filter(C=>C==null?void 0:C.extraContent),(I=s.value)==null||I.forEach(C=>{var F;C.api===""&&((F=C.content)==null||F.forEach(v=>{var b;v.comp=="Table"&&e.setExtraContents(Y.methodTableToContent(v.compData,(b=C.extraContent)==null?void 0:b[0]))}))})};return l.watch(()=>a.itemData,async()=>{t.value=="view"&&await g(d.cloneDeep(a.itemData))},{immediate:!0,deep:!0}),(k,y)=>(l.openBlock(),l.createElementBlock("div",Un,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,x=>(l.openBlock(),l.createElementBlock("div",null,[x.api!==""?(l.openBlock(),l.createElementBlock("div",{key:0,onClick:D=>f(x),class:"method-buttons"},l.toDisplayString(x.buttonName),9,Jn)):l.createCommentVNode("",!0)]))),256))]))}},Rn=ee._export_sfc(Pn,[["__scopeId","data-v-9df085f9"]]),Wn={};function zn(n,s){return" 567 "}const Mn=ee._export_sfc(Wn,[["render",zn]]),Gn={};function qn(n,s){return" 1212 "}const Zn=ee._export_sfc(Gn,[["render",qn]]),Hn=l.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:s}){const a=n,e=s,o=l.ref(1),t=l.computed(()=>{var x,D;return(x=a==null?void 0:a.stepConfig)!=null&&x.allowTrigger?o.value:(D=a==null?void 0:a.stepConfig)==null?void 0:D.active}),i=(x,D)=>{o.value=D,e("clickStep",x,D)},f=x=>q.getComponent(x),g=()=>{var D;const x=(D=a==null?void 0:a.stepList)==null?void 0:D.find((I,C)=>C+1===t.value);return console.log("findStep",x),x?x==null?void 0:x.children:[]},k=x=>{e("clickTrigger",x)},y=x=>{e("changeTrigger",x)};return(x,D)=>{var F,v,b,_,c;const I=l.resolveComponent("el-step"),C=l.resolveComponent("el-steps");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(C,{direction:(F=n.stepConfig)==null?void 0:F.direction,active:t.value,"finish-status":"success",simple:(v=n.stepConfig)==null?void 0:v.simple,"align-center":(b=n.stepConfig)==null?void 0:b.alignCenter},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.stepList,(u,r)=>(l.openBlock(),l.createBlock(I,{key:r,class:"step-item",onClick:m=>i(u,r+1)},{title:l.withCtx(()=>[l.renderSlot(x.$slots,"title",{title:u==null?void 0:u.title},void 0,!0)]),description:l.withCtx(()=>[l.renderSlot(x.$slots,"description",{description:u==null?void 0:u.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(_=n.stepConfig)!=null&&_.allowTrigger&&((c=n.stepConfig)!=null&&c.active)?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(g(),(u,r)=>(l.openBlock(),l.createElementBlock("div",{key:r,class:"step-cont-wrap"},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(f(u==null?void 0:u.type)),{modelValue:u.value,"onUpdate:modelValue":m=>u.value=m,onClickTrigger:k,onChangeTrigger:y,content:u==null?void 0:u.content},l.createSlots({_:2},[l.renderList(x.$slots,(m,$)=>({name:$,fn:l.withCtx(A=>[l.renderSlot(x.$slots,$,l.mergeProps({ref_for:!0},A||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):l.createCommentVNode("",!0)],64)}}}),Kn=ee._export_sfc(Hn,[["__scopeId","data-v-003d9390"]]),Qn=l.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:s}){const a=n,e=s,o=l.ref({}),t=l.ref([]),i=(f,g)=>{e("clickStep",f,g)};return l.watch(()=>a==null?void 0:a.itemData,f=>{var g,k;t.value=(g=f==null?void 0:f.find(y=>(y==null?void 0:y.key)==="stepList"))==null?void 0:g.contents,o.value=(k=f==null?void 0:f.find(y=>(y==null?void 0:y.key)==="stepConfig"))==null?void 0:k.contents},{immediate:!0}),(f,g)=>{const k=l.resolveComponent("svg-icon");return l.openBlock(),l.createBlock(Kn,{stepConfig:o.value,stepList:t.value,onClickStep:i},{icon:l.withCtx(()=>[l.createVNode(k,{name:"import"})]),title:l.withCtx(({title:y})=>[l.createTextVNode(l.toDisplayString(y),1)]),description:l.withCtx(({description:y})=>[l.createTextVNode(l.toDisplayString(y),1)]),_:1},8,["stepConfig","stepList"])}}}),Xn=l.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(s,a)=>{const e=l.resolveComponent("el-timeline-item"),o=l.resolveComponent("el-timeline");return l.openBlock(),l.createBlock(o,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.activities,(t,i)=>(l.openBlock(),l.createBlock(e,{key:i,timestamp:t.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"content",{content:t==null?void 0:t.content,timestamp:t==null?void 0:t.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Yn=ee._export_sfc(Xn,[["__scopeId","data-v-4172a886"]]),ea={class:"line-content"},la={class:"line-time"},na=l.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const s=n,a=l.ref({}),e=l.ref([]);return l.watch(()=>s==null?void 0:s.itemData,o=>{var t,i;e.value=(t=o==null?void 0:o.find(f=>(f==null?void 0:f.key)==="timeLineList"))==null?void 0:t.contents,a.value=(i=o==null?void 0:o.find(f=>(f==null?void 0:f.key)==="timeLineConfig"))==null?void 0:i.contents},{immediate:!0}),(o,t)=>(l.openBlock(),l.createBlock(Yn,{activities:e.value,timeLineConfig:a.value},{content:l.withCtx(({content:i,timestamp:f})=>[l.createElementVNode("span",ea,l.toDisplayString(i),1),l.createElementVNode("span",la,l.toDisplayString(f),1)]),_:1},8,["activities","timeLineConfig"]))}}),aa=ee._export_sfc(na,[["__scopeId","data-v-b4d9deed"]]),oa=l.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"}]),sa={TABLE:Y.ssTable,FORM:Ne,TABLEOPERATE:nn,FORMOPERATE:Ae,FOLD:cl._sfc_main,CALCULATOR:jn,METHODBUTTON:Rn,AVATARUPLOAD:$e.ssAvatar,SIGNATURE:$e._sfc_main,FORMTOP:Ne,STEP:Qn,STEPOPERATE:Nn,TIMELINE:aa,TIMELINEOPERATE:Vn,FORMTOPOPERATE:Ae,SIGNATUREOPERATE:Zn,AVATARUPLOADOPERATE:Mn};function We(n){return sa[n==null?void 0:n.toUpperCase()]||null}const R=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],P=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],te=l.ref(0),ra=n=>{const[s,a]=n.split(/=(.+)/),e=s.replace(/['"]/g,"").trim(),o=a.replace(/^['"]|['"]$/g,"");return{key:e,value:o}},he=n=>{try{return JSON.parse(n),!0}catch{return!1}},ta=n=>n.includes("$")&&n.trim().endsWith("(")?n+")":n,ca=n=>{let s=n;const a=[];let e="";for(const o of s)o.includes("{")||e.includes("{")||o.includes("[")||e.includes("[")||o.includes("【")||e.includes("【")||o.includes("(")||e.includes("(")||o.includes("(")||e.includes("(")||o.includes("/*")||e.includes("/*")?(e+=o.trim(),d.cloneDeep(e).split("{").length-1===d.cloneDeep(e).split("}").length-1&&d.cloneDeep(e).split("【").length-1===d.cloneDeep(e).split("】").length-1&&d.cloneDeep(e).split("[").length-1===d.cloneDeep(e).split("]").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("/*").length-1===d.cloneDeep(e).split("*/").length-1&&(a.push(e),e="")):a.push(o.trim());return a==null?void 0:a.filter(o=>o.includes("{"))},ia=n=>{var a;let s=[];return(a=ca(n.slice(1,-1)))==null||a.forEach(e=>{var t,i,f,g;let o=((i=(t=e.slice(1,-1))==null?void 0:t.split(","))==null?void 0:i.length)??1;(g=(f=e.slice(1,-1))==null?void 0:f.split(","))==null||g.forEach(k=>{var I,C,F,v,b,_,c,u,r,m,$,A,O;let y=k==null?void 0:k.split(":"),x=y!=null&&y[0]?(y==null?void 0:y[1].split("$").length)-1===1?((I=y==null?void 0:y[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"))+((C=y==null?void 0:y[1])==null?void 0:C.replace(/^"(.*)"$/,"$1")):Array.isArray((v=(F=y==null?void 0:y[1])==null?void 0:F.replace(/^"(.*)"$/,"$1"))==null?void 0:v.split("("))&&((c=(_=(b=y==null?void 0:y[1])==null?void 0:b.replace(/^"(.*)"$/,"$1"))==null?void 0:_.split("("))==null?void 0:c.length)>1?((u=y==null?void 0:y[0])==null?void 0:u.replace(/^"(.*)"$/,"$1"))+(($=(m=(r=y==null?void 0:y[1])==null?void 0:r.replace(/^"(.*)"$/,"$1"))==null?void 0:m.split("("))==null?void 0:$[0])+"()":(A=y==null?void 0:y[0])==null?void 0:A.replace(/^"(.*)"$/,"$1"):"",D=(y==null?void 0:y[1].split("$").length)-1===0?(O=y==null?void 0:y[1])==null?void 0:O.replace(/^"(.*)"$/,"$1"):"";te.value++,s.push({id:te.value,key:x,value:D,width:o,extraContent:y==null?void 0:y[1]})})}),s},ze=n=>{var s,a;try{const e=n.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(d.cloneDeep(e).split("{").length-1>1){let o=d.cloneDeep(e).replace(/^\{(.*)\}$/,"[$1]");if(he(o)&&!o.includes("$")||(o=o.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),he(o)){const t=JSON.parse(o);let i=[];return t==null||t.forEach(f=>{var g;(g=Object.entries(d.cloneDeep(f)))==null||g.forEach(k=>{te.value++,i.push({id:te.value,key:(k==null?void 0:k[0])??"",value:(k==null?void 0:k[1])===""?"":k==null?void 0:k[1],width:Object.keys(d.cloneDeep(f)).length})})}),i}else return e.trim().startsWith("{{")?ia(e.trim()):ve(o)}else if(he(e)){const o=JSON.parse(e);return Object.entries(o).map(([t,i])=>(te.value++,{id:te.value,key:t,value:i===""?"":i,width:1}))}else return((s=ve(e))==null?void 0:s.length)===0?e:(a=ve(e))==null?void 0:a.map(o=>({label:o.label,method:ta(o.method)}))}catch(e){return console.error("转换失败:",e),[]}},ve=n=>{n=n.trim().replace(/^\{|\}$/g,"").trim();const s=[];let a=0;for(;a<n.length;){const e=n.slice(a).match(/^\s*"([^"]+)"\s*:\s*/);if(!e)break;const o=e[1];a+=e[0].length;let t="",i=0,f=!1,g="";for(let k=a;k<n.length;k++){const y=n[k];if((y==='"'||y==="'")&&!f?(f=!0,g=y):y===g&&f&&(f=!1,g=""),!f&&((y==="{"||y==="("||y==="[")&&i++,(y==="}"||y===")"||y==="]")&&i--,y===","&&i===0||k===n.length-1)){t=n.slice(a,k+1).trim(),a=k+1;break}}s.push({label:o,method:t})}return s},ua=(n,s)=>{try{if(R!=null&&R.find(a=>(a==null?void 0:a.key)===s))return n.replace(/['"]/g,"").trim();if(d.cloneDeep(n).split("[").length-1>1){const a=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(a)}else{const a=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(he(a)){const e=JSON.parse(a);return Array.isArray(e)?e.map(o=>({label:o})):e}else return ze(d.cloneDeep(n))}}catch(a){return console.error("解析失败:",a),n}},pa=n=>({[n==null?void 0:n.key]:ua(n==null?void 0:n.value,n==null?void 0:n.key)}),da=n=>{try{if(d.cloneDeep(n).split("[").length-1>1){const s=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(a=>({label:a}))}catch(s){return console.error("解析失败:",s),n}},fa=n=>{const s=n.match(/\(([^)]+)\)/);return s?s[1]:""},ha=n=>{const s=n.match(/^([^(]+)\s*\(/);return s?s[1].trim():n},Be=n=>n.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(s=>s.trim()).filter(s=>s).join("/"),ma=n=>{var i,f;let s=[],a=[];const e=(i=d.cloneDeep(n))==null?void 0:i.map(g=>g==null?void 0:g.key),o=[...new Set((f=d.cloneDeep(e))==null?void 0:f.map(g=>fa(g)))];o==null||o.forEach(g=>{let k=n==null?void 0:n.filter(D=>D.key.includes(g));k==null||k.forEach(D=>{D!=null&&D.key.includes("Menus")&&(s.push({key:"GroupName",value:Be(D==null?void 0:D.value)}),a.push(Be(D==null?void 0:D.value)))});let y=n==null?void 0:n.filter(D=>D.key.includes(g)&&!(D!=null&&D.key.includes("Menus")));y=y==null?void 0:y.map(D=>(D.key=ha(D.key),D));const x={key:"GroupContents",value:y};s.push(x)});const t={key:"Menus",value:a};return s.unshift(t),s},Me=n=>{var s,a;if(Array.isArray(Object.keys(n))&&((s=Object.keys(n))==null?void 0:s.length)>0){let e=[];return(a=Object.entries(n))==null||a.forEach(([o,t])=>{var f,g;let i=[];if(i.push(o),((f=Object.keys(t))==null?void 0:f.length)>0){let k=[];(g=Me(t))==null||g.forEach(y=>{k.push(y)}),k==null||k.forEach(y=>{i.push(y)})}e.push(i)}),e}},ya=(n,s)=>{var e;let a=s;return Array.isArray(Object.keys(n))&&((e=Object.entries(n))==null||e.forEach(([o,t])=>{let i=[o];if(typeof t=="object"&&t!==null){let f=Me(t);f==null||f.forEach(g=>{i.push(g)})}a.push(i)})),a},ka=n=>{const s={};return n.forEach(e=>{const o=e.split("/");let t=s;o.forEach(i=>{t[i]||(t[i]={}),t=t[i]})}),ya(s,[])},Ge=n=>ka(n),ga=n=>{var s,a,e,o,t,i,f,g;try{const k=ge((a=(s=d.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")),y=(o=(e=d.cloneDeep(k))==null?void 0:e.filter(C=>!C.includes("/*")))==null?void 0:o.map(C=>ra(C)),x=ma(y),D=[];if(((t=x==null?void 0:x.find(C=>(C==null?void 0:C.key)==="Menus"))==null?void 0:t.value.length)===0)return!1;(i=d.cloneDeep(x))==null||i.forEach(C=>{var F,v,b,_,c;R!=null&&R.find(u=>{var r,m;return((r=u==null?void 0:u.key)==null?void 0:r.toUpperCase())===((m=C==null?void 0:C.key)==null?void 0:m.toUpperCase())})?D.push({comp:((F=R==null?void 0:R.find(u=>{var r,m;return((r=u==null?void 0:u.key)==null?void 0:r.toUpperCase())===((m=C==null?void 0:C.key)==null?void 0:m.toUpperCase())}))==null?void 0:F.value)??"",name:(v=C==null?void 0:C.value)==null?void 0:v.replace(/[’]|[‘]|[']/g,""),compData:[]}):P!=null&&P.find(u=>{var r,m;return((r=u==null?void 0:u.key)==null?void 0:r.toUpperCase())===((m=C==null?void 0:C.key)==null?void 0:m.toUpperCase())})&&((D==null?void 0:D.length)===0&&(b=C.key)!=null&&b.includes("Menus")&&D.push({comp:"Menu",name:"",compData:[]}),(_=D==null?void 0:D[(D==null?void 0:D.length)-1])!=null&&_.compData&&D[(D==null?void 0:D.length)-1].compData.push({key:(c=P==null?void 0:P.find(u=>{var r,m;return((r=u==null?void 0:u.key)==null?void 0:r.toUpperCase())===((m=C==null?void 0:C.key)==null?void 0:m.toUpperCase())}))==null?void 0:c.value,contents:C==null?void 0:C.value}))});let I=(f=d.cloneDeep(D))==null?void 0:f.map(C=>{var F;return C!=null&&C.compData&&(C.compData=(F=C==null?void 0:C.compData)==null?void 0:F.map(v=>{var b,_,c,u,r,m,$,A,O,h,T;if((v==null?void 0:v.key)==="formFlex")v.contents=((_=(b=v.contents)==null?void 0:b.replace(/[’]|[‘]|[']/g,""))==null?void 0:_.toUpperCase())!=="Vertical".toUpperCase();else if((v==null?void 0:v.key)==="groupContents")v.contents=(c=d.cloneDeep(v.contents))==null?void 0:c.map(B=>pa(d.cloneDeep(B)));else if(Array.isArray(v==null?void 0:v.contents))v.contents=Ge(v.contents);else if(((r=(u=v==null?void 0:v.contents)==null?void 0:u.trim())!=null&&r.startsWith("[")||($=(m=v.contents)==null?void 0:m.trim())!=null&&$.startsWith("【"))&&((O=(A=v.contents)==null?void 0:A.trim())!=null&&O.endsWith("]")||(T=(h=v.contents)==null?void 0:h.trim())!=null&&T.endsWith("】")))v.contents=da(d.cloneDeep(v.contents));else{if(!v.contents)return;v.contents=ze(d.cloneDeep(v.contents))}return v})),C});return I=(g=d.cloneDeep(I))==null?void 0:g.map(C=>{var F;return(C==null?void 0:C.comp)==="Group"&&(C.compData=(F=C.compData)==null?void 0:F.map(v=>{var _;let b=[];return(_=v.contents)==null||_.forEach(c=>{var u,r,m,$,A,O,h,T,B,p,w,E;if(R!=null&&R.find(V=>{var N,L,S;return((N=V==null?void 0:V.key)==null?void 0:N.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))b.push({comp:(u=R==null?void 0:R.find(V=>{var N,L,S;return((N=V==null?void 0:V.key)==null?void 0:N.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:u.value,name:(m=(r=Object.values(c))==null?void 0:r[0])==null?void 0:m.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(P!=null&&P.find(V=>{var N,L,S;return((N=V==null?void 0:V.key)==null?void 0:N.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())})){if((b==null?void 0:b.length)===0)return;($=b==null?void 0:b[(b==null?void 0:b.length)-1])!=null&&$.compData&&b[(b==null?void 0:b.length)-1].compData.push({key:(A=P==null?void 0:P.find(V=>{var N,L,S;return((N=V==null?void 0:V.key)==null?void 0:N.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:A.value,contents:(O=Object.values(c))==null?void 0:O[0]})}else if((T=(h=Object.keys(c))==null?void 0:h[0])!=null&&T.includes("$")){const V=(p=(B=Object.keys(d.cloneDeep(c)))==null?void 0:B[0])==null?void 0:p.split("$");b[(b==null?void 0:b.length)-1].compData.push({key:(w=P==null?void 0:P.find(N=>{var L,S;return((L=N==null?void 0:N.key)==null?void 0:L.toUpperCase())===((S=V==null?void 0:V[0])==null?void 0:S.toUpperCase())}))==null?void 0:w.value,contents:(E=Object.values(c))==null?void 0:E[0],selectLabel:V==null?void 0:V[1]})}return c}),v.contents=b,v})),C}),I}catch{return!1}},Te=l.ref(0),qe=n=>{const s=[];let a=null;for(let e=0;e<n.length;e++){const o=n[e];if(Array.isArray(o))a&&(a.children=qe(o));else{const t={label:o};s.push(t),a=t}}return s},Ze=n=>{let s=0;for(const a of n)s++,a.children&&(s+=Ze(a.children));return s},He=(n,s,a=[])=>{let e=0;for(const o of s){if(e>=n.length)break;const t=[...n[e]];if(a.push(t),e++,o.children&&o.children.length>0){const i=[];He(n.slice(e),o.children,i),i.length>0&&(t.push(i),e+=Ze(o.children))}}return a},ba=(n,s)=>{let a=[];return n==null||n.forEach(o=>{o.some(t=>Array.isArray(t))?a.push(...o):a.push(o)}),He(a,s)},_e=n=>{const s={label:n[0].trim()};if(n.length>1){const a=n.slice(1);a.length===1&&Array.isArray(a[0])?s.children=a[0].map(e=>Array.isArray(e)?_e(e):{label:e.trim()}):s.children=a.map(e=>Array.isArray(e)?_e(e):{label:e.trim()})}return s},Ie=n=>{let s=n.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return s=s.replace(/:}(?=,|]|}|$)/g,':""}'),s=s.replace(/:,(?=\s*")/g,':"",'),s=s.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(a,e,o)=>`"${e}://${o}"`),s=s.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),s},va=n=>{var a;return n.some(e=>!Array.isArray(e))?n:(a=d.cloneDeep(n))==null?void 0:a.map(e=>{let o=[];return e.some(t=>Array.isArray(t))?e==null||e.forEach(t=>{Array.isArray(t)&&o.push(_e(t))}):e.some(t=>t.includes("["))?o.push(e):o=e.map(t=>({label:t.trim()})),o})},Ke=(n,s,a)=>{let e=n,o=a,t=s;return t.children&&(Array.isArray(o[o.length-1])?o[o.length-1].push(e[0]):o.push(e[0]),e.shift(),t=t.children),Array.isArray(t)&&t.forEach(i=>{if(i.children){const f=Ke(e,i,o);o=f[0],e=f[1]}}),[o,e]},Ca=(n,s)=>{let a=n,e=[];return s.length>0?s==null||s.forEach(o=>{let t=a==null?void 0:a[0];a.shift();const i=Ke(d.cloneDeep(a),o,t);t=i[0],a=i[1],e.push(t)}):e=a,e},Ee=(n,s)=>{const a=va(d.cloneDeep(n));return Ca(a,s)},Da=n=>{const s=[];let a=0;const e=n.length;for(;a<e;){const o=n[a];o.key==="tableColumns"&&a+1<e&&n[a+1].key==="tableContents"?(s.push({comp:"Table",compData:[o,n[a+1]],name:""}),a+=2):(s.push(o),a+=1)}return s},Qe=n=>Ee([n],[]),ke=n=>{const s=[];return n==null||n.forEach(a=>a==null?void 0:a.forEach(o=>{var t,i;Te.value++,s.push({id:Te.value,key:(t=Object.keys(o))==null?void 0:t[0],value:(i=Object.values(o))==null?void 0:i[0],width:a.length})})),s},we=n=>{let s=Da(n);return s=s==null?void 0:s.map(a=>{var e,o,t,i;if(a.comp==="Table")(e=a.compData)!=null&&e.find(f=>(f==null?void 0:f.key)==="header")||(a.compData=(o=a.compData)==null?void 0:o.map(f=>(f.key==="tableColumns"?f={key:"header",contents:Ee(f.value,[])}:f={key:f.key,contents:f.value},f)),a.compData.push({key:"extraButton",contents:[{label:"新增"}]}),a.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(a.key==="form"){const f=(t=a==null?void 0:a.value)==null?void 0:t.map(g=>(Array.isArray(g)||(g=[g]),g));a={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(f)}],name:""}}else if(a.key==="formTop"){const f=(i=a==null?void 0:a.value)==null?void 0:i.map(g=>(Array.isArray(g)||(g=[g]),g));a={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(f)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return a}),s},_a=(n,s)=>{var f,g,k,y,x,D;const a=[],e=qe((g=(f=n==null?void 0:n.find(I=>I.key==="tableIndex"))==null?void 0:f.value)==null?void 0:g[0]);a.push({key:"tableIndexColumn",contents:s}),a.push({key:"tableIndex",contents:e});let o=[];const t=(k=n==null?void 0:n.find(I=>I.key==="tableColumns"))==null?void 0:k.value;t.length===1&&!(t!=null&&t[0].some(I=>Array.isArray(I)))?o=(y=t==null?void 0:t[0])==null?void 0:y.map(I=>({label:I})):o=Ee((x=n==null?void 0:n.find(I=>I.key==="tableColumns"))==null?void 0:x.value,e),a.push({key:"header",contents:o});const i=ba((D=n==null?void 0:n.find(I=>I.key==="tableContents"))==null?void 0:D.value,e);return a.push({key:"tableContents",contents:i}),a.push({key:"extraButton",contents:[{label:"新增"}]}),a.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),a},Xe=n=>n.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(s,a,e)=>{const o=Xe(e);return`"${a}",${o}`}),de=n=>{const s=n.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Xe(s).replace(/^"(.*)"$/,"$1")},Ea=n=>{const s=new Set;return n.filter(a=>{const e=JSON.stringify(a);return s.has(e)?!1:s.add(e)})},Ve=n=>{var a;let s=[];return(a=d.cloneDeep(n))==null||a.forEach(e=>{var o;(o=e.contents)==null||o.forEach(t=>{s.push(t)})}),s=Ea(s),s.push({label:"操作"}),[s]},xa=(n,s)=>n.reduce((a,e,o)=>{const t=Math.floor(o/s);return a[t]||(a[t]=[]),a[t].push(e),a},[]),Ye=n=>n.reduce((s,a)=>a.children&&a.children.length>0?s+Ye(a.children):s+1,0),$a=(n,s)=>{var e;let a=[];return(e=xa(n,Ye(s==null?void 0:s[0])-1))==null||e.forEach(o=>{let t=[];o.forEach(i=>{var f;Array.isArray(i.contents)?(f=i.contents)==null||f.forEach(g=>{t.push(g)}):t.push(i.contents)}),a.push(t)}),[a]},Na=["方法体","输入","输出"],Oe=l.ref(1),ge=n=>{let s;n.replaceAll(" ",`\r
2
+ `).includes(`\r
3
+ `)?s=n.replaceAll(" ",`\r
4
+ `).split(`\r
5
+ `).filter(o=>o.trim()!==""):s=n.replaceAll(" ",`\r
6
+ `).split(`
7
+ `).filter(o=>o.trim()!=="");const a=[];let e="";for(const o of s)o.includes("{")||e.includes("{")||o.includes("[")||e.includes("[")||o.includes("【")||e.includes("【")||o.includes("(")||e.includes("(")||o.includes("(")||e.includes("(")||o.includes("/*")||e.includes("/*")?(e+=o.trim(),d.cloneDeep(e).split("{").length-1===d.cloneDeep(e).split("}").length-1&&d.cloneDeep(e).split("【").length-1===d.cloneDeep(e).split("】").length-1&&d.cloneDeep(e).split("[").length-1===d.cloneDeep(e).split("]").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("/*").length-1===d.cloneDeep(e).split("*/").length-1&&e[e.length-1]!==","&&(a.push(e.replace(/\/\*[\s\S]*?\*\//g,"")),e="")):a.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return a},el=n=>{const[s,a]=n.split(/=(.+)/),e=s.replace(/['"]/g,"").trim(),o=a.replace(/^['"]|['"]$/g,"");return{key:e,value:o}},be=n=>{let s;n!=null&&n.includes(":")?s=n.split(":").filter(o=>o.trim()!==""):s=n==null?void 0:n.split(":").filter(o=>o.trim()!=="");const a=[];let e="";for(const o of s)o.includes("{")||e.includes("{")||o.includes("[")||e.includes("[")||o.includes("【")||e.includes("【")||o.includes("(")||e.includes("(")||o.includes("(")||e.includes("(")||o.includes("/*")||e.includes("/*")?(e=e!==""?e+":"+o.trim():o.trim(),d.cloneDeep(e).split("{").length-1===d.cloneDeep(e).split("}").length-1&&d.cloneDeep(e).split("【").length-1===d.cloneDeep(e).split("】").length-1&&d.cloneDeep(e).split("[").length-1===d.cloneDeep(e).split("]").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("(").length-1===d.cloneDeep(e).split(")").length-1&&d.cloneDeep(e).split("/*").length-1===d.cloneDeep(e).split("*/").length-1&&(a.push(e.replace(/\/\*[\s\S]*?\*\//g,"")),e="")):a.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return a},Aa=n=>/^[\x00-\x7F]*$/.test(n),ll=n=>{var o,t;const s=(o=n.map(i=>{var g,k;let f=(k=(g=i.key.split("("))==null?void 0:g[1])==null?void 0:k.trim();return f==null?void 0:f.slice(0,f.length-1)}))==null?void 0:o.filter(i=>i),a=s==null?void 0:s.map(i=>{var g;return(g=be(i))==null?void 0:g.map(k=>{var y;if(k.includes("{")){let x=(y=k.split(":"))==null?void 0:y[0];k=x.slice(1,x.length)}return k})}).filter(i=>i.length!==0),e=(t=a==null?void 0:a.filter(i=>i.length!==0))==null?void 0:t.map(i=>{let f="";return i.forEach(g=>{g.includes("{")||(f=f===""?f+d.cloneDeep(g):f+"/"+d.cloneDeep(g))}),f});return Ge([...new Set(e)])},nl=n=>{var a,e,o,t,i,f,g,k;const s=(e=(a=n.split("("))==null?void 0:a[1])==null?void 0:e.trim();return((o=be(s.slice(0,s.length-1)))==null?void 0:o.length)>0?s.slice(0,s.length-1):(k=(g=(f=(i=(t=n.split("("))==null?void 0:t[1])==null?void 0:i.trim())==null?void 0:f.split(")"))==null?void 0:g[0])==null?void 0:k.trim()},Ba=n=>{var o;if(!n)return;const s=nl(n),a=(o=be(s))==null?void 0:o.map(t=>{var i;if(t.includes("{")){let f=(i=t.split(":"))==null?void 0:i[0];t=f.slice(1,f.length)}return t});let e="";return a.forEach(t=>{t.includes("{")||(e=e===""?e+d.cloneDeep(t):e+"/"+d.cloneDeep(t))}),e},Ta=n=>{const s=n.match(/\[(.*)\]/s);if(s){const a=`[${s[1]}]`;try{const e=a.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(e)}catch{return JSON.parse(a.replace(/\[(\s*)(,|])/g,'[""$2').replace(/([^\[\],\s]+)/g,'"$1"').replace(/""/g,'"'))}}},Ia=n=>{var t;if(!n)return;const s=nl(n);let a=[],e=[],o=[];return(t=be(s))==null||t.forEach(i=>{var f;i.includes("[")?a.push(Ta(i)):i.includes("{")&&(Aa((f=i.slice(1,i.length-1).split(":"))==null?void 0:f[0])?o.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):Y.IsJson(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?e.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):i.includes("$"))}),[a,e,o]},wa=n=>{const s=[];let a="";for(const e of n)e.includes("[")||a.includes("[")||e.includes("/*")||a.includes("/*")?(a+=e.trim(),d.cloneDeep(a).split("{").length-1===d.cloneDeep(a).split("}").length-1&&d.cloneDeep(a).split("【").length-1===d.cloneDeep(a).split("】").length-1&&d.cloneDeep(a).split("[").length-1===d.cloneDeep(a).split("]").length-1&&d.cloneDeep(a).split("(").length-1===d.cloneDeep(a).split(")").length-1&&d.cloneDeep(a).split("(").length-1===d.cloneDeep(a).split(")").length-1&&d.cloneDeep(a).split("/*").length-1===d.cloneDeep(a).split("*/").length-1&&(s.push(a.replace(/\/\*[\s\S]*?\*\//g,"")),a="")):s.push(e.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Se=n=>{var i,f;const s=[],a=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,e=n.match(a);if(e){const g=e[1]||e[3],k=e[2]||e[4];if(g&&k){const y=`${g}/${k}`;s.push(y)}}const o=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,t=n.match(o);return t?s.push(t[0].replace(/\)+$/,"")):(n==null?void 0:n.split(",").length)===2&&s.push((f=(i=n==null?void 0:n.split(","))==null?void 0:i[1])==null?void 0:f.trim()),s},Ce=n=>{let s=n.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return s=s.replace(/\[\s*,/g,'[{"": ""},'),s=s.replace(/,\s*,/g,', {"": ""},'),s=s.replace(/,\s*\]/g,', {"": ""}]'),s=s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(a,e,o,t,i)=>o.includes("'")?`:${e}${o}${t}${i}`:`:${e}"${o}"${t}${i}`),s=s.replace(/:\s*([,\]}])/g,': ""$1'),s},Va=n=>!/\[[^\]]*\{[^\]]*\]/.test(n),Oa=n=>{const s=d.cloneDeep(n).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),a=s?`${s[2]}/${s[3]}`:null,e=n.match(/\[\{([^}]+)\}\]/),o=e==null?void 0:e[1].replaceAll(":","").replaceAll("'",'"').trim();let t=null;if(o)try{t=JSON.parse(o)}catch(i){console.error("解析数组失败:",i)}return[a,t]},Sa=n=>{var f,g,k,y,x,D,I,C,F,v,b;let s=[],a=[],e={},o=[],t=n.trim(),i=[];if(t.trim().includes("输入")&&t.trim().includes("输出")){let _=[],c=n.trim();c=d.cloneDeep(c).slice(1,d.cloneDeep(c).length-1);const u=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(C=c.match(u))==null||C.forEach((r,m)=>{var O;const $=r;let A=[];(O=$.slice(1,$.length-1).replace(":","$:").split("$:"))==null||O.forEach(h=>{var T,B,p;if(Na.find(w=>h.includes(w)))if(!h.includes("=="))A.push({key:"tableIndexColumn",contents:h.replaceAll("'","")});else{let w=[];const E=h.replaceAll("'","").split("==");w.push(E==null?void 0:E[0]),E!=null&&E[1].includes("[")?w.push(E==null?void 0:E[1].trim().slice(1,(E==null?void 0:E[1].length)-1).split(",")):w.push([E==null?void 0:E[1]]),A.push({key:"header",contents:[(B=(T=Qe([w]))==null?void 0:T[0])==null?void 0:B[0]]})}else{let w=h.trim().replaceAll(",",",").replaceAll("'",'"');if(m%3===0)w.slice(1,w.length-1).includes("[")?_.push({key:"tableIndex",contents:[{label:w}]}):_.push({key:"tableIndex",contents:[{label:w.slice(1,w.length-1)}]});else if((w==null?void 0:w[0])==="{"){let E=[];const V=w.slice(1,w.length-1).split(":");if(V.every(N=>Y.IsJson(N.trim()))){E.push({key:"tableContentName",contents:"详情"});let N=[];V.forEach((L,S)=>{if(S===0){const j=JSON.parse(L).map(W=>({label:W}));j.push({label:"操作"}),N.push({key:"header",contents:j})}else N.push({key:"tableContents",contents:JSON.parse(L)})}),N.push({key:"extraButton",contents:[{label:"新增"}]}),N.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),E.push({comp:"Table",compData:N,name:""}),_.push({key:"tableContents",contents:[E]})}}else{let E=w;E.slice(1,E.length-1).includes("[")||E.slice(1,E.length-1).includes("{")?Y.IsJson(Ie(E.replace(/\s+/g,"")))&&((p=JSON.parse(Ie(E.replace(/\s+/g,""))))==null||p.map(V=>{if(Array.isArray(V==null?void 0:V[0])){const N=[];N.push({key:"tableContentName",contents:"详情"});let L=[];V.forEach(S=>{S.forEach(j=>{var W,M;Oe.value++,L.push({id:Oe.value,key:(W=Object.keys(j))==null?void 0:W[0],value:(M=Object.values(j))==null?void 0:M[0],width:S.length})})}),N.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:L}],name:""}),_.push({key:"tableContents",contents:[N]})}else _.push({key:"tableContents",contents:V==null?void 0:V[0]})})):_.push({key:"tableContents",contents:E.trim().slice(1,E.length-1)})}}}),_.push(A==null?void 0:A[0])}),i.push({key:"tableIndex",contents:(F=_==null?void 0:_.filter(r=>(r==null?void 0:r.key)==="tableIndex"))==null?void 0:F.map(r=>{var m;return(m=r.contents)==null?void 0:m[0]})}),i.push({key:"extraButton",contents:[{label:"新增"}]}),i.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),i.push({key:"tableIndexColumn",contents:(b=(v=_==null?void 0:_.filter(r=>(r==null?void 0:r.key)==="tableIndexColumn"))==null?void 0:v[0])==null?void 0:b.contents}),i.push({key:"header",contents:Ve(_==null?void 0:_.filter(r=>(r==null?void 0:r.key)==="header"))}),i.push({key:"tableContents",contents:$a(_==null?void 0:_.filter(r=>(r==null?void 0:r.key)==="tableContents"),Ve(_==null?void 0:_.filter(r=>(r==null?void 0:r.key)==="header")))})}else{const _=(f=t.trim().split(",$"))==null?void 0:f[0];_[0]==="["?t=_.slice(1,_.length-1):t.includes(",$")&&(t=(g=t.trim().split(",$"))==null?void 0:g[0]);let c;if(t.includes("$")){t=d.cloneDeep(t),e.method=(y=(k=d.cloneDeep(t).trim())==null?void 0:k.slice(1,t.length).split("("))==null?void 0:y[0];let u;Se(t.slice(1,t.length-2)).length>1?u=Se(t.slice(1,t.length-2)):u=Oa(t),e.value=u}else Y.IsJson("["+Ce(t).replaceAll("'",'"')+"]")&&!Va(Ce(t).replaceAll("'",'"'))?(t=JSON.parse("["+Ce(t).replaceAll("'",'"')+"]"),o=t):c=(D=(x=d.cloneDeep(t).split("}"))==null?void 0:x.filter(u=>u!==""))==null?void 0:D.map(u=>{let r=u;return r[0]===","?r=r.slice(2,r.length):r=r.slice(1,r.length),r});(I=d.cloneDeep(c))==null||I.forEach(u=>{var r,m,$,A,O,h,T,B,p,w,E,V,N,L,S;if(u.includes("==")){const j=(V=u==null?void 0:u.split(":"))==null?void 0:V[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),W=(N=u==null?void 0:u.split(":"))==null?void 0:N[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(Y.IsJson(W.trim())?a.push(JSON.parse(W.trim())):a.push(JSON.parse(W.replaceAll("'",'"').trim())),j[0]!=="["){let M=[];Y.IsJson("["+de(j)+"]")?M.push(JSON.parse("["+de(j)+"]")):Y.IsJson("["+de(j).replaceAll("==",",")+"]")&&M.push(JSON.parse("["+de(j).replaceAll("==",",")+"]"));const K=d.cloneDeep(M);K.push(["操作"]),s.push(K)}else{const M=(L=j.slice(1,j.length-1).replaceAll(",",",|"))==null?void 0:L.split("|"),K=(S=wa(M))==null?void 0:S.map(z=>((z==null?void 0:z[z.length-1])===","&&(z=z.slice(0,z.length-1)),z));let Q=[];K==null||K.forEach(z=>{var X,Z,G,H;let le=[];le.push((X=z.split("=="))==null?void 0:X[0].trim().replace(/^"|"$/g,"")),((Z=z.split("=="))==null?void 0:Z[1].trim()[0])==="["?le.push(JSON.parse((G=z.split("=="))==null?void 0:G[1].trim())):le.push([JSON.parse((H=z.split("=="))==null?void 0:H[1].trim())]),Q.push(le)});const ae=d.cloneDeep(Q);ae.push(["操作"]),s.push(ae)}}else{if(Y.IsJson((r=u==null?void 0:u.split(":"))==null?void 0:r[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let j=JSON.parse((m=u==null?void 0:u.split(":"))==null?void 0:m[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(j)||(j=[j]),j.push("操作"),s.push(j)}Y.IsJson((O=(A=($=u==null?void 0:u.split(":"))==null?void 0:$[1])==null?void 0:A.replace(/^"|"$/g,"'"))==null?void 0:O.replace(/'([^']+)'/g,'"$1"'))?a.push(JSON.parse((h=u==null?void 0:u.split(":"))==null?void 0:h[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):Y.IsJson((w=(p=(B=(T=u==null?void 0:u.split(":"))==null?void 0:T[1])==null?void 0:B.replace(/^"|"$/g,"'"))==null?void 0:p.replaceAll("'",'"'))==null?void 0:w.replace(/'([^']+)'/g,'"$1"'))&&a.push(JSON.parse((E=u==null?void 0:u.split(":"))==null?void 0:E[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[s,a,i,e,o]},Fa=n=>{const s=[],a=Ba(n==null?void 0:n.key),e=Ia(n==null?void 0:n.key),o=Sa(n==null?void 0:n.value),t=e==null?void 0:e[0],i=o==null?void 0:o[4],f=e==null?void 0:e[1],g=e==null?void 0:e[2],k=o==null?void 0:o[0],y=o==null?void 0:o[1],x=o==null?void 0:o[2],D=o==null?void 0:o[3];return a&&s.push({key:"contentPath",value:a}),(t==null?void 0:t.length)>0&&s.push({key:"tableIndex",value:t}),D&&s.push({key:"extraButton",value:D}),(i==null?void 0:i.length)>0&&s.push({key:"form",value:i}),(f==null?void 0:f.length)>0&&s.push({key:"formTop",value:f}),(g==null?void 0:g.length)>0&&s.push({key:"extra",value:g}),(x==null?void 0:x.length)>0&&s.push({comp:"Table",compData:x,name:""}),(k==null?void 0:k.length)>0&&s.push({key:"tableColumns",value:k}),(y==null?void 0:y.length)>0&&s.push({key:"tableContents",value:y}),s},La=n=>{let s=[],a=[];n==null||n.forEach(o=>{Array.isArray(o)&&(o==null||o.forEach(t=>{var i;t.comp==="FormTop"&&((i=t.compData)==null||i.forEach(f=>{(f==null?void 0:f.key)==="formContent"&&(a=[...a,...f.contents])}))}))});const e=a.reduce((o,t)=>o.find(f=>(f==null?void 0:f.key)===(t==null?void 0:t.key))?o:o.concat([t]),[]);return e.length!==0&&s.push([{comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:e},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}]}]),n==null||n.forEach(o=>{if(Array.isArray(o)){const t=o.filter(i=>i.comp!=="FormTop");s.push(t)}else o.comp!=="FormTop"&&s.push(o)}),s},ja=(n,s)=>{const a=s.split("/");let e=[];return n==null||n.forEach(o=>{var f,g,k,y,x,D,I,C,F,v,b;const t=[],i=(g=(f=o.find(_=>_.key==="tableIndex"))==null?void 0:f.value)==null?void 0:g[0];if(i&&!i.some(_=>Array.isArray(_))){const _=(y=(k=o.find(c=>c.key==="tableColumns"))==null?void 0:k.value)==null?void 0:y[0];t.push({key:"tableIndexColumn",contents:a[a.length-1]}),t.push({key:"tableIndex",contents:i==null?void 0:i.map(c=>({label:c}))}),t.push({key:"extraButton",contents:[{label:"新增"}]}),t.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(_)&&_.some(c=>Array.isArray(c))?t.push({key:"header",contents:Qe(_)}):t.push({key:"header",contents:Array.isArray(_)?_==null?void 0:_.map(c=>({label:c})):[_].map(c=>({label:c}))}),t.push({key:"tableContents",contents:Array.isArray(_)?(D=(x=o.find(c=>c.key==="tableContents"))==null?void 0:x.value)==null?void 0:D[0]:(F=(C=(I=o.find(c=>c.key==="tableContents"))==null?void 0:I.value)==null?void 0:C[0])==null?void 0:F.map(c=>[c])}),e.push({comp:"Table",name:"",compData:t}),o!=null&&o.find(c=>(c==null?void 0:c.key)==="formTop")&&e.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(v=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="formTop"))==null?void 0:v.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else i?(e.push({comp:"Table",name:"",compData:_a(o,a[a.length-1])}),o!=null&&o.find(_=>(_==null?void 0:_.key)==="formTop")&&e.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(b=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="formTop"))==null?void 0:b.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):o.some(_=>_.key==="extra")?e.push({comp:"calculator",name:"",compData:we(o)}):e.push(we(o))}),La(e)},Ua=(n,s)=>{var o,t;const a=n.map(i=>i.filter(f=>f.key!=="contentPath"));return{comp:"Group",compData:[{contents:ja(a,s),key:"groupContents"}],name:(t=(o=n[0])==null?void 0:o.find(i=>i.key==="contentPath"))==null?void 0:t.value}},Ja=n=>{var o;const s=[],a=d.cloneDeep(n).map(t=>{var i;if(t!=null&&t.find(f=>(f==null?void 0:f.key)==="contentPath"))return(i=t==null?void 0:t.find(f=>(f==null?void 0:f.key)==="contentPath"))==null?void 0:i.value}).filter(t=>t!==""),e=[...new Set(a)];return(o=e==null?void 0:e.filter(t=>t))==null||o.forEach(t=>{var i;s.push(Ua((i=d.cloneDeep(n))==null?void 0:i.filter(f=>f.find(g=>g.key==="contentPath"&&g.value===t)),t))}),s},Pa=n=>{let s=[];s.push({comp:"Menu",compData:[{contents:ll(d.cloneDeep(n)),key:"menuContents"}],name:""});const a=n.map(e=>Fa(e)).filter(e=>e.length!==0);return s=[...s,...Ja(a)],s},Ra=n=>{var s,a,e,o,t;try{const i=(e=ge((a=(s=d.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")))==null?void 0:e.filter(k=>k!==""),f=(t=(o=d.cloneDeep(i))==null?void 0:o.filter(k=>!k.includes("/*")))==null?void 0:t.map(k=>el(k));return Pa(f)}catch{return!1}},fe=l.ref(0),De=l.ref(0),Wa=n=>{const s=n.trim().replace(/^'|'$/g,""),a=/((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g,e={};let o;for(;(o=a.exec(s))!==null;){const t=o[1];let i=o[2].trim();(i.match(/\[/g)||[]).length!==(i.match(/\]/g)||[]).length&&(i=i==null?void 0:i.replace(/]$/,"")),e[t]?(e[t+De.value]&&De.value++,e[t+De.value]=t+"="+i):e[t]=t+"="+i}return e},al=n=>{const[s,a]=n.split("=").map(t=>t.trim()),e=s.replace(/['"]/g,""),o=a.replace(/^['"]|['"]$/g,"");return{key:e,value:o}},za=n=>{var i;let s=[];const[a,e]=n.split(/=(.+)/),o=a.replace(/['"]/g,"").trim(),t=e.replace(/^['"]|['"]$/g,"");return(i=Object.values(Wa(t)))==null||i.forEach(f=>{s.push(al(f))}),{key:o,value:s}},me=n=>{try{return JSON.parse(n),!0}catch{return!1}},ol=n=>{try{const s=n.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(d.cloneDeep(s).split("{").length-1>1){let a=d.cloneDeep(s).replace(/^\{(.*)\}$/,"[$1]");if(me(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),me(a)){const e=JSON.parse(a);let o=[];return e==null||e.forEach(t=>{var i;(i=Object.entries(d.cloneDeep(t)))==null||i.forEach(f=>{fe.value++,o.push({id:fe.value,key:(f==null?void 0:f[0])??"",value:(f==null?void 0:f[1])===""?"":f==null?void 0:f[1],width:Object.keys(d.cloneDeep(t)).length})})}),o}else return console.error("转换类型不正确:"),[]}else if(me(s)){const a=JSON.parse(s);return Object.entries(a).map(([e,o])=>(fe.value++,{id:fe.value,key:e,value:o===""?"":o,width:1}))}else return s}catch(s){return console.error("转换失败:",s),[]}},Ma=(n,s)=>{try{if(R!=null&&R.find(a=>(a==null?void 0:a.key)===s))return JSON.parse(n.replace(/[’]|[‘]|[']/g,'"'));if(d.cloneDeep(n).split("[").length-1>1){const a=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(a)}else{const a=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(me(a)){const e=JSON.parse(a);return Array.isArray(e)?e.map(o=>({label:o})):e}else return ol(d.cloneDeep(n))}}catch(a){return console.error("解析失败:",a),n}},Ga=n=>({[n==null?void 0:n.key]:Ma(n==null?void 0:n.value,n==null?void 0:n.key)}),qa=n=>{try{if(d.cloneDeep(n).split("[").length-1>1){const s=d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(d.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(a=>({label:a}))}catch(s){return console.error("解析失败:",s),n}},sl=n=>{var s,a,e,o,t,i;try{const f=ge((a=(s=d.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")),g=(e=d.cloneDeep(f))==null?void 0:e.map(x=>{var I,C;let D=(C=(I=d.cloneDeep(x))==null?void 0:I.split("="))==null?void 0:C[0];return D!=null&&D.includes("GroupContents")?za(x):al(x)}),k=[];(o=d.cloneDeep(g))==null||o.forEach(x=>{var D,I,C,F,v;R!=null&&R.find(b=>{var _,c;return((_=b==null?void 0:b.key)==null?void 0:_.toUpperCase())===((c=x==null?void 0:x.key)==null?void 0:c.toUpperCase())})?k.push({comp:((D=R==null?void 0:R.find(b=>{var _,c;return((_=b==null?void 0:b.key)==null?void 0:_.toUpperCase())===((c=x==null?void 0:x.key)==null?void 0:c.toUpperCase())}))==null?void 0:D.value)??"",name:(I=x==null?void 0:x.value)==null?void 0:I.replace(/[’]|[‘]|[']/g,""),compData:[]}):P!=null&&P.find(b=>{var _,c;return((_=b==null?void 0:b.key)==null?void 0:_.toUpperCase())===((c=x==null?void 0:x.key)==null?void 0:c.toUpperCase())})&&((k==null?void 0:k.length)===0&&(C=x.key)!=null&&C.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(F=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&F.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(v=P==null?void 0:P.find(b=>{var _,c;return((_=b==null?void 0:b.key)==null?void 0:_.toUpperCase())===((c=x==null?void 0:x.key)==null?void 0:c.toUpperCase())}))==null?void 0:v.value,contents:x==null?void 0:x.value}))}),console.log("newContents",k);let y=(t=d.cloneDeep(k))==null?void 0:t.map(x=>{var D;return x!=null&&x.compData&&(x.compData=(D=x==null?void 0:x.compData)==null?void 0:D.map(I=>{var C,F,v,b,_,c,u,r,m,$,A;if((I==null?void 0:I.key)==="formFlex")I.contents=((F=(C=I.contents)==null?void 0:C.replace(/[’]|[‘]|[']/g,""))==null?void 0:F.toUpperCase())!=="Vertical".toUpperCase();else if((I==null?void 0:I.key)==="groupContents")I.contents=(v=d.cloneDeep(I.contents))==null?void 0:v.map(O=>Ga(d.cloneDeep(O)));else if(((_=(b=I.contents)==null?void 0:b.trim())!=null&&_.startsWith("[")||(u=(c=I.contents)==null?void 0:c.trim())!=null&&u.startsWith("【"))&&((m=(r=I.contents)==null?void 0:r.trim())!=null&&m.endsWith("]")||(A=($=I.contents)==null?void 0:$.trim())!=null&&A.endsWith("】")))I.contents=qa(d.cloneDeep(I.contents));else{if(!I.contents)return;I.contents=ol(d.cloneDeep(I.contents))}return I})),x});return y=(i=d.cloneDeep(y))==null?void 0:i.map(x=>{var D;return(x==null?void 0:x.comp)==="Group"&&(x.compData=(D=x.compData)==null?void 0:D.map(I=>{var F;let C=[];return(F=I.contents)==null||F.forEach(v=>{var b,_,c,u,r,m,$,A,O,h,T,B;if(R!=null&&R.find(p=>{var w,E,V;return((w=p==null?void 0:p.key)==null?void 0:w.toUpperCase())===((V=(E=Object.keys(v))==null?void 0:E[0])==null?void 0:V.toUpperCase())}))C.push({comp:(b=R==null?void 0:R.find(p=>{var w,E,V;return((w=p==null?void 0:p.key)==null?void 0:w.toUpperCase())===((V=(E=Object.keys(v))==null?void 0:E[0])==null?void 0:V.toUpperCase())}))==null?void 0:b.value,name:(c=(_=Object.values(v))==null?void 0:_[0])==null?void 0:c.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(P!=null&&P.find(p=>{var w,E,V;return((w=p==null?void 0:p.key)==null?void 0:w.toUpperCase())===((V=(E=Object.keys(v))==null?void 0:E[0])==null?void 0:V.toUpperCase())})){if((C==null?void 0:C.length)===0)return;(u=C==null?void 0:C[(C==null?void 0:C.length)-1])!=null&&u.compData&&C[(C==null?void 0:C.length)-1].compData.push({key:(r=P==null?void 0:P.find(p=>{var w,E,V;return((w=p==null?void 0:p.key)==null?void 0:w.toUpperCase())===((V=(E=Object.keys(v))==null?void 0:E[0])==null?void 0:V.toUpperCase())}))==null?void 0:r.value,contents:(m=Object.values(v))==null?void 0:m[0]})}else if((A=($=Object.keys(v))==null?void 0:$[0])!=null&&A.includes("$")){const p=(h=(O=Object.keys(d.cloneDeep(v)))==null?void 0:O[0])==null?void 0:h.split("$");C[(C==null?void 0:C.length)-1].compData.push({key:(T=P==null?void 0:P.find(w=>{var E,V;return((E=w==null?void 0:w.key)==null?void 0:E.toUpperCase())===((V=p==null?void 0:p[0])==null?void 0:V.toUpperCase())}))==null?void 0:T.value,contents:(B=Object.values(v))==null?void 0:B[0],selectLabel:p==null?void 0:p[1]})}return v}),I.contents=C,I})),x}),y}catch{return!1}},Za=n=>sl(n),Ha=n=>!!sl(n),ce=l.ref(0),Ka=n=>n.reduce((a,e)=>{var t,i;const o=Object.values(a);return(((t=Object.keys(a))==null?void 0:t.length)===0||o[o.length-1].length>=(e==null?void 0:e.width))&&(a[ce.value]=[],ce.value++),a[ce.value-1].push(e),((i=Object.keys(a))==null?void 0:i.length)===(e==null?void 0:e.width)&&(a[ce.value]=[],ce.value++),a},{});exports.arrayToNumberArray=Ka;exports.contentTransArray=ge;exports.expandContentStringToJson=Ra;exports.expandNewStringToJson=ga;exports.expandStringToJson=Za;exports.getComponent=We;exports.isExpandStringToJson=Ha;exports.parseGroupValue=el;exports.slotContent=oa;exports.transToMenu=ll;