ss-component-new 1.3.382 → 1.3.384
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-COQzSlop.js → MTLLoader-BQHXDxnO.js} +1 -1
- package/dist/{MTLLoader-DAuK2Puz.cjs → MTLLoader-CkcKuBZC.cjs} +1 -1
- package/dist/{OrbitControls-BSpF9hj8.js → OrbitControls-BLTRuhDa.js} +1 -1
- package/dist/{OrbitControls-knTPRn96.cjs → OrbitControls-DE3CExKk.cjs} +1 -1
- package/dist/{URDFLoader-D6_CEpHZ.cjs → URDFLoader-D8tyuenp.cjs} +1 -1
- package/dist/{URDFLoader-kbmOvMIB.js → URDFLoader-imRRXSC6.js} +2 -2
- package/dist/{animationData-DbE8xWWf.js → animationData-BvgGr_AD.js} +3 -3
- package/dist/{animationData-DmjEvene.cjs → animationData-C0XKzhAY.cjs} +1 -1
- package/dist/{array-BSUZ99oH.js → array-CTY5U_PN.js} +4 -4
- package/dist/{array-BvQOaFxO.cjs → array-sBmECoLs.cjs} +1 -1
- package/dist/{clone-mFCVwr-G.js → clone-C1cp_ZPA.js} +1 -1
- package/dist/clone-ClJmDMw-.cjs +1 -0
- package/dist/{eleIcon-CiJIZabf.js → eleIcon-B_axj8bR.js} +1 -1
- package/dist/{eleIcon-D20IQFYA.cjs → eleIcon-Dr0KcGoI.cjs} +1 -1
- package/dist/{iconfont-DDZGPkz5.cjs → iconfont-CgUOBkc4.cjs} +1 -1
- package/dist/{iconfont-D72sm9Jm.js → iconfont-DF-mcDbr.js} +2 -2
- package/dist/{index-Bf5kpdKA.js → index-9f9f04mZ.js} +4 -4
- package/dist/{index-DnwmGvcp.js → index-B-H0eGnk.js} +8075 -8063
- package/dist/{index-Dub2SbvH.cjs → index-B1FeUhQ3.cjs} +1 -1
- package/dist/index-B1fJDMjR.cjs +1 -0
- package/dist/{index-BvPKncXn.cjs → index-B6tumL2U.cjs} +1 -1
- package/dist/{index-DIfJQHZp.js → index-B8Y_9tEG.js} +3 -3
- package/dist/{index-BZCpc5VL.js → index-B9g2i970.js} +22 -22
- package/dist/index-BA7_vyhG.cjs +1 -0
- package/dist/{index-DxRhIGgJ.js → index-BCT70WiL.js} +18 -18
- package/dist/{index-CKcz17VF.cjs → index-BELWa90a.cjs} +1 -1
- package/dist/{index--l3tMF8l.cjs → index-BGmW1CP0.cjs} +1 -1
- package/dist/{index-BEli6-9O.cjs → index-BUD_iRcK.cjs} +6 -6
- package/dist/{index-Bx95j-0r.cjs → index-BYFXJgbP.cjs} +1 -1
- package/dist/{index-DkTQi1Vq.js → index-Bc2mOUH-.js} +1 -1
- package/dist/{index-DljiGtdC.cjs → index-BcDE44RI.cjs} +1 -1
- package/dist/{index-Ck1Oilyz.cjs → index-BjMprvSX.cjs} +1 -1
- package/dist/{index-P8lg86z4.js → index-Bldno7Iy.js} +10 -10
- package/dist/{index-CmYd6_TA.js → index-BmZwVwZC.js} +1 -1
- package/dist/{index-KB0XWCq4.cjs → index-Bon3pRBp.cjs} +1 -1
- package/dist/index-BqY1Tkyr.cjs +25 -0
- package/dist/{index-0AwREool.cjs → index-BrM2852p.cjs} +1 -1
- package/dist/{index-eh2g6__P.js → index-BrWiuGP2.js} +2 -2
- package/dist/{index-DFGJd-mG.cjs → index-BtSPIq4_.cjs} +1 -1
- package/dist/{index-Ff9cJTW6.cjs → index-Btb3Lv0L.cjs} +1 -1
- package/dist/{index-CzsK_2wL.cjs → index-BvxR8f8X.cjs} +1 -1
- package/dist/{index-DvSKkDLq.js → index-ByUugKZ4.js} +1 -1
- package/dist/{index-B2-ME7I0.cjs → index-C1mWisuO.cjs} +1 -1
- package/dist/{index-WnDj_ILy.cjs → index-C93sz4z1.cjs} +1 -1
- package/dist/{index-6nl_N4qo.cjs → index-CA6wKd_G.cjs} +1 -1
- package/dist/{index-DtAHjBND.js → index-CEQD4kWk.js} +4 -4
- package/dist/{index-BRaaqaJs.js → index-CKzb7xC4.js} +2 -2
- package/dist/index-CNivaVr-.cjs +2 -0
- package/dist/{index-meO4_UNB.cjs → index-CR69-jEg.cjs} +1 -1
- package/dist/{index-BrBW7tRO.cjs → index-CRJ8dFCC.cjs} +2 -2
- package/dist/{index-BjuzVLIW.js → index-CV8KZP8q.js} +2 -2
- package/dist/{index-QpJbzLNb.js → index-CafzZfEy.js} +59 -50
- package/dist/{index-CGQcujDu.js → index-CbJj36LL.js} +2 -2
- package/dist/{index-IiRA9o9r.cjs → index-Cq_4-egL.cjs} +1 -1
- package/dist/{index-D32grlvH.js → index-CxatyCqn.js} +191 -191
- package/dist/{index-DsMPZC4m.js → index-D5eCm00g.js} +5 -5
- package/dist/{index-ziWPnxXp.js → index-DAvhF5vB.js} +8 -8
- package/dist/{index-Bq0PnZa6.cjs → index-DAw4LkTg.cjs} +1 -1
- package/dist/{index-DQ6jmi_D.cjs → index-DEJ3o_Up.cjs} +1 -1
- package/dist/index-DFkCQ0f_.js +10279 -0
- package/dist/{index-CMK4Oemk.js → index-DHAhIKmQ.js} +2 -2
- package/dist/{index-DCSqmK8s.js → index-DJ53lh6a.js} +3 -3
- package/dist/{index-Adu9r9O6.js → index-DKdzfYLA.js} +4 -4
- package/dist/index-DPM6pfAI.js +161 -0
- package/dist/{index-CIGlEa5l.js → index-DUq4XELr.js} +1 -1
- package/dist/index-DWBWvNDH.js +991 -0
- package/dist/{index-DPpm7s-I.cjs → index-DieG68B-.cjs} +1 -1
- package/dist/{index-CW4qJdP8.cjs → index-DmwxzDGW.cjs} +1 -1
- package/dist/{index-A81u786j.js → index-Dz6JFp0r.js} +2 -2
- package/dist/{index-B4CN6AYM.js → index-GYxiPBtz.js} +5 -5
- package/dist/{index-CTMMHmwj.js → index-OJlYJM1j.js} +261 -257
- package/dist/{index-DkYlSN6W.js → index-PL7-PIPs.js} +2 -2
- package/dist/{index-DMmOKrQZ.cjs → index-TRkfc1lq.cjs} +1 -1
- package/dist/{index-BJ-thkmN.cjs → index-aYsnw0xY.cjs} +1 -1
- package/dist/{index-Fmivd5TB.js → index-heDO7aCF.js} +2 -2
- package/dist/{index-DntOrygq.js → index-jFCWOSpo.js} +6 -6
- package/dist/{index-D-CWxIQ_.cjs → index-n7GfhOVN.cjs} +1 -1
- package/dist/{index-BKmXhP9j.cjs → index-q2BN200x.cjs} +1 -1
- package/dist/{index-CyCYlmRK.js → index-roi8I5S3.js} +1 -1
- package/dist/{index-BZWiTy-K.cjs → index-xttC7OK3.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-1iUOnCnG.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-B9qUQdPf.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CvrpCION.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DeDQ2Vpf.js} +4 -4
- package/dist/{isString-DNBlKLZH.cjs → isString-CGrvcmBw.cjs} +1 -1
- package/dist/{isString-D42PBiNa.js → isString-ChmgnNIb.js} +1 -1
- package/dist/{main-CRDks8iO.cjs → main-CpVlWVrP.cjs} +1 -1
- package/dist/{main-8ogz4WPH.js → main-y6n9UlHW.js} +4 -4
- package/dist/{menuIndex-4akJxcU5.cjs → menuIndex-CYeoqj0a.cjs} +1 -1
- package/dist/{menuIndex-DUFFnrEE.js → menuIndex-D3tjk7D7.js} +1 -1
- package/dist/{request-BC2w2vGr.cjs → request-Dl8yi2iS.cjs} +6 -6
- package/dist/{request-CbksSN84.js → request-XJsZ4h2T.js} +80 -79
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +12 -12
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +13 -13
- package/dist/{threeModel-BltK6ahE.js → threeModel-C5eTXG0s.js} +5 -5
- package/dist/{threeModel-pBCJbJUj.cjs → threeModel-Dg-07eQL.cjs} +1 -1
- package/dist/{threePreview-LzLgioUW.cjs → threePreview-CszWwdug.cjs} +1 -1
- package/dist/{threePreview-qDH9f8Ts.js → threePreview-DNQsBr54.js} +5 -5
- package/dist/{threeSceneView-Dj7Ei0tl.cjs → threeSceneView-BU4wHFeI.cjs} +1 -1
- package/dist/{threeSceneView-lpkLya7B.js → threeSceneView-DUmO1oB5.js} +39 -39
- package/dist/{threeSceneViewForCPMPIP-u6-wkzf5.js → threeSceneViewForCPMPIP-CC-c7ijL.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-CWy6aopm.cjs → threeSceneViewForCPMPIP-KrPFDjjY.cjs} +1 -1
- package/dist/{threeTrackPathView-ChBJzHaY.js → threeTrackPathView-CNw6tT-i.js} +6 -6
- package/dist/{threeTrackPathView-B9p_9ESK.cjs → threeTrackPathView-D09nMCuF.cjs} +1 -1
- package/dist/{threeViewerHost-CSn-5XgQ.cjs → threeViewerHost-Df7LK7Wh.cjs} +1 -1
- package/dist/{threeViewerHost-DuJdDO8l.js → threeViewerHost-yEXWE3BL.js} +3 -3
- package/dist/{urdfTree-CPWlk_zb.cjs → urdfTree-BRAUDT58.cjs} +1 -1
- package/dist/{urdfTree-CHqT5mZW.js → urdfTree-WPGh2KP8.js} +1 -1
- package/dist/{workpieceTreePanel-6yKh6IEH.cjs → workpieceTreePanel-D4MJD2ee.cjs} +1 -1
- package/dist/{workpieceTreePanel-BtXiR5Fg.js → workpieceTreePanel-DFlTuJZM.js} +4 -4
- package/package.json +1 -1
- package/dist/clone-lZuOJI1b.cjs +0 -1
- package/dist/index-BXP2Ie3L.js +0 -619
- package/dist/index-Bi-PYsF7.js +0 -151
- package/dist/index-COvTB4A8.js +0 -10242
- package/dist/index-D7H81vN9.cjs +0 -1
- package/dist/index-E8q1Dd5H.cjs +0 -2
- package/dist/index-MaP8ZSc8.cjs +0 -25
- package/dist/index-mHYDJOd1.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const ca=require("./index-
|
|
1
|
+
"use strict";const ca=require("./index-DmwxzDGW.cjs"),H=require("./index-BUD_iRcK.cjs"),K0=require("./request-Dl8yi2iS.cjs"),Kr=require("vue");require("./JSEncrypt-IYbV4kRj.cjs");const Sh=(e,a)=>{var s;let r;e.replaceAll(" ",`\r
|
|
2
2
|
`).replaceAll(`
|
|
3
3
|
`,`\r
|
|
4
4
|
`).includes(`\r
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
`).split(`\r
|
|
9
9
|
`).filter(f=>f.trim()!==""):r=e.replaceAll(" ",`\r
|
|
10
10
|
`).split(`
|
|
11
|
-
`).filter(f=>f.trim()!==""),r=r==null?void 0:r.map(f=>(f=f==null?void 0:f.replaceAll("\r",""),f));const n=[];let t="",i=0;for(const f of r){i=i+1;let l=f.trim(),c=t?t+l:l,o=l.includes("{")||l.includes("[")||l.includes("【")||l.includes("(")||l.includes("(")||l.includes("/*")||t&&(t.includes("{")||t.includes("[")||t.includes("【")||t.includes("(")||t.includes("(")||t.includes("/*")),u=c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1,x=c[c.length-1],h=(s=r==null?void 0:r[i])==null?void 0:s[0],p=a==null?void 0:a.find(m=>m===x),d=a==null?void 0:a.find(m=>m===h);o?u&&!p&&!d?(n.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):c!=null&&c.includes("*/")?t=c.replace(/\/\*[\s\S]*?\*\//g,""):t=c:a!=null&&a.find(m=>m===l[l.length-1])?t=l:n.push(l.replace(/\/\*[\s\S]*?\*\//g,""))}return(t==null?void 0:t.length)>0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Ah=(e,a)=>{var s;let r=e;if(r==null||typeof r!="string"&&!Array.isArray(r))return[];const n=[];let t="",i=0;for(const f of r)i++,f.includes("{")||t.includes("{")?(t+=f.trim(),t.split("{").length-1===t.split("}").length-1&&t.includes(a)?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=f.trim(),t!=null&&t.includes(a)&&(t.split("'").length%2===1||((s=t.split("'"))==null?void 0:s.length)===1)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Fh=(e,a)=>{var s,f;let r=e;if(r==null||typeof r!="string"&&!Array.isArray(r))return[];const n=[];let t="",i=0;for(const l of r)i++,l.includes("{")||t.includes("{")||l.includes("[")||t.includes("[")||l.includes("【")||t.includes("【")||l.includes("(")||t.includes("(")||l.includes("(")||t.includes("(")||l.includes("/*")||t.includes("/*")?(t+=l.trim(),t.split("{").length-1===t.split("}").length-1&&t.split("【").length-1===t.split("】").length-1&&t.split("[").length-1===t.split("]").length-1&&t.split("(").length-1===t.split(")").length-1&&t.split("(").length-1===t.split(")").length-1&&t.split("/*").length-1===t.split("*/").length-1&&t[t.length-1]===a&&(t.split("'").length%2===1||((s=t.split("'"))==null?void 0:s.length)===1)?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=l.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(t.split("'").length%2===1||((f=t.split("'"))==null?void 0:f.length)===1)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Dh=(e,a)=>e===a||e.length===a.length&&e.every((r,n)=>r===a[n]),Ih=e=>e.reduce((a,r)=>{var t;const n=(((t=a.at(-1))==null?void 0:t.total)??0)+r;return a.push({key:r,total:n}),a},[]),bh=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},Ch=(e,a=2)=>{const r=[];for(let n=0;n<e.length;n+=a)r.push(e.slice(n,n+a));return r},Oh=e=>!e||e.length===0?[]:e.length===1?e[0].map(a=>[a]):e.reduce((a,r)=>{const n=[];return a.forEach(t=>{r.forEach(i=>{t&&n.push(Object.assign(t,i))})}),n}),Rh=e=>typeof e=="number",Nh=e=>{if(!e||e.length<2)return[];const a=e[0].length;let r="",n=!0;for(let t=0;t<a;t++){if(!n)return;const i=e[0][t];e.every(f=>f[t]===i)?r=t:n=!1}return r},Ph=e=>{if(Array.isArray(e)&&e.length>=3){const[a,r,n,t]=e;return t!==void 0?`rgba(${a}, ${r}, ${n}, ${t})`:`rgb(${a}, ${r}, ${n})`}if(typeof e=="string"){const a=e.trim();if(a.startsWith("(")&&a.endsWith(")")){const r=a.slice(1,-1).split(",").map(n=>Number(n.trim()));if(r.length>=3&&r.every(n=>!Number.isNaN(n))){const[n,t,i,s]=r;return s!==void 0?`rgba(${n}, ${t}, ${i}, ${s})`:`rgb(${n}, ${t}, ${i})`}}return a}},Mh=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],Lh=[{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"}],Bh=e=>{var i;let a=e;const r=[];let n="",t=0;for(const s of a)t++,s.includes("(")||n.includes("(")||s.includes(")")||n.includes(")")||s.includes("&")||n.includes("&")||s.includes("|")||n.includes("|")?(n+=s.trim(),(((i=H.cloneDeep(n))==null?void 0:i[(n==null?void 0:n.length)-1])===")"||(a==null?void 0:a[t])==="|"||(a==null?void 0:a[t])==="&")&&!(n!=null&&n.includes("&"))&&!(n!=null&&n.includes("|"))?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):n==="&&"||n==="||"?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):t===(e==null?void 0:e.length)&&(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):n+=s.trim();return(n==null?void 0:n.length)!==0&&r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),r},Jl=(e,a,r,n,t,i)=>{let s=e;return s=s==null?void 0:s.map(f=>{var l,c,o,u,x;if(r!=null&&r.find(h=>{var p,d,m,g,y;return(h===(f==null?void 0:f.prop)||((p=f==null?void 0:f.prop)==null?void 0:p.includes("."+h)))&&((y=(d=f==null?void 0:f.prop)==null?void 0:d.split("."))==null?void 0:y[((g=(m=f==null?void 0:f.prop)==null?void 0:m.split("."))==null?void 0:g.length)-1])===(f==null?void 0:f.label)})&&(f.label=(l=a==null?void 0:a[r==null?void 0:r.findIndex(h=>{var p;return h===(f==null?void 0:f.prop)||((p=f==null?void 0:f.prop)==null?void 0:p.includes("."+h))})])==null?void 0:l.replaceAll('"',""),n!=null&&n.methodContent)){let h=(o=(c=n==null?void 0:n.methodContent)==null?void 0:c.replaceAll('"',""))==null?void 0:o.replaceAll("'","");h!=null&&h.includes("@")?(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h!=null&&h.includes("@Type")||(h=h+",@Type=Auto"),h!=null&&h.includes("@Button")||(h=h+",@Button=Prop"),h!=null&&h.includes("@Extent")||(h=h+",@Extent=Row"),h=h+")"):h=h+"(@Type=Auto,@Button=Prop,@Extent=Row)",f.methodContent=h,f.prop=(f==null?void 0:f.prop)+(n==null?void 0:n.columnPathIndex),(u=i==null?void 0:i.find(p=>p==null?void 0:p.includes("@SonSync")))!=null&&u.includes("Yes")&&(f.methodId=t)}return f!=null&&f.children&&((x=f==null?void 0:f.children)==null?void 0:x.length)>0&&(f.children=Jl(f.children,a,r,n,t,i)),f}),s},ql=e=>{var s;let a=e==null?void 0:e.replaceAll("=","#"),r=Bh(a);((s=r==null?void 0:r[1])==null?void 0:s[0])==="#"&&(r=[r==null?void 0:r.join("")]);let n=r==null?void 0:r.map(f=>f),t=[],i={};return n==null||n.forEach((f,l)=>{var c,o,u,x,h;if(!(f!=null&&f.includes("&&"))&&!(f!=null&&f.includes("||"))){let p=f;(f==null?void 0:f[(f==null?void 0:f.length)-1])===")"&&(p=f.slice(0,(f==null?void 0:f.length)-1)),(p==null?void 0:p[0])==="("&&(p=p.slice(1,p==null?void 0:p.length)),p!=null&&p.includes("[")&&(p!=null&&p.includes("]")||(p=(x=(c=p==null?void 0:p.slice(1,p==null?void 0:p.length))==null?void 0:c.split(":"))==null?void 0:x[((u=(o=p==null?void 0:p.slice(1,p==null?void 0:p.length))==null?void 0:o.split(":"))==null?void 0:u.length)-1])),p=p==null?void 0:p.split("#");let d=p[0].replaceAll("'","").replaceAll("]","");d!=null&&d.includes(":")&&(d=d==null?void 0:d.replaceAll(":","."));let m=(h=p[1])==null?void 0:h.replaceAll("'","");(d==null?void 0:d[(d==null?void 0:d.length)-1])!=="!"?i[d]=m:i[d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)]="!"+m}else f==="&&"||f==="||"&&(t.push(i),i={});l===n.length-1&&(t.push(i),i={})}),t},Uh=(e,a)=>{const r=new Map;let n=[];a.forEach(i=>{for(const[s,f]of Object.entries(i))try{r.set(s.replaceAll("'",""),JSON.parse(f))}catch{r.set(s,[])}});const t=i=>i.map(s=>{var c,o;const f={label:s==null?void 0:s.replaceAll("'","")},l=r.get(s==null?void 0:s.replaceAll("'",""));if(l!=null&&l.length){const u=l.map(x=>e.find(h=>(h==null?void 0:h.replaceAll("'",""))===x)).filter(Boolean);f.children=(f.children||[]).concat(u),f.children=(c=f.children)==null?void 0:c.map(x=>(f==null?void 0:f.label)+"."+(x==null?void 0:x.replaceAll("'",""))),n=[...n,...f.children]}return(o=f.children)!=null&&o.length&&(f.children=t(f.children)),f});return t(e),n},Wh=(e,a)=>{const r=(n,t)=>{let i;return i=t==null?void 0:t.map(s=>{var f,l,c,o,u,x,h;if(n!=null&&n.find(p=>{var d;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||((d=s==null?void 0:s.prop)==null?void 0:d.includes("."+(p==null?void 0:p.prop)))})){let p=n==null?void 0:n.find(d=>{var m;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(d==null?void 0:d.prop)))});p!=null&&p.relatedValueId&&(s.relatedValueId=p==null?void 0:p.relatedValueId),p!=null&&p.menuId&&(s.menuId=p==null?void 0:p.menuId,s.directiveLabel="#isMain")}else if(Array.isArray(n==null?void 0:n[0])&&((f=n==null?void 0:n[0])!=null&&f.find(p=>{var d;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||(p==null?void 0:p.prop)===(s==null?void 0:s.prop)||((d=s==null?void 0:s.prop)==null?void 0:d.includes("."+(p==null?void 0:p.prop)))}))){let p=(l=n==null?void 0:n[0])==null?void 0:l.find(d=>{var m;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||(d==null?void 0:d.prop)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(d==null?void 0:d.prop)))});p!=null&&p.relatedValueId&&(s.relatedValueId=p==null?void 0:p.relatedValueId),p!=null&&p.menuId&&(s.menuId=p==null?void 0:p.menuId,s.directiveLabel="#isMain"),s.label=(x=(c=s.label)==null?void 0:c.split("."))==null?void 0:x[((u=(o=s.label)==null?void 0:o.split("."))==null?void 0:u.length)-1]}return s!=null&&s.children&&((h=s==null?void 0:s.children)==null?void 0:h.length)>0&&(s.children=r(n,s.children)),s}),i};return r(e,a)},Us=H.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Hh=Us(H.pinia),{multipleTableConst:ct}=H.storeToRefs(Hh),Ts=e=>{let a=[];function r(t,i=""){Array.isArray(t)&&(t==null||t.forEach(s=>{Array.isArray(s)||(s=[s]),s==null||s.forEach(f=>{var l,c,o,u,x,h,p,d,m,g,y,v;if(!(f!=null&&f.children)||f.children.length===0)f.prop=i===""?f==null?void 0:f.prop:i+ct.value+((u=(l=f==null?void 0:f.prop)==null?void 0:l.split(ct.value))==null?void 0:u[((o=(c=f==null?void 0:f.prop)==null?void 0:c.split(ct.value))==null?void 0:o.length)-1]),a.push(f.prop);else{let E=i===""?i+((d=(x=f==null?void 0:f.prop)==null?void 0:x.split(ct.value))==null?void 0:d[((p=(h=f==null?void 0:f.prop)==null?void 0:h.split(ct.value))==null?void 0:p.length)-1]):i+ct.value+((v=(m=f==null?void 0:f.prop)==null?void 0:m.split(ct.value))==null?void 0:v[((y=(g=f==null?void 0:f.prop)==null?void 0:g.split(ct.value))==null?void 0:y.length)-1]);n(f.children,E)}})}))}function n(t,i=""){t==null||t.forEach(s=>{var f,l,c,o,u,x,h,p,d,m,g,y;if(!(s!=null&&s.children)||s.children.length===0)s.prop=i===""?s==null?void 0:s.prop:i+ct.value+((o=(f=s==null?void 0:s.prop)==null?void 0:f.split(ct.value))==null?void 0:o[((c=(l=s==null?void 0:s.prop)==null?void 0:l.split(ct.value))==null?void 0:c.length)-1]),a.push(s.prop);else{let v=i===""?i+((p=(u=s==null?void 0:s.prop)==null?void 0:u.split(ct.value))==null?void 0:p[((h=(x=s==null?void 0:s.prop)==null?void 0:x.split(ct.value))==null?void 0:h.length)-1]):i+ct.value+((y=(d=s==null?void 0:s.prop)==null?void 0:d.split(ct.value))==null?void 0:y[((g=(m=s==null?void 0:s.prop)==null?void 0:m.split(ct.value))==null?void 0:g.length)-1]);n(s.children,v)}})}return r(e),a},Gh=(e,a,r)=>{var t;let n=(t=H.cloneDeep(e))==null?void 0:t.map(i=>(i=i.filter(s=>!(s!=null&&s.id)),i));return n=n==null?void 0:n.map(i=>{var s;return i=(s=i.map((f,l)=>{let c={};if(r!=null&&r.find(o=>o===a[l]))return c[a[l]]=f,c}))==null?void 0:s.filter(f=>f),i}),n},Xh=(e,a)=>{var s,f;const r=H.cloneDeep(e),n=(s=r==null?void 0:r.find(l=>(l==null?void 0:l.key)==="header"))==null?void 0:s.contents,t=(f=r==null?void 0:r.find(l=>(l==null?void 0:l.key)==="tableContents"))==null?void 0:f.contents;return Gh(t,Ts(n).slice(0,Ts(n).length-1),a)},$h=e=>{let a={};return e==null||e.forEach(r=>{a[r.key]=r.value}),a},df=(e,a)=>{const r=a;return e==null?void 0:e.map(n=>{var i;let t=n;if(!Array.isArray(t)){let s=[];for(let f in t)s.push({key:f,value:t==null?void 0:t[f]});return s}return n=(i=t==null?void 0:t.map((s,f)=>{var l,c;return s!=null&&s.id?{key:"id",value:s==null?void 0:s.id}:r!=null&&r.find(o=>o==null?void 0:o.id)||t!=null&&t.find(o=>o==null?void 0:o.id)?{key:(l=r[f-1])==null?void 0:l.label,value:s}:{key:(c=r[f])==null?void 0:c.label,value:s}}))==null?void 0:i.filter(s=>s.key!=="操作"),n})},Kh=async e=>{var r,n,t,i;let a="";if((n=(r=H.cloneDeep(e))==null?void 0:r.split("/"))==null||n.forEach((s,f)=>{var l,c;f!==((c=(l=H.cloneDeep(e))==null?void 0:l.split("/"))==null?void 0:c.length)-1&&(a=a===""?a+s:a+"/"+s)}),a!==""){let s="";const f=await Tn(a,sessionStorage.getItem("systemKey"),"");(i=(t=f==null?void 0:f[0])==null?void 0:t.compData)==null||i.forEach(l=>{var c;(l==null?void 0:l.key)==="tableContents"&&((c=l==null?void 0:l.contents)==null||c.forEach((o,u)=>{if(u===0){let x=o==null?void 0:o.filter(h=>!(h!=null&&h.id));s=a+"/"+(x==null?void 0:x[0])}}))}),await Nf(s,e)}},Xt=e=>{try{return JSON.parse(e),!0}catch{return!1}},zh=H.useLoginState(H.pinia),{loginUserInfo:ls}=H.storeToRefs(zh),Vh=H.useUnit(H.pinia),{chooseTitle:Dc}=H.storeToRefs(Vh),jh=H.useMenuState(),{activeMenuPath:Vt}=H.storeToRefs(jh),V0=[{key:"@MaxRowNum",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1}],Yh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Jh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},qh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Zl=(e,a,r)=>{let n;return n=e==null?void 0:e.map(t=>{var i;return a!=null&&a.find(s=>{var f;return((f=t==null?void 0:t.prop)==null?void 0:f.includes("."+s))||(t==null?void 0:t.prop)===s})&&(t.menuId=r),t.relatedValueId=!0,t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&(t.children=Zl(t.children,a,r)),t}),n},Zh=(e,a,r)=>{var i,s,f,l,c;let n;Xt(e)?n=JSON.parse(e):n=JSON.parse((l=(f=(s=(i=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:i.replaceAll("““","“"))==null?void 0:s.replaceAll("“",'"'))==null?void 0:f.replaceAll(':",',':"",'))==null?void 0:l.replaceAll(':"}',':""}'));let t;return(a==null?void 0:a[0])==="["?t=(c=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:c.split(","):t=a==null?void 0:a.split(","),n=n==null?void 0:n.map(o=>(o=o==null?void 0:o.map(u=>{var x;return(u==null?void 0:u.key)==="header"&&(u.contents=(x=u.contents)==null?void 0:x.map((h,p)=>{var d,m,g,y,v,E;if(Array.isArray(h)){let w=(g=(m=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:m[((d=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:d.length)-1])==null?void 0:g.contents;h=Zl(h,t,w)}else t!=null&&t.find(w=>w===(h==null?void 0:h.prop))&&(h.menuId=(E=(v=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:v[((y=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:y.length)-1])==null?void 0:E.contents,h.directiveLabel="#isMain"),h.relatedValueId=!0;return h})),u}),o)),n},mf=e=>{let a=e;if(a!=null&&a.every(r=>Array.isArray(r))){let r=[];const n=t=>{t==null||t.forEach(i=>{var s;i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?n(i==null?void 0:i.children):r.push(i)})};return n(a==null?void 0:a[0]),r}else return a},Qh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},e1=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},r1=(e,a,r)=>{let n;Xt(e)?n=JSON.parse(e):n=e;let t=a;if((a==null?void 0:a[0])!=="("&&(t="("+a+")"),t.slice(1,(t==null?void 0:t.length)-1)==="undefined")return n;let i=ql(t);if((i==null?void 0:i.length)>0){let s=[];i==null||i.forEach(f=>{var c,o,u,x,h,p;let l={};for(let d in f){let m=H.cloneDeep(d);if(!(m!=null&&m.includes("[")))if(((c=f[d])==null?void 0:c.toUpperCase())==="@LOGINUSER")l[m]=(o=ls.value)!=null&&o.account?(u=ls.value)==null?void 0:u.account:((x=ls.value)==null?void 0:x.姓名)??((h=ls.value)==null?void 0:h.账号);else if(!((p=f[d])!=null&&p.includes("[")))l[m]=f[d];else{let g="";n==null||n.forEach(y=>{var E,w;let v=(E=y==null?void 0:y.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:E.contents;v=(w=mf(v))==null?void 0:w.filter(S=>(S==null?void 0:S.label)!=="操作"),y=y==null?void 0:y.map(S=>{if((S==null?void 0:S.key)==="tableContents"){let B=df(S==null?void 0:S.contents,v),I=B==null?void 0:B.map(U=>{var L;return(L=U==null?void 0:U.find(W=>(W==null?void 0:W.key)===d))==null?void 0:L.value});I=[...new Set(I)],g=I}})}),l[m]=g}}s.push(l)}),n=n==null?void 0:n.map(f=>{var c,o;let l=(c=f==null?void 0:f.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:c.contents;return l=(o=mf(l))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作"),f=f==null?void 0:f.map(u=>{if((u==null?void 0:u.key)==="tableContents"){let h=df(u==null?void 0:u.contents,l);s==null||s.forEach(p=>{var d,m;for(let g in p)!((d=h==null?void 0:h[0])!=null&&d.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))&&!(h!=null&&h.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))||(((m=p[g])==null?void 0:m[0])!=="!"?h=h==null?void 0:h.filter(y=>{var v,E;return((v=y==null?void 0:y.find(w=>{var S;return(w==null?void 0:w.key)===g||((S=w==null?void 0:w.key)==null?void 0:S.includes(g))}))==null?void 0:v.value)===p[g]&&!Array.isArray(p==null?void 0:p[g])||Array.isArray(p==null?void 0:p[g])&&((E=p==null?void 0:p[g])==null?void 0:E.find(w=>{var S;return((S=y==null?void 0:y.find(T=>{var B;return(T==null?void 0:T.key)===g||((B=T==null?void 0:T.key)==null?void 0:B.includes(g))}))==null?void 0:S.value)===w}))}):h=h==null?void 0:h.filter(y=>{var v;return((v=y==null?void 0:y.find(E=>{var w;return(E==null?void 0:E.key)===g||((w=E==null?void 0:E.key)==null?void 0:w.includes(g))}))==null?void 0:v.value)!==p[g]}))}),(h==null?void 0:h.length)===0?u.contents=[]:u.contents=h==null?void 0:h.map(p=>{let d={};return p==null||p.forEach(m=>{d[m==null?void 0:m.key]=m==null?void 0:m.value}),d})}return u}),f})}return n},a1=(e,a,r)=>{var t,i,s,f;let n=[];return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),a.toUpperCase()==="ALL"||a.toUpperCase()==="NONE"||(n=n==null?void 0:n.map(l=>(l=l==null?void 0:l.map(c=>{var o;return(c==null?void 0:c.key)==="tableContents"&&(c.contents=(o=c.contents)==null?void 0:o.slice(0,parseInt(a))),c}),l))),n},t1=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},n1=(e,a,r=0)=>{let n=r;const t=(i,s,f)=>{let l;return l=i==null?void 0:i.map(c=>{var o;return!(c!=null&&c.children)&&n===0?(n=n+1,c.menuId=s):c.relatedValueId=!0,c.relatedValueId=!0,c!=null&&c.children&&((o=c==null?void 0:c.children)==null?void 0:o.length)>0&&(c.children=t(c.children,s)),c}),l};return t(e,a)},i1=async(e,a,r)=>{var n,t,i,s,f,l,c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_;if(a==="Sequence")return JSON.parse((s=(i=(t=(n=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:n.replaceAll("““","“"))==null?void 0:t.replaceAll("“",'"'))==null?void 0:i.replaceAll(':",',':"",'))==null?void 0:s.replaceAll(':"}',':""}'));if(a==="Auto"){let A=[];Xt(e)?A=JSON.parse(e):A=JSON.parse((o=(c=(l=(f=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:f.replaceAll("““","“"))==null?void 0:l.replaceAll("“",'"'))==null?void 0:c.replaceAll(':",',':"",'))==null?void 0:o.replaceAll(':"}',':""}'));const D=await ca.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:((h=(x=(u=Vt==null?void 0:Vt.value)==null?void 0:u.split("/"))==null?void 0:x.filter((X,re)=>{var ee,Q;return re!==((Q=(ee=Vt==null?void 0:Vt.value)==null?void 0:ee.split("/"))==null?void 0:Q.length)-1}))==null?void 0:h.join(""))+"/"}});let b;return(g=(p=r==null?void 0:r.split("["))==null?void 0:p[0])!=null&&g.includes((m=(d=Dc.value)==null?void 0:d[0])==null?void 0:m.parentContent)&&(b=(v=(y=Dc.value)==null?void 0:y[0])==null?void 0:v.value),!b&&((w=(E=D==null?void 0:D.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(b=(I=(S=Vt==null?void 0:Vt.value)==null?void 0:S.split("/"))==null?void 0:I[((B=(T=Vt==null?void 0:Vt.value)==null?void 0:T.split("/"))==null?void 0:B.length)-1]),A=A==null?void 0:A.map(X=>(X=X==null?void 0:X.map(re=>{var Q,q,we,P,Pe,Ie,je,Le;let ee=(q=(Q=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Q.contents)==null?void 0:q.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain");return(ee==null?void 0:ee.length)===0&&Array.isArray((P=(we=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:we.contents)==null?void 0:P[0])&&(ee=(je=(Ie=(Pe=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Ie[0])==null?void 0:je.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain")),(re==null?void 0:re.key)==="tableContents"&&b&&b!==""&&(re.contents=(Le=re.contents)==null?void 0:Le.filter(ie=>ee==null?void 0:ee.some(ur=>(ie==null?void 0:ie[ur==null?void 0:ur.label])===b))),re}),X)),A}else{let A=[];if(Xt(e)?A=JSON.parse(e):A=JSON.parse((M=(W=(L=(U=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:U.replaceAll("““","“"))==null?void 0:L.replaceAll("“",'"'))==null?void 0:W.replaceAll(':",',':"",'))==null?void 0:M.replaceAll(':"}',':""}')),a.toUpperCase()==="MANUAL"){if(!((ne=(se=A==null?void 0:A[0])==null?void 0:se.find(b=>(b==null?void 0:b.key)==="contentTableId"))!=null&&ne.contents))return A;let D=await ca.getInsofDataApi({id:(Te=(z=(he=A==null?void 0:A[0])==null?void 0:he.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:z[((be=(ce=A==null?void 0:A[0])==null?void 0:ce.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:be.length)-1])==null?void 0:Te.contents});D=(_=(Ae=D==null?void 0:D.data)==null?void 0:Ae.result)==null?void 0:_[0],A=A==null?void 0:A.map(b=>(b=b==null?void 0:b.map(X=>{var re,ee;return(X==null?void 0:X.key)==="header"&&(re=X.contents)!=null&&re.some(Q=>!(Q!=null&&Q.menuId))&&(X.contents=(ee=X.contents)==null?void 0:ee.map((Q,q)=>{var P,Pe,Ie,je,Le,ie,ur;let we=(Ie=(Pe=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Pe[((P=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:P.length)-1])==null?void 0:Ie.contents;return Array.isArray(Q)&&((je=vn(Q==null?void 0:Q[0]))!=null&&je.every(ir=>!(ir!=null&&ir.menuId)))?Q=n1(Q,we):((Q==null?void 0:Q.directiveLabel)==="#isMain"&&(Q.menuId=(ur=(ie=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:ie[((Le=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Le.length)-1])==null?void 0:ur.contents),Q.relatedValueId=!0),Q})),X}),b))}else A=A==null?void 0:A.map(D=>(D=D==null?void 0:D.map(b=>((b==null?void 0:b.key)==="tableContents"&&(b.contents=t1(b.contents)),b)),D));return A}},Ci=(e,a)=>Array.isArray(e)?e==null?void 0:e.map(n=>{var t,i,s,f,l,c,o;if(Array.isArray(n)?n=n:n=[n],(t=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&t.every(u=>typeof u!="object"||u===null))return n;if((i=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&i.some(u=>Array.isArray(u)))return n;{let u=[],x=(n==null?void 0:n.find(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))??{id:(s=n==null?void 0:n[0])==null?void 0:s.id};if(u.push(x),Array.isArray(a==null?void 0:a[0])){const h=(f=n==null?void 0:n.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))==null?void 0:f[0];(l=vn(H.cloneDeep(a==null?void 0:a[0])))==null||l.forEach(p=>{u.push(h==null?void 0:h[(p==null?void 0:p.prop)??(p==null?void 0:p.label)??p])})}else{const h=(c=n==null?void 0:n.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))==null?void 0:c[0];(o=vn(H.cloneDeep(a)))==null||o.forEach(p=>{u.push(h==null?void 0:h[(p==null?void 0:p.prop)??(p==null?void 0:p.label)??p])})}return u}}):void 0,d0=(e,a)=>{let r={};return Array.isArray(e)?e!=null&&e.find(n=>n==null?void 0:n.id)?(e==null?void 0:e.length)>1?e==null||e.forEach((n,t)=>{a!=null&&a[t-1]&&!(n!=null&&n.id)?r[a[t-1]]=n:n!=null&&n.id&&(r.id=n==null?void 0:n.id)}):r=e==null?void 0:e[0]:e==null||e.forEach((n,t)=>{a!=null&&a[t]&&(r[a[t]]=n)}):(a==null||a.forEach(n=>{r[n]=e==null?void 0:e[n]}),r.id=e==null?void 0:e.id),r},Ql=H.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),s1=H.useMenuState(H.pinia),{activeMenuPath:Vw}=H.storeToRefs(s1),f1=H.useLoginState(H.pinia),{structureData:c1,loginUserInfo:jw}=H.storeToRefs(f1),l1=Ql(H.pinia),{routerPageStructures:o1}=H.storeToRefs(l1);H.useModelComp(H.pinia);Kr.ref([{label:"角色名称",value:"",name:"roleName"}]);Kr.ref([{label:"查询"},{label:"重置"}]);Kr.reactive({isFilter:!1,filterForm:{}});Kr.ref(!1);const u1=Kr.ref([]),h1=Kr.ref([]),x1=Kr.ref("");Kr.computed(()=>{var a,r,n,t,i;const e=(a=o1.value)==null?void 0:a.find(s=>{var f;return((f=s==null?void 0:s.comp)==null?void 0:f.toUpperCase())==="TABLE"});if(e){x1.value=e.name,h1.value=(t=(n=(r=e==null?void 0:e.compData)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:n.contents)==null?void 0:t.filter(f=>(f==null?void 0:f.label)!=="操作");const s=(i=e==null?void 0:e.compData)==null?void 0:i.map(f=>{var l;if((f==null?void 0:f.key)==="rowButton"){let c=[];return F1.value?c=[...f==null?void 0:f.contents,{label:"授权"}]:c=f==null?void 0:f.contents,{...f,contents:c}}return(f==null?void 0:f.key)==="header"?{...f,contents:(l=f==null?void 0:f.contents)==null?void 0:l.map(c=>{var o,u;return{...c,isTableColHidden:(o=c==null?void 0:c.prop)==null?void 0:o.includes("授权"),isFormColHidden:(u=c==null?void 0:c.prop)==null?void 0:u.includes("授权")}})}:f});return _1(s),s}return[]});Kr.ref({});const p1=Kr.ref(),eo=e=>e==null?void 0:e.map(a=>{var n;const r={...a,checkedButtons:[]};return r.children&&((n=r.children)==null?void 0:n.length)>0&&(r.children=eo(r.children)),r}),d1=e=>{for(const a in e)if(Array.isArray(e[a]))return a;return""},m1=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,g1=(e,a)=>{const r={},n=Array.isArray(e)?e==null?void 0:e.filter(t=>{var i;return!(m1(t)&&((i=Object.keys(t))!=null&&i.includes("id")))}):null;return n&&(n==null||n.forEach((t,i)=>{var s;r[(s=a[i])==null?void 0:s.prop]=t})),r},v1=Kr.ref(""),_1=e=>{var i;const a=e==null?void 0:e.find(s=>(s==null?void 0:s.key)==="tableContents"),r=e==null?void 0:e.find(s=>(s==null?void 0:s.key)==="header");if(!a||!r)return"";const n=(i=a==null?void 0:a.contents)==null?void 0:i[0],t=g1(n,r==null?void 0:r.contents);v1.value=d1(t)};Kr.ref();const y1=Kr.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0});Kr.ref(0);const Ic=Kr.ref([]);Kr.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]);const bc=Kr.ref([]);Kr.watch(()=>bc.value.length,()=>{var e;(e=p1.value)==null||e.setCheckedKeys([...bc.value])});Kr.watch(()=>y1.show,e=>{e||(Ic.value=eo(Ic.value))});Kr.computed(()=>{var r;const e=(r=H.cloneDeep(c1.value))==null?void 0:r.filter(n=>{var t,i;return((i=(t=n==null?void 0:n.key)==null?void 0:t.pageKey)==null?void 0:i.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(n=>{var s,f,l,c,o,u,x,h;const t=/button/i;let i=(l=(f=(s=n==null?void 0:n.value)==null?void 0:s.pageData)==null?void 0:f.compData)==null?void 0:l.filter(p=>t.test(p==null?void 0:p.key));return i=Array.from(new Set(i==null?void 0:i.flatMap(p=>p.contents.map(d=>d.label)))),{path:(o=(c=n==null?void 0:n.key)==null?void 0:c.pageKey)!=null&&o.startsWith("/")?(x=(u=n==null?void 0:n.key)==null?void 0:u.pageKey)==null?void 0:x.substring(1):(h=n==null?void 0:n.key)==null?void 0:h.pageKey,buttons:i}}),...k1.value]});const k1=Kr.ref([]);u1.value;const ro=H.useLoginState(H.pinia),{superAdminInfo:Yw,cryptoInfo:Jw,loginUserInfo:qw}=H.storeToRefs(ro),E1=H.useMenuState(H.pinia),{activeMenuPath:T1}=H.storeToRefs(E1),Cc=H.useModelComp(H.pinia),w1="123456",S1=Ql(H.pinia),{routerPageStructures:A1}=H.storeToRefs(S1);Kr.ref(0);Kr.ref([{label:"用户名称",value:"",name:"userName"}]);const F1=Kr.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),D1=Kr.ref([]),I1=Kr.ref(""),b1=Kr.computed(()=>{var a,r,n,t,i;const e=(a=A1.value)==null?void 0:a.find(s=>{var f;return((f=s==null?void 0:s.comp)==null?void 0:f.toUpperCase())==="TABLE"});return e?(I1.value=e.name,D1.value=(t=(n=(r=e==null?void 0:e.compData)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:n.contents)==null?void 0:t.filter(f=>(f==null?void 0:f.label)!=="操作"),(i=e==null?void 0:e.compData)==null?void 0:i.map(f=>{var l;if((f==null?void 0:f.key)==="rowButton"){const c=[...f==null?void 0:f.contents,{label:"重置密码"}];return{...f,contents:c}}return(f==null?void 0:f.key)==="header"?{...f,contents:(l=f==null?void 0:f.contents)==null?void 0:l.map(c=>{var o,u,x,h;return{...c,isTableColHidden:((o=c==null?void 0:c.prop)==null?void 0:o.includes("头像"))||((u=c==null?void 0:c.prop)==null?void 0:u.includes("签名")),isFormColHidden:((x=c==null?void 0:c.prop)==null?void 0:x.includes("头像"))||((h=c==null?void 0:c.prop)==null?void 0:h.includes("签名"))}})}:f})):[]});Kr.ref();const C1=async(e,a,r)=>{var n,t;try{const i=await e(a);return((n=i==null?void 0:i.data)==null?void 0:n.code)===200?(r!=="查询"&&await ro.setLogRecordAsync({type:r,data:a},T1.value),K0.ElMessage.success("保存成功"),Cc.setRefreshCurStructure(!0),i.data.result||((t=i==null?void 0:i.data)==null?void 0:t.code)===200):null}catch(i){K0.ElMessage.error(i)}finally{Cc.setCacheUpdatingData(null)}};b1.value;const c0=H.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),O1=H.useModelComp(H.pinia),{routeToChildPath:Oc}=H.storeToRefs(O1),R1=H.useLoginState(H.pinia),{loginUserInfo:Rc,cryptoInfo:Zw}=H.storeToRefs(R1),N1=c0(H.pinia),{originalPath:Nc}=H.storeToRefs(N1),P1=async(e,a)=>{const r=sessionStorage.getItem("authority"),n=JSON.parse(r||"");if(Array.isArray(n)){let t;Oc.value?t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>(f==null?void 0:f.includes(e))||(f==null?void 0:f.includes(Oc.value)))):t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>f==null?void 0:f.includes(e)));const i=t==null?void 0:t.map(f=>{var l;return((l=f==null?void 0:f.split("/"))==null?void 0:l.pop())||""});return a==null?void 0:a.map(f=>{var l;return{...f,compData:(l=f==null?void 0:f.compData)==null?void 0:l.map(c=>{var o;return(c==null?void 0:c.key)==="rowButton"||(c==null?void 0:c.key)==="extraButton"?{...c,contents:(o=c==null?void 0:c.contents)==null?void 0:o.filter(u=>i==null?void 0:i.includes(u==null?void 0:u.label))}:c})}})}else return typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?a:[]},M1=(e,a)=>{var i,s,f,l;const r=(s=(i=a["系统管理/角色管理"])==null?void 0:i.filter(c=>{var o;return((o=c==null?void 0:c.key)==null?void 0:o.type)==="data"}))==null?void 0:s.map(c=>c.value.tableData),n=(l=(f=e==null?void 0:e.value)==null?void 0:f.tableData)==null?void 0:l.角色名称,t=r==null?void 0:r.find(c=>(c==null?void 0:c.角色名称)===n);return t==null?void 0:t.数据范围};var Es=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(Es||{});const ao=(e,a,r)=>{var s,f,l,c;if(((l=(f=(s=Rc.value)==null?void 0:s.key)==null?void 0:f.layer)==null?void 0:l.toUpperCase())==="SUPERADMIN"||!r)return e;const n=(c=r==null?void 0:r["系统管理/用户管理"])==null?void 0:c.find(o=>{var u;return(o==null?void 0:o.id)===((u=Rc.value)==null?void 0:u.id)}),t=M1(n,r);if(!t)return e;switch(Es==null?void 0:Es[t]){case 0:return e;case 1:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var d,m,g,y,v,E,w,S,T;const h=x==null?void 0:x[1],p=u[(u==null?void 0:u.length)-1]===Nc.value;return((m=(d=h==null?void 0:h.key)==null?void 0:d.createUserLayer)==null?void 0:m.toUpperCase())==="SUPERADMIN"||((g=h==null?void 0:h.key)==null?void 0:g.createUserOrg)===((v=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:v.部门名称)||((E=h==null?void 0:h.key)==null?void 0:E.createUserOrg)===((S=(w=n==null?void 0:n.value)==null?void 0:w.tableData)==null?void 0:S.部门名称)&&((T=h==null?void 0:h.key)==null?void 0:T.createUserId)===(n==null?void 0:n.id)||p})):e==null?void 0:e.filter(o=>{var u,x,h,p,d,m,g,y,v;return((x=(u=o==null?void 0:o.key)==null?void 0:u.createUserLayer)==null?void 0:x.toUpperCase())==="SUPERADMIN"||((h=o==null?void 0:o.key)==null?void 0:h.createUserOrg)===((d=(p=n==null?void 0:n.value)==null?void 0:p.tableData)==null?void 0:d.部门名称)||((m=o==null?void 0:o.key)==null?void 0:m.createUserOrg)===((y=(g=n==null?void 0:n.value)==null?void 0:g.tableData)==null?void 0:y.部门名称)&&((v=o==null?void 0:o.key)==null?void 0:v.createUserId)===(n==null?void 0:n.id)});case 2:break;case 3:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var d;const h=x==null?void 0:x[1],p=u[(u==null?void 0:u.length)-1]===Nc.value;return((d=h==null?void 0:h.key)==null?void 0:d.createUserId)===(n==null?void 0:n.id)||p})):e==null?void 0:e.filter(o=>{var u;return((u=o==null?void 0:o.key)==null?void 0:u.createUserId)===(n==null?void 0:n.id)})}},L1=H.useModelComp(H.pinia),{routeToChildPath:dn}=H.storeToRefs(L1),Dn=H.useMenuState(H.pinia),{activeMenuPath:r0}=H.storeToRefs(Dn),Fi=H.useLoginState(),{loginUserInfo:Na}=H.storeToRefs(Fi),B1=c0(H.pinia),{originalPath:U1}=H.storeToRefs(B1),lt=U1.value,W1=e=>{const a=/^name(\d+)$/,r=e==null?void 0:e.map(t=>{const i=[];for(const s in t){const f=s.match(a);f&&i.push({idx:Number(f[1]),value:t[s]})}return!i.length&&t.name&&i.push({idx:-1,value:t.name}),i.sort((s,f)=>s.idx-f.idx),{item:t,names:i}});function n(t,i){if(!t)return[];let s=[];const f=[];t.forEach(x=>{var h;return(((h=x.names)==null?void 0:h.length)>i?s:f).push(x)});const l=f.map(x=>x.item),c=new Map;s=s==null?void 0:s.sort((x,h)=>{var p,d;return((p=x==null?void 0:x.item)==null?void 0:p.orderId)-((d=h==null?void 0:h.item)==null?void 0:d.orderId)});for(const x of s){const h=x.names[x.names.length-i-1].value;c.has(h)||c.set(h,[]),c.get(h).push(x)}return[...Array.from(c.keys()).map(x=>{var m,g,y,v;const h=c.get(x);if(h[0].names.length===1&&(h!=null&&h.every(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)===-1})))return h[0].item;let p=h==null?void 0:h.filter(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)!==-1}),d=new Map;return p==null||p.forEach(E=>{let w=E==null?void 0:E.item,S="";for(let T in w)T!=null&&T.includes("name")&&(S=S===""?w==null?void 0:w[T]:S+"/"+(w==null?void 0:w[T]));for(const[T,B]of d.entries())(T.includes(S)||S!=null&&S.includes(T))&&(S=T);d.set(S,E)}),p=Array.from(d.values()),{name:x,isShow:!0,comp:"ParentItem",children:(m=n(p,i+1))==null?void 0:m.sort((E,w)=>(E==null?void 0:E.orderId)-(w==null?void 0:w.orderId)),orderId:(v=(y=(g=n(p,i+1))==null?void 0:g.sort((E,w)=>((E==null?void 0:E.orderId)??0)-((w==null?void 0:w.orderId)??0)))==null?void 0:y[0])==null?void 0:v.orderId}}),...l]}if(r)return n(r,0)},H1=async e=>{let a=new WeakMap,r=e;return a!=null&&a[r0.value+"/"]||(r=e==null?void 0:e.map(n=>{var t;return Array.isArray(n==null?void 0:n.compData)&&(n.compData=(t=n.compData)==null?void 0:t.map(i=>{var s;return(i==null?void 0:i.key)==="header"&&(i.contents=(s=i.contents)==null?void 0:s.map(f=>((f==null?void 0:f.directiveLabel)==="#isMain"&&(f.directiveColor=!0),f))),i})),n})),r},G1=e=>{var f;let a=[],r=[],n=!1,t=!1,i=[],s="";for(const l of e||[]){if(l!=null&&l.choice&&(n=!0,i.push(l),i.length===1))for(const c in l)c!=null&&c.includes("nameContents")&&(s=((f=l[c])==null?void 0:f.length)>1?l[c][0]:"");l!=null&&l.tab&&(t=!0)}if(n){let l=Nh(i.map(o=>o==null?void 0:o.nameContents));l=parseInt(l);let c=i.map(o=>{var u,x;return((u=o==null?void 0:o.nameContents)==null?void 0:u[l+1])??((x=o==null?void 0:o.nameContents)==null?void 0:x[0])});c=[...new Set(c)],c=c==null?void 0:c.map(o=>({label:o,value:o})),r=[{comp:"Radio",compData:c,name:s,isShow:!0}]}if(t&&(e==null||e.forEach(l=>{if(!(l!=null&&l.tab))a.push(l);else if(a!=null&&a.find(c=>(c==null?void 0:c.tabInform)===(l==null?void 0:l.tab)))a=a==null?void 0:a.map(c=>{if((c==null?void 0:c.comp)==="Tabs"&&(c==null?void 0:c.tabInform)===(l==null?void 0:l.tab)){let o=c.compData,{tab:u,...x}=l;x.label=x==null?void 0:x.name,x.name="",o.push(x),c.compData=o}return c});else{let{tab:c,...o}=l,u=o==null?void 0:o.name0;o.label=o==null?void 0:o.name,o.name="";let x={comp:"Tabs",name:u,tabInform:l==null?void 0:l.tab,compData:[o],choices:l==null?void 0:l.choice};a.push(x)}})),(a==null?void 0:a.length)===0&&(r==null?void 0:r.length)===0)return e;if((r==null?void 0:r.length)===0)return a;if((a==null?void 0:a.length)===0){let l=e==null?void 0:e.findIndex(c=>(c==null?void 0:c.choice)??(c==null?void 0:c.choices));return e.splice(l,0,r==null?void 0:r[0]),e=e==null?void 0:e.map((c,o)=>{if(o>l){let u={};for(let x in c)x!=null&&x.includes("name")||(u[x]=c==null?void 0:c[x]);u.choiceName=c!=null&&c.name1?c==null?void 0:c.name0:c==null?void 0:c.name,c=u}return c}),e}else{let l=a==null?void 0:a.findIndex(c=>(c==null?void 0:c.choice)??(c==null?void 0:c.choices));return a.splice(l,0,r==null?void 0:r[0]),a=a==null?void 0:a.map((c,o)=>{if(o>l){let u={};for(let x in c)x!=null&&x.includes("name")||(u[x]=c==null?void 0:c[x]);u.choiceName=c!=null&&c.name1?c==null?void 0:c.name0:c==null?void 0:c.name,c=u}return c}),a}},X1=async e=>{let a=e;return a=a==null?void 0:a.filter(r=>r),a=G1(a),a!=null&&a.every(r=>{var n,t;return((t=(n=Object.keys(r))==null?void 0:n.filter(i=>i==null?void 0:i.includes("name")))==null?void 0:t.length)===1})?a:W1(a)},$1=async()=>{var i,s,f,l,c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka,Se,Ne,Be,Ta,Qe,br,me,Fr,Or,hr;Dn.setImportLoading(!0);let e="";const a=await ca.getInsofDataApi({key:{type:"structure",pageKey:H.cloneDeep(dn).value,systemKey:sessionStorage.getItem("systemKey")}});if(((s=(i=a==null?void 0:a.data)==null?void 0:i.result)==null?void 0:s.length)>0){let kr=(h=(x=(u=(o=(c=(l=(f=a==null?void 0:a.data)==null?void 0:f.result)==null?void 0:l[0])==null?void 0:c.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x.find(xa=>(xa==null?void 0:xa.key)==="header"))==null?void 0:h.contents;e=(d=(p=H.cloneDeep(kr))==null?void 0:p[0])==null?void 0:d.label}let r=r0.value;(y=r0.value)!=null&&y.includes(`updateLoading${((m=Na.value)==null?void 0:m.account)||((g=Na.value)==null?void 0:g.账号)}`)?r=H.cloneDeep(r0).value:(w=r0.value)!=null&&w.includes(`loading${((v=Na.value)==null?void 0:v.account)||((E=Na.value)==null?void 0:E.账号)}`)&&(r=H.cloneDeep(dn).value+lt+`loading${((S=Na.value)==null?void 0:S.account)||((T=Na.value)==null?void 0:T.账号)}`);const n=await ca.getInsofDataApi({key:{pageKey:r,systemKey:sessionStorage.getItem("systemKey")}});let t=[];if(((I=(B=n==null?void 0:n.data)==null?void 0:B.result)==null?void 0:I.length)>0){let kr="",xa=[];(L=(U=n==null?void 0:n.data)==null?void 0:U.result)==null||L.forEach(We=>{var zr,na,wa,ha,fr;((na=(zr=We==null?void 0:We.value)==null?void 0:zr.pageData)==null?void 0:na.comp)==="Form"&&((fr=(ha=(wa=We==null?void 0:We.value)==null?void 0:wa.pageData)==null?void 0:ha.compData)==null||fr.forEach(wr=>{(wr==null?void 0:wr.key)==="formContent"&&(xa=[...xa,...wr==null?void 0:wr.contents])}))});let aa=xa==null?void 0:xa.find(We=>(We==null?void 0:We.isMain)===!0);if(aa?(kr=aa==null?void 0:aa.value,e=aa==null?void 0:aa.key):kr=(Te=(z=(be=(ce=(he=(ne=(se=(M=(W=n==null?void 0:n.data)==null?void 0:W.result)==null?void 0:M[0])==null?void 0:se.value)==null?void 0:ne.pageData)==null?void 0:he.compData)==null?void 0:ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:be.contents)==null?void 0:z.find(We=>{var zr,na;return(We==null?void 0:We.key)===e||((na=(zr=We==null?void 0:We.optionUrl)==null?void 0:zr.groupSelect)==null?void 0:na[1])===e}))==null?void 0:Te.value,(A=r0.value)!=null&&A.includes(`updateLoading${((Ae=Na.value)==null?void 0:Ae.account)||((_=Na.value)==null?void 0:_.账号)}`)){let We=[],zr=[];const na=await ca.getInsofDataApi({key:{pageKey:(Ie=r0.value.split(lt+`updateLoading${((P=Na.value)==null?void 0:P.account)||((Pe=Na.value)==null?void 0:Pe.账号)}`))==null?void 0:Ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Le=(je=na==null?void 0:na.data)==null?void 0:je.result)==null?void 0:Le.length)>0){let wa=(ie=n==null?void 0:n.data)==null?void 0:ie.result,ha=(ur=H.cloneDeep(wa))==null?void 0:ur.map(async fr=>{var wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F;if(((wr=fr==null?void 0:fr.key)==null?void 0:wr.type)==="structure"){let C=(st=(Ua=(Ba=(Oa=fr==null?void 0:fr.value)==null?void 0:Oa.pageData)==null?void 0:Ba.compData)==null?void 0:Ua.find(O=>(O==null?void 0:O.key)==="parentFormPath"))==null?void 0:st.contents;if(C){let O=await Tn(C,sessionStorage.getItem("systemKey"),""),R=(Rt=(_t=(Ot=(Ct=fr==null?void 0:fr.value)==null?void 0:Ct.pageData)==null?void 0:Ot.compData)==null?void 0:_t.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Rt.contents,K=O==null?void 0:O.filter(Y=>(Y==null?void 0:Y.comp)==="Form");K==null||K.forEach(Y=>{var V;(V=Y==null?void 0:Y.compData)==null||V.forEach(j=>{var J,le;if((j==null?void 0:j.key)==="formContent"&&((J=j==null?void 0:j.contents)==null?void 0:J.some(Ee=>R==null?void 0:R.find(ue=>(ue==null?void 0:ue.prop)===(Ee==null?void 0:Ee.prop))))){let Ee=Y;Ee.compData=(le=Ee.compData)==null?void 0:le.map(ge=>{var qe;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(qe=ge.contents)==null?void 0:qe.map(Er=>{var Mr;return R!=null&&R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop))&&(Er.value=(Mr=R==null?void 0:R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop)))==null?void 0:Mr.value),Er})),ge});let ue={};for(let ge in Ee)ge!=="id"&&(ue[ge]=Ee[ge]);t.push({id:Y==null?void 0:Y.id,value:{pageData:ue}})}})})}else if((Pt=(Nt=na==null?void 0:na.data)==null?void 0:Nt.result)!=null&&Pt.find(O=>{var R,K,Y,V;return((K=(R=O==null?void 0:O.value)==null?void 0:R.pageData)==null?void 0:K.name)===((V=(Y=fr==null?void 0:fr.value)==null?void 0:Y.pageData)==null?void 0:V.name)})){let O=fr==null?void 0:fr.key;O.pageKey=H.cloneDeep(dn).value+lt+kr,t.push({id:(F=(N=(k=na==null?void 0:na.data)==null?void 0:k.result)==null?void 0:N.find(R=>{var K,Y,V,j;return((Y=(K=R==null?void 0:R.value)==null?void 0:K.pageData)==null?void 0:Y.name)===((j=(V=fr==null?void 0:fr.value)==null?void 0:V.pageData)==null?void 0:j.name)}))==null?void 0:F.id,key:O,value:fr==null?void 0:fr.value})}else{let O=fr==null?void 0:fr.key;O.pageKey=H.cloneDeep(dn).value+lt+kr,We.push({key:O,value:fr==null?void 0:fr.value})}}});await Promise.all(ha),(ka=(ir=n==null?void 0:n.data)==null?void 0:ir.result)==null||ka.forEach(fr=>{var Oa,Ba,Ua;let wr=(Oa=H.cloneDeep(fr))==null?void 0:Oa.key;wr.pageKey=H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((Ba=Na.value)==null?void 0:Ba.account)||((Ua=Na.value)==null?void 0:Ua.账号)}`,Dn.setChildMenu(wr.pageKey),t.push({id:fr==null?void 0:fr.id,key:wr})})}if(kr===""){K0.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Dn.setImportLoading(!1);return}if((t==null?void 0:t.length)>0){await ca.batchUpdateInsofDataApi({dataList:t}),(Da=t==null?void 0:t[0])!=null&&Da.key&&await Fi.setLogRecordAsync({type:"保存",data:t},(Tt=t==null?void 0:t[0])==null?void 0:Tt.key),(We==null?void 0:We.length)>0&&(await ca.batchAddInsofDataApi({dataList:We}),(qa=We==null?void 0:We[0])!=null&&qa.key&&await Fi.setLogRecordAsync({type:"保存",data:We},(Ea=We==null?void 0:We[0])==null?void 0:Ea.key));const wa=await ca.getInsofDataApi({key:{pageKey:(Ne=r0.value.split(lt+`updateLoading${((Ka=Na.value)==null?void 0:Ka.account)||((Se=Na.value)==null?void 0:Se.账号)}`))==null?void 0:Ne[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ta=(Be=wa==null?void 0:wa.data)==null?void 0:Be.result)==null?void 0:Ta.length)>0){let ha=[],fr=(Qe=n==null?void 0:n.data)==null?void 0:Qe.result;(br=H.cloneDeep(fr))==null||br.forEach(wr=>{var Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N;if(((Oa=wr==null?void 0:wr.key)==null?void 0:Oa.type)!=="structure"){let F=(st=(Ua=(Ba=wa==null?void 0:wa.data)==null?void 0:Ba.result)==null?void 0:Ua.filter(K=>{var Y;return((Y=K==null?void 0:K.key)==null?void 0:Y.type)==="data"}))==null?void 0:st.map(K=>K==null?void 0:K.id);ha=[...ha,...F];let C=(Rt=(_t=(Ot=(Ct=H.cloneDeep(fr))==null?void 0:Ct.find(K=>{var Y;return((Y=wr==null?void 0:wr.key)==null?void 0:Y.tableId)===(K==null?void 0:K.id)}))==null?void 0:Ot.value)==null?void 0:_t.pageData)==null?void 0:Rt.name,O=(k=(Pt=(Nt=wa==null?void 0:wa.data)==null?void 0:Nt.result)==null?void 0:Pt.find(K=>{var Y,V;return((V=(Y=K==null?void 0:K.value)==null?void 0:Y.pageData)==null?void 0:V.name)===C}))==null?void 0:k.id,R=(N=H.cloneDeep(wr))==null?void 0:N.key;R.tableId=O,R.pageKey=H.cloneDeep(dn).value+lt+kr,zr.push({key:R,value:wr==null?void 0:wr.value})}}),(ha==null?void 0:ha.length)>0&&(ha=[...new Set(ha)],await ca.batchDeleteInsofDataApi({ids:ha})),(Fr=(me=n==null?void 0:n.data)==null?void 0:me.result)==null||Fr.forEach(wr=>{var Ba,Ua,st;let Oa=(Ba=H.cloneDeep(wr))==null?void 0:Ba.key;Oa.pageKey=H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((Ua=Na.value)==null?void 0:Ua.account)||((st=Na.value)==null?void 0:st.账号)}`,Dn.setChildMenu(Oa.pageKey),t.push({id:wr==null?void 0:wr.id,key:Oa})})}(zr==null?void 0:zr.length)>0&&(await ca.batchAddInsofDataApi({dataList:zr}),(Or=We==null?void 0:We[0])!=null&&Or.key&&await Fi.setLogRecordAsync({type:"保存",data:zr},(hr=zr==null?void 0:zr[0])==null?void 0:hr.key)),K0.ElMessage.success("保存成功")}}else{if((b=(D=n==null?void 0:n.data)==null?void 0:D.result)==null||b.forEach(We=>{var na;let zr=(na=H.cloneDeep(We))==null?void 0:na.key;zr.pageKey=H.cloneDeep(dn).value+lt+kr,Dn.setChildMenu(zr.pageKey),t.push({id:We==null?void 0:We.id,key:zr})}),kr===""){K0.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Dn.setImportLoading(!1),Dn.setChildMenu("");return}(X=t==null?void 0:t[0])!=null&&X.key&&(await ca.batchUpdateInsofDataApi({dataList:t}),await Fi.setLogRecordAsync({type:"保存",data:t},(re=t==null?void 0:t[0])==null?void 0:re.key)),await Nf(H.cloneDeep(dn).value+lt+kr,H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((ee=Na.value)==null?void 0:ee.account)||((Q=Na.value)==null?void 0:Q.账号)}`),Dn.setActiveMenuPath(H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((q=Na.value)==null?void 0:q.account)||((we=Na.value)==null?void 0:we.账号)}`),K0.ElMessage.success("保存成功")}}Dn.setImportLoading(!1)},K1=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&t[t.length-1]!==","&&t[t.length-1]===a?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,""))):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return n},Pc=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&(t[t.length-1]===":"&&t[t.length-2]!=="r"||t[t.length-1]===a)&&(t.match(/'/g)||[]).length%2===0?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),((t==null?void 0:t[(t==null?void 0:t.length)-1])===a||t[t.length-1]===":"&&t[t.length-2]!=="r")&&(t.match(/'/g)||[]).length%2===0&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Mc=(e,a)=>{let r=0;for(let n=0;n<e.length;n++)e[n]===a&&r++;return r%2===0},p0=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&t[t.length-1]===a&&Mc(t,"'")?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&Mc(t,"'")&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},z1=c0(H.pinia),{originalPath:Qw}=H.storeToRefs(z1),V1=e=>{var r,n;let a=(n=(r=e==null?void 0:e.slice(1,(e==null?void 0:e.length)-1))==null?void 0:r.split(","))==null?void 0:n.map(t=>{var i,s,f,l,c;return(c=(l=(f=(s=(i=t==null?void 0:t.split("=="))==null?void 0:i[0])==null?void 0:s.replaceAll("'",""))==null?void 0:f.split("#"))==null?void 0:l[0])==null?void 0:c.trim()});return a=JSON.stringify(a),a},gf=e=>{let a=H.cloneDeep(e),r=[],n="",t="",i=(a==null?void 0:a[0])==="["?Pc(a.slice(1,a.length-1),","):Pc(a,",");return i==null||i.forEach((s,f)=>{var c,o,u,x,h,p,d,m;let l=s;if(l[l.length-1]===","&&(l=l.slice(0,l.length-1)),l.slice(1,(l==null?void 0:l.length)-1).includes("[")&&(l==null?void 0:l[0])==="["){let g=gf(l);if((i==null?void 0:i.length)===2&&((o=i==null?void 0:i[0])==null?void 0:o[((c=i==null?void 0:i[0])==null?void 0:c.length)-1])===":"){let y=i[f-1].replaceAll(",","").trim();y[y.length-1]===":"&&(y=y.slice(0,y.length-1));let v=(u=gf(l))==null?void 0:u.parentStringContent;v="["+((x=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1))==null?void 0:x.replaceAll("'",'"'))+"]";let E={[y]:v};r.push(E)}else t=t+l+",";n=n+(g==null?void 0:g.stringContent),t=t+(g==null?void 0:g.parentStringContent),r=[...r,...g==null?void 0:g.parentColumns]}else if((l==null?void 0:l[0])!=="["&&l[l.length-1]===":")l=l.slice(0,l.length-1),n=n+l+",",t=t+((h=l==null?void 0:l.split("#"))==null?void 0:h[0])+",";else if((l==null?void 0:l[0])==="["&&i[f-1]){(d=(p=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:p.split(","))==null||d.forEach(v=>{n=n+v+","});let g=i[f-1].replaceAll(",","").trim();g[g.length-1]===":"&&(g=g.slice(0,g.length-1));let y={[g]:V1(l)};r.push(y)}else n=n+l+",",t=t+((m=l==null?void 0:l.split("#"))==null?void 0:m[0])+","}),{parentColumns:r,stringContent:n,parentStringContent:t}},vf=H.useMenuState(H.pinia),{activeMenuPath:os}=H.storeToRefs(vf),j1=H.useUnit(H.pinia),{chooseTitle:Si}=H.storeToRefs(j1);let Ir="$R";const Y1=Us(H.pinia),{multipleTableConst:Lc}=H.storeToRefs(Y1),J1=H.useLoginState(H.pinia),{loginUserInfo:eS,systemInfo:Bc}=H.storeToRefs(J1),to=H.useModelComp(H.pinia),q1=c0(H.pinia),{originalPath:Z1}=H.storeToRefs(q1),{payloadTypes:rS}=H.storeToRefs(to),mn=(e,a)=>(a==null?void 0:a.split(",")).some(n=>Object.keys(e).some(t=>t.startsWith("name")&&e[t]===n)),Zs={onNumSlice:a1,onRandomContents:i1,onConditionContents:r1,onPaceContents:e1,onMainTagContents:Zh,onFatherPaceContents:Qh,onButtonContents:qh,onPamButtonContents:Jh,onRowButtonContents:Yh},no=async e=>{const a=e.slice(0,e.indexOf("(")).trim(),r=Zs==null?void 0:Zs[a];if(typeof r!="function"){console.log(`找不到函数: ${a}`);return}const n=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),t=await new Function(`return [${n}]`)();return r(...Array.isArray(t)?t:[t])},_f=(e,a,r="children")=>{var f;let n=[],t=[],i=[],s=0;for(const l of e){const c=a.some(x=>{var p,d,m,g,y,v,E,w;const[h]=x.split(".");return h===l.prop||h===l.label||h===((g=(p=l.prop)==null?void 0:p.split("."))==null?void 0:g[((m=(d=l.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])||h===((w=(y=l.prop)==null?void 0:y.split("."))==null?void 0:w[((E=(v=l.prop)==null?void 0:v.split("."))==null?void 0:E.length)-1].replace(/\d+$/,""))}),o=a.filter(x=>x.includes(".")).map(x=>x.split(".").slice(1).join("."));s=s+1;let u;if(c&&(u={...l},t.push(s),i.push(u==null?void 0:u.prop),delete u[r]),l[r]){const x=(f=_f(l[r],(o==null?void 0:o.length)>0?o:a,r))==null?void 0:f.contents;x.length&&(t.push(s),i.push(u==null?void 0:u.prop),s=s+1,u=u||{...l},n=[...n,...x],u=x)}u&&!Array.isArray(u)&&n.push(u)}return{contents:n,ids:t,props:i}},Q1=e=>{if(!Xt(e))return[e];const a=new Function(`return ${e}`)(),r=[];return((t,i="")=>{for(const s of t)if(Array.isArray(s)){const[f,l]=s;Array.isArray(l)?l.forEach(c=>r.push(`"${f}:${c}"`)):r.push(i?`"${i}:${f}"`:'"'+f+'"')}else r.push('"'+s+'"')})(a),r},ex=async(e,a,r,n,t,i)=>{var c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka,Se,Ne,Be,Ta,Qe,br,me,Fr,Or,hr,kr,xa,aa,We,zr,na,wa,ha,fr,wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F,C,O,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,nn,sn,fn,Mt,Nn;let s=[],f=(o=(c=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:c.contents)==null?void 0:o.filter(er=>!(er!=null&&er.columnPath)&&(er==null?void 0:er.label)!=="操作"),l=(x=(u=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:u.contents)==null?void 0:x.filter(er=>er==null?void 0:er.columnPath);if(Array.isArray((p=(h=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:h.contents)==null?void 0:p[0])){let er=(g=(m=(d=e==null?void 0:e.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:d.contents)==null?void 0:m[0])==null?void 0:g.filter(pe=>pe==null?void 0:pe.columnPath);l=[...l,...er]}for(let er=0;er<(l==null?void 0:l.length);er++){let pe=H.cloneDeep(l==null?void 0:l[er]);if(pe.columnPath=(v=(y=pe==null?void 0:pe.columnPath)==null?void 0:y.replaceAll("{",""))==null?void 0:v.replaceAll("}",""),pe||(pe=(T=(S=vn((w=(E=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:E.contents)==null?void 0:w[0]))==null?void 0:S.filter(Re=>Re==null?void 0:Re.columnPath))==null?void 0:T[er]),pe!=null&&pe.columnPath&&(pe==null?void 0:pe.columnPath)!==""){let Re="";if((B=pe==null?void 0:pe.columnPath)!=null&&B.includes("@Type")||(Re=Re===""?Re+"@Type:Manual":Re+",@Type:Manual"),(I=pe==null?void 0:pe.columnPath)!=null&&I.includes("@SonSync")||(Re=Re===""?Re+"@SonSync:No":Re+",@SonSync:No"),(U=pe==null?void 0:pe.columnPath)!=null&&U.includes("@FatherSync")||(Re=Re===""?Re+"@FatherSync:Yes":Re+",@FatherSync:Yes"),((W=pe==null?void 0:pe.columnPath)==null?void 0:W[((L=pe==null?void 0:pe.columnPath)==null?void 0:L.length)-1])===")"){let Lr="";((se=(M=pe.columnPath)==null?void 0:M.split("("))==null?void 0:se.length)!==((he=(ne=pe.columnPath)==null?void 0:ne.split(")"))==null?void 0:he.length)?Lr=((be=pe.columnPath)==null?void 0:be.slice(0,(ce=pe.columnPath)==null?void 0:ce.length))+","+Re+")":Lr=((Te=pe.columnPath)==null?void 0:Te.slice(0,((z=pe.columnPath)==null?void 0:z.length)-1))+","+Re+")",pe.columnPath=Re===""?pe.columnPath:Lr}else(Ae=pe==null?void 0:pe.columnPath)!=null&&Ae.includes("@")?pe.columnPath=pe.columnPath+","+Re+")":pe.columnPath=pe.columnPath+"("+Re+")"}let Pn=(_=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="dictContents"))==null?void 0:_.contents,M0="",Mn=(b=(D=(A=l==null?void 0:l[er])==null?void 0:A.columnPath)==null?void 0:D.replace("[",Ir))==null?void 0:b.split(Ir),Vr=(ee=(re=(X=Mn==null?void 0:Mn[(Mn==null?void 0:Mn.length)-1])==null?void 0:X.replace("(",Ir))==null?void 0:re.split(Ir))==null?void 0:ee[0];Vr=Vr==null?void 0:Vr.slice(0,(Vr==null?void 0:Vr.length)-1);let Ge=(Pe=(P=(we=(q=H.cloneDeep((Q=l==null?void 0:l[er])==null?void 0:Q.columnPath))==null?void 0:q.split("["+Vr+"]"))==null?void 0:we[0])==null?void 0:P.replaceAll("{",""))==null?void 0:Pe.replaceAll("}","");(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&((je=(Ie=Si.value)==null?void 0:Ie[0])!=null&&je.value)&&(Ge=Ge+((ie=(Le=Si.value)==null?void 0:Le[0])==null?void 0:ie.value));let pa="",Ln="",cr="",Wa=H.cloneDeep(Vr);if(Vr=(ir=(ur=Vr==null?void 0:Vr.split(":"))==null?void 0:ur[0])==null?void 0:ir.replaceAll("'",""),Ge===""&&((Da=(ka=Si.value)==null?void 0:ka[0])!=null&&Da.value&&((qa=(Tt=Si.value)==null?void 0:Tt[0])==null?void 0:qa.value)!==""?Ge=os.value+"/"+((Ka=(Ea=Si.value)==null?void 0:Ea[0])==null?void 0:Ka.value):Ge=os.value),Ge!=null&&Ge.includes("[")){let Re=(Ta=(Be=(Ne=(Se=Ge==null?void 0:Ge.split("["))==null?void 0:Se[1])==null?void 0:Ne.split("]"))==null?void 0:Be[0])==null?void 0:Ta.split("/");Ln=Ge,pa=(me=(br=(Qe=Ge==null?void 0:Ge.split("["))==null?void 0:Qe[1])==null?void 0:br.split("]"))==null?void 0:me[0];let Lr="";r==null||r.forEach(ta=>{var Br,Me,L0,te,G;((Me=(Br=ta==null?void 0:ta.value)==null?void 0:Br.pageData)==null?void 0:Me.name)===(Re==null?void 0:Re[0])&&((G=(te=(L0=ta==null?void 0:ta.value)==null?void 0:L0.pageData)==null?void 0:te.compData)==null||G.forEach(Z=>{var de;(Z==null?void 0:Z.key)==="formContent"&&((de=Z==null?void 0:Z.contents)==null||de.forEach(xe=>{var Sr;if((xe==null?void 0:xe.prop)===(Re==null?void 0:Re[1])){let Qr=ho((Sr=H.cloneDeep(xe))==null?void 0:Sr.optionUrl,n);Lr=(xe==null?void 0:xe.value)||Qr||""}}))}))}),cr=Lr,Ge=((Fr=Ge==null?void 0:Ge.split("["))==null?void 0:Fr[0])+Lr}(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&(Ge=Ge.slice(0,(Ge==null?void 0:Ge.length)-1));let oe=[];s!=null&&s.every(Re=>Array.isArray(Re))&&(s==null?void 0:s.length)>0&&(oe=s==null?void 0:s[0]);let Dr=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});((hr=(Or=Dr==null?void 0:Dr.data)==null?void 0:Or.result)==null?void 0:hr.length)===0&&(Ge=(xa=(kr=Ge==null?void 0:Ge.split("/"))==null?void 0:kr.filter((Re,Lr)=>{var ta;return Lr!==((ta=Ge==null?void 0:Ge.split("/"))==null?void 0:ta.length)-1}))==null?void 0:xa.join("/"),Dr=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}));let Oe=(na=(zr=(We=(aa=Wa==null?void 0:Wa.split("{"))==null?void 0:aa[0])==null?void 0:We.replace("[",Ir))==null?void 0:zr.split(Ir))==null?void 0:na[0];const Ra=await ca.getInsofDataApi({key:{pageKey:t??os.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}}),Za=[];if((ha=(wa=Ra==null?void 0:Ra.data)==null?void 0:wa.result)==null||ha.forEach(Re=>{var Lr;Za.push({id:Re==null?void 0:Re.id,value:Re.value.tableData,parentId:(Lr=Re==null?void 0:Re.key)==null?void 0:Lr.parentId})}),(Za==null?void 0:Za.length)===0){const Re=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}});(wr=(fr=Re==null?void 0:Re.data)==null?void 0:fr.result)==null||wr.forEach(Lr=>{var ta;Za.push({id:Lr==null?void 0:Lr.id,value:Lr.value.tableData,parentId:(ta=Lr==null?void 0:Lr.key)==null?void 0:ta.parentId})})}if(Array.isArray((Oa=Dr==null?void 0:Dr.data)==null?void 0:Oa.result)&&((Ua=(Ba=Dr==null?void 0:Dr.data)==null?void 0:Ba.result)==null?void 0:Ua.length)>0){let Re;if((Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])===":"&&(Oe=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1)),Oe=(Ot=(Ct=Oe==null?void 0:Oe.split(":"))==null?void 0:Ct[((st=Oe==null?void 0:Oe.split(":"))==null?void 0:st.length)-1])==null?void 0:Ot.replaceAll("'",""),((Rt=(_t=Dr==null?void 0:Dr.data)==null?void 0:_t.result)==null?void 0:Rt.find(te=>{var G;return mn((G=te==null?void 0:te.value)==null?void 0:G.pageData,Oe)}))??((Pt=(Nt=Dr==null?void 0:Dr.data)==null?void 0:Nt.result)==null?void 0:Pt.find(te=>{var G;return mn((G=te==null?void 0:te.value)==null?void 0:G.pageData,Vr)}))){let te=(N=(k=Dr==null?void 0:Dr.data)==null?void 0:k.result)==null?void 0:N.sort((G,Z)=>G.id-Z.id);Re=await(te==null?void 0:te.map(async G=>{var de,xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn,lr,or,Xe,fa,Bn,si,fi,ci,li,oi,ui,hi,xi,pi,di,mi,gi,vi,_i,yi,ki,ma,$e,De,Ye,ga,ve,ft,vr,sr,Qa;let Z;if(mn((de=G==null?void 0:G.value)==null?void 0:de.pageData,Oe)||mn((xe=G==null?void 0:G.value)==null?void 0:xe.pageData,Vr)&&((Qr=(Sr=G==null?void 0:G.value)==null?void 0:Sr.pageData)==null?void 0:Qr.name)===Vr){Z=H.cloneDeep((gr=(ia=G==null?void 0:G.value)==null?void 0:ia.pageData)==null?void 0:gr.compData);let za;mn((da=G==null?void 0:G.value)==null?void 0:da.pageData,Oe)&&Oe===Vr?(Cr=(Ar=G==null?void 0:G.value)==null?void 0:Ar.pageData)!=null&&Cr.name1?za={name:(jr=(Ur=G==null?void 0:G.value)==null?void 0:Ur.pageData)==null?void 0:jr.name,name0:(Gr=(mr=G==null?void 0:G.value)==null?void 0:mr.pageData)==null?void 0:Gr.name0,name1:(Yr=(xr=G==null?void 0:G.value)==null?void 0:xr.pageData)==null?void 0:Yr.name1}:za={name:(cn=(wt=G==null?void 0:G.value)==null?void 0:wt.pageData)==null?void 0:cn.name,name0:(on=(ln=G==null?void 0:G.value)==null?void 0:ln.pageData)==null?void 0:on.name0}:za={name:((hn=(un=G==null?void 0:G.value)==null?void 0:un.pageData)==null?void 0:hn.name0)||((pn=(xn=G==null?void 0:G.value)==null?void 0:xn.pageData)==null?void 0:pn.name)},Z.push({key:"name",contents:za});const Kt=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:G==null?void 0:G.id,type:"data"}});let wn;if(((jn=(He=Kt==null?void 0:Kt.data)==null?void 0:He.result)==null?void 0:jn.length)>0&&((Jn=(Yn=Z==null?void 0:Z.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Yn.contents)!=null&&Jn.every(Fe=>!(Fe!=null&&Fe.columnPath))))if(wn=(lr=(qn=Kt==null?void 0:Kt.data)==null?void 0:qn.result)==null?void 0:lr.map(Fe=>{var Ce;let Ue=[];return Ue.push({id:Fe==null?void 0:Fe.id}),Ue.push((Ce=Fe==null?void 0:Fe.value)==null?void 0:Ce.tableData),Ue}),Z.push({key:"tableContents",contents:Ci(wn,(Bn=(fa=(Xe=(or=G==null?void 0:G.value)==null?void 0:or.pageData)==null?void 0:Xe.compData)==null?void 0:fa.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Bn.contents)}),Z.push({key:"contentTableId",contents:G==null?void 0:G.id}),Z.push({key:"ownerId",contents:G==null?void 0:G.id}),pa!==""&&(Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Ln}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnPath")),Z.push({key:"columnPath",contents:pa}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:Vr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let Fe;Array.isArray((fi=(si=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:si.contents)==null?void 0:fi[0])?Fe=(oi=vn((li=(ci=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ci.contents)==null?void 0:li[0]))==null?void 0:oi.map(Ue=>Ue==null?void 0:Ue.prop):Fe=(hi=(ui=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ui.contents)==null?void 0:hi.map(Ue=>Ue==null?void 0:Ue.prop),Z==null||Z.forEach(Ue=>{var Ce,zt;if(((Ue==null?void 0:Ue.key)==="contentTableId"||(Ue==null?void 0:Ue.key)==="ownerId")&&(oe==null||oe.push(Ue)),(Ue==null?void 0:Ue.key)==="header"&&(oe=oe==null?void 0:oe.map(_r=>{var Ke,et,rt,St,At,Ft;return(_r==null?void 0:_r.key)==="header"&&(Array.isArray((Ke=Ue==null?void 0:Ue.contents)==null?void 0:Ke[0])&&(Ue.contents=(et=Ue==null?void 0:Ue.contents)==null?void 0:et[0]),Array.isArray((rt=_r==null?void 0:_r.contents)==null?void 0:rt[0])?(_r.contents=(St=_r.contents)==null?void 0:St[0],_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=[(At=_r.contents)==null?void 0:At.filter(Ha=>(Ha==null?void 0:Ha.prop)!=="")]):(_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=(Ft=_r.contents)==null?void 0:Ft.filter(Ha=>(Ha==null?void 0:Ha.prop)!==""))),_r})),(Ue==null?void 0:Ue.key)==="tableContents"){let _r=(zt=(Ce=Ue==null?void 0:Ue.contents)==null?void 0:Ce.map(Ke=>d0(Ke,Fe)))==null?void 0:zt.filter(Ke=>{var et,rt;return!(((et=Object.keys(Ke))==null?void 0:et.length)===1&&((rt=Object.keys(Ke))==null?void 0:rt[0])==="id")});oe=oe==null?void 0:oe.map(Ke=>{var et,rt,St,At,Ft,Ha,Va,rr,Ze;if((Ke==null?void 0:Ke.key)==="tableContents"){let Lt=[];if((_r==null?void 0:_r.length)===0)Lt=Ke==null?void 0:Ke.contents;else{let sa=(St=(rt=(et=pe==null?void 0:pe.columnPath)==null?void 0:et.replace("(",Ir))==null?void 0:rt.split(Ir))==null?void 0:St[1],va=(At=p0(sa,","))==null?void 0:At.map(Rr=>((Rr==null?void 0:Rr[(Rr==null?void 0:Rr.length)-1])===","&&(Rr=Rr==null?void 0:Rr.slice(0,(Rr==null?void 0:Rr.length)-1)),Rr));va=(Ha=(Ft=va==null?void 0:va.find(Rr=>Rr==null?void 0:Rr.includes("@Filter")))==null?void 0:Ft.split("@Filter"))==null?void 0:Ha[1],va=(Va=va==null?void 0:va.slice(1,(va==null?void 0:va.length)-1))==null?void 0:Va.replaceAll("'","");let Ga="";if(va!=null&&va.includes("[")){Ga=(rr=va==null?void 0:va.split("="))==null?void 0:rr[0];let Rr=(Ze=Ke==null?void 0:Ke.contents)==null?void 0:Ze.map(Bt=>Bt==null?void 0:Bt[Ga]);_r=_r==null?void 0:_r.filter(Bt=>Rr==null?void 0:Rr.find(h0=>(Bt==null?void 0:Bt[Ga])===h0))}_r==null||_r.forEach(Rr=>{var Bt,h0,x0;if(!(!(Ke!=null&&Ke.contents)||((Bt=Ke==null?void 0:Ke.contents)==null?void 0:Bt.length)===0))if(Ga==="")(h0=Ke==null?void 0:Ke.contents)==null||h0.forEach(ze=>{let Je=Object.assign({},Rr,ze);Lt.push(Je)});else{let ze=(x0=Ke==null?void 0:Ke.contents)==null?void 0:x0.find(B0=>(B0==null?void 0:B0[Ga])===(Rr==null?void 0:Rr[Ga])),Je=Object.assign({},Rr,ze);Lt.push(Je)}})}Ke.contents=Lt}return Ke})}})}else{let Fe,Ue=(yi=(_i=(vi=(gi=(mi=(di=(pi=(xi=G==null?void 0:G.value)==null?void 0:xi.pageData)==null?void 0:pi.compData)==null?void 0:di.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:mi.contents)==null?void 0:gi.find(Ce=>Ce==null?void 0:Ce.columnPath))==null?void 0:vi.columnPath)==null?void 0:_i.split("["))==null?void 0:yi[0];if(os.value!==Ge&&i!==Ge)Fe=await Tn(Ge,sessionStorage.getItem("systemKey"),"",!1,[],!1,n,Ge);else{let Ce=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),zt=(De=($e=(ma=(ki=Ce==null?void 0:Ce.data)==null?void 0:ki.result)==null?void 0:ma.find(Ke=>{var et,rt,St,At,Ft,Ha;return mn((et=Ke==null?void 0:Ke.value)==null?void 0:et.pageData,Vr)&&((St=(rt=G==null?void 0:G.value)==null?void 0:rt.pageData)==null?void 0:St.name)===((Ft=(At=Ke==null?void 0:Ke.value)==null?void 0:At.pageData)==null?void 0:Ft.name)||mn((Ha=Ke==null?void 0:Ke.value)==null?void 0:Ha.pageData,Oe)&&Oe!==Vr}))==null?void 0:$e.value)==null?void 0:De.pageData;M0=(Qa=(sr=(vr=(ft=(ve=(ga=(Ye=zt==null?void 0:zt.compData)==null?void 0:Ye.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.find(Ke=>Ke==null?void 0:Ke.columnPath))==null?void 0:ft.columnPath)==null?void 0:vr.replace("(",Ir))==null?void 0:sr.split(Ir))==null?void 0:Qa[1],Fe=await Tn(Ue,sessionStorage.getItem("systemKey"),""),(Fe==null?void 0:Fe.length)>0&&(Fe[0].name=Oe)}Fe==null||Fe.forEach(Ce=>{var zt,_r,Ke,et,rt,St,At,Ft,Ha,Va,rr,Ze,Lt,sa,va,Ga,Rr,Bt,h0;if(mn(Ce,Vr)&&((_r=(zt=G==null?void 0:G.value)==null?void 0:zt.pageData)==null?void 0:_r.name)===(Ce==null?void 0:Ce.name)||mn(Ce,Oe)&&Oe!==Vr){Z=((Ke=Ce==null?void 0:Ce.compData)==null?void 0:Ke.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"))||[],Fe=(rt=(et=Ce==null?void 0:Ce.compData)==null?void 0:et.find(ze=>(ze==null?void 0:ze.key)==="tableContents"))==null?void 0:rt.contents,wn=Fe;let x0;if((mn(Ce,Vr)&&Oe===Vr||mn(Ce,Oe)&&Oe!==Vr)&&((At=(St=e==null?void 0:e.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:St.contents)==null?void 0:At.length)===2?(Ha=(Ft=G==null?void 0:G.value)==null?void 0:Ft.pageData)!=null&&Ha.name1?x0={name:Ce==null?void 0:Ce.name,name0:Ce==null?void 0:Ce.name0,name1:Ce==null?void 0:Ce.name1}:x0={name:Ce==null?void 0:Ce.name,name0:Ce==null?void 0:Ce.name0}:x0={name:(Ce==null?void 0:Ce.name0)||(Ce==null?void 0:Ce.name)},Z.push({key:"name",contents:x0}),Z.push({key:"tableContents",contents:Ci(wn,(rr=(Va=Ce==null?void 0:Ce.compData)==null?void 0:Va.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:rr.contents)}),Z.push({key:"contentTableId",contents:(Fe==null?void 0:Fe.length)!==0?((Ze=Ce==null?void 0:Ce.compData)==null?void 0:Ze.id)??(Ce==null?void 0:Ce.id):G==null?void 0:G.id}),Z.push({key:"ownerId",contents:Ce==null?void 0:Ce.id}),pa!==""&&(Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Ln}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnPath")),Z.push({key:"columnPath",contents:pa}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:Vr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let ze;Array.isArray((sa=(Lt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Lt.contents)==null?void 0:sa[0])?ze=(Rr=vn((Ga=(va=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:va.contents)==null?void 0:Ga[0]))==null?void 0:Rr.map(Je=>Je==null?void 0:Je.prop):ze=(h0=(Bt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Bt.contents)==null?void 0:h0.map(Je=>Je==null?void 0:Je.prop),Z==null||Z.forEach(Je=>{var B0,Tc;if(((Je==null?void 0:Je.key)==="contentTableId"||(Je==null?void 0:Je.key)==="ownerId")&&(oe==null||oe.push(Je)),(Je==null?void 0:Je.key)==="header"&&(oe=oe==null?void 0:oe.map(Wr=>{var Xr,Zn,Qn,Ei,Ti,wi;return(Wr==null?void 0:Wr.key)==="header"&&(Array.isArray((Xr=Je==null?void 0:Je.contents)==null?void 0:Xr[0])&&(Je.contents=(Zn=Je==null?void 0:Je.contents)==null?void 0:Zn[0]),Array.isArray((Qn=Wr==null?void 0:Wr.contents)==null?void 0:Qn[0])?(Wr.contents=(Ei=Wr.contents)==null?void 0:Ei[0],Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=[(Ti=Wr.contents)==null?void 0:Ti.filter(Sn=>(Sn==null?void 0:Sn.prop)!=="")]):(Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=(wi=Wr.contents)==null?void 0:wi.filter(Sn=>(Sn==null?void 0:Sn.prop)!==""))),Wr})),(Je==null?void 0:Je.key)==="tableContents"){let Wr=(Tc=(B0=Je==null?void 0:Je.contents)==null?void 0:B0.map(Xr=>d0(Xr,ze)))==null?void 0:Tc.filter(Xr=>{var Zn,Qn;return!(((Zn=Object.keys(Xr))==null?void 0:Zn.length)===1&&((Qn=Object.keys(Xr))==null?void 0:Qn[0])==="id")});oe=oe==null?void 0:oe.map(Xr=>{var Zn,Qn,Ei,Ti,wi,Sn,wc,Sc,Ac;if((Xr==null?void 0:Xr.key)==="tableContents"){let fs=[];if((Wr==null?void 0:Wr.length)===0)fs=Xr==null?void 0:Xr.contents;else{let wh=(Ei=(Qn=(Zn=pe==null?void 0:pe.columnPath)==null?void 0:Zn.replace("(",Ir))==null?void 0:Qn.split(Ir))==null?void 0:Ei[1],at=(Ti=p0(wh,","))==null?void 0:Ti.map(ea=>((ea==null?void 0:ea[(ea==null?void 0:ea.length)-1])===","&&(ea=ea==null?void 0:ea.slice(0,(ea==null?void 0:ea.length)-1)),ea));at=(Sn=(wi=at==null?void 0:at.find(ea=>ea==null?void 0:ea.includes("@Filter")))==null?void 0:wi.split("@Filter"))==null?void 0:Sn[1],at=(wc=at==null?void 0:at.slice(1,(at==null?void 0:at.length)-1))==null?void 0:wc.replaceAll("'","");let U0="";if(at!=null&&at.includes("[")){U0=(Sc=at==null?void 0:at.split("="))==null?void 0:Sc[0];let ea=(Ac=Xr==null?void 0:Xr.contents)==null?void 0:Ac.map(An=>An==null?void 0:An[U0]);Wr=Wr==null?void 0:Wr.filter(An=>ea==null?void 0:ea.find(cs=>(An==null?void 0:An[U0])===cs))}Wr==null||Wr.forEach(ea=>{var An,cs,Fc;if(!(!(Xr!=null&&Xr.contents)||((An=Xr==null?void 0:Xr.contents)==null?void 0:An.length)===0))if(U0==="")(cs=Xr==null?void 0:Xr.contents)==null||cs.forEach(Ys=>{let Js=Object.assign({},ea,Ys);fs.push(Js)});else{let Ys=(Fc=Xr==null?void 0:Xr.contents)==null?void 0:Fc.find(qs=>(qs==null?void 0:qs[U0])===(ea==null?void 0:ea[U0])),Js=Object.assign({},ea,Ys);fs.push(Js)}})}Xr.contents=fs}return Xr})}})}}})}}})),await Promise.all(Re)}let Lr=[];oe!=null&&oe.every(te=>Array.isArray(te))||(oe=[oe]),oe==null||oe.forEach(te=>{Lr!=null&&Lr.find(G=>{var Z,de,xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn;return((Sr=(xe=(de=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:de[((Z=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)==null?void 0:Sr.name)===((da=(gr=(ia=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:ia[((Qr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Qr.length)-1])==null?void 0:gr.contents)==null?void 0:da.name)&&((jr=(Ur=(Cr=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Cr[((Ar=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Ar.length)-1])==null?void 0:Ur.contents)==null?void 0:jr.name0)===((Yr=(xr=(Gr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Gr[((mr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:mr.length)-1])==null?void 0:xr.contents)==null?void 0:Yr.name0)&&((on=(ln=(cn=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:cn[((wt=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:wt.length)-1])==null?void 0:ln.contents)==null?void 0:on.name1)===((pn=(xn=(hn=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:hn[((un=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:un.length)-1])==null?void 0:xn.contents)==null?void 0:pn.name1)})||Lr.push(te)}),Lr=Lr==null?void 0:Lr.map(te=>{var Z,de;let G=[];return te==null||te.forEach(xe=>{(xe==null?void 0:xe.key)!=="name"&&G.push(xe)}),G.push((de=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:de[((Z=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:Z.length)-1]),G}),oe=Lr==null?void 0:Lr.sort((te,G)=>{var Z,de,xe,Sr,Qr,ia;return((xe=(de=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:de[((Z=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)-((ia=(Qr=G==null?void 0:G.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Qr[((Sr=G==null?void 0:G.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Sr.length)-1])==null?void 0:ia.contents)}),oe=oe==null?void 0:oe.filter(te=>te!==void 0),oe=oe==null?void 0:oe.map(te=>{var Z,de;let G=(de=Ts((Z=te==null?void 0:te.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:Z.contents))==null?void 0:de.filter(xe=>xe!=="操作"&&xe);return te=te==null?void 0:te.map(xe=>{var Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn,lr,or,Xe,fa,Bn,si,fi,ci,li,oi,ui,hi,xi,pi,di,mi,gi,vi,_i,yi,ki;if((xe==null?void 0:xe.key)==="tableContents"){let ma=[];if((gr=(ia=(Qr=(Sr=pe==null?void 0:pe.columnPath)==null?void 0:Sr.split("@Type"))==null?void 0:Qr[1])==null?void 0:ia.toUpperCase())!=null&&gr.includes("MANUAL")){Za==null||Za.forEach(Ye=>{Ye.value.id=Ye==null?void 0:Ye.id,ma.push(Ye==null?void 0:Ye.value)});let $e=[];((Ar=(da=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:da.contents)==null?void 0:Ar.length)<=2&&!Array.isArray((Ur=(Cr=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:Cr.contents)==null?void 0:Ur[0])&&((jr=xe.contents)==null||jr.forEach(Ye=>{let ga=(Ye==null?void 0:Ye.length)!==1?d0(Ye,G):Ye==null?void 0:Ye[0];$e.push(ga)}));let De=G==null?void 0:G[0];$e==null||$e.forEach(Ye=>{ma!=null&&ma.find(ga=>(ga==null?void 0:ga[De])===(Ye==null?void 0:Ye[De]))||ma.push(Ye)})}else(cn=(wt=(Yr=p0((xr=(Gr=(mr=pe==null?void 0:pe.columnPath)==null?void 0:mr.replace("(",Ir))==null?void 0:Gr.split(Ir))==null?void 0:xr[1],","))==null?void 0:Yr.find($e=>$e==null?void 0:$e.includes("@FatherSync")))==null?void 0:wt.toUpperCase())!=null&&cn.includes("YES")?(ln=xe.contents)==null||ln.forEach($e=>{var ga,ve,ft;let De=($e==null?void 0:$e.length)!==1?d0($e,G):$e==null?void 0:$e[0],Ye=Za==null?void 0:Za.filter(vr=>(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id));if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Qa={};for(let za in sr)(sr==null?void 0:sr[za])!==void 0&&(Qa[za]=sr==null?void 0:sr[za]);Ye=Qa,sr.id=vr==null?void 0:vr.id,ma.push(sr)});else{De.id=((ve=(ga=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((ft=De==null?void 0:De.id)==null?void 0:ft.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,ma.push(De)}}):(on=xe.contents)==null||on.forEach($e=>{var ga,ve,ft;let De=($e==null?void 0:$e.length)!==1?d0($e,G):$e==null?void 0:$e[0],Ye=Za==null?void 0:Za.filter(vr=>{var sr,Qa;return(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id)||((sr=vr==null?void 0:vr.id)==null?void 0:sr.toString())===((Qa=De==null?void 0:De.id)==null?void 0:Qa.toString())});if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Qa={};for(let za in sr)(sr==null?void 0:sr[za])!==void 0&&(Qa[za]=sr==null?void 0:sr[za]);Ye=Qa,sr.id=vr==null?void 0:vr.id,ma.push(sr)});else{De.id=((ve=(ga=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((ft=De==null?void 0:De.id)==null?void 0:ft.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,ma.push(De)}});xe.contents=ma}if((xe==null?void 0:xe.key)==="header"){let ma=Pn==null?void 0:Pn.find(ve=>{var ft,vr,sr,Qa,za,Kt,wn;return(wn=pe==null?void 0:pe.columnPath)==null?void 0:wn.includes((Kt=(vr=(ft=ve==null?void 0:ve.value)==null?void 0:ft.split("%$%"))==null?void 0:vr[0])==null?void 0:Kt.slice(0,((za=(Qa=(sr=ve==null?void 0:ve.value)==null?void 0:sr.split("%$%"))==null?void 0:Qa[0])==null?void 0:za.length)-1))}),$e=ma==null?void 0:ma.key;if(((un=$e==null?void 0:$e.split("["))==null?void 0:un.length)>2){let ve=gf($e);$e=Uh((xn=(hn=ve==null?void 0:ve.stringContent)==null?void 0:hn.split(","))==null?void 0:xn.filter(ft=>ft!==""),ve==null?void 0:ve.parentColumns)}else $e=(jn=(He=(pn=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:pn.replaceAll("[",""))==null?void 0:He.replaceAll("]",""))==null?void 0:jn.split(",");let De=(fi=(si=(Bn=(qn=(Jn=(Yn=ma==null?void 0:ma.value)==null?void 0:Yn.split("("))==null?void 0:Jn[0])==null?void 0:qn.split("["))==null?void 0:Bn[((fa=(Xe=(or=(lr=ma==null?void 0:ma.value)==null?void 0:lr.split("("))==null?void 0:or[0])==null?void 0:Xe.split("["))==null?void 0:fa.length)-1])==null?void 0:si.split("]"))==null?void 0:fi[0],Ye=(oi=(li=(ci=De==null?void 0:De.replaceAll("'",""))==null?void 0:ci.split(","))==null?void 0:li.filter(ve=>ve==null?void 0:ve.includes('"')))==null?void 0:oi.map(ve=>ve==null?void 0:ve.replaceAll('"',""));De=(hi=(ui=De==null?void 0:De.replaceAll("'",""))==null?void 0:ui.replaceAll('"',""))==null?void 0:hi.split(","),Array.isArray($e)||($e=(di=(pi=(xi=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:xi.replaceAll("[",""))==null?void 0:pi.replaceAll("]",""))==null?void 0:di.split(","));let ga=((gi=(mi=xe.contents)==null?void 0:mi.find(ve=>ve==null?void 0:ve.menuId))==null?void 0:gi.menuId)??((yi=(_i=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:_i[((vi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:vi.length)-1])==null?void 0:yi.contents);xe.contents=(ki=xe.contents)==null?void 0:ki.map(ve=>{var ft,vr,sr,Qa,za,Kt,wn,Fe,Ue,Ce,zt,_r,Ke,et,rt,St,At,Ft,Ha;if(Array.isArray(ve)){(ft=vn(ve))!=null&&ft.every(Ze=>!(Ze!=null&&Ze.menuId))&&(ga=((sr=(vr=vn(ve))==null?void 0:vr.find(Ze=>Ze==null?void 0:Ze.menuId))==null?void 0:sr.menuId)??ga,ve=ve==null?void 0:ve.map((Ze,Lt)=>{var sa,va;return Lt===0?Ze!=null&&Ze.children?Ze.children=(sa=Ze.children)==null?void 0:sa.map((Ga,Rr)=>(Rr===0?(Ga.directiveLabel="#isMain",Ga.menuId=ga):(Ga.directiveLabel="",delete Ga.menuId),Ga.relatedValueId=!0,Ga)):(Ze.directiveLabel="#isMain",Ze.menuId=ga):(Ze.directiveLabel="",delete Ze.menuId,Ze.children=(va=Ze.children)==null?void 0:va.map(Ga=>(Ga.relatedValueId=!0,Ga))),Ze.relatedValueId=!0,Ze}));let Va=(Kt=(za=(Qa=pe==null?void 0:pe.columnPath)==null?void 0:Qa.replace("(",Ir))==null?void 0:za.split(Ir))==null?void 0:Kt[1];Va=Va==null?void 0:Va.slice(0,(Va==null?void 0:Va.length)-1);let rr=(wn=p0(Va,","))==null?void 0:wn.map(Ze=>((Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),Ze));return ve=Jl(ve,$e,De,pe,ga,rr),ve}else if(De!=null&&De.find(Va=>Va===(ve==null?void 0:ve.prop))){let Va=De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop));if($e!=null&&$e.find(rr=>rr==null?void 0:rr.includes('"'))?((Fe=$e==null?void 0:$e[Va])!=null&&Fe.includes('"')?(ve.directiveLabel="#isMain",ve.menuId=ga):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0):(Ye==null?void 0:Ye.length)>0&&(Ye!=null&&Ye.find(rr=>rr===(ve==null?void 0:ve.prop))?(ve.directiveLabel="#isMain",ve.menuId=ga):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0),pe!=null&&pe.methodContent){let rr=(Ce=(Ue=pe==null?void 0:pe.methodContent)==null?void 0:Ue.replaceAll('"',""))==null?void 0:Ce.replaceAll("'","");rr!=null&&rr.includes("@")?(rr=rr==null?void 0:rr.slice(0,(rr==null?void 0:rr.length)-1),rr!=null&&rr.includes("@Type")||(rr=rr+",@Type=Auto"),rr!=null&&rr.includes("@Button")||(rr=rr+",@Button=Prop"),rr!=null&&rr.includes("@Extent")||(rr=rr+",@Extent=Row"),rr=rr+")"):rr=rr+"(@Type=Auto,@Button=Prop,@Extent=Row)",ve.methodContent=rr,ve.prop=(ve==null?void 0:ve.prop)+(pe==null?void 0:pe.columnPathIndex);let Ze=(Ke=(_r=(zt=pe==null?void 0:pe.columnPath)==null?void 0:zt.replace("(",Ir))==null?void 0:_r.split(Ir))==null?void 0:Ke[1];Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1);let Lt=(et=p0(Ze,","))==null?void 0:et.map(sa=>((sa==null?void 0:sa[(sa==null?void 0:sa.length)-1])===","&&(sa=sa==null?void 0:sa.slice(0,(sa==null?void 0:sa.length)-1)),sa));(rt=Lt==null?void 0:Lt.find(sa=>sa==null?void 0:sa.includes("@SonSync")))!=null&&rt.includes("Yes")&&(ve.methodId=ga)}ve.label=(Ha=(St=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:St.split("."))==null?void 0:Ha[((Ft=(At=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:At.split("."))==null?void 0:Ft.length)-1]}return ve})}return xe}),te});let ta=(O=(C=(F=pe==null?void 0:pe.columnPath)==null?void 0:F.replace("(",Ir))==null?void 0:C.split(Ir))==null?void 0:O[1];if(M0!==""&&(ta=(ta==null?void 0:ta.replaceAll(")",""))+","+M0),ta&&(ta==null?void 0:ta.length)>0){ta=(R=ta.slice(0,(ta==null?void 0:ta.length)-1))==null?void 0:R.replaceAll("'","");let te=(K=p0(ta,","))==null?void 0:K.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));te=te==null?void 0:te.map(de=>{let xe=V0==null?void 0:V0.find(Sr=>de==null?void 0:de.includes(Sr==null?void 0:Sr.key));if(xe)return{order:xe==null?void 0:xe.order,value:xe==null?void 0:xe.value,content:de}}),te=te==null?void 0:te.sort((de,xe)=>(xe==null?void 0:xe.order)-(de==null?void 0:de.order));let G=[];oe=oe==null?void 0:oe.map(de=>(de=de==null?void 0:de.map((xe,Sr)=>{var Qr,ia,gr,da;return(xe==null?void 0:xe.key)==="header"&&((Qr=xe==null?void 0:xe.contents)!=null&&Qr.every(Ar=>Array.isArray(Ar))?xe.contents=(ia=xe.contents)==null?void 0:ia.map(Ar=>{var Cr;return G.push({index:Sr,content:(Cr=H.cloneDeep(Ar))==null?void 0:Cr.filter(Ur=>Ur==null?void 0:Ur.columnPath)}),Ar=Ar==null?void 0:Ar.filter(Ur=>!(Ur!=null&&Ur.columnPath)),Ar}):(G.push({index:Sr,content:(gr=H.cloneDeep(xe.contents))==null?void 0:gr.filter(Ar=>Ar==null?void 0:Ar.columnPath)}),xe.contents=(da=xe.contents)==null?void 0:da.filter(Ar=>!(Ar!=null&&Ar.columnPath)))),xe}),de)),await(async()=>{var de,xe,Sr,Qr,ia,gr,da,Ar;for(const Cr of te??[])if(Cr){const Ur=(de=Cr==null?void 0:Cr.content)!=null&&de.includes("@Filter")?"("+((Qr=(Sr=(xe=Cr==null?void 0:Cr.content)==null?void 0:xe.replace("(",Ir))==null?void 0:Sr.split(Ir))==null?void 0:Qr[1]):(da=(gr=(ia=Cr==null?void 0:Cr.content)==null?void 0:ia.replace(":",Ir))==null?void 0:gr.split(Ir))==null?void 0:da[1];oe=await no((Cr==null?void 0:Cr.value)+"('"+JSON.stringify(H.cloneDeep(oe)).replaceAll("'",'"')+"','"+Ur+"','"+((Ar=pe==null?void 0:pe.columnPath)==null?void 0:Ar.replaceAll("'",""))+"')")??[]}})(),oe=oe==null?void 0:oe.map(de=>(de.push({key:"filterAllType",value:te}),de)),oe=oe==null?void 0:oe.map(de=>(de=de==null?void 0:de.map((xe,Sr)=>{var Qr,ia,gr,da,Ar,Cr;if((xe==null?void 0:xe.key)==="header")if((Qr=xe==null?void 0:xe.contents)!=null&&Qr.every(Ur=>Array.isArray(Ur)))xe.contents=(ia=xe.contents)==null?void 0:ia.map(Ur=>{var jr,mr,Gr,xr;return G!=null&&G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr)&&((mr=(jr=G==null?void 0:G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr))==null?void 0:jr.content)==null?void 0:mr.length)>0&&Ur.push((xr=(Gr=G==null?void 0:G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr))==null?void 0:Gr.content)==null?void 0:xr[0]),Ur});else{let Ur=xe.contents;G!=null&&G.find(jr=>(jr==null?void 0:jr.index)===Sr)&&((da=(gr=G==null?void 0:G.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:gr.content)==null?void 0:da.length)>0&&Ur.push((Cr=(Ar=G==null?void 0:G.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Ar.content)==null?void 0:Cr[0]),xe.contents=Ur}return xe}),de))}let Br=(J=(j=(V=(Y=Wa==null?void 0:Wa.replaceAll("{",""))==null?void 0:Y.replaceAll("}",""))==null?void 0:V.replace(":",Ir))==null?void 0:j.split(Ir))==null?void 0:J[1];Br!=null&&Br.includes("[")&&(Br=(le=Br==null?void 0:Br.replaceAll("'",'"'))==null?void 0:le.replaceAll(":",","),Br=(_e=Q1(Br))==null?void 0:_e.join(","),Br="["+((ge=(ue=(Ee=Br==null?void 0:Br.replaceAll('":"',Lc.value))==null?void 0:Ee.replaceAll(":",Lc.value))==null?void 0:ue.replaceAll("[",""))==null?void 0:ge.replaceAll("]",""))+"]",Xt(Br==null?void 0:Br.replaceAll("'",'"'))&&(Br=JSON.parse(Br==null?void 0:Br.replaceAll("'",'"')),Br!=null&&Br.find(te=>te==="操作")||Br.push("操作")),oe=oe==null?void 0:oe.map(te=>{let G=[],Z=[];return te=te==null?void 0:te.map(de=>{var xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr;if((de==null?void 0:de.key)==="header")if((xe=de.contents)!=null&&xe.every(mr=>Array.isArray(mr)))de.contents=(Qr=(Sr=de.contents)==null?void 0:Sr.map(mr=>{let Gr=_f(mr,Br);return mr=Gr==null?void 0:Gr.contents,G=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],mr}))==null?void 0:Qr.filter(mr=>!((mr==null?void 0:mr.label)==="操作"&&(mr!=null&&mr.relatedValueId)));else{let mr=(gr=(ia=de.contents)==null?void 0:ia[0])==null?void 0:gr.menuId,Gr=_f(de.contents,Br);G=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],(da=de.contents)!=null&&da.some(xr=>xr==null?void 0:xr.columnPath)||(de.contents=(Ar=de.contents)==null?void 0:Ar.filter(xr=>(Br==null?void 0:Br.find(Yr=>{var wt;return Yr===(((wt=xr==null?void 0:xr.prop)==null?void 0:wt.replace(/\d+$/,""))||(xr==null?void 0:xr.label))}))&&!((xr==null?void 0:xr.label)==="操作"&&(xr!=null&&xr.relatedValueId))),(Cr=de.contents)!=null&&Cr.every(xr=>!(xr!=null&&xr.menuId))&&(de.contents=(Ur=de.contents)==null?void 0:Ur.map((xr,Yr)=>(Yr===0&&(xr.menuId=mr),xr))))}return(de==null?void 0:de.key)==="tableContents"&&(G==null?void 0:G.length)>0&&(de.contents=(jr=de.contents)==null?void 0:jr.map(mr=>{if(Array.isArray(mr))mr=mr==null?void 0:mr.filter((Gr,xr)=>(G==null?void 0:G.find(Yr=>Yr===xr))||(Gr==null?void 0:Gr.id));else for(let Gr in mr)(Gr==="id"||Z!=null&&Z.find(xr=>xr===Gr))&&(mr==null||mr[Gr]);return mr})),de}),te}));let Me=[];(Er=(qe=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:qe.contents)!=null&&Er.every(te=>Array.isArray(te))?Me=(nn=($r=(Mr=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Mr.contents)==null?void 0:$r[0])==null?void 0:nn.filter(te=>!(te!=null&&te.columnPath)&&(te==null?void 0:te.label)!=="操作"):Me=f;let L0=Pn==null?void 0:Pn.find(te=>{var G,Z,de;return(de=pe==null?void 0:pe.columnPath)==null?void 0:de.includes((Z=(G=te==null?void 0:te.value)==null?void 0:G.split("%$%"))==null?void 0:Z[0])});Me&&(Me==null?void 0:Me.length)>0&&(oe=oe==null?void 0:oe.map(te=>(te=te==null?void 0:te.map(G=>{var xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn;let Z=(Sr=(xe=e==null?void 0:e.find(lr=>(lr==null?void 0:lr.key)==="header"))==null?void 0:xe.contents)==null?void 0:Sr.filter(lr=>lr==null?void 0:lr.columnPath),de=(Qr=Z==null?void 0:Z[er])!=null&&Qr.columnPathIndex&&((ia=Z==null?void 0:Z[er])==null?void 0:ia.columnPathIndex)!==""?parseInt((gr=Z==null?void 0:Z[er])==null?void 0:gr.columnPathIndex):0;if((G==null?void 0:G.key)==="header"){if(((da=G==null?void 0:G.contents)==null?void 0:da.length)===0)return G==null?void 0:G.contents;if((((Cr=(Ar=L0==null?void 0:L0.key)==null?void 0:Ar.split("["))==null?void 0:Cr.length)??0)<=2){if((Ur=G==null?void 0:G.contents)!=null&&Ur.every(lr=>Array.isArray(lr))){if(de===0)Array.isArray(Me==null?void 0:Me[0])?G.contents=[...(jr=G.contents)==null?void 0:jr[0],...Me==null?void 0:Me[0]]:G.contents=[...(mr=G.contents)==null?void 0:mr[0],...Me];else if(Array.isArray(Me==null?void 0:Me[0])){let lr=((wt=(Gr=Me==null?void 0:Me[0])==null?void 0:Gr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:wt.slice(de,(Yr=(xr=Me==null?void 0:Me[0])==null?void 0:xr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:Yr.length))??[],or=[...(cn=Me==null?void 0:Me[0])==null?void 0:cn.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作").slice(0,de),...(ln=G.contents)==null?void 0:ln[0]];or=[...or,...lr],Array.isArray((on=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""))==null?void 0:on[0])?G.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""):G.contents=[or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")]}else{let lr=(Me==null?void 0:Me.slice(de,Me==null?void 0:Me.length))??[],or=[...Me.slice(0,de),...G.contents];or=[...or,...lr],G.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")}G.contents=(un=G.contents)==null?void 0:un.filter(lr=>(lr==null?void 0:lr.prop)!==""),Array.isArray((hn=G.contents)==null?void 0:hn[0])||(G.contents=[G.contents])}else if(G.contents=(xn=G.contents)==null?void 0:xn.map((lr,or)=>lr),(Z==null?void 0:Z[er])===0)Array.isArray(Me==null?void 0:Me[0])?G.contents=[...G.contents,...Me==null?void 0:Me[0]]:G.contents=[...G.contents,...Me];else{let lr=de;if(Array.isArray(Me==null?void 0:Me[0])){let or=((He=Me==null?void 0:Me[0])==null?void 0:He.slice(lr,(pn=Me==null?void 0:Me[0])==null?void 0:pn.length))??[],Xe=[...Me==null?void 0:Me[0].slice(0,lr),...G.contents];Xe=[...Xe,...or],Array.isArray((jn=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""))==null?void 0:jn[0])?G.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""):G.contents=[Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")]}else{let or=(Me==null?void 0:Me.slice(lr,Me==null?void 0:Me.length))??[],Xe=[...Me.slice(0,lr),...G.contents];Xe=[...Xe,...or],G.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")}}if(Array.isArray((Yn=G.contents)==null?void 0:Yn[0])){const lr=new Map;(Jn=G.contents)==null||Jn[0].forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),G.contents=[...lr.values()],G.contents=[G.contents],G.contents=[(qn=G.contents)==null?void 0:qn[0].filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Bn=>Bn.label==="操作")===Xe)]}else{const lr=new Map;G.contents.forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),G.contents=[...lr.values()],G.contents=G.contents.filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Bn=>Bn.label==="操作")===Xe)}}else{let lr=Wh(G.contents,Me);lr!=null&&lr.find(or=>(or==null?void 0:or.label)==="操作")||lr.push({label:"操作"}),G.contents=[lr]}}return(G==null?void 0:G.key)==="relatedFilter"&&(G.index=de),G}),te)))}f=(Nn=(Mt=(fn=(sn=H.cloneDeep(oe))==null?void 0:sn[0])==null?void 0:fn.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:Mt.contents)==null?void 0:Nn.filter(Re=>!(Re!=null&&Re.columnPath)&&(Re==null?void 0:Re.label)!=="操作"),s=oe}return s==null?void 0:s.filter(er=>er!==void 0)},Tn=async(e,a,r="",n=!1,t,i,s,f)=>{var v,E,w,S,T,B;let l,c=new WeakMap;s&&(c=s),(!n||!t)&&(l=(v=c[e])==null?void 0:v.filter(I=>{var U,L;return((U=I==null?void 0:I.key)==null?void 0:U.parentTable)===r||((L=I==null?void 0:I.key)==null?void 0:L.type)==="related"})),to.setPageMapState(c);const o=(E=c[e])==null?void 0:E.filter(I=>{var U;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="structureMethod"}),u=l==null?void 0:l.map(I=>I.id);if(!u)return;let x=(w=c[e])==null?void 0:w.filter(I=>{var U,L,W,M;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="data"&&(u.includes((L=I==null?void 0:I.key)==null?void 0:L.tableId)||u.includes((M=(W=I==null?void 0:I.key)==null?void 0:W.tableId)==null?void 0:M.toString()))});const h=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),p=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");h&&Array.isArray(p)&&p.length>0&&(e!=null&&e.startsWith("/")&&e.substring(1),(S=h==null?void 0:h.pageKey)!=null&&S.startsWith("/")?h.pageKey.substring(1):h==null||h.pageKey);const d=c[e+Z1.value]??[];(d==null?void 0:d.length)===0&&(x=ao(x,!1,c));let m=[];x==null||x.forEach(I=>{var W;const U=Array.isArray(I.value.tableData)?I.value.tableData:[I.value.tableData];U.unshift({id:I.id});const L=(W=I==null?void 0:I.key)==null?void 0:W.tableId;m!=null&&m.find(M=>(M==null?void 0:M.key)===L)?m=m==null?void 0:m.map(M=>((M==null?void 0:M.key)===L&&(M.contents=[...M.contents,U]),M)):m.push({key:L,contents:[U]})});let g=[];const y=await(l==null?void 0:l.map(async(I,U)=>{var se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka;let L=I.value.pageData;const W=I==null?void 0:I.id;let M=(se=H.cloneDeep(L==null?void 0:L.compData))==null?void 0:se.filter(Se=>(Se==null?void 0:Se.key)!=="tableContents");if(!(L!=null&&L.orderId)&&typeof L!="string"&&(L.orderId=U),M&&(M!=null&&M.find(Se=>(Se==null?void 0:Se.key)==="header"))&&(!Array.isArray((he=(ne=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ne.contents)==null?void 0:he[0])&&((be=(ce=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ce.contents)!=null&&be.every(Se=>!(Se!=null&&Se.columnPath)))||Array.isArray((Te=(z=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:z.contents)==null?void 0:Te[0])&&((A=vn((_=(Ae=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:Ae.contents)==null?void 0:_[0]))!=null&&A.every(Se=>!(Se!=null&&Se.columnPath))))){M=await(M==null?void 0:M.map(async me=>{var Fr,Or,hr,kr,xa,aa,We,zr,na,wa,ha,fr,wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F,C,O,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,nn,sn,fn,Mt,Nn,er,pe,Pn,M0,Mn,Vr,Ge;if((me==null?void 0:me.key)==="header"){if(((Fr=me.contents)==null?void 0:Fr.length)===0){let pa=(Or=M==null?void 0:M.find(oe=>(oe==null?void 0:oe.key)==="relatedFilter"))==null?void 0:Or.contents,Ln=(hr=pa==null?void 0:pa.split("["))==null?void 0:hr[0],cr=(zr=(We=(aa=(xa=(kr=pa==null?void 0:pa.replace("[",Ir))==null?void 0:kr.split(Ir))==null?void 0:xa[1])==null?void 0:aa.replace("]",Ir))==null?void 0:We.split(Ir))==null?void 0:zr[0];cr=(na=cr==null?void 0:cr.split("["))==null?void 0:na[0],cr=(fr=(ha=cr==null?void 0:cr.split(":"))==null?void 0:ha[((wa=cr==null?void 0:cr.split(":"))==null?void 0:wa.length)-1])==null?void 0:fr.replaceAll("'","");let Wa=((Ct=(st=(Ua=(Ba=(Oa=(wr=c==null?void 0:c[Ln])==null?void 0:wr.find(oe=>{var Dr,Oe;return((Oe=(Dr=oe==null?void 0:oe.value)==null?void 0:Dr.pageData)==null?void 0:Oe.name)===cr}))==null?void 0:Oa.value)==null?void 0:Ba.pageData)==null?void 0:Ua.compData)==null?void 0:st.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Ct.contents)??[];if(Wa!=null&&Wa.some(oe=>oe==null?void 0:oe.columnPath)){let oe=await Tn(Ln,a,r,n,t,i,c);Wa=(Rt=(_t=(Ot=oe==null?void 0:oe.find(Dr=>(Dr==null?void 0:Dr.name)===cr))==null?void 0:Ot.compData)==null?void 0:_t.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:Rt.contents}me.contents=Wa}else if((Pt=(Nt=M==null?void 0:M.find(pa=>(pa==null?void 0:pa.key)==="relatedFilter"))==null?void 0:Nt.contents)!=null&&Pt.length){let pa=(k=M==null?void 0:M.find(Oe=>(Oe==null?void 0:Oe.key)==="relatedFilter"))==null?void 0:k.contents,Ln=(N=pa==null?void 0:pa.split("["))==null?void 0:N[0],cr=(K=(R=(O=(C=(F=pa==null?void 0:pa.replace("[",Ir))==null?void 0:F.split(Ir))==null?void 0:C[1])==null?void 0:O.replace("]",Ir))==null?void 0:R.split(Ir))==null?void 0:K[0],Wa=(j=(V=(Y=cr==null?void 0:cr.split("["))==null?void 0:Y[1])==null?void 0:V.replaceAll("'",""))==null?void 0:j.split(",");cr=(J=cr==null?void 0:cr.split("["))==null?void 0:J[0],cr=((Ee=(_e=cr==null?void 0:cr.split(":"))==null?void 0:_e[((le=cr==null?void 0:cr.split(":"))==null?void 0:le.length)-1])==null?void 0:Ee.replaceAll("'",""))===""?(qe=(ge=cr==null?void 0:cr.split(":"))==null?void 0:ge[((ue=cr==null?void 0:cr.split(":"))==null?void 0:ue.length)-2])==null?void 0:qe.replaceAll("'",""):($r=(Mr=cr==null?void 0:cr.split(":"))==null?void 0:Mr[((Er=cr==null?void 0:cr.split(":"))==null?void 0:Er.length)-1])==null?void 0:$r.replaceAll("'","");let oe=((er=(Nn=(Mt=(fn=(sn=(nn=c==null?void 0:c[Ln])==null?void 0:nn.find(Oe=>{var Ra,Za;return((Za=(Ra=Oe==null?void 0:Oe.value)==null?void 0:Ra.pageData)==null?void 0:Za.name)===cr}))==null?void 0:sn.value)==null?void 0:fn.pageData)==null?void 0:Mt.compData)==null?void 0:Nn.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:er.contents)??[];if(oe!=null&&oe.some(Oe=>Oe==null?void 0:Oe.columnPath)){let Oe=await Tn(Ln,a,r,n,t,i,c);oe=(M0=(Pn=(pe=Oe==null?void 0:Oe.find(Ra=>(Ra==null?void 0:Ra.name)===cr))==null?void 0:pe.compData)==null?void 0:Pn.find(Ra=>(Ra==null?void 0:Ra.key)==="header"))==null?void 0:M0.contents}(Wa==null?void 0:Wa.length)>0&&(oe=oe==null?void 0:oe.filter(Oe=>Wa==null?void 0:Wa.find(Ra=>Ra===(Oe==null?void 0:Oe.prop))));let Dr=(Mn=M==null?void 0:M.find(Oe=>(Oe==null?void 0:Oe.key)==="relatedFilter"))==null?void 0:Mn.index;if(Dr!==""){Dr=parseInt(Dr);let Oe=((Vr=me.contents)==null?void 0:Vr.slice(Dr,me.contents.length))??[],Ra=[...(Ge=me.contents)==null?void 0:Ge.slice(0,Dr),...oe];Ra=[...Ra,...Oe],me.contents=Ra}}}return me})),M=await Promise.all(M);const Se=((D=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="contentTableId"))==null?void 0:D.contents)??I.id;let Ne=Ci((b=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===Se))==null?void 0:b.contents,(X=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:X.contents),Be=await mx((re=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:re.contents,e,(ee=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="tableFilter"))==null?void 0:ee.contents,c);if((q=(Q=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)!=null&&q.find(me=>(me==null?void 0:me.filterContent)&&(me==null?void 0:me.filterContent)!=="")){let me=(Pe=(P=(we=M==null?void 0:M.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:we.contents)==null?void 0:P.find(hr=>(hr==null?void 0:hr.filterContent)&&(hr==null?void 0:hr.filterContent)!==""))==null?void 0:Pe.filterContent;me=(Ie=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))==null?void 0:Ie.split(",");let Fr=me==null?void 0:me.map(hr=>{var xa,aa;let kr=V0==null?void 0:V0.find(We=>hr==null?void 0:hr.includes(We==null?void 0:We.key));if(kr)return{order:kr==null?void 0:kr.order,value:kr==null?void 0:kr.value,content:(aa=(xa=hr==null?void 0:hr.replaceAll("/",":"))==null?void 0:xa.replaceAll(":","="))==null?void 0:aa.replace("=",":")}});M!=null&&M.every(hr=>Array.isArray(hr))||(M=[M]),await(async()=>{var hr,kr,xa;for(const aa of Fr??[])if(aa){const We=(xa=(kr=(hr=aa==null?void 0:aa.content)==null?void 0:hr.replace(":",Ir))==null?void 0:kr.split(Ir))==null?void 0:xa[1];M=await no((aa==null?void 0:aa.value)+"('"+JSON.stringify(M).replaceAll("'",'"')+"','"+We+"','')")??[]??M}})(),M=M==null?void 0:M[0]}Be!=null&&Be.mainKeys&&M.push({key:"mainRouters",contents:Be==null?void 0:Be.mainKeys});let Ta=[],Qe=[];Array.isArray(Be)&&(Ta=Ci(Be,(je=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:je.contents)),Array.isArray(Be==null?void 0:Be.tableContents)&&(Qe=Ci(Be==null?void 0:Be.tableContents,(Le=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Le.contents));let br=[...Ta,...Qe];Array.isArray(Ne)&&(Ne==null?void 0:Ne.length)>0&&(br=[...br,...Ne]),M.push({key:"tableContents",contents:br}),M=M==null?void 0:M.map(me=>{var Fr,Or;return(me==null?void 0:me.key)==="header"&&((Fr=me.contents)==null?void 0:Fr.length)!==0&&(me.contents=(Or=me.contents)==null?void 0:Or.map(hr=>((hr==null?void 0:hr.prop)===(Be==null?void 0:Be.mainKey)&&(hr.isMainKey=!0),hr))),me})}else M&&((ie=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))!=null&&ie.contents)&&(M=await ex(H.cloneDeep(M),W,l,c,e,f),M!=null&&M.every(Se=>Array.isArray(Se))||(M=[M]));if(typeof L!="string"&&(L.id=I==null?void 0:I.id,L.isShow=(ir=(ur=I==null?void 0:I.value)==null?void 0:ur.pageData)==null?void 0:ir.isShow),(M==null?void 0:M.length)>0&&M.every(Se=>Array.isArray(Se)))M==null||M.forEach(Se=>{var Ta,Qe,br,me,Fr;let Ne=H.cloneDeep(L);Ne.compData=Se,Ne.tableId=(Ta=Se==null?void 0:Se.find(Or=>(Or==null?void 0:Or.key)==="contentTableId"))==null?void 0:Ta.contents;let Be=(Qe=Se==null?void 0:Se.find(Or=>(Or==null?void 0:Or.key)==="name"))==null?void 0:Qe.contents;Be!=null&&Be.name0&&(Be==null?void 0:Be.name0)===(Ne==null?void 0:Ne.name)?(Ne.name0=Ne.name,Ne.name=Be==null?void 0:Be.name):Be!=null&&Be.name0&&(Ne.name1=Ne.name,Ne.name0=Be.name0,Ne.name=Be==null?void 0:Be.name),(br=Ne==null?void 0:Ne.compData)!=null&&br.every(Or=>Array.isArray(Or))?((me=Ne==null?void 0:Ne.compData)==null?void 0:me.length)===0?g.push(Ne):(Fr=Ne==null?void 0:Ne.compData)==null||Fr.forEach((Or,hr)=>{let kr;hr===0?kr={comp:Ne==null?void 0:Ne.comp,compData:Or,id:Ne==null?void 0:Ne.id,name:Ne==null?void 0:Ne.name,isShow:Ne==null?void 0:Ne.isShow}:kr={comp:Ne==null?void 0:Ne.comp,compData:Or,id:Ne==null?void 0:Ne.id,name:"",isShow:Ne==null?void 0:Ne.isShow},g.push(kr)}):g.push(Ne)});else if(((ka=I.key)==null?void 0:ka.type)==="structure")L.compData=M,(Da=L==null?void 0:L.compData)!=null&&Da.every(Se=>Array.isArray(Se))?((Tt=L==null?void 0:L.compData)==null?void 0:Tt.length)===0?g.push(L):(qa=L==null?void 0:L.compData)==null||qa.forEach((Se,Ne)=>{let Be;Ne===0?Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:L==null?void 0:L.name,isShow:L==null?void 0:L.isShow}:Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:"",isShow:L==null?void 0:L.isShow},g.push(Be)}):g.push(L);else if(((Ea=I.key)==null?void 0:Ea.type)==="method"){let Se;Se={name:"",compData:[L],comp:"calculator"},g.push(Se)}else if(((Ka=I==null?void 0:I.key)==null?void 0:Ka.type)==="related"){let Se;Se={name:"",compData:L,comp:""},g.push(Se)}}));return await Promise.all(y),((T=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:T.filter(I=>Object.values(I).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(B=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:B.filter(I=>Object.values(I).length>0)}),g=g.sort((I,U)=>I.orderId-U.orderId),g=await H1(g),i?g:await P1(e,g)},rx=async()=>{var e,a;try{let r=((e=Bc.value)==null?void 0:e.platform)||"browser";const n=((a=Bc.value)==null?void 0:a.chineseName)||"工业软件建模与开发系统";r!=="browser"&&r!=="client"&&r!=="three"&&(r="browser"),vf.setPlatform(r),vf.setPlatName(n)}catch(r){return Promise.reject(r)}},j0=Kr.ref(0),ax=H.useMenuState(H.pinia),tx=c0(H.pinia),{originalPath:yf}=H.storeToRefs(tx),nx=H.useLoginState(H.pinia),ix=Us(H.pinia),{multipleTableConst:ut}=H.storeToRefs(ix),{loginUserInfo:g0}=H.storeToRefs(nx),{activeMenuPath:sx}=H.storeToRefs(ax),fx=H.useModelComp(H.pinia),{pageMapState:ws}=H.storeToRefs(fx),en=yf.value,W0="/",Ss=(e,a,r)=>e==null?void 0:e.map(t=>{var i;return j0.value++,Array.isArray(t)?Ss(t,a):{label:(t==null?void 0:t.label)==="操作"?a?"操作":"":(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+j0.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!1,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??j0.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:Ss(t.children,a)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(i=t==null?void 0:t.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel),allSelectionContents:(t==null?void 0:t.allContents)??[],selectFilter:t==null?void 0:t.selectFilter,menuId:t==null?void 0:t.menuId,relatedValueId:t==null?void 0:t.relatedValueId,filterContent:t==null?void 0:t.filterContents,menus:t==null?void 0:t.menus,groups:t==null?void 0:t.groups,words:t==null?void 0:t.words,isExistChild:(t==null?void 0:t.isExistChild)??!1,mainKey:(t==null?void 0:t.mainKey)??!1,filter:t==null?void 0:t.filter,bindMenus:t==null?void 0:t.bindMenus,fatherPath:t==null?void 0:t.fatherPath,isMainPath:t==null?void 0:t.isMainPath,required:(t==null?void 0:t.required)??!1,functionName:t==null?void 0:t.functionName,functionRelatedWords:t==null?void 0:t.functionRelatedWords,calculatorFilter:t==null?void 0:t.calculatorFilter}}),cx=e=>{const a=[];function r(n){if(Array.isArray(n))for(const t of n)!t.children||t.children.length===0?a.push(t):r(t.children)}return r(e),a},lx=(e,a,r)=>H.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(i=>{var s,f,l;return(f=(s=sx.value)==null?void 0:s.split("/"))==null||f.forEach(c=>{var o,u,x;c!==""&&((x=(u=(o=c==null?void 0:c.split(yf+"updateLoading"))==null?void 0:o[0])==null?void 0:u.split(yf+"loading"))==null||x[0])}),Array.isArray(i)?i=Ss(i,a):(i={label:(i==null?void 0:i.label)==="操作"?a?"操作":"":(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":(i==null?void 0:i.prop)??"a"+j0.value,width:(i==null?void 0:i.label)==="操作"?"200":i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??j0.value,type:(i==null?void 0:i.label)==="操作"?"operate":void 0,formType:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":""),isHidden:i==null?void 0:i.isHidden,options:(i==null?void 0:i.options)??[],children:Ss(i.children,a),formMenuSelect:(i==null?void 0:i.formMenuSelect)??[],groupSelect:i!=null&&i.groupSelect?(l=i==null?void 0:i.groupSelect)==null?void 0:l.replaceAll('"',"").split(":"):[],isMainKey:(i==null?void 0:i.isMainKey)||!!(i!=null&&i.directiveLabel),allSelectionContents:(i==null?void 0:i.allContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,relatedValueId:i==null?void 0:i.relatedValueId,filterContent:i==null?void 0:i.filterContents,menus:i==null?void 0:i.menus,groups:i==null?void 0:i.groups,words:i==null?void 0:i.words,isExistChild:(i==null?void 0:i.isExistChild)??!1,mainKey:(i==null?void 0:i.mainKey)??!1,filter:i==null?void 0:i.filter,bindMenus:i==null?void 0:i.bindMenus,fatherPath:i==null?void 0:i.fatherPath,isMainPath:i==null?void 0:i.isMainPath,required:(i==null?void 0:i.required)??!1,functionName:i==null?void 0:i.functionName,functionRelatedWords:i==null?void 0:i.functionRelatedWords,calculatorFilter:i==null?void 0:i.calculatorFilter},j0.value++),i})),t)),vn=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(r==null||r.forEach(s=>{var f,l,c,o,u,x,h,p,d,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(l=s==null?void 0:s.prop)==null?void 0:l.split(ut.value))==null?void 0:u[((o=(c=s==null?void 0:s.prop)==null?void 0:c.split(ut.value))==null?void 0:o.length)-1]):t+ut.value+((d=(x=s==null?void 0:s.prop)==null?void 0:x.split(ut.value))==null?void 0:d[((p=(h=s==null?void 0:s.prop)==null?void 0:h.split(ut.value))==null?void 0:p.length)-1]);i=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ut.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ut.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ut.value))==null?void 0:y.length)-1])),i.push(s)})),i}return a(e)},ox=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(i=r==null?void 0:r.map(s=>{var f,l,c,o,u,x,h,p,d,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(l=s==null?void 0:s.prop)==null?void 0:l.split(ut.value))==null?void 0:u[((o=(c=s==null?void 0:s.prop)==null?void 0:c.split(ut.value))==null?void 0:o.length)-1]):t+ut.value+((d=(x=s==null?void 0:s.prop)==null?void 0:x.split(ut.value))==null?void 0:d[((p=(h=s==null?void 0:s.prop)==null?void 0:h.split(ut.value))==null?void 0:p.length)-1]);s.children=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ut.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ut.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ut.value))==null?void 0:y.length)-1]));return s})),i}return a(e)},ux=e=>{let a=H.cloneDeep(e);return a=a==null?void 0:a.map(r=>((r==null?void 0:r.type)==="Select"?r={label:r==null?void 0:r.label,prop:r==null?void 0:r.prop,name:r==null?void 0:r.name,type:r==null?void 0:r.type,value:(r==null?void 0:r.value)??"",optionUrl:{groupSelect:r==null?void 0:r.groupSelect,menuSelect:r==null?void 0:r.menuSelect,type:"Select",selectRelateType:r==null?void 0:r.selectRelateType,multiple:r==null?void 0:r.multiple}}:(r==null?void 0:r.type)==="Date"&&(r.value=!(r!=null&&r.value)&&(r==null?void 0:r.isNewDate)!==!1?new Date:r==null?void 0:r.value),r.label=r.prop||r.label,r)),a},io=e=>{var a,r,n,t,i,s;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let f=(n=(r=e==null?void 0:e.pageData)==null?void 0:r.compData)==null?void 0:n.map(c=>{var o;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(o=c.contents)==null?void 0:o.map(u=>((u==null?void 0:u.type)==="Date"&&(u.value=""),u))),c});return{pageData:{comp:(t=e==null?void 0:e.pageData)==null?void 0:t.comp,compData:f,name:(i=e==null?void 0:e.pageData)==null?void 0:i.name,isShow:(s=e==null?void 0:e.pageData)==null?void 0:s.isShow}}}else return e},so=(e,a)=>{var n,t,i,s,f,l,c,o,u;let r=(i=(t=(n=a==null?void 0:a.pageData)==null?void 0:n.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:i.contents;if(((s=e==null?void 0:e.pageData)==null?void 0:s.comp)==="Form"){let x=(l=(f=e==null?void 0:e.pageData)==null?void 0:f.compData)==null?void 0:l.map(p=>{var d;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(d=p.contents)==null?void 0:d.map(m=>{var g;return m.value=(g=r==null?void 0:r.find(y=>(y==null?void 0:y.key)===(m==null?void 0:m.key)))==null?void 0:g.value,m})),p});return{pageData:{comp:(c=e==null?void 0:e.pageData)==null?void 0:c.comp,compData:x,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(u=e==null?void 0:e.pageData)==null?void 0:u.isShow}}}else return e},Nf=async(e,a,r,n,t)=>{var d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==en&&(i="",(m=(d=H.cloneDeep(e))==null?void 0:d.split(en))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=H.cloneDeep(e))==null?void 0:D.split(en))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+en);let s=[],f=await ca.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const l={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let c;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==en&&(c={data:{result:(v=ws.value[i])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=c==null?void 0:c.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(c=(T=(S=H.cloneDeep(c))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=ws.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==en){let _=(L=l==null?void 0:l.data)==null?void 0:L.result;if(!Array.isArray(c))return;c==null||c.forEach(A=>{var b,X,re,ee,Q;let D=(b=_==null?void 0:_.find(q=>{var we,P,Pe,Ie;return((P=(we=A==null?void 0:A.value)==null?void 0:we.pageData)==null?void 0:P.name)===((Ie=(Pe=q==null?void 0:q.value)==null?void 0:Pe.pageData)==null?void 0:Ie.name)}))==null?void 0:b.value;D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((X=D==null?void 0:D.key)==null?void 0:X.parentTable)??"",systemKey:(re=A==null?void 0:A.key)==null?void 0:re.systemKey,type:((ee=D==null?void 0:D.key)==null?void 0:ee.type)??((Q=A==null?void 0:A.key)==null?void 0:Q.type),version:1},value:so(A==null?void 0:A.value,D)})})}else(M=(W=l==null?void 0:l.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:io(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D,b;return((D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null?void 0:D.comp)==="Form"&&(_.value.pageData.compData=(b=_.value.pageData.compData)==null?void 0:b.map(X=>{var re;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(re=X.contents)==null?void 0:re.map(ee=>(r!=null&&r[ee==null?void 0:ee.key]&&(ee==null?void 0:ee.type)!=="Date"&&(ee.value=r[ee.key]),ee))),X}),n&&_.value.pageData.compData.push({key:"parentFormPath",contents:n})),_}),(s==null?void 0:s.length)>0){let _;if(!t)_=s;else{const A=s==null?void 0:s.find(b=>{var X,re;return t==null?void 0:t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)}),D=/^[A-Za-z]+$/;_=A?s==null?void 0:s.map(b=>{var X,re,ee,Q,q,we;return t!=null&&t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)?{...b,value:{pageData:{...(ee=b==null?void 0:b.value)==null?void 0:ee.pageData,compData:(we=(q=(Q=b==null?void 0:b.value)==null?void 0:Q.pageData)==null?void 0:q.compData)==null?void 0:we.map(P=>{var Pe;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(Pe=P==null?void 0:P.contents)==null?void 0:Pe.map(Ie=>D.test(Ie==null?void 0:Ie.prop)?Ie:{...Ie,value:""})}:P})}}}:b}):s}await ca.batchAddInsofDataApi({dataList:_})}let x={};const h=await ca.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=l==null?void 0:l.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=l==null?void 0:l.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b;x[_.id]=(b=(D=(A=h==null?void 0:h.data)==null?void 0:A.result)==null?void 0:D.find(X=>{var re,ee,Q,q;return((ee=(re=X==null?void 0:X.value)==null?void 0:re.pageData)==null?void 0:ee.name)===((q=(Q=_==null?void 0:_.value)==null?void 0:Q.pageData)==null?void 0:q.name)}))==null?void 0:b.id}));let p=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;p.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(p==null?void 0:p.length)>0&&await ca.batchAddInsofDataApi({dataList:p})},hx=async(e,a,r,n,t)=>{var d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==W0&&(i="",(m=(d=H.cloneDeep(e))==null?void 0:d.split(W0))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=H.cloneDeep(e))==null?void 0:D.split(W0))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+W0);let s=[],f=await ca.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const l={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let c;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==W0&&(c={data:{result:(v=ws.value[e])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=c==null?void 0:c.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(c=(T=(S=H.cloneDeep(c))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=ws.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==W0){let _=(L=l==null?void 0:l.data)==null?void 0:L.result;if(!Array.isArray(c))return;c==null||c.forEach(A=>{var b,X,re,ee,Q,q,we,P;let D;(X=(b=A==null?void 0:A.value)==null?void 0:b.pageData)!=null&&X.name0?D=(re=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie,ur,ir,ka,Da;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)&&((ir=(ur=A==null?void 0:A.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)===((Da=(ka=Pe==null?void 0:Pe.value)==null?void 0:ka.pageData)==null?void 0:Da.name0)}))==null?void 0:re.value:D=(ee=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)}))==null?void 0:ee.value,D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((Q=D==null?void 0:D.key)==null?void 0:Q.parentTable)??"",systemKey:(q=A==null?void 0:A.key)==null?void 0:q.systemKey,type:((we=D==null?void 0:D.key)==null?void 0:we.type)??((P=A==null?void 0:A.key)==null?void 0:P.type),version:1},value:so(A==null?void 0:A.value,D)})})}else(M=(W=l==null?void 0:l.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:io(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D;return(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null||D.comp,_}),(s==null?void 0:s.length)>0){let _;_=s,await ca.batchAddInsofDataApi({dataList:_})}let x={};const h=await ca.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=l==null?void 0:l.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=l==null?void 0:l.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b,X,re,ee,Q,q;(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)!=null&&D.name0?x[_.id]=(re=(X=(b=h==null?void 0:h.data)==null?void 0:b.result)==null?void 0:X.find(we=>{var P,Pe,Ie,je,Le,ie,ur,ir;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)&&((ie=(Le=we==null?void 0:we.value)==null?void 0:Le.pageData)==null?void 0:ie.name0)===((ir=(ur=_==null?void 0:_.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)}))==null?void 0:re.id:x[_.id]=(q=(Q=(ee=h==null?void 0:h.data)==null?void 0:ee.result)==null?void 0:Q.find(we=>{var P,Pe,Ie,je;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)}))==null?void 0:q.id}));let p=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;p.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(p==null?void 0:p.length)>0&&await ca.batchAddInsofDataApi({dataList:p})},fo=(e,a)=>{let r=H.cloneDeep(e);return r=r==null?void 0:r.map(t=>{var l,c,o;let i=[],s=[];for(let u in a)if(u!=null&&u.includes((c=(l=H.cloneDeep(t))==null?void 0:l.key)==null?void 0:c.pageKey)){let x=(o=a[u])==null?void 0:o.filter(h=>{var p,d,m;return((p=h==null?void 0:h.key)==null?void 0:p.type)==="data"&&((d=h==null?void 0:h.key)==null?void 0:d.tableId)===((m=H.cloneDeep(t))==null?void 0:m.id)});s=[...s,...x]}(s==null?void 0:s.length)>0&&(s==null||s.forEach(u=>{i.push(u.value.tableData)}));let f=H.cloneDeep(t).value.pageData.compData;return f.push({key:"tableContents",contents:i}),t.value.pageData.compData=f,t}),r},co=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var l;(f==null?void 0:f.key)==="header"&&((l=f==null?void 0:f.contents)==null||l.forEach((c,o)=>{(c==null?void 0:c.prop)===(r==null?void 0:r[1])&&(t=o)}))}))}),t},lo=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var l;(f==null?void 0:f.key)==="formContent"&&((l=f==null?void 0:f.contents)==null||l.forEach(c=>{(c==null?void 0:c.prop)===(r==null?void 0:r[1])&&(t=c==null?void 0:c.value)}))}))}),t},Uc=(e,a,r,n)=>{var l,c,o;let t=(l=e==null?void 0:e[0])==null?void 0:l.formMenuSelect,i=e==null?void 0:e.map(u=>{var x,h;return(h=(x=u.groupSelect)==null?void 0:x.split(":"))==null?void 0:h[1]}),s="";t==null||t.forEach((u,x)=>{(t==null?void 0:t.length)-1!==x?s=s===""?s+u:s+"/"+u:s=s+en+u});let f=[];for(let u in a)if(u!=null&&u.includes(s)){let x=(c=a[u])==null?void 0:c.filter(h=>{var p,d;return((p=h==null?void 0:h.key)==null?void 0:p.type)==="structure"&&((d=h==null?void 0:h.key)==null?void 0:d.parentTable)===""});f=[...f,...x]}if((f==null?void 0:f.length)>0){let u=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Form"}),x=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Table"});x=fo(H.cloneDeep(x),a),u=[...H.cloneDeep(u),...x],u=u==null?void 0:u.map(m=>({[m.key.pageKey]:m}));let h=0;u=u.reduce((m,g)=>(Object.keys(g).forEach(y=>{m[y]||(m[y]=[],m[y].push({index:h})),m[y].push(g[y])}),h++,m),{});let p=(o=Object.values(u))==null?void 0:o.sort((m,g)=>{var E,w;let y=(E=m==null?void 0:m.find(S=>S==null?void 0:S.index))==null?void 0:E.index,v=(w=g==null?void 0:g.find(S=>S==null?void 0:S.index))==null?void 0:w.index;return y-v});u=p==null?void 0:p.map(m=>m==null?void 0:m.filter(g=>{var y,v,E,w;return!(g!=null&&g.index)&&(g==null?void 0:g.index)!==0&&!((v=(y=g==null?void 0:g.key)==null?void 0:y.pageKey)!=null&&v.includes("updateLoading"))&&!((w=(E=g==null?void 0:g.key)==null?void 0:E.pageKey)!=null&&w.includes("loading"))}));let d=[];if(u==null||u.forEach(m=>{var v,E,w,S,T,B,I,U,L,W;const g=m==null?void 0:m.find(M=>{var se,ne,he,ce,be;return((ne=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:ne.name)===((be=(ce=(he=e==null?void 0:e[0])==null?void 0:he.groupSelect)==null?void 0:ce.split(":"))==null?void 0:be[0])});let y=(T=(S=(w=(E=(v=H.cloneDeep(g))==null?void 0:v.value)==null?void 0:E.pageData)==null?void 0:w.compData)==null?void 0:S.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:T.contents;if(y){let M=[];i==null||i.forEach((se,ne)=>{var be,z,Te,Ae,_,A;let he=m==null?void 0:m.find(D=>{var b,X,re,ee,Q;return((X=(b=D==null?void 0:D.value)==null?void 0:b.pageData)==null?void 0:X.name)===((Q=(ee=(re=e==null?void 0:e[ne])==null?void 0:re.groupSelect)==null?void 0:ee.split(":"))==null?void 0:Q[0])}),ce=(_=(Ae=(Te=(z=(be=H.cloneDeep(he))==null?void 0:be.value)==null?void 0:z.pageData)==null?void 0:Te.compData)==null?void 0:Ae.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:_.contents;ce!=null&&ce.find(D=>(D==null?void 0:D.key)===se)?M.push((A=ce==null?void 0:ce.find(D=>(D==null?void 0:D.key)===se))==null?void 0:A.value):M.push("")}),d.push(M)}else y=(W=(L=(U=(I=(B=H.cloneDeep(g))==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:U.compData)==null?void 0:L.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:W.contents,y==null||y.forEach(M=>{let se=[];i==null||i.forEach(ne=>{M!=null&&M[ne]&&se.push(M==null?void 0:M[ne])}),d.push(se)})}),(r==null?void 0:r.length)>0){let m={};r==null||r.forEach(g=>{var y;for(let v in g){let E=H.cloneDeep(v);if(!(E!=null&&E.includes("[")))(y=g[v])!=null&&y.includes("[")||(m[E]=g[v]);else{let w=lo(E,a[n]),S=co(g[v],a[n]);m[w]=S}}});for(let g in m)d=d==null?void 0:d.filter(y=>y[m[g]]===g)}return d}},xx=(e,a,r,n)=>{var f,l,c,o,u;let t=H.cloneDeep(e),i=a==null?void 0:a.map(x=>x==null?void 0:x.prop),s=[];for(let x in r)if(x!=null&&x.includes(t)){let h=(f=r[x])==null?void 0:f.filter(p=>{var d,m;return((d=p==null?void 0:p.key)==null?void 0:d.type)==="structure"&&((m=p==null?void 0:p.key)==null?void 0:m.parentTable)===""});s=[...s,...h]}if((s==null?void 0:s.length)>0){let x=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(t+en))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))}),h=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(t+en))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))});h=fo(H.cloneDeep(h),r),x=[...H.cloneDeep(x),...h],x=x==null?void 0:x.map(E=>({[E.key.pageKey]:E}));let p=0;x=x.reduce((E,w)=>(Object.keys(w).forEach(S=>{E[S]||(E[S]=[],E[S].push({index:p})),E[S].push(w[S])}),p++,E),{}),x=ao(x,!0,r);let d=(l=Object.values(x))==null?void 0:l.sort((E,w)=>{var B,I;let S=(B=E==null?void 0:E.find(U=>U==null?void 0:U.index))==null?void 0:B.index,T=(I=w==null?void 0:w.find(U=>U==null?void 0:U.index))==null?void 0:I.index;return S-T});x=d==null?void 0:d.map(E=>E==null?void 0:E.filter(w=>!(w!=null&&w.index)&&(w==null?void 0:w.index)!==0));let m=(c=H.cloneDeep(x))==null?void 0:c.filter(E=>E==null?void 0:E.find(w=>{var S,T,B,I;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===en}));x=x==null?void 0:x.filter(E=>!(E!=null&&E.find(w=>{var S,T,B,I,U,L,W,M;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===en||((L=(U=w==null?void 0:w.key)==null?void 0:U.pageKey)==null?void 0:L.includes("updateLoading"))||((M=(W=w==null?void 0:w.key)==null?void 0:W.pageKey)==null?void 0:M.includes("loading"))})));let g=[],y=[];(o=m==null?void 0:m[0])==null||o.forEach(E=>{var w,S,T,B,I;((S=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:S.comp)==="Form"&&((I=(B=(T=E==null?void 0:E.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||I.forEach(U=>{(U==null?void 0:U.key)==="formContent"&&(y=[...y,...U==null?void 0:U.contents])}))});let v=(u=y==null?void 0:y.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:u.key;if(x==null||x.forEach(E=>{let w=[];E==null||E.forEach(T=>{var B,I,U,L,W;((I=(B=T==null?void 0:T.value)==null?void 0:B.pageData)==null?void 0:I.comp)==="Form"&&((W=(L=(U=T==null?void 0:T.value)==null?void 0:U.pageData)==null?void 0:L.compData)==null||W.forEach(M=>{(M==null?void 0:M.key)==="formContent"&&(w=[...w,...M==null?void 0:M.contents])}))});let S={};i==null||i.forEach(T=>{let B=w==null?void 0:w.find(I=>(I==null?void 0:I.key)===T);B!=null&&B.prop&&(S[B.prop]=(B==null?void 0:B.value)??"")}),g.push(S)}),(n==null?void 0:n.length)>0){let E=[];n==null||n.forEach(w=>{var I,U,L,W,M,se,ne,he,ce;let S={};for(let be in w){let z=H.cloneDeep(be);if(!(z!=null&&z.includes("[")))((I=w[be])==null?void 0:I.toUpperCase())==="@LOGINUSER"?S[z]=((U=g0.value)==null?void 0:U.姓名)||((L=g0.value)==null?void 0:L.account)||((W=g0.value)==null?void 0:W.账号)||((M=g0.value)==null?void 0:M.姓名):(se=w[be])!=null&&se.includes("[")||(S[z]=w[be]);else{let Te=lo(z,r[e]),Ae=co(w[be],r[e]);S[Te]=Ae}}let T=[],B=0;for(let be in S)((ne=S[be])==null?void 0:ne[0])!=="!"?T=(he=B>0?T:g)==null?void 0:he.filter(Te=>Te[be]===S[be]):T=(ce=B>0?T:g)==null?void 0:ce.filter(z=>{var Te;return z[be]!==((Te=S[be])==null?void 0:Te.replaceAll("!",""))}),B=1;E=[...E,...T]}),g=[...new Set(E)]}return g=g==null?void 0:g.map(E=>Object.values(E)),{mainKey:v,tableContents:g}}},px=(e,a)=>{var t,i,s,f,l,c;let r=(i=(t=H.cloneDeep(e))==null?void 0:t.split("/"))==null?void 0:i[0],n=[];for(let o in a)if(o!=null&&o.includes(r)){let u=(s=a[o])==null?void 0:s.filter(x=>{var h,p;return((h=x==null?void 0:x.key)==null?void 0:h.type)==="structure"&&((p=x==null?void 0:x.key)==null?void 0:p.parentTable)===""});n=[...n,...u]}return(n==null?void 0:n.length)>0?!!((c=(l=(f=n==null?void 0:n.filter(u=>{var x;return((x=u==null?void 0:u.key)==null?void 0:x.pageKey)===r}))==null?void 0:f[0])==null?void 0:l.key)==null?void 0:c.parentPageKey):!0},dx=async(e,a,r,n)=>{var s,f,l,c,o,u,x,h,p;let t=(f=(s=H.cloneDeep(e))==null?void 0:s.split("/"))==null?void 0:f[0],i=[];for(let d in n)if(d!=null&&d.includes(t)){let m=(l=n[d])==null?void 0:l.filter(g=>{var y,v;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((v=g==null?void 0:g.key)==null?void 0:v.parentTable)===""});i=[...i,...m]}if((i==null?void 0:i.length)>0){let d=(u=(o=(c=i==null?void 0:i.filter(y=>{var v;return((v=y==null?void 0:y.key)==null?void 0:v.pageKey)===t}))==null?void 0:c[0])==null?void 0:o.key)==null?void 0:u.parentPageKey,m=[];if(d){for(let y in n)if(y!=null&&y.includes(d)){let v=(x=n[y])==null?void 0:x.filter(E=>{var w,S;return((w=E==null?void 0:E.key)==null?void 0:w.type)==="structure"&&((S=E==null?void 0:E.key)==null?void 0:S.parentTable)===""});m=[...m,...v]}}else m=i;let g="";if((m==null?void 0:m.length)>0){let y=[],v;v=(h=m==null?void 0:m.filter(U=>{var L,W,M,se,ne,he;return((M=(W=(L=U==null?void 0:U.key)==null?void 0:L.pageKey)==null?void 0:W.split("/"))==null?void 0:M[0])===d&&((he=(ne=(se=U==null?void 0:U.key)==null?void 0:se.pageKey)==null?void 0:ne.split("/"))==null?void 0:he.length)===2}))==null?void 0:h.map(U=>{var L;return(L=U==null?void 0:U.key)==null?void 0:L.pageKey}),v=[...new Set(v)],v=v==null?void 0:v.filter(U=>!U.includes(en));let E=(p=H.cloneDeep(v))==null?void 0:p.map(async U=>{var ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q;let L=await Tn(U,sessionStorage.getItem("systemKey"),"",!1,[],!1,n),W=(be=(ce=(he=(ne=H.cloneDeep(L))==null?void 0:ne[0])==null?void 0:he.compData)==null?void 0:ce.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:be.contents,M=(D=(A=(_=(Ae=(Te=(z=H.cloneDeep(L))==null?void 0:z[0])==null?void 0:Te.compData)==null?void 0:Ae.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:_.contents)==null?void 0:A.filter(q=>(q==null?void 0:q.label)!=="操作"))==null?void 0:D.map(q=>q==null?void 0:q.prop),se=[];return(Q=(ee=(re=(X=(b=H.cloneDeep(L))==null?void 0:b[0])==null?void 0:X.compData)==null?void 0:re.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ee.contents)==null||Q.forEach(q=>{(q==null?void 0:q.isMainKey)===!0&&(g=q==null?void 0:q.prop)}),W==null||W.forEach(q=>{let we=d0(q,M);se.push(we),y.push({key:we==null?void 0:we[g],routerContent:U})}),se}),w=await Promise.all(E),S=[];w==null||w.forEach(U=>{(U==null?void 0:U.length)>0&&(U==null||U.forEach(L=>{S.push(L)}))});let T=[];T=a==null?void 0:a.map(U=>{var W,M,se;let L={};for(let ne in U)U[ne].toUpperCase()==="@LOGINUSER"?L[ne]=((W=g0.value)==null?void 0:W.姓名)||((M=g0.value)==null?void 0:M.account)||((se=g0.value)==null?void 0:se.账号):L[ne]=U[ne];return L});let B=[];S==null||S.forEach(U=>{let L=[];T==null||T.forEach(W=>{let M=[];for(let se in W)M.push(U[se]===W[se]);L.push(M)}),L.find(W=>W==null?void 0:W.every(M=>M===!0))&&B.push(U)});let I=[];return B==null||B.forEach(U=>{let L={};r==null||r.forEach(W=>{L[W.prop]=U[W.prop]??""}),I.push(L)}),I=I==null?void 0:I.map(U=>Object.values(U)),{mainKey:g,tableContents:I,mainKeys:y}}else return}else return},mx=async(e,a,r,n)=>{var i,s,f,l;let t=(i=H.cloneDeep(e))==null?void 0:i.filter(c=>(c==null?void 0:c.label)!=="操作");if((r==null?void 0:r.length)>0&&(t!=null&&t.every(c=>!(c!=null&&c.formMenuSelect)))&&px(a,n)){let c=await dx(a,r,t,n);return c&&((s=c==null?void 0:c.tableContents)==null?void 0:s.length)>0?c:[]}if(!(t!=null&&t.every(c=>{var o,u,x,h;return((o=c==null?void 0:c.formMenuSelect)==null?void 0:o.length)>0&&((x=(u=c==null?void 0:c.groupSelect)==null?void 0:u.split(":"))==null?void 0:x.length)>0||((h=c==null?void 0:c.formMenuGroup)==null?void 0:h.length)>0})))return xx(a,t,n,r);if(t!=null&&t.every(c=>!(c!=null&&c.formMenuGroup)))return Uc(t,n,r,a);{let c=[];(l=(f=t==null?void 0:t[0])==null?void 0:f.formMenuGroup)==null||l.forEach((h,p)=>{let d=[];t==null||t.forEach(m=>{var g,y,v,E,w,S;d.push({columnPath:m==null?void 0:m.columnPath,formMenuSelect:(v=((g=m==null?void 0:m.formMenuGroup)==null?void 0:g[p])??((y=m==null?void 0:m.formMenuGroup)==null?void 0:y[0]))==null?void 0:v.formMenuSelect,groupSelect:(S=((E=m==null?void 0:m.formMenuGroup)==null?void 0:E[p])??((w=m==null?void 0:m.formMenuGroup)==null?void 0:w[0]))==null?void 0:S.groupSelect,isRoute:m==null?void 0:m.isRoute,label:m==null?void 0:m.label,prop:m==null?void 0:m.label})}),c.push(d)});let o=[],x=c==null?void 0:c.map(async h=>Uc(h,n,r,a));return x==null||x.forEach(h=>{h==null||h.forEach(p=>{o.push(p)})}),o}},gx=c0(H.pinia),{originalPath:oo}=H.storeToRefs(gx),vx=H.useUnit(H.pinia),{chooseTitle:Un}=H.storeToRefs(vx),_x=H.useMenuState(H.pinia),{activeMenuPath:Qs}=H.storeToRefs(_x),Pf=async()=>void 0,yx=e=>{var n,t,i;const a=(t=(n=e==null?void 0:e.compData)==null?void 0:n.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:t.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:a!=null&&a.every(s=>!Array.isArray(s))?a==null?void 0:a.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label})):(i=vn(a==null?void 0:a[0]))==null?void 0:i.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label}))}},uo=async(e,a)=>{var i,s,f,l,c,o,u,x;let r="";(i=H.cloneDeep(e))==null||i.forEach(h=>{var p;h!=null&&h.includes(":")?(p=h==null?void 0:h.split(":"))==null||p.forEach(d=>{r=r===""?r+d:r+"/"+d}):r=r===""?r+h:r+"/"+h}),(r===""||Qs.value===r)&&((f=(s=Un==null?void 0:Un.value)==null?void 0:s[0])!=null&&f.value?r=Qs.value+"/"+((c=(l=Un==null?void 0:Un.value)==null?void 0:l[0])==null?void 0:c.value):r=Qs.value);let n="";(o=H.cloneDeep(e))==null||o.forEach((h,p)=>{p!==(e==null?void 0:e.length)-1?n=n===""?n+h:n+"/"+h:n=h===""?n:n+oo.value+h}),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((x=(u=Un==null?void 0:Un.value)==null?void 0:u[0])==null?void 0:x.value));const t=await Tn(r,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0);return t||await Tn(n,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0)},kx=e=>e.entries().next().done,Ex=async e=>{var n,t,i;const a=await uo(e);let r=[];return((n=a==null?void 0:a.data)==null?void 0:n.type)==="success"&&(r=(i=(t=a.data.result)==null?void 0:t.map(s=>s.value.pageData))==null?void 0:i.filter(s=>(s==null?void 0:s.comp)==="Table"),r=r==null?void 0:r.map(s=>yx(s))),r},Tx=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],I0=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],wx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],Sx=async()=>{const e=await Pf();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},Ax=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await Pf()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],Fx=Kr.computed(async()=>await Sx()),Dx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],Ix=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"value",label:"固定值",type:"Input"}],bx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Input"}],Wc=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0}],Cx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0}],Ox=[{key:"Input",value:wx},{key:"Select",value:Fx},{key:"Date",value:Dx},{key:"TextArea",value:bx},{key:"Upload",value:Wc},{key:"DragUpload",value:Wc},{key:"Quill",value:Cx},{key:"Link",value:Ix}],Rx=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Nx=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Rx},{key:"background",label:"颜色",type:"Color"}],Px=e=>{var r,n,t,i,s,f,l,c;let a=H.cloneDeep(e);if(((r=a==null?void 0:a.find(o=>(o==null?void 0:o.name)==="类型"))==null?void 0:r.type)==="Select"&&((i=(t=(n=H.cloneDeep(a))==null?void 0:n.find(o=>(o==null?void 0:o.name)==="选项值"))==null?void 0:t.value)==null?void 0:i.length)>0){const o=(c=(l=(f=(s=H.cloneDeep(a))==null?void 0:s.find(u=>(u==null?void 0:u.name)==="选项值"))==null?void 0:f.value)==null?void 0:l.split(","))==null?void 0:c.map(u=>({label:u,value:u}));a=a==null?void 0:a.map(u=>((u==null?void 0:u.name)==="初始值"&&(u.contents=o,u.value=(u==null?void 0:u.value)??""),u))}return a},Mx=async e=>{var i,s,f,l;let a=H.cloneDeep(e);const r=(i=e==null?void 0:e.find(c=>(c==null?void 0:c.name)==="下拉绑定类型"))==null?void 0:i.value,n=(s=e==null?void 0:e.find(c=>(c==null?void 0:c.name)==="类型"))==null?void 0:s.value,t=await Ax();return n==="Select"&&r===""?a=a==null?void 0:a.filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项"&&(c==null?void 0:c.name)!=="选项值"):n==="Select"&&r==="关联绑定列"?a!=null&&a.find(c=>(c==null?void 0:c.name)==="菜单选项"||(c==null?void 0:c.name)==="组信息选项")?a=(f=H.cloneDeep(a))==null?void 0:f.filter(c=>(c==null?void 0:c.name)!=="选项值"):a=[...H.cloneDeep(a),...t].filter(c=>(c==null?void 0:c.name)!=="选项值"):n==="Select"&&r==="自定义绑定"&&(a!=null&&a.find(c=>(c==null?void 0:c.name)==="选项值")?a=(l=H.cloneDeep(a))==null?void 0:l.filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项"):a=[...H.cloneDeep(a),...t].filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项")),a},Lx=(e,a)=>{var n;let r=!1;return(n=H.cloneDeep(e))==null||n.forEach(t=>{var i;(t==null?void 0:t.key)==="formContent"&&((i=t==null?void 0:t.contents)==null||i.forEach(s=>{(s==null?void 0:s.key)===a?r=!0:r=r}))}),r},ho=(e,a)=>{var s,f,l,c,o;const r=H.cloneDeep(e);if(!r)return;let n="";(f=(s=H.cloneDeep(r))==null?void 0:s.menuSelect)==null||f.forEach(u=>{u!=null&&u.includes("[")?n=n+oo.value:n=n===""?n+u:n+"/"+u});const t=(l=a==null?void 0:a[n])==null?void 0:l.map(u=>{var x;return(x=u==null?void 0:u.value)==null?void 0:x.pageData});let i=t==null?void 0:t.filter(u=>{var x,h;return(u==null?void 0:u.name)===((h=(x=H.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[0])});if((i==null?void 0:i.length)===1?i=i==null?void 0:i[0]:(c=H.cloneDeep(i))==null||c.forEach(u=>{var x,h;(u==null?void 0:u.comp)==="Form"&&Lx(u==null?void 0:u.compData,(h=(x=H.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[1])&&(i=u)}),(i==null?void 0:i.comp)==="Form"){let u="";return(o=i==null?void 0:i.compData)==null||o.forEach(x=>{var h;(x==null?void 0:x.key)==="formContent"&&((h=x==null?void 0:x.contents)==null||h.forEach(p=>{var d,m;(p==null?void 0:p.key)===((m=(d=H.cloneDeep(r))==null?void 0:d.groupSelect)==null?void 0:m[1])&&(p.type==="Select"&&!(p!=null&&p.value)?u=void 0:u=p==null?void 0:p.value)}))}),u}};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var As={};As.version="0.18.5";var xo=1252,Bx=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Mf={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Lf=function(e){Bx.indexOf(e)!=-1&&(xo=Mf[0]=e)};function Ux(){Lf(1252)}var _n=function(e){Lf(e)};function Bf(){_n(1200),Ux()}function Hc(e){for(var a=[],r=0,n=e.length;r<n;++r)a[r]=e.charCodeAt(r);return a}function Wx(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return a.join("")}function po(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return a.join("")}var Di=function(e){var a=e.charCodeAt(0),r=e.charCodeAt(1);return a==255&&r==254?Wx(e.slice(2)):a==254&&r==255?po(e.slice(2)):a==65279?e.slice(1):e},us=function(a){return String.fromCharCode(a)},Gc=function(a){return String.fromCharCode(a)},kf,a0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Wi(e){for(var a="",r=0,n=0,t=0,i=0,s=0,f=0,l=0,c=0;c<e.length;)r=e.charCodeAt(c++),i=r>>2,n=e.charCodeAt(c++),s=(r&3)<<4|n>>4,t=e.charCodeAt(c++),f=(n&15)<<2|t>>6,l=t&63,isNaN(n)?f=l=64:isNaN(t)&&(l=64),a+=a0.charAt(i)+a0.charAt(s)+a0.charAt(f)+a0.charAt(l);return a}function $t(e){var a="",r=0,n=0,t=0,i=0,s=0,f=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)i=a0.indexOf(e.charAt(c++)),s=a0.indexOf(e.charAt(c++)),r=i<<2|s>>4,a+=String.fromCharCode(r),f=a0.indexOf(e.charAt(c++)),n=(s&15)<<4|f>>2,f!==64&&(a+=String.fromCharCode(n)),l=a0.indexOf(e.charAt(c++)),t=(f&3)<<6|l,l!==64&&(a+=String.fromCharCode(t));return a}var yr=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Kn=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,r){return r?new Buffer(a,r):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function n0(e){return yr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Xc(e){return yr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Ht=function(a){return yr?Kn(a,"binary"):a.split("").map(function(r){return r.charCodeAt(0)&255})};function Ws(e){if(typeof ArrayBuffer>"u")return Ht(e);for(var a=new ArrayBuffer(e.length),r=new Uint8Array(a),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return a}function l0(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var a=[],r=0;r<e.length;++r)a[r]=String.fromCharCode(e[r]);return a.join("")}function Hx(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function Uf(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Uf(new Uint8Array(e));for(var a=new Array(e.length),r=0;r<e.length;++r)a[r]=e[r];return a}var Ya=yr?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:Kn(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,r=0;for(a=0;a<e.length;++a)r+=e[a].length;var n=new Uint8Array(r),t=0;for(a=0,r=0;a<e.length;r+=t,++a)if(t=e[a].length,e[a]instanceof Uint8Array)n.set(e[a],r);else{if(typeof e[a]=="string")throw"wtf";n.set(new Uint8Array(e[a]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function Gx(e){for(var a=[],r=0,n=e.length+250,t=n0(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)t[r++]=s;else if(s<2048)t[r++]=192|s>>6&31,t[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var f=e.charCodeAt(++i)&1023;t[r++]=240|s>>8&7,t[r++]=128|s>>2&63,t[r++]=128|f>>6&15|(s&3)<<4,t[r++]=128|f&63}else t[r++]=224|s>>12&15,t[r++]=128|s>>6&63,t[r++]=128|s&63;r>n&&(a.push(t.slice(0,r)),r=0,t=n0(65535),n=65530)}return a.push(t.slice(0,r)),Ya(a)}var Et=/\u0000/g,Ii=/[\u0001-\u0006]/g;function Y0(e){for(var a="",r=e.length-1;r>=0;)a+=e.charAt(r--);return a}function yn(e,a){var r=""+e;return r.length>=a?r:Sa("0",a-r.length)+r}function Wf(e,a){var r=""+e;return r.length>=a?r:Sa(" ",a-r.length)+r}function Fs(e,a){var r=""+e;return r.length>=a?r:r+Sa(" ",a-r.length)}function Xx(e,a){var r=""+Math.round(e);return r.length>=a?r:Sa("0",a-r.length)+r}function $x(e,a){var r=""+e;return r.length>=a?r:Sa("0",a-r.length)+r}var $c=Math.pow(2,32);function H0(e,a){if(e>$c||e<-$c)return Xx(e,a);var r=Math.round(e);return $x(r,a)}function Ds(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var Kc=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ef=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function Kx(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var ar={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},zc={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},zx={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Is(e,a,r){for(var n=e<0?-1:1,t=e*n,i=0,s=1,f=0,l=1,c=0,o=0,u=Math.floor(t);c<a&&(u=Math.floor(t),f=u*s+i,o=u*c+l,!(t-u<5e-8));)t=1/(t-u),i=s,s=f,l=c,c=o;if(o>a&&(c>a?(o=l,f=i):(o=c,f=s)),!r)return[0,n*f,o];var x=Math.floor(n*f/o);return[x,n*f-x*o,o]}function v0(e,a,r){if(e>2958465||e<0)return null;var n=e|0,t=Math.floor(86400*(e-n)),i=0,s=[],f={D:n,T:t,u:86400*(e-n)-t,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(f.u)<1e-6&&(f.u=0),a&&a.date1904&&(n+=1462),f.u>.9999&&(f.u=0,++t==86400&&(f.T=t=0,++n,++f.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var l=new Date(1900,0,1);l.setDate(l.getDate()+n-1),s=[l.getFullYear(),l.getMonth()+1,l.getDate()],i=l.getDay(),n<60&&(i=(i+6)%7),r&&(i=Zx(l,s))}return f.y=s[0],f.m=s[1],f.d=s[2],f.S=t%60,t=Math.floor(t/60),f.M=t%60,t=Math.floor(t/60),f.H=t,f.q=i,f}var mo=new Date(1899,11,31,0,0,0),Vx=mo.getTime(),jx=new Date(1900,2,1,0,0,0);function go(e,a){var r=e.getTime();return a?r-=1461*24*60*60*1e3:e>=jx&&(r+=24*60*60*1e3),(r-(Vx+(e.getTimezoneOffset()-mo.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Hf(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Yx(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Jx(e){var a=e<0?12:11,r=Hf(e.toFixed(12));return r.length<=a||(r=e.toPrecision(10),r.length<=a)?r:e.toExponential(5)}function qx(e){var a=Hf(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function Hi(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return a>=-4&&a<=-1?r=e.toPrecision(10+a):Math.abs(a)<=9?r=Jx(e):a===10?r=e.toFixed(10).substr(0,12):r=qx(e),Hf(Yx(r.toUpperCase()))}function T0(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):Hi(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return an(14,go(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function Zx(e,a){a[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function Qx(e,a,r,n){var t="",i=0,s=0,f=r.y,l,c=0;switch(e){case 98:f=r.y+543;case 121:switch(a.length){case 1:case 2:l=f%100,c=2;break;default:l=f%1e4,c=4;break}break;case 109:switch(a.length){case 1:case 2:l=r.m,c=a.length;break;case 3:return ef[r.m-1][1];case 5:return ef[r.m-1][0];default:return ef[r.m-1][2]}break;case 100:switch(a.length){case 1:case 2:l=r.d,c=a.length;break;case 3:return Kc[r.q][0];default:return Kc[r.q][1]}break;case 104:switch(a.length){case 1:case 2:l=1+(r.H+11)%12,c=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:l=r.H,c=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:l=r.M,c=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return r.u===0&&(a=="s"||a=="ss")?yn(r.S,a.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),a==="s"?i===0?"0":""+i/s:(t=yn(i,2+n),a==="ss"?t.substr(0,2):"."+t.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":l=r.D*24+r.H;break;case"[m]":case"[mm]":l=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":l=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+a}c=a.length===3?1:2;break;case 101:l=f,c=1;break}var o=c>0?yn(l,c):"";return o}function t0(e){var a=3;if(e.length<=a)return e;for(var r=e.length%a,n=e.substr(0,r);r!=e.length;r+=a)n+=(n.length>0?",":"")+e.substr(r,a);return n}var vo=/%/g;function ep(e,a,r){var n=a.replace(vo,""),t=a.length-n.length;return Hn(e,n,r*Math.pow(10,2*t))+Sa("%",t)}function rp(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Hn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function _o(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+_o(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),r.indexOf("e")===-1){var s=Math.floor(Math.log(a)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,t)+"."+r.substr(2+t),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,l,c,o){return l+c+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var yo=/# (\?+)( ?)\/( ?)(\d+)/;function ap(e,a,r){var n=parseInt(e[4],10),t=Math.round(a*n),i=Math.floor(t/n),s=t-i*n,f=n;return r+(i===0?"":""+i)+" "+(s===0?Sa(" ",e[1].length+1+e[4].length):Wf(s,e[1].length)+e[2]+"/"+e[3]+yn(f,e[4].length))}function tp(e,a,r){return r+(a===0?"":""+a)+Sa(" ",e[1].length+2+e[4].length)}var ko=/^#*0*\.([0#]+)/,Eo=/\).*[0#]/,To=/\(###\) ###\\?-####/;function yt(e){for(var a="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(r)}return a}function Vc(e,a){var r=Math.pow(10,a);return""+Math.round(e*r)/r}function jc(e,a){var r=e-Math.floor(e),n=Math.pow(10,a);return a<(""+Math.round(r*n)).length?0:Math.round(r*n)}function np(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function ip(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Yt(e,a,r){if(e.charCodeAt(0)===40&&!a.match(Eo)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Yt("n",n,r):"("+Yt("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return rp(e,a,r);if(a.indexOf("%")!==-1)return ep(e,a,r);if(a.indexOf("E")!==-1)return _o(a,r);if(a.charCodeAt(0)===36)return"$"+Yt(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,l=Math.abs(r),c=r<0?"-":"";if(a.match(/^00+$/))return c+H0(l,a.length);if(a.match(/^[#?]+$/))return t=H0(r,0),t==="0"&&(t=""),t.length>a.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(yo))return ap(i,l,c);if(a.match(/^#+0+$/))return c+H0(l,a.length-a.indexOf("0"));if(i=a.match(ko))return t=Vc(r,i[1].length).replace(/^([^\.]+)$/,"$1."+yt(i[1])).replace(/\.$/,"."+yt(i[1])).replace(/\.(\d*)$/,function(p,d){return"."+d+Sa("0",yt(i[1]).length-d.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return c+Vc(l,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return c+t0(H0(l,0));if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Yt(e,a,-r):t0(""+(Math.floor(r)+np(r,i[1].length)))+"."+yn(jc(r,i[1].length),i[1].length);if(i=a.match(/^#,#*,#0/))return Yt(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=Y0(Yt(e,a.replace(/[\\-]/g,""),r)),s=0,Y0(Y0(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s<t.length?t.charAt(s++):p==="0"?"0":""}));if(a.match(To))return t=Yt(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Is(l,Math.pow(10,s)-1,!1),t=""+c,o=Hn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=Fs(f[2],s),o.length<i[4].length&&(o=yt(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Is(l,Math.pow(10,s)-1,!0),c+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Wf(f[1],s)+i[2]+"/"+i[3]+Fs(f[2],s):Sa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=H0(r,0),a.length<=t.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0?]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return yt(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return s=jc(r,i[1].length),r<0?"-"+Yt(e,a,-r):t0(ip(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?yn(0,3-p.length):"")+p})+"."+yn(s,i[1].length);switch(a){case"###,##0.00":return Yt(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var h=t0(H0(l,0));return h!=="0"?c+h:"";case"###,###.00":return Yt(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Yt(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function sp(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Hn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function fp(e,a,r){var n=a.replace(vo,""),t=a.length-n.length;return Hn(e,n,r*Math.pow(10,2*t))+Sa("%",t)}function wo(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+wo(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),!r.match(/[Ee]/)){var s=Math.floor(Math.log(a)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,l,c,o){return l+c+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function In(e,a,r){if(e.charCodeAt(0)===40&&!a.match(Eo)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?In("n",n,r):"("+In("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return sp(e,a,r);if(a.indexOf("%")!==-1)return fp(e,a,r);if(a.indexOf("E")!==-1)return wo(a,r);if(a.charCodeAt(0)===36)return"$"+In(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,l=Math.abs(r),c=r<0?"-":"";if(a.match(/^00+$/))return c+yn(l,a.length);if(a.match(/^[#?]+$/))return t=""+r,r===0&&(t=""),t.length>a.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(yo))return tp(i,l,c);if(a.match(/^#+0+$/))return c+yn(l,a.length-a.indexOf("0"));if(i=a.match(ko))return t=(""+r).replace(/^([^\.]+)$/,"$1."+yt(i[1])).replace(/\.$/,"."+yt(i[1])),t=t.replace(/\.(\d*)$/,function(p,d){return"."+d+Sa("0",yt(i[1]).length-d.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return c+t0(""+l);if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+In(e,a,-r):t0(""+r)+"."+Sa("0",i[1].length);if(i=a.match(/^#,#*,#0/))return In(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=Y0(In(e,a.replace(/[\\-]/g,""),r)),s=0,Y0(Y0(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s<t.length?t.charAt(s++):p==="0"?"0":""}));if(a.match(To))return t=In(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Is(l,Math.pow(10,s)-1,!1),t=""+c,o=Hn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=Fs(f[2],s),o.length<i[4].length&&(o=yt(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Is(l,Math.pow(10,s)-1,!0),c+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Wf(f[1],s)+i[2]+"/"+i[3]+Fs(f[2],s):Sa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=""+r,a.length<=t.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return yt(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return r<0?"-"+In(e,a,-r):t0(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?yn(0,3-p.length):"")+p})+"."+yn(0,i[1].length);switch(a){case"###,###":case"##,###":case"#,###":var h=t0(""+l);return h!=="0"?c+h:"";default:if(a.match(/\.[0#?]*$/))return In(e,a.slice(0,a.lastIndexOf(".")),r)+yt(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Hn(e,a,r){return(r|0)===r?In(e,a,r):Yt(e,a,r)}function cp(e){for(var a=[],r=!1,n=0,t=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:a[a.length]=e.substr(t,n-t),t=n+1}if(a[a.length]=e.substr(t),r===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var So=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ai(e){for(var a=0,r="",n="";a<e.length;)switch(r=e.charAt(a)){case"G":Ds(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(n=r;e.charAt(a++)!=="]"&&a<e.length;)n+=e.charAt(a);if(n.match(So))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++a))>-1||r=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===r;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function lp(e,a,r,n){for(var t=[],i="",s=0,f="",l="t",c,o,u,x="H";s<e.length;)switch(f=e.charAt(s)){case"G":if(!Ds(e,s))throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(u=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(u);t[t.length]={t:"t",v:i},++s;break;case"\\":var h=e.charAt(++s),p=h==="("||h===")"?h:"t";t[t.length]={t:p,v:h},++s;break;case"_":t[t.length]={t:"t",v:" "},s+=2;break;case"@":t[t.length]={t:"T",v:a},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(c==null&&(c=v0(a,r,e.charAt(s+1)==="2"),c==null))return"";t[t.length]={t:"X",v:e.substr(s,2)},l=f,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":f=f.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||c==null&&(c=v0(a,r),c==null))return"";for(i=f;++s<e.length&&e.charAt(s).toLowerCase()===f;)i+=f;f==="m"&&l.toLowerCase()==="h"&&(f="M"),f==="h"&&(f=x),t[t.length]={t:f,v:i},l=f;break;case"A":case"a":case"上":var d={t:f,v:f};if(c==null&&(c=v0(a,r)),e.substr(s,3).toUpperCase()==="A/P"?(c!=null&&(d.v=c.H>=12?"P":"A"),d.t="T",x="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(c!=null&&(d.v=c.H>=12?"PM":"AM"),d.t="T",s+=5,x="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(c!=null&&(d.v=c.H>=12?"下午":"上午"),d.t="T",s+=5,x="h"):(d.t="t",++s),c==null&&d.t==="T")return"";t[t.length]=d,l=f;break;case"[":for(i=f;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(So)){if(c==null&&(c=v0(a,r),c==null))return"";t[t.length]={t:"Z",v:i.toLowerCase()},l=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",ai(e)||(t[t.length]={t:"t",v:i}));break;case".":if(c!=null){for(i=f;++s<e.length&&(f=e.charAt(s))==="0";)i+=f;t[t.length]={t:"s",v:i};break}case"0":case"#":for(i=f;++s<e.length&&"0#?.,E+-%".indexOf(f=e.charAt(s))>-1;)i+=f;t[t.length]={t:"n",v:i};break;case"?":for(i=f;e.charAt(++s)===f;)i+=f;t[t.length]={t:f,v:i},l=f;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":t[t.length]={t:n===1?"t":f,v:f},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=f;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)i+=e.charAt(s);t[t.length]={t:"D",v:i};break;case" ":t[t.length]={t:f,v:f},++s;break;case"$":t[t.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(f)===-1)throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"t",v:f},++s;break}var m=0,g=0,y;for(s=t.length-1,l="t";s>=0;--s)switch(t[s].t){case"h":case"H":t[s].t=x,l="h",m<1&&(m=1);break;case"s":(y=t[s].v.match(/\.0+$/))&&(g=Math.max(g,y[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":l=t[s].t;break;case"m":l==="s"&&(t[s].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&t[s].v.match(/[Hh]/)&&(m=1),m<2&&t[s].v.match(/[Mm]/)&&(m=2),m<3&&t[s].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M);break}var v="",E;for(s=0;s<t.length;++s)switch(t[s].t){case"t":case"T":case" ":case"D":break;case"X":t[s].v="",t[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":t[s].v=Qx(t[s].t.charCodeAt(0),t[s].v,c,g),t[s].t="t";break;case"n":case"?":for(E=s+1;t[E]!=null&&((f=t[E].t)==="?"||f==="D"||(f===" "||f==="t")&&t[E+1]!=null&&(t[E+1].t==="?"||t[E+1].t==="t"&&t[E+1].v==="/")||t[s].t==="("&&(f===" "||f==="n"||f===")")||f==="t"&&(t[E].v==="/"||t[E].v===" "&&t[E+1]!=null&&t[E+1].t=="?"));)t[s].v+=t[E].v,t[E]={v:"",t:";"},++E;v+=t[s].v,s=E-1;break;case"G":t[s].t="t",t[s].v=T0(a,r);break}var w="",S,T;if(v.length>0){v.charCodeAt(0)==40?(S=a<0&&v.charCodeAt(0)===45?-a:a,T=Hn("n",v,S)):(S=a<0&&n>1?-a:a,T=Hn("n",v,S),S<0&&t[0]&&t[0].t=="t"&&(T=T.substr(1),t[0].v="-"+t[0].v)),E=T.length-1;var B=t.length;for(s=0;s<t.length;++s)if(t[s]!=null&&t[s].t!="t"&&t[s].v.indexOf(".")>-1){B=s;break}var I=t.length;if(B===t.length&&T.indexOf("E")===-1){for(s=t.length-1;s>=0;--s)t[s]==null||"n?".indexOf(t[s].t)===-1||(E>=t[s].v.length-1?(E-=t[s].v.length,t[s].v=T.substr(E+1,t[s].v.length)):E<0?t[s].v="":(t[s].v=T.substr(0,E+1),E=-1),t[s].t="t",I=s);E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v)}else if(B!==t.length&&T.indexOf("E")===-1){for(E=T.indexOf(".")-1,s=B;s>=0;--s)if(!(t[s]==null||"n?".indexOf(t[s].t)===-1)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")-1:t[s].v.length-1,w=t[s].v.substr(o+1);o>=0;--o)E>=0&&(t[s].v.charAt(o)==="0"||t[s].v.charAt(o)==="#")&&(w=T.charAt(E--)+w);t[s].v=w,t[s].t="t",I=s}for(E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v),E=T.indexOf(".")+1,s=B;s<t.length;++s)if(!(t[s]==null||"n?(".indexOf(t[s].t)===-1&&s!==B)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")+1:0,w=t[s].v.substr(0,o);o<t[s].v.length;++o)E<T.length&&(w+=T.charAt(E++));t[s].v=w,t[s].t="t",I=s}}}for(s=0;s<t.length;++s)t[s]!=null&&"n?".indexOf(t[s].t)>-1&&(S=n>1&&a<0&&s>0&&t[s-1].v==="-"?-a:a,t[s].v=Hn(t[s].t,t[s].v,S),t[s].t="t");var U="";for(s=0;s!==t.length;++s)t[s]!=null&&(U+=t[s].v);return U}var Yc=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Jc(e,a){if(a==null)return!1;var r=parseFloat(a[2]);switch(a[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function op(e,a){var r=cp(e),n=r.length,t=r[n-1].indexOf("@");if(n<4&&t>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof a!="number")return[4,r.length===4||t>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=t>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=t>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=t>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=a>0?r[0]:a<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Yc),f=r[1].match(Yc);return Jc(a,s)?[n,r[0]]:Jc(a,f)?[n,r[1]]:[n,r[s!=null&&f!=null?2:1]]}return[n,i]}function an(e,a,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:ar)[e],n==null&&(n=r.table&&r.table[zc[e]]||ar[zc[e]]),n==null&&(n=zx[e]||"General");break}if(Ds(n,0))return T0(a,r);a instanceof Date&&(a=go(a,r.date1904));var t=op(n,a);if(Ds(t[1]))return T0(a,r);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return lp(t[1],a,r,t[0])}function Gn(e,a){if(typeof a!="number"){a=+a||-1;for(var r=0;r<392;++r){if(ar[r]==null){a<0&&(a=r);continue}if(ar[r]==e){a=r;break}}a<0&&(a=391)}return ar[a]=e,a}function Hs(e){for(var a=0;a!=392;++a)e[a]!==void 0&&Gn(e[a],a)}function ti(){ar=Kx()}var up={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Ao=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function hp(e){var a=typeof e=="number"?ar[e]:e;return a=a.replace(Ao,"(\\d+)"),new RegExp("^"+a+"$")}function xp(e,a,r){var n=-1,t=-1,i=-1,s=-1,f=-1,l=-1;(a.match(Ao)||[]).forEach(function(u,x){var h=parseInt(r[x+1],10);switch(u.toLowerCase().charAt(0)){case"y":n=h;break;case"d":i=h;break;case"h":s=h;break;case"s":l=h;break;case"m":s>=0?f=h:t=h;break}}),l>=0&&f==-1&&t>=0&&(f=t,t=-1);var c=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(t>=1?t:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);c.length==7&&(c="0"+c),c.length==8&&(c="20"+c);var o=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return s==-1&&f==-1&&l==-1?c:n==-1&&t==-1&&i==-1?o:c+"T"+o}var pp=function(){var e={};e.version="1.2.0";function a(){for(var T=0,B=new Array(256),I=0;I!=256;++I)T=I,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,B[I]=T;return typeof Int32Array<"u"?new Int32Array(B):B}var r=a();function n(T){var B=0,I=0,U=0,L=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)L[U]=T[U];for(U=0;U!=256;++U)for(I=T[U],B=256+U;B<4096;B+=256)I=L[B]=I>>>8^T[I&255];var W=[];for(U=1;U!=16;++U)W[U-1]=typeof Int32Array<"u"?L.subarray(U*256,U*256+256):L.slice(U*256,U*256+256);return W}var t=n(r),i=t[0],s=t[1],f=t[2],l=t[3],c=t[4],o=t[5],u=t[6],x=t[7],h=t[8],p=t[9],d=t[10],m=t[11],g=t[12],y=t[13],v=t[14];function E(T,B){for(var I=B^-1,U=0,L=T.length;U<L;)I=I>>>8^r[(I^T.charCodeAt(U++))&255];return~I}function w(T,B){for(var I=B^-1,U=T.length-15,L=0;L<U;)I=v[T[L++]^I&255]^y[T[L++]^I>>8&255]^g[T[L++]^I>>16&255]^m[T[L++]^I>>>24]^d[T[L++]]^p[T[L++]]^h[T[L++]]^x[T[L++]]^u[T[L++]]^o[T[L++]]^c[T[L++]]^l[T[L++]]^f[T[L++]]^s[T[L++]]^i[T[L++]]^r[T[L++]];for(U+=15;L<U;)I=I>>>8^r[(I^T[L++])&255];return~I}function S(T,B){for(var I=B^-1,U=0,L=T.length,W=0,M=0;U<L;)W=T.charCodeAt(U++),W<128?I=I>>>8^r[(I^W)&255]:W<2048?(I=I>>>8^r[(I^(192|W>>6&31))&255],I=I>>>8^r[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=T.charCodeAt(U++)&1023,I=I>>>8^r[(I^(240|W>>8&7))&255],I=I>>>8^r[(I^(128|W>>2&63))&255],I=I>>>8^r[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^r[(I^(128|M&63))&255]):(I=I>>>8^r[(I^(224|W>>12&15))&255],I=I>>>8^r[(I^(128|W>>6&63))&255],I=I>>>8^r[(I^(128|W&63))&255]);return~I}return e.table=r,e.bstr=E,e.buf=w,e.str=S,e}(),Ve=function(){var a={};a.version="1.2.1";function r(k,N){for(var F=k.split("/"),C=N.split("/"),O=0,R=0,K=Math.min(F.length,C.length);O<K;++O){if(R=F[O].length-C[O].length)return R;if(F[O]!=C[O])return F[O]<C[O]?-1:1}return F.length-C.length}function n(k){if(k.charAt(k.length-1)=="/")return k.slice(0,-1).indexOf("/")===-1?k:n(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(0,N+1)}function t(k){if(k.charAt(k.length-1)=="/")return t(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(N+1)}function i(k,N){typeof N=="string"&&(N=new Date(N));var F=N.getHours();F=F<<6|N.getMinutes(),F=F<<5|N.getSeconds()>>>1,k.write_shift(2,F);var C=N.getFullYear()-1980;C=C<<4|N.getMonth()+1,C=C<<5|N.getDate(),k.write_shift(2,C)}function s(k){var N=k.read_shift(2)&65535,F=k.read_shift(2)&65535,C=new Date,O=F&31;F>>>=5;var R=F&15;F>>>=4,C.setMilliseconds(0),C.setFullYear(F+1980),C.setMonth(R-1),C.setDate(O);var K=N&31;N>>>=5;var Y=N&63;return N>>>=6,C.setHours(N),C.setMinutes(Y),C.setSeconds(K<<1),C}function f(k){nt(k,0);for(var N={},F=0;k.l<=k.length-4;){var C=k.read_shift(2),O=k.read_shift(2),R=k.l+O,K={};switch(C){case 21589:F=k.read_shift(1),F&1&&(K.mtime=k.read_shift(4)),O>5&&(F&2&&(K.atime=k.read_shift(4)),F&4&&(K.ctime=k.read_shift(4))),K.mtime&&(K.mt=new Date(K.mtime*1e3));break}k.l=R,N[C]=K}return N}var l;function c(){return l||(l={})}function o(k,N){if(k[0]==80&&k[1]==75)return zr(k,N);if((k[0]|32)==109&&(k[1]|32)==105)return st(k,N);if(k.length<512)throw new Error("CFB file size "+k.length+" < 512");var F=3,C=512,O=0,R=0,K=0,Y=0,V=0,j=[],J=k.slice(0,512);nt(J,0);var le=u(J);switch(F=le[0],F){case 3:C=512;break;case 4:C=4096;break;case 0:if(le[1]==0)return zr(k,N);default:throw new Error("Major Version: Expected 3 or 4 saw "+F)}C!==512&&(J=k.slice(0,C),nt(J,28));var _e=k.slice(0,C);x(J,F);var Ee=J.read_shift(4,"i");if(F===3&&Ee!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ee);J.l+=4,K=J.read_shift(4,"i"),J.l+=4,J.chk("00100000","Mini Stream Cutoff Size: "),Y=J.read_shift(4,"i"),O=J.read_shift(4,"i"),V=J.read_shift(4,"i"),R=J.read_shift(4,"i");for(var ue=-1,ge=0;ge<109&&(ue=J.read_shift(4,"i"),!(ue<0));++ge)j[ge]=ue;var qe=h(k,C);m(V,R,qe,C,j);var Er=y(qe,K,j,C);Er[K].name="!Directory",O>0&&Y!==M&&(Er[Y].name="!MiniFAT"),Er[j[0]].name="!FAT",Er.fat_addrs=j,Er.ssz=C;var Mr={},$r=[],nn=[],sn=[];v(K,Er,qe,$r,O,Mr,nn,Y),p(nn,sn,$r),$r.shift();var fn={FileIndex:nn,FullPaths:sn};return N&&N.raw&&(fn.raw={header:_e,sectors:qe}),fn}function u(k){if(k[k.l]==80&&k[k.l+1]==75)return[0,0];k.chk(se,"Header Signature: "),k.l+=16;var N=k.read_shift(2,"u");return[k.read_shift(2,"u"),N]}function x(k,N){var F=9;switch(k.l+=2,F=k.read_shift(2)){case 9:if(N!=3)throw new Error("Sector Shift: Expected 9 saw "+F);break;case 12:if(N!=4)throw new Error("Sector Shift: Expected 12 saw "+F);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+F)}k.chk("0600","Mini Sector Shift: "),k.chk("000000000000","Reserved: ")}function h(k,N){for(var F=Math.ceil(k.length/N)-1,C=[],O=1;O<F;++O)C[O-1]=k.slice(O*N,(O+1)*N);return C[F-1]=k.slice(F*N),C}function p(k,N,F){for(var C=0,O=0,R=0,K=0,Y=0,V=F.length,j=[],J=[];C<V;++C)j[C]=J[C]=C,N[C]=F[C];for(;Y<J.length;++Y)C=J[Y],O=k[C].L,R=k[C].R,K=k[C].C,j[C]===C&&(O!==-1&&j[O]!==O&&(j[C]=j[O]),R!==-1&&j[R]!==R&&(j[C]=j[R])),K!==-1&&(j[K]=C),O!==-1&&C!=j[C]&&(j[O]=j[C],J.lastIndexOf(O)<Y&&J.push(O)),R!==-1&&C!=j[C]&&(j[R]=j[C],J.lastIndexOf(R)<Y&&J.push(R));for(C=1;C<V;++C)j[C]===C&&(R!==-1&&j[R]!==R?j[C]=j[R]:O!==-1&&j[O]!==O&&(j[C]=j[O]));for(C=1;C<V;++C)if(k[C].type!==0){if(Y=C,Y!=j[Y])do Y=j[Y],N[C]=N[Y]+"/"+N[C];while(Y!==0&&j[Y]!==-1&&Y!=j[Y]);j[C]=-1}for(N[0]+="/",C=1;C<V;++C)k[C].type!==2&&(N[C]+="/")}function d(k,N,F){for(var C=k.start,O=k.size,R=[],K=C;F&&O>0&&K>=0;)R.push(N.slice(K*W,K*W+W)),O-=W,K=m0(F,K*4);return R.length===0?ae(0):Ya(R).slice(0,k.size)}function m(k,N,F,C,O){var R=M;if(k===M){if(N!==0)throw new Error("DIFAT chain shorter than expected")}else if(k!==-1){var K=F[k],Y=(C>>>2)-1;if(!K)return;for(var V=0;V<Y&&(R=m0(K,V*4))!==M;++V)O.push(R);m(m0(K,C-4),N-1,F,C,O)}}function g(k,N,F,C,O){var R=[],K=[];O||(O=[]);var Y=C-1,V=0,j=0;for(V=N;V>=0;){O[V]=!0,R[R.length]=V,K.push(k[V]);var J=F[Math.floor(V*4/C)];if(j=V*4&Y,C<4+j)throw new Error("FAT boundary crossed: "+V+" 4 "+C);if(!k[J])break;V=m0(k[J],j)}return{nodes:R,data:cl([K])}}function y(k,N,F,C){var O=k.length,R=[],K=[],Y=[],V=[],j=C-1,J=0,le=0,_e=0,Ee=0;for(J=0;J<O;++J)if(Y=[],_e=J+N,_e>=O&&(_e-=O),!K[_e]){V=[];var ue=[];for(le=_e;le>=0;){ue[le]=!0,K[le]=!0,Y[Y.length]=le,V.push(k[le]);var ge=F[Math.floor(le*4/C)];if(Ee=le*4&j,C<4+Ee)throw new Error("FAT boundary crossed: "+le+" 4 "+C);if(!k[ge]||(le=m0(k[ge],Ee),ue[le]))break}R[_e]={nodes:Y,data:cl([V])}}return R}function v(k,N,F,C,O,R,K,Y){for(var V=0,j=C.length?2:0,J=N[k].data,le=0,_e=0,Ee;le<J.length;le+=128){var ue=J.slice(le,le+128);nt(ue,64),_e=ue.read_shift(2),Ee=jf(ue,0,_e-j),C.push(Ee);var ge={name:Ee,type:ue.read_shift(1),color:ue.read_shift(1),L:ue.read_shift(4,"i"),R:ue.read_shift(4,"i"),C:ue.read_shift(4,"i"),clsid:ue.read_shift(16),state:ue.read_shift(4,"i"),start:0,size:0},qe=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);qe!==0&&(ge.ct=E(ue,ue.l-8));var Er=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);Er!==0&&(ge.mt=E(ue,ue.l-8)),ge.start=ue.read_shift(4,"i"),ge.size=ue.read_shift(4,"i"),ge.size<0&&ge.start<0&&(ge.size=ge.type=0,ge.start=M,ge.name=""),ge.type===5?(V=ge.start,O>0&&V!==M&&(N[V].name="!StreamData")):ge.size>=4096?(ge.storage="fat",N[ge.start]===void 0&&(N[ge.start]=g(F,ge.start,N.fat_addrs,N.ssz)),N[ge.start].name=ge.name,ge.content=N[ge.start].data.slice(0,ge.size)):(ge.storage="minifat",ge.size<0?ge.size=0:V!==M&&ge.start!==M&&N[V]&&(ge.content=d(ge,N[V].data,(N[Y]||{}).data))),ge.content&&nt(ge.content,0),R[Ee]=ge,K.push(ge)}}function E(k,N){return new Date((Wt(k,N+4)/1e7*Math.pow(2,32)+Wt(k,N)/1e7-11644473600)*1e3)}function w(k,N){return c(),o(l.readFileSync(k),N)}function S(k,N){var F=N&&N.type;switch(F||yr&&Buffer.isBuffer(k)&&(F="buffer"),F||"base64"){case"file":return w(k,N);case"base64":return o(Ht($t(k)),N);case"binary":return o(Ht(k),N)}return o(k,N)}function T(k,N){var F=N||{},C=F.root||"Root Entry";if(k.FullPaths||(k.FullPaths=[]),k.FileIndex||(k.FileIndex=[]),k.FullPaths.length!==k.FileIndex.length)throw new Error("inconsistent CFB structure");k.FullPaths.length===0&&(k.FullPaths[0]=C+"/",k.FileIndex[0]={name:C,type:5}),F.CLSID&&(k.FileIndex[0].clsid=F.CLSID),B(k)}function B(k){var N="Sh33tJ5";if(!Ve.find(k,"/"+N)){var F=ae(4);F[0]=55,F[1]=F[3]=50,F[2]=54,k.FileIndex.push({name:N,type:2,content:F,size:4,L:69,R:69,C:69}),k.FullPaths.push(k.FullPaths[0]+N),I(k)}}function I(k,N){T(k);for(var F=!1,C=!1,O=k.FullPaths.length-1;O>=0;--O){var R=k.FileIndex[O];switch(R.type){case 0:C?F=!0:(k.FileIndex.pop(),k.FullPaths.pop());break;case 1:case 2:case 5:C=!0,isNaN(R.R*R.L*R.C)&&(F=!0),R.R>-1&&R.L>-1&&R.R==R.L&&(F=!0);break;default:F=!0;break}}if(!(!F&&!N)){var K=new Date(1987,1,19),Y=0,V=Object.create?Object.create(null):{},j=[];for(O=0;O<k.FullPaths.length;++O)V[k.FullPaths[O]]=!0,k.FileIndex[O].type!==0&&j.push([k.FullPaths[O],k.FileIndex[O]]);for(O=0;O<j.length;++O){var J=n(j[O][0]);C=V[J],C||(j.push([J,{name:t(J).replace("/",""),type:1,clsid:he,ct:K,mt:K,content:null}]),V[J]=!0)}for(j.sort(function(Ee,ue){return r(Ee[0],ue[0])}),k.FullPaths=[],k.FileIndex=[],O=0;O<j.length;++O)k.FullPaths[O]=j[O][0],k.FileIndex[O]=j[O][1];for(O=0;O<j.length;++O){var le=k.FileIndex[O],_e=k.FullPaths[O];if(le.name=t(_e).replace("/",""),le.L=le.R=le.C=-(le.color=1),le.size=le.content?le.content.length:0,le.start=0,le.clsid=le.clsid||he,O===0)le.C=j.length>1?1:-1,le.size=0,le.type=5;else if(_e.slice(-1)=="/"){for(Y=O+1;Y<j.length&&n(k.FullPaths[Y])!=_e;++Y);for(le.C=Y>=j.length?-1:Y,Y=O+1;Y<j.length&&n(k.FullPaths[Y])!=n(_e);++Y);le.R=Y>=j.length?-1:Y,le.type=1}else n(k.FullPaths[O+1]||"")==n(_e)&&(le.R=O+1),le.type=2}}}function U(k,N){var F=N||{};if(F.fileType=="mad")return Ct(k,F);switch(I(k),F.fileType){case"zip":return wa(k,F)}var C=function(Ee){for(var ue=0,ge=0,qe=0;qe<Ee.FileIndex.length;++qe){var Er=Ee.FileIndex[qe];if(Er.content){var Mr=Er.content.length;Mr>0&&(Mr<4096?ue+=Mr+63>>6:ge+=Mr+511>>9)}}for(var $r=Ee.FullPaths.length+3>>2,nn=ue+7>>3,sn=ue+127>>7,fn=nn+ge+$r+sn,Mt=fn+127>>7,Nn=Mt<=109?0:Math.ceil((Mt-109)/127);fn+Mt+Nn+127>>7>Mt;)Nn=++Mt<=109?0:Math.ceil((Mt-109)/127);var er=[1,Nn,Mt,sn,$r,ge,ue,0];return Ee.FileIndex[0].size=ue<<6,er[7]=(Ee.FileIndex[0].start=er[0]+er[1]+er[2]+er[3]+er[4]+er[5])+(er[6]+7>>3),er}(k),O=ae(C[7]<<9),R=0,K=0;{for(R=0;R<8;++R)O.write_shift(1,ne[R]);for(R=0;R<8;++R)O.write_shift(2,0);for(O.write_shift(2,62),O.write_shift(2,3),O.write_shift(2,65534),O.write_shift(2,9),O.write_shift(2,6),R=0;R<3;++R)O.write_shift(2,0);for(O.write_shift(4,0),O.write_shift(4,C[2]),O.write_shift(4,C[0]+C[1]+C[2]+C[3]-1),O.write_shift(4,0),O.write_shift(4,4096),O.write_shift(4,C[3]?C[0]+C[1]+C[2]-1:M),O.write_shift(4,C[3]),O.write_shift(-4,C[1]?C[0]-1:M),O.write_shift(4,C[1]),R=0;R<109;++R)O.write_shift(-4,R<C[2]?C[1]+R:-1)}if(C[1])for(K=0;K<C[1];++K){for(;R<236+K*127;++R)O.write_shift(-4,R<C[2]?C[1]+R:-1);O.write_shift(-4,K===C[1]-1?M:K+1)}var Y=function(Ee){for(K+=Ee;R<K-1;++R)O.write_shift(-4,R+1);Ee&&(++R,O.write_shift(-4,M))};for(K=R=0,K+=C[1];R<K;++R)O.write_shift(-4,ce.DIFSECT);for(K+=C[2];R<K;++R)O.write_shift(-4,ce.FATSECT);Y(C[3]),Y(C[4]);for(var V=0,j=0,J=k.FileIndex[0];V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(j<4096)&&(J.start=K,Y(j+511>>9)));for(Y(C[6]+7>>3);O.l&511;)O.write_shift(-4,ce.ENDOFCHAIN);for(K=R=0,V=0;V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(!j||j>=4096)&&(J.start=K,Y(j+63>>6)));for(;O.l&511;)O.write_shift(-4,ce.ENDOFCHAIN);for(R=0;R<C[4]<<2;++R){var le=k.FullPaths[R];if(!le||le.length===0){for(V=0;V<17;++V)O.write_shift(4,0);for(V=0;V<3;++V)O.write_shift(4,-1);for(V=0;V<12;++V)O.write_shift(4,0);continue}J=k.FileIndex[R],R===0&&(J.start=J.size?J.start-1:M);var _e=R===0&&F.root||J.name;if(j=2*(_e.length+1),O.write_shift(64,_e,"utf16le"),O.write_shift(2,j),O.write_shift(1,J.type),O.write_shift(1,J.color),O.write_shift(-4,J.L),O.write_shift(-4,J.R),O.write_shift(-4,J.C),J.clsid)O.write_shift(16,J.clsid,"hex");else for(V=0;V<4;++V)O.write_shift(4,0);O.write_shift(4,J.state||0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,J.start),O.write_shift(4,J.size),O.write_shift(4,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>=4096)if(O.l=J.start+1<<9,yr&&Buffer.isBuffer(J.content))J.content.copy(O,O.l,0,J.size),O.l+=J.size+511&-512;else{for(V=0;V<J.size;++V)O.write_shift(1,J.content[V]);for(;V&511;++V)O.write_shift(1,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>0&&J.size<4096)if(yr&&Buffer.isBuffer(J.content))J.content.copy(O,O.l,0,J.size),O.l+=J.size+63&-64;else{for(V=0;V<J.size;++V)O.write_shift(1,J.content[V]);for(;V&63;++V)O.write_shift(1,0)}if(yr)O.l=O.length;else for(;O.l<O.length;)O.write_shift(1,0);return O}function L(k,N){var F=k.FullPaths.map(function(V){return V.toUpperCase()}),C=F.map(function(V){var j=V.split("/");return j[j.length-(V.slice(-1)=="/"?2:1)]}),O=!1;N.charCodeAt(0)===47?(O=!0,N=F[0].slice(0,-1)+N):O=N.indexOf("/")!==-1;var R=N.toUpperCase(),K=O===!0?F.indexOf(R):C.indexOf(R);if(K!==-1)return k.FileIndex[K];var Y=!R.match(Ii);for(R=R.replace(Et,""),Y&&(R=R.replace(Ii,"!")),K=0;K<F.length;++K)if((Y?F[K].replace(Ii,"!"):F[K]).replace(Et,"")==R||(Y?C[K].replace(Ii,"!"):C[K]).replace(Et,"")==R)return k.FileIndex[K];return null}var W=64,M=-2,se="d0cf11e0a1b11ae1",ne=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ce={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:se,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function be(k,N,F){c();var C=U(k,F);l.writeFileSync(N,C)}function z(k){for(var N=new Array(k.length),F=0;F<k.length;++F)N[F]=String.fromCharCode(k[F]);return N.join("")}function Te(k,N){var F=U(k,N);switch(N&&N.type||"buffer"){case"file":return c(),l.writeFileSync(N.filename,F),F;case"binary":return typeof F=="string"?F:z(F);case"base64":return Wi(typeof F=="string"?F:z(F));case"buffer":if(yr)return Buffer.isBuffer(F)?F:Kn(F);case"array":return typeof F=="string"?Ht(F):F}return F}var Ae;function _(k){try{var N=k.InflateRaw,F=new N;if(F._processChunk(new Uint8Array([3,0]),F._finishFlushFlag),F.bytesRead)Ae=k;else throw new Error("zlib does not expose bytesRead")}catch(C){console.error("cannot use native zlib: "+(C.message||C))}}function A(k,N){if(!Ae)return aa(k,N);var F=Ae.InflateRaw,C=new F,O=C._processChunk(k.slice(k.l),C._finishFlushFlag);return k.l+=C.bytesRead,O}function D(k){return Ae?Ae.deflateRawSync(k):Qe(k)}var b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],re=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ee(k){var N=(k<<1|k<<11)&139536|(k<<5|k<<15)&558144;return(N>>16|N>>8|N)&255}for(var Q=typeof Uint8Array<"u",q=Q?new Uint8Array(256):[],we=0;we<256;++we)q[we]=ee(we);function P(k,N){var F=q[k&255];return N<=8?F>>>8-N:(F=F<<8|q[k>>8&255],N<=16?F>>>16-N:(F=F<<8|q[k>>16&255],F>>>24-N))}function Pe(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=6?0:k[C+1]<<8))>>>F&3}function Ie(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=5?0:k[C+1]<<8))>>>F&7}function je(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=4?0:k[C+1]<<8))>>>F&15}function Le(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=3?0:k[C+1]<<8))>>>F&31}function ie(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=1?0:k[C+1]<<8))>>>F&127}function ur(k,N,F){var C=N&7,O=N>>>3,R=(1<<F)-1,K=k[O]>>>C;return F<8-C||(K|=k[O+1]<<8-C,F<16-C)||(K|=k[O+2]<<16-C,F<24-C)||(K|=k[O+3]<<24-C),K&R}function ir(k,N,F){var C=N&7,O=N>>>3;return C<=5?k[O]|=(F&7)<<C:(k[O]|=F<<C&255,k[O+1]=(F&7)>>8-C),N+3}function ka(k,N,F){var C=N&7,O=N>>>3;return F=(F&1)<<C,k[O]|=F,N+1}function Da(k,N,F){var C=N&7,O=N>>>3;return F<<=C,k[O]|=F&255,F>>>=8,k[O+1]=F,N+8}function Tt(k,N,F){var C=N&7,O=N>>>3;return F<<=C,k[O]|=F&255,F>>>=8,k[O+1]=F&255,k[O+2]=F>>>8,N+16}function qa(k,N){var F=k.length,C=2*F>N?2*F:N+5,O=0;if(F>=N)return k;if(yr){var R=Xc(C);if(k.copy)k.copy(R);else for(;O<k.length;++O)R[O]=k[O];return R}else if(Q){var K=new Uint8Array(C);if(K.set)K.set(k);else for(;O<F;++O)K[O]=k[O];return K}return k.length=C,k}function Ea(k){for(var N=new Array(k),F=0;F<k;++F)N[F]=0;return N}function Ka(k,N,F){var C=1,O=0,R=0,K=0,Y=0,V=k.length,j=Q?new Uint16Array(32):Ea(32);for(R=0;R<32;++R)j[R]=0;for(R=V;R<F;++R)k[R]=0;V=k.length;var J=Q?new Uint16Array(V):Ea(V);for(R=0;R<V;++R)j[O=k[R]]++,C<O&&(C=O),J[R]=0;for(j[0]=0,R=1;R<=C;++R)j[R+16]=Y=Y+j[R-1]<<1;for(R=0;R<V;++R)Y=k[R],Y!=0&&(J[R]=j[Y+16]++);var le=0;for(R=0;R<V;++R)if(le=k[R],le!=0)for(Y=P(J[R],C)>>C-le,K=(1<<C+4-le)-1;K>=0;--K)N[Y|K<<le]=le&15|R<<4;return C}var Se=Q?new Uint16Array(512):Ea(512),Ne=Q?new Uint16Array(32):Ea(32);if(!Q){for(var Be=0;Be<512;++Be)Se[Be]=0;for(Be=0;Be<32;++Be)Ne[Be]=0}(function(){for(var k=[],N=0;N<32;N++)k.push(5);Ka(k,Ne,32);var F=[];for(N=0;N<=143;N++)F.push(8);for(;N<=255;N++)F.push(9);for(;N<=279;N++)F.push(7);for(;N<=287;N++)F.push(8);Ka(F,Se,288)})();var Ta=function(){for(var N=Q?new Uint8Array(32768):[],F=0,C=0;F<re.length-1;++F)for(;C<re[F+1];++C)N[C]=F;for(;C<32768;++C)N[C]=29;var O=Q?new Uint8Array(259):[];for(F=0,C=0;F<X.length-1;++F)for(;C<X[F+1];++C)O[C]=F;function R(Y,V){for(var j=0;j<Y.length;){var J=Math.min(65535,Y.length-j),le=j+J==Y.length;for(V.write_shift(1,+le),V.write_shift(2,J),V.write_shift(2,~J&65535);J-- >0;)V[V.l++]=Y[j++]}return V.l}function K(Y,V){for(var j=0,J=0,le=Q?new Uint16Array(32768):[];J<Y.length;){var _e=Math.min(65535,Y.length-J);if(_e<10){for(j=ir(V,j,+(J+_e==Y.length)),j&7&&(j+=8-(j&7)),V.l=j/8|0,V.write_shift(2,_e),V.write_shift(2,~_e&65535);_e-- >0;)V[V.l++]=Y[J++];j=V.l*8;continue}j=ir(V,j,+(J+_e==Y.length)+2);for(var Ee=0;_e-- >0;){var ue=Y[J];Ee=(Ee<<5^ue)&32767;var ge=-1,qe=0;if((ge=le[Ee])&&(ge|=J&-32768,ge>J&&(ge-=32768),ge<J))for(;Y[ge+qe]==Y[J+qe]&&qe<250;)++qe;if(qe>2){ue=O[qe],ue<=22?j=Da(V,j,q[ue+1]>>1)-1:(Da(V,j,3),j+=5,Da(V,j,q[ue-23]>>5),j+=3);var Er=ue<8?0:ue-4>>2;Er>0&&(Tt(V,j,qe-X[ue]),j+=Er),ue=N[J-ge],j=Da(V,j,q[ue]>>3),j-=3;var Mr=ue<4?0:ue-2>>1;Mr>0&&(Tt(V,j,J-ge-re[ue]),j+=Mr);for(var $r=0;$r<qe;++$r)le[Ee]=J&32767,Ee=(Ee<<5^Y[J])&32767,++J;_e-=qe-1}else ue<=143?ue=ue+48:j=ka(V,j,1),j=Da(V,j,q[ue]),le[Ee]=J&32767,++J}j=Da(V,j,0)-1}return V.l=(j+7)/8|0,V.l}return function(V,j){return V.length<8?R(V,j):K(V,j)}}();function Qe(k){var N=ae(50+Math.floor(k.length*1.1)),F=Ta(k,N);return N.slice(0,F)}var br=Q?new Uint16Array(32768):Ea(32768),me=Q?new Uint16Array(32768):Ea(32768),Fr=Q?new Uint16Array(128):Ea(128),Or=1,hr=1;function kr(k,N){var F=Le(k,N)+257;N+=5;var C=Le(k,N)+1;N+=5;var O=je(k,N)+4;N+=4;for(var R=0,K=Q?new Uint8Array(19):Ea(19),Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],V=1,j=Q?new Uint8Array(8):Ea(8),J=Q?new Uint8Array(8):Ea(8),le=K.length,_e=0;_e<O;++_e)K[b[_e]]=R=Ie(k,N),V<R&&(V=R),j[R]++,N+=3;var Ee=0;for(j[0]=0,_e=1;_e<=V;++_e)J[_e]=Ee=Ee+j[_e-1]<<1;for(_e=0;_e<le;++_e)(Ee=K[_e])!=0&&(Y[_e]=J[Ee]++);var ue=0;for(_e=0;_e<le;++_e)if(ue=K[_e],ue!=0){Ee=q[Y[_e]]>>8-ue;for(var ge=(1<<7-ue)-1;ge>=0;--ge)Fr[Ee|ge<<ue]=ue&7|_e<<3}var qe=[];for(V=1;qe.length<F+C;)switch(Ee=Fr[ie(k,N)],N+=Ee&7,Ee>>>=3){case 16:for(R=3+Pe(k,N),N+=2,Ee=qe[qe.length-1];R-- >0;)qe.push(Ee);break;case 17:for(R=3+Ie(k,N),N+=3;R-- >0;)qe.push(0);break;case 18:for(R=11+ie(k,N),N+=7;R-- >0;)qe.push(0);break;default:qe.push(Ee),V<Ee&&(V=Ee);break}var Er=qe.slice(0,F),Mr=qe.slice(F);for(_e=F;_e<286;++_e)Er[_e]=0;for(_e=C;_e<30;++_e)Mr[_e]=0;return Or=Ka(Er,br,286),hr=Ka(Mr,me,30),N}function xa(k,N){if(k[0]==3&&!(k[1]&3))return[n0(N),2];for(var F=0,C=0,O=Xc(N||1<<18),R=0,K=O.length>>>0,Y=0,V=0;(C&1)==0;){if(C=Ie(k,F),F+=3,C>>>1)C>>1==1?(Y=9,V=5):(F=kr(k,F),Y=Or,V=hr);else{F&7&&(F+=8-(F&7));var j=k[F>>>3]|k[(F>>>3)+1]<<8;if(F+=32,j>0)for(!N&&K<R+j&&(O=qa(O,R+j),K=O.length);j-- >0;)O[R++]=k[F>>>3],F+=8;continue}for(;;){!N&&K<R+32767&&(O=qa(O,R+32767),K=O.length);var J=ur(k,F,Y),le=C>>>1==1?Se[J]:br[J];if(F+=le&15,le>>>=4,(le>>>8&255)===0)O[R++]=le;else{if(le==256)break;le-=257;var _e=le<8?0:le-4>>2;_e>5&&(_e=0);var Ee=R+X[le];_e>0&&(Ee+=ur(k,F,_e),F+=_e),J=ur(k,F,V),le=C>>>1==1?Ne[J]:me[J],F+=le&15,le>>>=4;var ue=le<4?0:le-2>>1,ge=re[le];for(ue>0&&(ge+=ur(k,F,ue),F+=ue),!N&&K<Ee&&(O=qa(O,Ee+100),K=O.length);R<Ee;)O[R]=O[R-ge],++R}}}return N?[O,F+7>>>3]:[O.slice(0,R),F+7>>>3]}function aa(k,N){var F=k.slice(k.l||0),C=xa(F,N);return k.l+=C[1],C[0]}function We(k,N){if(k)typeof console<"u"&&console.error(N);else throw new Error(N)}function zr(k,N){var F=k;nt(F,0);var C=[],O=[],R={FileIndex:C,FullPaths:O};T(R,{root:N.root});for(var K=F.length-4;(F[K]!=80||F[K+1]!=75||F[K+2]!=5||F[K+3]!=6)&&K>=0;)--K;F.l=K+4,F.l+=4;var Y=F.read_shift(2);F.l+=6;var V=F.read_shift(4);for(F.l=V,K=0;K<Y;++K){F.l+=20;var j=F.read_shift(4),J=F.read_shift(4),le=F.read_shift(2),_e=F.read_shift(2),Ee=F.read_shift(2);F.l+=8;var ue=F.read_shift(4),ge=f(F.slice(F.l+le,F.l+le+_e));F.l+=le+_e+Ee;var qe=F.l;F.l=ue+4,na(F,j,J,R,ge),F.l=qe}return R}function na(k,N,F,C,O){k.l+=2;var R=k.read_shift(2),K=k.read_shift(2),Y=s(k);if(R&8257)throw new Error("Unsupported ZIP encryption");for(var V=k.read_shift(4),j=k.read_shift(4),J=k.read_shift(4),le=k.read_shift(2),_e=k.read_shift(2),Ee="",ue=0;ue<le;++ue)Ee+=String.fromCharCode(k[k.l++]);if(_e){var ge=f(k.slice(k.l,k.l+_e));(ge[21589]||{}).mt&&(Y=ge[21589].mt),((O||{})[21589]||{}).mt&&(Y=O[21589].mt)}k.l+=_e;var qe=k.slice(k.l,k.l+j);switch(K){case 8:qe=A(k,J);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+K)}var Er=!1;R&8&&(V=k.read_shift(4),V==134695760&&(V=k.read_shift(4),Er=!0),j=k.read_shift(4),J=k.read_shift(4)),j!=N&&We(Er,"Bad compressed size: "+N+" != "+j),J!=F&&We(Er,"Bad uncompressed size: "+F+" != "+J),_t(C,Ee,qe,{unsafe:!0,mt:Y})}function wa(k,N){var F=N||{},C=[],O=[],R=ae(1),K=F.compression?8:0,Y=0,V=0,j=0,J=0,le=0,_e=k.FullPaths[0],Ee=_e,ue=k.FileIndex[0],ge=[],qe=0;for(V=1;V<k.FullPaths.length;++V)if(Ee=k.FullPaths[V].slice(_e.length),ue=k.FileIndex[V],!(!ue.size||!ue.content||Ee=="Sh33tJ5")){var Er=J,Mr=ae(Ee.length);for(j=0;j<Ee.length;++j)Mr.write_shift(1,Ee.charCodeAt(j)&127);Mr=Mr.slice(0,Mr.l),ge[le]=pp.buf(ue.content,0);var $r=ue.content;K==8&&($r=D($r)),R=ae(30),R.write_shift(4,67324752),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),ue.mt?i(R,ue.mt):R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),J+=R.length,C.push(R),J+=Mr.length,C.push(Mr),J+=$r.length,C.push($r),R=ae(46),R.write_shift(4,33639248),R.write_shift(2,0),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(4,0),R.write_shift(4,Er),qe+=R.l,O.push(R),qe+=Mr.length,O.push(Mr),++le}return R=ae(22),R.write_shift(4,101010256),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,le),R.write_shift(2,le),R.write_shift(4,qe),R.write_shift(4,J),R.write_shift(2,0),Ya([Ya(C),Ya(O),R])}var ha={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function fr(k,N){if(k.ctype)return k.ctype;var F=k.name||"",C=F.match(/\.([^\.]+)$/);return C&&ha[C[1]]||N&&(C=(F=N).match(/[\.\\]([^\.\\])+$/),C&&ha[C[1]])?ha[C[1]]:"application/octet-stream"}function wr(k){for(var N=Wi(k),F=[],C=0;C<N.length;C+=76)F.push(N.slice(C,C+76));return F.join(`\r
|
|
11
|
+
`).filter(f=>f.trim()!==""),r=r==null?void 0:r.map(f=>(f=f==null?void 0:f.replaceAll("\r",""),f));const n=[];let t="",i=0;for(const f of r){i=i+1;let l=f.trim(),c=t?t+l:l,o=l.includes("{")||l.includes("[")||l.includes("【")||l.includes("(")||l.includes("(")||l.includes("/*")||t&&(t.includes("{")||t.includes("[")||t.includes("【")||t.includes("(")||t.includes("(")||t.includes("/*")),u=c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1,x=c[c.length-1],h=(s=r==null?void 0:r[i])==null?void 0:s[0],p=a==null?void 0:a.find(m=>m===x),d=a==null?void 0:a.find(m=>m===h);o?u&&!p&&!d?(n.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):c!=null&&c.includes("*/")?t=c.replace(/\/\*[\s\S]*?\*\//g,""):t=c:a!=null&&a.find(m=>m===l[l.length-1])?t=l:n.push(l.replace(/\/\*[\s\S]*?\*\//g,""))}return(t==null?void 0:t.length)>0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Ah=(e,a)=>{var s;let r=e;if(r==null||typeof r!="string"&&!Array.isArray(r))return[];const n=[];let t="",i=0;for(const f of r)i++,f.includes("{")||t.includes("{")?(t+=f.trim(),t.split("{").length-1===t.split("}").length-1&&t.includes(a)?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=f.trim(),t!=null&&t.includes(a)&&(t.split("'").length%2===1||((s=t.split("'"))==null?void 0:s.length)===1)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Fh=(e,a)=>{var s,f;let r=e;if(r==null||typeof r!="string"&&!Array.isArray(r))return[];const n=[];let t="",i=0;for(const l of r)i++,l.includes("{")||t.includes("{")||l.includes("[")||t.includes("[")||l.includes("【")||t.includes("【")||l.includes("(")||t.includes("(")||l.includes("(")||t.includes("(")||l.includes("/*")||t.includes("/*")?(t+=l.trim(),t.split("{").length-1===t.split("}").length-1&&t.split("【").length-1===t.split("】").length-1&&t.split("[").length-1===t.split("]").length-1&&t.split("(").length-1===t.split(")").length-1&&t.split("(").length-1===t.split(")").length-1&&t.split("/*").length-1===t.split("*/").length-1&&t[t.length-1]===a&&(t.split("'").length%2===1||((s=t.split("'"))==null?void 0:s.length)===1)?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=l.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(t.split("'").length%2===1||((f=t.split("'"))==null?void 0:f.length)===1)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Dh=(e,a)=>e===a||e.length===a.length&&e.every((r,n)=>r===a[n]),Ih=e=>e.reduce((a,r)=>{var t;const n=(((t=a.at(-1))==null?void 0:t.total)??0)+r;return a.push({key:r,total:n}),a},[]),bh=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},Ch=(e,a=2)=>{const r=[];for(let n=0;n<e.length;n+=a)r.push(e.slice(n,n+a));return r},Oh=e=>!e||e.length===0?[]:e.length===1?e[0].map(a=>[a]):e.reduce((a,r)=>{const n=[];return a.forEach(t=>{r.forEach(i=>{t&&n.push(Object.assign(t,i))})}),n}),Rh=e=>typeof e=="number",Nh=e=>{if(!e||e.length<2)return[];const a=e[0].length;let r="",n=!0;for(let t=0;t<a;t++){if(!n)return;const i=e[0][t];e.every(f=>f[t]===i)?r=t:n=!1}return r},Ph=e=>{if(Array.isArray(e)&&e.length>=3){const[a,r,n,t]=e;return t!==void 0?`rgba(${a}, ${r}, ${n}, ${t})`:`rgb(${a}, ${r}, ${n})`}if(typeof e=="string"){const a=e.trim();if(a.startsWith("(")&&a.endsWith(")")){const r=a.slice(1,-1).split(",").map(n=>Number(n.trim()));if(r.length>=3&&r.every(n=>!Number.isNaN(n))){const[n,t,i,s]=r;return s!==void 0?`rgba(${n}, ${t}, ${i}, ${s})`:`rgb(${n}, ${t}, ${i})`}}return a}},Mh=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],Lh=[{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"}],Bh=e=>{var i;let a=e;const r=[];let n="",t=0;for(const s of a)t++,s.includes("(")||n.includes("(")||s.includes(")")||n.includes(")")||s.includes("&")||n.includes("&")||s.includes("|")||n.includes("|")?(n+=s.trim(),(((i=H.cloneDeep(n))==null?void 0:i[(n==null?void 0:n.length)-1])===")"||(a==null?void 0:a[t])==="|"||(a==null?void 0:a[t])==="&")&&!(n!=null&&n.includes("&"))&&!(n!=null&&n.includes("|"))?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):n==="&&"||n==="||"?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):t===(e==null?void 0:e.length)&&(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):n+=s.trim();return(n==null?void 0:n.length)!==0&&r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),r},Jl=(e,a,r,n,t,i)=>{let s=e;return s=s==null?void 0:s.map(f=>{var l,c,o,u,x;if(r!=null&&r.find(h=>{var p,d,m,g,y;return(h===(f==null?void 0:f.prop)||((p=f==null?void 0:f.prop)==null?void 0:p.includes("."+h)))&&((y=(d=f==null?void 0:f.prop)==null?void 0:d.split("."))==null?void 0:y[((g=(m=f==null?void 0:f.prop)==null?void 0:m.split("."))==null?void 0:g.length)-1])===(f==null?void 0:f.label)})&&(f.label=(l=a==null?void 0:a[r==null?void 0:r.findIndex(h=>{var p;return h===(f==null?void 0:f.prop)||((p=f==null?void 0:f.prop)==null?void 0:p.includes("."+h))})])==null?void 0:l.replaceAll('"',""),n!=null&&n.methodContent)){let h=(o=(c=n==null?void 0:n.methodContent)==null?void 0:c.replaceAll('"',""))==null?void 0:o.replaceAll("'","");h!=null&&h.includes("@")?(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h!=null&&h.includes("@Type")||(h=h+",@Type=Auto"),h!=null&&h.includes("@Button")||(h=h+",@Button=Prop"),h!=null&&h.includes("@Extent")||(h=h+",@Extent=Row"),h=h+")"):h=h+"(@Type=Auto,@Button=Prop,@Extent=Row)",f.methodContent=h,f.prop=(f==null?void 0:f.prop)+(n==null?void 0:n.columnPathIndex),(u=i==null?void 0:i.find(p=>p==null?void 0:p.includes("@SonSync")))!=null&&u.includes("Yes")&&(f.methodId=t)}return f!=null&&f.children&&((x=f==null?void 0:f.children)==null?void 0:x.length)>0&&(f.children=Jl(f.children,a,r,n,t,i)),f}),s},ql=e=>{var s;let a=e==null?void 0:e.replaceAll("=","#"),r=Bh(a);((s=r==null?void 0:r[1])==null?void 0:s[0])==="#"&&(r=[r==null?void 0:r.join("")]);let n=r==null?void 0:r.map(f=>f),t=[],i={};return n==null||n.forEach((f,l)=>{var c,o,u,x,h;if(!(f!=null&&f.includes("&&"))&&!(f!=null&&f.includes("||"))){let p=f;(f==null?void 0:f[(f==null?void 0:f.length)-1])===")"&&(p=f.slice(0,(f==null?void 0:f.length)-1)),(p==null?void 0:p[0])==="("&&(p=p.slice(1,p==null?void 0:p.length)),p!=null&&p.includes("[")&&(p!=null&&p.includes("]")||(p=(x=(c=p==null?void 0:p.slice(1,p==null?void 0:p.length))==null?void 0:c.split(":"))==null?void 0:x[((u=(o=p==null?void 0:p.slice(1,p==null?void 0:p.length))==null?void 0:o.split(":"))==null?void 0:u.length)-1])),p=p==null?void 0:p.split("#");let d=p[0].replaceAll("'","").replaceAll("]","");d!=null&&d.includes(":")&&(d=d==null?void 0:d.replaceAll(":","."));let m=(h=p[1])==null?void 0:h.replaceAll("'","");(d==null?void 0:d[(d==null?void 0:d.length)-1])!=="!"?i[d]=m:i[d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)]="!"+m}else f==="&&"||f==="||"&&(t.push(i),i={});l===n.length-1&&(t.push(i),i={})}),t},Uh=(e,a)=>{const r=new Map;let n=[];a.forEach(i=>{for(const[s,f]of Object.entries(i))try{r.set(s.replaceAll("'",""),JSON.parse(f))}catch{r.set(s,[])}});const t=i=>i.map(s=>{var c,o;const f={label:s==null?void 0:s.replaceAll("'","")},l=r.get(s==null?void 0:s.replaceAll("'",""));if(l!=null&&l.length){const u=l.map(x=>e.find(h=>(h==null?void 0:h.replaceAll("'",""))===x)).filter(Boolean);f.children=(f.children||[]).concat(u),f.children=(c=f.children)==null?void 0:c.map(x=>(f==null?void 0:f.label)+"."+(x==null?void 0:x.replaceAll("'",""))),n=[...n,...f.children]}return(o=f.children)!=null&&o.length&&(f.children=t(f.children)),f});return t(e),n},Wh=(e,a)=>{const r=(n,t)=>{let i;return i=t==null?void 0:t.map(s=>{var f,l,c,o,u,x,h;if(n!=null&&n.find(p=>{var d;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||((d=s==null?void 0:s.prop)==null?void 0:d.includes("."+(p==null?void 0:p.prop)))})){let p=n==null?void 0:n.find(d=>{var m;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(d==null?void 0:d.prop)))});p!=null&&p.relatedValueId&&(s.relatedValueId=p==null?void 0:p.relatedValueId),p!=null&&p.menuId&&(s.menuId=p==null?void 0:p.menuId,s.directiveLabel="#isMain")}else if(Array.isArray(n==null?void 0:n[0])&&((f=n==null?void 0:n[0])!=null&&f.find(p=>{var d;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||(p==null?void 0:p.prop)===(s==null?void 0:s.prop)||((d=s==null?void 0:s.prop)==null?void 0:d.includes("."+(p==null?void 0:p.prop)))}))){let p=(l=n==null?void 0:n[0])==null?void 0:l.find(d=>{var m;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||(d==null?void 0:d.prop)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(d==null?void 0:d.prop)))});p!=null&&p.relatedValueId&&(s.relatedValueId=p==null?void 0:p.relatedValueId),p!=null&&p.menuId&&(s.menuId=p==null?void 0:p.menuId,s.directiveLabel="#isMain"),s.label=(x=(c=s.label)==null?void 0:c.split("."))==null?void 0:x[((u=(o=s.label)==null?void 0:o.split("."))==null?void 0:u.length)-1]}return s!=null&&s.children&&((h=s==null?void 0:s.children)==null?void 0:h.length)>0&&(s.children=r(n,s.children)),s}),i};return r(e,a)},Us=H.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Hh=Us(H.pinia),{multipleTableConst:ct}=H.storeToRefs(Hh),Ts=e=>{let a=[];function r(t,i=""){Array.isArray(t)&&(t==null||t.forEach(s=>{Array.isArray(s)||(s=[s]),s==null||s.forEach(f=>{var l,c,o,u,x,h,p,d,m,g,y,v;if(!(f!=null&&f.children)||f.children.length===0)f.prop=i===""?f==null?void 0:f.prop:i+ct.value+((u=(l=f==null?void 0:f.prop)==null?void 0:l.split(ct.value))==null?void 0:u[((o=(c=f==null?void 0:f.prop)==null?void 0:c.split(ct.value))==null?void 0:o.length)-1]),a.push(f.prop);else{let E=i===""?i+((d=(x=f==null?void 0:f.prop)==null?void 0:x.split(ct.value))==null?void 0:d[((p=(h=f==null?void 0:f.prop)==null?void 0:h.split(ct.value))==null?void 0:p.length)-1]):i+ct.value+((v=(m=f==null?void 0:f.prop)==null?void 0:m.split(ct.value))==null?void 0:v[((y=(g=f==null?void 0:f.prop)==null?void 0:g.split(ct.value))==null?void 0:y.length)-1]);n(f.children,E)}})}))}function n(t,i=""){t==null||t.forEach(s=>{var f,l,c,o,u,x,h,p,d,m,g,y;if(!(s!=null&&s.children)||s.children.length===0)s.prop=i===""?s==null?void 0:s.prop:i+ct.value+((o=(f=s==null?void 0:s.prop)==null?void 0:f.split(ct.value))==null?void 0:o[((c=(l=s==null?void 0:s.prop)==null?void 0:l.split(ct.value))==null?void 0:c.length)-1]),a.push(s.prop);else{let v=i===""?i+((p=(u=s==null?void 0:s.prop)==null?void 0:u.split(ct.value))==null?void 0:p[((h=(x=s==null?void 0:s.prop)==null?void 0:x.split(ct.value))==null?void 0:h.length)-1]):i+ct.value+((y=(d=s==null?void 0:s.prop)==null?void 0:d.split(ct.value))==null?void 0:y[((g=(m=s==null?void 0:s.prop)==null?void 0:m.split(ct.value))==null?void 0:g.length)-1]);n(s.children,v)}})}return r(e),a},Gh=(e,a,r)=>{var t;let n=(t=H.cloneDeep(e))==null?void 0:t.map(i=>(i=i.filter(s=>!(s!=null&&s.id)),i));return n=n==null?void 0:n.map(i=>{var s;return i=(s=i.map((f,l)=>{let c={};if(r!=null&&r.find(o=>o===a[l]))return c[a[l]]=f,c}))==null?void 0:s.filter(f=>f),i}),n},Xh=(e,a)=>{var s,f;const r=H.cloneDeep(e),n=(s=r==null?void 0:r.find(l=>(l==null?void 0:l.key)==="header"))==null?void 0:s.contents,t=(f=r==null?void 0:r.find(l=>(l==null?void 0:l.key)==="tableContents"))==null?void 0:f.contents;return Gh(t,Ts(n).slice(0,Ts(n).length-1),a)},$h=e=>{let a={};return e==null||e.forEach(r=>{a[r.key]=r.value}),a},df=(e,a)=>{const r=a;return e==null?void 0:e.map(n=>{var i;let t=n;if(!Array.isArray(t)){let s=[];for(let f in t)s.push({key:f,value:t==null?void 0:t[f]});return s}return n=(i=t==null?void 0:t.map((s,f)=>{var l,c;return s!=null&&s.id?{key:"id",value:s==null?void 0:s.id}:r!=null&&r.find(o=>o==null?void 0:o.id)||t!=null&&t.find(o=>o==null?void 0:o.id)?{key:(l=r[f-1])==null?void 0:l.label,value:s}:{key:(c=r[f])==null?void 0:c.label,value:s}}))==null?void 0:i.filter(s=>s.key!=="操作"),n})},Kh=async e=>{var r,n,t,i;let a="";if((n=(r=H.cloneDeep(e))==null?void 0:r.split("/"))==null||n.forEach((s,f)=>{var l,c;f!==((c=(l=H.cloneDeep(e))==null?void 0:l.split("/"))==null?void 0:c.length)-1&&(a=a===""?a+s:a+"/"+s)}),a!==""){let s="";const f=await Tn(a,sessionStorage.getItem("systemKey"),"");(i=(t=f==null?void 0:f[0])==null?void 0:t.compData)==null||i.forEach(l=>{var c;(l==null?void 0:l.key)==="tableContents"&&((c=l==null?void 0:l.contents)==null||c.forEach((o,u)=>{if(u===0){let x=o==null?void 0:o.filter(h=>!(h!=null&&h.id));s=a+"/"+(x==null?void 0:x[0])}}))}),await Nf(s,e)}},Xt=e=>{try{return JSON.parse(e),!0}catch{return!1}},zh=H.useLoginState(H.pinia),{loginUserInfo:ls}=H.storeToRefs(zh),Vh=H.useUnit(H.pinia),{chooseTitle:Dc}=H.storeToRefs(Vh),jh=H.useMenuState(),{activeMenuPath:Vt}=H.storeToRefs(jh),V0=[{key:"@MaxRowNum",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1}],Yh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Jh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},qh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Zl=(e,a,r)=>{let n;return n=e==null?void 0:e.map(t=>{var i;return a!=null&&a.find(s=>{var f;return((f=t==null?void 0:t.prop)==null?void 0:f.includes("."+s))||(t==null?void 0:t.prop)===s})&&(t.menuId=r),t.relatedValueId=!0,t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&(t.children=Zl(t.children,a,r)),t}),n},Zh=(e,a,r)=>{var i,s,f,l,c;let n;Xt(e)?n=JSON.parse(e):n=JSON.parse((l=(f=(s=(i=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:i.replaceAll("““","“"))==null?void 0:s.replaceAll("“",'"'))==null?void 0:f.replaceAll(':",',':"",'))==null?void 0:l.replaceAll(':"}',':""}'));let t;return(a==null?void 0:a[0])==="["?t=(c=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:c.split(","):t=a==null?void 0:a.split(","),n=n==null?void 0:n.map(o=>(o=o==null?void 0:o.map(u=>{var x;return(u==null?void 0:u.key)==="header"&&(u.contents=(x=u.contents)==null?void 0:x.map((h,p)=>{var d,m,g,y,v,E;if(Array.isArray(h)){let w=(g=(m=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:m[((d=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:d.length)-1])==null?void 0:g.contents;h=Zl(h,t,w)}else t!=null&&t.find(w=>w===(h==null?void 0:h.prop))&&(h.menuId=(E=(v=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:v[((y=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:y.length)-1])==null?void 0:E.contents,h.directiveLabel="#isMain"),h.relatedValueId=!0;return h})),u}),o)),n},mf=e=>{let a=e;if(a!=null&&a.every(r=>Array.isArray(r))){let r=[];const n=t=>{t==null||t.forEach(i=>{var s;i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?n(i==null?void 0:i.children):r.push(i)})};return n(a==null?void 0:a[0]),r}else return a},Qh=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},e1=(e,a,r)=>{var t,i,s,f;let n;return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},r1=(e,a,r)=>{let n;Xt(e)?n=JSON.parse(e):n=e;let t=a;if((a==null?void 0:a[0])!=="("&&(t="("+a+")"),t.slice(1,(t==null?void 0:t.length)-1)==="undefined")return n;let i=ql(t);if((i==null?void 0:i.length)>0){let s=[];i==null||i.forEach(f=>{var c,o,u,x,h,p;let l={};for(let d in f){let m=H.cloneDeep(d);if(!(m!=null&&m.includes("[")))if(((c=f[d])==null?void 0:c.toUpperCase())==="@LOGINUSER")l[m]=(o=ls.value)!=null&&o.account?(u=ls.value)==null?void 0:u.account:((x=ls.value)==null?void 0:x.姓名)??((h=ls.value)==null?void 0:h.账号);else if(!((p=f[d])!=null&&p.includes("[")))l[m]=f[d];else{let g="";n==null||n.forEach(y=>{var E,w;let v=(E=y==null?void 0:y.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:E.contents;v=(w=mf(v))==null?void 0:w.filter(S=>(S==null?void 0:S.label)!=="操作"),y=y==null?void 0:y.map(S=>{if((S==null?void 0:S.key)==="tableContents"){let B=df(S==null?void 0:S.contents,v),I=B==null?void 0:B.map(U=>{var L;return(L=U==null?void 0:U.find(W=>(W==null?void 0:W.key)===d))==null?void 0:L.value});I=[...new Set(I)],g=I}})}),l[m]=g}}s.push(l)}),n=n==null?void 0:n.map(f=>{var c,o;let l=(c=f==null?void 0:f.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:c.contents;return l=(o=mf(l))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作"),f=f==null?void 0:f.map(u=>{if((u==null?void 0:u.key)==="tableContents"){let h=df(u==null?void 0:u.contents,l);s==null||s.forEach(p=>{var d,m;for(let g in p)!((d=h==null?void 0:h[0])!=null&&d.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))&&!(h!=null&&h.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))||(((m=p[g])==null?void 0:m[0])!=="!"?h=h==null?void 0:h.filter(y=>{var v,E;return((v=y==null?void 0:y.find(w=>{var S;return(w==null?void 0:w.key)===g||((S=w==null?void 0:w.key)==null?void 0:S.includes(g))}))==null?void 0:v.value)===p[g]&&!Array.isArray(p==null?void 0:p[g])||Array.isArray(p==null?void 0:p[g])&&((E=p==null?void 0:p[g])==null?void 0:E.find(w=>{var S;return((S=y==null?void 0:y.find(T=>{var B;return(T==null?void 0:T.key)===g||((B=T==null?void 0:T.key)==null?void 0:B.includes(g))}))==null?void 0:S.value)===w}))}):h=h==null?void 0:h.filter(y=>{var v;return((v=y==null?void 0:y.find(E=>{var w;return(E==null?void 0:E.key)===g||((w=E==null?void 0:E.key)==null?void 0:w.includes(g))}))==null?void 0:v.value)!==p[g]}))}),(h==null?void 0:h.length)===0?u.contents=[]:u.contents=h==null?void 0:h.map(p=>{let d={};return p==null||p.forEach(m=>{d[m==null?void 0:m.key]=m==null?void 0:m.value}),d})}return u}),f})}return n},a1=(e,a,r)=>{var t,i,s,f;let n=[];return Xt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),a.toUpperCase()==="ALL"||a.toUpperCase()==="NONE"||(n=n==null?void 0:n.map(l=>(l=l==null?void 0:l.map(c=>{var o;return(c==null?void 0:c.key)==="tableContents"&&(c.contents=(o=c.contents)==null?void 0:o.slice(0,parseInt(a))),c}),l))),n},t1=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},n1=(e,a,r=0)=>{let n=r;const t=(i,s,f)=>{let l;return l=i==null?void 0:i.map(c=>{var o;return!(c!=null&&c.children)&&n===0?(n=n+1,c.menuId=s):c.relatedValueId=!0,c.relatedValueId=!0,c!=null&&c.children&&((o=c==null?void 0:c.children)==null?void 0:o.length)>0&&(c.children=t(c.children,s)),c}),l};return t(e,a)},i1=async(e,a,r)=>{var n,t,i,s,f,l,c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_;if(a==="Sequence")return JSON.parse((s=(i=(t=(n=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:n.replaceAll("““","“"))==null?void 0:t.replaceAll("“",'"'))==null?void 0:i.replaceAll(':",',':"",'))==null?void 0:s.replaceAll(':"}',':""}'));if(a==="Auto"){let A=[];Xt(e)?A=JSON.parse(e):A=JSON.parse((o=(c=(l=(f=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:f.replaceAll("““","“"))==null?void 0:l.replaceAll("“",'"'))==null?void 0:c.replaceAll(':",',':"",'))==null?void 0:o.replaceAll(':"}',':""}'));const D=await ca.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:((h=(x=(u=Vt==null?void 0:Vt.value)==null?void 0:u.split("/"))==null?void 0:x.filter((X,re)=>{var ee,Q;return re!==((Q=(ee=Vt==null?void 0:Vt.value)==null?void 0:ee.split("/"))==null?void 0:Q.length)-1}))==null?void 0:h.join(""))+"/"}});let b;return(g=(p=r==null?void 0:r.split("["))==null?void 0:p[0])!=null&&g.includes((m=(d=Dc.value)==null?void 0:d[0])==null?void 0:m.parentContent)&&(b=(v=(y=Dc.value)==null?void 0:y[0])==null?void 0:v.value),!b&&((w=(E=D==null?void 0:D.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(b=(I=(S=Vt==null?void 0:Vt.value)==null?void 0:S.split("/"))==null?void 0:I[((B=(T=Vt==null?void 0:Vt.value)==null?void 0:T.split("/"))==null?void 0:B.length)-1]),A=A==null?void 0:A.map(X=>(X=X==null?void 0:X.map(re=>{var Q,q,we,P,Pe,Ie,je,Le;let ee=(q=(Q=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Q.contents)==null?void 0:q.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain");return(ee==null?void 0:ee.length)===0&&Array.isArray((P=(we=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:we.contents)==null?void 0:P[0])&&(ee=(je=(Ie=(Pe=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Ie[0])==null?void 0:je.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain")),(re==null?void 0:re.key)==="tableContents"&&b&&b!==""&&(re.contents=(Le=re.contents)==null?void 0:Le.filter(ie=>ee==null?void 0:ee.some(ur=>(ie==null?void 0:ie[ur==null?void 0:ur.label])===b))),re}),X)),A}else{let A=[];if(Xt(e)?A=JSON.parse(e):A=JSON.parse((M=(W=(L=(U=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:U.replaceAll("““","“"))==null?void 0:L.replaceAll("“",'"'))==null?void 0:W.replaceAll(':",',':"",'))==null?void 0:M.replaceAll(':"}',':""}')),a.toUpperCase()==="MANUAL"){if(!((ne=(se=A==null?void 0:A[0])==null?void 0:se.find(b=>(b==null?void 0:b.key)==="contentTableId"))!=null&&ne.contents))return A;let D=await ca.getInsofDataApi({id:(Te=(z=(he=A==null?void 0:A[0])==null?void 0:he.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:z[((be=(ce=A==null?void 0:A[0])==null?void 0:ce.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:be.length)-1])==null?void 0:Te.contents});D=(_=(Ae=D==null?void 0:D.data)==null?void 0:Ae.result)==null?void 0:_[0],A=A==null?void 0:A.map(b=>(b=b==null?void 0:b.map(X=>{var re,ee;return(X==null?void 0:X.key)==="header"&&(re=X.contents)!=null&&re.some(Q=>!(Q!=null&&Q.menuId))&&(X.contents=(ee=X.contents)==null?void 0:ee.map((Q,q)=>{var P,Pe,Ie,je,Le,ie,ur;let we=(Ie=(Pe=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Pe[((P=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:P.length)-1])==null?void 0:Ie.contents;return Array.isArray(Q)&&((je=vn(Q==null?void 0:Q[0]))!=null&&je.every(ir=>!(ir!=null&&ir.menuId)))?Q=n1(Q,we):((Q==null?void 0:Q.directiveLabel)==="#isMain"&&(Q.menuId=(ur=(ie=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:ie[((Le=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Le.length)-1])==null?void 0:ur.contents),Q.relatedValueId=!0),Q})),X}),b))}else A=A==null?void 0:A.map(D=>(D=D==null?void 0:D.map(b=>((b==null?void 0:b.key)==="tableContents"&&(b.contents=t1(b.contents)),b)),D));return A}},Ci=(e,a)=>Array.isArray(e)?e==null?void 0:e.map(n=>{var t,i,s,f,l,c,o;if(Array.isArray(n)?n=n:n=[n],(t=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&t.every(u=>typeof u!="object"||u===null))return n;if((i=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&i.some(u=>Array.isArray(u)))return n;{let u=[],x=(n==null?void 0:n.find(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))??{id:(s=n==null?void 0:n[0])==null?void 0:s.id};if(u.push(x),Array.isArray(a==null?void 0:a[0])){const h=(f=n==null?void 0:n.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))==null?void 0:f[0];(l=vn(H.cloneDeep(a==null?void 0:a[0])))==null||l.forEach(p=>{u.push(h==null?void 0:h[(p==null?void 0:p.prop)??(p==null?void 0:p.label)??p])})}else{const h=(c=n==null?void 0:n.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))==null?void 0:c[0];(o=vn(H.cloneDeep(a)))==null||o.forEach(p=>{u.push(h==null?void 0:h[(p==null?void 0:p.prop)??(p==null?void 0:p.label)??p])})}return u}}):void 0,d0=(e,a)=>{let r={};return Array.isArray(e)?e!=null&&e.find(n=>n==null?void 0:n.id)?(e==null?void 0:e.length)>1?e==null||e.forEach((n,t)=>{a!=null&&a[t-1]&&!(n!=null&&n.id)?r[a[t-1]]=n:n!=null&&n.id&&(r.id=n==null?void 0:n.id)}):r=e==null?void 0:e[0]:e==null||e.forEach((n,t)=>{a!=null&&a[t]&&(r[a[t]]=n)}):(a==null||a.forEach(n=>{r[n]=e==null?void 0:e[n]}),r.id=e==null?void 0:e.id),r},Ql=H.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),s1=H.useMenuState(H.pinia),{activeMenuPath:Vw}=H.storeToRefs(s1),f1=H.useLoginState(H.pinia),{structureData:c1,loginUserInfo:jw}=H.storeToRefs(f1),l1=Ql(H.pinia),{routerPageStructures:o1}=H.storeToRefs(l1);H.useModelComp(H.pinia);Kr.ref([{label:"角色名称",value:"",name:"roleName"}]);Kr.ref([{label:"查询"},{label:"重置"}]);Kr.reactive({isFilter:!1,filterForm:{}});Kr.ref(!1);const u1=Kr.ref([]),h1=Kr.ref([]),x1=Kr.ref("");Kr.computed(()=>{var a,r,n,t,i;const e=(a=o1.value)==null?void 0:a.find(s=>{var f;return((f=s==null?void 0:s.comp)==null?void 0:f.toUpperCase())==="TABLE"});if(e){x1.value=e.name,h1.value=(t=(n=(r=e==null?void 0:e.compData)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:n.contents)==null?void 0:t.filter(f=>(f==null?void 0:f.label)!=="操作");const s=(i=e==null?void 0:e.compData)==null?void 0:i.map(f=>{var l;if((f==null?void 0:f.key)==="rowButton"){let c=[];return F1.value?c=[...f==null?void 0:f.contents,{label:"授权"}]:c=f==null?void 0:f.contents,{...f,contents:c}}return(f==null?void 0:f.key)==="header"?{...f,contents:(l=f==null?void 0:f.contents)==null?void 0:l.map(c=>{var o,u;return{...c,isTableColHidden:(o=c==null?void 0:c.prop)==null?void 0:o.includes("授权"),isFormColHidden:(u=c==null?void 0:c.prop)==null?void 0:u.includes("授权")}})}:f});return _1(s),s}return[]});Kr.ref({});const p1=Kr.ref(),eo=e=>e==null?void 0:e.map(a=>{var n;const r={...a,checkedButtons:[]};return r.children&&((n=r.children)==null?void 0:n.length)>0&&(r.children=eo(r.children)),r}),d1=e=>{for(const a in e)if(Array.isArray(e[a]))return a;return""},m1=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,g1=(e,a)=>{const r={},n=Array.isArray(e)?e==null?void 0:e.filter(t=>{var i;return!(m1(t)&&((i=Object.keys(t))!=null&&i.includes("id")))}):null;return n&&(n==null||n.forEach((t,i)=>{var s;r[(s=a[i])==null?void 0:s.prop]=t})),r},v1=Kr.ref(""),_1=e=>{var i;const a=e==null?void 0:e.find(s=>(s==null?void 0:s.key)==="tableContents"),r=e==null?void 0:e.find(s=>(s==null?void 0:s.key)==="header");if(!a||!r)return"";const n=(i=a==null?void 0:a.contents)==null?void 0:i[0],t=g1(n,r==null?void 0:r.contents);v1.value=d1(t)};Kr.ref();const y1=Kr.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0});Kr.ref(0);const Ic=Kr.ref([]);Kr.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]);const bc=Kr.ref([]);Kr.watch(()=>bc.value.length,()=>{var e;(e=p1.value)==null||e.setCheckedKeys([...bc.value])});Kr.watch(()=>y1.show,e=>{e||(Ic.value=eo(Ic.value))});Kr.computed(()=>{var r;const e=(r=H.cloneDeep(c1.value))==null?void 0:r.filter(n=>{var t,i;return((i=(t=n==null?void 0:n.key)==null?void 0:t.pageKey)==null?void 0:i.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(n=>{var s,f,l,c,o,u,x,h;const t=/button/i;let i=(l=(f=(s=n==null?void 0:n.value)==null?void 0:s.pageData)==null?void 0:f.compData)==null?void 0:l.filter(p=>t.test(p==null?void 0:p.key));return i=Array.from(new Set(i==null?void 0:i.flatMap(p=>p.contents.map(d=>d.label)))),{path:(o=(c=n==null?void 0:n.key)==null?void 0:c.pageKey)!=null&&o.startsWith("/")?(x=(u=n==null?void 0:n.key)==null?void 0:u.pageKey)==null?void 0:x.substring(1):(h=n==null?void 0:n.key)==null?void 0:h.pageKey,buttons:i}}),...k1.value]});const k1=Kr.ref([]);u1.value;const ro=H.useLoginState(H.pinia),{superAdminInfo:Yw,cryptoInfo:Jw,loginUserInfo:qw}=H.storeToRefs(ro),E1=H.useMenuState(H.pinia),{activeMenuPath:T1}=H.storeToRefs(E1),Cc=H.useModelComp(H.pinia),w1="123456",S1=Ql(H.pinia),{routerPageStructures:A1}=H.storeToRefs(S1);Kr.ref(0);Kr.ref([{label:"用户名称",value:"",name:"userName"}]);const F1=Kr.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),D1=Kr.ref([]),I1=Kr.ref(""),b1=Kr.computed(()=>{var a,r,n,t,i;const e=(a=A1.value)==null?void 0:a.find(s=>{var f;return((f=s==null?void 0:s.comp)==null?void 0:f.toUpperCase())==="TABLE"});return e?(I1.value=e.name,D1.value=(t=(n=(r=e==null?void 0:e.compData)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:n.contents)==null?void 0:t.filter(f=>(f==null?void 0:f.label)!=="操作"),(i=e==null?void 0:e.compData)==null?void 0:i.map(f=>{var l;if((f==null?void 0:f.key)==="rowButton"){const c=[...f==null?void 0:f.contents,{label:"重置密码"}];return{...f,contents:c}}return(f==null?void 0:f.key)==="header"?{...f,contents:(l=f==null?void 0:f.contents)==null?void 0:l.map(c=>{var o,u,x,h;return{...c,isTableColHidden:((o=c==null?void 0:c.prop)==null?void 0:o.includes("头像"))||((u=c==null?void 0:c.prop)==null?void 0:u.includes("签名")),isFormColHidden:((x=c==null?void 0:c.prop)==null?void 0:x.includes("头像"))||((h=c==null?void 0:c.prop)==null?void 0:h.includes("签名"))}})}:f})):[]});Kr.ref();const C1=async(e,a,r)=>{var n,t;try{const i=await e(a);return((n=i==null?void 0:i.data)==null?void 0:n.code)===200?(r!=="查询"&&await ro.setLogRecordAsync({type:r,data:a},T1.value),K0.ElMessage.success("保存成功"),Cc.setRefreshCurStructure(!0),i.data.result||((t=i==null?void 0:i.data)==null?void 0:t.code)===200):null}catch(i){K0.ElMessage.error(i)}finally{Cc.setCacheUpdatingData(null)}};b1.value;const c0=H.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),O1=H.useModelComp(H.pinia),{routeToChildPath:Oc}=H.storeToRefs(O1),R1=H.useLoginState(H.pinia),{loginUserInfo:Rc,cryptoInfo:Zw}=H.storeToRefs(R1),N1=c0(H.pinia),{originalPath:Nc}=H.storeToRefs(N1),P1=async(e,a)=>{const r=sessionStorage.getItem("authority"),n=JSON.parse(r||"");if(Array.isArray(n)){let t;Oc.value?t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>(f==null?void 0:f.includes(e))||(f==null?void 0:f.includes(Oc.value)))):t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>f==null?void 0:f.includes(e)));const i=t==null?void 0:t.map(f=>{var l;return((l=f==null?void 0:f.split("/"))==null?void 0:l.pop())||""});return a==null?void 0:a.map(f=>{var l;return{...f,compData:(l=f==null?void 0:f.compData)==null?void 0:l.map(c=>{var o;return(c==null?void 0:c.key)==="rowButton"||(c==null?void 0:c.key)==="extraButton"?{...c,contents:(o=c==null?void 0:c.contents)==null?void 0:o.filter(u=>i==null?void 0:i.includes(u==null?void 0:u.label))}:c})}})}else return typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?a:[]},M1=(e,a)=>{var i,s,f,l;const r=(s=(i=a["系统管理/角色管理"])==null?void 0:i.filter(c=>{var o;return((o=c==null?void 0:c.key)==null?void 0:o.type)==="data"}))==null?void 0:s.map(c=>c.value.tableData),n=(l=(f=e==null?void 0:e.value)==null?void 0:f.tableData)==null?void 0:l.角色名称,t=r==null?void 0:r.find(c=>(c==null?void 0:c.角色名称)===n);return t==null?void 0:t.数据范围};var Es=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(Es||{});const ao=(e,a,r)=>{var s,f,l,c;if(((l=(f=(s=Rc.value)==null?void 0:s.key)==null?void 0:f.layer)==null?void 0:l.toUpperCase())==="SUPERADMIN"||!r)return e;const n=(c=r==null?void 0:r["系统管理/用户管理"])==null?void 0:c.find(o=>{var u;return(o==null?void 0:o.id)===((u=Rc.value)==null?void 0:u.id)}),t=M1(n,r);if(!t)return e;switch(Es==null?void 0:Es[t]){case 0:return e;case 1:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var d,m,g,y,v,E,w,S,T;const h=x==null?void 0:x[1],p=u[(u==null?void 0:u.length)-1]===Nc.value;return((m=(d=h==null?void 0:h.key)==null?void 0:d.createUserLayer)==null?void 0:m.toUpperCase())==="SUPERADMIN"||((g=h==null?void 0:h.key)==null?void 0:g.createUserOrg)===((v=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:v.部门名称)||((E=h==null?void 0:h.key)==null?void 0:E.createUserOrg)===((S=(w=n==null?void 0:n.value)==null?void 0:w.tableData)==null?void 0:S.部门名称)&&((T=h==null?void 0:h.key)==null?void 0:T.createUserId)===(n==null?void 0:n.id)||p})):e==null?void 0:e.filter(o=>{var u,x,h,p,d,m,g,y,v;return((x=(u=o==null?void 0:o.key)==null?void 0:u.createUserLayer)==null?void 0:x.toUpperCase())==="SUPERADMIN"||((h=o==null?void 0:o.key)==null?void 0:h.createUserOrg)===((d=(p=n==null?void 0:n.value)==null?void 0:p.tableData)==null?void 0:d.部门名称)||((m=o==null?void 0:o.key)==null?void 0:m.createUserOrg)===((y=(g=n==null?void 0:n.value)==null?void 0:g.tableData)==null?void 0:y.部门名称)&&((v=o==null?void 0:o.key)==null?void 0:v.createUserId)===(n==null?void 0:n.id)});case 2:break;case 3:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var d;const h=x==null?void 0:x[1],p=u[(u==null?void 0:u.length)-1]===Nc.value;return((d=h==null?void 0:h.key)==null?void 0:d.createUserId)===(n==null?void 0:n.id)||p})):e==null?void 0:e.filter(o=>{var u;return((u=o==null?void 0:o.key)==null?void 0:u.createUserId)===(n==null?void 0:n.id)})}},L1=H.useModelComp(H.pinia),{routeToChildPath:dn}=H.storeToRefs(L1),Dn=H.useMenuState(H.pinia),{activeMenuPath:r0}=H.storeToRefs(Dn),Fi=H.useLoginState(),{loginUserInfo:Na}=H.storeToRefs(Fi),B1=c0(H.pinia),{originalPath:U1}=H.storeToRefs(B1),lt=U1.value,W1=e=>{const a=/^name(\d+)$/,r=e==null?void 0:e.map(t=>{const i=[];for(const s in t){const f=s.match(a);f&&i.push({idx:Number(f[1]),value:t[s]})}return!i.length&&t.name&&i.push({idx:-1,value:t.name}),i.sort((s,f)=>s.idx-f.idx),{item:t,names:i}});function n(t,i){if(!t)return[];let s=[];const f=[];t.forEach(x=>{var h;return(((h=x.names)==null?void 0:h.length)>i?s:f).push(x)});const l=f.map(x=>x.item),c=new Map;s=s==null?void 0:s.sort((x,h)=>{var p,d;return((p=x==null?void 0:x.item)==null?void 0:p.orderId)-((d=h==null?void 0:h.item)==null?void 0:d.orderId)});for(const x of s){const h=x.names[x.names.length-i-1].value;c.has(h)||c.set(h,[]),c.get(h).push(x)}return[...Array.from(c.keys()).map(x=>{var m,g,y,v;const h=c.get(x);if(h[0].names.length===1&&(h!=null&&h.every(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)===-1})))return h[0].item;let p=h==null?void 0:h.filter(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)!==-1}),d=new Map;return p==null||p.forEach(E=>{let w=E==null?void 0:E.item,S="";for(let T in w)T!=null&&T.includes("name")&&(S=S===""?w==null?void 0:w[T]:S+"/"+(w==null?void 0:w[T]));for(const[T,B]of d.entries())(T.includes(S)||S!=null&&S.includes(T))&&(S=T);d.set(S,E)}),p=Array.from(d.values()),{name:x,isShow:!0,comp:"ParentItem",children:(m=n(p,i+1))==null?void 0:m.sort((E,w)=>(E==null?void 0:E.orderId)-(w==null?void 0:w.orderId)),orderId:(v=(y=(g=n(p,i+1))==null?void 0:g.sort((E,w)=>((E==null?void 0:E.orderId)??0)-((w==null?void 0:w.orderId)??0)))==null?void 0:y[0])==null?void 0:v.orderId}}),...l]}if(r)return n(r,0)},H1=async e=>{let a=new WeakMap,r=e;return a!=null&&a[r0.value+"/"]||(r=e==null?void 0:e.map(n=>{var t;return Array.isArray(n==null?void 0:n.compData)&&(n.compData=(t=n.compData)==null?void 0:t.map(i=>{var s;return(i==null?void 0:i.key)==="header"&&(i.contents=(s=i.contents)==null?void 0:s.map(f=>((f==null?void 0:f.directiveLabel)==="#isMain"&&(f.directiveColor=!0),f))),i})),n})),r},G1=e=>{var f;let a=[],r=[],n=!1,t=!1,i=[],s="";for(const l of e||[]){if(l!=null&&l.choice&&(n=!0,i.push(l),i.length===1))for(const c in l)c!=null&&c.includes("nameContents")&&(s=((f=l[c])==null?void 0:f.length)>1?l[c][0]:"");l!=null&&l.tab&&(t=!0)}if(n){let l=Nh(i.map(o=>o==null?void 0:o.nameContents));l=parseInt(l);let c=i.map(o=>{var u,x;return((u=o==null?void 0:o.nameContents)==null?void 0:u[l+1])??((x=o==null?void 0:o.nameContents)==null?void 0:x[0])});c=[...new Set(c)],c=c==null?void 0:c.map(o=>({label:o,value:o})),r=[{comp:"Radio",compData:c,name:s,isShow:!0}]}if(t&&(e==null||e.forEach(l=>{if(!(l!=null&&l.tab))a.push(l);else if(a!=null&&a.find(c=>(c==null?void 0:c.tabInform)===(l==null?void 0:l.tab)))a=a==null?void 0:a.map(c=>{if((c==null?void 0:c.comp)==="Tabs"&&(c==null?void 0:c.tabInform)===(l==null?void 0:l.tab)){let o=c.compData,{tab:u,...x}=l;x.label=x==null?void 0:x.name,x.name="",o.push(x),c.compData=o}return c});else{let{tab:c,...o}=l,u=o==null?void 0:o.name0;o.label=o==null?void 0:o.name,o.name="";let x={comp:"Tabs",name:u,tabInform:l==null?void 0:l.tab,compData:[o],choices:l==null?void 0:l.choice};a.push(x)}})),(a==null?void 0:a.length)===0&&(r==null?void 0:r.length)===0)return e;if((r==null?void 0:r.length)===0)return a;if((a==null?void 0:a.length)===0){let l=e==null?void 0:e.findIndex(c=>(c==null?void 0:c.choice)??(c==null?void 0:c.choices));return e.splice(l,0,r==null?void 0:r[0]),e=e==null?void 0:e.map((c,o)=>{if(o>l){let u={};for(let x in c)x!=null&&x.includes("name")||(u[x]=c==null?void 0:c[x]);u.choiceName=c!=null&&c.name1?c==null?void 0:c.name0:c==null?void 0:c.name,c=u}return c}),e}else{let l=a==null?void 0:a.findIndex(c=>(c==null?void 0:c.choice)??(c==null?void 0:c.choices));return a.splice(l,0,r==null?void 0:r[0]),a=a==null?void 0:a.map((c,o)=>{if(o>l){let u={};for(let x in c)x!=null&&x.includes("name")||(u[x]=c==null?void 0:c[x]);u.choiceName=c!=null&&c.name1?c==null?void 0:c.name0:c==null?void 0:c.name,c=u}return c}),a}},X1=async e=>{let a=e;return a=a==null?void 0:a.filter(r=>r),a=G1(a),a!=null&&a.every(r=>{var n,t;return((t=(n=Object.keys(r))==null?void 0:n.filter(i=>i==null?void 0:i.includes("name")))==null?void 0:t.length)===1})?a:W1(a)},$1=async()=>{var i,s,f,l,c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka,Se,Ne,Be,Ta,Qe,br,me,Fr,Or,hr;Dn.setImportLoading(!0);let e="";const a=await ca.getInsofDataApi({key:{type:"structure",pageKey:H.cloneDeep(dn).value,systemKey:sessionStorage.getItem("systemKey")}});if(((s=(i=a==null?void 0:a.data)==null?void 0:i.result)==null?void 0:s.length)>0){let kr=(h=(x=(u=(o=(c=(l=(f=a==null?void 0:a.data)==null?void 0:f.result)==null?void 0:l[0])==null?void 0:c.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x.find(xa=>(xa==null?void 0:xa.key)==="header"))==null?void 0:h.contents;e=(d=(p=H.cloneDeep(kr))==null?void 0:p[0])==null?void 0:d.label}let r=r0.value;(y=r0.value)!=null&&y.includes(`updateLoading${((m=Na.value)==null?void 0:m.account)||((g=Na.value)==null?void 0:g.账号)}`)?r=H.cloneDeep(r0).value:(w=r0.value)!=null&&w.includes(`loading${((v=Na.value)==null?void 0:v.account)||((E=Na.value)==null?void 0:E.账号)}`)&&(r=H.cloneDeep(dn).value+lt+`loading${((S=Na.value)==null?void 0:S.account)||((T=Na.value)==null?void 0:T.账号)}`);const n=await ca.getInsofDataApi({key:{pageKey:r,systemKey:sessionStorage.getItem("systemKey")}});let t=[];if(((I=(B=n==null?void 0:n.data)==null?void 0:B.result)==null?void 0:I.length)>0){let kr="",xa=[];(L=(U=n==null?void 0:n.data)==null?void 0:U.result)==null||L.forEach(We=>{var zr,na,wa,ha,fr;((na=(zr=We==null?void 0:We.value)==null?void 0:zr.pageData)==null?void 0:na.comp)==="Form"&&((fr=(ha=(wa=We==null?void 0:We.value)==null?void 0:wa.pageData)==null?void 0:ha.compData)==null||fr.forEach(wr=>{(wr==null?void 0:wr.key)==="formContent"&&(xa=[...xa,...wr==null?void 0:wr.contents])}))});let aa=xa==null?void 0:xa.find(We=>(We==null?void 0:We.isMain)===!0);if(aa?(kr=aa==null?void 0:aa.value,e=aa==null?void 0:aa.key):kr=(Te=(z=(be=(ce=(he=(ne=(se=(M=(W=n==null?void 0:n.data)==null?void 0:W.result)==null?void 0:M[0])==null?void 0:se.value)==null?void 0:ne.pageData)==null?void 0:he.compData)==null?void 0:ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:be.contents)==null?void 0:z.find(We=>{var zr,na;return(We==null?void 0:We.key)===e||((na=(zr=We==null?void 0:We.optionUrl)==null?void 0:zr.groupSelect)==null?void 0:na[1])===e}))==null?void 0:Te.value,(A=r0.value)!=null&&A.includes(`updateLoading${((Ae=Na.value)==null?void 0:Ae.account)||((_=Na.value)==null?void 0:_.账号)}`)){let We=[],zr=[];const na=await ca.getInsofDataApi({key:{pageKey:(Ie=r0.value.split(lt+`updateLoading${((P=Na.value)==null?void 0:P.account)||((Pe=Na.value)==null?void 0:Pe.账号)}`))==null?void 0:Ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Le=(je=na==null?void 0:na.data)==null?void 0:je.result)==null?void 0:Le.length)>0){let wa=(ie=n==null?void 0:n.data)==null?void 0:ie.result,ha=(ur=H.cloneDeep(wa))==null?void 0:ur.map(async fr=>{var wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F;if(((wr=fr==null?void 0:fr.key)==null?void 0:wr.type)==="structure"){let C=(st=(Ua=(Ba=(Oa=fr==null?void 0:fr.value)==null?void 0:Oa.pageData)==null?void 0:Ba.compData)==null?void 0:Ua.find(O=>(O==null?void 0:O.key)==="parentFormPath"))==null?void 0:st.contents;if(C){let O=await Tn(C,sessionStorage.getItem("systemKey"),""),R=(Rt=(_t=(Ot=(Ct=fr==null?void 0:fr.value)==null?void 0:Ct.pageData)==null?void 0:Ot.compData)==null?void 0:_t.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Rt.contents,K=O==null?void 0:O.filter(Y=>(Y==null?void 0:Y.comp)==="Form");K==null||K.forEach(Y=>{var V;(V=Y==null?void 0:Y.compData)==null||V.forEach(j=>{var J,le;if((j==null?void 0:j.key)==="formContent"&&((J=j==null?void 0:j.contents)==null?void 0:J.some(Ee=>R==null?void 0:R.find(ue=>(ue==null?void 0:ue.prop)===(Ee==null?void 0:Ee.prop))))){let Ee=Y;Ee.compData=(le=Ee.compData)==null?void 0:le.map(ge=>{var qe;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(qe=ge.contents)==null?void 0:qe.map(Er=>{var Mr;return R!=null&&R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop))&&(Er.value=(Mr=R==null?void 0:R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop)))==null?void 0:Mr.value),Er})),ge});let ue={};for(let ge in Ee)ge!=="id"&&(ue[ge]=Ee[ge]);t.push({id:Y==null?void 0:Y.id,value:{pageData:ue}})}})})}else if((Pt=(Nt=na==null?void 0:na.data)==null?void 0:Nt.result)!=null&&Pt.find(O=>{var R,K,Y,V;return((K=(R=O==null?void 0:O.value)==null?void 0:R.pageData)==null?void 0:K.name)===((V=(Y=fr==null?void 0:fr.value)==null?void 0:Y.pageData)==null?void 0:V.name)})){let O=fr==null?void 0:fr.key;O.pageKey=H.cloneDeep(dn).value+lt+kr,t.push({id:(F=(N=(k=na==null?void 0:na.data)==null?void 0:k.result)==null?void 0:N.find(R=>{var K,Y,V,j;return((Y=(K=R==null?void 0:R.value)==null?void 0:K.pageData)==null?void 0:Y.name)===((j=(V=fr==null?void 0:fr.value)==null?void 0:V.pageData)==null?void 0:j.name)}))==null?void 0:F.id,key:O,value:fr==null?void 0:fr.value})}else{let O=fr==null?void 0:fr.key;O.pageKey=H.cloneDeep(dn).value+lt+kr,We.push({key:O,value:fr==null?void 0:fr.value})}}});await Promise.all(ha),(ka=(ir=n==null?void 0:n.data)==null?void 0:ir.result)==null||ka.forEach(fr=>{var Oa,Ba,Ua;let wr=(Oa=H.cloneDeep(fr))==null?void 0:Oa.key;wr.pageKey=H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((Ba=Na.value)==null?void 0:Ba.account)||((Ua=Na.value)==null?void 0:Ua.账号)}`,Dn.setChildMenu(wr.pageKey),t.push({id:fr==null?void 0:fr.id,key:wr})})}if(kr===""){K0.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Dn.setImportLoading(!1);return}if((t==null?void 0:t.length)>0){await ca.batchUpdateInsofDataApi({dataList:t}),(Da=t==null?void 0:t[0])!=null&&Da.key&&await Fi.setLogRecordAsync({type:"保存",data:t},(Tt=t==null?void 0:t[0])==null?void 0:Tt.key),(We==null?void 0:We.length)>0&&(await ca.batchAddInsofDataApi({dataList:We}),(qa=We==null?void 0:We[0])!=null&&qa.key&&await Fi.setLogRecordAsync({type:"保存",data:We},(Ea=We==null?void 0:We[0])==null?void 0:Ea.key));const wa=await ca.getInsofDataApi({key:{pageKey:(Ne=r0.value.split(lt+`updateLoading${((Ka=Na.value)==null?void 0:Ka.account)||((Se=Na.value)==null?void 0:Se.账号)}`))==null?void 0:Ne[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ta=(Be=wa==null?void 0:wa.data)==null?void 0:Be.result)==null?void 0:Ta.length)>0){let ha=[],fr=(Qe=n==null?void 0:n.data)==null?void 0:Qe.result;(br=H.cloneDeep(fr))==null||br.forEach(wr=>{var Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N;if(((Oa=wr==null?void 0:wr.key)==null?void 0:Oa.type)!=="structure"){let F=(st=(Ua=(Ba=wa==null?void 0:wa.data)==null?void 0:Ba.result)==null?void 0:Ua.filter(K=>{var Y;return((Y=K==null?void 0:K.key)==null?void 0:Y.type)==="data"}))==null?void 0:st.map(K=>K==null?void 0:K.id);ha=[...ha,...F];let C=(Rt=(_t=(Ot=(Ct=H.cloneDeep(fr))==null?void 0:Ct.find(K=>{var Y;return((Y=wr==null?void 0:wr.key)==null?void 0:Y.tableId)===(K==null?void 0:K.id)}))==null?void 0:Ot.value)==null?void 0:_t.pageData)==null?void 0:Rt.name,O=(k=(Pt=(Nt=wa==null?void 0:wa.data)==null?void 0:Nt.result)==null?void 0:Pt.find(K=>{var Y,V;return((V=(Y=K==null?void 0:K.value)==null?void 0:Y.pageData)==null?void 0:V.name)===C}))==null?void 0:k.id,R=(N=H.cloneDeep(wr))==null?void 0:N.key;R.tableId=O,R.pageKey=H.cloneDeep(dn).value+lt+kr,zr.push({key:R,value:wr==null?void 0:wr.value})}}),(ha==null?void 0:ha.length)>0&&(ha=[...new Set(ha)],await ca.batchDeleteInsofDataApi({ids:ha})),(Fr=(me=n==null?void 0:n.data)==null?void 0:me.result)==null||Fr.forEach(wr=>{var Ba,Ua,st;let Oa=(Ba=H.cloneDeep(wr))==null?void 0:Ba.key;Oa.pageKey=H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((Ua=Na.value)==null?void 0:Ua.account)||((st=Na.value)==null?void 0:st.账号)}`,Dn.setChildMenu(Oa.pageKey),t.push({id:wr==null?void 0:wr.id,key:Oa})})}(zr==null?void 0:zr.length)>0&&(await ca.batchAddInsofDataApi({dataList:zr}),(Or=We==null?void 0:We[0])!=null&&Or.key&&await Fi.setLogRecordAsync({type:"保存",data:zr},(hr=zr==null?void 0:zr[0])==null?void 0:hr.key)),K0.ElMessage.success("保存成功")}}else{if((b=(D=n==null?void 0:n.data)==null?void 0:D.result)==null||b.forEach(We=>{var na;let zr=(na=H.cloneDeep(We))==null?void 0:na.key;zr.pageKey=H.cloneDeep(dn).value+lt+kr,Dn.setChildMenu(zr.pageKey),t.push({id:We==null?void 0:We.id,key:zr})}),kr===""){K0.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Dn.setImportLoading(!1),Dn.setChildMenu("");return}(X=t==null?void 0:t[0])!=null&&X.key&&(await ca.batchUpdateInsofDataApi({dataList:t}),await Fi.setLogRecordAsync({type:"保存",data:t},(re=t==null?void 0:t[0])==null?void 0:re.key)),await Nf(H.cloneDeep(dn).value+lt+kr,H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((ee=Na.value)==null?void 0:ee.account)||((Q=Na.value)==null?void 0:Q.账号)}`),Dn.setActiveMenuPath(H.cloneDeep(dn).value+lt+kr+lt+`updateLoading${((q=Na.value)==null?void 0:q.account)||((we=Na.value)==null?void 0:we.账号)}`),K0.ElMessage.success("保存成功")}}Dn.setImportLoading(!1)},K1=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&t[t.length-1]!==","&&t[t.length-1]===a?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,""))):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return n},Pc=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&(t[t.length-1]===":"&&t[t.length-2]!=="r"||t[t.length-1]===a)&&(t.match(/'/g)||[]).length%2===0?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),((t==null?void 0:t[(t==null?void 0:t.length)-1])===a||t[t.length-1]===":"&&t[t.length-2]!=="r")&&(t.match(/'/g)||[]).length%2===0&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Mc=(e,a)=>{let r=0;for(let n=0;n<e.length;n++)e[n]===a&&r++;return r%2===0},p0=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),H.cloneDeep(t).split("{").length-1===H.cloneDeep(t).split("}").length-1&&H.cloneDeep(t).split("【").length-1===H.cloneDeep(t).split("】").length-1&&H.cloneDeep(t).split("[").length-1===H.cloneDeep(t).split("]").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("(").length-1===H.cloneDeep(t).split(")").length-1&&H.cloneDeep(t).split("/*").length-1===H.cloneDeep(t).split("*/").length-1&&t[t.length-1]===a&&Mc(t,"'")?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&Mc(t,"'")&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},z1=c0(H.pinia),{originalPath:Qw}=H.storeToRefs(z1),V1=e=>{var r,n;let a=(n=(r=e==null?void 0:e.slice(1,(e==null?void 0:e.length)-1))==null?void 0:r.split(","))==null?void 0:n.map(t=>{var i,s,f,l,c;return(c=(l=(f=(s=(i=t==null?void 0:t.split("=="))==null?void 0:i[0])==null?void 0:s.replaceAll("'",""))==null?void 0:f.split("#"))==null?void 0:l[0])==null?void 0:c.trim()});return a=JSON.stringify(a),a},gf=e=>{let a=H.cloneDeep(e),r=[],n="",t="",i=(a==null?void 0:a[0])==="["?Pc(a.slice(1,a.length-1),","):Pc(a,",");return i==null||i.forEach((s,f)=>{var c,o,u,x,h,p,d,m;let l=s;if(l[l.length-1]===","&&(l=l.slice(0,l.length-1)),l.slice(1,(l==null?void 0:l.length)-1).includes("[")&&(l==null?void 0:l[0])==="["){let g=gf(l);if((i==null?void 0:i.length)===2&&((o=i==null?void 0:i[0])==null?void 0:o[((c=i==null?void 0:i[0])==null?void 0:c.length)-1])===":"){let y=i[f-1].replaceAll(",","").trim();y[y.length-1]===":"&&(y=y.slice(0,y.length-1));let v=(u=gf(l))==null?void 0:u.parentStringContent;v="["+((x=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1))==null?void 0:x.replaceAll("'",'"'))+"]";let E={[y]:v};r.push(E)}else t=t+l+",";n=n+(g==null?void 0:g.stringContent),t=t+(g==null?void 0:g.parentStringContent),r=[...r,...g==null?void 0:g.parentColumns]}else if((l==null?void 0:l[0])!=="["&&l[l.length-1]===":")l=l.slice(0,l.length-1),n=n+l+",",t=t+((h=l==null?void 0:l.split("#"))==null?void 0:h[0])+",";else if((l==null?void 0:l[0])==="["&&i[f-1]){(d=(p=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:p.split(","))==null||d.forEach(v=>{n=n+v+","});let g=i[f-1].replaceAll(",","").trim();g[g.length-1]===":"&&(g=g.slice(0,g.length-1));let y={[g]:V1(l)};r.push(y)}else n=n+l+",",t=t+((m=l==null?void 0:l.split("#"))==null?void 0:m[0])+","}),{parentColumns:r,stringContent:n,parentStringContent:t}},vf=H.useMenuState(H.pinia),{activeMenuPath:os}=H.storeToRefs(vf),j1=H.useUnit(H.pinia),{chooseTitle:Si}=H.storeToRefs(j1);let Ir="$R";const Y1=Us(H.pinia),{multipleTableConst:Lc}=H.storeToRefs(Y1),J1=H.useLoginState(H.pinia),{loginUserInfo:eS,systemInfo:Bc}=H.storeToRefs(J1),to=H.useModelComp(H.pinia),q1=c0(H.pinia),{originalPath:Z1}=H.storeToRefs(q1),{payloadTypes:rS}=H.storeToRefs(to),mn=(e,a)=>(a==null?void 0:a.split(",")).some(n=>Object.keys(e).some(t=>t.startsWith("name")&&e[t]===n)),Zs={onNumSlice:a1,onRandomContents:i1,onConditionContents:r1,onPaceContents:e1,onMainTagContents:Zh,onFatherPaceContents:Qh,onButtonContents:qh,onPamButtonContents:Jh,onRowButtonContents:Yh},no=async e=>{const a=e.slice(0,e.indexOf("(")).trim(),r=Zs==null?void 0:Zs[a];if(typeof r!="function"){console.log(`找不到函数: ${a}`);return}const n=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),t=await new Function(`return [${n}]`)();return r(...Array.isArray(t)?t:[t])},_f=(e,a,r="children")=>{var f;let n=[],t=[],i=[],s=0;for(const l of e){const c=a.some(x=>{var p,d,m,g,y,v,E,w;const[h]=x.split(".");return h===l.prop||h===l.label||h===((g=(p=l.prop)==null?void 0:p.split("."))==null?void 0:g[((m=(d=l.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])||h===((w=(y=l.prop)==null?void 0:y.split("."))==null?void 0:w[((E=(v=l.prop)==null?void 0:v.split("."))==null?void 0:E.length)-1].replace(/\d+$/,""))}),o=a.filter(x=>x.includes(".")).map(x=>x.split(".").slice(1).join("."));s=s+1;let u;if(c&&(u={...l},t.push(s),i.push(u==null?void 0:u.prop),delete u[r]),l[r]){const x=(f=_f(l[r],(o==null?void 0:o.length)>0?o:a,r))==null?void 0:f.contents;x.length&&(t.push(s),i.push(u==null?void 0:u.prop),s=s+1,u=u||{...l},n=[...n,...x],u=x)}u&&!Array.isArray(u)&&n.push(u)}return{contents:n,ids:t,props:i}},Q1=e=>{if(!Xt(e))return[e];const a=new Function(`return ${e}`)(),r=[];return((t,i="")=>{for(const s of t)if(Array.isArray(s)){const[f,l]=s;Array.isArray(l)?l.forEach(c=>r.push(`"${f}:${c}"`)):r.push(i?`"${i}:${f}"`:'"'+f+'"')}else r.push('"'+s+'"')})(a),r},ex=async(e,a,r,n,t,i)=>{var c,o,u,x,h,p,d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka,Se,Ne,Be,Ta,Qe,br,me,Fr,Or,hr,kr,xa,aa,We,zr,na,wa,ha,fr,wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F,C,O,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,nn,sn,fn,Mt,Nn;let s=[],f=(o=(c=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:c.contents)==null?void 0:o.filter(er=>!(er!=null&&er.columnPath)&&(er==null?void 0:er.label)!=="操作"),l=(x=(u=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:u.contents)==null?void 0:x.filter(er=>er==null?void 0:er.columnPath);if(Array.isArray((p=(h=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:h.contents)==null?void 0:p[0])){let er=(g=(m=(d=e==null?void 0:e.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:d.contents)==null?void 0:m[0])==null?void 0:g.filter(pe=>pe==null?void 0:pe.columnPath);l=[...l,...er]}for(let er=0;er<(l==null?void 0:l.length);er++){let pe=H.cloneDeep(l==null?void 0:l[er]);if(pe.columnPath=(v=(y=pe==null?void 0:pe.columnPath)==null?void 0:y.replaceAll("{",""))==null?void 0:v.replaceAll("}",""),pe||(pe=(T=(S=vn((w=(E=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:E.contents)==null?void 0:w[0]))==null?void 0:S.filter(Re=>Re==null?void 0:Re.columnPath))==null?void 0:T[er]),pe!=null&&pe.columnPath&&(pe==null?void 0:pe.columnPath)!==""){let Re="";if((B=pe==null?void 0:pe.columnPath)!=null&&B.includes("@Type")||(Re=Re===""?Re+"@Type:Manual":Re+",@Type:Manual"),(I=pe==null?void 0:pe.columnPath)!=null&&I.includes("@SonSync")||(Re=Re===""?Re+"@SonSync:No":Re+",@SonSync:No"),(U=pe==null?void 0:pe.columnPath)!=null&&U.includes("@FatherSync")||(Re=Re===""?Re+"@FatherSync:Yes":Re+",@FatherSync:Yes"),((W=pe==null?void 0:pe.columnPath)==null?void 0:W[((L=pe==null?void 0:pe.columnPath)==null?void 0:L.length)-1])===")"){let Lr="";((se=(M=pe.columnPath)==null?void 0:M.split("("))==null?void 0:se.length)!==((he=(ne=pe.columnPath)==null?void 0:ne.split(")"))==null?void 0:he.length)?Lr=((be=pe.columnPath)==null?void 0:be.slice(0,(ce=pe.columnPath)==null?void 0:ce.length))+","+Re+")":Lr=((Te=pe.columnPath)==null?void 0:Te.slice(0,((z=pe.columnPath)==null?void 0:z.length)-1))+","+Re+")",pe.columnPath=Re===""?pe.columnPath:Lr}else(Ae=pe==null?void 0:pe.columnPath)!=null&&Ae.includes("@")?pe.columnPath=pe.columnPath+","+Re+")":pe.columnPath=pe.columnPath+"("+Re+")"}let Pn=(_=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="dictContents"))==null?void 0:_.contents,M0="",Mn=(b=(D=(A=l==null?void 0:l[er])==null?void 0:A.columnPath)==null?void 0:D.replace("[",Ir))==null?void 0:b.split(Ir),Vr=(ee=(re=(X=Mn==null?void 0:Mn[(Mn==null?void 0:Mn.length)-1])==null?void 0:X.replace("(",Ir))==null?void 0:re.split(Ir))==null?void 0:ee[0];Vr=Vr==null?void 0:Vr.slice(0,(Vr==null?void 0:Vr.length)-1);let Ge=(Pe=(P=(we=(q=H.cloneDeep((Q=l==null?void 0:l[er])==null?void 0:Q.columnPath))==null?void 0:q.split("["+Vr+"]"))==null?void 0:we[0])==null?void 0:P.replaceAll("{",""))==null?void 0:Pe.replaceAll("}","");(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&((je=(Ie=Si.value)==null?void 0:Ie[0])!=null&&je.value)&&(Ge=Ge+((ie=(Le=Si.value)==null?void 0:Le[0])==null?void 0:ie.value));let pa="",Ln="",cr="",Wa=H.cloneDeep(Vr);if(Vr=(ir=(ur=Vr==null?void 0:Vr.split(":"))==null?void 0:ur[0])==null?void 0:ir.replaceAll("'",""),Ge===""&&((Da=(ka=Si.value)==null?void 0:ka[0])!=null&&Da.value&&((qa=(Tt=Si.value)==null?void 0:Tt[0])==null?void 0:qa.value)!==""?Ge=os.value+"/"+((Ka=(Ea=Si.value)==null?void 0:Ea[0])==null?void 0:Ka.value):Ge=os.value),Ge!=null&&Ge.includes("[")){let Re=(Ta=(Be=(Ne=(Se=Ge==null?void 0:Ge.split("["))==null?void 0:Se[1])==null?void 0:Ne.split("]"))==null?void 0:Be[0])==null?void 0:Ta.split("/");Ln=Ge,pa=(me=(br=(Qe=Ge==null?void 0:Ge.split("["))==null?void 0:Qe[1])==null?void 0:br.split("]"))==null?void 0:me[0];let Lr="";r==null||r.forEach(ta=>{var Br,Me,L0,te,G;((Me=(Br=ta==null?void 0:ta.value)==null?void 0:Br.pageData)==null?void 0:Me.name)===(Re==null?void 0:Re[0])&&((G=(te=(L0=ta==null?void 0:ta.value)==null?void 0:L0.pageData)==null?void 0:te.compData)==null||G.forEach(Z=>{var de;(Z==null?void 0:Z.key)==="formContent"&&((de=Z==null?void 0:Z.contents)==null||de.forEach(xe=>{var Sr;if((xe==null?void 0:xe.prop)===(Re==null?void 0:Re[1])){let Qr=ho((Sr=H.cloneDeep(xe))==null?void 0:Sr.optionUrl,n);Lr=(xe==null?void 0:xe.value)||Qr||""}}))}))}),cr=Lr,Ge=((Fr=Ge==null?void 0:Ge.split("["))==null?void 0:Fr[0])+Lr}(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&(Ge=Ge.slice(0,(Ge==null?void 0:Ge.length)-1));let oe=[];s!=null&&s.every(Re=>Array.isArray(Re))&&(s==null?void 0:s.length)>0&&(oe=s==null?void 0:s[0]);let Dr=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});((hr=(Or=Dr==null?void 0:Dr.data)==null?void 0:Or.result)==null?void 0:hr.length)===0&&(Ge=(xa=(kr=Ge==null?void 0:Ge.split("/"))==null?void 0:kr.filter((Re,Lr)=>{var ta;return Lr!==((ta=Ge==null?void 0:Ge.split("/"))==null?void 0:ta.length)-1}))==null?void 0:xa.join("/"),Dr=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}));let Oe=(na=(zr=(We=(aa=Wa==null?void 0:Wa.split("{"))==null?void 0:aa[0])==null?void 0:We.replace("[",Ir))==null?void 0:zr.split(Ir))==null?void 0:na[0];const Ra=await ca.getInsofDataApi({key:{pageKey:t??os.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}}),Za=[];if((ha=(wa=Ra==null?void 0:Ra.data)==null?void 0:wa.result)==null||ha.forEach(Re=>{var Lr;Za.push({id:Re==null?void 0:Re.id,value:Re.value.tableData,parentId:(Lr=Re==null?void 0:Re.key)==null?void 0:Lr.parentId})}),(Za==null?void 0:Za.length)===0){const Re=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}});(wr=(fr=Re==null?void 0:Re.data)==null?void 0:fr.result)==null||wr.forEach(Lr=>{var ta;Za.push({id:Lr==null?void 0:Lr.id,value:Lr.value.tableData,parentId:(ta=Lr==null?void 0:Lr.key)==null?void 0:ta.parentId})})}if(Array.isArray((Oa=Dr==null?void 0:Dr.data)==null?void 0:Oa.result)&&((Ua=(Ba=Dr==null?void 0:Dr.data)==null?void 0:Ba.result)==null?void 0:Ua.length)>0){let Re;if((Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])===":"&&(Oe=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1)),Oe=(Ot=(Ct=Oe==null?void 0:Oe.split(":"))==null?void 0:Ct[((st=Oe==null?void 0:Oe.split(":"))==null?void 0:st.length)-1])==null?void 0:Ot.replaceAll("'",""),((Rt=(_t=Dr==null?void 0:Dr.data)==null?void 0:_t.result)==null?void 0:Rt.find(te=>{var G;return mn((G=te==null?void 0:te.value)==null?void 0:G.pageData,Oe)}))??((Pt=(Nt=Dr==null?void 0:Dr.data)==null?void 0:Nt.result)==null?void 0:Pt.find(te=>{var G;return mn((G=te==null?void 0:te.value)==null?void 0:G.pageData,Vr)}))){let te=(N=(k=Dr==null?void 0:Dr.data)==null?void 0:k.result)==null?void 0:N.sort((G,Z)=>G.id-Z.id);Re=await(te==null?void 0:te.map(async G=>{var de,xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn,lr,or,Xe,fa,Bn,si,fi,ci,li,oi,ui,hi,xi,pi,di,mi,gi,vi,_i,yi,ki,ma,$e,De,Ye,ga,ve,ft,vr,sr,Qa;let Z;if(mn((de=G==null?void 0:G.value)==null?void 0:de.pageData,Oe)||mn((xe=G==null?void 0:G.value)==null?void 0:xe.pageData,Vr)&&((Qr=(Sr=G==null?void 0:G.value)==null?void 0:Sr.pageData)==null?void 0:Qr.name)===Vr){Z=H.cloneDeep((gr=(ia=G==null?void 0:G.value)==null?void 0:ia.pageData)==null?void 0:gr.compData);let za;mn((da=G==null?void 0:G.value)==null?void 0:da.pageData,Oe)&&Oe===Vr?(Cr=(Ar=G==null?void 0:G.value)==null?void 0:Ar.pageData)!=null&&Cr.name1?za={name:(jr=(Ur=G==null?void 0:G.value)==null?void 0:Ur.pageData)==null?void 0:jr.name,name0:(Gr=(mr=G==null?void 0:G.value)==null?void 0:mr.pageData)==null?void 0:Gr.name0,name1:(Yr=(xr=G==null?void 0:G.value)==null?void 0:xr.pageData)==null?void 0:Yr.name1}:za={name:(cn=(wt=G==null?void 0:G.value)==null?void 0:wt.pageData)==null?void 0:cn.name,name0:(on=(ln=G==null?void 0:G.value)==null?void 0:ln.pageData)==null?void 0:on.name0}:za={name:((hn=(un=G==null?void 0:G.value)==null?void 0:un.pageData)==null?void 0:hn.name0)||((pn=(xn=G==null?void 0:G.value)==null?void 0:xn.pageData)==null?void 0:pn.name)},Z.push({key:"name",contents:za});const Kt=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:G==null?void 0:G.id,type:"data"}});let wn;if(((jn=(He=Kt==null?void 0:Kt.data)==null?void 0:He.result)==null?void 0:jn.length)>0&&((Jn=(Yn=Z==null?void 0:Z.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Yn.contents)!=null&&Jn.every(Fe=>!(Fe!=null&&Fe.columnPath))))if(wn=(lr=(qn=Kt==null?void 0:Kt.data)==null?void 0:qn.result)==null?void 0:lr.map(Fe=>{var Ce;let Ue=[];return Ue.push({id:Fe==null?void 0:Fe.id}),Ue.push((Ce=Fe==null?void 0:Fe.value)==null?void 0:Ce.tableData),Ue}),Z.push({key:"tableContents",contents:Ci(wn,(Bn=(fa=(Xe=(or=G==null?void 0:G.value)==null?void 0:or.pageData)==null?void 0:Xe.compData)==null?void 0:fa.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Bn.contents)}),Z.push({key:"contentTableId",contents:G==null?void 0:G.id}),Z.push({key:"ownerId",contents:G==null?void 0:G.id}),pa!==""&&(Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Ln}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnPath")),Z.push({key:"columnPath",contents:pa}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:Vr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let Fe;Array.isArray((fi=(si=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:si.contents)==null?void 0:fi[0])?Fe=(oi=vn((li=(ci=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ci.contents)==null?void 0:li[0]))==null?void 0:oi.map(Ue=>Ue==null?void 0:Ue.prop):Fe=(hi=(ui=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ui.contents)==null?void 0:hi.map(Ue=>Ue==null?void 0:Ue.prop),Z==null||Z.forEach(Ue=>{var Ce,zt;if(((Ue==null?void 0:Ue.key)==="contentTableId"||(Ue==null?void 0:Ue.key)==="ownerId")&&(oe==null||oe.push(Ue)),(Ue==null?void 0:Ue.key)==="header"&&(oe=oe==null?void 0:oe.map(_r=>{var Ke,et,rt,St,At,Ft;return(_r==null?void 0:_r.key)==="header"&&(Array.isArray((Ke=Ue==null?void 0:Ue.contents)==null?void 0:Ke[0])&&(Ue.contents=(et=Ue==null?void 0:Ue.contents)==null?void 0:et[0]),Array.isArray((rt=_r==null?void 0:_r.contents)==null?void 0:rt[0])?(_r.contents=(St=_r.contents)==null?void 0:St[0],_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=[(At=_r.contents)==null?void 0:At.filter(Ha=>(Ha==null?void 0:Ha.prop)!=="")]):(_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=(Ft=_r.contents)==null?void 0:Ft.filter(Ha=>(Ha==null?void 0:Ha.prop)!==""))),_r})),(Ue==null?void 0:Ue.key)==="tableContents"){let _r=(zt=(Ce=Ue==null?void 0:Ue.contents)==null?void 0:Ce.map(Ke=>d0(Ke,Fe)))==null?void 0:zt.filter(Ke=>{var et,rt;return!(((et=Object.keys(Ke))==null?void 0:et.length)===1&&((rt=Object.keys(Ke))==null?void 0:rt[0])==="id")});oe=oe==null?void 0:oe.map(Ke=>{var et,rt,St,At,Ft,Ha,Va,rr,Ze;if((Ke==null?void 0:Ke.key)==="tableContents"){let Lt=[];if((_r==null?void 0:_r.length)===0)Lt=Ke==null?void 0:Ke.contents;else{let sa=(St=(rt=(et=pe==null?void 0:pe.columnPath)==null?void 0:et.replace("(",Ir))==null?void 0:rt.split(Ir))==null?void 0:St[1],va=(At=p0(sa,","))==null?void 0:At.map(Rr=>((Rr==null?void 0:Rr[(Rr==null?void 0:Rr.length)-1])===","&&(Rr=Rr==null?void 0:Rr.slice(0,(Rr==null?void 0:Rr.length)-1)),Rr));va=(Ha=(Ft=va==null?void 0:va.find(Rr=>Rr==null?void 0:Rr.includes("@Filter")))==null?void 0:Ft.split("@Filter"))==null?void 0:Ha[1],va=(Va=va==null?void 0:va.slice(1,(va==null?void 0:va.length)-1))==null?void 0:Va.replaceAll("'","");let Ga="";if(va!=null&&va.includes("[")){Ga=(rr=va==null?void 0:va.split("="))==null?void 0:rr[0];let Rr=(Ze=Ke==null?void 0:Ke.contents)==null?void 0:Ze.map(Bt=>Bt==null?void 0:Bt[Ga]);_r=_r==null?void 0:_r.filter(Bt=>Rr==null?void 0:Rr.find(h0=>(Bt==null?void 0:Bt[Ga])===h0))}_r==null||_r.forEach(Rr=>{var Bt,h0,x0;if(!(!(Ke!=null&&Ke.contents)||((Bt=Ke==null?void 0:Ke.contents)==null?void 0:Bt.length)===0))if(Ga==="")(h0=Ke==null?void 0:Ke.contents)==null||h0.forEach(ze=>{let Je=Object.assign({},Rr,ze);Lt.push(Je)});else{let ze=(x0=Ke==null?void 0:Ke.contents)==null?void 0:x0.find(B0=>(B0==null?void 0:B0[Ga])===(Rr==null?void 0:Rr[Ga])),Je=Object.assign({},Rr,ze);Lt.push(Je)}})}Ke.contents=Lt}return Ke})}})}else{let Fe,Ue=(yi=(_i=(vi=(gi=(mi=(di=(pi=(xi=G==null?void 0:G.value)==null?void 0:xi.pageData)==null?void 0:pi.compData)==null?void 0:di.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:mi.contents)==null?void 0:gi.find(Ce=>Ce==null?void 0:Ce.columnPath))==null?void 0:vi.columnPath)==null?void 0:_i.split("["))==null?void 0:yi[0];if(os.value!==Ge&&i!==Ge)Fe=await Tn(Ge,sessionStorage.getItem("systemKey"),"",!1,[],!1,n,Ge);else{let Ce=await ca.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),zt=(De=($e=(ma=(ki=Ce==null?void 0:Ce.data)==null?void 0:ki.result)==null?void 0:ma.find(Ke=>{var et,rt,St,At,Ft,Ha;return mn((et=Ke==null?void 0:Ke.value)==null?void 0:et.pageData,Vr)&&((St=(rt=G==null?void 0:G.value)==null?void 0:rt.pageData)==null?void 0:St.name)===((Ft=(At=Ke==null?void 0:Ke.value)==null?void 0:At.pageData)==null?void 0:Ft.name)||mn((Ha=Ke==null?void 0:Ke.value)==null?void 0:Ha.pageData,Oe)&&Oe!==Vr}))==null?void 0:$e.value)==null?void 0:De.pageData;M0=(Qa=(sr=(vr=(ft=(ve=(ga=(Ye=zt==null?void 0:zt.compData)==null?void 0:Ye.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.find(Ke=>Ke==null?void 0:Ke.columnPath))==null?void 0:ft.columnPath)==null?void 0:vr.replace("(",Ir))==null?void 0:sr.split(Ir))==null?void 0:Qa[1],Fe=await Tn(Ue,sessionStorage.getItem("systemKey"),""),(Fe==null?void 0:Fe.length)>0&&(Fe[0].name=Oe)}Fe==null||Fe.forEach(Ce=>{var zt,_r,Ke,et,rt,St,At,Ft,Ha,Va,rr,Ze,Lt,sa,va,Ga,Rr,Bt,h0;if(mn(Ce,Vr)&&((_r=(zt=G==null?void 0:G.value)==null?void 0:zt.pageData)==null?void 0:_r.name)===(Ce==null?void 0:Ce.name)||mn(Ce,Oe)&&Oe!==Vr){Z=((Ke=Ce==null?void 0:Ce.compData)==null?void 0:Ke.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"))||[],Fe=(rt=(et=Ce==null?void 0:Ce.compData)==null?void 0:et.find(ze=>(ze==null?void 0:ze.key)==="tableContents"))==null?void 0:rt.contents,wn=Fe;let x0;if((mn(Ce,Vr)&&Oe===Vr||mn(Ce,Oe)&&Oe!==Vr)&&((At=(St=e==null?void 0:e.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:St.contents)==null?void 0:At.length)===2?(Ha=(Ft=G==null?void 0:G.value)==null?void 0:Ft.pageData)!=null&&Ha.name1?x0={name:Ce==null?void 0:Ce.name,name0:Ce==null?void 0:Ce.name0,name1:Ce==null?void 0:Ce.name1}:x0={name:Ce==null?void 0:Ce.name,name0:Ce==null?void 0:Ce.name0}:x0={name:(Ce==null?void 0:Ce.name0)||(Ce==null?void 0:Ce.name)},Z.push({key:"name",contents:x0}),Z.push({key:"tableContents",contents:Ci(wn,(rr=(Va=Ce==null?void 0:Ce.compData)==null?void 0:Va.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:rr.contents)}),Z.push({key:"contentTableId",contents:(Fe==null?void 0:Fe.length)!==0?((Ze=Ce==null?void 0:Ce.compData)==null?void 0:Ze.id)??(Ce==null?void 0:Ce.id):G==null?void 0:G.id}),Z.push({key:"ownerId",contents:Ce==null?void 0:Ce.id}),pa!==""&&(Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Ln}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnPath")),Z.push({key:"columnPath",contents:pa}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:Vr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let ze;Array.isArray((sa=(Lt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Lt.contents)==null?void 0:sa[0])?ze=(Rr=vn((Ga=(va=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:va.contents)==null?void 0:Ga[0]))==null?void 0:Rr.map(Je=>Je==null?void 0:Je.prop):ze=(h0=(Bt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Bt.contents)==null?void 0:h0.map(Je=>Je==null?void 0:Je.prop),Z==null||Z.forEach(Je=>{var B0,Tc;if(((Je==null?void 0:Je.key)==="contentTableId"||(Je==null?void 0:Je.key)==="ownerId")&&(oe==null||oe.push(Je)),(Je==null?void 0:Je.key)==="header"&&(oe=oe==null?void 0:oe.map(Wr=>{var Xr,Zn,Qn,Ei,Ti,wi;return(Wr==null?void 0:Wr.key)==="header"&&(Array.isArray((Xr=Je==null?void 0:Je.contents)==null?void 0:Xr[0])&&(Je.contents=(Zn=Je==null?void 0:Je.contents)==null?void 0:Zn[0]),Array.isArray((Qn=Wr==null?void 0:Wr.contents)==null?void 0:Qn[0])?(Wr.contents=(Ei=Wr.contents)==null?void 0:Ei[0],Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=[(Ti=Wr.contents)==null?void 0:Ti.filter(Sn=>(Sn==null?void 0:Sn.prop)!=="")]):(Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=(wi=Wr.contents)==null?void 0:wi.filter(Sn=>(Sn==null?void 0:Sn.prop)!==""))),Wr})),(Je==null?void 0:Je.key)==="tableContents"){let Wr=(Tc=(B0=Je==null?void 0:Je.contents)==null?void 0:B0.map(Xr=>d0(Xr,ze)))==null?void 0:Tc.filter(Xr=>{var Zn,Qn;return!(((Zn=Object.keys(Xr))==null?void 0:Zn.length)===1&&((Qn=Object.keys(Xr))==null?void 0:Qn[0])==="id")});oe=oe==null?void 0:oe.map(Xr=>{var Zn,Qn,Ei,Ti,wi,Sn,wc,Sc,Ac;if((Xr==null?void 0:Xr.key)==="tableContents"){let fs=[];if((Wr==null?void 0:Wr.length)===0)fs=Xr==null?void 0:Xr.contents;else{let wh=(Ei=(Qn=(Zn=pe==null?void 0:pe.columnPath)==null?void 0:Zn.replace("(",Ir))==null?void 0:Qn.split(Ir))==null?void 0:Ei[1],at=(Ti=p0(wh,","))==null?void 0:Ti.map(ea=>((ea==null?void 0:ea[(ea==null?void 0:ea.length)-1])===","&&(ea=ea==null?void 0:ea.slice(0,(ea==null?void 0:ea.length)-1)),ea));at=(Sn=(wi=at==null?void 0:at.find(ea=>ea==null?void 0:ea.includes("@Filter")))==null?void 0:wi.split("@Filter"))==null?void 0:Sn[1],at=(wc=at==null?void 0:at.slice(1,(at==null?void 0:at.length)-1))==null?void 0:wc.replaceAll("'","");let U0="";if(at!=null&&at.includes("[")){U0=(Sc=at==null?void 0:at.split("="))==null?void 0:Sc[0];let ea=(Ac=Xr==null?void 0:Xr.contents)==null?void 0:Ac.map(An=>An==null?void 0:An[U0]);Wr=Wr==null?void 0:Wr.filter(An=>ea==null?void 0:ea.find(cs=>(An==null?void 0:An[U0])===cs))}Wr==null||Wr.forEach(ea=>{var An,cs,Fc;if(!(!(Xr!=null&&Xr.contents)||((An=Xr==null?void 0:Xr.contents)==null?void 0:An.length)===0))if(U0==="")(cs=Xr==null?void 0:Xr.contents)==null||cs.forEach(Ys=>{let Js=Object.assign({},ea,Ys);fs.push(Js)});else{let Ys=(Fc=Xr==null?void 0:Xr.contents)==null?void 0:Fc.find(qs=>(qs==null?void 0:qs[U0])===(ea==null?void 0:ea[U0])),Js=Object.assign({},ea,Ys);fs.push(Js)}})}Xr.contents=fs}return Xr})}})}}})}}})),await Promise.all(Re)}let Lr=[];oe!=null&&oe.every(te=>Array.isArray(te))||(oe=[oe]),oe==null||oe.forEach(te=>{Lr!=null&&Lr.find(G=>{var Z,de,xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn;return((Sr=(xe=(de=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:de[((Z=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)==null?void 0:Sr.name)===((da=(gr=(ia=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:ia[((Qr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Qr.length)-1])==null?void 0:gr.contents)==null?void 0:da.name)&&((jr=(Ur=(Cr=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Cr[((Ar=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Ar.length)-1])==null?void 0:Ur.contents)==null?void 0:jr.name0)===((Yr=(xr=(Gr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Gr[((mr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:mr.length)-1])==null?void 0:xr.contents)==null?void 0:Yr.name0)&&((on=(ln=(cn=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:cn[((wt=G==null?void 0:G.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:wt.length)-1])==null?void 0:ln.contents)==null?void 0:on.name1)===((pn=(xn=(hn=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:hn[((un=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:un.length)-1])==null?void 0:xn.contents)==null?void 0:pn.name1)})||Lr.push(te)}),Lr=Lr==null?void 0:Lr.map(te=>{var Z,de;let G=[];return te==null||te.forEach(xe=>{(xe==null?void 0:xe.key)!=="name"&&G.push(xe)}),G.push((de=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:de[((Z=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:Z.length)-1]),G}),oe=Lr==null?void 0:Lr.sort((te,G)=>{var Z,de,xe,Sr,Qr,ia;return((xe=(de=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:de[((Z=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)-((ia=(Qr=G==null?void 0:G.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Qr[((Sr=G==null?void 0:G.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Sr.length)-1])==null?void 0:ia.contents)}),oe=oe==null?void 0:oe.filter(te=>te!==void 0),oe=oe==null?void 0:oe.map(te=>{var Z,de;let G=(de=Ts((Z=te==null?void 0:te.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:Z.contents))==null?void 0:de.filter(xe=>xe!=="操作"&&xe);return te=te==null?void 0:te.map(xe=>{var Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn,lr,or,Xe,fa,Bn,si,fi,ci,li,oi,ui,hi,xi,pi,di,mi,gi,vi,_i,yi,ki;if((xe==null?void 0:xe.key)==="tableContents"){let ma=[];if((gr=(ia=(Qr=(Sr=pe==null?void 0:pe.columnPath)==null?void 0:Sr.split("@Type"))==null?void 0:Qr[1])==null?void 0:ia.toUpperCase())!=null&&gr.includes("MANUAL")){Za==null||Za.forEach(Ye=>{Ye.value.id=Ye==null?void 0:Ye.id,ma.push(Ye==null?void 0:Ye.value)});let $e=[];((Ar=(da=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:da.contents)==null?void 0:Ar.length)<=2&&!Array.isArray((Ur=(Cr=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:Cr.contents)==null?void 0:Ur[0])&&((jr=xe.contents)==null||jr.forEach(Ye=>{let ga=(Ye==null?void 0:Ye.length)!==1?d0(Ye,G):Ye==null?void 0:Ye[0];$e.push(ga)}));let De=G==null?void 0:G[0];$e==null||$e.forEach(Ye=>{ma!=null&&ma.find(ga=>(ga==null?void 0:ga[De])===(Ye==null?void 0:Ye[De]))||ma.push(Ye)})}else(cn=(wt=(Yr=p0((xr=(Gr=(mr=pe==null?void 0:pe.columnPath)==null?void 0:mr.replace("(",Ir))==null?void 0:Gr.split(Ir))==null?void 0:xr[1],","))==null?void 0:Yr.find($e=>$e==null?void 0:$e.includes("@FatherSync")))==null?void 0:wt.toUpperCase())!=null&&cn.includes("YES")?(ln=xe.contents)==null||ln.forEach($e=>{var ga,ve,ft;let De=($e==null?void 0:$e.length)!==1?d0($e,G):$e==null?void 0:$e[0],Ye=Za==null?void 0:Za.filter(vr=>(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id));if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Qa={};for(let za in sr)(sr==null?void 0:sr[za])!==void 0&&(Qa[za]=sr==null?void 0:sr[za]);Ye=Qa,sr.id=vr==null?void 0:vr.id,ma.push(sr)});else{De.id=((ve=(ga=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((ft=De==null?void 0:De.id)==null?void 0:ft.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,ma.push(De)}}):(on=xe.contents)==null||on.forEach($e=>{var ga,ve,ft;let De=($e==null?void 0:$e.length)!==1?d0($e,G):$e==null?void 0:$e[0],Ye=Za==null?void 0:Za.filter(vr=>{var sr,Qa;return(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id)||((sr=vr==null?void 0:vr.id)==null?void 0:sr.toString())===((Qa=De==null?void 0:De.id)==null?void 0:Qa.toString())});if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Qa={};for(let za in sr)(sr==null?void 0:sr[za])!==void 0&&(Qa[za]=sr==null?void 0:sr[za]);Ye=Qa,sr.id=vr==null?void 0:vr.id,ma.push(sr)});else{De.id=((ve=(ga=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ga.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((ft=De==null?void 0:De.id)==null?void 0:ft.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,ma.push(De)}});xe.contents=ma}if((xe==null?void 0:xe.key)==="header"){let ma=Pn==null?void 0:Pn.find(ve=>{var ft,vr,sr,Qa,za,Kt,wn;return(wn=pe==null?void 0:pe.columnPath)==null?void 0:wn.includes((Kt=(vr=(ft=ve==null?void 0:ve.value)==null?void 0:ft.split("%$%"))==null?void 0:vr[0])==null?void 0:Kt.slice(0,((za=(Qa=(sr=ve==null?void 0:ve.value)==null?void 0:sr.split("%$%"))==null?void 0:Qa[0])==null?void 0:za.length)-1))}),$e=ma==null?void 0:ma.key;if(((un=$e==null?void 0:$e.split("["))==null?void 0:un.length)>2){let ve=gf($e);$e=Uh((xn=(hn=ve==null?void 0:ve.stringContent)==null?void 0:hn.split(","))==null?void 0:xn.filter(ft=>ft!==""),ve==null?void 0:ve.parentColumns)}else $e=(jn=(He=(pn=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:pn.replaceAll("[",""))==null?void 0:He.replaceAll("]",""))==null?void 0:jn.split(",");let De=(fi=(si=(Bn=(qn=(Jn=(Yn=ma==null?void 0:ma.value)==null?void 0:Yn.split("("))==null?void 0:Jn[0])==null?void 0:qn.split("["))==null?void 0:Bn[((fa=(Xe=(or=(lr=ma==null?void 0:ma.value)==null?void 0:lr.split("("))==null?void 0:or[0])==null?void 0:Xe.split("["))==null?void 0:fa.length)-1])==null?void 0:si.split("]"))==null?void 0:fi[0],Ye=(oi=(li=(ci=De==null?void 0:De.replaceAll("'",""))==null?void 0:ci.split(","))==null?void 0:li.filter(ve=>ve==null?void 0:ve.includes('"')))==null?void 0:oi.map(ve=>ve==null?void 0:ve.replaceAll('"',""));De=(hi=(ui=De==null?void 0:De.replaceAll("'",""))==null?void 0:ui.replaceAll('"',""))==null?void 0:hi.split(","),Array.isArray($e)||($e=(di=(pi=(xi=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:xi.replaceAll("[",""))==null?void 0:pi.replaceAll("]",""))==null?void 0:di.split(","));let ga=((gi=(mi=xe.contents)==null?void 0:mi.find(ve=>ve==null?void 0:ve.menuId))==null?void 0:gi.menuId)??((yi=(_i=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:_i[((vi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:vi.length)-1])==null?void 0:yi.contents);xe.contents=(ki=xe.contents)==null?void 0:ki.map(ve=>{var ft,vr,sr,Qa,za,Kt,wn,Fe,Ue,Ce,zt,_r,Ke,et,rt,St,At,Ft,Ha;if(Array.isArray(ve)){(ft=vn(ve))!=null&&ft.every(Ze=>!(Ze!=null&&Ze.menuId))&&(ga=((sr=(vr=vn(ve))==null?void 0:vr.find(Ze=>Ze==null?void 0:Ze.menuId))==null?void 0:sr.menuId)??ga,ve=ve==null?void 0:ve.map((Ze,Lt)=>{var sa,va;return Lt===0?Ze!=null&&Ze.children?Ze.children=(sa=Ze.children)==null?void 0:sa.map((Ga,Rr)=>(Rr===0?(Ga.directiveLabel="#isMain",Ga.menuId=ga):(Ga.directiveLabel="",delete Ga.menuId),Ga.relatedValueId=!0,Ga)):(Ze.directiveLabel="#isMain",Ze.menuId=ga):(Ze.directiveLabel="",delete Ze.menuId,Ze.children=(va=Ze.children)==null?void 0:va.map(Ga=>(Ga.relatedValueId=!0,Ga))),Ze.relatedValueId=!0,Ze}));let Va=(Kt=(za=(Qa=pe==null?void 0:pe.columnPath)==null?void 0:Qa.replace("(",Ir))==null?void 0:za.split(Ir))==null?void 0:Kt[1];Va=Va==null?void 0:Va.slice(0,(Va==null?void 0:Va.length)-1);let rr=(wn=p0(Va,","))==null?void 0:wn.map(Ze=>((Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),Ze));return ve=Jl(ve,$e,De,pe,ga,rr),ve}else if(De!=null&&De.find(Va=>Va===(ve==null?void 0:ve.prop))){let Va=De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop));if($e!=null&&$e.find(rr=>rr==null?void 0:rr.includes('"'))?((Fe=$e==null?void 0:$e[Va])!=null&&Fe.includes('"')?(ve.directiveLabel="#isMain",ve.menuId=ga):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0):(Ye==null?void 0:Ye.length)>0&&(Ye!=null&&Ye.find(rr=>rr===(ve==null?void 0:ve.prop))?(ve.directiveLabel="#isMain",ve.menuId=ga):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0),pe!=null&&pe.methodContent){let rr=(Ce=(Ue=pe==null?void 0:pe.methodContent)==null?void 0:Ue.replaceAll('"',""))==null?void 0:Ce.replaceAll("'","");rr!=null&&rr.includes("@")?(rr=rr==null?void 0:rr.slice(0,(rr==null?void 0:rr.length)-1),rr!=null&&rr.includes("@Type")||(rr=rr+",@Type=Auto"),rr!=null&&rr.includes("@Button")||(rr=rr+",@Button=Prop"),rr!=null&&rr.includes("@Extent")||(rr=rr+",@Extent=Row"),rr=rr+")"):rr=rr+"(@Type=Auto,@Button=Prop,@Extent=Row)",ve.methodContent=rr,ve.prop=(ve==null?void 0:ve.prop)+(pe==null?void 0:pe.columnPathIndex);let Ze=(Ke=(_r=(zt=pe==null?void 0:pe.columnPath)==null?void 0:zt.replace("(",Ir))==null?void 0:_r.split(Ir))==null?void 0:Ke[1];Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1);let Lt=(et=p0(Ze,","))==null?void 0:et.map(sa=>((sa==null?void 0:sa[(sa==null?void 0:sa.length)-1])===","&&(sa=sa==null?void 0:sa.slice(0,(sa==null?void 0:sa.length)-1)),sa));(rt=Lt==null?void 0:Lt.find(sa=>sa==null?void 0:sa.includes("@SonSync")))!=null&&rt.includes("Yes")&&(ve.methodId=ga)}ve.label=(Ha=(St=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:St.split("."))==null?void 0:Ha[((Ft=(At=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:At.split("."))==null?void 0:Ft.length)-1]}return ve})}return xe}),te});let ta=(O=(C=(F=pe==null?void 0:pe.columnPath)==null?void 0:F.replace("(",Ir))==null?void 0:C.split(Ir))==null?void 0:O[1];if(M0!==""&&(ta=(ta==null?void 0:ta.replaceAll(")",""))+","+M0),ta&&(ta==null?void 0:ta.length)>0){ta=(R=ta.slice(0,(ta==null?void 0:ta.length)-1))==null?void 0:R.replaceAll("'","");let te=(K=p0(ta,","))==null?void 0:K.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));te=te==null?void 0:te.map(de=>{let xe=V0==null?void 0:V0.find(Sr=>de==null?void 0:de.includes(Sr==null?void 0:Sr.key));if(xe)return{order:xe==null?void 0:xe.order,value:xe==null?void 0:xe.value,content:de}}),te=te==null?void 0:te.sort((de,xe)=>(xe==null?void 0:xe.order)-(de==null?void 0:de.order));let G=[];oe=oe==null?void 0:oe.map(de=>(de=de==null?void 0:de.map((xe,Sr)=>{var Qr,ia,gr,da;return(xe==null?void 0:xe.key)==="header"&&((Qr=xe==null?void 0:xe.contents)!=null&&Qr.every(Ar=>Array.isArray(Ar))?xe.contents=(ia=xe.contents)==null?void 0:ia.map(Ar=>{var Cr;return G.push({index:Sr,content:(Cr=H.cloneDeep(Ar))==null?void 0:Cr.filter(Ur=>Ur==null?void 0:Ur.columnPath)}),Ar=Ar==null?void 0:Ar.filter(Ur=>!(Ur!=null&&Ur.columnPath)),Ar}):(G.push({index:Sr,content:(gr=H.cloneDeep(xe.contents))==null?void 0:gr.filter(Ar=>Ar==null?void 0:Ar.columnPath)}),xe.contents=(da=xe.contents)==null?void 0:da.filter(Ar=>!(Ar!=null&&Ar.columnPath)))),xe}),de)),await(async()=>{var de,xe,Sr,Qr,ia,gr,da,Ar;for(const Cr of te??[])if(Cr){const Ur=(de=Cr==null?void 0:Cr.content)!=null&&de.includes("@Filter")?"("+((Qr=(Sr=(xe=Cr==null?void 0:Cr.content)==null?void 0:xe.replace("(",Ir))==null?void 0:Sr.split(Ir))==null?void 0:Qr[1]):(da=(gr=(ia=Cr==null?void 0:Cr.content)==null?void 0:ia.replace(":",Ir))==null?void 0:gr.split(Ir))==null?void 0:da[1];oe=await no((Cr==null?void 0:Cr.value)+"('"+JSON.stringify(H.cloneDeep(oe)).replaceAll("'",'"')+"','"+Ur+"','"+((Ar=pe==null?void 0:pe.columnPath)==null?void 0:Ar.replaceAll("'",""))+"')")??[]}})(),oe=oe==null?void 0:oe.map(de=>(de.push({key:"filterAllType",value:te}),de)),oe=oe==null?void 0:oe.map(de=>(de=de==null?void 0:de.map((xe,Sr)=>{var Qr,ia,gr,da,Ar,Cr;if((xe==null?void 0:xe.key)==="header")if((Qr=xe==null?void 0:xe.contents)!=null&&Qr.every(Ur=>Array.isArray(Ur)))xe.contents=(ia=xe.contents)==null?void 0:ia.map(Ur=>{var jr,mr,Gr,xr;return G!=null&&G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr)&&((mr=(jr=G==null?void 0:G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr))==null?void 0:jr.content)==null?void 0:mr.length)>0&&Ur.push((xr=(Gr=G==null?void 0:G.find(Yr=>(Yr==null?void 0:Yr.index)===Sr))==null?void 0:Gr.content)==null?void 0:xr[0]),Ur});else{let Ur=xe.contents;G!=null&&G.find(jr=>(jr==null?void 0:jr.index)===Sr)&&((da=(gr=G==null?void 0:G.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:gr.content)==null?void 0:da.length)>0&&Ur.push((Cr=(Ar=G==null?void 0:G.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Ar.content)==null?void 0:Cr[0]),xe.contents=Ur}return xe}),de))}let Br=(J=(j=(V=(Y=Wa==null?void 0:Wa.replaceAll("{",""))==null?void 0:Y.replaceAll("}",""))==null?void 0:V.replace(":",Ir))==null?void 0:j.split(Ir))==null?void 0:J[1];Br!=null&&Br.includes("[")&&(Br=(le=Br==null?void 0:Br.replaceAll("'",'"'))==null?void 0:le.replaceAll(":",","),Br=(_e=Q1(Br))==null?void 0:_e.join(","),Br="["+((ge=(ue=(Ee=Br==null?void 0:Br.replaceAll('":"',Lc.value))==null?void 0:Ee.replaceAll(":",Lc.value))==null?void 0:ue.replaceAll("[",""))==null?void 0:ge.replaceAll("]",""))+"]",Xt(Br==null?void 0:Br.replaceAll("'",'"'))&&(Br=JSON.parse(Br==null?void 0:Br.replaceAll("'",'"')),Br!=null&&Br.find(te=>te==="操作")||Br.push("操作")),oe=oe==null?void 0:oe.map(te=>{let G=[],Z=[];return te=te==null?void 0:te.map(de=>{var xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr;if((de==null?void 0:de.key)==="header")if((xe=de.contents)!=null&&xe.every(mr=>Array.isArray(mr)))de.contents=(Qr=(Sr=de.contents)==null?void 0:Sr.map(mr=>{let Gr=_f(mr,Br);return mr=Gr==null?void 0:Gr.contents,G=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],mr}))==null?void 0:Qr.filter(mr=>!((mr==null?void 0:mr.label)==="操作"&&(mr!=null&&mr.relatedValueId)));else{let mr=(gr=(ia=de.contents)==null?void 0:ia[0])==null?void 0:gr.menuId,Gr=_f(de.contents,Br);G=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],(da=de.contents)!=null&&da.some(xr=>xr==null?void 0:xr.columnPath)||(de.contents=(Ar=de.contents)==null?void 0:Ar.filter(xr=>(Br==null?void 0:Br.find(Yr=>{var wt;return Yr===(((wt=xr==null?void 0:xr.prop)==null?void 0:wt.replace(/\d+$/,""))||(xr==null?void 0:xr.label))}))&&!((xr==null?void 0:xr.label)==="操作"&&(xr!=null&&xr.relatedValueId))),(Cr=de.contents)!=null&&Cr.every(xr=>!(xr!=null&&xr.menuId))&&(de.contents=(Ur=de.contents)==null?void 0:Ur.map((xr,Yr)=>(Yr===0&&(xr.menuId=mr),xr))))}return(de==null?void 0:de.key)==="tableContents"&&(G==null?void 0:G.length)>0&&(de.contents=(jr=de.contents)==null?void 0:jr.map(mr=>{if(Array.isArray(mr))mr=mr==null?void 0:mr.filter((Gr,xr)=>(G==null?void 0:G.find(Yr=>Yr===xr))||(Gr==null?void 0:Gr.id));else for(let Gr in mr)(Gr==="id"||Z!=null&&Z.find(xr=>xr===Gr))&&(mr==null||mr[Gr]);return mr})),de}),te}));let Me=[];(Er=(qe=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:qe.contents)!=null&&Er.every(te=>Array.isArray(te))?Me=(nn=($r=(Mr=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Mr.contents)==null?void 0:$r[0])==null?void 0:nn.filter(te=>!(te!=null&&te.columnPath)&&(te==null?void 0:te.label)!=="操作"):Me=f;let L0=Pn==null?void 0:Pn.find(te=>{var G,Z,de;return(de=pe==null?void 0:pe.columnPath)==null?void 0:de.includes((Z=(G=te==null?void 0:te.value)==null?void 0:G.split("%$%"))==null?void 0:Z[0])});Me&&(Me==null?void 0:Me.length)>0&&(oe=oe==null?void 0:oe.map(te=>(te=te==null?void 0:te.map(G=>{var xe,Sr,Qr,ia,gr,da,Ar,Cr,Ur,jr,mr,Gr,xr,Yr,wt,cn,ln,on,un,hn,xn,pn,He,jn,Yn,Jn,qn;let Z=(Sr=(xe=e==null?void 0:e.find(lr=>(lr==null?void 0:lr.key)==="header"))==null?void 0:xe.contents)==null?void 0:Sr.filter(lr=>lr==null?void 0:lr.columnPath),de=(Qr=Z==null?void 0:Z[er])!=null&&Qr.columnPathIndex&&((ia=Z==null?void 0:Z[er])==null?void 0:ia.columnPathIndex)!==""?parseInt((gr=Z==null?void 0:Z[er])==null?void 0:gr.columnPathIndex):0;if((G==null?void 0:G.key)==="header"){if(((da=G==null?void 0:G.contents)==null?void 0:da.length)===0)return G==null?void 0:G.contents;if((((Cr=(Ar=L0==null?void 0:L0.key)==null?void 0:Ar.split("["))==null?void 0:Cr.length)??0)<=2){if((Ur=G==null?void 0:G.contents)!=null&&Ur.every(lr=>Array.isArray(lr))){if(de===0)Array.isArray(Me==null?void 0:Me[0])?G.contents=[...(jr=G.contents)==null?void 0:jr[0],...Me==null?void 0:Me[0]]:G.contents=[...(mr=G.contents)==null?void 0:mr[0],...Me];else if(Array.isArray(Me==null?void 0:Me[0])){let lr=((wt=(Gr=Me==null?void 0:Me[0])==null?void 0:Gr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:wt.slice(de,(Yr=(xr=Me==null?void 0:Me[0])==null?void 0:xr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:Yr.length))??[],or=[...(cn=Me==null?void 0:Me[0])==null?void 0:cn.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作").slice(0,de),...(ln=G.contents)==null?void 0:ln[0]];or=[...or,...lr],Array.isArray((on=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""))==null?void 0:on[0])?G.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""):G.contents=[or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")]}else{let lr=(Me==null?void 0:Me.slice(de,Me==null?void 0:Me.length))??[],or=[...Me.slice(0,de),...G.contents];or=[...or,...lr],G.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")}G.contents=(un=G.contents)==null?void 0:un.filter(lr=>(lr==null?void 0:lr.prop)!==""),Array.isArray((hn=G.contents)==null?void 0:hn[0])||(G.contents=[G.contents])}else if(G.contents=(xn=G.contents)==null?void 0:xn.map((lr,or)=>lr),(Z==null?void 0:Z[er])===0)Array.isArray(Me==null?void 0:Me[0])?G.contents=[...G.contents,...Me==null?void 0:Me[0]]:G.contents=[...G.contents,...Me];else{let lr=de;if(Array.isArray(Me==null?void 0:Me[0])){let or=((He=Me==null?void 0:Me[0])==null?void 0:He.slice(lr,(pn=Me==null?void 0:Me[0])==null?void 0:pn.length))??[],Xe=[...Me==null?void 0:Me[0].slice(0,lr),...G.contents];Xe=[...Xe,...or],Array.isArray((jn=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""))==null?void 0:jn[0])?G.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""):G.contents=[Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")]}else{let or=(Me==null?void 0:Me.slice(lr,Me==null?void 0:Me.length))??[],Xe=[...Me.slice(0,lr),...G.contents];Xe=[...Xe,...or],G.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")}}if(Array.isArray((Yn=G.contents)==null?void 0:Yn[0])){const lr=new Map;(Jn=G.contents)==null||Jn[0].forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),G.contents=[...lr.values()],G.contents=[G.contents],G.contents=[(qn=G.contents)==null?void 0:qn[0].filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Bn=>Bn.label==="操作")===Xe)]}else{const lr=new Map;G.contents.forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),G.contents=[...lr.values()],G.contents=G.contents.filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Bn=>Bn.label==="操作")===Xe)}}else{let lr=Wh(G.contents,Me);lr!=null&&lr.find(or=>(or==null?void 0:or.label)==="操作")||lr.push({label:"操作"}),G.contents=[lr]}}return(G==null?void 0:G.key)==="relatedFilter"&&(G.index=de),G}),te)))}f=(Nn=(Mt=(fn=(sn=H.cloneDeep(oe))==null?void 0:sn[0])==null?void 0:fn.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:Mt.contents)==null?void 0:Nn.filter(Re=>!(Re!=null&&Re.columnPath)&&(Re==null?void 0:Re.label)!=="操作"),s=oe}return s==null?void 0:s.filter(er=>er!==void 0)},Tn=async(e,a,r="",n=!1,t,i,s,f)=>{var v,E,w,S,T,B;let l,c=new WeakMap;s&&(c=s),(!n||!t)&&(l=(v=c[e])==null?void 0:v.filter(I=>{var U,L;return((U=I==null?void 0:I.key)==null?void 0:U.parentTable)===r||((L=I==null?void 0:I.key)==null?void 0:L.type)==="related"})),to.setPageMapState(c);const o=(E=c[e])==null?void 0:E.filter(I=>{var U;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="structureMethod"}),u=l==null?void 0:l.map(I=>I.id);if(!u)return;let x=(w=c[e])==null?void 0:w.filter(I=>{var U,L,W,M;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="data"&&(u.includes((L=I==null?void 0:I.key)==null?void 0:L.tableId)||u.includes((M=(W=I==null?void 0:I.key)==null?void 0:W.tableId)==null?void 0:M.toString()))});const h=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),p=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");h&&Array.isArray(p)&&p.length>0&&(e!=null&&e.startsWith("/")&&e.substring(1),(S=h==null?void 0:h.pageKey)!=null&&S.startsWith("/")?h.pageKey.substring(1):h==null||h.pageKey);const d=c[e+Z1.value]??[];(d==null?void 0:d.length)===0&&(x=ao(x,!1,c));let m=[];x==null||x.forEach(I=>{var W;const U=Array.isArray(I.value.tableData)?I.value.tableData:[I.value.tableData];U.unshift({id:I.id});const L=(W=I==null?void 0:I.key)==null?void 0:W.tableId;m!=null&&m.find(M=>(M==null?void 0:M.key)===L)?m=m==null?void 0:m.map(M=>((M==null?void 0:M.key)===L&&(M.contents=[...M.contents,U]),M)):m.push({key:L,contents:[U]})});let g=[];const y=await(l==null?void 0:l.map(async(I,U)=>{var se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ka,Da,Tt,qa,Ea,Ka;let L=I.value.pageData;const W=I==null?void 0:I.id;let M=(se=H.cloneDeep(L==null?void 0:L.compData))==null?void 0:se.filter(Se=>(Se==null?void 0:Se.key)!=="tableContents");if(!(L!=null&&L.orderId)&&typeof L!="string"&&(L.orderId=U),M&&(M!=null&&M.find(Se=>(Se==null?void 0:Se.key)==="header"))&&(!Array.isArray((he=(ne=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ne.contents)==null?void 0:he[0])&&((be=(ce=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ce.contents)!=null&&be.every(Se=>!(Se!=null&&Se.columnPath)))||Array.isArray((Te=(z=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:z.contents)==null?void 0:Te[0])&&((A=vn((_=(Ae=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:Ae.contents)==null?void 0:_[0]))!=null&&A.every(Se=>!(Se!=null&&Se.columnPath))))){M=await(M==null?void 0:M.map(async me=>{var Fr,Or,hr,kr,xa,aa,We,zr,na,wa,ha,fr,wr,Oa,Ba,Ua,st,Ct,Ot,_t,Rt,Nt,Pt,k,N,F,C,O,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,nn,sn,fn,Mt,Nn,er,pe,Pn,M0,Mn,Vr,Ge;if((me==null?void 0:me.key)==="header"){if(((Fr=me.contents)==null?void 0:Fr.length)===0){let pa=(Or=M==null?void 0:M.find(oe=>(oe==null?void 0:oe.key)==="relatedFilter"))==null?void 0:Or.contents,Ln=(hr=pa==null?void 0:pa.split("["))==null?void 0:hr[0],cr=(zr=(We=(aa=(xa=(kr=pa==null?void 0:pa.replace("[",Ir))==null?void 0:kr.split(Ir))==null?void 0:xa[1])==null?void 0:aa.replace("]",Ir))==null?void 0:We.split(Ir))==null?void 0:zr[0];cr=(na=cr==null?void 0:cr.split("["))==null?void 0:na[0],cr=(fr=(ha=cr==null?void 0:cr.split(":"))==null?void 0:ha[((wa=cr==null?void 0:cr.split(":"))==null?void 0:wa.length)-1])==null?void 0:fr.replaceAll("'","");let Wa=((Ct=(st=(Ua=(Ba=(Oa=(wr=c==null?void 0:c[Ln])==null?void 0:wr.find(oe=>{var Dr,Oe;return((Oe=(Dr=oe==null?void 0:oe.value)==null?void 0:Dr.pageData)==null?void 0:Oe.name)===cr}))==null?void 0:Oa.value)==null?void 0:Ba.pageData)==null?void 0:Ua.compData)==null?void 0:st.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Ct.contents)??[];if(Wa!=null&&Wa.some(oe=>oe==null?void 0:oe.columnPath)){let oe=await Tn(Ln,a,r,n,t,i,c);Wa=(Rt=(_t=(Ot=oe==null?void 0:oe.find(Dr=>(Dr==null?void 0:Dr.name)===cr))==null?void 0:Ot.compData)==null?void 0:_t.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:Rt.contents}me.contents=Wa}else if((Pt=(Nt=M==null?void 0:M.find(pa=>(pa==null?void 0:pa.key)==="relatedFilter"))==null?void 0:Nt.contents)!=null&&Pt.length){let pa=(k=M==null?void 0:M.find(Oe=>(Oe==null?void 0:Oe.key)==="relatedFilter"))==null?void 0:k.contents,Ln=(N=pa==null?void 0:pa.split("["))==null?void 0:N[0],cr=(K=(R=(O=(C=(F=pa==null?void 0:pa.replace("[",Ir))==null?void 0:F.split(Ir))==null?void 0:C[1])==null?void 0:O.replace("]",Ir))==null?void 0:R.split(Ir))==null?void 0:K[0],Wa=(j=(V=(Y=cr==null?void 0:cr.split("["))==null?void 0:Y[1])==null?void 0:V.replaceAll("'",""))==null?void 0:j.split(",");cr=(J=cr==null?void 0:cr.split("["))==null?void 0:J[0],cr=((Ee=(_e=cr==null?void 0:cr.split(":"))==null?void 0:_e[((le=cr==null?void 0:cr.split(":"))==null?void 0:le.length)-1])==null?void 0:Ee.replaceAll("'",""))===""?(qe=(ge=cr==null?void 0:cr.split(":"))==null?void 0:ge[((ue=cr==null?void 0:cr.split(":"))==null?void 0:ue.length)-2])==null?void 0:qe.replaceAll("'",""):($r=(Mr=cr==null?void 0:cr.split(":"))==null?void 0:Mr[((Er=cr==null?void 0:cr.split(":"))==null?void 0:Er.length)-1])==null?void 0:$r.replaceAll("'","");let oe=((er=(Nn=(Mt=(fn=(sn=(nn=c==null?void 0:c[Ln])==null?void 0:nn.find(Oe=>{var Ra,Za;return((Za=(Ra=Oe==null?void 0:Oe.value)==null?void 0:Ra.pageData)==null?void 0:Za.name)===cr}))==null?void 0:sn.value)==null?void 0:fn.pageData)==null?void 0:Mt.compData)==null?void 0:Nn.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:er.contents)??[];if(oe!=null&&oe.some(Oe=>Oe==null?void 0:Oe.columnPath)){let Oe=await Tn(Ln,a,r,n,t,i,c);oe=(M0=(Pn=(pe=Oe==null?void 0:Oe.find(Ra=>(Ra==null?void 0:Ra.name)===cr))==null?void 0:pe.compData)==null?void 0:Pn.find(Ra=>(Ra==null?void 0:Ra.key)==="header"))==null?void 0:M0.contents}(Wa==null?void 0:Wa.length)>0&&(oe=oe==null?void 0:oe.filter(Oe=>Wa==null?void 0:Wa.find(Ra=>Ra===(Oe==null?void 0:Oe.prop))));let Dr=(Mn=M==null?void 0:M.find(Oe=>(Oe==null?void 0:Oe.key)==="relatedFilter"))==null?void 0:Mn.index;if(Dr!==""){Dr=parseInt(Dr);let Oe=((Vr=me.contents)==null?void 0:Vr.slice(Dr,me.contents.length))??[],Ra=[...(Ge=me.contents)==null?void 0:Ge.slice(0,Dr),...oe];Ra=[...Ra,...Oe],me.contents=Ra}}}return me})),M=await Promise.all(M);const Se=((D=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="contentTableId"))==null?void 0:D.contents)??I.id;let Ne=Ci((b=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===Se))==null?void 0:b.contents,(X=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:X.contents),Be=await mx((re=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:re.contents,e,(ee=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="tableFilter"))==null?void 0:ee.contents,c);if((q=(Q=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)!=null&&q.find(me=>(me==null?void 0:me.filterContent)&&(me==null?void 0:me.filterContent)!=="")){let me=(Pe=(P=(we=M==null?void 0:M.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:we.contents)==null?void 0:P.find(hr=>(hr==null?void 0:hr.filterContent)&&(hr==null?void 0:hr.filterContent)!==""))==null?void 0:Pe.filterContent;me=(Ie=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))==null?void 0:Ie.split(",");let Fr=me==null?void 0:me.map(hr=>{var xa,aa;let kr=V0==null?void 0:V0.find(We=>hr==null?void 0:hr.includes(We==null?void 0:We.key));if(kr)return{order:kr==null?void 0:kr.order,value:kr==null?void 0:kr.value,content:(aa=(xa=hr==null?void 0:hr.replaceAll("/",":"))==null?void 0:xa.replaceAll(":","="))==null?void 0:aa.replace("=",":")}});M!=null&&M.every(hr=>Array.isArray(hr))||(M=[M]),await(async()=>{var hr,kr,xa;for(const aa of Fr??[])if(aa){const We=(xa=(kr=(hr=aa==null?void 0:aa.content)==null?void 0:hr.replace(":",Ir))==null?void 0:kr.split(Ir))==null?void 0:xa[1];M=await no((aa==null?void 0:aa.value)+"('"+JSON.stringify(M).replaceAll("'",'"')+"','"+We+"','')")??[]??M}})(),M=M==null?void 0:M[0]}Be!=null&&Be.mainKeys&&M.push({key:"mainRouters",contents:Be==null?void 0:Be.mainKeys});let Ta=[],Qe=[];Array.isArray(Be)&&(Ta=Ci(Be,(je=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:je.contents)),Array.isArray(Be==null?void 0:Be.tableContents)&&(Qe=Ci(Be==null?void 0:Be.tableContents,(Le=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Le.contents));let br=[...Ta,...Qe];Array.isArray(Ne)&&(Ne==null?void 0:Ne.length)>0&&(br=[...br,...Ne]),M.push({key:"tableContents",contents:br}),M=M==null?void 0:M.map(me=>{var Fr,Or;return(me==null?void 0:me.key)==="header"&&((Fr=me.contents)==null?void 0:Fr.length)!==0&&(me.contents=(Or=me.contents)==null?void 0:Or.map(hr=>((hr==null?void 0:hr.prop)===(Be==null?void 0:Be.mainKey)&&(hr.isMainKey=!0),hr))),me})}else M&&((ie=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))!=null&&ie.contents)&&(M=await ex(H.cloneDeep(M),W,l,c,e,f),M!=null&&M.every(Se=>Array.isArray(Se))||(M=[M]));if(typeof L!="string"&&(L.id=I==null?void 0:I.id,L.isShow=(ir=(ur=I==null?void 0:I.value)==null?void 0:ur.pageData)==null?void 0:ir.isShow),(M==null?void 0:M.length)>0&&M.every(Se=>Array.isArray(Se)))M==null||M.forEach(Se=>{var Ta,Qe,br,me,Fr;let Ne=H.cloneDeep(L);Ne.compData=Se,Ne.tableId=(Ta=Se==null?void 0:Se.find(Or=>(Or==null?void 0:Or.key)==="contentTableId"))==null?void 0:Ta.contents;let Be=(Qe=Se==null?void 0:Se.find(Or=>(Or==null?void 0:Or.key)==="name"))==null?void 0:Qe.contents;Be!=null&&Be.name0&&(Be==null?void 0:Be.name0)===(Ne==null?void 0:Ne.name)?(Ne.name0=Ne.name,Ne.name=Be==null?void 0:Be.name):Be!=null&&Be.name0&&(Ne.name1=Ne.name,Ne.name0=Be.name0,Ne.name=Be==null?void 0:Be.name),(br=Ne==null?void 0:Ne.compData)!=null&&br.every(Or=>Array.isArray(Or))?((me=Ne==null?void 0:Ne.compData)==null?void 0:me.length)===0?g.push(Ne):(Fr=Ne==null?void 0:Ne.compData)==null||Fr.forEach((Or,hr)=>{let kr;hr===0?kr={comp:Ne==null?void 0:Ne.comp,compData:Or,id:Ne==null?void 0:Ne.id,name:Ne==null?void 0:Ne.name,isShow:Ne==null?void 0:Ne.isShow}:kr={comp:Ne==null?void 0:Ne.comp,compData:Or,id:Ne==null?void 0:Ne.id,name:"",isShow:Ne==null?void 0:Ne.isShow},g.push(kr)}):g.push(Ne)});else if(((ka=I.key)==null?void 0:ka.type)==="structure")L.compData=M,(Da=L==null?void 0:L.compData)!=null&&Da.every(Se=>Array.isArray(Se))?((Tt=L==null?void 0:L.compData)==null?void 0:Tt.length)===0?g.push(L):(qa=L==null?void 0:L.compData)==null||qa.forEach((Se,Ne)=>{let Be;Ne===0?Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:L==null?void 0:L.name,isShow:L==null?void 0:L.isShow}:Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:"",isShow:L==null?void 0:L.isShow},g.push(Be)}):g.push(L);else if(((Ea=I.key)==null?void 0:Ea.type)==="method"){let Se;Se={name:"",compData:[L],comp:"calculator"},g.push(Se)}else if(((Ka=I==null?void 0:I.key)==null?void 0:Ka.type)==="related"){let Se;Se={name:"",compData:L,comp:""},g.push(Se)}}));return await Promise.all(y),((T=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:T.filter(I=>Object.values(I).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(B=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:B.filter(I=>Object.values(I).length>0)}),g=g.sort((I,U)=>I.orderId-U.orderId),g=await H1(g),i?g:await P1(e,g)},rx=async()=>{var e,a;try{let r=((e=Bc.value)==null?void 0:e.platform)||"browser";const n=((a=Bc.value)==null?void 0:a.chineseName)||"工业软件建模与开发系统";r!=="browser"&&r!=="client"&&r!=="three"&&(r="browser"),vf.setPlatform(r),vf.setPlatName(n)}catch(r){return Promise.reject(r)}},j0=Kr.ref(0),ax=H.useMenuState(H.pinia),tx=c0(H.pinia),{originalPath:yf}=H.storeToRefs(tx),nx=H.useLoginState(H.pinia),ix=Us(H.pinia),{multipleTableConst:ut}=H.storeToRefs(ix),{loginUserInfo:g0}=H.storeToRefs(nx),{activeMenuPath:sx}=H.storeToRefs(ax),fx=H.useModelComp(H.pinia),{pageMapState:ws}=H.storeToRefs(fx),en=yf.value,W0="/",Ss=(e,a,r)=>e==null?void 0:e.map(t=>{var i,s;if(j0.value++,Array.isArray(t))return Ss(t,a);{let f=((i=t==null?void 0:t.filter)==null?void 0:i.includes("@Readonly=true"))??!1;return{label:(t==null?void 0:t.label)==="操作"?a?"操作":"":(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+j0.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!1,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??j0.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:Ss(t.children,a)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(s=t==null?void 0:t.groupSelect)==null?void 0:s.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel),allSelectionContents:(t==null?void 0:t.allContents)??[],selectFilter:t==null?void 0:t.selectFilter,menuId:t==null?void 0:t.menuId,relatedValueId:t==null?void 0:t.relatedValueId,filterContent:t==null?void 0:t.filterContents,menus:t==null?void 0:t.menus,groups:t==null?void 0:t.groups,words:t==null?void 0:t.words,isExistChild:(t==null?void 0:t.isExistChild)??!1,mainKey:(t==null?void 0:t.mainKey)??!1,filter:t==null?void 0:t.filter,bindMenus:t==null?void 0:t.bindMenus,fatherPath:t==null?void 0:t.fatherPath,isMainPath:t==null?void 0:t.isMainPath,required:(t==null?void 0:t.required)??!1,functionName:t==null?void 0:t.functionName,functionRelatedWords:t==null?void 0:t.functionRelatedWords,calculatorFilter:t==null?void 0:t.calculatorFilter,isReadonly:f}}}),cx=e=>{const a=[];function r(n){if(Array.isArray(n))for(const t of n)!t.children||t.children.length===0?a.push(t):r(t.children)}return r(e),a},lx=(e,a,r)=>H.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(i=>{var f,l,c,o;(l=(f=sx.value)==null?void 0:f.split("/"))==null||l.forEach(u=>{var x,h,p;u!==""&&((p=(h=(x=u==null?void 0:u.split(yf+"updateLoading"))==null?void 0:x[0])==null?void 0:h.split(yf+"loading"))==null||p[0])});let s=((c=i==null?void 0:i.filter)==null?void 0:c.includes("@Readonly=true"))??!1;return Array.isArray(i)?i=Ss(i,a):(i={label:(i==null?void 0:i.label)==="操作"?a?"操作":"":(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":(i==null?void 0:i.prop)??"a"+j0.value,width:(i==null?void 0:i.label)==="操作"?"200":i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??j0.value,type:(i==null?void 0:i.label)==="操作"?"operate":void 0,formType:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":""),isHidden:i==null?void 0:i.isHidden,options:(i==null?void 0:i.options)??[],children:Ss(i.children,a),formMenuSelect:(i==null?void 0:i.formMenuSelect)??[],groupSelect:i!=null&&i.groupSelect?(o=i==null?void 0:i.groupSelect)==null?void 0:o.replaceAll('"',"").split(":"):[],isMainKey:(i==null?void 0:i.isMainKey)||!!(i!=null&&i.directiveLabel),allSelectionContents:(i==null?void 0:i.allContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,relatedValueId:i==null?void 0:i.relatedValueId,filterContent:i==null?void 0:i.filterContents,menus:i==null?void 0:i.menus,groups:i==null?void 0:i.groups,words:i==null?void 0:i.words,isExistChild:(i==null?void 0:i.isExistChild)??!1,mainKey:(i==null?void 0:i.mainKey)??!1,filter:i==null?void 0:i.filter,bindMenus:i==null?void 0:i.bindMenus,fatherPath:i==null?void 0:i.fatherPath,isMainPath:i==null?void 0:i.isMainPath,required:(i==null?void 0:i.required)??!1,functionName:i==null?void 0:i.functionName,functionRelatedWords:i==null?void 0:i.functionRelatedWords,calculatorFilter:i==null?void 0:i.calculatorFilter,isReadonly:s},j0.value++),i})),t)),vn=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(r==null||r.forEach(s=>{var f,l,c,o,u,x,h,p,d,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(l=s==null?void 0:s.prop)==null?void 0:l.split(ut.value))==null?void 0:u[((o=(c=s==null?void 0:s.prop)==null?void 0:c.split(ut.value))==null?void 0:o.length)-1]):t+ut.value+((d=(x=s==null?void 0:s.prop)==null?void 0:x.split(ut.value))==null?void 0:d[((p=(h=s==null?void 0:s.prop)==null?void 0:h.split(ut.value))==null?void 0:p.length)-1]);i=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ut.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ut.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ut.value))==null?void 0:y.length)-1])),i.push(s)})),i}return a(e)},ox=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(i=r==null?void 0:r.map(s=>{var f,l,c,o,u,x,h,p,d,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(l=s==null?void 0:s.prop)==null?void 0:l.split(ut.value))==null?void 0:u[((o=(c=s==null?void 0:s.prop)==null?void 0:c.split(ut.value))==null?void 0:o.length)-1]):t+ut.value+((d=(x=s==null?void 0:s.prop)==null?void 0:x.split(ut.value))==null?void 0:d[((p=(h=s==null?void 0:s.prop)==null?void 0:h.split(ut.value))==null?void 0:p.length)-1]);s.children=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ut.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ut.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ut.value))==null?void 0:y.length)-1]));return s})),i}return a(e)},ux=e=>{let a=H.cloneDeep(e);return a=a==null?void 0:a.map(r=>((r==null?void 0:r.type)==="Select"?r={label:r==null?void 0:r.label,prop:r==null?void 0:r.prop,name:r==null?void 0:r.name,type:r==null?void 0:r.type,value:(r==null?void 0:r.value)??"",optionUrl:{groupSelect:r==null?void 0:r.groupSelect,menuSelect:r==null?void 0:r.menuSelect,type:"Select",selectRelateType:r==null?void 0:r.selectRelateType,multiple:r==null?void 0:r.multiple}}:(r==null?void 0:r.type)==="Date"&&(r.value=!(r!=null&&r.value)&&(r==null?void 0:r.isNewDate)!==!1?new Date:r==null?void 0:r.value),r.label=r.prop||r.label,r)),a},io=e=>{var a,r,n,t,i,s;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let f=(n=(r=e==null?void 0:e.pageData)==null?void 0:r.compData)==null?void 0:n.map(c=>{var o;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(o=c.contents)==null?void 0:o.map(u=>((u==null?void 0:u.type)==="Date"&&(u.value=""),u))),c});return{pageData:{comp:(t=e==null?void 0:e.pageData)==null?void 0:t.comp,compData:f,name:(i=e==null?void 0:e.pageData)==null?void 0:i.name,isShow:(s=e==null?void 0:e.pageData)==null?void 0:s.isShow}}}else return e},so=(e,a)=>{var n,t,i,s,f,l,c,o,u;let r=(i=(t=(n=a==null?void 0:a.pageData)==null?void 0:n.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:i.contents;if(((s=e==null?void 0:e.pageData)==null?void 0:s.comp)==="Form"){let x=(l=(f=e==null?void 0:e.pageData)==null?void 0:f.compData)==null?void 0:l.map(p=>{var d;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(d=p.contents)==null?void 0:d.map(m=>{var g;return m.value=(g=r==null?void 0:r.find(y=>(y==null?void 0:y.key)===(m==null?void 0:m.key)))==null?void 0:g.value,m})),p});return{pageData:{comp:(c=e==null?void 0:e.pageData)==null?void 0:c.comp,compData:x,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(u=e==null?void 0:e.pageData)==null?void 0:u.isShow}}}else return e},Nf=async(e,a,r,n,t)=>{var d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==en&&(i="",(m=(d=H.cloneDeep(e))==null?void 0:d.split(en))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=H.cloneDeep(e))==null?void 0:D.split(en))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+en);let s=[],f=await ca.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const l={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let c;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==en&&(c={data:{result:(v=ws.value[i])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=c==null?void 0:c.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(c=(T=(S=H.cloneDeep(c))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=ws.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==en){let _=(L=l==null?void 0:l.data)==null?void 0:L.result;if(!Array.isArray(c))return;c==null||c.forEach(A=>{var b,X,re,ee,Q;let D=(b=_==null?void 0:_.find(q=>{var we,P,Pe,Ie;return((P=(we=A==null?void 0:A.value)==null?void 0:we.pageData)==null?void 0:P.name)===((Ie=(Pe=q==null?void 0:q.value)==null?void 0:Pe.pageData)==null?void 0:Ie.name)}))==null?void 0:b.value;D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((X=D==null?void 0:D.key)==null?void 0:X.parentTable)??"",systemKey:(re=A==null?void 0:A.key)==null?void 0:re.systemKey,type:((ee=D==null?void 0:D.key)==null?void 0:ee.type)??((Q=A==null?void 0:A.key)==null?void 0:Q.type),version:1},value:so(A==null?void 0:A.value,D)})})}else(M=(W=l==null?void 0:l.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:io(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D,b;return((D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null?void 0:D.comp)==="Form"&&(_.value.pageData.compData=(b=_.value.pageData.compData)==null?void 0:b.map(X=>{var re;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(re=X.contents)==null?void 0:re.map(ee=>(r!=null&&r[ee==null?void 0:ee.key]&&(ee==null?void 0:ee.type)!=="Date"&&(ee.value=r[ee.key]),ee))),X}),n&&_.value.pageData.compData.push({key:"parentFormPath",contents:n})),_}),(s==null?void 0:s.length)>0){let _;if(!t)_=s;else{const A=s==null?void 0:s.find(b=>{var X,re;return t==null?void 0:t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)}),D=/^[A-Za-z]+$/;_=A?s==null?void 0:s.map(b=>{var X,re,ee,Q,q,we;return t!=null&&t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)?{...b,value:{pageData:{...(ee=b==null?void 0:b.value)==null?void 0:ee.pageData,compData:(we=(q=(Q=b==null?void 0:b.value)==null?void 0:Q.pageData)==null?void 0:q.compData)==null?void 0:we.map(P=>{var Pe;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(Pe=P==null?void 0:P.contents)==null?void 0:Pe.map(Ie=>D.test(Ie==null?void 0:Ie.prop)?Ie:{...Ie,value:""})}:P})}}}:b}):s}await ca.batchAddInsofDataApi({dataList:_})}let x={};const h=await ca.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=l==null?void 0:l.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=l==null?void 0:l.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b;x[_.id]=(b=(D=(A=h==null?void 0:h.data)==null?void 0:A.result)==null?void 0:D.find(X=>{var re,ee,Q,q;return((ee=(re=X==null?void 0:X.value)==null?void 0:re.pageData)==null?void 0:ee.name)===((q=(Q=_==null?void 0:_.value)==null?void 0:Q.pageData)==null?void 0:q.name)}))==null?void 0:b.id}));let p=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;p.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(p==null?void 0:p.length)>0&&await ca.batchAddInsofDataApi({dataList:p})},hx=async(e,a,r,n,t)=>{var d,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==W0&&(i="",(m=(d=H.cloneDeep(e))==null?void 0:d.split(W0))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=H.cloneDeep(e))==null?void 0:D.split(W0))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+W0);let s=[],f=await ca.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const l={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let c;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==W0&&(c={data:{result:(v=ws.value[e])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=c==null?void 0:c.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(c=(T=(S=H.cloneDeep(c))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=ws.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==W0){let _=(L=l==null?void 0:l.data)==null?void 0:L.result;if(!Array.isArray(c))return;c==null||c.forEach(A=>{var b,X,re,ee,Q,q,we,P;let D;(X=(b=A==null?void 0:A.value)==null?void 0:b.pageData)!=null&&X.name0?D=(re=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie,ur,ir,ka,Da;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)&&((ir=(ur=A==null?void 0:A.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)===((Da=(ka=Pe==null?void 0:Pe.value)==null?void 0:ka.pageData)==null?void 0:Da.name0)}))==null?void 0:re.value:D=(ee=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)}))==null?void 0:ee.value,D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((Q=D==null?void 0:D.key)==null?void 0:Q.parentTable)??"",systemKey:(q=A==null?void 0:A.key)==null?void 0:q.systemKey,type:((we=D==null?void 0:D.key)==null?void 0:we.type)??((P=A==null?void 0:A.key)==null?void 0:P.type),version:1},value:so(A==null?void 0:A.value,D)})})}else(M=(W=l==null?void 0:l.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:io(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D;return(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null||D.comp,_}),(s==null?void 0:s.length)>0){let _;_=s,await ca.batchAddInsofDataApi({dataList:_})}let x={};const h=await ca.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=l==null?void 0:l.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=l==null?void 0:l.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b,X,re,ee,Q,q;(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)!=null&&D.name0?x[_.id]=(re=(X=(b=h==null?void 0:h.data)==null?void 0:b.result)==null?void 0:X.find(we=>{var P,Pe,Ie,je,Le,ie,ur,ir;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)&&((ie=(Le=we==null?void 0:we.value)==null?void 0:Le.pageData)==null?void 0:ie.name0)===((ir=(ur=_==null?void 0:_.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)}))==null?void 0:re.id:x[_.id]=(q=(Q=(ee=h==null?void 0:h.data)==null?void 0:ee.result)==null?void 0:Q.find(we=>{var P,Pe,Ie,je;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)}))==null?void 0:q.id}));let p=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;p.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(p==null?void 0:p.length)>0&&await ca.batchAddInsofDataApi({dataList:p})},fo=(e,a)=>{let r=H.cloneDeep(e);return r=r==null?void 0:r.map(t=>{var l,c,o;let i=[],s=[];for(let u in a)if(u!=null&&u.includes((c=(l=H.cloneDeep(t))==null?void 0:l.key)==null?void 0:c.pageKey)){let x=(o=a[u])==null?void 0:o.filter(h=>{var p,d,m;return((p=h==null?void 0:h.key)==null?void 0:p.type)==="data"&&((d=h==null?void 0:h.key)==null?void 0:d.tableId)===((m=H.cloneDeep(t))==null?void 0:m.id)});s=[...s,...x]}(s==null?void 0:s.length)>0&&(s==null||s.forEach(u=>{i.push(u.value.tableData)}));let f=H.cloneDeep(t).value.pageData.compData;return f.push({key:"tableContents",contents:i}),t.value.pageData.compData=f,t}),r},co=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var l;(f==null?void 0:f.key)==="header"&&((l=f==null?void 0:f.contents)==null||l.forEach((c,o)=>{(c==null?void 0:c.prop)===(r==null?void 0:r[1])&&(t=o)}))}))}),t},lo=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var l;(f==null?void 0:f.key)==="formContent"&&((l=f==null?void 0:f.contents)==null||l.forEach(c=>{(c==null?void 0:c.prop)===(r==null?void 0:r[1])&&(t=c==null?void 0:c.value)}))}))}),t},Uc=(e,a,r,n)=>{var l,c,o;let t=(l=e==null?void 0:e[0])==null?void 0:l.formMenuSelect,i=e==null?void 0:e.map(u=>{var x,h;return(h=(x=u.groupSelect)==null?void 0:x.split(":"))==null?void 0:h[1]}),s="";t==null||t.forEach((u,x)=>{(t==null?void 0:t.length)-1!==x?s=s===""?s+u:s+"/"+u:s=s+en+u});let f=[];for(let u in a)if(u!=null&&u.includes(s)){let x=(c=a[u])==null?void 0:c.filter(h=>{var p,d;return((p=h==null?void 0:h.key)==null?void 0:p.type)==="structure"&&((d=h==null?void 0:h.key)==null?void 0:d.parentTable)===""});f=[...f,...x]}if((f==null?void 0:f.length)>0){let u=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Form"}),x=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Table"});x=fo(H.cloneDeep(x),a),u=[...H.cloneDeep(u),...x],u=u==null?void 0:u.map(m=>({[m.key.pageKey]:m}));let h=0;u=u.reduce((m,g)=>(Object.keys(g).forEach(y=>{m[y]||(m[y]=[],m[y].push({index:h})),m[y].push(g[y])}),h++,m),{});let p=(o=Object.values(u))==null?void 0:o.sort((m,g)=>{var E,w;let y=(E=m==null?void 0:m.find(S=>S==null?void 0:S.index))==null?void 0:E.index,v=(w=g==null?void 0:g.find(S=>S==null?void 0:S.index))==null?void 0:w.index;return y-v});u=p==null?void 0:p.map(m=>m==null?void 0:m.filter(g=>{var y,v,E,w;return!(g!=null&&g.index)&&(g==null?void 0:g.index)!==0&&!((v=(y=g==null?void 0:g.key)==null?void 0:y.pageKey)!=null&&v.includes("updateLoading"))&&!((w=(E=g==null?void 0:g.key)==null?void 0:E.pageKey)!=null&&w.includes("loading"))}));let d=[];if(u==null||u.forEach(m=>{var v,E,w,S,T,B,I,U,L,W;const g=m==null?void 0:m.find(M=>{var se,ne,he,ce,be;return((ne=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:ne.name)===((be=(ce=(he=e==null?void 0:e[0])==null?void 0:he.groupSelect)==null?void 0:ce.split(":"))==null?void 0:be[0])});let y=(T=(S=(w=(E=(v=H.cloneDeep(g))==null?void 0:v.value)==null?void 0:E.pageData)==null?void 0:w.compData)==null?void 0:S.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:T.contents;if(y){let M=[];i==null||i.forEach((se,ne)=>{var be,z,Te,Ae,_,A;let he=m==null?void 0:m.find(D=>{var b,X,re,ee,Q;return((X=(b=D==null?void 0:D.value)==null?void 0:b.pageData)==null?void 0:X.name)===((Q=(ee=(re=e==null?void 0:e[ne])==null?void 0:re.groupSelect)==null?void 0:ee.split(":"))==null?void 0:Q[0])}),ce=(_=(Ae=(Te=(z=(be=H.cloneDeep(he))==null?void 0:be.value)==null?void 0:z.pageData)==null?void 0:Te.compData)==null?void 0:Ae.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:_.contents;ce!=null&&ce.find(D=>(D==null?void 0:D.key)===se)?M.push((A=ce==null?void 0:ce.find(D=>(D==null?void 0:D.key)===se))==null?void 0:A.value):M.push("")}),d.push(M)}else y=(W=(L=(U=(I=(B=H.cloneDeep(g))==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:U.compData)==null?void 0:L.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:W.contents,y==null||y.forEach(M=>{let se=[];i==null||i.forEach(ne=>{M!=null&&M[ne]&&se.push(M==null?void 0:M[ne])}),d.push(se)})}),(r==null?void 0:r.length)>0){let m={};r==null||r.forEach(g=>{var y;for(let v in g){let E=H.cloneDeep(v);if(!(E!=null&&E.includes("[")))(y=g[v])!=null&&y.includes("[")||(m[E]=g[v]);else{let w=lo(E,a[n]),S=co(g[v],a[n]);m[w]=S}}});for(let g in m)d=d==null?void 0:d.filter(y=>y[m[g]]===g)}return d}},xx=(e,a,r,n)=>{var f,l,c,o,u;let t=H.cloneDeep(e),i=a==null?void 0:a.map(x=>x==null?void 0:x.prop),s=[];for(let x in r)if(x!=null&&x.includes(t)){let h=(f=r[x])==null?void 0:f.filter(p=>{var d,m;return((d=p==null?void 0:p.key)==null?void 0:d.type)==="structure"&&((m=p==null?void 0:p.key)==null?void 0:m.parentTable)===""});s=[...s,...h]}if((s==null?void 0:s.length)>0){let x=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(t+en))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))}),h=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(t+en))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))});h=fo(H.cloneDeep(h),r),x=[...H.cloneDeep(x),...h],x=x==null?void 0:x.map(E=>({[E.key.pageKey]:E}));let p=0;x=x.reduce((E,w)=>(Object.keys(w).forEach(S=>{E[S]||(E[S]=[],E[S].push({index:p})),E[S].push(w[S])}),p++,E),{}),x=ao(x,!0,r);let d=(l=Object.values(x))==null?void 0:l.sort((E,w)=>{var B,I;let S=(B=E==null?void 0:E.find(U=>U==null?void 0:U.index))==null?void 0:B.index,T=(I=w==null?void 0:w.find(U=>U==null?void 0:U.index))==null?void 0:I.index;return S-T});x=d==null?void 0:d.map(E=>E==null?void 0:E.filter(w=>!(w!=null&&w.index)&&(w==null?void 0:w.index)!==0));let m=(c=H.cloneDeep(x))==null?void 0:c.filter(E=>E==null?void 0:E.find(w=>{var S,T,B,I;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===en}));x=x==null?void 0:x.filter(E=>!(E!=null&&E.find(w=>{var S,T,B,I,U,L,W,M;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===en||((L=(U=w==null?void 0:w.key)==null?void 0:U.pageKey)==null?void 0:L.includes("updateLoading"))||((M=(W=w==null?void 0:w.key)==null?void 0:W.pageKey)==null?void 0:M.includes("loading"))})));let g=[],y=[];(o=m==null?void 0:m[0])==null||o.forEach(E=>{var w,S,T,B,I;((S=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:S.comp)==="Form"&&((I=(B=(T=E==null?void 0:E.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||I.forEach(U=>{(U==null?void 0:U.key)==="formContent"&&(y=[...y,...U==null?void 0:U.contents])}))});let v=(u=y==null?void 0:y.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:u.key;if(x==null||x.forEach(E=>{let w=[];E==null||E.forEach(T=>{var B,I,U,L,W;((I=(B=T==null?void 0:T.value)==null?void 0:B.pageData)==null?void 0:I.comp)==="Form"&&((W=(L=(U=T==null?void 0:T.value)==null?void 0:U.pageData)==null?void 0:L.compData)==null||W.forEach(M=>{(M==null?void 0:M.key)==="formContent"&&(w=[...w,...M==null?void 0:M.contents])}))});let S={};i==null||i.forEach(T=>{let B=w==null?void 0:w.find(I=>(I==null?void 0:I.key)===T);B!=null&&B.prop&&(S[B.prop]=(B==null?void 0:B.value)??"")}),g.push(S)}),(n==null?void 0:n.length)>0){let E=[];n==null||n.forEach(w=>{var I,U,L,W,M,se,ne,he,ce;let S={};for(let be in w){let z=H.cloneDeep(be);if(!(z!=null&&z.includes("[")))((I=w[be])==null?void 0:I.toUpperCase())==="@LOGINUSER"?S[z]=((U=g0.value)==null?void 0:U.姓名)||((L=g0.value)==null?void 0:L.account)||((W=g0.value)==null?void 0:W.账号)||((M=g0.value)==null?void 0:M.姓名):(se=w[be])!=null&&se.includes("[")||(S[z]=w[be]);else{let Te=lo(z,r[e]),Ae=co(w[be],r[e]);S[Te]=Ae}}let T=[],B=0;for(let be in S)((ne=S[be])==null?void 0:ne[0])!=="!"?T=(he=B>0?T:g)==null?void 0:he.filter(Te=>Te[be]===S[be]):T=(ce=B>0?T:g)==null?void 0:ce.filter(z=>{var Te;return z[be]!==((Te=S[be])==null?void 0:Te.replaceAll("!",""))}),B=1;E=[...E,...T]}),g=[...new Set(E)]}return g=g==null?void 0:g.map(E=>Object.values(E)),{mainKey:v,tableContents:g}}},px=(e,a)=>{var t,i,s,f,l,c;let r=(i=(t=H.cloneDeep(e))==null?void 0:t.split("/"))==null?void 0:i[0],n=[];for(let o in a)if(o!=null&&o.includes(r)){let u=(s=a[o])==null?void 0:s.filter(x=>{var h,p;return((h=x==null?void 0:x.key)==null?void 0:h.type)==="structure"&&((p=x==null?void 0:x.key)==null?void 0:p.parentTable)===""});n=[...n,...u]}return(n==null?void 0:n.length)>0?!!((c=(l=(f=n==null?void 0:n.filter(u=>{var x;return((x=u==null?void 0:u.key)==null?void 0:x.pageKey)===r}))==null?void 0:f[0])==null?void 0:l.key)==null?void 0:c.parentPageKey):!0},dx=async(e,a,r,n)=>{var s,f,l,c,o,u,x,h,p;let t=(f=(s=H.cloneDeep(e))==null?void 0:s.split("/"))==null?void 0:f[0],i=[];for(let d in n)if(d!=null&&d.includes(t)){let m=(l=n[d])==null?void 0:l.filter(g=>{var y,v;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((v=g==null?void 0:g.key)==null?void 0:v.parentTable)===""});i=[...i,...m]}if((i==null?void 0:i.length)>0){let d=(u=(o=(c=i==null?void 0:i.filter(y=>{var v;return((v=y==null?void 0:y.key)==null?void 0:v.pageKey)===t}))==null?void 0:c[0])==null?void 0:o.key)==null?void 0:u.parentPageKey,m=[];if(d){for(let y in n)if(y!=null&&y.includes(d)){let v=(x=n[y])==null?void 0:x.filter(E=>{var w,S;return((w=E==null?void 0:E.key)==null?void 0:w.type)==="structure"&&((S=E==null?void 0:E.key)==null?void 0:S.parentTable)===""});m=[...m,...v]}}else m=i;let g="";if((m==null?void 0:m.length)>0){let y=[],v;v=(h=m==null?void 0:m.filter(U=>{var L,W,M,se,ne,he;return((M=(W=(L=U==null?void 0:U.key)==null?void 0:L.pageKey)==null?void 0:W.split("/"))==null?void 0:M[0])===d&&((he=(ne=(se=U==null?void 0:U.key)==null?void 0:se.pageKey)==null?void 0:ne.split("/"))==null?void 0:he.length)===2}))==null?void 0:h.map(U=>{var L;return(L=U==null?void 0:U.key)==null?void 0:L.pageKey}),v=[...new Set(v)],v=v==null?void 0:v.filter(U=>!U.includes(en));let E=(p=H.cloneDeep(v))==null?void 0:p.map(async U=>{var ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q;let L=await Tn(U,sessionStorage.getItem("systemKey"),"",!1,[],!1,n),W=(be=(ce=(he=(ne=H.cloneDeep(L))==null?void 0:ne[0])==null?void 0:he.compData)==null?void 0:ce.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:be.contents,M=(D=(A=(_=(Ae=(Te=(z=H.cloneDeep(L))==null?void 0:z[0])==null?void 0:Te.compData)==null?void 0:Ae.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:_.contents)==null?void 0:A.filter(q=>(q==null?void 0:q.label)!=="操作"))==null?void 0:D.map(q=>q==null?void 0:q.prop),se=[];return(Q=(ee=(re=(X=(b=H.cloneDeep(L))==null?void 0:b[0])==null?void 0:X.compData)==null?void 0:re.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ee.contents)==null||Q.forEach(q=>{(q==null?void 0:q.isMainKey)===!0&&(g=q==null?void 0:q.prop)}),W==null||W.forEach(q=>{let we=d0(q,M);se.push(we),y.push({key:we==null?void 0:we[g],routerContent:U})}),se}),w=await Promise.all(E),S=[];w==null||w.forEach(U=>{(U==null?void 0:U.length)>0&&(U==null||U.forEach(L=>{S.push(L)}))});let T=[];T=a==null?void 0:a.map(U=>{var W,M,se;let L={};for(let ne in U)U[ne].toUpperCase()==="@LOGINUSER"?L[ne]=((W=g0.value)==null?void 0:W.姓名)||((M=g0.value)==null?void 0:M.account)||((se=g0.value)==null?void 0:se.账号):L[ne]=U[ne];return L});let B=[];S==null||S.forEach(U=>{let L=[];T==null||T.forEach(W=>{let M=[];for(let se in W)M.push(U[se]===W[se]);L.push(M)}),L.find(W=>W==null?void 0:W.every(M=>M===!0))&&B.push(U)});let I=[];return B==null||B.forEach(U=>{let L={};r==null||r.forEach(W=>{L[W.prop]=U[W.prop]??""}),I.push(L)}),I=I==null?void 0:I.map(U=>Object.values(U)),{mainKey:g,tableContents:I,mainKeys:y}}else return}else return},mx=async(e,a,r,n)=>{var i,s,f,l;let t=(i=H.cloneDeep(e))==null?void 0:i.filter(c=>(c==null?void 0:c.label)!=="操作");if((r==null?void 0:r.length)>0&&(t!=null&&t.every(c=>!(c!=null&&c.formMenuSelect)))&&px(a,n)){let c=await dx(a,r,t,n);return c&&((s=c==null?void 0:c.tableContents)==null?void 0:s.length)>0?c:[]}if(!(t!=null&&t.every(c=>{var o,u,x,h;return((o=c==null?void 0:c.formMenuSelect)==null?void 0:o.length)>0&&((x=(u=c==null?void 0:c.groupSelect)==null?void 0:u.split(":"))==null?void 0:x.length)>0||((h=c==null?void 0:c.formMenuGroup)==null?void 0:h.length)>0})))return xx(a,t,n,r);if(t!=null&&t.every(c=>!(c!=null&&c.formMenuGroup)))return Uc(t,n,r,a);{let c=[];(l=(f=t==null?void 0:t[0])==null?void 0:f.formMenuGroup)==null||l.forEach((h,p)=>{let d=[];t==null||t.forEach(m=>{var g,y,v,E,w,S;d.push({columnPath:m==null?void 0:m.columnPath,formMenuSelect:(v=((g=m==null?void 0:m.formMenuGroup)==null?void 0:g[p])??((y=m==null?void 0:m.formMenuGroup)==null?void 0:y[0]))==null?void 0:v.formMenuSelect,groupSelect:(S=((E=m==null?void 0:m.formMenuGroup)==null?void 0:E[p])??((w=m==null?void 0:m.formMenuGroup)==null?void 0:w[0]))==null?void 0:S.groupSelect,isRoute:m==null?void 0:m.isRoute,label:m==null?void 0:m.label,prop:m==null?void 0:m.label})}),c.push(d)});let o=[],x=c==null?void 0:c.map(async h=>Uc(h,n,r,a));return x==null||x.forEach(h=>{h==null||h.forEach(p=>{o.push(p)})}),o}},gx=c0(H.pinia),{originalPath:oo}=H.storeToRefs(gx),vx=H.useUnit(H.pinia),{chooseTitle:Un}=H.storeToRefs(vx),_x=H.useMenuState(H.pinia),{activeMenuPath:Qs}=H.storeToRefs(_x),Pf=async()=>void 0,yx=e=>{var n,t,i;const a=(t=(n=e==null?void 0:e.compData)==null?void 0:n.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:t.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:a!=null&&a.every(s=>!Array.isArray(s))?a==null?void 0:a.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label})):(i=vn(a==null?void 0:a[0]))==null?void 0:i.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label}))}},uo=async(e,a)=>{var i,s,f,l,c,o,u,x;let r="";(i=H.cloneDeep(e))==null||i.forEach(h=>{var p;h!=null&&h.includes(":")?(p=h==null?void 0:h.split(":"))==null||p.forEach(d=>{r=r===""?r+d:r+"/"+d}):r=r===""?r+h:r+"/"+h}),(r===""||Qs.value===r)&&((f=(s=Un==null?void 0:Un.value)==null?void 0:s[0])!=null&&f.value?r=Qs.value+"/"+((c=(l=Un==null?void 0:Un.value)==null?void 0:l[0])==null?void 0:c.value):r=Qs.value);let n="";(o=H.cloneDeep(e))==null||o.forEach((h,p)=>{p!==(e==null?void 0:e.length)-1?n=n===""?n+h:n+"/"+h:n=h===""?n:n+oo.value+h}),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((x=(u=Un==null?void 0:Un.value)==null?void 0:u[0])==null?void 0:x.value));const t=await Tn(r,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0);return t||await Tn(n,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0)},kx=e=>e.entries().next().done,Ex=async e=>{var n,t,i;const a=await uo(e);let r=[];return((n=a==null?void 0:a.data)==null?void 0:n.type)==="success"&&(r=(i=(t=a.data.result)==null?void 0:t.map(s=>s.value.pageData))==null?void 0:i.filter(s=>(s==null?void 0:s.comp)==="Table"),r=r==null?void 0:r.map(s=>yx(s))),r},Tx=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],I0=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],wx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],Sx=async()=>{const e=await Pf();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},Ax=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await Pf()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],Fx=Kr.computed(async()=>await Sx()),Dx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],Ix=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"value",label:"固定值",type:"Input"}],bx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0},{key:"originalContent",label:"初始值",type:"Input"}],Wc=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0}],Cx=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:I0}],Ox=[{key:"Input",value:wx},{key:"Select",value:Fx},{key:"Date",value:Dx},{key:"TextArea",value:bx},{key:"Upload",value:Wc},{key:"DragUpload",value:Wc},{key:"Quill",value:Cx},{key:"Link",value:Ix}],Rx=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Nx=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Rx},{key:"background",label:"颜色",type:"Color"}],Px=e=>{var r,n,t,i,s,f,l,c;let a=H.cloneDeep(e);if(((r=a==null?void 0:a.find(o=>(o==null?void 0:o.name)==="类型"))==null?void 0:r.type)==="Select"&&((i=(t=(n=H.cloneDeep(a))==null?void 0:n.find(o=>(o==null?void 0:o.name)==="选项值"))==null?void 0:t.value)==null?void 0:i.length)>0){const o=(c=(l=(f=(s=H.cloneDeep(a))==null?void 0:s.find(u=>(u==null?void 0:u.name)==="选项值"))==null?void 0:f.value)==null?void 0:l.split(","))==null?void 0:c.map(u=>({label:u,value:u}));a=a==null?void 0:a.map(u=>((u==null?void 0:u.name)==="初始值"&&(u.contents=o,u.value=(u==null?void 0:u.value)??""),u))}return a},Mx=async e=>{var i,s,f,l;let a=H.cloneDeep(e);const r=(i=e==null?void 0:e.find(c=>(c==null?void 0:c.name)==="下拉绑定类型"))==null?void 0:i.value,n=(s=e==null?void 0:e.find(c=>(c==null?void 0:c.name)==="类型"))==null?void 0:s.value,t=await Ax();return n==="Select"&&r===""?a=a==null?void 0:a.filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项"&&(c==null?void 0:c.name)!=="选项值"):n==="Select"&&r==="关联绑定列"?a!=null&&a.find(c=>(c==null?void 0:c.name)==="菜单选项"||(c==null?void 0:c.name)==="组信息选项")?a=(f=H.cloneDeep(a))==null?void 0:f.filter(c=>(c==null?void 0:c.name)!=="选项值"):a=[...H.cloneDeep(a),...t].filter(c=>(c==null?void 0:c.name)!=="选项值"):n==="Select"&&r==="自定义绑定"&&(a!=null&&a.find(c=>(c==null?void 0:c.name)==="选项值")?a=(l=H.cloneDeep(a))==null?void 0:l.filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项"):a=[...H.cloneDeep(a),...t].filter(c=>(c==null?void 0:c.name)!=="菜单选项"&&(c==null?void 0:c.name)!=="组信息选项")),a},Lx=(e,a)=>{var n;let r=!1;return(n=H.cloneDeep(e))==null||n.forEach(t=>{var i;(t==null?void 0:t.key)==="formContent"&&((i=t==null?void 0:t.contents)==null||i.forEach(s=>{(s==null?void 0:s.key)===a?r=!0:r=r}))}),r},ho=(e,a)=>{var s,f,l,c,o;const r=H.cloneDeep(e);if(!r)return;let n="";(f=(s=H.cloneDeep(r))==null?void 0:s.menuSelect)==null||f.forEach(u=>{u!=null&&u.includes("[")?n=n+oo.value:n=n===""?n+u:n+"/"+u});const t=(l=a==null?void 0:a[n])==null?void 0:l.map(u=>{var x;return(x=u==null?void 0:u.value)==null?void 0:x.pageData});let i=t==null?void 0:t.filter(u=>{var x,h;return(u==null?void 0:u.name)===((h=(x=H.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[0])});if((i==null?void 0:i.length)===1?i=i==null?void 0:i[0]:(c=H.cloneDeep(i))==null||c.forEach(u=>{var x,h;(u==null?void 0:u.comp)==="Form"&&Lx(u==null?void 0:u.compData,(h=(x=H.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[1])&&(i=u)}),(i==null?void 0:i.comp)==="Form"){let u="";return(o=i==null?void 0:i.compData)==null||o.forEach(x=>{var h;(x==null?void 0:x.key)==="formContent"&&((h=x==null?void 0:x.contents)==null||h.forEach(p=>{var d,m;(p==null?void 0:p.key)===((m=(d=H.cloneDeep(r))==null?void 0:d.groupSelect)==null?void 0:m[1])&&(p.type==="Select"&&!(p!=null&&p.value)?u=void 0:u=p==null?void 0:p.value)}))}),u}};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var As={};As.version="0.18.5";var xo=1252,Bx=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Mf={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Lf=function(e){Bx.indexOf(e)!=-1&&(xo=Mf[0]=e)};function Ux(){Lf(1252)}var _n=function(e){Lf(e)};function Bf(){_n(1200),Ux()}function Hc(e){for(var a=[],r=0,n=e.length;r<n;++r)a[r]=e.charCodeAt(r);return a}function Wx(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return a.join("")}function po(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return a.join("")}var Di=function(e){var a=e.charCodeAt(0),r=e.charCodeAt(1);return a==255&&r==254?Wx(e.slice(2)):a==254&&r==255?po(e.slice(2)):a==65279?e.slice(1):e},us=function(a){return String.fromCharCode(a)},Gc=function(a){return String.fromCharCode(a)},kf,a0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Wi(e){for(var a="",r=0,n=0,t=0,i=0,s=0,f=0,l=0,c=0;c<e.length;)r=e.charCodeAt(c++),i=r>>2,n=e.charCodeAt(c++),s=(r&3)<<4|n>>4,t=e.charCodeAt(c++),f=(n&15)<<2|t>>6,l=t&63,isNaN(n)?f=l=64:isNaN(t)&&(l=64),a+=a0.charAt(i)+a0.charAt(s)+a0.charAt(f)+a0.charAt(l);return a}function $t(e){var a="",r=0,n=0,t=0,i=0,s=0,f=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)i=a0.indexOf(e.charAt(c++)),s=a0.indexOf(e.charAt(c++)),r=i<<2|s>>4,a+=String.fromCharCode(r),f=a0.indexOf(e.charAt(c++)),n=(s&15)<<4|f>>2,f!==64&&(a+=String.fromCharCode(n)),l=a0.indexOf(e.charAt(c++)),t=(f&3)<<6|l,l!==64&&(a+=String.fromCharCode(t));return a}var yr=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Kn=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,r){return r?new Buffer(a,r):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function n0(e){return yr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Xc(e){return yr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Ht=function(a){return yr?Kn(a,"binary"):a.split("").map(function(r){return r.charCodeAt(0)&255})};function Ws(e){if(typeof ArrayBuffer>"u")return Ht(e);for(var a=new ArrayBuffer(e.length),r=new Uint8Array(a),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return a}function l0(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var a=[],r=0;r<e.length;++r)a[r]=String.fromCharCode(e[r]);return a.join("")}function Hx(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function Uf(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Uf(new Uint8Array(e));for(var a=new Array(e.length),r=0;r<e.length;++r)a[r]=e[r];return a}var Ya=yr?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:Kn(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,r=0;for(a=0;a<e.length;++a)r+=e[a].length;var n=new Uint8Array(r),t=0;for(a=0,r=0;a<e.length;r+=t,++a)if(t=e[a].length,e[a]instanceof Uint8Array)n.set(e[a],r);else{if(typeof e[a]=="string")throw"wtf";n.set(new Uint8Array(e[a]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function Gx(e){for(var a=[],r=0,n=e.length+250,t=n0(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)t[r++]=s;else if(s<2048)t[r++]=192|s>>6&31,t[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var f=e.charCodeAt(++i)&1023;t[r++]=240|s>>8&7,t[r++]=128|s>>2&63,t[r++]=128|f>>6&15|(s&3)<<4,t[r++]=128|f&63}else t[r++]=224|s>>12&15,t[r++]=128|s>>6&63,t[r++]=128|s&63;r>n&&(a.push(t.slice(0,r)),r=0,t=n0(65535),n=65530)}return a.push(t.slice(0,r)),Ya(a)}var Et=/\u0000/g,Ii=/[\u0001-\u0006]/g;function Y0(e){for(var a="",r=e.length-1;r>=0;)a+=e.charAt(r--);return a}function yn(e,a){var r=""+e;return r.length>=a?r:Sa("0",a-r.length)+r}function Wf(e,a){var r=""+e;return r.length>=a?r:Sa(" ",a-r.length)+r}function Fs(e,a){var r=""+e;return r.length>=a?r:r+Sa(" ",a-r.length)}function Xx(e,a){var r=""+Math.round(e);return r.length>=a?r:Sa("0",a-r.length)+r}function $x(e,a){var r=""+e;return r.length>=a?r:Sa("0",a-r.length)+r}var $c=Math.pow(2,32);function H0(e,a){if(e>$c||e<-$c)return Xx(e,a);var r=Math.round(e);return $x(r,a)}function Ds(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var Kc=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ef=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function Kx(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var ar={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},zc={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},zx={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Is(e,a,r){for(var n=e<0?-1:1,t=e*n,i=0,s=1,f=0,l=1,c=0,o=0,u=Math.floor(t);c<a&&(u=Math.floor(t),f=u*s+i,o=u*c+l,!(t-u<5e-8));)t=1/(t-u),i=s,s=f,l=c,c=o;if(o>a&&(c>a?(o=l,f=i):(o=c,f=s)),!r)return[0,n*f,o];var x=Math.floor(n*f/o);return[x,n*f-x*o,o]}function v0(e,a,r){if(e>2958465||e<0)return null;var n=e|0,t=Math.floor(86400*(e-n)),i=0,s=[],f={D:n,T:t,u:86400*(e-n)-t,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(f.u)<1e-6&&(f.u=0),a&&a.date1904&&(n+=1462),f.u>.9999&&(f.u=0,++t==86400&&(f.T=t=0,++n,++f.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var l=new Date(1900,0,1);l.setDate(l.getDate()+n-1),s=[l.getFullYear(),l.getMonth()+1,l.getDate()],i=l.getDay(),n<60&&(i=(i+6)%7),r&&(i=Zx(l,s))}return f.y=s[0],f.m=s[1],f.d=s[2],f.S=t%60,t=Math.floor(t/60),f.M=t%60,t=Math.floor(t/60),f.H=t,f.q=i,f}var mo=new Date(1899,11,31,0,0,0),Vx=mo.getTime(),jx=new Date(1900,2,1,0,0,0);function go(e,a){var r=e.getTime();return a?r-=1461*24*60*60*1e3:e>=jx&&(r+=24*60*60*1e3),(r-(Vx+(e.getTimezoneOffset()-mo.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Hf(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Yx(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Jx(e){var a=e<0?12:11,r=Hf(e.toFixed(12));return r.length<=a||(r=e.toPrecision(10),r.length<=a)?r:e.toExponential(5)}function qx(e){var a=Hf(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function Hi(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return a>=-4&&a<=-1?r=e.toPrecision(10+a):Math.abs(a)<=9?r=Jx(e):a===10?r=e.toFixed(10).substr(0,12):r=qx(e),Hf(Yx(r.toUpperCase()))}function T0(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):Hi(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return an(14,go(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function Zx(e,a){a[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function Qx(e,a,r,n){var t="",i=0,s=0,f=r.y,l,c=0;switch(e){case 98:f=r.y+543;case 121:switch(a.length){case 1:case 2:l=f%100,c=2;break;default:l=f%1e4,c=4;break}break;case 109:switch(a.length){case 1:case 2:l=r.m,c=a.length;break;case 3:return ef[r.m-1][1];case 5:return ef[r.m-1][0];default:return ef[r.m-1][2]}break;case 100:switch(a.length){case 1:case 2:l=r.d,c=a.length;break;case 3:return Kc[r.q][0];default:return Kc[r.q][1]}break;case 104:switch(a.length){case 1:case 2:l=1+(r.H+11)%12,c=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:l=r.H,c=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:l=r.M,c=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return r.u===0&&(a=="s"||a=="ss")?yn(r.S,a.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),a==="s"?i===0?"0":""+i/s:(t=yn(i,2+n),a==="ss"?t.substr(0,2):"."+t.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":l=r.D*24+r.H;break;case"[m]":case"[mm]":l=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":l=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+a}c=a.length===3?1:2;break;case 101:l=f,c=1;break}var o=c>0?yn(l,c):"";return o}function t0(e){var a=3;if(e.length<=a)return e;for(var r=e.length%a,n=e.substr(0,r);r!=e.length;r+=a)n+=(n.length>0?",":"")+e.substr(r,a);return n}var vo=/%/g;function ep(e,a,r){var n=a.replace(vo,""),t=a.length-n.length;return Hn(e,n,r*Math.pow(10,2*t))+Sa("%",t)}function rp(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Hn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function _o(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+_o(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),r.indexOf("e")===-1){var s=Math.floor(Math.log(a)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,t)+"."+r.substr(2+t),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,l,c,o){return l+c+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var yo=/# (\?+)( ?)\/( ?)(\d+)/;function ap(e,a,r){var n=parseInt(e[4],10),t=Math.round(a*n),i=Math.floor(t/n),s=t-i*n,f=n;return r+(i===0?"":""+i)+" "+(s===0?Sa(" ",e[1].length+1+e[4].length):Wf(s,e[1].length)+e[2]+"/"+e[3]+yn(f,e[4].length))}function tp(e,a,r){return r+(a===0?"":""+a)+Sa(" ",e[1].length+2+e[4].length)}var ko=/^#*0*\.([0#]+)/,Eo=/\).*[0#]/,To=/\(###\) ###\\?-####/;function yt(e){for(var a="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(r)}return a}function Vc(e,a){var r=Math.pow(10,a);return""+Math.round(e*r)/r}function jc(e,a){var r=e-Math.floor(e),n=Math.pow(10,a);return a<(""+Math.round(r*n)).length?0:Math.round(r*n)}function np(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function ip(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Yt(e,a,r){if(e.charCodeAt(0)===40&&!a.match(Eo)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Yt("n",n,r):"("+Yt("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return rp(e,a,r);if(a.indexOf("%")!==-1)return ep(e,a,r);if(a.indexOf("E")!==-1)return _o(a,r);if(a.charCodeAt(0)===36)return"$"+Yt(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,l=Math.abs(r),c=r<0?"-":"";if(a.match(/^00+$/))return c+H0(l,a.length);if(a.match(/^[#?]+$/))return t=H0(r,0),t==="0"&&(t=""),t.length>a.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(yo))return ap(i,l,c);if(a.match(/^#+0+$/))return c+H0(l,a.length-a.indexOf("0"));if(i=a.match(ko))return t=Vc(r,i[1].length).replace(/^([^\.]+)$/,"$1."+yt(i[1])).replace(/\.$/,"."+yt(i[1])).replace(/\.(\d*)$/,function(p,d){return"."+d+Sa("0",yt(i[1]).length-d.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return c+Vc(l,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return c+t0(H0(l,0));if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Yt(e,a,-r):t0(""+(Math.floor(r)+np(r,i[1].length)))+"."+yn(jc(r,i[1].length),i[1].length);if(i=a.match(/^#,#*,#0/))return Yt(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=Y0(Yt(e,a.replace(/[\\-]/g,""),r)),s=0,Y0(Y0(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s<t.length?t.charAt(s++):p==="0"?"0":""}));if(a.match(To))return t=Yt(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Is(l,Math.pow(10,s)-1,!1),t=""+c,o=Hn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=Fs(f[2],s),o.length<i[4].length&&(o=yt(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Is(l,Math.pow(10,s)-1,!0),c+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Wf(f[1],s)+i[2]+"/"+i[3]+Fs(f[2],s):Sa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=H0(r,0),a.length<=t.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0?]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return yt(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return s=jc(r,i[1].length),r<0?"-"+Yt(e,a,-r):t0(ip(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?yn(0,3-p.length):"")+p})+"."+yn(s,i[1].length);switch(a){case"###,##0.00":return Yt(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var h=t0(H0(l,0));return h!=="0"?c+h:"";case"###,###.00":return Yt(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Yt(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function sp(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Hn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function fp(e,a,r){var n=a.replace(vo,""),t=a.length-n.length;return Hn(e,n,r*Math.pow(10,2*t))+Sa("%",t)}function wo(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+wo(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),!r.match(/[Ee]/)){var s=Math.floor(Math.log(a)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,l,c,o){return l+c+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function In(e,a,r){if(e.charCodeAt(0)===40&&!a.match(Eo)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?In("n",n,r):"("+In("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return sp(e,a,r);if(a.indexOf("%")!==-1)return fp(e,a,r);if(a.indexOf("E")!==-1)return wo(a,r);if(a.charCodeAt(0)===36)return"$"+In(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,l=Math.abs(r),c=r<0?"-":"";if(a.match(/^00+$/))return c+yn(l,a.length);if(a.match(/^[#?]+$/))return t=""+r,r===0&&(t=""),t.length>a.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(yo))return tp(i,l,c);if(a.match(/^#+0+$/))return c+yn(l,a.length-a.indexOf("0"));if(i=a.match(ko))return t=(""+r).replace(/^([^\.]+)$/,"$1."+yt(i[1])).replace(/\.$/,"."+yt(i[1])),t=t.replace(/\.(\d*)$/,function(p,d){return"."+d+Sa("0",yt(i[1]).length-d.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return c+t0(""+l);if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+In(e,a,-r):t0(""+r)+"."+Sa("0",i[1].length);if(i=a.match(/^#,#*,#0/))return In(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=Y0(In(e,a.replace(/[\\-]/g,""),r)),s=0,Y0(Y0(a.replace(/\\/g,"")).replace(/[0#]/g,function(p){return s<t.length?t.charAt(s++):p==="0"?"0":""}));if(a.match(To))return t=In(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Is(l,Math.pow(10,s)-1,!1),t=""+c,o=Hn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=Fs(f[2],s),o.length<i[4].length&&(o=yt(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Is(l,Math.pow(10,s)-1,!0),c+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Wf(f[1],s)+i[2]+"/"+i[3]+Fs(f[2],s):Sa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=""+r,a.length<=t.length?t:yt(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return yt(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return r<0?"-"+In(e,a,-r):t0(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?yn(0,3-p.length):"")+p})+"."+yn(0,i[1].length);switch(a){case"###,###":case"##,###":case"#,###":var h=t0(""+l);return h!=="0"?c+h:"";default:if(a.match(/\.[0#?]*$/))return In(e,a.slice(0,a.lastIndexOf(".")),r)+yt(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Hn(e,a,r){return(r|0)===r?In(e,a,r):Yt(e,a,r)}function cp(e){for(var a=[],r=!1,n=0,t=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:a[a.length]=e.substr(t,n-t),t=n+1}if(a[a.length]=e.substr(t),r===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var So=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ai(e){for(var a=0,r="",n="";a<e.length;)switch(r=e.charAt(a)){case"G":Ds(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(n=r;e.charAt(a++)!=="]"&&a<e.length;)n+=e.charAt(a);if(n.match(So))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++a))>-1||r=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===r;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function lp(e,a,r,n){for(var t=[],i="",s=0,f="",l="t",c,o,u,x="H";s<e.length;)switch(f=e.charAt(s)){case"G":if(!Ds(e,s))throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(u=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(u);t[t.length]={t:"t",v:i},++s;break;case"\\":var h=e.charAt(++s),p=h==="("||h===")"?h:"t";t[t.length]={t:p,v:h},++s;break;case"_":t[t.length]={t:"t",v:" "},s+=2;break;case"@":t[t.length]={t:"T",v:a},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(c==null&&(c=v0(a,r,e.charAt(s+1)==="2"),c==null))return"";t[t.length]={t:"X",v:e.substr(s,2)},l=f,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":f=f.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||c==null&&(c=v0(a,r),c==null))return"";for(i=f;++s<e.length&&e.charAt(s).toLowerCase()===f;)i+=f;f==="m"&&l.toLowerCase()==="h"&&(f="M"),f==="h"&&(f=x),t[t.length]={t:f,v:i},l=f;break;case"A":case"a":case"上":var d={t:f,v:f};if(c==null&&(c=v0(a,r)),e.substr(s,3).toUpperCase()==="A/P"?(c!=null&&(d.v=c.H>=12?"P":"A"),d.t="T",x="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(c!=null&&(d.v=c.H>=12?"PM":"AM"),d.t="T",s+=5,x="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(c!=null&&(d.v=c.H>=12?"下午":"上午"),d.t="T",s+=5,x="h"):(d.t="t",++s),c==null&&d.t==="T")return"";t[t.length]=d,l=f;break;case"[":for(i=f;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(So)){if(c==null&&(c=v0(a,r),c==null))return"";t[t.length]={t:"Z",v:i.toLowerCase()},l=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",ai(e)||(t[t.length]={t:"t",v:i}));break;case".":if(c!=null){for(i=f;++s<e.length&&(f=e.charAt(s))==="0";)i+=f;t[t.length]={t:"s",v:i};break}case"0":case"#":for(i=f;++s<e.length&&"0#?.,E+-%".indexOf(f=e.charAt(s))>-1;)i+=f;t[t.length]={t:"n",v:i};break;case"?":for(i=f;e.charAt(++s)===f;)i+=f;t[t.length]={t:f,v:i},l=f;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":t[t.length]={t:n===1?"t":f,v:f},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=f;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)i+=e.charAt(s);t[t.length]={t:"D",v:i};break;case" ":t[t.length]={t:f,v:f},++s;break;case"$":t[t.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(f)===-1)throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"t",v:f},++s;break}var m=0,g=0,y;for(s=t.length-1,l="t";s>=0;--s)switch(t[s].t){case"h":case"H":t[s].t=x,l="h",m<1&&(m=1);break;case"s":(y=t[s].v.match(/\.0+$/))&&(g=Math.max(g,y[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":l=t[s].t;break;case"m":l==="s"&&(t[s].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&t[s].v.match(/[Hh]/)&&(m=1),m<2&&t[s].v.match(/[Mm]/)&&(m=2),m<3&&t[s].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M);break}var v="",E;for(s=0;s<t.length;++s)switch(t[s].t){case"t":case"T":case" ":case"D":break;case"X":t[s].v="",t[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":t[s].v=Qx(t[s].t.charCodeAt(0),t[s].v,c,g),t[s].t="t";break;case"n":case"?":for(E=s+1;t[E]!=null&&((f=t[E].t)==="?"||f==="D"||(f===" "||f==="t")&&t[E+1]!=null&&(t[E+1].t==="?"||t[E+1].t==="t"&&t[E+1].v==="/")||t[s].t==="("&&(f===" "||f==="n"||f===")")||f==="t"&&(t[E].v==="/"||t[E].v===" "&&t[E+1]!=null&&t[E+1].t=="?"));)t[s].v+=t[E].v,t[E]={v:"",t:";"},++E;v+=t[s].v,s=E-1;break;case"G":t[s].t="t",t[s].v=T0(a,r);break}var w="",S,T;if(v.length>0){v.charCodeAt(0)==40?(S=a<0&&v.charCodeAt(0)===45?-a:a,T=Hn("n",v,S)):(S=a<0&&n>1?-a:a,T=Hn("n",v,S),S<0&&t[0]&&t[0].t=="t"&&(T=T.substr(1),t[0].v="-"+t[0].v)),E=T.length-1;var B=t.length;for(s=0;s<t.length;++s)if(t[s]!=null&&t[s].t!="t"&&t[s].v.indexOf(".")>-1){B=s;break}var I=t.length;if(B===t.length&&T.indexOf("E")===-1){for(s=t.length-1;s>=0;--s)t[s]==null||"n?".indexOf(t[s].t)===-1||(E>=t[s].v.length-1?(E-=t[s].v.length,t[s].v=T.substr(E+1,t[s].v.length)):E<0?t[s].v="":(t[s].v=T.substr(0,E+1),E=-1),t[s].t="t",I=s);E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v)}else if(B!==t.length&&T.indexOf("E")===-1){for(E=T.indexOf(".")-1,s=B;s>=0;--s)if(!(t[s]==null||"n?".indexOf(t[s].t)===-1)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")-1:t[s].v.length-1,w=t[s].v.substr(o+1);o>=0;--o)E>=0&&(t[s].v.charAt(o)==="0"||t[s].v.charAt(o)==="#")&&(w=T.charAt(E--)+w);t[s].v=w,t[s].t="t",I=s}for(E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v),E=T.indexOf(".")+1,s=B;s<t.length;++s)if(!(t[s]==null||"n?(".indexOf(t[s].t)===-1&&s!==B)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")+1:0,w=t[s].v.substr(0,o);o<t[s].v.length;++o)E<T.length&&(w+=T.charAt(E++));t[s].v=w,t[s].t="t",I=s}}}for(s=0;s<t.length;++s)t[s]!=null&&"n?".indexOf(t[s].t)>-1&&(S=n>1&&a<0&&s>0&&t[s-1].v==="-"?-a:a,t[s].v=Hn(t[s].t,t[s].v,S),t[s].t="t");var U="";for(s=0;s!==t.length;++s)t[s]!=null&&(U+=t[s].v);return U}var Yc=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Jc(e,a){if(a==null)return!1;var r=parseFloat(a[2]);switch(a[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function op(e,a){var r=cp(e),n=r.length,t=r[n-1].indexOf("@");if(n<4&&t>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof a!="number")return[4,r.length===4||t>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=t>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=t>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=t>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=a>0?r[0]:a<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Yc),f=r[1].match(Yc);return Jc(a,s)?[n,r[0]]:Jc(a,f)?[n,r[1]]:[n,r[s!=null&&f!=null?2:1]]}return[n,i]}function an(e,a,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:ar)[e],n==null&&(n=r.table&&r.table[zc[e]]||ar[zc[e]]),n==null&&(n=zx[e]||"General");break}if(Ds(n,0))return T0(a,r);a instanceof Date&&(a=go(a,r.date1904));var t=op(n,a);if(Ds(t[1]))return T0(a,r);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return lp(t[1],a,r,t[0])}function Gn(e,a){if(typeof a!="number"){a=+a||-1;for(var r=0;r<392;++r){if(ar[r]==null){a<0&&(a=r);continue}if(ar[r]==e){a=r;break}}a<0&&(a=391)}return ar[a]=e,a}function Hs(e){for(var a=0;a!=392;++a)e[a]!==void 0&&Gn(e[a],a)}function ti(){ar=Kx()}var up={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Ao=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function hp(e){var a=typeof e=="number"?ar[e]:e;return a=a.replace(Ao,"(\\d+)"),new RegExp("^"+a+"$")}function xp(e,a,r){var n=-1,t=-1,i=-1,s=-1,f=-1,l=-1;(a.match(Ao)||[]).forEach(function(u,x){var h=parseInt(r[x+1],10);switch(u.toLowerCase().charAt(0)){case"y":n=h;break;case"d":i=h;break;case"h":s=h;break;case"s":l=h;break;case"m":s>=0?f=h:t=h;break}}),l>=0&&f==-1&&t>=0&&(f=t,t=-1);var c=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(t>=1?t:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);c.length==7&&(c="0"+c),c.length==8&&(c="20"+c);var o=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return s==-1&&f==-1&&l==-1?c:n==-1&&t==-1&&i==-1?o:c+"T"+o}var pp=function(){var e={};e.version="1.2.0";function a(){for(var T=0,B=new Array(256),I=0;I!=256;++I)T=I,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,B[I]=T;return typeof Int32Array<"u"?new Int32Array(B):B}var r=a();function n(T){var B=0,I=0,U=0,L=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)L[U]=T[U];for(U=0;U!=256;++U)for(I=T[U],B=256+U;B<4096;B+=256)I=L[B]=I>>>8^T[I&255];var W=[];for(U=1;U!=16;++U)W[U-1]=typeof Int32Array<"u"?L.subarray(U*256,U*256+256):L.slice(U*256,U*256+256);return W}var t=n(r),i=t[0],s=t[1],f=t[2],l=t[3],c=t[4],o=t[5],u=t[6],x=t[7],h=t[8],p=t[9],d=t[10],m=t[11],g=t[12],y=t[13],v=t[14];function E(T,B){for(var I=B^-1,U=0,L=T.length;U<L;)I=I>>>8^r[(I^T.charCodeAt(U++))&255];return~I}function w(T,B){for(var I=B^-1,U=T.length-15,L=0;L<U;)I=v[T[L++]^I&255]^y[T[L++]^I>>8&255]^g[T[L++]^I>>16&255]^m[T[L++]^I>>>24]^d[T[L++]]^p[T[L++]]^h[T[L++]]^x[T[L++]]^u[T[L++]]^o[T[L++]]^c[T[L++]]^l[T[L++]]^f[T[L++]]^s[T[L++]]^i[T[L++]]^r[T[L++]];for(U+=15;L<U;)I=I>>>8^r[(I^T[L++])&255];return~I}function S(T,B){for(var I=B^-1,U=0,L=T.length,W=0,M=0;U<L;)W=T.charCodeAt(U++),W<128?I=I>>>8^r[(I^W)&255]:W<2048?(I=I>>>8^r[(I^(192|W>>6&31))&255],I=I>>>8^r[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=T.charCodeAt(U++)&1023,I=I>>>8^r[(I^(240|W>>8&7))&255],I=I>>>8^r[(I^(128|W>>2&63))&255],I=I>>>8^r[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^r[(I^(128|M&63))&255]):(I=I>>>8^r[(I^(224|W>>12&15))&255],I=I>>>8^r[(I^(128|W>>6&63))&255],I=I>>>8^r[(I^(128|W&63))&255]);return~I}return e.table=r,e.bstr=E,e.buf=w,e.str=S,e}(),Ve=function(){var a={};a.version="1.2.1";function r(k,N){for(var F=k.split("/"),C=N.split("/"),O=0,R=0,K=Math.min(F.length,C.length);O<K;++O){if(R=F[O].length-C[O].length)return R;if(F[O]!=C[O])return F[O]<C[O]?-1:1}return F.length-C.length}function n(k){if(k.charAt(k.length-1)=="/")return k.slice(0,-1).indexOf("/")===-1?k:n(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(0,N+1)}function t(k){if(k.charAt(k.length-1)=="/")return t(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(N+1)}function i(k,N){typeof N=="string"&&(N=new Date(N));var F=N.getHours();F=F<<6|N.getMinutes(),F=F<<5|N.getSeconds()>>>1,k.write_shift(2,F);var C=N.getFullYear()-1980;C=C<<4|N.getMonth()+1,C=C<<5|N.getDate(),k.write_shift(2,C)}function s(k){var N=k.read_shift(2)&65535,F=k.read_shift(2)&65535,C=new Date,O=F&31;F>>>=5;var R=F&15;F>>>=4,C.setMilliseconds(0),C.setFullYear(F+1980),C.setMonth(R-1),C.setDate(O);var K=N&31;N>>>=5;var Y=N&63;return N>>>=6,C.setHours(N),C.setMinutes(Y),C.setSeconds(K<<1),C}function f(k){nt(k,0);for(var N={},F=0;k.l<=k.length-4;){var C=k.read_shift(2),O=k.read_shift(2),R=k.l+O,K={};switch(C){case 21589:F=k.read_shift(1),F&1&&(K.mtime=k.read_shift(4)),O>5&&(F&2&&(K.atime=k.read_shift(4)),F&4&&(K.ctime=k.read_shift(4))),K.mtime&&(K.mt=new Date(K.mtime*1e3));break}k.l=R,N[C]=K}return N}var l;function c(){return l||(l={})}function o(k,N){if(k[0]==80&&k[1]==75)return zr(k,N);if((k[0]|32)==109&&(k[1]|32)==105)return st(k,N);if(k.length<512)throw new Error("CFB file size "+k.length+" < 512");var F=3,C=512,O=0,R=0,K=0,Y=0,V=0,j=[],J=k.slice(0,512);nt(J,0);var le=u(J);switch(F=le[0],F){case 3:C=512;break;case 4:C=4096;break;case 0:if(le[1]==0)return zr(k,N);default:throw new Error("Major Version: Expected 3 or 4 saw "+F)}C!==512&&(J=k.slice(0,C),nt(J,28));var _e=k.slice(0,C);x(J,F);var Ee=J.read_shift(4,"i");if(F===3&&Ee!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ee);J.l+=4,K=J.read_shift(4,"i"),J.l+=4,J.chk("00100000","Mini Stream Cutoff Size: "),Y=J.read_shift(4,"i"),O=J.read_shift(4,"i"),V=J.read_shift(4,"i"),R=J.read_shift(4,"i");for(var ue=-1,ge=0;ge<109&&(ue=J.read_shift(4,"i"),!(ue<0));++ge)j[ge]=ue;var qe=h(k,C);m(V,R,qe,C,j);var Er=y(qe,K,j,C);Er[K].name="!Directory",O>0&&Y!==M&&(Er[Y].name="!MiniFAT"),Er[j[0]].name="!FAT",Er.fat_addrs=j,Er.ssz=C;var Mr={},$r=[],nn=[],sn=[];v(K,Er,qe,$r,O,Mr,nn,Y),p(nn,sn,$r),$r.shift();var fn={FileIndex:nn,FullPaths:sn};return N&&N.raw&&(fn.raw={header:_e,sectors:qe}),fn}function u(k){if(k[k.l]==80&&k[k.l+1]==75)return[0,0];k.chk(se,"Header Signature: "),k.l+=16;var N=k.read_shift(2,"u");return[k.read_shift(2,"u"),N]}function x(k,N){var F=9;switch(k.l+=2,F=k.read_shift(2)){case 9:if(N!=3)throw new Error("Sector Shift: Expected 9 saw "+F);break;case 12:if(N!=4)throw new Error("Sector Shift: Expected 12 saw "+F);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+F)}k.chk("0600","Mini Sector Shift: "),k.chk("000000000000","Reserved: ")}function h(k,N){for(var F=Math.ceil(k.length/N)-1,C=[],O=1;O<F;++O)C[O-1]=k.slice(O*N,(O+1)*N);return C[F-1]=k.slice(F*N),C}function p(k,N,F){for(var C=0,O=0,R=0,K=0,Y=0,V=F.length,j=[],J=[];C<V;++C)j[C]=J[C]=C,N[C]=F[C];for(;Y<J.length;++Y)C=J[Y],O=k[C].L,R=k[C].R,K=k[C].C,j[C]===C&&(O!==-1&&j[O]!==O&&(j[C]=j[O]),R!==-1&&j[R]!==R&&(j[C]=j[R])),K!==-1&&(j[K]=C),O!==-1&&C!=j[C]&&(j[O]=j[C],J.lastIndexOf(O)<Y&&J.push(O)),R!==-1&&C!=j[C]&&(j[R]=j[C],J.lastIndexOf(R)<Y&&J.push(R));for(C=1;C<V;++C)j[C]===C&&(R!==-1&&j[R]!==R?j[C]=j[R]:O!==-1&&j[O]!==O&&(j[C]=j[O]));for(C=1;C<V;++C)if(k[C].type!==0){if(Y=C,Y!=j[Y])do Y=j[Y],N[C]=N[Y]+"/"+N[C];while(Y!==0&&j[Y]!==-1&&Y!=j[Y]);j[C]=-1}for(N[0]+="/",C=1;C<V;++C)k[C].type!==2&&(N[C]+="/")}function d(k,N,F){for(var C=k.start,O=k.size,R=[],K=C;F&&O>0&&K>=0;)R.push(N.slice(K*W,K*W+W)),O-=W,K=m0(F,K*4);return R.length===0?ae(0):Ya(R).slice(0,k.size)}function m(k,N,F,C,O){var R=M;if(k===M){if(N!==0)throw new Error("DIFAT chain shorter than expected")}else if(k!==-1){var K=F[k],Y=(C>>>2)-1;if(!K)return;for(var V=0;V<Y&&(R=m0(K,V*4))!==M;++V)O.push(R);m(m0(K,C-4),N-1,F,C,O)}}function g(k,N,F,C,O){var R=[],K=[];O||(O=[]);var Y=C-1,V=0,j=0;for(V=N;V>=0;){O[V]=!0,R[R.length]=V,K.push(k[V]);var J=F[Math.floor(V*4/C)];if(j=V*4&Y,C<4+j)throw new Error("FAT boundary crossed: "+V+" 4 "+C);if(!k[J])break;V=m0(k[J],j)}return{nodes:R,data:cl([K])}}function y(k,N,F,C){var O=k.length,R=[],K=[],Y=[],V=[],j=C-1,J=0,le=0,_e=0,Ee=0;for(J=0;J<O;++J)if(Y=[],_e=J+N,_e>=O&&(_e-=O),!K[_e]){V=[];var ue=[];for(le=_e;le>=0;){ue[le]=!0,K[le]=!0,Y[Y.length]=le,V.push(k[le]);var ge=F[Math.floor(le*4/C)];if(Ee=le*4&j,C<4+Ee)throw new Error("FAT boundary crossed: "+le+" 4 "+C);if(!k[ge]||(le=m0(k[ge],Ee),ue[le]))break}R[_e]={nodes:Y,data:cl([V])}}return R}function v(k,N,F,C,O,R,K,Y){for(var V=0,j=C.length?2:0,J=N[k].data,le=0,_e=0,Ee;le<J.length;le+=128){var ue=J.slice(le,le+128);nt(ue,64),_e=ue.read_shift(2),Ee=jf(ue,0,_e-j),C.push(Ee);var ge={name:Ee,type:ue.read_shift(1),color:ue.read_shift(1),L:ue.read_shift(4,"i"),R:ue.read_shift(4,"i"),C:ue.read_shift(4,"i"),clsid:ue.read_shift(16),state:ue.read_shift(4,"i"),start:0,size:0},qe=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);qe!==0&&(ge.ct=E(ue,ue.l-8));var Er=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);Er!==0&&(ge.mt=E(ue,ue.l-8)),ge.start=ue.read_shift(4,"i"),ge.size=ue.read_shift(4,"i"),ge.size<0&&ge.start<0&&(ge.size=ge.type=0,ge.start=M,ge.name=""),ge.type===5?(V=ge.start,O>0&&V!==M&&(N[V].name="!StreamData")):ge.size>=4096?(ge.storage="fat",N[ge.start]===void 0&&(N[ge.start]=g(F,ge.start,N.fat_addrs,N.ssz)),N[ge.start].name=ge.name,ge.content=N[ge.start].data.slice(0,ge.size)):(ge.storage="minifat",ge.size<0?ge.size=0:V!==M&&ge.start!==M&&N[V]&&(ge.content=d(ge,N[V].data,(N[Y]||{}).data))),ge.content&&nt(ge.content,0),R[Ee]=ge,K.push(ge)}}function E(k,N){return new Date((Wt(k,N+4)/1e7*Math.pow(2,32)+Wt(k,N)/1e7-11644473600)*1e3)}function w(k,N){return c(),o(l.readFileSync(k),N)}function S(k,N){var F=N&&N.type;switch(F||yr&&Buffer.isBuffer(k)&&(F="buffer"),F||"base64"){case"file":return w(k,N);case"base64":return o(Ht($t(k)),N);case"binary":return o(Ht(k),N)}return o(k,N)}function T(k,N){var F=N||{},C=F.root||"Root Entry";if(k.FullPaths||(k.FullPaths=[]),k.FileIndex||(k.FileIndex=[]),k.FullPaths.length!==k.FileIndex.length)throw new Error("inconsistent CFB structure");k.FullPaths.length===0&&(k.FullPaths[0]=C+"/",k.FileIndex[0]={name:C,type:5}),F.CLSID&&(k.FileIndex[0].clsid=F.CLSID),B(k)}function B(k){var N="Sh33tJ5";if(!Ve.find(k,"/"+N)){var F=ae(4);F[0]=55,F[1]=F[3]=50,F[2]=54,k.FileIndex.push({name:N,type:2,content:F,size:4,L:69,R:69,C:69}),k.FullPaths.push(k.FullPaths[0]+N),I(k)}}function I(k,N){T(k);for(var F=!1,C=!1,O=k.FullPaths.length-1;O>=0;--O){var R=k.FileIndex[O];switch(R.type){case 0:C?F=!0:(k.FileIndex.pop(),k.FullPaths.pop());break;case 1:case 2:case 5:C=!0,isNaN(R.R*R.L*R.C)&&(F=!0),R.R>-1&&R.L>-1&&R.R==R.L&&(F=!0);break;default:F=!0;break}}if(!(!F&&!N)){var K=new Date(1987,1,19),Y=0,V=Object.create?Object.create(null):{},j=[];for(O=0;O<k.FullPaths.length;++O)V[k.FullPaths[O]]=!0,k.FileIndex[O].type!==0&&j.push([k.FullPaths[O],k.FileIndex[O]]);for(O=0;O<j.length;++O){var J=n(j[O][0]);C=V[J],C||(j.push([J,{name:t(J).replace("/",""),type:1,clsid:he,ct:K,mt:K,content:null}]),V[J]=!0)}for(j.sort(function(Ee,ue){return r(Ee[0],ue[0])}),k.FullPaths=[],k.FileIndex=[],O=0;O<j.length;++O)k.FullPaths[O]=j[O][0],k.FileIndex[O]=j[O][1];for(O=0;O<j.length;++O){var le=k.FileIndex[O],_e=k.FullPaths[O];if(le.name=t(_e).replace("/",""),le.L=le.R=le.C=-(le.color=1),le.size=le.content?le.content.length:0,le.start=0,le.clsid=le.clsid||he,O===0)le.C=j.length>1?1:-1,le.size=0,le.type=5;else if(_e.slice(-1)=="/"){for(Y=O+1;Y<j.length&&n(k.FullPaths[Y])!=_e;++Y);for(le.C=Y>=j.length?-1:Y,Y=O+1;Y<j.length&&n(k.FullPaths[Y])!=n(_e);++Y);le.R=Y>=j.length?-1:Y,le.type=1}else n(k.FullPaths[O+1]||"")==n(_e)&&(le.R=O+1),le.type=2}}}function U(k,N){var F=N||{};if(F.fileType=="mad")return Ct(k,F);switch(I(k),F.fileType){case"zip":return wa(k,F)}var C=function(Ee){for(var ue=0,ge=0,qe=0;qe<Ee.FileIndex.length;++qe){var Er=Ee.FileIndex[qe];if(Er.content){var Mr=Er.content.length;Mr>0&&(Mr<4096?ue+=Mr+63>>6:ge+=Mr+511>>9)}}for(var $r=Ee.FullPaths.length+3>>2,nn=ue+7>>3,sn=ue+127>>7,fn=nn+ge+$r+sn,Mt=fn+127>>7,Nn=Mt<=109?0:Math.ceil((Mt-109)/127);fn+Mt+Nn+127>>7>Mt;)Nn=++Mt<=109?0:Math.ceil((Mt-109)/127);var er=[1,Nn,Mt,sn,$r,ge,ue,0];return Ee.FileIndex[0].size=ue<<6,er[7]=(Ee.FileIndex[0].start=er[0]+er[1]+er[2]+er[3]+er[4]+er[5])+(er[6]+7>>3),er}(k),O=ae(C[7]<<9),R=0,K=0;{for(R=0;R<8;++R)O.write_shift(1,ne[R]);for(R=0;R<8;++R)O.write_shift(2,0);for(O.write_shift(2,62),O.write_shift(2,3),O.write_shift(2,65534),O.write_shift(2,9),O.write_shift(2,6),R=0;R<3;++R)O.write_shift(2,0);for(O.write_shift(4,0),O.write_shift(4,C[2]),O.write_shift(4,C[0]+C[1]+C[2]+C[3]-1),O.write_shift(4,0),O.write_shift(4,4096),O.write_shift(4,C[3]?C[0]+C[1]+C[2]-1:M),O.write_shift(4,C[3]),O.write_shift(-4,C[1]?C[0]-1:M),O.write_shift(4,C[1]),R=0;R<109;++R)O.write_shift(-4,R<C[2]?C[1]+R:-1)}if(C[1])for(K=0;K<C[1];++K){for(;R<236+K*127;++R)O.write_shift(-4,R<C[2]?C[1]+R:-1);O.write_shift(-4,K===C[1]-1?M:K+1)}var Y=function(Ee){for(K+=Ee;R<K-1;++R)O.write_shift(-4,R+1);Ee&&(++R,O.write_shift(-4,M))};for(K=R=0,K+=C[1];R<K;++R)O.write_shift(-4,ce.DIFSECT);for(K+=C[2];R<K;++R)O.write_shift(-4,ce.FATSECT);Y(C[3]),Y(C[4]);for(var V=0,j=0,J=k.FileIndex[0];V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(j<4096)&&(J.start=K,Y(j+511>>9)));for(Y(C[6]+7>>3);O.l&511;)O.write_shift(-4,ce.ENDOFCHAIN);for(K=R=0,V=0;V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(!j||j>=4096)&&(J.start=K,Y(j+63>>6)));for(;O.l&511;)O.write_shift(-4,ce.ENDOFCHAIN);for(R=0;R<C[4]<<2;++R){var le=k.FullPaths[R];if(!le||le.length===0){for(V=0;V<17;++V)O.write_shift(4,0);for(V=0;V<3;++V)O.write_shift(4,-1);for(V=0;V<12;++V)O.write_shift(4,0);continue}J=k.FileIndex[R],R===0&&(J.start=J.size?J.start-1:M);var _e=R===0&&F.root||J.name;if(j=2*(_e.length+1),O.write_shift(64,_e,"utf16le"),O.write_shift(2,j),O.write_shift(1,J.type),O.write_shift(1,J.color),O.write_shift(-4,J.L),O.write_shift(-4,J.R),O.write_shift(-4,J.C),J.clsid)O.write_shift(16,J.clsid,"hex");else for(V=0;V<4;++V)O.write_shift(4,0);O.write_shift(4,J.state||0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,0),O.write_shift(4,J.start),O.write_shift(4,J.size),O.write_shift(4,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>=4096)if(O.l=J.start+1<<9,yr&&Buffer.isBuffer(J.content))J.content.copy(O,O.l,0,J.size),O.l+=J.size+511&-512;else{for(V=0;V<J.size;++V)O.write_shift(1,J.content[V]);for(;V&511;++V)O.write_shift(1,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>0&&J.size<4096)if(yr&&Buffer.isBuffer(J.content))J.content.copy(O,O.l,0,J.size),O.l+=J.size+63&-64;else{for(V=0;V<J.size;++V)O.write_shift(1,J.content[V]);for(;V&63;++V)O.write_shift(1,0)}if(yr)O.l=O.length;else for(;O.l<O.length;)O.write_shift(1,0);return O}function L(k,N){var F=k.FullPaths.map(function(V){return V.toUpperCase()}),C=F.map(function(V){var j=V.split("/");return j[j.length-(V.slice(-1)=="/"?2:1)]}),O=!1;N.charCodeAt(0)===47?(O=!0,N=F[0].slice(0,-1)+N):O=N.indexOf("/")!==-1;var R=N.toUpperCase(),K=O===!0?F.indexOf(R):C.indexOf(R);if(K!==-1)return k.FileIndex[K];var Y=!R.match(Ii);for(R=R.replace(Et,""),Y&&(R=R.replace(Ii,"!")),K=0;K<F.length;++K)if((Y?F[K].replace(Ii,"!"):F[K]).replace(Et,"")==R||(Y?C[K].replace(Ii,"!"):C[K]).replace(Et,"")==R)return k.FileIndex[K];return null}var W=64,M=-2,se="d0cf11e0a1b11ae1",ne=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ce={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:se,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function be(k,N,F){c();var C=U(k,F);l.writeFileSync(N,C)}function z(k){for(var N=new Array(k.length),F=0;F<k.length;++F)N[F]=String.fromCharCode(k[F]);return N.join("")}function Te(k,N){var F=U(k,N);switch(N&&N.type||"buffer"){case"file":return c(),l.writeFileSync(N.filename,F),F;case"binary":return typeof F=="string"?F:z(F);case"base64":return Wi(typeof F=="string"?F:z(F));case"buffer":if(yr)return Buffer.isBuffer(F)?F:Kn(F);case"array":return typeof F=="string"?Ht(F):F}return F}var Ae;function _(k){try{var N=k.InflateRaw,F=new N;if(F._processChunk(new Uint8Array([3,0]),F._finishFlushFlag),F.bytesRead)Ae=k;else throw new Error("zlib does not expose bytesRead")}catch(C){console.error("cannot use native zlib: "+(C.message||C))}}function A(k,N){if(!Ae)return aa(k,N);var F=Ae.InflateRaw,C=new F,O=C._processChunk(k.slice(k.l),C._finishFlushFlag);return k.l+=C.bytesRead,O}function D(k){return Ae?Ae.deflateRawSync(k):Qe(k)}var b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],re=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ee(k){var N=(k<<1|k<<11)&139536|(k<<5|k<<15)&558144;return(N>>16|N>>8|N)&255}for(var Q=typeof Uint8Array<"u",q=Q?new Uint8Array(256):[],we=0;we<256;++we)q[we]=ee(we);function P(k,N){var F=q[k&255];return N<=8?F>>>8-N:(F=F<<8|q[k>>8&255],N<=16?F>>>16-N:(F=F<<8|q[k>>16&255],F>>>24-N))}function Pe(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=6?0:k[C+1]<<8))>>>F&3}function Ie(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=5?0:k[C+1]<<8))>>>F&7}function je(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=4?0:k[C+1]<<8))>>>F&15}function Le(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=3?0:k[C+1]<<8))>>>F&31}function ie(k,N){var F=N&7,C=N>>>3;return(k[C]|(F<=1?0:k[C+1]<<8))>>>F&127}function ur(k,N,F){var C=N&7,O=N>>>3,R=(1<<F)-1,K=k[O]>>>C;return F<8-C||(K|=k[O+1]<<8-C,F<16-C)||(K|=k[O+2]<<16-C,F<24-C)||(K|=k[O+3]<<24-C),K&R}function ir(k,N,F){var C=N&7,O=N>>>3;return C<=5?k[O]|=(F&7)<<C:(k[O]|=F<<C&255,k[O+1]=(F&7)>>8-C),N+3}function ka(k,N,F){var C=N&7,O=N>>>3;return F=(F&1)<<C,k[O]|=F,N+1}function Da(k,N,F){var C=N&7,O=N>>>3;return F<<=C,k[O]|=F&255,F>>>=8,k[O+1]=F,N+8}function Tt(k,N,F){var C=N&7,O=N>>>3;return F<<=C,k[O]|=F&255,F>>>=8,k[O+1]=F&255,k[O+2]=F>>>8,N+16}function qa(k,N){var F=k.length,C=2*F>N?2*F:N+5,O=0;if(F>=N)return k;if(yr){var R=Xc(C);if(k.copy)k.copy(R);else for(;O<k.length;++O)R[O]=k[O];return R}else if(Q){var K=new Uint8Array(C);if(K.set)K.set(k);else for(;O<F;++O)K[O]=k[O];return K}return k.length=C,k}function Ea(k){for(var N=new Array(k),F=0;F<k;++F)N[F]=0;return N}function Ka(k,N,F){var C=1,O=0,R=0,K=0,Y=0,V=k.length,j=Q?new Uint16Array(32):Ea(32);for(R=0;R<32;++R)j[R]=0;for(R=V;R<F;++R)k[R]=0;V=k.length;var J=Q?new Uint16Array(V):Ea(V);for(R=0;R<V;++R)j[O=k[R]]++,C<O&&(C=O),J[R]=0;for(j[0]=0,R=1;R<=C;++R)j[R+16]=Y=Y+j[R-1]<<1;for(R=0;R<V;++R)Y=k[R],Y!=0&&(J[R]=j[Y+16]++);var le=0;for(R=0;R<V;++R)if(le=k[R],le!=0)for(Y=P(J[R],C)>>C-le,K=(1<<C+4-le)-1;K>=0;--K)N[Y|K<<le]=le&15|R<<4;return C}var Se=Q?new Uint16Array(512):Ea(512),Ne=Q?new Uint16Array(32):Ea(32);if(!Q){for(var Be=0;Be<512;++Be)Se[Be]=0;for(Be=0;Be<32;++Be)Ne[Be]=0}(function(){for(var k=[],N=0;N<32;N++)k.push(5);Ka(k,Ne,32);var F=[];for(N=0;N<=143;N++)F.push(8);for(;N<=255;N++)F.push(9);for(;N<=279;N++)F.push(7);for(;N<=287;N++)F.push(8);Ka(F,Se,288)})();var Ta=function(){for(var N=Q?new Uint8Array(32768):[],F=0,C=0;F<re.length-1;++F)for(;C<re[F+1];++C)N[C]=F;for(;C<32768;++C)N[C]=29;var O=Q?new Uint8Array(259):[];for(F=0,C=0;F<X.length-1;++F)for(;C<X[F+1];++C)O[C]=F;function R(Y,V){for(var j=0;j<Y.length;){var J=Math.min(65535,Y.length-j),le=j+J==Y.length;for(V.write_shift(1,+le),V.write_shift(2,J),V.write_shift(2,~J&65535);J-- >0;)V[V.l++]=Y[j++]}return V.l}function K(Y,V){for(var j=0,J=0,le=Q?new Uint16Array(32768):[];J<Y.length;){var _e=Math.min(65535,Y.length-J);if(_e<10){for(j=ir(V,j,+(J+_e==Y.length)),j&7&&(j+=8-(j&7)),V.l=j/8|0,V.write_shift(2,_e),V.write_shift(2,~_e&65535);_e-- >0;)V[V.l++]=Y[J++];j=V.l*8;continue}j=ir(V,j,+(J+_e==Y.length)+2);for(var Ee=0;_e-- >0;){var ue=Y[J];Ee=(Ee<<5^ue)&32767;var ge=-1,qe=0;if((ge=le[Ee])&&(ge|=J&-32768,ge>J&&(ge-=32768),ge<J))for(;Y[ge+qe]==Y[J+qe]&&qe<250;)++qe;if(qe>2){ue=O[qe],ue<=22?j=Da(V,j,q[ue+1]>>1)-1:(Da(V,j,3),j+=5,Da(V,j,q[ue-23]>>5),j+=3);var Er=ue<8?0:ue-4>>2;Er>0&&(Tt(V,j,qe-X[ue]),j+=Er),ue=N[J-ge],j=Da(V,j,q[ue]>>3),j-=3;var Mr=ue<4?0:ue-2>>1;Mr>0&&(Tt(V,j,J-ge-re[ue]),j+=Mr);for(var $r=0;$r<qe;++$r)le[Ee]=J&32767,Ee=(Ee<<5^Y[J])&32767,++J;_e-=qe-1}else ue<=143?ue=ue+48:j=ka(V,j,1),j=Da(V,j,q[ue]),le[Ee]=J&32767,++J}j=Da(V,j,0)-1}return V.l=(j+7)/8|0,V.l}return function(V,j){return V.length<8?R(V,j):K(V,j)}}();function Qe(k){var N=ae(50+Math.floor(k.length*1.1)),F=Ta(k,N);return N.slice(0,F)}var br=Q?new Uint16Array(32768):Ea(32768),me=Q?new Uint16Array(32768):Ea(32768),Fr=Q?new Uint16Array(128):Ea(128),Or=1,hr=1;function kr(k,N){var F=Le(k,N)+257;N+=5;var C=Le(k,N)+1;N+=5;var O=je(k,N)+4;N+=4;for(var R=0,K=Q?new Uint8Array(19):Ea(19),Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],V=1,j=Q?new Uint8Array(8):Ea(8),J=Q?new Uint8Array(8):Ea(8),le=K.length,_e=0;_e<O;++_e)K[b[_e]]=R=Ie(k,N),V<R&&(V=R),j[R]++,N+=3;var Ee=0;for(j[0]=0,_e=1;_e<=V;++_e)J[_e]=Ee=Ee+j[_e-1]<<1;for(_e=0;_e<le;++_e)(Ee=K[_e])!=0&&(Y[_e]=J[Ee]++);var ue=0;for(_e=0;_e<le;++_e)if(ue=K[_e],ue!=0){Ee=q[Y[_e]]>>8-ue;for(var ge=(1<<7-ue)-1;ge>=0;--ge)Fr[Ee|ge<<ue]=ue&7|_e<<3}var qe=[];for(V=1;qe.length<F+C;)switch(Ee=Fr[ie(k,N)],N+=Ee&7,Ee>>>=3){case 16:for(R=3+Pe(k,N),N+=2,Ee=qe[qe.length-1];R-- >0;)qe.push(Ee);break;case 17:for(R=3+Ie(k,N),N+=3;R-- >0;)qe.push(0);break;case 18:for(R=11+ie(k,N),N+=7;R-- >0;)qe.push(0);break;default:qe.push(Ee),V<Ee&&(V=Ee);break}var Er=qe.slice(0,F),Mr=qe.slice(F);for(_e=F;_e<286;++_e)Er[_e]=0;for(_e=C;_e<30;++_e)Mr[_e]=0;return Or=Ka(Er,br,286),hr=Ka(Mr,me,30),N}function xa(k,N){if(k[0]==3&&!(k[1]&3))return[n0(N),2];for(var F=0,C=0,O=Xc(N||1<<18),R=0,K=O.length>>>0,Y=0,V=0;(C&1)==0;){if(C=Ie(k,F),F+=3,C>>>1)C>>1==1?(Y=9,V=5):(F=kr(k,F),Y=Or,V=hr);else{F&7&&(F+=8-(F&7));var j=k[F>>>3]|k[(F>>>3)+1]<<8;if(F+=32,j>0)for(!N&&K<R+j&&(O=qa(O,R+j),K=O.length);j-- >0;)O[R++]=k[F>>>3],F+=8;continue}for(;;){!N&&K<R+32767&&(O=qa(O,R+32767),K=O.length);var J=ur(k,F,Y),le=C>>>1==1?Se[J]:br[J];if(F+=le&15,le>>>=4,(le>>>8&255)===0)O[R++]=le;else{if(le==256)break;le-=257;var _e=le<8?0:le-4>>2;_e>5&&(_e=0);var Ee=R+X[le];_e>0&&(Ee+=ur(k,F,_e),F+=_e),J=ur(k,F,V),le=C>>>1==1?Ne[J]:me[J],F+=le&15,le>>>=4;var ue=le<4?0:le-2>>1,ge=re[le];for(ue>0&&(ge+=ur(k,F,ue),F+=ue),!N&&K<Ee&&(O=qa(O,Ee+100),K=O.length);R<Ee;)O[R]=O[R-ge],++R}}}return N?[O,F+7>>>3]:[O.slice(0,R),F+7>>>3]}function aa(k,N){var F=k.slice(k.l||0),C=xa(F,N);return k.l+=C[1],C[0]}function We(k,N){if(k)typeof console<"u"&&console.error(N);else throw new Error(N)}function zr(k,N){var F=k;nt(F,0);var C=[],O=[],R={FileIndex:C,FullPaths:O};T(R,{root:N.root});for(var K=F.length-4;(F[K]!=80||F[K+1]!=75||F[K+2]!=5||F[K+3]!=6)&&K>=0;)--K;F.l=K+4,F.l+=4;var Y=F.read_shift(2);F.l+=6;var V=F.read_shift(4);for(F.l=V,K=0;K<Y;++K){F.l+=20;var j=F.read_shift(4),J=F.read_shift(4),le=F.read_shift(2),_e=F.read_shift(2),Ee=F.read_shift(2);F.l+=8;var ue=F.read_shift(4),ge=f(F.slice(F.l+le,F.l+le+_e));F.l+=le+_e+Ee;var qe=F.l;F.l=ue+4,na(F,j,J,R,ge),F.l=qe}return R}function na(k,N,F,C,O){k.l+=2;var R=k.read_shift(2),K=k.read_shift(2),Y=s(k);if(R&8257)throw new Error("Unsupported ZIP encryption");for(var V=k.read_shift(4),j=k.read_shift(4),J=k.read_shift(4),le=k.read_shift(2),_e=k.read_shift(2),Ee="",ue=0;ue<le;++ue)Ee+=String.fromCharCode(k[k.l++]);if(_e){var ge=f(k.slice(k.l,k.l+_e));(ge[21589]||{}).mt&&(Y=ge[21589].mt),((O||{})[21589]||{}).mt&&(Y=O[21589].mt)}k.l+=_e;var qe=k.slice(k.l,k.l+j);switch(K){case 8:qe=A(k,J);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+K)}var Er=!1;R&8&&(V=k.read_shift(4),V==134695760&&(V=k.read_shift(4),Er=!0),j=k.read_shift(4),J=k.read_shift(4)),j!=N&&We(Er,"Bad compressed size: "+N+" != "+j),J!=F&&We(Er,"Bad uncompressed size: "+F+" != "+J),_t(C,Ee,qe,{unsafe:!0,mt:Y})}function wa(k,N){var F=N||{},C=[],O=[],R=ae(1),K=F.compression?8:0,Y=0,V=0,j=0,J=0,le=0,_e=k.FullPaths[0],Ee=_e,ue=k.FileIndex[0],ge=[],qe=0;for(V=1;V<k.FullPaths.length;++V)if(Ee=k.FullPaths[V].slice(_e.length),ue=k.FileIndex[V],!(!ue.size||!ue.content||Ee=="Sh33tJ5")){var Er=J,Mr=ae(Ee.length);for(j=0;j<Ee.length;++j)Mr.write_shift(1,Ee.charCodeAt(j)&127);Mr=Mr.slice(0,Mr.l),ge[le]=pp.buf(ue.content,0);var $r=ue.content;K==8&&($r=D($r)),R=ae(30),R.write_shift(4,67324752),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),ue.mt?i(R,ue.mt):R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),J+=R.length,C.push(R),J+=Mr.length,C.push(Mr),J+=$r.length,C.push($r),R=ae(46),R.write_shift(4,33639248),R.write_shift(2,0),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(4,0),R.write_shift(4,Er),qe+=R.l,O.push(R),qe+=Mr.length,O.push(Mr),++le}return R=ae(22),R.write_shift(4,101010256),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,le),R.write_shift(2,le),R.write_shift(4,qe),R.write_shift(4,J),R.write_shift(2,0),Ya([Ya(C),Ya(O),R])}var ha={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function fr(k,N){if(k.ctype)return k.ctype;var F=k.name||"",C=F.match(/\.([^\.]+)$/);return C&&ha[C[1]]||N&&(C=(F=N).match(/[\.\\]([^\.\\])+$/),C&&ha[C[1]])?ha[C[1]]:"application/octet-stream"}function wr(k){for(var N=Wi(k),F=[],C=0;C<N.length;C+=76)F.push(N.slice(C,C+76));return F.join(`\r
|
|
12
12
|
`)+`\r
|
|
13
13
|
`}function Oa(k){var N=k.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(j){var J=j.charCodeAt(0).toString(16).toUpperCase();return"="+(J.length==1?"0"+J:J)});N=N.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),N.charAt(0)==`
|
|
14
14
|
`&&(N="=0D"+N.slice(1)),N=N.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
|