ss-component-new 1.2.162 → 1.2.163

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{MTLLoader-yFIR0Q1q.js → MTLLoader-BNmuQ4bU.js} +1 -1
  2. package/dist/{MTLLoader-DHl-MsFG.cjs → MTLLoader-nfe35Lce.cjs} +1 -1
  3. package/dist/{OrbitControls-b3svC7lz.js → OrbitControls-DM5kqFgC.js} +1 -1
  4. package/dist/{OrbitControls-DDMUyTna.cjs → OrbitControls-_twFX8YB.cjs} +1 -1
  5. package/dist/{URDFLoader-Bi-P4l_C.cjs → URDFLoader-BytGrUmg.cjs} +1 -1
  6. package/dist/{URDFLoader-CoPcIMnQ.js → URDFLoader-GHbYcXT9.js} +2 -2
  7. package/dist/{animationData-C5s90SIQ.cjs → animationData-BKw5s9e5.cjs} +1 -1
  8. package/dist/{animationData-BKwYnqZS.js → animationData-eNObrrUg.js} +1 -1
  9. package/dist/{array-CTcRu-yX.js → array-BuuA9uHC.js} +1 -1
  10. package/dist/{array-BOnTlF9h.cjs → array-Csvxd61S.cjs} +1 -1
  11. package/dist/{iconfont-BMhzhVJJ.cjs → iconfont-0hKmXPPO.cjs} +1 -1
  12. package/dist/{iconfont-CsvHeQ3r.js → iconfont-BgckB2Vn.js} +2 -2
  13. package/dist/{index-BVUPfPv6.cjs → index--O8k9XH8.cjs} +1 -1
  14. package/dist/{index-BPhvNU1s.cjs → index-2KgLHMWm.cjs} +1 -1
  15. package/dist/{index-DIf6vGiU.cjs → index-B912SDr_.cjs} +1 -1
  16. package/dist/{index-BRpd7mlP.js → index-BGP4St41.js} +1 -1
  17. package/dist/{index-ivAOakz7.js → index-BND0qK1p.js} +3 -3
  18. package/dist/{index-BygvWjTm.cjs → index-BTMi9bkq.cjs} +1 -1
  19. package/dist/{index-DgorODjn.cjs → index-BVNLn1BE.cjs} +1 -1
  20. package/dist/{index-LDkpO1-W.cjs → index-B_FhWY3g.cjs} +1 -1
  21. package/dist/{index-Cp4EY9vc.cjs → index-BpgqbsMU.cjs} +1 -1
  22. package/dist/{index-DQ3NUQTq.js → index-CIudunlV.js} +1 -1
  23. package/dist/{index-QJebf9oJ.js → index-CTuQlaKu.js} +7 -7
  24. package/dist/{index-CL3rdX-G.cjs → index-CWg0GALZ.cjs} +1 -1
  25. package/dist/{index-CRQLUMgt.cjs → index-CmE9DK-x.cjs} +1 -1
  26. package/dist/{index-DO3yWQr4.js → index-CpiMfJxt.js} +1 -1
  27. package/dist/{index-Cm4pb6d9.cjs → index-CuTjPhXT.cjs} +1 -1
  28. package/dist/{index-ea40G6BX.js → index-CxwVc9EV.js} +16 -16
  29. package/dist/{index-BmZHT29_.cjs → index-D2yH4vy_.cjs} +1 -1
  30. package/dist/{index-hD6upDSN.js → index-D3fp8K0R.js} +1 -1
  31. package/dist/{index-3SnIgTM-.cjs → index-D8cU4idy.cjs} +1 -1
  32. package/dist/{index-oU4PL8cb.js → index-DBL88T4-.js} +3 -3
  33. package/dist/{index-DWJFRw3P.cjs → index-DD0L7WCZ.cjs} +1 -1
  34. package/dist/{index-BA-iAx58.cjs → index-DIAW1G0w.cjs} +1 -1
  35. package/dist/{index-NIUZIeAD.cjs → index-DISYfV0A.cjs} +1 -1
  36. package/dist/{index-CbPPM1zP.js → index-DSGQzNk2.js} +4 -4
  37. package/dist/{index-tXW4mvuL.js → index-DUaw0Qmt.js} +1 -1
  38. package/dist/{index-urrt4nU9.js → index-DX5_ST-7.js} +4 -4
  39. package/dist/{index-Ca2vCRTz.js → index-D_ehu1KG.js} +1 -1
  40. package/dist/{index-B6_478eX.cjs → index-DkJolGgg.cjs} +1 -1
  41. package/dist/{index-2tjhV9fS.js → index-Dkw-0Onh.js} +8 -8
  42. package/dist/{index-QKpYJla2.cjs → index-DqyXFZs-.cjs} +1 -1
  43. package/dist/{index-BrvAcDAx.cjs → index-DrVQ9nWH.cjs} +1 -1
  44. package/dist/{index-BD520Bdq.js → index-Drf0UHtA.js} +2 -2
  45. package/dist/{index-GHNa0oiB.cjs → index-DuCF3sUz.cjs} +1 -1
  46. package/dist/{index-DWAPgVTC.js → index-DwpiuFOt.js} +1 -1
  47. package/dist/{index-D7ImgWoG.js → index-Gqj_J72M.js} +2 -2
  48. package/dist/{index-87JgKbhS.js → index-JUVkpquF.js} +5 -5
  49. package/dist/{index-GlI_cUmE.js → index-KQKwRHYH.js} +1 -1
  50. package/dist/{index-CMvdesXG.js → index-VUa2nWEE.js} +4 -4
  51. package/dist/{index-BixLw152.cjs → index-XBprM4fq.cjs} +1 -1
  52. package/dist/{index-DbKgNNNx.js → index-Z4h-aA4E.js} +1 -1
  53. package/dist/{index-Bmo81oyI.cjs → index-cxT9czjb.cjs} +1 -1
  54. package/dist/{index-RiQoG5eW.js → index-p8PoF9o7.js} +1 -1
  55. package/dist/{index-nwHJIeA3.cjs → index-pfU_XNbI.cjs} +1 -1
  56. package/dist/{index-B8jrdapR.js → index-qWOZEdHu.js} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CDsBC2Z1.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BOQQVWR8.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DHpiwUSI.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CJNNyWAx.js} +7 -7
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_zo3qhc.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B62qEXhy.js} +1 -1
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BGlcsi-a.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_v5GuXi.cjs} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DzzKuA7Q.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CUyDKgmU.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DaZpa7oY.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DlQue1vz.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-Xcpg85c2.cjs → index.vue_vue_type_style_index_1_lang-B6iI3wjr.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-C5Nub6V0.js → index.vue_vue_type_style_index_1_lang-Cwt1_SYX.js} +3 -3
  65. package/dist/{main-qWpjg-RJ.cjs → main-BNCpQWhK.cjs} +1 -1
  66. package/dist/{main-CMh3u4tC.js → main-DyO6Q6F8.js} +3 -3
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.js +9 -9
  69. package/dist/ss-component2.cjs +1 -1
  70. package/dist/ss-component2.js +10 -10
  71. package/dist/{threeModel-DFsI04Sg.cjs → threeModel-B9YW6NrH.cjs} +1 -1
  72. package/dist/{threeModel-Bt2R7DZG.js → threeModel-DhZGVIaw.js} +4 -4
  73. package/dist/{threePreview-B7R4HTui.js → threePreview-CHKsJcoK.js} +3 -3
  74. package/dist/{threePreview-BZH5nBKl.cjs → threePreview-DwigQHAL.cjs} +1 -1
  75. package/dist/{threeSceneView-IhIx7Ccr.cjs → threeSceneView-BTPPwF7w.cjs} +1 -1
  76. package/dist/{threeSceneView-DVWzWbFV.js → threeSceneView-DvFUSWJp.js} +8 -8
  77. package/dist/{threeSceneViewForCPMPIP-BV-IOnCC.js → threeSceneViewForCPMPIP-DlF5rNcF.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-Edyd6E8Q.cjs → threeSceneViewForCPMPIP-jMVJXNwq.cjs} +1 -1
  79. package/dist/{threeTrackPathView-C0TjsP3P.js → threeTrackPathView-Dk26Z18y.js} +3 -3
  80. package/dist/{threeTrackPathView-s7G2SBvd.cjs → threeTrackPathView-YwGgHZIp.cjs} +1 -1
  81. package/dist/{threeViewerHost-hLCXix-l.js → threeViewerHost-CHH4zCel.js} +2 -2
  82. package/dist/{threeViewerHost-PCzDzyiB.cjs → threeViewerHost-CL8nl9YW.cjs} +1 -1
  83. package/dist/{urdfTree-By95fHW4.js → urdfTree-Et3kzNVe.js} +1 -1
  84. package/dist/{urdfTree-Y6xeAMAm.cjs → urdfTree-xVeXXHR6.cjs} +1 -1
  85. package/dist/{workpieceTreePanel-Ci1zCNuj.cjs → workpieceTreePanel-CWob_ifV.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-Bm1WCeox.js → workpieceTreePanel-DAr9iWAX.js} +4 -4
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const kn=require("./index-BygvWjTm.cjs"),e=require("vue"),v=require("./index-C8qRkCgn.cjs"),Vt=require("./index-GHNa0oiB.cjs"),Se=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BGlcsi-a.cjs"),Xt=require("./index-BVUPfPv6.cjs"),No=require("./threeViewerHost-PCzDzyiB.cjs"),Kt=require("./index-DOCHgBta.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString--eJE54G5.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-DgorODjn.cjs"),mr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-LDkpO1-W.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),bn=require("./index-9hspBVrQ.cjs"),dn=require("./index-D_tbgi5B.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Mo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function co(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Mo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Mo:+n}var oo=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,O=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=co(i)||0,v.isObject(s)&&(_=!!s.leading,O="maxWait"in s,u=O?Yl(co(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function J(N){var E=r,me=d;return r=d=void 0,x=N,b=n.apply(me,E),b}function M(N){return x=N,g=setTimeout(K,i),_?J(N):b}function De(N){var E=N-f,me=N-x,Xe=i-E;return O?Jl(Xe,u-me):Xe}function X(N){var E=N-f,me=N-x;return f===void 0||E>=i||E<0||O&&me>=u}function K(){var N=oo();if(X(N))return le(N);g=setTimeout(K,De(N))}function le(N){return g=void 0,R&&r?J(N):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:le(oo())}function y(){var N=oo(),E=X(N);if(r=arguments,d=this,f=N,E){if(g===void 0)return M(f);if(O)return clearTimeout(g),g=setTimeout(K,i),J(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function yr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function br(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var L;const S=(L=nt.value)==null?void 0:L.split("/");return(S==null?void 0:S.some(ue=>(ue==null?void 0:ue.includes("updateLoading"))||(ue==null?void 0:ue.includes("loading"))))?!1:Ue.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=No.useThreeSystem(),_=e.ref(),O=e.ref(!1),R=e.ref(!1),J=e.ref([]),M=e.ref(),De=e.ref(!1),X=e.ref([]),K=kn.useFormToTableComp(v.pinia),le=kn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:N}=v.storeToRefs(y),E=e.ref(),me=e.ref(!0),Xe=Kt.useModelComp(v.pinia),{tableViewContents:st,itemData:ze,isEdit:Ue,routeToChildPath:Ee,lockingPage:V}=v.storeToRefs(Xe),ee=e.ref(null),se=e.ref(!1),ve=e.ref(!1),Ye=Kt.useMenuState(),{activeMenuPath:nt}=v.storeToRefs(Ye),Q=Se.useOriginalState(v.pinia),{originalPath:z}=v.storeToRefs(Q),be=e.ref([]),Ce=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$e=async S=>{ve.value=S,await pe("disabled",null,S,!0)},Fe=async S=>{await pe("operable",null,S,!0)};e.watch(()=>nt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ze=()=>{e.nextTick(()=>{Y()})},qe=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(L=>({...L,isFormColHidden:!(S!=null&&S.includes(L.label))}))};e.onUnmounted(()=>{ee.value=null});const he=S=>{d("clickTrigger",S)},F=async S=>{var q,L,ue,W,P,Ie;if(S===""){let ne="";(q=u.value)==null||q.forEach(we=>{we!=null&&we.isMain&&(ne=we==null?void 0:we.value)});let G=await Se.getItemData(Ee.value,sessionStorage.getItem("systemKey"),"");ne=((Ie=(P=(W=(ue=(L=G==null?void 0:G[0])==null?void 0:L.compData)==null?void 0:ue.find(we=>(we==null?void 0:we.key)==="mainRouters"))==null?void 0:W.contents)==null?void 0:P[0])==null?void 0:Ie.routerContent)+z.value+ne;let ce=await Se.getItemData(ne,sessionStorage.getItem("systemKey"),"");De.value=!0,X.value=ce==null?void 0:ce.filter(we=>(we==null?void 0:we.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=ee.value)==null?void 0:q.$el;S&&Se.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:ue,newIndex:W}=L;if(ue===W)return;const P=u.value.splice(ue,1)[0];u.value.splice(W,0,P)}})},pe=async(S,q,L,ue=!1)=>{var W,P,Ie,ne,G,ae,ce,we;try{Xe.setRefreshCurStructure(!1);const Te=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((W=Te==null?void 0:Te.data)==null?void 0:W.code)===200){let Be=(G=(ne=(Ie=(P=Te==null?void 0:Te.data)==null?void 0:P.result)==null?void 0:Ie[0])==null?void 0:ne.value)==null?void 0:G.pageData;ue?Be={...Be,compData:(ce=Be==null?void 0:Be.compData)==null?void 0:ce.map(Ae=>{var ye;return(Ae==null?void 0:Ae.key)==="formContent"?{...Ae,contents:(ye=Ae==null?void 0:Ae.contents)==null?void 0:ye.map(Ke=>({...Ke,[S]:L}))}:Ae})}:Be={...Be,compData:(ae=Be==null?void 0:Be.compData)==null?void 0:ae.map(Ae=>{var ye;return(Ae==null?void 0:Ae.key)==="formContent"?{...Ae,contents:(ye=Ae==null?void 0:Ae.contents)==null?void 0:ye.map(Ke=>(Ke==null?void 0:Ke.prop)===(q==null?void 0:q.prop)?{...Ke,[S]:L}:Ke)}:Ae})};const U=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Be}});((we=U==null?void 0:U.data)==null?void 0:we.code)===200?(v.ElMessage.success("编辑成功"),Xe.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},de=async(S,q)=>{await pe("label",q,S)},Z=async(S,q)=>{S&&await pe("type",q,S)},oe=async(S,q,L)=>{await pe(q,L,S,!1)},te=(S,q)=>{E.value===q?me.value=!1:me.value=!0,E.value=q==null?void 0:q.changeProp},ie=async S=>{var L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;let q=[];if((L=S==null?void 0:S.toString())!=null&&L.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((ue=S==null?void 0:S.toString())!=null&&ue.includes(".stl")||(W=S==null?void 0:S.toString())!=null&&W.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Ie=S==null?void 0:S.toString())!=null&&Ie.includes(".mtl")){const it=((ne=S==null?void 0:S.toString())==null?void 0:ne.split(",")).map(He=>({url:He,extension:x(He)}));f.value=it,g.value=!1,b.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".STL")||(ce=S==null?void 0:S.toString())!=null&&ce.includes(".obj")||(we=S==null?void 0:S.toString())!=null&&we.includes(".mtl")){let Ke,it=[],He={};if(Array.isArray(S)?Ke=S:Ke=S==null?void 0:S.split(","),Ke==null||Ke.forEach(rt=>{rt.includes(".mtl")?it.push(rt):He.blob=He.blob?He.blob+","+rt:rt}),(it==null?void 0:it.length)>0&&(He.mtlBlobs=it),(Be=(Te=Object.values(He))==null?void 0:Te[0])!=null&&Be.includes("http:"))q.push(He);else{const rt=new Blob([He.blob],{type:"application/octet-stream;charset=UTF-8"});let Pe=URL.createObjectURL(rt),gt="";(U=S==null?void 0:S.split("/"))==null||U.forEach((at,et)=>{var fe;et===((fe=S==null?void 0:S.split("/"))==null?void 0:fe.length)-1&&(gt=at)}),(Ae=He.blob)!=null&&Ae.includes(".stl")&&(gt=(gt==null?void 0:gt.replaceAll(">",""))+".urdf"),M.value=[{name:gt,blobUrl:Pe}],R.value=!0}}else{const Ke=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),it=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ke.close()}),He=new Blob([it.data],{type:"application/octet-stream;charset=UTF-8"});let rt=URL.createObjectURL(He),Pe="";(ye=S==null?void 0:S.split("/"))==null||ye.forEach((gt,at)=>{var et;at===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(Pe=gt)}),M.value=[{name:Pe,blobUrl:rt}],R.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Re=()=>{R.value=!1},ot=S=>{var P,Ie,ne,G;const q=(Ie=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Ie.contents,L=v.cloneDeep(S.content);let ue={};L&&((ne=Object.values(L))==null?void 0:ne.length)>0&&((G=Object.values(L))==null||G.forEach((ae,ce)=>{ue[q[ce].key]=ae}));const W={content:ue,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",W)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe;if(!S)return;(Be=(Te=r==null?void 0:r.itemData)==null?void 0:Te.find(Ne=>(Ne==null?void 0:Ne.key)==="parentFormPath"))==null||Be.contents;let q=st.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(Ne=>{var Me,xe,B,ge;let ke=(Me=Ne==null?void 0:Ne.key)==null?void 0:Me.split("/");return(r==null?void 0:r.compName)===(ke==null?void 0:ke[0])&&(xe=u.value)!=null&&xe.find(tt=>(tt==null?void 0:tt.prop)===(ke==null?void 0:ke[1]))&&(Ne.value=(ge=(B=u.value)==null?void 0:B.find(tt=>(tt==null?void 0:tt.prop)===(ke==null?void 0:ke[1])))==null?void 0:ge.value),Ne}),Xe.setTableViewContents(q));const L=v.cloneDeep(r.itemData);let ue=L==null?void 0:L.map(Ne=>{var ke;return(Ne==null?void 0:Ne.key)==="formContent"&&((ke=Ne.contents)==null||ke.map((Me,xe)=>{var B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft,xt,Ht,Yt;return Me.type=(ge=(B=u.value)==null?void 0:B.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ge.type,Me.options=Me!=null&&Me.options?Me.options:((Ge=(Le=(tt=Me==null?void 0:Me.key)==null?void 0:tt.split("$"))==null?void 0:Le[1])==null?void 0:Ge.length)>0?(ct=(dt=kn.formGetOptions((pt=(Oe=Me==null?void 0:Me.key)==null?void 0:Oe.split("$"))==null?void 0:pt[1]))==null?void 0:dt.split(","))==null?void 0:ct.map(Ot=>({label:Ot,value:Ot})):[],(vt=Me==null?void 0:Me.key)!=null&&vt.includes("$")&&(Me.key=(Bt=(bt=Me==null?void 0:Me.key)==null?void 0:bt.split("$"))==null?void 0:Bt[0]),Me.signature=(At=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:At.signature,Me.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Ft.isLoginUser,Me.value=(xt=Object.values(S))==null?void 0:xt[xe],Me.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Yt.isFormColHidden,Me})),Ne}),W=u.value,P=(Ae=(U=v.cloneDeep(ue))==null?void 0:U.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Ae.contents;if(W=W==null?void 0:W.map(Ne=>{var ke;return Ne.value=(ke=P==null?void 0:P.find((Me,xe)=>((Me==null?void 0:Me.id)??xe)===(Ne==null?void 0:Ne.id)))==null?void 0:ke.value,Ne}),!me.value){d("contentChange",{contents:ue,index:r.index});return}let Ie="",ne=(it=(Ke=(ye=v.cloneDeep(ue))==null?void 0:ye.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:it.find((Ne,ke)=>{var Me,xe,B;return(Ne==null?void 0:Ne.label)===E.value||ke.toString()===((B=(xe=(Me=E.value)==null?void 0:Me.split("t"))==null?void 0:xe[1])==null?void 0:B.toString())}),G=(He=ne==null?void 0:ne.optionUrl)==null?void 0:He.menuSelect,ae=!0;if((gt=(Pe=(rt=v.cloneDeep(ue))==null?void 0:rt.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Pe.contents)==null||gt.forEach(Ne=>{var ke,Me,xe,B,ge,tt;ae&&((xe=(Me=(ke=Ne==null?void 0:Ne.optionUrl)==null?void 0:ke.groupSelect)==null?void 0:Me[1])!=null&&xe.includes("["))&&(Ie=(ge=(B=Ne==null?void 0:Ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1],JSON.stringify(G)===JSON.stringify((tt=Ne==null?void 0:Ne.optionUrl)==null?void 0:tt.menuSelect)&&(ae=!1))}),(at=ne==null?void 0:ne.optionUrl)!=null&&at.menuSelect&&me.value){let Ne=await kn.getSelectRow(ne),ke,Me=(et=ne==null?void 0:ne.optionUrl)==null?void 0:et.menuSelect;if(Ne==null||Ne.forEach(xe=>{var B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt;Ie===((ge=(B=ne==null?void 0:ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1])&&((Ge=(Le=(tt=ne==null?void 0:ne.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Le[1])!=null&&Ge.includes("["))&&((vt=v.cloneDeep(xe))==null?void 0:vt[(ct=(dt=(pt=(Oe=ne==null?void 0:ne.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:pt[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(ne==null?void 0:ne.value)&&(ke=xe)}),ke){let xe=v.cloneDeep(W);xe=xe==null?void 0:xe.map(ge=>{var tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt;return(ke!=null&&ke[ge==null?void 0:ge.label]||ke!=null&&ke[(Oe=(Ge=(Le=(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Le[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Oe.replaceAll("]","")])&&((ct=(dt=(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:dt[1])!=null&&ct.includes("["))&&Me!=null&&Me.every(At=>{var _t,Ft;return(Ft=(_t=ge==null?void 0:ge.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(At)})&&(ge.value=(ke==null?void 0:ke[ge==null?void 0:ge.label])||(ke==null?void 0:ke[(Pt=(Bt=(bt=(vt=ge==null?void 0:ge.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:bt[1])==null?void 0:Bt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(ge.value)&&ge.value.every(At=>(At==null?void 0:At.url)&&(At==null?void 0:At.name))&&(ge.type="Upload")),ge}),xe=xe==null?void 0:xe.map(ge=>{var tt,Le,Ge;return(tt=ge==null?void 0:ge.optionUrl)!=null&&tt.oldMenuSelect&&(ge.optionUrl.menuSelect=(Ge=(Le=v.cloneDeep(ge))==null?void 0:Le.optionUrl)==null?void 0:Ge.oldMenuSelect),ge}),u.value=v.cloneDeep(xe);let B=v.cloneDeep(xe);B=B==null?void 0:B.map(ge=>{var tt,Le,Ge,Oe,pt,dt;return(Le=(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.menuSelect)!=null&&Le.some(ct=>ct==null?void 0:ct.includes("["))&&(ge.optionUrl.oldMenuSelect=(Oe=(Ge=v.cloneDeep(ge))==null?void 0:Ge.optionUrl)==null?void 0:Oe.menuSelect,ge.optionUrl.menuSelect=(dt=(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.menuSelect)==null?void 0:dt.map(ct=>{var vt,bt,Bt,Pt;if(ct!=null&&ct.includes("[")){let At=(bt=(vt=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:bt[1];ct=(Pt=(Bt=v.cloneDeep(xe))==null?void 0:Bt.find(_t=>(_t==null?void 0:_t.label)===At))==null?void 0:Pt.value}return ct})),ge}),u.value=B}else u.value=W;ue=ue==null?void 0:ue.map(xe=>{var B;return(xe==null?void 0:xe.key)==="formContent"&&(xe.contents=(B=xe.contents)==null?void 0:B.map(ge=>{var tt,Le,Ge,Oe;return ge.value=((Le=(tt=u.value)==null?void 0:tt.find(pt=>(pt==null?void 0:pt.label)===(ge==null?void 0:ge.key)))==null?void 0:Le.value)??(ge==null?void 0:ge.value),ge.type=((Oe=(Ge=u.value)==null?void 0:Ge.find(pt=>(pt==null?void 0:pt.prop)===(ge==null?void 0:ge.key)))==null?void 0:Oe.type)??(ge==null?void 0:ge.type),ge})),xe})}me.value=!1,d("contentChange",{contents:ue,index:r.index});let ce=[],we=[];if((Ve=v.cloneDeep((fe=ue==null?void 0:ue.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:fe.contents))==null||Ve.forEach(Ne=>{var ke;Array.isArray(Ne==null?void 0:Ne.value)&&((ke=Ne==null?void 0:Ne.value)!=null&&ke.find(Me=>{var xe;return(xe=Me==null?void 0:Me.url)==null?void 0:xe.includes(".obj")}))&&(we=Ne==null?void 0:Ne.value)}),(we==null?void 0:we.length)>0){const Ne=(Qe=v.cloneDeep(we))==null?void 0:Qe.filter(ke=>{var Me;return(Me=ke==null?void 0:ke.url)==null?void 0:Me.includes(".obj")});Ne==null||Ne.forEach(ke=>{var xe,B,ge,tt;const Me=(xe=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:xe.map(Le=>Le==null?void 0:Le.url);ce.push({objUrl:ke==null?void 0:ke.url,mtlUrls:((B=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:B.length)===1?(tt=(ge=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:ge[0])==null?void 0:tt.url:Me})}),le.setObjUrl(ce)}},I=S=>{if(!S)return;const q=[];let L="";for(let ue of S)(ue.includes("[")||L.includes("["))&&(L+=ue.trim(),v.cloneDeep(L).split("【").length-1===v.cloneDeep(L).split("】").length-1&&v.cloneDeep(L).split("[").length-1===v.cloneDeep(L).split("]").length-1&&(q.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return q},H=(S,q,L)=>{let ue="";const W=q==null?void 0:q.map(P=>{var Ie;return(Ie=P==null?void 0:P.value)==null?void 0:Ie.pageData});return W==null||W.forEach(P=>{var Ie;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Ie=P==null?void 0:P.compData)==null||Ie.forEach(ne=>{var G;(ne==null?void 0:ne.key)==="formContent"&&((G=ne==null?void 0:ne.contents)==null||G.forEach(ae=>{var ce;(ae==null?void 0:ae.prop)===(S==null?void 0:S[1])&&(ue=(ae==null?void 0:ae.value)===""?Se.judgeContents((ce=v.cloneDeep(ae))==null?void 0:ce.optionUrl,L):ae==null?void 0:ae.value)}))}))}),ue},w=(S,q,L,ue)=>{var ne,G;let W="",P="";(ne=v.cloneDeep(q))==null||ne.forEach((ae,ce)=>{ae!=null&&ae.includes("[")?P=P+z.value+S[ce]:P=P===""?P+ae:P+"/"+ae});let Ie=(G=ue[P])==null?void 0:G.map(ae=>{var ce;return(ce=ae==null?void 0:ae.value)==null?void 0:ce.pageData});return Ie==null||Ie.forEach(ae=>{var ce;(ae==null?void 0:ae.name)===(L==null?void 0:L[0])&&((ce=ae==null?void 0:ae.compData)==null||ce.forEach(we=>{var Te;(we==null?void 0:we.key)==="formContent"&&((Te=we==null?void 0:we.contents)==null||Te.forEach(Be=>{(Be==null?void 0:Be.prop)===(L==null?void 0:L[1])&&(W=Be==null?void 0:Be.value)}))}))}),W};return e.watch(()=>r.itemData,async()=>{var Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;const S=(Ie=r.itemData)==null?void 0:Ie.find(fe=>(fe==null?void 0:fe.key)==="formContent"),q=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(fe=>(fe==null?void 0:fe.key)==="formButton"),L=(G=v.cloneDeep(r.itemData))==null?void 0:G.find(fe=>(fe==null?void 0:fe.key)==="formFlex"),ue=(ae=v.cloneDeep(r.itemData))==null?void 0:ae.find(fe=>(fe==null?void 0:fe.key)==="formWrap"),W=(ce=v.cloneDeep(r.itemData))==null?void 0:ce.find(fe=>(fe==null?void 0:fe.key)==="enableWrap");if((ue==null?void 0:ue.contents)==="纵向"?O.value=!1:O.value=!0,D.value=(W==null?void 0:W.contents)===void 0?!1:W==null?void 0:W.contents,$.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((we=L==null?void 0:L.contents)==null?void 0:we.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,((Te=S==null?void 0:S.contents)==null?void 0:Te.length)>0&&Array.isArray(S==null?void 0:S.contents)){let fe=r.allMapContents;const Ve=(U=(Be=v.cloneDeep(S))==null?void 0:Be.contents)==null?void 0:U.map((B,ge)=>{var At,_t,Ft,xt,Ht,Yt,Ot,Aa,wa,Va,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa;let tt=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",Le=(B==null?void 0:B.type)??"",Ge=(B==null?void 0:B.options)??[];if((At=B==null?void 0:B.key)!=null&&At.includes("$")&&(tt=(_t=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:_t[0],((xt=(Ft=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ft[1])==null?void 0:xt.length)>0)){const[wt,Jt]=(Yt=(Ht=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Le=((Ot=Se.FormType.find(yt=>(yt==null?void 0:yt.key)===wt))==null?void 0:Ot.value)??"",((Aa=Jt==null?void 0:Jt.split(","))==null?void 0:Aa.length)>0&&(Ge=(wa=Jt==null?void 0:Jt.split(","))==null?void 0:wa.map(yt=>({label:yt,value:yt})))}let Oe=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(Oe=(Ka=(Va=B==null?void 0:B.contents)==null?void 0:Va.split(","))==null?void 0:Ka.map(wt=>({label:wt,value:wt}))),((Da=B==null?void 0:B.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Oe=(Ca=(ja=B==null?void 0:B.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let pt=!1,dt=(B==null?void 0:B.isFormColHidden)??!1,ct=Se.judgeContents((Ua=v.cloneDeep(B))==null?void 0:Ua.optionUrl,fe),vt=ct!==void 0&&ct!==""?ct:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(Ge==null?void 0:Ge.length)>0?(Wa=Ge==null?void 0:Ge[0])==null?void 0:Wa.value:(B==null?void 0:B.value)??"",bt=!1,Bt=ct!==void 0||Le===""?"Input":Le;if((Array.isArray(ct)&&(ct!=null&&ct.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Bt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.isLoginUser)pt=!0,vt=((Ha=N.value)==null?void 0:Ha.姓名)||((qa=N.value)==null?void 0:qa.account)||((Ga=N.value)==null?void 0:Ga.账号)||((Oa=N.value)==null?void 0:Oa.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(bt=!0,(B==null?void 0:B.isShow)==="originalSignature")Bt="image",vt=h.value+"/"+((ba=N.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(B.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=ze.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var Ma;(Qt==null?void 0:Qt.key)==="formContent"&&((Ma=Qt==null?void 0:Qt.contents)==null||Ma.forEach(St=>{(St==null?void 0:St.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=St==null?void 0:St.value)}))}))})});let Jt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),yt=B==null?void 0:B.isShow;Jt==null||Jt.forEach(Mt=>{Mt!=null&&Mt.value?yt=yt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):yt=yt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((_a=yt==null?void 0:yt.split("==="))==null?void 0:_a[0])+"==='"+((ka=yt==null?void 0:yt.split("==="))==null?void 0:ka[1])+"'":yt=((na=yt==null?void 0:yt.split("="))==null?void 0:na[0])+"='"+((ga=yt==null?void 0:yt.split("="))==null?void 0:ga[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(dt=!1,Bt="image",vt=h.value+"/"+((Xa=N.value)==null?void 0:Xa.signature)):vt=""}return Array.isArray(vt)&&vt.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Bt="Url"),{label:tt??"",name:"t"+ge,prop:v.cloneDeep(B==null?void 0:B.key),type:Bt,value:B!=null&&B.isNewDate&&vt===""?new Date:vt,id:(B==null?void 0:B.id)??ge,contents:(Oe==null?void 0:Oe.length)>0?Oe:Ge??[],width:(B==null?void 0:B.width)??1,isLoginUser:pt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:dt,signature:bt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}}),Qe=Ve==null?void 0:Ve.map(B=>B==null?void 0:B.value);let Ne="";Qe==null||Qe.forEach(B=>{B!==""&&B!==void 0&&(Ne=Ne===""?B:Ne+"/"+B)}),K.setSelectArray(Qe),K.setSelectString(Ne);let ke=(Ae=v.cloneDeep(Ve))==null?void 0:Ae.map(B=>(B!=null&&B.value&&Se.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));ke=ke==null?void 0:ke.map(B=>{var ge,tt,Le,Ge,Oe,pt,dt,ct;if((tt=(ge=B==null?void 0:B.optionUrl)==null?void 0:ge.menuSelect)!=null&&tt.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";B.optionUrl.oldMenuSelect=(Ge=(Le=v.cloneDeep(B))==null?void 0:Le.optionUrl)==null?void 0:Ge.menuSelect,B.optionUrl.menuSelect=(pt=(Oe=B==null?void 0:B.optionUrl)==null?void 0:Oe.menuSelect)==null?void 0:pt.map(bt=>{var Bt,Pt,At,_t,Ft,xt;if(bt!=null&&bt.includes("[")){let Ht=(Pt=(Bt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"))==null?void 0:Pt[1];vt=H((At=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),fe==null?void 0:fe[nt.value],fe),bt=((Ft=(_t=v.cloneDeep(ke))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Ft.value)||H((xt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),fe==null?void 0:fe[nt.value],fe)}return bt}),vt!==""&&B.value===""&&(B.value=w(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(dt=B==null?void 0:B.optionUrl)==null?void 0:dt.groupSelect,fe),Array.isArray(B.value)&&((ct=B.value)!=null&&ct.every(bt=>bt==null?void 0:bt.url))&&(B.type="UPLOAD"))}return B}),u.value=ke,ve.value=((ye=u.value)==null?void 0:ye.every(B=>B==null?void 0:B.disabled))||V.value===nt.value,se.value=(Ke=u.value)==null?void 0:Ke.every(B=>B==null?void 0:B.operable),be.value=(it=u.value)==null?void 0:it.map(B=>B==null?void 0:B.label);let Me=[],xe=[];if((He=v.cloneDeep(u.value))==null||He.forEach(B=>{var ge;Array.isArray(B==null?void 0:B.value)&&((ge=B==null?void 0:B.value)!=null&&ge.find(tt=>{var Le;return(Le=tt==null?void 0:tt.url)==null?void 0:Le.includes(".obj")}))&&(xe=B==null?void 0:B.value)}),(xe==null?void 0:xe.length)>0){const B=(rt=v.cloneDeep(xe))==null?void 0:rt.filter(ge=>{var tt;return(tt=ge==null?void 0:ge.url)==null?void 0:tt.includes(".obj")});B==null||B.forEach(ge=>{var Le,Ge,Oe,pt;const tt=(Le=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Le.map(dt=>dt==null?void 0:dt.url);Me.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((Ge=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Ge.length)===1?(pt=(Oe=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Oe[0])==null?void 0:pt.url:tt})}),le.setObjUrl(Me)}(Pe=v.cloneDeep(u.value))==null||Pe.forEach(B=>{var ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At;if((tt=(ge=B==null?void 0:B.value)==null?void 0:ge.toString())!=null&&tt.includes(".stl")||(Ge=(Le=B==null?void 0:B.value)==null?void 0:Le.toString())!=null&&Ge.includes(".STL")||(pt=(Oe=B==null?void 0:B.value)==null?void 0:Oe.toString())!=null&&pt.includes(".obj")||(ct=(dt=B==null?void 0:B.value)==null?void 0:dt.toString())!=null&&ct.includes(".mtl")||(bt=(vt=B==null?void 0:B.value)==null?void 0:vt.toString())!=null&&bt.includes(".urdf")){let _t={},Ft=[],xt;Array.isArray(B==null?void 0:B.value)?xt=B==null?void 0:B.value:xt=(Bt=B==null?void 0:B.value)==null?void 0:Bt.split(","),xt==null||xt.forEach(Ht=>{Ht.includes(".mtl")?Ft.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Ft==null?void 0:Ft.length)>0&&(_t.mtlBlobs=Ft),(At=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&At.includes("http:")}})}else u.value=[];let P=st.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(fe=>{var Qe,Ne,ke,Me;let Ve=(Qe=fe==null?void 0:fe.key)==null?void 0:Qe.split("/");return(r==null?void 0:r.compName)===(Ve==null?void 0:Ve[0])&&(Ne=u.value)!=null&&Ne.find(xe=>(xe==null?void 0:xe.prop)===(Ve==null?void 0:Ve[1]))&&(fe.value=(Me=(ke=u.value)==null?void 0:ke.find(xe=>(xe==null?void 0:xe.prop)===(Ve==null?void 0:Ve[1])))==null?void 0:Me.value),fe}),Xe.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let fe={};(gt=v.cloneDeep(u).value)==null||gt.forEach(Ve=>{(Ve==null?void 0:Ve.isMain)===!0&&(fe[(Ve==null?void 0:Ve.prop)??(Ve==null?void 0:Ve.name)]=[{required:!0,message:`${(Ve==null?void 0:Ve.prop)||(Ve==null?void 0:Ve.name)}不能为空`}])}),_.value=fe}if(((at=q==null?void 0:q.contents)==null?void 0:at.length)>0){const fe=[];(et=q==null?void 0:q.contents)==null||et.forEach((Ve,Qe)=>{(Ve==null?void 0:Ve.label)!==""&&fe.push({label:(Ve==null?void 0:Ve.label)??"",id:(Ve==null?void 0:Ve.id)??Qe,type:(Ve==null?void 0:Ve.type)??"",background:Ve==null?void 0:Ve.background})}),J.value=fe}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,S=>{ve.value=S===nt.value},{immediate:!0}),(S,q)=>{const L=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-switch"),W=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Ie=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(Vt.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:ot,onChange:C,formDisabled:ve.value,formLabelsOperable:se.value,isButtonRow:O.value,onPreview:ie,onBlurChange:te,onHandleColEditChange:de,onHandleColTypeChange:Z,onRouteUrl:F,onClickTrigger:he},{operateCol:e.withCtx(({renderColumns:ne,formDisabled:G,formLabelsOperable:ae})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ze},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ue,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:$e,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ue,{"model-value":ae,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ie,{modelValue:be.value,"onUpdate:modelValue":q[0]||(q[0]=ce=>be.value=ce),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ee,onChange:qe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne,ce=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ce.label},[e.createVNode(W,{value:ce.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ce.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var we;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((we=Object.keys(ce))==null?void 0:we.filter(Te=>{var Be;return(Be=Ce.value)==null?void 0:Be.find(U=>(U==null?void 0:U.value)===Te)}),Te=>{var Be,U;return e.openBlock(),e.createElementBlock("div",{key:Te},[e.createVNode(Vt._sfc_main$2,{value:ce==null?void 0:ce[Te],"active-text":(U=(Be=Ce.value)==null?void 0:Be.find(Ae=>(Ae==null?void 0:Ae.value)===Te))==null?void 0:U.label,inactiveText:"",onChange:Ae=>oe(Ae,Te,ce)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Re},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},zo=Lt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),$n=e.ref(0),kr=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:kr(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:kr(r==null?void 0:r.children)},r))},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Cr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Cr(r==null?void 0:r.children,i),r)),n)},It=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{var y;d.value=!0;let $=[];It==null||It.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},J=D=>{r("deleteChange",v.cloneDeep(D))},M=D=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},De=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=It==null?void 0:It.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const me=It==null?void 0:It.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));me?D[me.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=D=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(N,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(N.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>M(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>O(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>le(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(_r,{tableChildContents:N==null?void 0:N.children,onDeleteChange:J,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=Lt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];It==null||It.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},J=D=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},M=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},De=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=It==null?void 0:It.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const me=It==null?void 0:It.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));me?D[me.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),N=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,me)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>J(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(N,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(N,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_r=Lt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Li={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),O=e.ref([]),R=e.ref(""),J=e.ref(""),M=e.ref([]),De=e.ref([]),X=e.ref([]),K=e.ref([]),le=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),N=e.ref([]),E=e.ref([]),me=e.ref([]),Xe=()=>{le.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},st=()=>{var C,I,H;b.value=!0;let h=[];(H=(I=(C=Se.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||H.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),N.value=h,E.value=h},ze=h=>{h||(N.value=E.value)},Ue=async h=>{var C,I,H,w,S,q,L,ue,W,P,Ie,ne;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:I.value)){let G=[],ae=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(W=(ue=Se.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:W.value)==null?void 0:P.value):(L=(q=Se.FormContent)==null?void 0:q.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:L.value;if(ae==null||ae.forEach(ce=>{y.value++,G.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[ce.label])??"",id:y.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),h!=null&&h.菜单选项&&((Ie=h==null?void 0:h.菜单选项)==null?void 0:Ie.length)>0){const ce=await Se.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(we=>((we==null?void 0:we.name)==="组信息选项"&&(we.contents=ce),we))}E.value=await Se.selectToBase(v.cloneDeep(G)),N.value=await Se.selectToBase(v.cloneDeep(G))}else{let G=v.cloneDeep(N.value);if(G=G==null?void 0:G.map(ae=>(ae.value=h==null?void 0:h[ae.name],ae)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const ae=await Se.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=ae),ce))}G=Se.formToOptionsContents(G),E.value=await Se.selectToBase(v.cloneDeep(G))}},Ee=async h=>{await Ue(h),N.value=E.value},V=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return yr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},ee=async h=>{var H,w,S,q,L,ue,W,P,Ie;b.value=!0;let C=[];const I=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(W=(ue=Se.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:W.value)==null?void 0:P.value):(L=(q=Se.FormContent)==null?void 0:q.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:L.value;if(I==null||I.forEach(ne=>{y.value++,C.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):V(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Ie=h==null?void 0:h.menuSelect)==null?void 0:Ie.length)>0){const ne=await Se.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ne),G))}R.value=h==null?void 0:h.id,N.value=await Se.selectToBase(Se.formToOptionsContents(C)),E.value=await Se.selectToBase(Se.formToOptionsContents(C))},se=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;me.value=(C=v.cloneDeep(me.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=me.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ve=()=>{b.value=!1,N.value=[],R.value=""},Ye=async()=>{var H,w,S,q,L,ue,W,P,Ie,ne;N.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((L=(q=Se.FormContent)==null?void 0:q.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:L.value);if((ue=N.value)==null||ue.forEach(G=>{const ae=C==null?void 0:C.find(ce=>(ce==null?void 0:ce.label)===(G==null?void 0:G.label));ae&&(h[ae.key]=G.value)}),h.name=h.label,(W=me.value)!=null&&W.find(G=>G.id===h.id))me.value=(P=me.value)==null?void 0:P.map(G=>(G.id===h.id&&(G=h),G));else{let G=v.cloneDeep(me.value);me.value||(me.value=[]),G.push(h),me.value=G}me.value=me.value.map(({id:G,...ae})=>ae),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Ie=v.cloneDeep(s.originalItemContents))!=null&&Ie.find(G=>(G==null?void 0:G.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=me.value),G)):I.push({key:"tableToForm",contents:me.value}),r("change",I)},nt=h=>{le.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(H=>(H==null?void 0:H.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="page"&&(H.contents=_.value),H)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const Q=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;De.value=(C=v.cloneDeep(De.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="extraButton"&&(H.contents=De.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var I,H,w,S,q;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(L=>{const ue=Ta==null?void 0:Ta.find(W=>(W==null?void 0:W.label)===(L==null?void 0:L.label));ue?h[ue.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(H=De.value)!=null&&H.find(L=>L.id===h.id))De.value=(w=De.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(De.value)??[];L.push(h),De.value=L}le.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="extraButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(L=>((L==null?void 0:L.key)==="extraButton"&&(L.contents=De.value),L)):C.push({key:"extraButton",contents:De.value}),r("change",C)},be=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},Ce=()=>{le.value=!1,D.value=[],R.value=""},$e=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,X.value=C,K.value=C},Fe=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;M.value=(C=v.cloneDeep(M.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="rowButton"&&(H.contents=M.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let h=[];It==null||It.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,O.value=h},qe=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),X.value=h,K.value=h},he=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,H,w,S,q;X.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=X.value)==null||I.forEach(L=>{const ue=Ia==null?void 0:Ia.find(W=>(W==null?void 0:W.label)===(L==null?void 0:L.label));ue?h[ue.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(H=M.value)!=null&&H.find(L=>L.id===h.id))M.value=(w=M.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(M.value);L.push(h),M.value=L}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="rowButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(L=>((L==null?void 0:L.key)==="rowButton"&&(L.contents=M.value),L)):C.push({key:"rowButton",contents:M.value}),r("change",C)},Y=()=>{f.value=!1,R.value="",K.value=[],X.value=[]},pe=h=>{u.value=!0;let C=[];It==null||It.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,J.value=h==null?void 0:h.id,O.value=C},de=h=>{var C;g.value=xr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var H;return(I==null?void 0:I.key)==="header"&&(I.contents=(H=g.value)!=null&&H.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Z=h=>{var I,H,w;h.type==="fix"?h.id!==""?g.value=Dr(g.value,h):g.value=wr(g.value,h==null?void 0:h.contents):g.value=Cr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(H=v.cloneDeep(s.originalItemContents))!=null&&H.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},oe=h=>{var I;u.value=!0;let C=[];It==null||It.forEach(H=>{y.value++,C.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:h[H.key],id:y.value,contents:H==null?void 0:H.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,J.value="",x.value=C,O.value=C},te=h=>{let C=v.cloneDeep(O.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),O.value=C},ie=()=>{u.value=!1,R.value="",J.value="",O.value=[]},Re=()=>{var I,H,w,S,q,L;x.value=O.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(ue=>{const W=It==null?void 0:It.find(P=>(P==null?void 0:P.label)===(ue==null?void 0:ue.label));W?h[W.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(h.children=ue.children)}),(H=g.value)!=null&&H.find(ue=>ue.id===h.id))g.value=(w=g.value)==null?void 0:w.map(ue=>(ue.id===h.id&&(ue=h),ue));else{let ue=v.cloneDeep(g.value)??[];J.value===""?ue.push(h):ue=ue==null?void 0:ue.map(W=>(W.id===J.value&&(W.children||(W.children=[]),W.children.push(h)),W)),g.value=ue}g.value=(S=g.value)!=null&&S.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,u.value=!1,R.value="",J.value="";let C=v.cloneDeep(s.originalItemContents);(q=v.cloneDeep(s.originalItemContents))!=null&&q.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(L=v.cloneDeep(s.originalItemContents))==null?void 0:L.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),r("change",C)},ot=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>{var w;return(H==null?void 0:H.key)==="header"&&(H.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),H})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:C.contents,M.value=(H=(I=d.value)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:H.contents,De.value=(S=(w=d.value)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="extraButton"))==null?void 0:S.contents,_.value=(L=(q=d.value)==null?void 0:q.find(U=>(U==null?void 0:U.key)==="page"))!=null&&L.contents?!!((W=(ue=d.value)==null?void 0:ue.find(U=>(U==null?void 0:U.key)==="page"))!=null&&W.contents):!1,me.value=(Ie=(P=d.value)==null?void 0:P.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Ie.contents,g.value=(ne=g.value)==null?void 0:ne.map((U,Ae)=>(Array.isArray(U)?U=ri(U):U={label:(U==null?void 0:U.label)??"",prop:(U==null?void 0:U.label)==="操作"?"operate":U==null?void 0:U.prop,width:U!=null&&U.width?parseInt(U.width):"",fixed:(U==null?void 0:U.fixed)??void 0,sortable:(U==null?void 0:U.sortable)??!1,align:(U==null?void 0:U.align)??"left",showOverflowTooltip:(U==null?void 0:U.showOverflowTooltip)??!0,isNotDrag:(U==null?void 0:U.isNotDrag)??!1,isEditCol:(U==null?void 0:U.isEditCol)??!1,isOperate:(U==null?void 0:U.isOperate)??!1,id:(U==null?void 0:U.id)??Ae,formMenuSelect:(U==null?void 0:U.formMenuSelect)??void 0,groupSelect:(U==null?void 0:U.groupSelect)??void 0},U)),g.value=(G=g.value)!=null&&G.every(U=>Array.isArray(U))?(ae=g.value)==null?void 0:ae[0]:g.value,M.value=(ce=M.value)==null?void 0:ce.map((U,Ae)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",textColor:(U==null?void 0:U.textColor)??"#000000",id:(U==null?void 0:U.id)??Ae}),De.value=(we=De.value)==null?void 0:we.map((U,Ae)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",background:(U==null?void 0:U.background)??"var(--ssComponent-primary-color)",id:(U==null?void 0:U.id)??Ae}),me.value)me.value=(Be=me.value)==null?void 0:Be.map(U=>{y.value++;let Ae=U;return Ae.id=y.value,Ae});else{let U=[];const Ae=(Te=Se.getColumnChild(v.cloneDeep(g.value)))==null?void 0:Te.filter(ye=>(ye==null?void 0:ye.prop)!=="operate");Ae==null||Ae.forEach(ye=>{var Ke;y.value++,U.push({label:ye==null?void 0:ye.label,name:(ye==null?void 0:ye.prop)||(ye==null?void 0:ye.label),type:ye!=null&&ye.groupSelect?"Select":"Input",value:"",id:y.value,contents:ye==null?void 0:ye.options,menuSelect:ye==null?void 0:ye.formMenuSelect,groupSelect:(Ke=ye==null?void 0:ye.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),me.value=U}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),H=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(H,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>pe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>oe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>ot(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(_r,{tableChildContents:w==null?void 0:w.children,onDeleteChange:de,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",zi,[e.createElementVNode("div",Li,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>$e(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Fe(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>nt(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Q(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:st},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>ee(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(H,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(H,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:he},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(H,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(H,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:le.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(H,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(H,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:Ue,onChangeVisible:ze,onBlurChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(H,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(H,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Lt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=Kt.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=Kt.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((O=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:O.h)||s,minW:((J=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:J.minW)||ps.value,minH:((De=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:De.minH)||vs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},Er=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,O;return((O=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:O.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>Er(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>Er(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(O=>{for(const[R,J]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===R)return{...O,value:J};return O})},{immediate:!0});const u=g=>Vt.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,O=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(O.type)),{modelValue:O.value,"onUpdate:modelValue":R=>O.value=R,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:R=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=Lt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((le,D)=>(le[D==null?void 0:D.prop]=D==null?void 0:D.rule,le),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,le,D)=>{var N;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(N=s==null?void 0:s.relatedData)==null?void 0:N.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...O(K,le,D)]:y=$,y},O=(K,le,D)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,le)=>{var E,me,Xe,st,ze,Ue,Ee,V,ee;const D=((ze=(st=(Xe=(me=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:me.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Xe.contents)==null?void 0:st.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:ze.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((ee=(V=(Ee=(Ue=s==null?void 0:s.comp)==null?void 0:Ue.compData)==null?void 0:Ee.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:V.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],N=_(D,y,K);f.value=le?ks(N,le):N,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const J=K=>{const le=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const D=le==null?void 0:le.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},M=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},De=(K,le)=>{x.value=le==null?void 0:le.changeProp,J(K)},X=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:De,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=Lt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=Lt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},zs={class:"fix-content"},Ls={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),O=e.ref(!1),R=e.ref(0),J=e.ref([]),M=e.ref([]),De=(V,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[V.key];if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const se=ee[V.key];return yr(se)?se:V.default}return(V==null?void 0:V.label)==="类型"&&ee[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!ee[V.key]?!1:ee[V.key]},X=async V=>{var ve,Ye,nt,Q,z,be;d.value=!0;let ee=[];const se=await((nt=(Ye=(ve=Se.FormContent)==null?void 0:ve.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ye.value)==null?void 0:nt.value)??((z=(Q=Se.FormContent)==null?void 0:Q.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:z.value);if(se==null||se.forEach(Ce=>{R.value++,ee.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,prop:Ce==null?void 0:Ce.prop,value:De(Ce,V),id:R.value,contents:Ce==null?void 0:Ce.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((be=V==null?void 0:V.menuSelect)==null?void 0:be.length)>0){const Ce=await Se.menuToContentType(V==null?void 0:V.menuSelect);ee=ee==null?void 0:ee.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=Ce),$e))}_.value=V==null?void 0:V.id,u.value=await Se.selectToBase(Se.formToOptionsContents(ee)),b.value=await Se.selectToBase(Se.formToOptionsContents(ee))},K=V=>{var se;g.value=!0;let ee=[];(se=Se.FormButton)==null||se.forEach(ve=>{R.value++,ee.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"&&V[ve.key]===""?"normal":V[ve.key],id:R.value,contents:ve==null?void 0:ve.options})}),J.value=ee,M.value=ee,_.value=V==null?void 0:V.id};e.watch(()=>O.value,()=>{var ee,se;let V=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(ve=>(ve==null?void 0:ve.key)==="enableWrap")?V=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="enableWrap"&&(ve.contents=!O.value),ve)):V.push({key:"enableWrap",contents:!O.value}),r("change",V)},{deep:!0});const le=()=>{var se,ve,Ye,nt,Q;J.value=M.value;let V={};if(_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value),(se=J.value)==null||se.forEach(z=>{var Ce;const be=(Ce=Se.FormButton)==null?void 0:Ce.find($e=>($e==null?void 0:$e.label)===(z==null?void 0:z.label));be&&(V[be.key]=z.value)}),(ve=f.value)!=null&&ve.find(z=>z.id===V.id))f.value=(Ye=f.value)==null?void 0:Ye.map(z=>(z.id===V.id&&(z=V),z));else{let z=v.cloneDeep(f.value);f.value||(f.value=[]),z.push(V),f.value=z}g.value=!1,_.value="";let ee=v.cloneDeep(s.originalItemContents);(nt=v.cloneDeep(s.originalItemContents))!=null&&nt.find(z=>(z==null?void 0:z.key)==="formButton")?ee=(Q=v.cloneDeep(s.originalItemContents))==null?void 0:Q.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=f.value),z)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},D=V=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;x.value=(ee=v.cloneDeep(x.value))==null?void 0:ee.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="formContent"&&(ve.contents=x.value),ve))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=V=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="formButton"&&(ve.contents=f.value),ve))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let V=[];(ee=Se.FormButton)==null||ee.forEach(se=>{R.value++,V.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:R.value,contents:se==null?void 0:se.options})}),J.value=V,M.value=V},N=()=>{var ee,se,ve;d.value=!0;let V=[];(ve=(se=(ee=Se.FormContent)==null?void 0:ee.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:se.value)==null||ve.forEach(Ye=>{R.value++,V.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:R.value,contents:Ye==null?void 0:Ye.options})}),u.value=V,b.value=V},E=V=>{let ee=v.cloneDeep(M.value);ee=ee==null?void 0:ee.map(se=>(se.value=V==null?void 0:V[se.name],se)),M.value=ee},me=V=>{const ee=V.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=V.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),ve=V.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");se!=null&&se.value&&Ao.isString(ve.value)&&(ve.value=[ve.value]),!(se!=null&&se.value)&&!Ao.isString(ve.value)&&(ve.value="")},Xe=async V=>{var ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze;if((V==null?void 0:V.类型)!==((se=(ee=b.value)==null?void 0:ee.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:se.value)){let qe=[];const he=await((nt=(Ye=(ve=Se.FormContent)==null?void 0:ve.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ye.value)==null?void 0:nt.value)?await(($e=(Ce=(be=Se.FormContent)==null?void 0:be.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ce.value)==null?void 0:$e.value):(z=(Q=Se.FormContent)==null?void 0:Q.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:z.value;if(he==null||he.forEach(F=>{var pe,de;R.value++;const Y=br(F==null?void 0:F.default)?(V==null?void 0:V[F.label])??F.value??"":F==null?void 0:F.default;qe.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:Y,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((de=(pe=b.value)==null?void 0:pe[0])==null?void 0:de.width)??1})}),V!=null&&V.菜单选项&&((Fe=V==null?void 0:V.菜单选项)==null?void 0:Fe.length)>0){const F=await Se.menuToContentType(V==null?void 0:V.菜单选项);qe=qe==null?void 0:qe.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=F),Y))}me(qe),b.value=await Se.selectToBase(v.cloneDeep(qe)),u.value=await Se.selectToBase(v.cloneDeep(qe))}else{let qe=v.cloneDeep(b.value);if(qe=qe==null?void 0:qe.map(he=>(he.value=V==null?void 0:V[he.name],he)),V!=null&&V.菜单选项&&((Ze=V==null?void 0:V.菜单选项)==null?void 0:Ze.length)>0){const he=await Se.menuToContentType(V==null?void 0:V.菜单选项);qe=qe==null?void 0:qe.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=he),F))}qe=Se.formToOptionsContents(qe),me(qe),b.value=await Se.selectToBase(v.cloneDeep(qe))}},st=V=>{V||(u.value=b.value)},ze=async V=>{await Xe(V),u.value=b.value},Ue=vo(async()=>{var ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he;u.value=b.value;let V={};V.width=((Ye=(ve=u.value)==null?void 0:ve[0])==null?void 0:Ye.width)??1,_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value);let ee=await((z=(Q=(nt=Se.FormContent)==null?void 0:nt.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Q.value)==null?void 0:z.value)??((Ce=(be=Se.FormContent)==null?void 0:be.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Ce.value);if(($e=u.value)==null||$e.forEach(F=>{const Y=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(F==null?void 0:F.label));Y&&(V[Y.key]=F.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Fe=x.value)!=null&&Fe.find(F=>F.id===V.id))x.value=(Ze=x.value)==null?void 0:Ze.map(F=>(F.id===V.id&&(F=V),F));else{let F=v.cloneDeep(x.value);F.push(V),x.value=F}x.value=x.value.map(({id:F,...Y})=>Y),d.value=!1,_.value="";let se=v.cloneDeep(s.originalItemContents);(qe=v.cloneDeep(s.originalItemContents))!=null&&qe.find(F=>(F==null?void 0:F.key)==="formContent")?se=(he=v.cloneDeep(s.originalItemContents))==null?void 0:he.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),Ee=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,ve,Ye,nt,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=v.cloneDeep(s.originalItemContents);x.value=((ee=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:se.contents)??[],O.value=(ve=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ve.contents?!((Ye=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ye.contents):!0,x.value=(nt=v.cloneDeep(x.value))==null?void 0:nt.map((z,be)=>{var $e;let Ce=z;return Ce.id=(z==null?void 0:z.id)??be,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=(($e=z==null?void 0:z.options)==null?void 0:$e.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,Ce}),x.value=Se.formToOptionsContents(x.value),f.value=(Q=f.value)==null?void 0:Q.map((z,be)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:be})},{deep:!0,immediate:!0}),(V,ee)=>{const se=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:N},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Ye)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>D(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",zs,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ls,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Ye)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>$(Ye)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:O.value,"onUpdate:modelValue":ee[0]||(ee[0]=Ye=>O.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Xe,onChangeVisible:st,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(ve,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ve,{class:"ok-button button",onClick:e.unref(Ue),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ee,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=Lt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),O=X=>{var K;x.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},J=X=>{var K,le,D;if((X==null?void 0:X.buttonName)==="确认"){const $=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(le=_.value)==null?void 0:le.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=M())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),De=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:De,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=Lt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=X=>{var K;u.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},J=X=>{var K,le,D,$;if((X==null?void 0:X.buttonName)==="确认"){const y=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(N=>{y[N]===""&&delete y[N]}),d.value){case"create":(le=b.value)==null||le.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(N=>N.index===(y==null?void 0:y.index)?{...N,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:N);break}r("change",($=M())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),De=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(u.value=((K=X==null?void 0:X.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((le=X==null?void 0:X.find(D=>D.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:De,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Lt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=Lt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var N;if(y.key==="extra"){let E=[];(N=y.value)==null||N.forEach(me=>{var Xe;E.push((Xe=Object.values(me))==null?void 0:Xe[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const O=(D,$,y,N)=>{var me;let E={};((me=D==null?void 0:D[0])==null?void 0:me.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Xe=>(Xe==null?void 0:Xe.key)!=="tableContentName"),f.value=E,x.value=y,_.value=N.id)},R=D=>{var Xe,st,ze,Ue;const $=(st=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:st.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),y=(Ue=(ze=Object.values(v.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:Ue.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),N=y==null?void 0:y.map((Ee,V)=>{var ee;return V===D.index&&(Ee==null?void 0:Ee.comp)==="Table"&&(Ee.compData=(ee=Ee.compData)==null?void 0:ee.map(se=>{var ve,Ye;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Ye=(ve=D.content)==null?void 0:ve.map(nt=>{let Q={};for(let z in nt)z!=="id"&&(Q[z]=nt[z]);return Q}))==null?void 0:Ye.map(nt=>Object.values(nt))),se})),Ee});N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),me={};for(let Ee in E)me[Ee]=N;f.value=me},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},M=D=>{var Xe,st,ze,Ue;const $=(st=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:st.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),y=(Ue=(ze=Object.values(v.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:Ue.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),N=y==null?void 0:y.map((Ee,V)=>(V===D.index&&(Ee.compData=D.contents),Ee));N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),me={};for(let Ee in E)me[Ee]=N;f.value=me},De=()=>{var $,y;let D={};for(let N in x.value)N===(($=Object.keys(f.value))==null?void 0:$[0])?D[N]=(y=Object.values(f.value))==null?void 0:y[0]:D[N]=x.value[N];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},le=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(N==null?void 0:N.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:E,index:(N==null?void 0:N.id)??E,onContentClick:O,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,onChange:R,childItemData:N==null?void 0:N.itemChildData,key:E,onContentChange:M,index:(N==null?void 0:N.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=Lt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Se.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Se.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=Kt.useModelComp(v.pinia),_=e.ref(!1),O=Kt.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:J,isEdit:M,routeToChildPath:De,tableViewContents:X,lockingPage:K,payloadTypes:le}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(O),{loginUserInfo:N}=v.storeToRefs(R),E=e.ref(!1),me=async()=>{var Q,z;(Q=i.value)!=null&&Q.find(be=>(be==null?void 0:be.buttonName)==="保存")&&await se((z=i.value)==null?void 0:z.find(be=>(be==null?void 0:be.buttonName)==="保存")),await Se.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Xe=()=>{u.value=!1,b.value=void 0},st=Q=>Q.map(z=>{const be={};for(const Ce in z){const $e=z[Ce];if(Ce.includes(f.value)){const Fe=Ce.split(f.value);let Ze=be;Fe.forEach((qe,he)=>{he===Fe.length-1?Ze[qe]=$e:(Ze[qe]||(Ze[qe]={}),Ze=Ze[qe])})}else be[Ce]=$e}return be}),ze=async(Q,z,be=[])=>{var $e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot;let Ce=($e=v.cloneDeep(z))==null?void 0:$e.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let h=(F=(he=(qe=(Ze=(Fe=v.cloneDeep(Q))==null?void 0:Fe.split("["))==null?void 0:Ze[1])==null?void 0:qe.split("]"))==null?void 0:he[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(Y=Ce==null?void 0:Ce.find(H=>(H==null?void 0:H.name)===(h==null?void 0:h[0])))==null?void 0:Y.compData;if(!I){let H=(pe=Q==null?void 0:Q.split("["))==null?void 0:pe[0],w=await Se.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",be);I=(de=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:de.compData}I==null||I.forEach(H=>{var w,S,q,L,ue,W;if((H==null?void 0:H.key)==="formContent")(w=H==null?void 0:H.contents)==null||w.forEach(P=>{var Ie;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Ie=P==null?void 0:P.value)==null?void 0:Ie.toString())});else if((H==null?void 0:H.key)==="tableContents"){let P=[],Ie=(S=I==null?void 0:I.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,ne=(h==null?void 0:h[1])??"";if(Ie!=null&&Ie.every(G=>Array.isArray(G))){let G=Se.getColumnChild((ue=Ie==null?void 0:Ie[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(W=H.contents)==null||W.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(we=>!(we!=null&&we.id)),G==null||G.forEach((we,Te)=>{let Be=ae[Te];typeof ae[Te]=="number"&&(Be=ae[Te].toString()),(ne===""||ne===we.prop)&&(ce[we.prop]=Be)}),P.push(ce)}),P=st(P)}else{let G=(q=Ie==null?void 0:Ie.map(ae=>ae==null?void 0:ae.label))==null?void 0:q.filter(ae=>ae!=="操作");(L=H.contents)==null||L.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(we=>!(we!=null&&we.id)),G==null||G.forEach((we,Te)=>{let Be=ae[Te];typeof ae[Te]=="number"&&(Be=ae[Te].toString()),(ne===""||ne===we)&&(ce[we]=Be)}),P.push(ce)})}C=P}})}return C}else if(Q!=null&&Q.includes("/")){let h={};return(Z=v.cloneDeep(Ce))==null||Z.forEach((C,I)=>{var H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;if((C==null?void 0:C.comp)==="Table"){let Ke=Array.isArray((S=(w=(H=C==null?void 0:C.compData)==null?void 0:H.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(W=(ue=(L=(q=C==null?void 0:C.compData)==null?void 0:q.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:L.contents)==null?void 0:ue[0])==null?void 0:W.some(Pe=>Pe==null?void 0:Pe.children):[],it=(ne=(Ie=(P=C==null?void 0:C.compData)==null?void 0:P.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:ne.map(Pe=>(Pe!=null&&Pe.find(gt=>gt==null?void 0:gt.id)&&(Pe=Pe.slice(1)),Pe)),He=(Te=(we=(ce=(ae=(G=C==null?void 0:C.compData)==null?void 0:G.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:ae.contents)==null?void 0:ce[0])==null?void 0:we[0])==null?void 0:Te.label,rt=(U=(Be=C==null?void 0:C.compData)==null?void 0:Be.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:U.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Se.tableToForm(it,rt):h[He]=Se.tableToForm(it,rt);else{const Pe=[];rt=rt.slice(1,rt.length-1),rt==null||rt.forEach((gt,at)=>{it==null||it.forEach(et=>{Pe.push({key:gt.label+et[0],value:et[at+1]})})}),h["form"+I]=Pe}}else{const Ke=(ye=(Ae=C.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:ye.contents;h!=null&&h.form||(h.form=[]);const it=[];Ke==null||Ke.forEach(He=>{He.key!==""&&(He={key:(He==null?void 0:He.key)??(He==null?void 0:He.label),value:He==null?void 0:He.value},it.push(He))}),h.form=[...it,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(Q==="createInsofDataApi"){let h=(oe=v.cloneDeep(z))==null?void 0:oe[0];return h={comp:(te=v.cloneDeep(h))==null?void 0:te.comp,compData:(ie=v.cloneDeep(h))==null?void 0:ie.compData,name:(Re=v.cloneDeep(h))==null?void 0:Re.name,isShow:(ot=v.cloneDeep(h))==null?void 0:ot.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return Q}},Ue=async(Q,z,be)=>{var Fe,Ze,qe;let Ce=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),$e=Ce==null?void 0:Ce.find(he=>(he==null?void 0:he.name)===(be==null?void 0:be[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let he={};for(let te in v.cloneDeep(Q))v.cloneDeep(Q)[te]!=="loginUser"?he[te]=v.cloneDeep(Q)[te]:he[te]=((Fe=N.value)==null?void 0:Fe.account)||((Ze=N.value)==null?void 0:Ze.账号);let F=[],Y=he;Array.isArray(Q)||(Y=[he]),Y==null||Y.forEach(te=>{F.push({[te[be[1]]]:te})});let pe=[],de=F==null?void 0:F.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]});Ce==null||Ce.forEach(te=>{var ie;(te==null?void 0:te.name)===(be==null?void 0:be[0])&&((ie=te==null?void 0:te.compData)==null||ie.forEach(Re=>{var ot;(Re==null?void 0:Re.key)==="tableContents"&&((ot=Re==null?void 0:Re.contents)==null||ot.forEach(h=>{h!=null&&h.some(C=>de.includes(C))&&pe.push({[h.find(C=>C.id).id]:h.find(C=>de.includes(C))})}))}))});let Z=pe==null?void 0:pe.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]}),oe=[];if(Z==null||Z.forEach(te=>{var ot;let ie=(ot=pe==null?void 0:pe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:ot[te],Re=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===ie});oe.push({id:parseInt(te),value:{tableData:Re[ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if(($e==null?void 0:$e.comp)==="Form"){let he=v.cloneDeep($e);he.compData=(qe=he.compData)==null?void 0:qe.map(pe=>{var de;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(de=pe.contents)==null?void 0:de.map(Z=>((Z==null?void 0:Z.key)===(be==null?void 0:be[1])&&(Z.value=(Q==null?void 0:Q[Z==null?void 0:Z.prop])||Q),Z))),pe});let F={};for(let pe in he)pe!=="id"&&(F[pe]=he[pe]);let Y=[];if(Y.push({id:$e==null?void 0:$e.id,keyType:be==null?void 0:be[1],value:{pageData:F}}),(Y==null?void 0:Y.length)>0)return Y}}},Ee=async(Q,z,be)=>{var Fe,Ze,qe,he,F,Y,pe,de,Z,oe;let Ce=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),$e=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.name)===(be==null?void 0:be[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let te={};for(let ie in v.cloneDeep(Q))v.cloneDeep(Q)[ie]!=="loginUser"?te[ie]=v.cloneDeep(Q)[ie]:te[ie]=((Fe=N.value)==null?void 0:Fe.account)||((Ze=N.value)==null?void 0:Ze.账号);await v.createInsofDataApi({key:{type:"data",pageKey:z,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if(($e==null?void 0:$e.comp)==="Form"){let te=v.cloneDeep($e),ie=Object.keys(Q),Re="";(he=(qe=v.cloneDeep(te))==null?void 0:qe.compData)==null||he.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(L=>{var ue;ie.includes(L==null?void 0:L.key)&&(L==null?void 0:L.value)===((ue=N.value)==null?void 0:ue.姓名)&&(Re=L==null?void 0:L.key)}))});let ot=[];(F=Object.values(Q[Re]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&ot.push(w)}),ot=[...new Set(ot)];const h=ot==null?void 0:ot.map(async w=>{var W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae;let S="";(ae=(G=(ne=(Ie=(P=(W=v.cloneDeep(w))==null?void 0:W.split("("))==null?void 0:P[1])==null?void 0:Ie.split(")"))==null?void 0:ne[0])==null?void 0:G.split(":"))==null||ae.forEach(ye=>{S=S===""?S+ye.replaceAll("'",""):S+"/"+ye.replaceAll("'","")});let q=[];(Ae=(U=(Be=(Te=(we=(ce=v.cloneDeep(w))==null?void 0:ce.split("<"))==null?void 0:we[1])==null?void 0:Te.split(">"))==null?void 0:Be[0])==null?void 0:U.split(":"))==null||Ae.forEach(ye=>{q.push(ye.replaceAll("'",""))});const L=await Se.getItemData(S,sessionStorage.getItem("systemKey"),"");let ue="";return L==null||L.forEach(ye=>{var Ke;ye.name===(q==null?void 0:q[0])&&((Ke=ye==null?void 0:ye.compData)==null||Ke.forEach(it=>{var He;(it==null?void 0:it.key)==="formContent"&&((He=it.contents)==null||He.forEach(rt=>{(rt==null?void 0:rt.key)===(q==null?void 0:q[1])&&(ue=rt==null?void 0:rt.value)}))}))}),{[w]:ue}}),C=await Promise.all(h);te.compData=(pe=(Y=v.cloneDeep(te))==null?void 0:Y.compData)==null?void 0:pe.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(L=>{var ue,W,P,Ie;return(ue=Q[Re])!=null&&ue[L==null?void 0:L.key]&&(Q[Re][L==null?void 0:L.key].includes("(")?L.value=(W=C==null?void 0:C.find(ne=>{var G;return((G=Object.keys(ne))==null?void 0:G[0])===Q[Re][L==null?void 0:L.key]}))==null?void 0:W[Q[Re][L==null?void 0:L.key]]:L.value=(Ie=(P=v.cloneDeep(Q))==null?void 0:P[Re])==null?void 0:Ie[L==null?void 0:L.key]),L})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let H="";((de=I==null?void 0:I.data)==null?void 0:de.type)==="success"&&((oe=(Z=I==null?void 0:I.data)==null?void 0:Z.result)==null||oe.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(be==null?void 0:be[0])&&(H=w.id)}),await v.updateInsofDataApi({id:H,value:{pageData:te}}))}}},V=(Q,z="",be={})=>{for(const[Ce,$e]of Object.entries(Q)){const Fe=z?`${z}.${Ce}`:Ce;$e!==null&&typeof $e=="object"&&!Array.isArray($e)&&Object.prototype.toString.call($e)!=="[object Date]"?V($e,Fe,be):be[Fe]=$e}return be},ee=async(Q,z,be,Ce)=>{var Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie;let $e=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=$e==null?void 0:$e.find(ne=>(ne==null?void 0:ne.name)===(be==null?void 0:be[0]));if(Fe){if(!(be!=null&&be[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let ne={},G=[],ae=(qe=(Ze=Fe==null?void 0:Fe.compData)==null?void 0:Ze.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(Te=>Array.isArray(Te))?G=(F=Se.getColumnChild((he=ae==null?void 0:ae[0])==null?void 0:he.filter(Te=>(Te==null?void 0:Te.label)!=="操作")))==null?void 0:F.map(Te=>Te==null?void 0:Te.prop):G=ae==null?void 0:ae.map(Te=>Te==null?void 0:Te.label);for(let Te in v.cloneDeep(Q))if(v.cloneDeep(Q)[Te]!=="loginUser"){let Be=V(v.cloneDeep(Q)[Te]),U={};for(let Ae in Be)if(G!=null&&G.find(ye=>ye===Ae))U[Ae]=Be[Ae];else if(G!=null&&G.find(ye=>(ye==null?void 0:ye.toUpperCase())===(Ae==null?void 0:Ae.toUpperCase()))){let ye=G==null?void 0:G.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(Ae==null?void 0:Ae.toUpperCase()));U[ye]=Be[Ae]}ne[Te]=U}else ne[Te]=((Y=N.value)==null?void 0:Y.account)||((pe=N.value)==null?void 0:pe.账号);let ce=await v.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((Z=(de=ce==null?void 0:ce.data)==null?void 0:de.result)==null?void 0:Z.length)>0){let Te=(te=(oe=ce==null?void 0:ce.data)==null?void 0:oe.result)==null?void 0:te.map(Be=>Be==null?void 0:Be.id);(Te==null?void 0:Te.length)>0&&await v.batchDeleteInsofDataApi({ids:Te})}let we=[];if((ie=Fe==null?void 0:Fe.compData)!=null&&ie.find(Te=>(Te==null?void 0:Te.key)==="pageColumn")&&((h=(ot=(Re=Fe==null?void 0:Fe.compData)==null?void 0:Re.find(Te=>(Te==null?void 0:Te.key)==="pageColumn"))==null?void 0:ot.contents)!=null&&h.includes("["))){const Te=await v.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let Be=((w=(H=(I=(C=Te==null?void 0:Te.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:H.key)==null?void 0:w.pageKey)??"";(S=Object.values(ne))==null||S.forEach(U=>{we.push({key:{type:"data",pageKey:Be,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(ne))==null||q.forEach(Te=>{we.push({key:{type:"data",pageKey:z,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Te}})});(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we})}else if(!(be!=null&&be[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let ne=v.cloneDeep(Fe);ne.compData=(ue=(L=v.cloneDeep(ne))==null?void 0:L.compData)==null?void 0:ue.map(ce=>{var we,Te;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Te=(we=v.cloneDeep(ce))==null?void 0:we.contents)==null?void 0:Te.map(Be=>{var U,Ae;return(U=v.cloneDeep(Q))!=null&&U[Be==null?void 0:Be.key]&&(Be.value=(Ae=v.cloneDeep(Q))==null?void 0:Ae[Be==null?void 0:Be.key]),Be})),ce});const G=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((W=G==null?void 0:G.data)==null?void 0:W.type)==="success"&&((Ie=(P=G==null?void 0:G.data)==null?void 0:P.result)==null||Ie.forEach(ce=>{var we,Te;((Te=(we=ce==null?void 0:ce.value)==null?void 0:we.pageData)==null?void 0:Te.name)===(be==null?void 0:be[0])&&(ae=ce.id)}),await v.updateInsofDataApi({id:ae,value:{pageData:ne}}))}}},se=async Q=>{var z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie;O.setImportLoading(!0);try{if(Q.api){let Re=new WeakMap;(be=(z=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:z.filter(W=>{var P,Ie;return((P=W==null?void 0:W.key)==null?void 0:P.pageKey)!=="menu"&&((Ie=W==null?void 0:W.key)==null?void 0:Ie.pageKey)!=="secret"}))==null||be.forEach(W=>{Re[W.key.pageKey]?Re[W.key.pageKey]=[...Re[W.key.pageKey],W]:Re[W.key.pageKey]=[W]});let h=await Se.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),C="";if(h=h==null?void 0:h.map(W=>{var P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;if((W==null?void 0:W.comp)==="Form")W.compData=(P=W.compData)==null?void 0:P.map(Ke=>{var it;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(it=Ke.contents)==null?void 0:it.map(He=>{var rt;if((He==null?void 0:He.value)===""&&(He==null?void 0:He.type)==="Select"){let Pe=Se.judgeContents((rt=v.cloneDeep(He))==null?void 0:rt.optionUrl,Re);He.value=He.value||Pe}return He})),Ke});else if((W==null?void 0:W.comp)==="Table"&&(Ie=W.compData)!=null&&Ie.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(G=(ne=W.compData)==null?void 0:ne.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn"))==null?void 0:G.contents,it=((ce=(ae=W.compData)==null?void 0:ae.find(Pe=>(Pe==null?void 0:Pe.key)==="pageGroup"))==null?void 0:ce.contents)??"",He=(Be=(Te=(we=Ke==null?void 0:Ke.split("["))==null?void 0:we[1])==null?void 0:Te.split("]"))==null?void 0:Be[0];C=((U=Ke==null?void 0:Ke.split("["))==null?void 0:U[0])+((ye=(Ae=X.value)==null?void 0:Ae.find(Pe=>(Pe==null?void 0:Pe.key)===He))==null?void 0:ye.value)}return W}),!(C===""||C==="")){const W=await Se.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Re);h=h==null?void 0:h.map(P=>{var Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it;if((P==null?void 0:P.comp)==="Table"&&(Ie=P.compData)!=null&&Ie.find(He=>(He==null?void 0:He.key)==="pageColumn")){let He=(G=(ne=P.compData)==null?void 0:ne.find(et=>(et==null?void 0:et.key)==="pageColumn"))==null?void 0:G.contents,rt=((ce=(ae=P.compData)==null?void 0:ae.find(et=>(et==null?void 0:et.key)==="pageGroup"))==null?void 0:ce.contents)??"",Pe=(Be=(Te=(we=He==null?void 0:He.split("["))==null?void 0:we[1])==null?void 0:Te.split("]"))==null?void 0:Be[0],gt=((U=He==null?void 0:He.split("["))==null?void 0:U[0])+((ye=(Ae=X.value)==null?void 0:Ae.find(et=>(et==null?void 0:et.key)===Pe))==null?void 0:ye.value),at=(Ke=W==null?void 0:W.find(et=>(et==null?void 0:et.name)===(rt===""?d==null?void 0:d.compName:rt)))==null?void 0:Ke.compData;P.compData=(it=P.compData)==null?void 0:it.map(et=>{var fe;return(et==null?void 0:et.key)==="tableContents"&&(et.contents=(fe=at==null?void 0:at.find(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"))==null?void 0:fe.contents),et})}return P})}let I={};if((($e=(Ce=Q==null?void 0:Q.extraValues)==null?void 0:Ce.input)==null?void 0:$e.length)>0){const W=(Ze=(Fe=Q==null?void 0:Q.extraValues)==null?void 0:Fe.input)==null?void 0:Ze.map(async P=>{var Ie;ve!=null&&ve.find(ne=>ne===P)?I=await ze(P,h):I[Object.keys(P)[0]]=await ze((Ie=Object.values(P))==null?void 0:Ie[0],h,Re)});await Promise.all(W)}else I=await ze("/",h);let H=!1;(he=(qe=Q==null?void 0:Q.extraValues)==null?void 0:qe.output)==null||he.forEach(W=>{var P,Ie;(Ie=(P=Object.values(W))==null?void 0:P[0])!=null&&Ie.includes(".doc")&&(H=!0)});let w;if(H){const W=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(Q.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{W.close()})}else w=await v.axios.post(Q.api,I,{headers:{"Content-Type":"application/json"}});let S=(de=(pe=(Y=(F=v.cloneDeep(Q))==null?void 0:F.extraValues)==null?void 0:Y.output)==null?void 0:pe.map(W=>{var P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt;if(!((Ie=(P=Object.values(W))==null?void 0:P[0])!=null&&Ie.includes(".doc"))){let Pe=(U=(Be=(Te=(G=v.cloneDeep((ne=Object.values(W))==null?void 0:ne[0]))==null?void 0:G.split("["))==null?void 0:Te[((we=(ce=v.cloneDeep((ae=Object.values(W))==null?void 0:ae[0]))==null?void 0:ce.split("["))==null?void 0:we.length)-1])==null?void 0:Be.split("]"))==null?void 0:U[0],gt=Pe==null?void 0:Pe.split(":"),at=(Ke=v.cloneDeep((Ae=Object.values(W))==null?void 0:Ae[0]))==null?void 0:Ke.substring(0,v.cloneDeep((ye=Object.values(W))==null?void 0:ye[0]).lastIndexOf("["));if(at=(He=v.cloneDeep(at))==null?void 0:He.slice(0,((it=v.cloneDeep(at))==null?void 0:it.length)-1),at!=null&&at.includes("[")){let et="";if((rt=Se.contentTransArrayToAll(at,"/"))==null||rt.forEach(fe=>{var Ve,Qe,Ne,ke,Me,xe,B;if(!(fe!=null&&fe.includes("[")))et=et===""?et+fe.replaceAll("/",""):et+"/"+fe.replaceAll("/","");else{let ge=v.cloneDeep(fe).slice(1,((Ve=v.cloneDeep(fe))==null?void 0:Ve.length)-1),tt=(xe=(Me=(ke=(Ne=(Qe=v.cloneDeep(ge))==null?void 0:Qe.split("["))==null?void 0:Ne[1])==null?void 0:ke.split("]"))==null?void 0:Me[0])==null?void 0:xe.split(":"),Le="",Ge=(B=h==null?void 0:h.find(Oe=>(Oe==null?void 0:Oe.name)===(tt==null?void 0:tt[0])))==null?void 0:B.compData;Ge==null||Ge.forEach(Oe=>{var pt;(Oe==null?void 0:Oe.key)==="formContent"&&((pt=Oe==null?void 0:Oe.contents)==null||pt.forEach(dt=>{(dt==null?void 0:dt.key)===(tt==null?void 0:tt[1])&&(Le=dt==null?void 0:dt.value)}))}),et=et===""?et+Le.replaceAll("/",""):et+"/"+Le.replaceAll("/","")}}),at=et,at[(at==null?void 0:at.length)-1]!=="/")return at}}}))==null?void 0:de.filter(W=>W);S=[...new Set(v.cloneDeep(S))];let q=S==null?void 0:S.map(async W=>{let P=await Se.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((P==null?void 0:P.length)===0)return await Se.getParentContents(W)});await Promise.all(q);let L=[],ue=(te=(oe=(Z=v.cloneDeep(Q))==null?void 0:Z.extraValues)==null?void 0:oe.output)==null?void 0:te.map(async W=>{var Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe,Ne,ke,Me,xe,B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft,xt,Ht,Yt,Ot,Aa,wa,Va,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa,wt,Jt,yt,vn,Mt,ca,Ea,oa,ma,Qt;if((Be=(Te=Object.values(W))==null?void 0:Te[0])!=null&&Be.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Ie=w.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ne.exec(Ie),ae=G==null?void 0:G[1],ce=document.createElement("a"),we=window.URL.createObjectURL(P);b.value=[{name:ae,blobUrl:we}],u.value=!0}else{let Ma=(Pe=(rt=(He=(Ae=v.cloneDeep((U=Object.values(W))==null?void 0:U[0]))==null?void 0:Ae.split("["))==null?void 0:He[((it=(Ke=v.cloneDeep((ye=Object.values(W))==null?void 0:ye[0]))==null?void 0:Ke.split("["))==null?void 0:it.length)-1])==null?void 0:rt.split("]"))==null?void 0:Pe[0],St=Ma==null?void 0:Ma.split(":"),qt=(et=v.cloneDeep((gt=Object.values(W))==null?void 0:gt[0]))==null?void 0:et.substring(0,v.cloneDeep((at=Object.values(W))==null?void 0:at[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ve=v.cloneDeep(qt))==null?void 0:Ve.slice(0,((fe=v.cloneDeep(qt))==null?void 0:fe.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(Qe=Se.contentTransArrayToAll(qt,"/"))==null||Qe.forEach((Nt,Ut)=>{var Wt,Rt,ua,la,za,Ya,La,Ja,En,rn,hn;if(!(Nt!=null&&Nt.includes("[")))Et=Et===""?Et+Nt.replaceAll("/",""):Et+"/"+Nt.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(Nt))!=null&&Wt.includes("]")?(ln=v.cloneDeep(Nt).slice(1,((Rt=v.cloneDeep(Nt))==null?void 0:Rt.length)-1),va=(La=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:La.split(":")):(ln=v.cloneDeep(Nt).slice(1,(Ja=v.cloneDeep(Nt))==null?void 0:Ja.length),va=(En=v.cloneDeep(ln))==null?void 0:En.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Sn;(ia==null?void 0:ia.key)==="formContent"&&((Sn=ia==null?void 0:ia.contents)==null||Sn.forEach(Fa=>{(Fa==null?void 0:Fa.key)===(va==null?void 0:va[1])&&(Za=Fa==null?void 0:Fa.value)}))}),((hn=Se.contentTransArrayToAll(qt,"/"))==null?void 0:hn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(Ne=D.value)!=null&&Ne.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((ke=Object.keys(W))==null?void 0:ke[0]);if(((Me=w==null?void 0:w.data)==null?void 0:Me.statusCode)===200||((xe=w==null?void 0:w.data)==null?void 0:xe.code)===200){if(((ge=(B=w==null?void 0:w.data)==null?void 0:B.data)!=null&&ge[ra]||(Le=(tt=w==null?void 0:w.data)==null?void 0:tt.result)!=null&&Le[ra])&&(St==null?void 0:St.length)===1)return await ee(((Oe=(Ge=w==null?void 0:w.data)==null?void 0:Ge.data)==null?void 0:Oe[ra])||((dt=(pt=w==null?void 0:w.data)==null?void 0:pt.result)==null?void 0:dt[ra]),v.cloneDeep(qt),St,C);if((vt=(ct=w==null?void 0:w.data)==null?void 0:ct.data)!=null&&vt[ra]||(Bt=(bt=w==null?void 0:w.data)==null?void 0:bt.result)!=null&&Bt[ra]){let Et=await Ue(((At=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:At[ra])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[ra]),v.cloneDeep(qt),St);return Et&&(L=[...L,...Et]),Et}else{if(!((xt=w==null?void 0:w.data)!=null&&xt.data)){let Et=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(St==null?void 0:St[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Rt=>{var ua;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(ua=Rt.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(St==null?void 0:St[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Rt})),Ut});let Nt=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Rt in Ut)Rt!=="id"&&(Wt[Rt]=Ut[Rt]);Nt.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(Nt==null?void 0:Nt.length)>0&&await v.batchUpdateInsofDataApi({dataList:Nt});return}if((St==null?void 0:St.length)===1){const Et=(Aa=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Aa.path;let Nt="";(ja=(Da=(Ka=(Va=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Va.split(")"))==null?void 0:Ka[0])==null?void 0:Da.split(":"))==null||ja.forEach(Rt=>{var ua,la;Nt=Nt===""?Nt+((ua=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:ua.trim()):Nt+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Oa=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Oa.data)!=null&&ba[St==null?void 0:St[0]]?Wt=await ee((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[St==null?void 0:St[0]],Nt,St,C):Wt=await Ee((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,Nt,Ut,Re),Wt}else{const Et=(Jt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Jt.path;let Nt="";return(Ea=(ca=(Mt=(vn=(yt=Et==null?void 0:Et.split("("))==null?void 0:yt[1])==null?void 0:vn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Rt,ua;Nt=Nt===""?Nt+((Rt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Rt.trim()):Nt+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await Ue((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[St==null?void 0:St[0]],Nt,St)}}}}});if(await Promise.all(ue),(L==null?void 0:L.length)>0){let W=[];L==null||L.forEach(ne=>{W!=null&&W.find(G=>{var ae,ce,we,Te;return((ce=(ae=G==null?void 0:G.value)==null?void 0:ae.pageData)==null?void 0:ce.name)===((Te=(we=ne==null?void 0:ne.value)==null?void 0:we.pageData)==null?void 0:Te.name)})||W.push(ne)});let P=[];W==null||W.forEach(ne=>{var ce,we,Te,Be;let G=v.cloneDeep(ne);G.value.pageData.compData=(ce=G.value.pageData.compData)==null?void 0:ce.map(U=>{var Ae;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Ae=U.contents)==null?void 0:Ae.map(ye=>{var it,He,rt,Pe;let Ke=(it=v.cloneDeep(L))==null?void 0:it.find(gt=>(gt==null?void 0:gt.keyType)===(ye==null?void 0:ye.key));if(Ke){let gt=(Pe=(rt=(He=Ke.value.pageData.compData)==null?void 0:He.find(at=>(at==null?void 0:at.key)==="formContent"))==null?void 0:rt.contents)==null?void 0:Pe.find(at=>(at==null?void 0:at.key)===(ye==null?void 0:ye.key));ye.value=gt==null?void 0:gt.value}return ye})),U}),P.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ae=[];(Be=(Te=(we=G==null?void 0:G.value)==null?void 0:we.pageData)==null?void 0:Te.compData)==null||Be.forEach(U=>{var Ae;(U==null?void 0:U.key)==="formContent"&&((Ae=U==null?void 0:U.contents)==null||Ae.forEach(ye=>{var Ke,it,He,rt,Pe,gt;if((it=(Ke=ye==null?void 0:ye.optionUrl)==null?void 0:Ke.menuSelect)!=null&&it.find(at=>at==null?void 0:at.includes("[")))if(ae!=null&&ae.find(at=>{var et,fe,Ve;return((et=at==null?void 0:at.key)==null?void 0:et.join(","))===((Ve=(fe=ye==null?void 0:ye.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:Ve.join(","))})){let at=(He=ae==null?void 0:ae.find(et=>{var fe,Ve,Qe;return((fe=et==null?void 0:et.key)==null?void 0:fe.join(","))===((Qe=(Ve=ye==null?void 0:ye.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Qe.join(","))}))==null?void 0:He.value;at.push({key:ye==null?void 0:ye.prop,groups:(rt=ye==null?void 0:ye.optionUrl)==null?void 0:rt.groupSelect,value:ye==null?void 0:ye.value}),ae=ae==null?void 0:ae.map(et=>{var fe,Ve,Qe;return((fe=et==null?void 0:et.key)==null?void 0:fe.join(","))===((Qe=(Ve=ye==null?void 0:ye.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Qe.join(","))&&(et.value=at),et})}else ae.push({key:(Pe=ye==null?void 0:ye.optionUrl)==null?void 0:Pe.menuSelect,value:[{key:ye==null?void 0:ye.prop,groups:(gt=ye==null?void 0:ye.optionUrl)==null?void 0:gt.groupSelect,value:ye==null?void 0:ye.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(U=>{var ye;let Ae="";return(ye=U==null?void 0:U.key)==null||ye.forEach(Ke=>{var it;if(!(Ke!=null&&Ke.includes("[")))Ae=Ae===""?Ae+Ke:Ae+"/"+Ke;else{let He="",rt=(it=Ke==null?void 0:Ke.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":");h==null||h.forEach(Pe=>{var gt;(Pe==null?void 0:Pe.name)===(rt==null?void 0:rt[0])&&((gt=Pe==null?void 0:Pe.compData)==null||gt.forEach(at=>{var et;(at==null?void 0:at.key)==="formContent"&&((et=at==null?void 0:at.contents)==null||et.forEach(fe=>{(fe==null?void 0:fe.prop)===(rt==null?void 0:rt[1])&&(He=fe==null?void 0:fe.value)}))}))}),Ae=Ae+r.value+He}}),U.key=Ae,U})),ae==null||ae.forEach(U=>{var it,He,rt;let Ae=(it=Re[U.key])==null?void 0:it.find(Pe=>{var gt,at,et,fe,Ve,Qe,Ne;return((at=(gt=Pe==null?void 0:Pe.value)==null?void 0:gt.pageData)==null?void 0:at.name)===((Ve=(fe=(et=U==null?void 0:U.value)==null?void 0:et[0])==null?void 0:fe.groups)==null?void 0:Ve[0])&&((Ne=(Qe=Pe==null?void 0:Pe.value)==null?void 0:Qe.pageData)==null?void 0:Ne.name)!==void 0}),ye=Ae==null?void 0:Ae.id,Ke=(He=Ae==null?void 0:Ae.value)==null?void 0:He.pageData;Ke.compData=(rt=Ke.compData)==null?void 0:rt.map(Pe=>{var gt;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(gt=Pe.contents)==null?void 0:gt.map(at=>{var fe;let et=(fe=U.value)==null?void 0:fe.find(Ve=>(Ve==null?void 0:Ve.key)===(at==null?void 0:at.prop));return et&&(at.value=et.value),at})),Pe}),P.push({id:ye,value:{pageData:Ke}})})});let Ie=(ie=v.cloneDeep(L))==null?void 0:ie[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}E.value=!0},ve=["createInsofDataApi"],Ye=vo(async Q=>{se(Q)},100),nt=async Q=>{var qe,he,F,Y,pe;const z=v.cloneDeep(Q);let be,Ce=new WeakMap,$e=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(he=(qe=$e.data.result)==null?void 0:qe.filter(de=>{var Z,oe;return((Z=de==null?void 0:de.key)==null?void 0:Z.pageKey)!=="menu"&&((oe=de==null?void 0:de.key)==null?void 0:oe.pageKey)!=="secret"}))==null||he.forEach(de=>{Ce[de.key.pageKey]?Ce[de.key.pageKey]=[...Ce[de.key.pageKey],de]:Ce[de.key.pageKey]=[de]}),Q!=null&&Q[0].path&&(be=await(z==null?void 0:z.map(async(de,Z)=>{var I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te;const te=(I=Ce[de==null?void 0:de.path])==null?void 0:I.filter(Be=>{var U;return((U=Be==null?void 0:Be.key)==null?void 0:U.type)==="data"});let ie="";const Re=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);te==null||te.forEach(Be=>{var U,Ae,ye,Ke,it;((Ae=(U=Be==null?void 0:Be.value)==null?void 0:U.tableData)==null?void 0:Ae.算法名称)===((ye=z==null?void 0:z[Z])==null?void 0:ye.method)&&(ie=(it=(Ke=Be==null?void 0:Be.value)==null?void 0:Ke.tableData)==null?void 0:it.算法体)});const ot=await Se.getItemData(de==null?void 0:de.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);let h="",C=(q=(S=(w=(H=ot==null?void 0:ot[0])==null?void 0:H.compData)==null?void 0:w.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Be=>(Be==null?void 0:Be.prop)==="算法体");return(ue=(L=ot==null?void 0:ot[0])==null?void 0:L.compData)==null||ue.forEach(Be=>{var U;(Be==null?void 0:Be.key)==="tableContents"&&((U=Be==null?void 0:Be.contents)==null||U.forEach(Ae=>{Ae!=null&&Ae.find(ye=>ye===(de==null?void 0:de.method))&&(h=Ae[C])}))}),{buttonName:((W=z==null?void 0:z[Z])==null?void 0:W.method)||((ne=(Ie=(P=te==null?void 0:te[0])==null?void 0:P.value)==null?void 0:Ie.tableData)==null?void 0:ne.算法名称),api:(ie===""?(ce=(ae=(G=te==null?void 0:te[0])==null?void 0:G.value)==null?void 0:ae.tableData)==null?void 0:ce.算法体:ie)||h,content:Re==null?void 0:Re.filter(Be=>Be.comp!=="methodButton"),extraContent:(we=v.cloneDeep(de.value))==null?void 0:we.slice(1),methodName:(de==null?void 0:de.path)??"",extraValues:(Te=z==null?void 0:z[Z])==null?void 0:Te.data}})));const Fe=z==null?void 0:z.map(async de=>{var ot,h,C,I,H,w;const Z=(ot=$e.data.result)==null?void 0:ot.filter(S=>{var q,L,ue;return((q=S==null?void 0:S.key)==null?void 0:q.parentTable)===""&&((L=S==null?void 0:S.key)==null?void 0:L.type)==="method"&&((ue=S==null?void 0:S.key)==null?void 0:ue.methodName)===S.method}),oe=Z==null?void 0:Z[0],te=(h=$e.data.result)==null?void 0:h.filter(S=>{var q,L;return((q=S==null?void 0:S.key)==null?void 0:q.type)==="methodData"&&((L=S==null?void 0:S.key)==null?void 0:L.tableId)===(oe==null?void 0:oe.id)}),ie=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce),Re=te==null?void 0:te[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(H=(I=Re==null?void 0:Re.value)==null?void 0:I.tableData)==null?void 0:H[0],content:ie==null?void 0:ie.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(de.value))==null?void 0:w.slice(1),methodName:(de==null?void 0:de.method)??""}}),Ze=(F=Q==null?void 0:Q[0])!=null&&F.path&&((Y=Q==null?void 0:Q[0])==null?void 0:Y.path)!==""?await Promise.all(be):await Promise.all(Fe);i.value=Ze==null?void 0:Ze.filter(de=>de==null?void 0:de.extraContent),(pe=i.value)==null||pe.forEach(de=>{var Z;de.api===""&&((Z=de.content)==null||Z.forEach(oe=>{var te;oe.comp=="Table"&&x.setExtraContents(Se.methodTableToContent(oe.compData,(te=de.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Q,z)=>{var be,Ce,$e;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=i.value)==null?void 0:be.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Ze=Fe==null?void 0:Fe.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:qe=>e.unref(Ye)(Fe),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(De)!==""&&(($e=e.unref(D))==null?void 0:$e[((Ce=e.unref(D))==null?void 0:Ce.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:me,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Xe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=Lt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=Lt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=X=>{var K;x.value=v.cloneDeep(X),r("change",(K=O())==null?void 0:K.compData)},J=X=>{var K,le;if((X==null?void 0:X.buttonName)==="确认"){const D=v.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(le=O())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},M=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},De=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>M("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>M("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:De,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=Lt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var O,R;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(O,R)=>{d.value=R,r("clickStep",O,R)},g=O=>Vt.getComponent(O),f=()=>{var R;const O=(R=s==null?void 0:s.stepList)==null?void 0:R.find((J,M)=>M+1===u.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},x=O=>{r("clickTrigger",O)},_=O=>{r("changeTrigger",O)};return(O,R)=>{var De,X,K,le,D;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(De=n.stepConfig)==null?void 0:De.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(J,{key:y,class:"step-item",onClick:N=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":N=>$.value=N,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(O.$slots,(N,E)=>({name:E,fn:e.withCtx(me=>[e.renderSlot(O.$slots,E,e.mergeProps({ref_for:!0},me||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=Lt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=Lt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=Lt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(Vt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=Lt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],zc={class:"list-icon"},Lc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",zc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=Lt._export_sfc(Lc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=J=>{var De;let M=(De=v.cloneDeep(b.value))==null?void 0:De.map((X,K)=>(J===K&&(X.content=!0),X));b.value=M},f=J=>{var De;let M=(De=v.cloneDeep(b.value))==null?void 0:De.map((X,K)=>(J===K&&(X.content=!1),X));b.value=M,d.value=v.cloneDeep(s.value)},x=(J,M)=>{var le;let De=(le=v.cloneDeep(b.value))==null?void 0:le.map((D,$)=>(J===$&&(D.content=!1),D));b.value=De;const X=v.cloneDeep(s.value),K=X==null?void 0:X.filter((D,$)=>($===J&&(D.name=M),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var J,M,De;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(M=v.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,b.value=(De=v.cloneDeep(u.value))==null?void 0:De.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),O=(J,M,De)=>{var K,le;if(!J)return;let X=v.cloneDeep(s.value);X=(K=X==null?void 0:X.map((D,$)=>($===De&&(D.compData=J),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(le=v.cloneDeep(X))==null?void 0:le.map((D,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},R=J=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=v.cloneDeep(s.value),De=M==null?void 0:M.filter((X,K)=>K!==J);i.setOriginalData(De),i.setItemData(De),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const De=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(mr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:K})=>{var le,D,$,y,N,E,me,Xe,st,ze;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(D=(le=b.value)==null?void 0:le.find(Ue=>Ue.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(y=($=b.value)==null?void 0:$.find(Ue=>Ue.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Vt._sfc_main$3,{modelValue:X.name,"onUpdate:modelValue":Ue=>X.name=Ue,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(N=b.value)==null?void 0:N.find(Ue=>Ue.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ue=>g(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Xe=(me=b.value)==null?void 0:me.find(Ue=>Ue.id===K))!=null&&Xe.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(De,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ue=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(De,{name:"Save",onClick:e.withModifiers(Ue=>x(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ze=(st=b.value)==null?void 0:st.find(Ue=>Ue.id===K))!=null&&ze.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ue=>R(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:X,index:K})=>{var le,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(D=(le=u.value)==null?void 0:le.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>O($,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=Lt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=Lt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),R=e.ref(null),J=Qn(v.pinia),{itemData:M}=v.storeToRefs(J),De=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Q=>{b.value="修改标签页",g.value.title=d.value[Q].title,f.value=Q,u.value=!0},K=Q=>{const z=$(Q);O.value.delete(z),d.value.splice(Q,1),nt()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(Q)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,nt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Q=>{const z=d.value[Q];return z.id||(z.id=D()),z.id},y=Q=>{var Ce;_.value=Q;const z=$(Q);R.value=v.cloneDeep(M.value);let be=O.value.get(z);!be&&((Ce=d.value[Q].children)==null?void 0:Ce.length)>0&&(be=Xe(d.value[Q].children)),be?J.setItemData(v.cloneDeep(be)):J.setItemData([]),x.value=!0},N=e.computed(()=>{const Q=Kt.useModelComp(v.pinia),z=v.storeToRefs(Q).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(be=>{var Ce;if(be.comp==="Tabs"&&_.value>=0){const $e=$(_.value);if((Ce=be.compData)==null?void 0:Ce.some(Ze=>{var qe;return Ze.key==="stepList"&&((qe=Ze.contents)==null?void 0:qe.some(he=>he.id===$e))}))return!1}return!0})}),E=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,me=Q=>{var z;try{const be=v.cloneDeep(Q);be.id=Date.now()+Math.random(),be.comp==="Tabs"&&((z=be.compData)==null||z.forEach($e=>{$e.key==="stepList"&&$e.contents&&$e.contents.forEach(Fe=>{Fe.id=D()})}));const Ce=v.cloneDeep(M.value);Ce.push(be),J.setItemData(Ce)}catch(be){console.error("添加组件失败:",be)}},Xe=Q=>Q.map(z=>{var be;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:st(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:ze(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((be=z.content)==null?void 0:be.originalData)||[]}}}),st=Q=>{if(!Q)return[];const z=[];return Q.rowContents&&z.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&z.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:Q.isEnableWrap}),z},ze=Q=>[],Ue=()=>{if(_.value>=0&&_.value<d.value.length){const Q=$(_.value);O.value.set(Q,v.cloneDeep(M.value)),d.value[_.value].children=ee(M.value),console.log("保存后的数据",ee(M.value))}x.value=!1,_.value=-1,R.value=null,nt()},Ee=()=>{R.value&&J.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},V=()=>{x.value&&Ee()},ee=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((z,be)=>{if(!z||typeof z!="object")return z;const{comp:Ce,name:$e,compData:Fe}=z;switch(Ce){case"Form":return{type:"form",content:se(Fe||[]),value:"表单"};case"Table":return{type:"table",content:ve(Fe||[]),value:"表格"};default:return{type:"xxx",content:Ye(Fe||[]),value:""}}})},se=Q=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},be={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((Ce,$e)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${$e}:`,Ce);return}const{key:Fe,contents:Ze}=Ce,qe=be[Fe];if(!qe){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?z[qe]=!!Ze:z[qe]=Array.isArray(Ze)?Ze:[]}),z},ve=Q=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},be={header:"columns",tableContents:"tableData"};return Q.forEach((Ce,$e)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${$e}:`,Ce);return}const{key:Fe,contents:Ze}=Ce,qe=be[Fe];if(!qe){console.warn(`Unknown Table config key: ${Fe}`);return}z[qe]=Array.isArray(Ze)?Ze:[]}),z},Ye=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),nt=()=>{const Q=[{key:"stepList",contents:d.value}];r("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const z=Q.find(be=>be.key==="stepList");z&&z.contents&&(d.value=z.contents.map(be=>({title:be.title||"",value:be.value||be.title||"",label:be.label||be.title||"",children:be.children||[],id:be.id||D()})))}},{immediate:!0,deep:!0}),(Q,z)=>{const be=e.resolveComponent("svg-icon"),Ce=e.resolveComponent("el-input"),$e=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:De},[e.createVNode(be,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Ze,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",nu,e.toDisplayString(Ze.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:he=>X(qe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:he=>y(qe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:he=>K(qe)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":z[2]||(z[2]=Ze=>u.value=Ze),title:b.value,onBeforeDestroy:z[3]||(z[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode($e,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ce,{modelValue:g.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":z[4]||(z[4]=Ze=>x.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ee},"取消"),e.createElementVNode("button",{onClick:Ue},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:qe=>me(Ze)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Ze.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Ze.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=Lt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function ku(n){return{type:"line",...n}}function xu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},Fo=Kt.useMenuState(v.pinia),Sr=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(O=>{const{name:R}=O;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(O=>{const{key:R}=O;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const R=O==null?void 0:O[0];let J=!1;v.isObject(R)&&(R!=null&&R.id)&&(J=!0);let M=u,De=b;J&&(M=M+1,De=De+1);const X=O==null?void 0:O[M],K=O==null?void 0:O[De];s.push(X),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&Fo.activeMenuPath&&(g=await Se.getItemData(`${Fo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Se.getItemData(`${x}^${s}`,f,"")}return Sr(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Se.getItemData(u,b,"");return Sr(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:O}=i||{};return g&&f&&Se.isNumber(x)&&Se.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:O}):Se.isNumber(u)&&Se.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const O=[];for(let J=0;J<x.length;J++){const M=x[J],De=_[J];O.push({name:M,value:De})}const R=g({data:O});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=Lt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},zu={class:"form-content"},Lu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Z;u.value=b(),(Z=u.value)==null||Z.forEach(oe=>{var ie;const te=oe==null?void 0:oe.prop;oe.value=(ie=g==null?void 0:g.value)==null?void 0:ie[te]}),d.visible=!0},x=Z=>{g.value=Z},_=()=>{var Z;d.visible=!1,r("change",(Z=pe())==null?void 0:Z.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),J=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],M=e.ref({}),De=()=>{const Z=R.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=M.value)==null?void 0:Re[ie]}),oe},X=Z=>{var te;M.value=Z;const oe=De();R.value=oe,r("change",(te=pe())==null?void 0:te.compData)},K=async()=>{const Z=await Se.getMenusContent(),oe=De();oe==null||oe.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=Z)}),R.value=oe,O.visible=!0,await Ze(M.value.menu),await F(M.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),N=()=>{const Z=D.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y.value)==null?void 0:Re[ie]}),oe},E=Z=>{var te;y.value=Z;const oe=N();D.value=oe,r("change",(te=pe())==null?void 0:te.compData)},me=async()=>{await V();const Z=v.cloneDeep(Xe.value),oe=N();oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y==null?void 0:y.value)==null?void 0:Re[ie],ie==="mainKey"&&(te.contents=Z)}),D.value=oe,le.visible=!0},Xe=e.ref([]),st=e.ref([]),ze=e.ref({}),Ue=e.ref({}),Ee=()=>{const{compData:Z}=Ce.value||{},oe=Z==null?void 0:Z.find(I=>{const{key:H}=I;return H==="header"}),te=(oe==null?void 0:oe.contents)||[],ie=te==null?void 0:te.filter((I,H)=>{const{label:w}=I;return w!=="操作"}),Re=ie==null?void 0:ie.findIndex((I,H)=>{const{isMainKey:w}=I;return w});if(Re<0)return[];const ot=Z==null?void 0:Z.find(I=>{const{key:H}=I;return H==="tableContents"}),h=(ot==null?void 0:ot.contents)||[];return h==null?void 0:h.map(I=>{const H=I==null?void 0:I[0];let w=Re;v.isObject(H)&&(H!=null&&H.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},V=async()=>{const Z=await Ee();Xe.value=Z},ee=async Z=>{const oe=sessionStorage.getItem("systemKey");return await Se.getItemData(Z,oe,"")},se=async Z=>{const oe=Z;st.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return ze.value[ie]=te,{label:ie,value:ie}})},ve=Z=>{const{comp:oe,compData:te}=Ue.value||{};if(oe==="Table"){let ie=N();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),qe(ie,te),D.value=ie}},Ye=async()=>{var te,ie;const Z=(te=y==null?void 0:y.value)==null?void 0:te.mainKey,oe=(ie=M==null?void 0:M.value)==null?void 0:ie.menu;if(Z){const ot=`${oe==null?void 0:oe.join("/")}^${Z}`,h=await ee(ot);await se(h);const C=N();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=st.value)}),D.value=C}};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey},async(Z,oe)=>{Z!=oe&&Z&&await Ye()});const nt=async Z=>{const oe=ze.value[Z];Ue.value=oe,await ve()};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&Z&&nt(Z)});const Q=async()=>{var oe;await Ye();const Z=(oe=y.value)==null?void 0:oe.group;await nt(Z)},z=e.ref([]),be=e.ref({}),Ce=e.ref({}),$e=async Z=>{const oe=Z==null?void 0:Z.join("/"),te=sessionStorage.getItem("systemKey");return await Se.getItemData(oe,te,"")},Fe=async Z=>{const oe=await $e(Z);z.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return be.value[ie]=te,{label:ie,value:ie}})},Ze=async(Z,oe)=>{await Fe(Z);const te=De();te==null||te.forEach(ie=>{(ie==null?void 0:ie.prop)==="group"&&(ie.contents=z.value)}),R.value=te};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.menu},async(Z,oe)=>{const te=Z==null?void 0:Z.join("/"),ie=oe==null?void 0:oe.join("/");te!=ie&&await Ze(Z)});const qe=(Z,oe)=>{const te=oe==null?void 0:oe.find(h=>{const{key:C}=h;return C==="header"}),ie=(te==null?void 0:te.contents)||[],Re=ie==null?void 0:ie.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),ot=Re==null?void 0:Re.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Z==null||Z.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=ot)})},he=Z=>{const{comp:oe,compData:te}=Ce.value||{};if(oe==="Table"){M.value.formItems=[];let ie=De();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),qe(ie,te),R.value=ie}},F=async Z=>{const oe=be.value[Z];Ce.value=oe,await he()};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&F(Z)});const Y=async()=>{var te,ie;const Z=(te=M.value)==null?void 0:te.menu;await Ze(Z);const oe=(ie=M.value)==null?void 0:ie.group;await F(oe)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),de=()=>{d.visible=!1,O.visible=!1,le.visible=!1};return e.onMounted(async()=>{var oe,te,ie;R.value=J(),D.value=$();const Z=s==null?void 0:s.itemContents;g.value=((oe=Z==null?void 0:Z.find(Re=>Re.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},M.value=((te=Z==null?void 0:Z.find(Re=>Re.key==="chartDataConfig"))==null?void 0:te.contents)??{},await Y(),y.value=((ie=Z==null?void 0:Z.find(Re=>Re.key==="chartDetailConfig"))==null?void 0:ie.contents)??{},await Q()}),(Z,oe)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[0]||(oe[0]=ie=>f())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[1]||(oe[1]=ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[2]||(oe[2]=ie=>me())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:de,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lu,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:de,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:de,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=Lt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Ln={exports:{}},Uu=Ln.exports,Ro;function Wu(){return Ro||(Ro=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,O){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,O)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Se.commonjsGlobal=="object"&&Se.commonjsGlobal.global===Se.commonjsGlobal?Se.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,O){var R=b.URL||b.webkitURL,J=document.createElement("a");_=_||x.name||"download",J.download=_,J.rel="noopener",typeof x=="string"?(J.href=x,J.origin===location.origin?u(J):d(J.href)?r(x,_,O):u(J,J.target="_blank")):(J.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,O){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,O),_);else if(d(x))r(x,_,O);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,O,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,O);var J=x.type==="application/octet-stream",M=/constructor/i.test(b.HTMLElement)||b.safari,De=/CriOS\/[\d]+/.test(navigator.userAgent);if((De||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var D=X.result;D=De?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},X.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,le=K.createObjectURL(x);R?R.location=le:location.href=le,R=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Ln)),Ln.exports}Wu();const Kn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-GHNa0oiB.cjs")).then(n=>n.index));Kn.install=n=>{n.component("ssMenu",Kn)};const Tr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},go=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=go(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},mo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(O=>O!==(b==null?void 0:b[r])),f=r+1,x=mo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(O=>{_.push(O)}),u=_}return u})),d},yo=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=yo(f,g,s,r,x),O=[];O.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{O.push(R)}),b=O}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:Kn,DynamicIcon:Tr,ssDialog:Xt.ssDialog,ssInput:Vt._sfc_main$3},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=Kt.useMenuState(),b=Kt.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),O=e.ref(),{asideMenus:R,menuTriggerType:J,platform:M}=v.storeToRefs(u),{fixMenuStatus:De}=v.storeToRefs(b),X=e.computed(()=>r==null?void 0:r.mode),K=he=>he==null?void 0:he.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),le=e.computed(()=>{let he=[...R.value];if((he==null?void 0:he.length)===0)return _.push("/"),[];const F=Xe(he,E.value);return F.isFlag||(he=F==null?void 0:F.data),he=he==null?void 0:he.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),he}),D=async(he,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(he==null?void 0:he.path),u.setActiveAsideMenu(he),he.isRouter?_.push(he.path):_.push("/"),s("node-click",he,F)},$=async he=>{const F=v.findNodeByPropInTree(le.value,"path",he);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),De.value?b.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(he):(u.setMenuTriggerType("click"),u.setActiveMenuPath(he)),he!=null&&he.startsWith("/")?_.push(he):_.push("/"),x.value++},y=he=>{u.setActiveMenuPath(he)},N=he=>{const F=document.documentElement;he==null||he.forEach(Y=>{F.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const he=sessionStorage.getItem("authority");return he?JSON.parse(he):[]});e.watch(()=>M.value,he=>{he==="browser"?N(bn.browserVerticalMenuClasses):he==="client"?(N(bn.clientHorizontalMenuClasses),N(bn.clientVerticalMenuClasses)):he==="three"&&(N(bn.threeHorizontalMenuClasses),N(bn.threeVerticalMenuClasses))},{immediate:!0});const me=(he,F)=>{function Y(pe){pe==null||pe.forEach(de=>{var oe,te;const Z=(oe=de==null?void 0:de.path)!=null&&oe.startsWith("/")?(te=de==null?void 0:de.path)==null?void 0:te.substring(1):de==null?void 0:de.path;de.show=F==null?void 0:F.some(ie=>ie==null?void 0:ie.includes(Z)),de.children&&Y(de.children)})}return Y(he),he},Xe=(he,F)=>{if(Array.isArray(F)){const Y=Array.from(new Set(F==null?void 0:F.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:me(he,Y),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},st=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),ze=he=>on(he),Ue=e.ref({}),Ee=e.ref([]),V=e.ref({}),ee=e.ref({}),se=he=>{switch(he){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ve=e.ref({}),Ye=he=>{u.setCacheInputMenu({type:st.type,data:he}),u.setIsRefreshMenus(!0)},nt=async(he,F,Y)=>{var pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe,Ne;if(F==="create"){let ke=(Y==null?void 0:Y.title)+"(1)",Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),xe=(de=(pe=Me==null?void 0:Me.data)==null?void 0:pe.result)==null?void 0:de[0],B=(Z=xe==null?void 0:xe.value)==null?void 0:Z.pageData;B.compData=(oe=B.compData)==null?void 0:oe.map(Le=>{var Ge;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=mo(Le.contents,(Ge=Y==null?void 0:Y.path)==null?void 0:Ge.split("/"),ke)),Le}),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}});let ge=(ie=(te=Y==null?void 0:Y.path)==null?void 0:te.split("/"))==null?void 0:ie.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}),tt=await Se.getItemData((h=(ot=(Re=Y==null?void 0:Y.path)==null?void 0:Re.split("/"))==null?void 0:ot.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(ge.push(ke),ge=ge==null?void 0:ge.join("/"),(tt==null?void 0:tt.length)>0){let Le=tt==null?void 0:tt[0],Ge=(I=(C=Le==null?void 0:Le.compData)==null?void 0:C.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:I.contents;if(((H=Ge==null?void 0:Ge[0])==null?void 0:H.directiveLabel)==="#isMain"){let Oe=(w=Ge==null?void 0:Ge[0])==null?void 0:w.prop,pt=(q=(S=Le==null?void 0:Le.compData)==null?void 0:S.find(ct=>(ct==null?void 0:ct.key)==="tableContents"))==null?void 0:q.contents,dt;pt==null||pt.forEach(ct=>{var vt,bt;if(ct.length===1)((vt=ct==null?void 0:ct[0])==null?void 0:vt[Oe])===(Y==null?void 0:Y.title)&&(dt=ct==null?void 0:ct[0],dt[Oe]=ke);else{let Bt=(bt=Ge==null?void 0:Ge.filter(_t=>_t!=="操作"))==null?void 0:bt.map(_t=>_t==null?void 0:_t.prop),Pt=ct==null?void 0:ct.filter(_t=>!(_t!=null&&_t.id)),At=Se.getValueToObjectValue(Pt,Bt);At[Oe]=ke,dt=At}}),await v.createInsofDataApi({key:{type:"data",pageKey:(W=(ue=(L=Y==null?void 0:Y.path)==null?void 0:L.split("/"))==null?void 0:ue.filter((ct,vt)=>{var bt,Bt;return vt!==((Bt=(bt=Y==null?void 0:Y.path)==null?void 0:bt.split("/"))==null?void 0:Bt.length)-1}))==null?void 0:W.join("/"),tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ie=f.value)==null?void 0:Ie.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:dt}})}}await Se.newLoadingConstruct(Y==null?void 0:Y.path,ge),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((ce=(ae=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ae.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:ce.join("/")),u.setActiveTopMenuPath((Te=(we=Y==null?void 0:Y.path)==null?void 0:we.split("/"))==null?void 0:Te[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")O.value=Y;else if(F==="delete"){let ke=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),xe=(U=(Be=Me==null?void 0:Me.data)==null?void 0:Be.result)==null?void 0:U[0],B=(Ae=xe==null?void 0:xe.value)==null?void 0:Ae.pageData;if(B.compData=(ye=B.compData)==null?void 0:ye.map(Le=>{var Ge;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=go(Le.contents,(Ge=Y==null?void 0:Y.path)==null?void 0:Ge.split("/"))),Le}),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}}),((it=(Ke=ke==null?void 0:ke.data)==null?void 0:Ke.result)==null?void 0:it.length)>0){let Le=(rt=(He=ke==null?void 0:ke.data)==null?void 0:He.result)==null?void 0:rt.map(Ge=>Ge==null?void 0:Ge.id);(Le==null?void 0:Le.length)>0&&await v.batchDeleteInsofDataApi({ids:Le})}let ge=await Se.getItemData((at=(gt=(Pe=Y==null?void 0:Y.path)==null?void 0:Pe.split("/"))==null?void 0:gt.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:at.join("/"),sessionStorage.getItem("systemKey"),""),tt=[];(ge==null?void 0:ge.length)>0&&(ge==null||ge.forEach(Le=>{var Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft;let Ge=(ct=(dt=(pt=(Oe=Le==null?void 0:Le.compData)==null?void 0:Oe.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:pt.contents)==null?void 0:dt[0])==null?void 0:ct.prop;((Pt=(Bt=(bt=(vt=Le==null?void 0:Le.compData)==null?void 0:vt.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:bt.contents)==null?void 0:Bt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(At=Le==null?void 0:Le.compData)==null?void 0:At.find(xt=>(xt==null?void 0:xt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(xt=>{var Ht,Yt,Ot;(xt==null?void 0:xt.length)>1?(xt==null?void 0:xt[1])===(Y==null?void 0:Y.title)&&tt.push((Ht=xt==null?void 0:xt[0])==null?void 0:Ht.id):((Yt=xt==null?void 0:xt[0])==null?void 0:Yt[Ge])===(Y==null?void 0:Y.title)&&tt.push((Ot=xt==null?void 0:xt[0])==null?void 0:Ot.id)}))})),(tt==null?void 0:tt.length)>0&&await v.batchDeleteInsofDataApi({ids:tt}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((Ve=(fe=(et=Y==null?void 0:Y.path)==null?void 0:et.split("/"))==null?void 0:fe.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:Ve.join("/")),u.setActiveTopMenuPath((Ne=(Qe=Y==null?void 0:Y.path)==null?void 0:Qe.split("/"))==null?void 0:Ne[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(he,F)=>{var ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;let Y=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(ot=Y==null?void 0:Y.data)==null?void 0:ot.result)==null?void 0:h[0],de=(C=pe==null?void 0:pe.value)==null?void 0:C.pageData;de.compData=(I=de.compData)==null?void 0:I.map(fe=>{var Ve,Qe;return(fe==null?void 0:fe.key)==="menuContents"&&(fe.contents=yo(fe.contents,(Ve=F==null?void 0:F.path)==null?void 0:Ve.split("/"),F==null?void 0:F.title,(Qe=he==null?void 0:he.target)==null?void 0:Qe.value)),fe}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:de}});let Z=(w=(H=F==null?void 0:F.path)==null?void 0:H.split("/"))==null?void 0:w.filter((fe,Ve)=>{var Qe,Ne;return Ve!==((Ne=(Qe=F==null?void 0:F.path)==null?void 0:Qe.split("/"))==null?void 0:Ne.length)-1}),oe=Z==null?void 0:Z.join("/");Z.push((S=he==null?void 0:he.target)==null?void 0:S.value),Z=Z==null?void 0:Z.join("/");let te=await Se.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((P=(W=(ue=(L=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:L.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:ue.contents)==null?void 0:W[0])==null?void 0:P.directiveLabel)==="#isMain"){let fe=(ce=(ae=(G=(ne=(Ie=te==null?void 0:te[0])==null?void 0:Ie.compData)==null?void 0:ne.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:G.contents)==null?void 0:ae[0])==null?void 0:ce.prop,Ve=(Be=(Te=(we=te==null?void 0:te[0])==null?void 0:we.compData)==null?void 0:Te.find(ke=>(ke==null?void 0:ke.key)==="tableContents"))==null?void 0:Be.contents,Qe=(Ke=(ye=(Ae=(U=te==null?void 0:te[0])==null?void 0:U.compData)==null?void 0:Ae.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:ye.contents)==null?void 0:Ke.map(ke=>ke==null?void 0:ke.prop),Ne;if(Ve==null||Ve.forEach(ke=>{var xe;let Me=Se.getValueToObjectValue(ke,Qe);(Me==null?void 0:Me[fe])===F.title&&(Ne=Me,Ne[fe]=(xe=he==null?void 0:he.target)==null?void 0:xe.value)}),Ne){let ke={};for(let xe in Ne)xe!=="id"&&(ke[xe]=Ne==null?void 0:Ne[xe]);let Me=[{id:Ne==null?void 0:Ne.id,value:{tableData:ke}}];await v.batchUpdateInsofDataApi({dataList:Me})}}let ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Re=(He=(it=ie==null?void 0:ie.data)==null?void 0:it.result)==null?void 0:He.map(fe=>({id:fe==null?void 0:fe.id,key:fe==null?void 0:fe.key}));Re=Re==null?void 0:Re.map(fe=>(fe.key.pageKey=Z,fe)),(Re==null?void 0:Re.length)>0&&await v.batchUpdateInsofDataApi({dataList:Re}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Pe=(rt=F==null?void 0:F.path)==null?void 0:rt.split("/"))==null?void 0:Pe.filter((fe,Ve)=>{var Qe,Ne;return Ve!==((Ne=(Qe=F==null?void 0:F.path)==null?void 0:Qe.split("/"))==null?void 0:Ne.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((et=(at=F==null?void 0:F.path)==null?void 0:at.split("/"))==null?void 0:et[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},z=async(he,F)=>{st.type=se(F==null?void 0:F.operateType),await nt(F,st.type,he),ee.value=he,ve.value=F},be=()=>{st.show=!1},Ce=he=>he==null?void 0:he.filter(F=>F.allowInherit),$e=()=>{var Y,pe,de,Z,oe;let he;st.type==="create"&&(he=((Y=ee.value)==null?void 0:Y.path)+"/"+V.value[(pe=V.value)==null?void 0:pe.prop]),st.type==="update"&&(he=(de=ee.value)==null?void 0:de.path);const F={...ee.value,config:Ce((Z=ee.value)==null?void 0:Z.config),children:[],childMenus:[],title:V.value[(oe=V.value)==null?void 0:oe.prop],path:he};console.log("clickSubmitForm",ve.value,ee.value,F),Ye(F),st.show=!1},Fe=he=>{var Y,pe;const F=(Y=he==null?void 0:he.contents)==null?void 0:Y.find(de=>de.key==="formContent");F&&(V.value=(pe=F==null?void 0:F.contents)==null?void 0:pe.reduce((de,Z)=>(de[Z.key]=Z.value,de.prop=Z.key,de),{}))},Ze=e.ref(!1);return{isCollapse:Ze,handleMenuCollapse:()=>{Ze.value=!Ze.value},handleCompChange:Fe,dialogForm:Ue,dialogRenderComps:Ee,getComponents:ze,clickSubmitForm:$e,dialogInfo:st,beforeDialogDestroy:be,clickMenuIcon:z,mode:X,renderMenuList:le,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:N,fixElement:O,onBlur:Q}}}}e.defineComponent(Ir());const $a=v.useLoginState(),{loginUserInfo:An}=v.storeToRefs($a),$t=Kt.useModelComp(v.pinia),Fn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Po,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:$o,routeToChildPath:Xu,payloadTypes:bo,pageMapState:jn,itemExtendData:Vn}=v.storeToRefs($t),zt=Kt.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:ht,platform:jp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(zt),ha=Se.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Se.useOriginalState(v.pinia),{originalPath:eo}=v.storeToRefs(ed),Zt=e.ref(),Ko=Kt.useAuthorityState(v.pinia),Un=e.ref(!0),fn=e.ref(0),Wn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=ht.value)!=null&&i.startsWith("/")?(s=ht.value)==null?void 0:s.substring(1):ht.value;return(n==null?void 0:n.includes(eo.value))||await ud(n)}),td=()=>{$t.setItemGridData([]),$t.setIsEdit("edit"),$t.setSubmitCurStructure(ht.value!=="/平台管理/菜单管理")},ad=()=>{$t.setIsEdit("view"),$t.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),zt.setActiveMenuPath(d)},ro=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},jo=async(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M;try{const De=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),X=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(O=(_=(x=jn.value)==null?void 0:x[ht.value])==null?void 0:_.filter(y=>{var N,E,me;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i&&((me=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:me.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):D=(M=(J=(R=jn.value)==null?void 0:R[ht.value])==null?void 0:J.filter(y=>{var N;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i}))==null?void 0:M.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(De==null?void 0:De.length)>0&&await v.batchAddInsofDataApi({dataList:De}),(X==null?void 0:X.length)>0&&await v.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(De){throw new Error(De)}},od=async n=>{var x,_,O,R,J,M,De,X,K,le;zt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return zt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Po.value)!=null&&$.includes(D))}),d=(x=Po.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(ro(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(ro(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(ro(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(O=en.value)==null?void 0:O.results)==null?void 0:R.length)>0&&((M=(J=en.value)==null?void 0:J.results)!=null&&M.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(De=en.value)==null?void 0:De.results}):(console.log("itemGridData.value",en.value),f.push(await jo(en.value,"gridLayout")))),Vn.value)for(const D in Vn.value)f.push(await jo((X=Vn.value)==null?void 0:X[D],"extend",{target:D,compId:(le=(K=Vn.value)==null?void 0:K[D])==null?void 0:le.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),$t.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),zt.setContentLoading(!1)},Hn=n=>on(n),ft=e.ref([]),rd=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(ht).value;i=i+eo.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(O=>O==null?void 0:O.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),$t.setTableLoading(!1)}},Uo=async n=>{var i,s;try{let r=v.cloneDeep(ht).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+eo.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{$t.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:ht.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),qn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;qn.value=null;let r=ht.value;if((d=Zt.value)!=null&&d.compData&&((u=Zt.value)==null?void 0:u.compData)!==ht.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除"){if(typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Uo(n):await Se.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),((O=(_=n==null?void 0:n.column)==null?void 0:_[0])==null?void 0:O.directiveLabel)==="#isMain"){let fe=(M=n==null?void 0:n.singleContent)==null?void 0:M[(J=(R=n==null?void 0:n.column)==null?void 0:R[0])==null?void 0:J.prop],Ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=ht.value+"/"+fe,Ne=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Qe}}),ke=(X=(De=Ve==null?void 0:Ve.data)==null?void 0:De.result)==null?void 0:X[0],Me=(K=ke==null?void 0:ke.value)==null?void 0:K.pageData;if(Me.compData=(le=Me.compData)==null?void 0:le.map(xe=>((xe==null?void 0:xe.key)==="menuContents"&&(xe.contents=go(xe.contents,Qe==null?void 0:Qe.split("/"))),xe)),await v.updateInsofDataApi({id:ke==null?void 0:ke.id,value:{pageData:Me}}),(($=(D=Ne==null?void 0:Ne.data)==null?void 0:D.result)==null?void 0:$.length)>0){let xe=(N=(y=Ne==null?void 0:Ne.data)==null?void 0:y.result)==null?void 0:N.map(B=>B==null?void 0:B.id);(xe==null?void 0:xe.length)>0&&await v.batchDeleteInsofDataApi({ids:xe})}zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((me=(E=Qe==null?void 0:Qe.split("/"))==null?void 0:E.filter((xe,B)=>{var ge;return B!==((ge=Qe==null?void 0:Qe.split("/"))==null?void 0:ge.length)-1}))==null?void 0:me.join("/"))}await $a.setLogRecordAsync({type:"删除",data:n},ht.value)}else if((n==null?void 0:n.buttonName)==="批量删除")if((Xe=n==null?void 0:n.selectItems)!=null&&Xe.every(fe=>typeof(fe==null?void 0:fe.id)=="string")){const fe=(st=n==null?void 0:n.selectItems)==null?void 0:st.map(Ve=>({content:n==null?void 0:n.content,singleContent:Ve,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Uo(fe)}else{const fe=(ze=n==null?void 0:n.selectItems)==null?void 0:ze.map(Ve=>Ve==null?void 0:Ve.id);await v.batchDeleteInsofDataApi({ids:fe}),await $a.setLogRecordAsync({type:"删除",data:fe},ht.value)}else if((n==null?void 0:n.buttonName)==="新增"){let fe={};for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(fe[Qe]=n==null?void 0:n.singleContent[Qe]);const Ve=await Se.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(fe),n==null?void 0:n.column,n,{param:s});if(qn.value={resId:Ve,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((Ee=(Ue=n==null?void 0:n.column)==null?void 0:Ue[0])==null?void 0:Ee.directiveLabel)==="#isMain"&&((ee=(V=n==null?void 0:n.column)==null?void 0:V[0])==null?void 0:ee.directiveColor)!==!0){let Qe=(Ye=n==null?void 0:n.singleContent)==null?void 0:Ye[(ve=(se=n==null?void 0:n.column)==null?void 0:se[0])==null?void 0:ve.prop],Ne=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ke=ht.value+"/"+(Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-3)),Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke}}),xe=(Q=(nt=Ne==null?void 0:Ne.data)==null?void 0:nt.result)==null?void 0:Q[0],B=(z=xe==null?void 0:xe.value)==null?void 0:z.pageData;if(B.compData=(be=B.compData)==null?void 0:be.map(ge=>((ge==null?void 0:ge.key)==="menuContents"&&(ge.contents=mo(ge.contents,ke==null?void 0:ke.split("/"),Qe)),ge)),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}}),(($e=(Ce=Me==null?void 0:Me.data)==null?void 0:Ce.result)==null?void 0:$e.length)>0)await Se.newLoadingConstruct(ke,ht.value+"/"+Qe);else{let ge=await v.getInsofDataApi({key:{pageKey:ht.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Ze=(Fe=ge==null?void 0:ge.data)==null?void 0:Fe.result)==null?void 0:Ze.length)>=1?await Se.newLoadingCutFirstConstruct(ht.value+"/",ht.value+"/"+Qe):await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+Qe)}zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((he=(qe=ke==null?void 0:ke.split("/"))==null?void 0:qe.filter((ge,tt)=>{var Le;return tt!==((Le=ke==null?void 0:ke.split("/"))==null?void 0:Le.length)-1}))==null?void 0:he.join("/"))}$t.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((Y=(F=n==null?void 0:n.column)==null?void 0:F[0])==null?void 0:Y.directiveLabel)==="#isMain"&&((de=(pe=n==null?void 0:n.column)==null?void 0:pe[0])==null?void 0:de.directiveColor)!==!0){let fe=(te=n==null?void 0:n.singleContent)==null?void 0:te[(oe=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:oe.prop];if(Se.isNumber((ie=n==null?void 0:n.singleContent)==null?void 0:ie.id)){let Ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=await v.getInsofDataApi({id:(Re=n==null?void 0:n.singleContent)==null?void 0:Re.id}),Ne=(S=(I=(C=(h=(ot=Qe==null?void 0:Qe.data)==null?void 0:ot.result)==null?void 0:h[0])==null?void 0:C.value)==null?void 0:I.tableData)==null?void 0:S[(w=(H=n==null?void 0:n.column)==null?void 0:H[0])==null?void 0:w.prop],ke=ht.value+"/"+Ne,Me=(L=(q=Ve==null?void 0:Ve.data)==null?void 0:q.result)==null?void 0:L[0],xe=(ue=Me==null?void 0:Me.value)==null?void 0:ue.pageData;xe.compData=(W=xe.compData)==null?void 0:W.map(B=>((B==null?void 0:B.key)==="menuContents"&&(B.contents=yo(B.contents,ke==null?void 0:ke.split("/"),Ne,fe)),B)),await v.updateInsofDataApi({id:Me==null?void 0:Me.id,value:{pageData:xe}}),zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((Ie=(P=ke==null?void 0:ke.split("/"))==null?void 0:P.filter((B,ge)=>{var tt;return ge!==((tt=ke==null?void 0:ke.split("/"))==null?void 0:tt.length)-1}))==null?void 0:Ie.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let fe=[],Ve=[],Qe=((G=(ne=n==null?void 0:n.content)==null?void 0:ne[0])==null?void 0:G.id)??"",Ne=s==null?void 0:s.url,ke="",Me="";if(Qe!==""&&((ae=n==null?void 0:n.content)==null?void 0:ae.length)>1&&typeof((we=(ce=n==null?void 0:n.content)==null?void 0:ce[0])==null?void 0:we.id)!="string"){const xe=await v.getInsofDataApi({id:Qe});ke=((Ae=(U=(Be=(Te=xe==null?void 0:xe.data)==null?void 0:Te.result)==null?void 0:Be[0])==null?void 0:U.key)==null?void 0:Ae.tableId)??"",Me=((He=(it=(Ke=(ye=xe==null?void 0:xe.data)==null?void 0:ye.result)==null?void 0:Ke[0])==null?void 0:it.key)==null?void 0:He.pageKey)??""}(rt=n==null?void 0:n.singleContent)==null||rt.forEach(xe=>{let B={};for(let ge in xe)ge!=="id"&&ge!=="index"&&(B[ge]=xe[ge]);typeof(xe==null?void 0:xe.id)=="number"?fe.push({id:xe==null?void 0:xe.id,value:{tableData:B}}):Ve.push({key:{type:i,pageKey:Ne||Me||ht.value,tableId:ke||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:B}})}),(Ve==null?void 0:Ve.length)>0&&await v.batchAddInsofDataApi({dataList:Ve}),(fe==null?void 0:fe.length)>0&&await v.batchUpdateInsofDataApi({dataList:fe})}else{let fe={},Ve=(Pe=n==null?void 0:n.singleContent)==null?void 0:Pe.id;for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(fe[Qe]=n==null?void 0:n.singleContent[Qe]);await Se.fixTableContents(i,r,n==null?void 0:n.index,Ve,sessionStorage.getItem("systemKey"),Object.values(fe),n==null?void 0:n.column,n)}$t.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);$t.setTableLoading(!1),(gt=n==null?void 0:n.column)!=null&&gt.some(fe=>fe==null?void 0:fe.isMainKey)||(ft.value=await Se.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),ft.value=(at=ft.value)==null?void 0:at.filter(fe=>{var Ve;return((Ve=fe==null?void 0:fe.compData)==null?void 0:Ve.length)>0}),ft.value=(et=ft.value)==null?void 0:et.filter(fe=>(fe==null?void 0:fe.comp)!==""),ft.value=Se.getDeepDiffItems(ft.value)),xo.value&&(n==null?void 0:n.buttonName)!=="删除"&&$t.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Fn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Se.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(zt.setActiveMenuPath(null),zt.setActiveMenuPath(i))},Yn=async n=>{ft.value=Se.getDeepDiffItems(n),$t.setItemData(ft.value),$t.setOriginalData(ft.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?Ko.setRouterPageStructure(n):Ko.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>R&&(i=i===""?i+O:i+"/"+O)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>R&&(s=s===""?s+O:s+"/"+O)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue;const i=(_=(x=jn.value)==null?void 0:x[n])==null?void 0:_.filter(Ee=>{var V;return((V=Ee==null?void 0:Ee.key)==null?void 0:V.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(O=i==null?void 0:i.find(Ee=>{var V,ee,se;return(se=(ee=(V=Ee==null?void 0:Ee.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:O.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(De=(M=(J=i==null?void 0:i.find(Ee=>{var V,ee,se;return(se=(ee=(V=Ee==null?void 0:Ee.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:De.compId,d=(X=ft.value)==null?void 0:X.find(Ee=>(Ee==null?void 0:Ee.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(Ee=>(Ee==null?void 0:Ee.prop)===u),g=(Xe=(me=(E=(N=d==null?void 0:d.compData)==null?void 0:N.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:E.contents)==null?void 0:me.find(Ee=>Ee==null?void 0:Ee.isMainKey))==null?void 0:Xe.prop,f=(Ue=(ze=(st=d==null?void 0:d.compData)==null?void 0:st.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:ze.contents)==null?void 0:Ue[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),Kt.ElMessageBox.alert(`超时未提交,【${(i=(n=ht.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=ht.value)!=null&&n.includes(eo.value)))return;const d=(i=ft.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&$t.setLockingPage(ht.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},ko=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=jn.value)==null?void 0:n[ht.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y;if(((r=Zt.value)==null?void 0:r.compData)===ht.value||((d=Gt.value)==null?void 0:d.length)===0)return;zt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:u.filter(pe=>{var de,Z;return((de=pe==null?void 0:pe.key)==null?void 0:de.pageKey)!=="menu"&&((Z=pe==null?void 0:pe.key)==null?void 0:Z.pageKey)!=="secret"}))==null||b.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),ft.value=await Se.getItemData(ht.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=ft.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Zt.value=(f=ft.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((x=Zt.value)==null?void 0:x.compData)===ht.value){let pe=(_=ht.value)==null?void 0:_.split("/").map(de=>({value:de.trim()}));pe=[...pe,...Gt.value??[]]}else{let pe=(R=(O=Zt.value)==null?void 0:O.compData)==null?void 0:R.split("/").map(de=>({value:de.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let de=await Se.getItemData((J=Zt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);de=de==null?void 0:de.filter(ie=>{var Re,ot,h;return Array.isArray(ie==null?void 0:ie.compData)&&((h=(ot=(Re=ie==null?void 0:ie.compData)==null?void 0:Re.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:ot.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Z=(le=(K=(X=(De=(M=de==null?void 0:de[0])==null?void 0:M.compData)==null?void 0:De.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"))==null?void 0:le.prop,oe=(N=(y=($=(D=de==null?void 0:de[0])==null?void 0:D.compData)==null?void 0:$.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:y.contents)==null?void 0:N.findIndex(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"),te=(st=(Xe=(me=(E=de==null?void 0:de[0])==null?void 0:E.compData)==null?void 0:me.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:Xe.contents)==null?void 0:st.map(ie=>{var Re;return(ie==null?void 0:ie.length)>1?ie==null?void 0:ie[oe+1]:(Re=ie==null?void 0:ie[0])==null?void 0:Re[Z]});if(te=te==null?void 0:te.map(ie=>({label:ie,value:ie})),(ze=Gt.value)==null||ze.length,((Ee=(Ue=Gt.value)==null?void 0:Ue[0])==null?void 0:Ee.value)!==""){let ie=await Se.getItemData(ht.value+"/"+((ee=(V=Gt.value)==null?void 0:V[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);ie||(await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((ve=(se=Gt.value)==null?void 0:se[0])==null?void 0:ve.value)),ie=await Se.getItemData(ht.value+"/"+((nt=(Ye=Gt.value)==null?void 0:Ye[0])==null?void 0:nt.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),ft.value=ie}}(pe==null?void 0:pe.length)>0&&((z=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:z.value)===""&&(ft.value=[])}ft.value=(be=ft.value)==null?void 0:be.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!ft.value){let pe=(Fe=($e=(Ce=ht.value)==null?void 0:Ce.split("/"))==null?void 0:$e.filter((de,Z)=>{var oe,te;return Z!==((te=(oe=ht.value)==null?void 0:oe.split("/"))==null?void 0:te.length)-1}))==null?void 0:Fe.join("/");ft.value=await Se.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Ze=ht.value)==null?void 0:Ze.split("/"))==null?void 0:F[((he=(qe=ht.value)==null?void 0:qe.split("/"))==null?void 0:he.length)-1]}await $a.setLogRecordAsync({type:"查询",data:ft.value},ht.value),s!==""&&(ft.value=(Y=ft.value)==null?void 0:Y.map(pe=>{var de;return pe!=null&&pe.isShow&&(pe.compData=(de=pe==null?void 0:pe.compData)==null?void 0:de.map(Z=>{var oe,te,ie,Re,ot;if((Z==null?void 0:Z.key)==="tableContents"){let h=[],C="";C=(Re=(ie=(te=(oe=pe==null?void 0:pe.compData)==null?void 0:oe.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:te.contents)==null?void 0:ie[0])==null?void 0:Re.prop,h=(ot=Z.contents)==null?void 0:ot.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Z.contents=h}return Z})),pe})),ft.value=Se.getDeepDiffItems(ft.value),zt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[ht.value,Gu.value],async n=>{var u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot;if(!ht.value)return;$t.setLockingPage(""),ft.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Un.value=!1,Fn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Wn.value=r,s){zt.setContentLoading(!0),sessionStorage.setItem("pageKey",ht.value),ha.setSelectTitle([]),ft.value=await Se.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=ft.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Zt.value=(O=ft.value)==null?void 0:O.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Zt.value)!=null&&R.compData)){let I=hd(Zu.value,(J=ht.value)==null?void 0:J.split("/")),H=await Se.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);H!=null&&H.find(w=>(w==null?void 0:w.comp)==="")?h=(De=(M=H==null?void 0:H.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:M.compData)==null?void 0:De.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((X=Zt.value)==null?void 0:X.compData)===ht.value){let I=(K=ht.value)==null?void 0:K.split("/").map(H=>({value:H.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],H=(D=(le=Zt.value)==null?void 0:le.compData)==null?void 0:D.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!H||(H==null?void 0:H.length)===0)H=h;else{let q=await Se.getItemData(($=Zt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);q=q==null?void 0:q.filter(P=>{var Ie,ne,G;return Array.isArray(P==null?void 0:P.compData)&&((G=(ne=(Ie=P==null?void 0:P.compData)==null?void 0:Ie.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ne.contents)==null?void 0:G.find(ae=>(ae==null?void 0:ae.directiveLabel)==="#isMain"))});let L=(Xe=(me=(E=(N=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:me.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Xe.prop,ue=(Ee=(Ue=(ze=(st=q==null?void 0:q[0])==null?void 0:st.compData)==null?void 0:ze.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:Ue.contents)==null?void 0:Ee.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),W=(ve=(se=(ee=(V=q==null?void 0:q[0])==null?void 0:V.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(P=>{var Ie;return(P==null?void 0:P.length)>1?P==null?void 0:P[ue+1]:(Ie=P==null?void 0:P[0])==null?void 0:Ie[L]});if(W=W==null?void 0:W.map(P=>({label:P,value:P})),((Ye=Gt.value)==null?void 0:Ye.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:W,parentContent:(nt=Zt.value)==null?void 0:nt.compData}]),((z=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:z.value)!==""){let P=await Se.getItemData(ht.value+"/"+((Ce=(be=Gt.value)==null?void 0:be[0])==null?void 0:Ce.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((Fe=($e=Gt.value)==null?void 0:$e[0])==null?void 0:Fe.value)),P=await Se.getItemData(ht.value+"/"+((qe=(Ze=Gt.value)==null?void 0:Ze[0])==null?void 0:qe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),ft.value=P}}(H==null?void 0:H.length)>0&&((F=(he=Gt.value)==null?void 0:he[0])==null?void 0:F.value)===""&&(ft.value=[]),I=[...I,...H??[]],I=[...I,...Gt.value??[]];let w=(Y=ht.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(I!=null&&I.find(L=>(L==null?void 0:L.value)===(q==null?void 0:q.value))));I=[...I,...S],ha.setSelectTitle(I)}ft.value=(pe=ft.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!ft.value){let I=(Z=(de=s==null?void 0:s.split("/"))==null?void 0:de.filter((H,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Z.join("/");ft.value=await Se.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(te=s==null?void 0:s.split("/"))==null?void 0:te[((oe=s==null?void 0:s.split("/"))==null?void 0:oe.length)-1]}await $a.setLogRecordAsync({type:"查询",data:ft.value},ht.value),C!==""&&(ft.value=(ie=ft.value)==null?void 0:ie.map(I=>{var H;return I!=null&&I.isShow&&(I.compData=(H=I==null?void 0:I.compData)==null?void 0:H.map(w=>{var S,q,L,ue,W;if((w==null?void 0:w.key)==="tableContents"){let P=[],Ie="";Ie=(ue=(L=(q=(S=I==null?void 0:I.compData)==null?void 0:S.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:q.contents)==null?void 0:L[0])==null?void 0:ue.prop,P=(W=w.contents)==null?void 0:W.filter(ne=>(ne==null?void 0:ne[Ie])===C||(ne==null?void 0:ne[1])===C),w.contents=P}return w})),I})),ft.value=Se.getDeepDiffItems(ft.value),await cd(ft.value),Or(),pd(s),ko.value=(Re=ft.value)==null?void 0:Re.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),$t.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),$t.setItemData(ft.value),$t.setOriginalData(ft.value),$t.setCurStructureCompIds((ot=ft.value)==null?void 0:ot.map(I=>I==null?void 0:I.id)),$t.setRefreshCurStructure(!1),zt.setChildMenu(""),zt.setContentLoading(!1),$t.setTableLoading(!1),Fn.value=!1}else ft.value=[],Fn.value=!1;e.nextTick(()=>{fn.value=fn.value++,Un.value=!0})},{immediate:!0});e.watch(()=>$o.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,O,R,J,M;if($o.value){let De=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:n.filter(y=>{var N,E;return((N=y==null?void 0:y.key)==null?void 0:N.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{De[y.key.pageKey]?De[y.key.pageKey]=[...De[y.key.pageKey],y]:De[y.key.pageKey]=[y]});let K=ht.value;(s=Zt.value)!=null&&s.compData&&((r=Zt.value)==null?void 0:r.compData)!==ht.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(b=ht.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=ht.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=ht.value)==null?void 0:_[0];let D=await Se.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!ft.value){let y=(R=(O=le==null?void 0:le.split("/"))==null?void 0:O.filter((N,E)=>{var me;return E!==((me=le==null?void 0:le.split("/"))==null?void 0:me.length)-1}))==null?void 0:R.join("/");D=await Se.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,De),$=(M=le==null?void 0:le.split("/"))==null?void 0:M[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var N;return y!=null&&y.isShow&&(y.compData=(N=y==null?void 0:y.compData)==null?void 0:N.map(E=>{var me,Xe,st,ze,Ue;if((E==null?void 0:E.key)==="tableContents"){let Ee=[],V="";V=(ze=(st=(Xe=(me=y==null?void 0:y.compData)==null?void 0:me.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Xe.contents)==null?void 0:st[0])==null?void 0:ze.prop,Ee=(Ue=E.contents)==null?void 0:Ue.filter(ee=>(ee==null?void 0:ee[V])===$||(ee==null?void 0:ee[1])===$),E.contents=Ee}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),ft.value=Se.getDeepDiffItems(D),$t.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,O;zt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=An.value)==null?void 0:d.account)||((u=An.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=An.value)==null?void 0:b.account)||((g=An.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(O=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:O.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await $a.setLogRecordAsync({type:"删除",data:s},ht.value)),zt.setActiveMenuPath(Xu.value),ft.value=null,$t.setRouteToChildPath(""),zt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&zt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),Lr=(n,i)=>{var f,x,_,O,R;const s=i?n:n-2,r=(f=ft.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),b=u===-1?0:u,g=(R=(O=r==null?void 0:r.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=Lr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=ft.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=Lr(i);g?(un.index=i,un.comp=(u=ft.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=ft.value)==null?void 0:b[n]},xo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>xo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let O=0;const R=[];if(x=x.map(J=>{const M=J.span;return M?(J.span=Number(M),O=O+J.span):R.push(J),J}),O<24){const J=Math.floor((24-O)/_);R.forEach(M=>{M.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const O=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(M,De)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(M.comp)),{key:e.unref(fn),compName:M.name,index:(M==null?void 0:M.id)??De,height:(X=u.value)==null?void 0:X.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=Lt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{De()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),O=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),J=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:me}=E;return me==="baseConfig"});return N==null?void 0:N.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:me}=E;return me==="children"});return N==null?void 0:N.contents}),De=()=>{var y;d.value=R.value||{},x.value=(M==null?void 0:M.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(N=>{var me;const{prop:E}=N;return N.value=(me=J.value)==null?void 0:me[E],N})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;x.value=(M==null?void 0:M.value)||[],_.value=(y=M.value)==null?void 0:y.map(N=>O(N))},{immediate:!0});const X=(y,N)=>{const E=v.cloneDeep(M==null?void 0:M.value);E[N].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),le=(y,N,E)=>{if(!y)return;const me=v.cloneDeep(M==null?void 0:M.value);me[E]&&(me[E].compData=y,x.value=me,r("change",$(),!0))},D=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let N=v.cloneDeep(M==null?void 0:M.value);N=N==null?void 0:N.filter((E,me)=>y!==me),x.value=N,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,N)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[N[1]||(N[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Vt.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:N[0]||(N[0]=me=>f(me))},null,8,["rowContents"])])]),e.createVNode(mr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:me,index:Xe})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(me.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(st=>D(Xe),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:me,index:Xe})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:_.value[Xe],key:Xe,isEnableWrap:!0,onChange:st=>X(st,Xe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(me.comp+"Operate")),{itemContents:me==null?void 0:me.compData,originalItemContents:me.compData,onChange:st=>le(st,me,Xe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=Lt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Wo;Od&&((Wo=window==null?void 0:window.navigator)!=null&&Wo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Md)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Ho(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Ld(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const wn=new Set,$r=new WeakMap;function Fd(){wn.forEach(n=>{n(...$r.get(n))}),wn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!wn.has(n)&&(wn.add(n),wn.size===1&&Promise.resolve().then(Fd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Dn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Dn(n,i);)i.y--}let d;for(;d=Dn(n,i);)i.y=d.y+d.h;return i}function Kd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Dn(s,u);)u.y++}return n}function qo(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Dn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let O=0,R=_.length;O<R;O++){const J=_[O];J.moved||i.y>J.y&&i.y-J.y>J.h/4||(J.static?n=Go(n,J,i,d):n=Go(n,i,J,d))}return n}function Go(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Dn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function jd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Xo(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Yo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,O=x.length;_<O;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(Kd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Jo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var xn={exports:{}},tp=xn.exports,Zo;function ap(){return Zo||(Zo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,De(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=De(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&O(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function O(a,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},O(a,t)}function R(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function J(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},M.apply(this,arguments)}function De(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function $(a){return X(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},N=function(a){return typeof a=="function"},E={window:function(a){return a===le||X(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:N,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&N(a.splice)}};function me(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Xe(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var st={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=st.draggable,t.map.drag=st,t.methodDict.drag="draggable",l.actions.drag=st.defaults},listeners:{"interactions:before-action-move":me,"interactions:action-resume":me,"interactions:action-move":Xe,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:me,move:Xe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},ze=st,Ue={init:function(a){var t=a;Ue.document=t.document,Ue.DocumentFragment=t.DocumentFragment||Ee,Ue.SVGElement=t.SVGElement||Ee,Ue.SVGSVGElement=t.SVGSVGElement||Ee,Ue.SVGElementInstance=t.SVGElementInstance||Ee,Ue.Element=t.Element||Ee,Ue.HTMLElement=t.HTMLElement||Ue.Element,Ue.Event=t.Event,Ue.Touch=t.Touch||Ee,Ue.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ee(){}var V=Ue,ee={init:function(a){var t=V.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!V.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?V.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ee.wheelEvent=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function ve(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ye(a,t){for(;E.element(a);){if(Q(a,t))return a;a=nt(a)}return null}function nt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Q(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var z=function(a){return a.parentNode||a.host};function be(a,t){for(var o,l=[],c=a;(o=z(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function Ce(a,t,o){for(;E.element(a);){if(Q(a,t))return!0;if((a=nt(a))===o)return Q(a,t)}return!1}function $e(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof V.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ze(a){var t,o=Fe(a);if(!se.isIOS7&&o){var l={x:(t=(t=$(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function qe(a){for(var t=[];a;)t.push(a),a=nt(a);return t}function he(a){return!!E.string(a)&&(V.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?nt(o):a==="self"?t.getRect(o):Ye(o,a)}function pe(a,t,o,l){var c=a;return E.string(c)?c=Y(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Ze(c)),c}function de(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Z(a){return!a||"x"in a&&"y"in a||((a=F({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function oe(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function te(a,t,o){var l=o&&a.options[o];return de(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function ie(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Re(a)),E.array(a))return a.forEach(function(T){return ie(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];ie(a,m,o,l)}else if(E.object(t))for(var k in t)ie(Re(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Re(a){return a.trim().split(/ +/)}var ot=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function H(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof V.Event||a instanceof V.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function q(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function L(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function ue(a,t,o){var l=t.length>1?P(t):t[0];q(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function W(a){var t=[];return E.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ie(a){if(!a.length)return null;var t=W(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ot(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ae(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof V.Touch?"touch":"mouse"}function ce(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[$e(t?t[0]:a.target),$e(a.currentTarget)]}var we=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(we.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Te=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Be=function(a){return Te([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ae=function(a,t){return a[U(a,t)]},ye=function(a){x(o,a);var t=J(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,j=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=j,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=U(p,function(T){var j=T.dropzone,A=T.element;return j===l.dropzone&&A===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(we);function Ke(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function it(a,t){for(var o=function(p,m){for(var k=[],T=0,j=p.interactables.list;T<j.length;T++){var A=j[T];if(A.options.drop.enabled){var re=A.options.drop.accept;if(!(E.element(re)&&re!==m||E.string(re)&&!Q(m,re)||E.func(re)&&!re({dropzone:A,draggableElement:m})))for(var _e=0,We=A.getAllElements();_e<We.length;_e++){var je=We[_e];je!==m&&k.push({dropzone:A,element:je,rect:A.getRect(je)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function He(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var j=T[k],A=j.dropzone,re=j.element,_e=j.rect,We=A.dropCheck(t,o,c,p,re,_e);m.push(We?re:null)}var je=function(Je){for(var ut,lt,mt,Dt=[],Tt=0;Tt<Je.length;Tt++){var kt=Je[Tt],Ct=Je[ut];if(kt&&Tt!==ut)if(Ct){var ta=z(kt),jt=z(Ct);if(ta!==kt.ownerDocument)if(jt!==kt.ownerDocument)if(ta!==jt){Dt=Dt.length?Dt:be(Ct);var da=void 0;if(Ct instanceof V.HTMLElement&&kt instanceof V.SVGElement&&!(kt instanceof V.SVGSVGElement)){if(kt===jt)continue;da=kt.ownerSVGElement}else da=kt;for(var ya=be(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var Nn=[ya[Sa-1],ya[Sa],Dt[Sa]];if(Nn[0])for(var yn=Nn[0].lastChild;yn;){if(yn===Nn[1]){ut=Tt,Dt=ya;break}if(yn===Nn[2])break;yn=yn.previousSibling}}else mt=Ct,(parseInt($(lt=kt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt($(mt).getComputedStyle(mt).zIndex,10)||0)&&(ut=Tt);else ut=Tt}else ut=Tt}return ut}(m);return l.activeDrops[je]||null}function rt(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ye(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ye(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ye(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ye(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ye(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ye(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Pe(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Ke(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=it(t,o.element));var m=l,k=He(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=rt(o,0,m)}}var at={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(ze),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=ie(k.listeners),j=Object.keys(T).reduce(function(re,_e){return re[/^(enter|leave)/.test(_e)?"drag".concat(_e):/^(activate|deactivate|move)/.test(_e)?"drop".concat(_e):_e]=T[_e],re},{}),A=m.options.drop.listeners;A&&m.off(A),m.on(j),m.options.drop.listeners=j}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,j,A){return function(re,_e,We,je,Je,ut,lt){var mt=!1;if(!(lt=lt||re.getRect(ut)))return!!re.options.drop.checker&&re.options.drop.checker(_e,We,mt,re,ut,je,Je);var Dt=re.options.drop.overlap;if(Dt==="pointer"){var Tt=te(je,Je,"drag"),kt=q(_e);kt.x+=Tt.x,kt.y+=Tt.y;var Ct=kt.x>lt.left&&kt.x<lt.right,ta=kt.y>lt.top&&kt.y<lt.bottom;mt=Ct&&ta}var jt=je.getRect(Je);if(jt&&Dt==="center"){var da=jt.left+jt.width/2,ya=jt.top+jt.height/2;mt=da>=lt.left&&da<=lt.right&&ya>=lt.top&&ya<=lt.bottom}return jt&&E.number(Dt)&&(mt=Math.max(0,Math.min(lt.right,jt.right)-Math.max(lt.left,jt.left))*Math.max(0,Math.min(lt.bottom,jt.bottom)-Math.max(lt.top,jt.top))/(jt.width*jt.height)>=Dt),re.options.drop.checker&&(mt=re.options.drop.checker(_e,We,mt,re,ut,je,Je)),mt}(this,p,m,k,T,j,A)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=at.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=it(t,o.element),c.events=rt(o,0,l),c.events.activate&&(Ke(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Pe(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Pe(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:it,getDrop:He,getDropEvents:rt,fireDropEvents:Pe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},et=at;function fe(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,k),o.box=Ie(c),o.scale=1,o.ds=0,o.angle=G(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,k),o.box=Ie(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Ve={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ve,t.methodDict.gesture="gesturable",l.actions.gesture=Ve.defaults},listeners:{"interactions:action-start":fe,"interactions:action-move":fe,"interactions:action-end":fe,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},Qe=Ve;function Ne(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=k>=0?p.left:p.right;return o.x<j+m}if(a==="top"){var A=T>=0?p.top:p.bottom;return o.y<A+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:Ce(l,t,c))}function ke(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var Me,xe,B={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;B.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),B.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=B,t.methodDict.resize="resizable",c.actions.resize=B.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),ke(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,j=T.start,A=T.corrected,re=T.delta,_e=T.previous;if(F(_e,A),m){if(F(A,k),p==="reposition"){if(A.top>A.bottom){var We=A.top;A.top=A.bottom,A.bottom=We}if(A.left>A.right){var je=A.left;A.left=A.right,A.right=je}}}else A.top=Math.min(k.top,j.bottom),A.bottom=Math.max(k.bottom,j.top),A.left=Math.min(k.left,j.right),A.right=Math.max(k.right,j.left);for(var Je in A.width=A.right-A.left,A.height=A.bottom-A.top,A)re[Je]=A[Je]-_e[Je];c.edges=l.prepared.edges,c.rect=A,c.deltaRect=re}})(a),ke(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var j in T)T[j]=Ne(j,k.edges[j],m,t._latestPointer.eventTarget,l,c,k.margin||B.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var A=k.axis!=="y"&&m.x>c.right-B.defaultMargin,re=k.axis!=="x"&&m.y>c.bottom-B.defaultMargin;(A||re)&&(a.action={name:"resize",axes:(A?"x":"")+(re?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=B.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var j=T[k];t[j]&&(m+=j)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},ge=B,tt={id:"actions",install:function(a){a.usePlugin(Qe),a.usePlugin(ge),a.usePlugin(ze),a.usePlugin(et)}},Le=0,Ge={request:function(a){return Me(a)},cancel:function(a){return xe(a)},init:function(a){if(Me=a.requestAnimationFrame,xe=a.cancelAnimationFrame,!Me)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];Me=a["".concat(l,"RequestAnimationFrame")],xe=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}Me=Me&&Me.bind(a),xe=xe&&xe.bind(a),Me||(Me=function(c){var p=Date.now(),m=Math.max(0,16-(p-Le)),k=a.setTimeout(function(){c(p+m)},m);return Le=p+m,k},xe=function(c){return clearTimeout(c)})}},Oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){Oe.isScrolling=!0,Ge.cancel(Oe.i),a.autoScroll=Oe,Oe.interaction=a,Oe.prevTime=Oe.now(),Oe.i=Ge.request(Oe.scroll)},stop:function(){Oe.isScrolling=!1,Oe.interaction&&(Oe.interaction.autoScroll=null),Ge.cancel(Oe.i)},scroll:function(){var a=Oe.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=pt(c.container,t,o),m=Oe.now(),k=(m-Oe.prevTime)/1e3,T=c.speed*k;if(T>=1){var j={x:Oe.x*T,y:Oe.y*T};if(j.x||j.y){var A=dt(p);E.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var re=dt(p),_e={x:re.x-A.x,y:re.y-A.y};(_e.x||_e.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:_e,interaction:a,container:p})}Oe.prevTime=m}Oe.isScrolling&&(Ge.cancel(Oe.i),Oe.i=Ge.request(Oe.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Oe.check(t.interactable,t.prepared.name))if(t.simulation)Oe.x=Oe.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,j=t.prepared.name,A=k.options[j].autoScroll,re=pt(A.container,k,T);if(E.window(re))m=o.clientX<Oe.margin,l=o.clientY<Oe.margin,c=o.clientX>re.innerWidth-Oe.margin,p=o.clientY>re.innerHeight-Oe.margin;else{var _e=Fe(re);m=o.clientX<_e.left+Oe.margin,l=o.clientY<_e.top+Oe.margin,c=o.clientX>_e.right-Oe.margin,p=o.clientY>_e.bottom-Oe.margin}Oe.x=c?1:m?-1:0,Oe.y=p?1:l?-1:0,Oe.isScrolling||(Oe.margin=A.margin,Oe.speed=A.speed,Oe.start(t))}}};function pt(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function dt(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var ct={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Oe,Oe.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Oe.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Oe.stop(),Oe.interaction&&(Oe.interaction=null)},"interactions:stop":Oe.stop,"interactions:action-move":function(a){return Oe.onInteractionMove(a)}}},vt=ct;function bt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Bt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Pt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function At(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,j,A,re){var _e=k.getRect(A),We=T.buttons||{0:1,1:4,3:8,4:16}[T.button],je={action:null,interactable:k,interaction:j,element:A,rect:_e,buttons:We};return re.fire("auto-start:check",je),je.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=bt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=bt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=At,t.prototype.styleCursor=Pt}};function Ft(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function xt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var j=l[k],A=c[k],re=j.getAction(t,o,a,A);if(re){var _e=Ft(re,j,A,p,m);if(_e)return{action:_e,interactable:j,element:A}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(A){p.push(A),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var j=xt(a,t,o,p,m,l,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;k=nt(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Bt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Va(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,j=0,A=0;if(!(p&&m&&k))return!1;for(var re=0,_e=l.interactions.list;re<_e.length;re++){var We=_e[re],je=We.prepared.name;if(We.interacting()&&(++T>=k||We.interactable===a&&((j+=je===o.name?1:0)>=p||We.element===t&&(A++,je===o.name&&A>=m))))return!1}return k>0}function Aa(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Va(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var Ka={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Aa(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Va(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Aa,withinInteractionLimit:Ot,validateAction:Ft},Da=Ka,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,j=T.startAxis,A=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?A[0]:T.lockAxis,A!=="xy"&&j!=="xy"&&j!==A){o.prepared.name=null;for(var re=l,_e=function(je){if(je!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&je.testIgnoreAllow(Je,re,l)){var ut=je.getAction(o.downPointer,o.downEvent,o,re);if(ut&&ut.name==="drag"&&function(lt,mt){if(!mt)return!1;var Dt=mt.options.drag.startAxis;return lt==="xy"||Dt==="xy"||Dt===lt}(A,je)&&Da.validateAction(ut,je,re,l,t))return je}}};E.element(re);){var We=t.interactables.forEachMatch(re,_e);if(We){o.prepared.name="drag",o.interactable=We,o.element=re;break}re=nt(re)}}}}}};function Ca(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(Da),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=Ca(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(ja)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Oa={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Q(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||ve(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=Be(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(j){var A=j.interactable.options[j.prepared.name],re=A.modifiers;return re&&re.length?re:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(_e){var We=A[_e];return We&&We.enabled&&{options:We,methods:We._methods}}).filter(function(_e){return!!_e})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),j=0;j<k.length;j++){var A,re=k[j],_e=re.options,We=F({},t.coords),je=null;(A=re.methods)!=null&&A.set&&this.shouldDo(_e,l,o)&&(t.state=re,je=re.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-We.x,y:t.coords.y-We.y})),T.eventProps.push(je)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ut=this.result.rect;if(Je&&ut){var lt=T.rect.left!==ut.left||T.rect.right!==ut.right||T.rect.top!==ut.top||T.rect.bottom!==ut.bottom;T.changed=lt||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var j=0,A=[[p,k],[c,T]];j<A.length;j++){var re=A[j],_e=re[0],We=re[1];_e.page.x+=We.x,_e.page.y+=We.y,_e.client.x+=We.x,_e.client.y+=We.y}var je=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=je.left,Je.right+=je.right,Je.top+=je.top,Je.bottom+=je.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,j=k.methods,A=j.beforeEnd&&j.beforeEnd(t);if(A)return this.endResult=A,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,j=k.rectDelta,A=0,re=[[l.start,m],[l.cur,T]];A<re.length;A++){var _e=re[A],We=_e[0],je=_e[1];We.page.x-=je.x,We.page.y-=je.y,We.client.x-=je.x,We.client.y-=je.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return fa(o)}),this.result=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},wt=Xa,Jt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T,j){var A;u(this,o),(A=t.call(this,l)).relatedTarget=null,A.screenX=void 0,A.screenY=void 0,A.button=void 0,A.buttons=void 0,A.ctrlKey=void 0,A.shiftKey=void 0,A.altKey=void 0,A.metaKey=void 0,A.page=void 0,A.client=void 0,A.delta=void 0,A.rect=void 0,A.x0=void 0,A.y0=void 0,A.t0=void 0,A.dt=void 0,A.duration=void 0,A.clientX0=void 0,A.clientY0=void 0,A.velocity=void 0,A.speed=void 0,A.swipe=void 0,A.axes=void 0,A.preEnd=void 0,k=k||l.element;var re=l.interactable,_e=(re&&re.options||Jt).deltaSource,We=te(re,k,p),je=m==="start",Je=m==="end",ut=je?R(A):l.prevEvent,lt=je?l.coords.start:Je?{page:ut.page,client:ut.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return A.page=F({},lt.page),A.client=F({},lt.client),A.rect=F({},l.rect),A.timeStamp=lt.timeStamp,Je||(A.page.x-=We.x,A.page.y-=We.y,A.client.x-=We.x,A.client.y-=We.y),A.ctrlKey=c.ctrlKey,A.altKey=c.altKey,A.shiftKey=c.shiftKey,A.metaKey=c.metaKey,A.button=c.button,A.buttons=c.buttons,A.target=k,A.currentTarget=k,A.preEnd=T,A.type=j||p+(m||""),A.interactable=re,A.t0=je?l.pointers[l.pointers.length-1].downTime:ut.t0,A.x0=l.coords.start.page.x-We.x,A.y0=l.coords.start.page.y-We.y,A.clientX0=l.coords.start.client.x-We.x,A.clientY0=l.coords.start.client.y-We.y,A.delta=je||Je?{x:0,y:0}:{x:A[_e].x-ut[_e].x,y:A[_e].y-ut[_e].y},A.dt=l.coords.delta.timeStamp,A.duration=A.timeStamp-A.t0,A.velocity=F({},l.coords.velocity[_e]),A.speed=ot(A.velocity.x,A.velocity.y),A.swipe=Je||m==="inertiastart"?A.getSwipe():null,A}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(we);Object.defineProperties(yt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var vn=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=bt(function(A){this.move(A)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(A){Object.defineProperty(o._proxy,A,{get:function(){return p[A]}})};for(var k in Mt)m(k);var T=function(A){Object.defineProperty(o._proxy,A,{value:function(){return p[A].apply(p,arguments)}})};for(var j in ca)T(j);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Bt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ot(c,p)>this.pointerMoveTolerance);var k,T,j,A=this.getPointerIndex(t),re={pointer:t,pointerIndex:A,pointerInfo:this.pointers[A],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,j=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/j,k.page.y=T.page.y/j,k.client.x=T.client.x/j,k.client.y=T.client.y/j,k.timeStamp=j),this._scopeFire("interactions:move",re),m||this.simulation||(this.interacting()&&(re.type=null,this.move(re)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||H(this.coords.delta),(t=F({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=L(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:U(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=L(t),j=this.getPointerIndex(t),A=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),A?A.pointer=t:(A=new vn(T,t,o,null,null),j=this.pointers.length,this.pointers.push(A)),ue(this.coords.cur,this.pointers.map(function(re){return re.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,A.downTime=this.coords.cur.timeStamp,A.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:A,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new yt(this,t,this.prepared.name,o,this.element,l,c)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(oe(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return St(a.coords.cur,t),St(a.coords.delta,t),oe(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Ma(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function St(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Ma},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(St(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ma,"interactions:before-action-move":ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Qt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=qt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=Nt(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ot(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,l=Nt(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ge.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,j=this.interaction,A=Nt(j).resistance,re=(j._now()-this.t0)/1e3;if(re<this.te){var _e,We=1-(Math.exp(-A*re)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,_e={x:Wt(k=We,t,l,p),y:Wt(k,o,c,m)}):_e={x:this.targetOffset.x*We,y:this.targetOffset.y*We};var je={x:_e.x-this.currentOffset.x,y:_e.y-this.currentOffset.y};this.currentOffset.x+=je.x,this.currentOffset.y+=je.y,j.offsetBy(je),j.move(),this.onNextFrame(function(){return T.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=Nt(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ge.cancel(this.timeout)}}]),a}();function Nt(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=nt(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=ie(t,o);for(t in l)this.types[t]=Te(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=ie(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function La(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var En={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(A,re,_e,We,je){var Je=La(je);if(!l[_e]){l[_e]=[];for(var ut=0;ut<c.length;ut++){var lt=c[ut];m(lt,_e,T),m(lt,_e,j,!0)}}var mt=l[_e],Dt=Ae(mt,function(Tt){return Tt.selector===A&&Tt.context===re});Dt||(Dt={selector:A,context:re,listeners:[]},mt.push(Dt)),Dt.listeners.push({func:We,options:Je})},removeDelegate:function(A,re,_e,We,je){var Je,ut=La(je),lt=l[_e],mt=!1;if(lt)for(Je=lt.length-1;Je>=0;Je--){var Dt=lt[Je];if(Dt.selector===A&&Dt.context===re){for(var Tt=Dt.listeners,kt=Tt.length-1;kt>=0;kt--){var Ct=Tt[kt];if(Ct.func===We&&Ja(Ct.options,ut)){Tt.splice(kt,1),Tt.length||(lt.splice(Je,1),k(re,_e,T),k(re,_e,j,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:j,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(A,re,_e,We){if(A.addEventListener){var je=La(We),Je=Ae(o,function(ut){return ut.eventTarget===A});Je||(Je={eventTarget:A,events:{}},o.push(Je)),Je.events[re]||(Je.events[re]=[]),Ae(Je.events[re],function(ut){return ut.func===_e&&Ja(ut.options,je)})||(A.addEventListener(re,_e,p.supportsOptions?je:je.capture),Je.events[re].push({func:_e,options:je}))}}function k(A,re,_e,We){if(A.addEventListener&&A.removeEventListener){var je=U(o,function(ta){return ta.eventTarget===A}),Je=o[je];if(Je&&Je.events)if(re!=="all"){var ut=!1,lt=Je.events[re];if(lt){if(_e==="all"){for(var mt=lt.length-1;mt>=0;mt--){var Dt=lt[mt];k(A,re,Dt.func,Dt.options)}return}for(var Tt=La(We),kt=0;kt<lt.length;kt++){var Ct=lt[kt];if(Ct.func===_e&&Ja(Ct.options,Tt)){A.removeEventListener(re,_e,p.supportsOptions?Tt:Tt.capture),lt.splice(kt,1),lt.length===0&&(delete Je.events[re],ut=!0);break}}}ut&&!Object.keys(Je.events).length&&o.splice(je,1)}else for(re in Je.events)Je.events.hasOwnProperty(re)&&k(A,re,"all")}}function T(A,re){for(var _e=La(re),We=new Ya(A),je=l[A.type],Je=ce(A)[0],ut=Je;E.element(ut);){for(var lt=0;lt<je.length;lt++){var mt=je[lt],Dt=mt.selector,Tt=mt.context;if(Q(ut,Dt)&&ve(Tt,Je)&&ve(Tt,ut)){var kt=mt.listeners;We.currentTarget=ut;for(var Ct=0;Ct<kt.length;Ct++){var ta=kt[Ct];Ja(ta.options,_e)&&ta.func(We)}}}ut=nt(ut)}}function j(A){return T(A,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=nt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!hn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var j=0,A=p.interactions.list;j<A.length;j++){var re=A[j];if(!(re.pointerType!==l||/down/i.test(c)&&re.simulation))return re}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(hn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function hn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ae(o),p=ce(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,A=o.changedTouches;j<A.length;j++){var re=A[j],_e={pointer:re,pointerId:L(re),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},We=sn(_e);T.push([_e.pointer,_e.eventTarget,_e.curEventTarget,We])}}else{var je=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!je;Je++)je=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;je=je||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!je){var ut={pointer:o,pointerId:L(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},lt=sn(ut);T.push([ut.pointer,ut.eventTarget,ut.curEventTarget,lt])}}for(var mt=0;mt<T.length;mt++){var Dt=T[mt],Tt=Dt[0],kt=Dt[1],Ct=Dt[2];Dt[3][a](Tt,o,kt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var j=c&&c.events,A=0;A<p.length;A++){var re=p[A];k(o,re.type,re.listener,j)}}var Sn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=se.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var j=T[k];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var A=function(){var We=_e[re];a.documents.some(function(je){return ve(je.doc,We.downTarget)})||j.removePointer(We.pointer,We.event)},re=0,_e=j.pointers;re<_e.length;re++)A()}}(c=V.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,j=a.interactions.list;T<j.length;T++)j[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(j,k);var T=J(j);function j(){return u(this,j),T.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(A){a.interactions.pointerMoveTolerance=A}},{key:"_now",value:function(){return a.now()}}]),j}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(j,A){return a.fire(j,A)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Oa)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Fa=Sn,Ra=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ra||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||l,this._win=$(he(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Ra.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Ra.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=Be(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ze(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(he(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ve(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?Ce(l,t,o):!!E.element(t)&&ve(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?Ce(l,t,o):!!E.element(t)&&ve(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=ie(o,l,p);for(var k in m){k==="wheel"&&(k=se.wheelEvent);for(var T=0,j=m[k];T<j.length;T++){var A=j[T];ba(k,this._actions)?this.events[t===Ra.On?"on":"off"](k,A):E.string(this.target)?this._scopeEvents[t===Ra.On?"addDelegate":"removeDelegate"](this.target,this._context,k,A,c):this._scopeEvents[t===Ra.On?"add":"remove"](this.target,k,A,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Ra.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Ra.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=U(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ae(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&Q(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=fa(Jt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ie,c.getTouchDistance=ne,c.getTouchAngle=G,c.getElementRect=Ze,c.getElementClientRect=Fe,c.matchesSelector=Q,c.closest=Ye,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.on(A,m,k)}return this}if(E.object(p)){for(var re in p)this.on(re,p[re],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.off(A,m,k)}return this}if(E.object(p)){for(var re in p)this.off(re,p[re],m);return this}var _e;return ba(p,this.scope.actions)?p in this.globalEvents&&(_e=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(_e,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=yt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=J(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return M(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){M(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),V.init(l),se.init(l),Ge.init(l),o.window=l,o.document=l.document,o.usePlugin(Fa),o.usePlugin(En),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[Do(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[Do(m)]))break}this.listenerMaps.splice(l,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function Do(a){return a&&a.replace(/\/.*$/,"")}var Co=new sl,ea=Co.interactStatic,cl=typeof globalThis<"u"?globalThis:window;Co.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,j=T===void 0?{x:0,y:0}:T,A={range:p,grid:a,x:null,y:null},re=0;re<t.length;re++){var _e=t[re],We=_e[0],je=_e[1],Je=Math.round((l-j.x)/a[We]),ut=Math.round((c-j.y)/a[je]);A[We]=Math.max(k.left,Math.min(k.right,Je*a[We]+j.x)),A[je]=Math.max(k.top,Math.min(k.bottom,ut*a[je]+j.y))}return A};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,j=T.equalDelta,A=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=j;var re=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var _e=(re.left?1:-1)*(re.top?1:-1);t.edgeSign={x:_e,y:_e}}else t.edgeSign={x:re.left?-1:1,y:re.top?-1:1};if(k!==!1&&F(l,re),A!=null&&A.length){var We=new _a(a.interaction);We.copyFrom(a.interaction.modification),We.prepareStates(A),t.subModification=We,We.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);oe(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),j=T.delta;return T.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var j=l.height*m;o.x=p.x+(j-c.width)*k.x}}var gl=na(fl,"aspectRatio"),_o=function(){};_o._defaults={};var Tn=_o;function Qa(a,t,o){return E.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var In={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var j=Qa(m.restriction,c,p);if(j){var A=j.right-j.left-t.width,re=j.bottom-j.top-t.height;A<0&&(T.left+=A,T.right+=A),re<0&&(T.top+=re,T.bottom+=re)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(In,"restrict"),Eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var gn={noInner:Eo,noOuter:So,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=de(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},j=Qa(m.outer,l,k)||{};To(T,Eo),To(j,So),o.top?t.y=Math.min(Math.max(j.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(gn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},In.defaults),kl=na({start:In.start,set:In.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return gn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Z(Qa(p.min,t,a.coords))||xl,k=Z(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},gn.noInner),outer:F({},gn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),gn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),to={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,j=T.offsetWithOrigin?function(_e){var We=_e.interaction.element,je=de(pe(_e.state.options.origin,null,null,[We])),Je=je||te(_e.interactable,We,_e.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var A=pe(T.offset,l,c,[o]);(t=de(A)||{x:0,y:0}).x+=j.x,t.y+=j.y}var re=T.relativePoints;m.offsets=p&&re&&re.length?re.map(function(_e,We){return{index:We,relativePoint:_e,x:k.left-p.width*_e.x+t.x,y:k.top-p.height*_e.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=te(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var j=0,A=p;j<A.length;j++)for(var re=A[j],_e=k.x-re.x,We=k.y-re.y,je=0,Je=c.targets.length;je<Je;je++){var ut=c.targets[je],lt=void 0;(lt=E.func(ut)?ut(_e,We,t._proxy,re,je):ut)&&T.push({x:(E.number(lt.x)?lt.x:_e)+re.x,y:(E.number(lt.y)?lt.y:We)+re.y,range:E.number(lt.range)?lt.range:c.range,source:ut,index:je,offset:re})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var Tt=T[Dt],kt=Tt.range,Ct=Tt.x-k.x,ta=Tt.y-k.y,jt=ot(Ct,ta),da=jt<=kt;kt===1/0&&mt.inRange&&mt.range!==1/0&&(da=!1),mt.target&&!(da?mt.inRange&&kt!==1/0?jt/kt<mt.distance/mt.range:kt===1/0&&mt.range!==1/0||jt<mt.distance:!mt.inRange&&jt<mt.distance)||(mt.target=Tt,mt.distance=jt,mt.range=kt,mt.inRange=da,mt.delta.x=Ct,mt.delta.y=ta)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),l.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(to,"snap"),Bn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],to.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var j=T[k],A=void 0;if(A=E.func(j)?j(m.x,m.y,t):j){for(var re=0,_e=o.targetFields;re<_e.length;re++){var We=_e[re],je=We[0],Je=We[1];if(je in A||Je in A){A.x=A[je],A.y=A[Je];break}}o.options.targets.push(A)}}var ut=to.set(a);return o.options=c,ut},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Bn,"snapSize"),ao={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Bn.start(a)):null},set:Bn.set,defaults:F(fa(Bn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:Tn,avoid:Tn,transform:Tn,rubberband:Tn},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=ao,ao){var l=ao[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,Io=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T){var j;if(u(this,o),C(R(j=t.call(this,k)),p),p!==c&&C(R(j),c),j.timeStamp=T,j.originalEvent=p,j.type=l,j.pointerId=L(c),j.pointerType=ae(c),j.target=m,j.currentTarget=null,l==="tap"){var A=k.getPointerIndex(c);j.dt=j.timeStamp-k.pointers[A].downTime;var re=j.timeStamp-k.tapTime;j.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===j.target&&re<500}else l==="doubletap"&&(j.dt=c.timeStamp-k.tapTime,j.double=!0);return j}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(we),mn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=mn,a.defaults.actions.pointerEvents=mn.defaults,F(a.actions.phaselessTypes,mn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&no(a),Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,j=c.pointers[T].hold,A=qe(k),re={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:A,node:null},_e=0;_e<A.length;_e++){var We=A[_e];re.node=We,l.fire("pointerEvents:collect-targets",re)}if(re.targets.length){for(var je=1/0,Je=0,ut=re.targets;Je<ut.length;Je++){var lt=ut[Je].eventable.options.holdDuration;lt<je&&(je=lt)}j.duration=je,j.timeout=setTimeout(function(){Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},je)}})(a,t),Pa(a,t)},"interactions:up":function(a,t){no(a),Pa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){no(a),Pa(a,t)}},PointerEvent:Io,fire:Pa,collectEventTargets:Bo,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Pa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?Bo(a,t):k,j=new Io(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var A={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:j},re=0;re<T.length;re++){var _e=T[re];for(var We in _e.props||{})j[We]=_e.props[We];var je=te(_e.eventable,_e.node);if(j._subtractOrigin(je),j.eventable=_e.eventable,j.currentTarget=_e.node,_e.eventable.fire(j),j._addOrigin(je),j.immediatePropagationStopped||j.propagationStopped&&re+1<T.length&&T[re+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",A),m==="tap"){var Je=j.double?Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=Je,o.tapTime=Je.timeStamp}return j}function Bo(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var j=qe(p),A={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:j,targets:[],node:null},re=0;re<j.length;re++){var _e=j[re];A.node=_e,t.fire("pointerEvents:collect-targets",A)}return m==="hold"&&(A.targets=A.targets.filter(function(We){var je,Je;return We.eventable.options.holdDuration===((je=o.pointers[k])==null||(Je=je.hold)==null?void 0:Je.duration)})),A.targets}function no(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:mn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(mn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,zl={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,j=function(){var re=m[A],_e=l.getRect(re);if(!_e)return 1;var We,je=Ae(p.interactions.list,function(lt){return lt.interacting()&&lt.interactable===l&&lt.element===re&&lt.prepared.name===c.name});if(je)je.move(),T&&(We=je._reflowPromise||new k(function(lt){je._reflowResolve=lt}));else{var Je=Z(_e),ut=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});We=function(lt,mt,Dt,Tt,kt){var Ct=lt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:kt,pointer:kt,eventTarget:Dt,phase:"reflow"};Ct.interactable=mt,Ct.element=Dt,Ct.prevEvent=kt,Ct.updatePointer(kt,kt,Dt,!0),H(Ct.coords.delta),Bt(Ct.prepared,Tt),Ct._doPhase(ta);var jt=lt.window,da=jt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(Tt,mt,Dt),Ct._interacting?(Ct.move(ta),Ct.end(kt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(kt,kt),ya}(p,l,re,c,ut)}T&&T.push(We)},A=0;A<m.length&&!j();A++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},Ll=zl;if(ea.use(Oa),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(tt),ea.use(vt),ea.use(Ll),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(xn,xn.exports)),xn.exports}var np=ap();const Qo=Se.getDefaultExportFromCjs(np),Jn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(Kr),b=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,O=NaN,R=NaN,J=NaN,M=NaN,De=-1,X=-1,K=-1,le=-1,D=r.x,$=r.y,y=r.w,N=r.h;const E=e.ref(),me=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:pe});function Xe(w){ie(w)}function st(){Re()}function ze(w){pa(r.isDraggable)&&(f.draggable=w)}function Ue(w){pa(r.isResizable)&&(f.resizable=w)}function Ee(w){pa(r.isBounded)&&(f.bounded=w)}function V(w){f.transformScale=w}function ee(w){f.rowHeight=w}function se(w){f.maxRows=w}function ve(){f.rtl=Jo()==="rtl",Re()}function Ye(w){f.cols=Math.floor(w)}u.increaseItem(me),e.onBeforeMount(()=>{f.rtl=Jo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,N=r.h,y=r.w,aa(Ze)}),b.on("updateWidth",Xe),b.on("compact",st),b.on("setDraggable",ze),b.on("setResizable",Ue),b.on("setBounded",Ee),b.on("setTransformScale",V),b.on("setRowHeight",ee),b.on("setMaxRows",se),b.on("directionchange",ve),b.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Xe),b.off("compact",st),b.off("setDraggable",ze),b.off("setResizable",Ue),b.off("setBounded",Ee),b.off("setTransformScale",V),b.off("setRowHeight",ee),b.off("setMaxRows",se),b.off("directionchange",ve),b.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(me)}),i({state:f,wrapper:E});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>f.resizable&&!r.static),z=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),be=e.computed(()=>(f.draggable||f.resizable)&&!r.static),Ce=Gd("item"),$e=e.computed(()=>({[Ce.b()]:!0,[Ce.bm("resizable")]:Q.value,[Ce.bm("static")]:r.static,[Ce.bm("resizing")]:f.isResizing,[Ce.bm("dragging")]:f.isDragging,[Ce.bm("transform")]:f.useCssTransforms,[Ce.bm("rtl")]:z.value,[Ce.bm("no-touch")]:nt&&be.value})),Fe=e.computed(()=>[Ce.be("resizer"),z.value&&Ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(H)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(H)}),e.watch(()=>f.rowHeight,()=>{aa(Ze),aa(qe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(H),aa(Ze),aa(qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(H)}),e.watch(z,()=>{aa(H),aa(Ze)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Ze),aa(qe))});function Ze(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=Y(D,$,y,N);f.isDragging&&(w.top=f.dragging.top,z.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?z.value?S=Ud(w.top,w.right,w.width,w.height):S=jd(w.top,w.left,w.width,w.height):z.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function qe(){const w={};for(const S of["width","height"]){const q=f.style[S].match(/^(\d+)px$/);if(!q)return;w[S]=q[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function he(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Xo(w);if(pa(q))return;const{x:L,y:ue}=q,W={width:0,height:0};let P;switch(S){case"resizestart":{H(),De=y,X=N,P=Y(D,$,y,N),W.width=P.width,W.height=P.height,f.resizing=W,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=L),!w.edges.top&&!w.edges.bottom&&(M=ue);const Ie=Yo(J,M,L,ue);z.value?W.width=f.resizing.width-Ie.deltaX/f.transformScale:W.width=f.resizing.width+Ie.deltaX/f.transformScale,W.height=f.resizing.height+Ie.deltaY/f.transformScale,f.resizing=W;break}case"resizeend":{P=Y(D,$,y,N),W.width=P.width,W.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=te(W.height,W.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),J=L,M=ue,(y!==P.w||N!==P.h)&&d("resize",r.i,P.h,P.w,W.height,W.width),w.type==="resizeend"&&(De!==y||X!==N)&&d("resized",r.i,P.h,P.w,W.height,W.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const q=Xo(w);if(pa(q))return;const{x:L,y:ue}=q,W=w.target;if(!W.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,le=$;const ne=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,we=G.right/f.transformScale,Te=ne.right/f.transformScale,Be=G.top/f.transformScale,U=ne.top/f.transformScale;z.value?P.left=(we-Te)*-1:P.left=ae-ce,P.top=Be-U,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Yo(O,R,L,ue);if(z.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const G=W.offsetParent.clientHeight-Z(r.h,f.rowHeight,f.margin[1]);P.top=oe(P.top,0,G);const ae=de(),ce=f.containerWidth-Z(r.w,ae,f.margin[0]);P.left=oe(P.left,0,ce)}f.dragging=P;break}case"dragend":{const ne=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,we=G.right/f.transformScale,Te=ne.right/f.transformScale,Be=G.top/f.transformScale,U=ne.top/f.transformScale;z.value?P.left=(we-Te)*-1:P.left=ae-ce,P.top=Be-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ie;z.value,Ie=pe(P.top,P.left),O=L,R=ue,(D!==Ie.x||$!==Ie.y)&&d("move",r.i,Ie.x,Ie.y),w.type==="dragend"&&(K!==D||le!==$)&&d("moved",r.i,Ie.x,Ie.y),b.emit("dragEvent",w.type,r.i,Ie.x,Ie.y,N,y)}function Y(w,S,q,L){const ue=de();let W;return z.value?W={right:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])}:W={left:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])},W}function pe(w,S){const q=de();let L=Math.round((S-f.margin[0])/(q+f.margin[0])),ue=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return L=Math.max(Math.min(L,f.cols-y),0),ue=Math.max(Math.min(ue,f.maxRows-N),0),{x:L,y:ue}}function de(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Z(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function oe(w,S,q){return Math.max(Math.min(w,q),S)}function te(w,S,q=!1){const L=de();let ue=Math.round((S+f.margin[0])/(L+f.margin[0])),W=0;return q?W=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):W=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ue=Math.max(Math.min(ue,f.cols-D),0),W=Math.max(Math.min(W,f.maxRows-$),0),{w:ue,h:W}}function ie(w,S){f.containerWidth=w}function Re(){Ze()}function ot(){!g.value&&E.value&&(g.value=Qo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Ho(F);function C(){if(ot(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Ho(he);function H(){if(ot(),!!g.value)if(f.resizable&&!r.static){const w=Y(0,0,r.maxW,r.maxH),S=Y(0,0,r.minW,r.minH),q={edges:{left:z.value?`.${Fe.value[0]}`:!1,right:z.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(q.modifiers=[Qo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(q),_||(_=!0,g.value.on("resizestart resizemove resizeend",L=>{L.type==="resizemove"?I(L):he(L)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass($e.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var er;nn&&(er=window==null?void 0:window.navigator)!=null&&er.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function tr(n){return n!=null}function ar(){}const op=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!tr(r)||r==="")return!1;let g;return tr(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Rn;if(nn){for(const n of dp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Rn){const n=Rn[2],i=Rn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},nr="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:nr}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=nr),window.dispatchEvent(n)},_n;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_n||(_n={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),wo=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(wo(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},or=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},On=new WeakMap,rr=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},pn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},lr=an({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),On.has(n)&&!i)return On.get(n);if(Zr(n))return On.set(n,lr),lr;var s=getComputedStyle(n),r=wo(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&rr.test(s.overflowY||""),g=!r&&rr.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),O=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),J=r?0:xa(s.borderRightWidth),M=r?0:xa(s.borderBottomWidth),De=r?0:xa(s.borderLeftWidth),X=O+x,K=f+_,le=De+J,D=R+M,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-le-n.clientWidth:0,N=d?X+le:0,E=d?K+D:0,me=r?r.width:xa(s.width)-N-y,Xe=r?r.height:xa(s.height)-E-$,st=me+X+y+le,ze=Xe+K+$+D,Ue=an({devicePixelContentBoxSize:pn(Math.round(me*devicePixelRatio),Math.round(Xe*devicePixelRatio),u),borderBoxSize:pn(st,ze,u),contentBoxSize:pn(me,Xe,u),contentRect:new Jr(O,f,me,Xe)});return On.set(n,Ue),Ue},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case _n.DEVICE_PIXEL_CONTENT_BOX:return b;case _n.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},ir=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(ir(n);vp();)n=wp(),ir(n);return hp()&&gp(),n>0},lo,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!lo){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),lo=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),lo()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},Pn=0,Sp=function(){return!!Pn},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},sr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cr=function(n){return n===void 0&&(n=0),Date.now()+n},io=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!io){io=!0;var r=cr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(io=!1,i=r-cr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():Cn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),sr.forEach(function(s){return Cn.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),sr.forEach(function(s){return Cn.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,ur=function(n){!Pn&&n>0&&fo.start(),Pn+=n,!Pn&&fo.stop()},Np=function(n){return!wo(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||_n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Mn=new WeakMap,dr=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Mn.set(i,r)},n.observe=function(i,s,r){var d=Mn.get(i),u=d.observationTargets.length===0;dr(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),ur(1),fo.schedule())},n.unobserve=function(i,s){var r=Mn.get(i),d=dr(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),ur(-1))},n.disconnect=function(i){var s=this,r=Mn.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!or(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!or(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function pr(n,i){Zn.set(n,i),nl.observe(n)}function fr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=ar;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(pr(d,n.onResize),i=()=>{fr(d),i=ar})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:pr,unobserveResize:fr,unobserve:r}}const Lp=e.ref(!1);e.computed(()=>Lp.value);const vr="__theme_style__",so="__theme_observer__",hr=e.reactive(new Map),gr=new Map;e.watch(hr,()=>{if(!nn)return;gr.clear();const n=document.head.querySelector(`#${vr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${so} { width: 1px }`,r=1;for(const[d,[u,b]]of hr.entries())s+=` html.${u} .${so}, .${b} .${so} { width: ${++r}px }`,gr.set(r,d);i.textContent=s,i.id=vr,document.head.appendChild(i)});const ol=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=zp(),O=zd();O.on("resizeEvent",R),O.on("dragEvent",J),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Xe(),f.value&&x(f.value,Ld(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),D()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&_(f.value)});function R(ze,Ue,Ee,V,ee,se){E(ze,Ue,Ee,V,ee,se)}function J(ze,Ue,Ee,V,ee,se){N(ze,Ue,Ee,V,ee,se)}e.watch(()=>u.width,(ze,Ue)=>{e.nextTick(()=>{O.emit("updateWidth",ze),Ue===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,ze=>{O.emit("setColNum",ze)}),e.watch(()=>r.rowHeight,ze=>{O.emit("setRowHeight",ze)}),e.watch(()=>r.isDraggable,ze=>{O.emit("setDraggable",ze)}),e.watch(()=>r.isResizable,ze=>{O.emit("setResizable",ze)}),e.watch(()=>r.isBounded,ze=>{O.emit("setBounded",ze)}),e.watch(()=>r.transformScale,ze=>{O.emit("setTransformScale",ze)}),e.watch(()=>r.responsive,ze=>{ze||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,ze=>{O.emit("setMaxRows",ze)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:De})),e.provide(jr,O),i({state:u,getItem:X,resizeEvent:E,dragEvent:N,layoutUpdate:K});function M(ze){b.set(ze.i,ze)}function De(ze){b.delete(ze.i)}function X(ze){return b.get(ze)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const ze=st(g.value,u.originalLayout);if(ze.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(ze);else{const Ue=new Set(ze.map(Ee=>Ee.i));u.originalLayout=u.originalLayout.filter(Ee=>!Ue.has(Ee.i))}u.lastLayoutLength=g.value.length,Xe()}cn(g.value,r.verticalCompact),O.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function $(){if(!r.autoSize)return;const ze=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+ze)+ze+"px"}let y;function N(ze,Ue,Ee,V,ee,se){let ve=qo(g.value,Ue);pa(ve)&&(ve={h:0,w:0,x:0,y:0,i:""}),ze==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ye,{i:nt,x:Q,y:z})=>({...Ye,[nt]:{x:Q,y:z}}),{})),ze==="dragmove"||ze==="dragstart"?(u.placeholder.i=Ue,u.placeholder.x=ve.x,u.placeholder.y=ve.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,ve,Ee,V,!0,r.preventCollision),r.restoreOnDrag?(ve.static=!0,cn(g.value,r.verticalCompact,y),ve.static=!1):cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(ze,Ue,Ee,V,ee,se){let ve=qo(g.value,Ue);pa(ve)&&(ve={h:0,w:0,x:0,y:0,i:""});let Ye;if(r.preventCollision){const nt=Wr(g.value,{...ve,w:se,h:ee}).filter(Q=>Q.i!==ve.i);if(Ye=nt.length>0,Ye){let Q=1/0,z=1/0;nt.forEach(be=>{be.x>ve.x&&(Q=Math.min(Q,be.x)),be.y>ve.y&&(z=Math.min(z,be.y))}),Number.isFinite(Q)&&(ve.w=Q-ve.x),Number.isFinite(z)&&(ve.h=z-ve.y)}}Ye||(ve.w=se,ve.h=ee),ze==="resizestart"||ze==="resizemove"?(u.placeholder.i=Ue,u.placeholder.x=Ee,u.placeholder.y=V,u.placeholder.w=ve.w,u.placeholder.h=ve.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):ze&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&me(),cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="resizeend"&&d("layout-updated",g.value)}function me(){const ze=Jd(r.breakpoints,u.width);if(ze===u.lastBreakpoint)return;const Ue=Gr(ze,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const Ee=Zd(u.originalLayout,u.layouts,r.breakpoints,ze,u.lastBreakpoint,Ue,r.verticalCompact);u.layouts[ze]=Ee,u.lastBreakpoint!==ze&&d("breakpoint-changed",ze,Ee),g.value=Ee,d("update:layout",Ee),u.lastBreakpoint=ze,O.emit("setColNum",Ue)}function Xe(){u.layouts=Object.assign({},r.responsiveLayouts)}function st(ze,Ue){const Ee=new Set(Ue.map(ve=>ve.i)),V=new Set(ze.map(ve=>ve.i)),ee=ze.filter(ve=>!Ee.has(ve.i)),se=Ue.filter(ve=>!V.has(ve.i));return ee.concat(se)}return(ze,Ue)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[ze.$slots.default?e.renderSlot(ze.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,Ee=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:Ee.i,ref_for:!0},Ee),{default:e.withCtx(()=>[e.renderSlot(ze.$slots,"item",{item:Ee})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=Kt.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,J,M,De;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(De=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:De.layout:"vertical"}),f=e.computed(()=>{var R,J;return((J=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},O=(R,J)=>{d("routeUrl",R,J)};return(R,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":J[0]||(J[0]=M=>b.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(M,De)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:De===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(K=M==null?void 0:M.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((D=M==null?void 0:M.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=M==null?void 0:M.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(N=e.unref(ft)[De])==null?void 0:N.showIndex,allowMove:(E=e.unref(ft)[De])==null?void 0:E.allowMove,viewport:(me=e.unref(ft)[De])==null?void 0:me.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(ko),itemData:(Xe=M==null?void 0:M.component)==null?void 0:Xe.compData,childItemData:(st=M==null?void 0:M.component)==null?void 0:st.itemChildData,key:e.unref(fn),cacheNewData:e.unref(qn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??De,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(ze=M==null?void 0:M.component)==null?void 0:ze.tableId,allMapContents:e.unref(Wn),children:(Ue=M==null?void 0:M.component)==null?void 0:Ue.children,level:x.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(zr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,De)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(De)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=M==null?void 0:M.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(fn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??De,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Wn),children:M==null?void 0:M.children,level:x.value,onRowClick:_,onRouteUrl:O},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=Lt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),Kp={TABLE:kn.ssTable,FORM:zo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:zo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return Kp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Tr;exports.activeStepInfo=un;exports.affixItems=rd;exports.allMapContents=Wn;exports.cacheNewData=qn;exports.clickMainKey=zr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=fn;exports.compNames=ko;exports.compShow=Un;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=Hn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=xo;exports.isUndefined=br;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Zt;exports.setComponent=Ir;exports.showItems=ft;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=Kn;exports.st=Jn;exports.stepItems=kd;exports.toNumber=co;exports.toolBar=Ba;exports.verifyButton=md;
1
+ "use strict";const kn=require("./index-BTMi9bkq.cjs"),e=require("vue"),v=require("./index-C8qRkCgn.cjs"),Vt=require("./index-DuCF3sUz.cjs"),Se=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_v5GuXi.cjs"),Xt=require("./index--O8k9XH8.cjs"),No=require("./threeViewerHost-CL8nl9YW.cjs"),Kt=require("./index-DOCHgBta.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString--eJE54G5.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-BVNLn1BE.cjs"),mr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-B_FhWY3g.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),bn=require("./index-9hspBVrQ.cjs"),dn=require("./index-D_tbgi5B.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Mo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function co(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Mo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Mo:+n}var oo=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,O=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=co(i)||0,v.isObject(s)&&(_=!!s.leading,O="maxWait"in s,u=O?Yl(co(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function J(N){var E=r,me=d;return r=d=void 0,x=N,b=n.apply(me,E),b}function M(N){return x=N,g=setTimeout(K,i),_?J(N):b}function De(N){var E=N-f,me=N-x,Xe=i-E;return O?Jl(Xe,u-me):Xe}function X(N){var E=N-f,me=N-x;return f===void 0||E>=i||E<0||O&&me>=u}function K(){var N=oo();if(X(N))return le(N);g=setTimeout(K,De(N))}function le(N){return g=void 0,R&&r?J(N):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:le(oo())}function y(){var N=oo(),E=X(N);if(r=arguments,d=this,f=N,E){if(g===void 0)return M(f);if(O)return clearTimeout(g),g=setTimeout(K,i),J(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function yr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function br(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var L;const S=(L=nt.value)==null?void 0:L.split("/");return(S==null?void 0:S.some(ue=>(ue==null?void 0:ue.includes("updateLoading"))||(ue==null?void 0:ue.includes("loading"))))?!1:Ue.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=No.useThreeSystem(),_=e.ref(),O=e.ref(!1),R=e.ref(!1),J=e.ref([]),M=e.ref(),De=e.ref(!1),X=e.ref([]),K=kn.useFormToTableComp(v.pinia),le=kn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:N}=v.storeToRefs(y),E=e.ref(),me=e.ref(!0),Xe=Kt.useModelComp(v.pinia),{tableViewContents:st,itemData:ze,isEdit:Ue,routeToChildPath:Ee,lockingPage:V}=v.storeToRefs(Xe),ee=e.ref(null),se=e.ref(!1),ve=e.ref(!1),Ye=Kt.useMenuState(),{activeMenuPath:nt}=v.storeToRefs(Ye),Q=Se.useOriginalState(v.pinia),{originalPath:z}=v.storeToRefs(Q),be=e.ref([]),Ce=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$e=async S=>{ve.value=S,await pe("disabled",null,S,!0)},Fe=async S=>{await pe("operable",null,S,!0)};e.watch(()=>nt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ze=()=>{e.nextTick(()=>{Y()})},qe=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(L=>({...L,isFormColHidden:!(S!=null&&S.includes(L.label))}))};e.onUnmounted(()=>{ee.value=null});const he=S=>{d("clickTrigger",S)},F=async S=>{var q,L,ue,W,P,Ie;if(S===""){let ne="";(q=u.value)==null||q.forEach(we=>{we!=null&&we.isMain&&(ne=we==null?void 0:we.value)});let G=await Se.getItemData(Ee.value,sessionStorage.getItem("systemKey"),"");ne=((Ie=(P=(W=(ue=(L=G==null?void 0:G[0])==null?void 0:L.compData)==null?void 0:ue.find(we=>(we==null?void 0:we.key)==="mainRouters"))==null?void 0:W.contents)==null?void 0:P[0])==null?void 0:Ie.routerContent)+z.value+ne;let ce=await Se.getItemData(ne,sessionStorage.getItem("systemKey"),"");De.value=!0,X.value=ce==null?void 0:ce.filter(we=>(we==null?void 0:we.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=ee.value)==null?void 0:q.$el;S&&Se.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:ue,newIndex:W}=L;if(ue===W)return;const P=u.value.splice(ue,1)[0];u.value.splice(W,0,P)}})},pe=async(S,q,L,ue=!1)=>{var W,P,Ie,ne,G,ae,ce,we;try{Xe.setRefreshCurStructure(!1);const Te=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((W=Te==null?void 0:Te.data)==null?void 0:W.code)===200){let Be=(G=(ne=(Ie=(P=Te==null?void 0:Te.data)==null?void 0:P.result)==null?void 0:Ie[0])==null?void 0:ne.value)==null?void 0:G.pageData;ue?Be={...Be,compData:(ce=Be==null?void 0:Be.compData)==null?void 0:ce.map(Ae=>{var ye;return(Ae==null?void 0:Ae.key)==="formContent"?{...Ae,contents:(ye=Ae==null?void 0:Ae.contents)==null?void 0:ye.map(Ke=>({...Ke,[S]:L}))}:Ae})}:Be={...Be,compData:(ae=Be==null?void 0:Be.compData)==null?void 0:ae.map(Ae=>{var ye;return(Ae==null?void 0:Ae.key)==="formContent"?{...Ae,contents:(ye=Ae==null?void 0:Ae.contents)==null?void 0:ye.map(Ke=>(Ke==null?void 0:Ke.prop)===(q==null?void 0:q.prop)?{...Ke,[S]:L}:Ke)}:Ae})};const U=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Be}});((we=U==null?void 0:U.data)==null?void 0:we.code)===200?(v.ElMessage.success("编辑成功"),Xe.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},de=async(S,q)=>{await pe("label",q,S)},Z=async(S,q)=>{S&&await pe("type",q,S)},oe=async(S,q,L)=>{await pe(q,L,S,!1)},te=(S,q)=>{E.value===q?me.value=!1:me.value=!0,E.value=q==null?void 0:q.changeProp},ie=async S=>{var L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;let q=[];if((L=S==null?void 0:S.toString())!=null&&L.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((ue=S==null?void 0:S.toString())!=null&&ue.includes(".stl")||(W=S==null?void 0:S.toString())!=null&&W.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Ie=S==null?void 0:S.toString())!=null&&Ie.includes(".mtl")){const it=((ne=S==null?void 0:S.toString())==null?void 0:ne.split(",")).map(He=>({url:He,extension:x(He)}));f.value=it,g.value=!1,b.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".STL")||(ce=S==null?void 0:S.toString())!=null&&ce.includes(".obj")||(we=S==null?void 0:S.toString())!=null&&we.includes(".mtl")){let Ke,it=[],He={};if(Array.isArray(S)?Ke=S:Ke=S==null?void 0:S.split(","),Ke==null||Ke.forEach(rt=>{rt.includes(".mtl")?it.push(rt):He.blob=He.blob?He.blob+","+rt:rt}),(it==null?void 0:it.length)>0&&(He.mtlBlobs=it),(Be=(Te=Object.values(He))==null?void 0:Te[0])!=null&&Be.includes("http:"))q.push(He);else{const rt=new Blob([He.blob],{type:"application/octet-stream;charset=UTF-8"});let Pe=URL.createObjectURL(rt),gt="";(U=S==null?void 0:S.split("/"))==null||U.forEach((at,et)=>{var fe;et===((fe=S==null?void 0:S.split("/"))==null?void 0:fe.length)-1&&(gt=at)}),(Ae=He.blob)!=null&&Ae.includes(".stl")&&(gt=(gt==null?void 0:gt.replaceAll(">",""))+".urdf"),M.value=[{name:gt,blobUrl:Pe}],R.value=!0}}else{const Ke=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),it=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ke.close()}),He=new Blob([it.data],{type:"application/octet-stream;charset=UTF-8"});let rt=URL.createObjectURL(He),Pe="";(ye=S==null?void 0:S.split("/"))==null||ye.forEach((gt,at)=>{var et;at===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(Pe=gt)}),M.value=[{name:Pe,blobUrl:rt}],R.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Re=()=>{R.value=!1},ot=S=>{var P,Ie,ne,G;const q=(Ie=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Ie.contents,L=v.cloneDeep(S.content);let ue={};L&&((ne=Object.values(L))==null?void 0:ne.length)>0&&((G=Object.values(L))==null||G.forEach((ae,ce)=>{ue[q[ce].key]=ae}));const W={content:ue,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",W)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe;if(!S)return;(Be=(Te=r==null?void 0:r.itemData)==null?void 0:Te.find(Ne=>(Ne==null?void 0:Ne.key)==="parentFormPath"))==null||Be.contents;let q=st.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(Ne=>{var Me,xe,B,ge;let ke=(Me=Ne==null?void 0:Ne.key)==null?void 0:Me.split("/");return(r==null?void 0:r.compName)===(ke==null?void 0:ke[0])&&(xe=u.value)!=null&&xe.find(tt=>(tt==null?void 0:tt.prop)===(ke==null?void 0:ke[1]))&&(Ne.value=(ge=(B=u.value)==null?void 0:B.find(tt=>(tt==null?void 0:tt.prop)===(ke==null?void 0:ke[1])))==null?void 0:ge.value),Ne}),Xe.setTableViewContents(q));const L=v.cloneDeep(r.itemData);let ue=L==null?void 0:L.map(Ne=>{var ke;return(Ne==null?void 0:Ne.key)==="formContent"&&((ke=Ne.contents)==null||ke.map((Me,xe)=>{var B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft,xt,Ht,Yt;return Me.type=(ge=(B=u.value)==null?void 0:B.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ge.type,Me.options=Me!=null&&Me.options?Me.options:((Ge=(Le=(tt=Me==null?void 0:Me.key)==null?void 0:tt.split("$"))==null?void 0:Le[1])==null?void 0:Ge.length)>0?(ct=(dt=kn.formGetOptions((pt=(Oe=Me==null?void 0:Me.key)==null?void 0:Oe.split("$"))==null?void 0:pt[1]))==null?void 0:dt.split(","))==null?void 0:ct.map(Ot=>({label:Ot,value:Ot})):[],(vt=Me==null?void 0:Me.key)!=null&&vt.includes("$")&&(Me.key=(Bt=(bt=Me==null?void 0:Me.key)==null?void 0:bt.split("$"))==null?void 0:Bt[0]),Me.signature=(At=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:At.signature,Me.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Ft.isLoginUser,Me.value=(xt=Object.values(S))==null?void 0:xt[xe],Me.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Yt.isFormColHidden,Me})),Ne}),W=u.value,P=(Ae=(U=v.cloneDeep(ue))==null?void 0:U.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Ae.contents;if(W=W==null?void 0:W.map(Ne=>{var ke;return Ne.value=(ke=P==null?void 0:P.find((Me,xe)=>((Me==null?void 0:Me.id)??xe)===(Ne==null?void 0:Ne.id)))==null?void 0:ke.value,Ne}),!me.value){d("contentChange",{contents:ue,index:r.index});return}let Ie="",ne=(it=(Ke=(ye=v.cloneDeep(ue))==null?void 0:ye.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:it.find((Ne,ke)=>{var Me,xe,B;return(Ne==null?void 0:Ne.label)===E.value||ke.toString()===((B=(xe=(Me=E.value)==null?void 0:Me.split("t"))==null?void 0:xe[1])==null?void 0:B.toString())}),G=(He=ne==null?void 0:ne.optionUrl)==null?void 0:He.menuSelect,ae=!0;if((gt=(Pe=(rt=v.cloneDeep(ue))==null?void 0:rt.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Pe.contents)==null||gt.forEach(Ne=>{var ke,Me,xe,B,ge,tt;ae&&((xe=(Me=(ke=Ne==null?void 0:Ne.optionUrl)==null?void 0:ke.groupSelect)==null?void 0:Me[1])!=null&&xe.includes("["))&&(Ie=(ge=(B=Ne==null?void 0:Ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1],JSON.stringify(G)===JSON.stringify((tt=Ne==null?void 0:Ne.optionUrl)==null?void 0:tt.menuSelect)&&(ae=!1))}),(at=ne==null?void 0:ne.optionUrl)!=null&&at.menuSelect&&me.value){let Ne=await kn.getSelectRow(ne),ke,Me=(et=ne==null?void 0:ne.optionUrl)==null?void 0:et.menuSelect;if(Ne==null||Ne.forEach(xe=>{var B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt;Ie===((ge=(B=ne==null?void 0:ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1])&&((Ge=(Le=(tt=ne==null?void 0:ne.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Le[1])!=null&&Ge.includes("["))&&((vt=v.cloneDeep(xe))==null?void 0:vt[(ct=(dt=(pt=(Oe=ne==null?void 0:ne.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:pt[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(ne==null?void 0:ne.value)&&(ke=xe)}),ke){let xe=v.cloneDeep(W);xe=xe==null?void 0:xe.map(ge=>{var tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt;return(ke!=null&&ke[ge==null?void 0:ge.label]||ke!=null&&ke[(Oe=(Ge=(Le=(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Le[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Oe.replaceAll("]","")])&&((ct=(dt=(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:dt[1])!=null&&ct.includes("["))&&Me!=null&&Me.every(At=>{var _t,Ft;return(Ft=(_t=ge==null?void 0:ge.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(At)})&&(ge.value=(ke==null?void 0:ke[ge==null?void 0:ge.label])||(ke==null?void 0:ke[(Pt=(Bt=(bt=(vt=ge==null?void 0:ge.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:bt[1])==null?void 0:Bt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(ge.value)&&ge.value.every(At=>(At==null?void 0:At.url)&&(At==null?void 0:At.name))&&(ge.type="Upload")),ge}),xe=xe==null?void 0:xe.map(ge=>{var tt,Le,Ge;return(tt=ge==null?void 0:ge.optionUrl)!=null&&tt.oldMenuSelect&&(ge.optionUrl.menuSelect=(Ge=(Le=v.cloneDeep(ge))==null?void 0:Le.optionUrl)==null?void 0:Ge.oldMenuSelect),ge}),u.value=v.cloneDeep(xe);let B=v.cloneDeep(xe);B=B==null?void 0:B.map(ge=>{var tt,Le,Ge,Oe,pt,dt;return(Le=(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.menuSelect)!=null&&Le.some(ct=>ct==null?void 0:ct.includes("["))&&(ge.optionUrl.oldMenuSelect=(Oe=(Ge=v.cloneDeep(ge))==null?void 0:Ge.optionUrl)==null?void 0:Oe.menuSelect,ge.optionUrl.menuSelect=(dt=(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.menuSelect)==null?void 0:dt.map(ct=>{var vt,bt,Bt,Pt;if(ct!=null&&ct.includes("[")){let At=(bt=(vt=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:bt[1];ct=(Pt=(Bt=v.cloneDeep(xe))==null?void 0:Bt.find(_t=>(_t==null?void 0:_t.label)===At))==null?void 0:Pt.value}return ct})),ge}),u.value=B}else u.value=W;ue=ue==null?void 0:ue.map(xe=>{var B;return(xe==null?void 0:xe.key)==="formContent"&&(xe.contents=(B=xe.contents)==null?void 0:B.map(ge=>{var tt,Le,Ge,Oe;return ge.value=((Le=(tt=u.value)==null?void 0:tt.find(pt=>(pt==null?void 0:pt.label)===(ge==null?void 0:ge.key)))==null?void 0:Le.value)??(ge==null?void 0:ge.value),ge.type=((Oe=(Ge=u.value)==null?void 0:Ge.find(pt=>(pt==null?void 0:pt.prop)===(ge==null?void 0:ge.key)))==null?void 0:Oe.type)??(ge==null?void 0:ge.type),ge})),xe})}me.value=!1,d("contentChange",{contents:ue,index:r.index});let ce=[],we=[];if((Ve=v.cloneDeep((fe=ue==null?void 0:ue.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:fe.contents))==null||Ve.forEach(Ne=>{var ke;Array.isArray(Ne==null?void 0:Ne.value)&&((ke=Ne==null?void 0:Ne.value)!=null&&ke.find(Me=>{var xe;return(xe=Me==null?void 0:Me.url)==null?void 0:xe.includes(".obj")}))&&(we=Ne==null?void 0:Ne.value)}),(we==null?void 0:we.length)>0){const Ne=(Qe=v.cloneDeep(we))==null?void 0:Qe.filter(ke=>{var Me;return(Me=ke==null?void 0:ke.url)==null?void 0:Me.includes(".obj")});Ne==null||Ne.forEach(ke=>{var xe,B,ge,tt;const Me=(xe=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:xe.map(Le=>Le==null?void 0:Le.url);ce.push({objUrl:ke==null?void 0:ke.url,mtlUrls:((B=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:B.length)===1?(tt=(ge=we==null?void 0:we.filter(Le=>{var Ge;return(Le==null?void 0:Le.name)===(ke==null?void 0:ke.name)&&((Ge=Le==null?void 0:Le.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:ge[0])==null?void 0:tt.url:Me})}),le.setObjUrl(ce)}},I=S=>{if(!S)return;const q=[];let L="";for(let ue of S)(ue.includes("[")||L.includes("["))&&(L+=ue.trim(),v.cloneDeep(L).split("【").length-1===v.cloneDeep(L).split("】").length-1&&v.cloneDeep(L).split("[").length-1===v.cloneDeep(L).split("]").length-1&&(q.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return q},H=(S,q,L)=>{let ue="";const W=q==null?void 0:q.map(P=>{var Ie;return(Ie=P==null?void 0:P.value)==null?void 0:Ie.pageData});return W==null||W.forEach(P=>{var Ie;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Ie=P==null?void 0:P.compData)==null||Ie.forEach(ne=>{var G;(ne==null?void 0:ne.key)==="formContent"&&((G=ne==null?void 0:ne.contents)==null||G.forEach(ae=>{var ce;(ae==null?void 0:ae.prop)===(S==null?void 0:S[1])&&(ue=(ae==null?void 0:ae.value)===""?Se.judgeContents((ce=v.cloneDeep(ae))==null?void 0:ce.optionUrl,L):ae==null?void 0:ae.value)}))}))}),ue},w=(S,q,L,ue)=>{var ne,G;let W="",P="";(ne=v.cloneDeep(q))==null||ne.forEach((ae,ce)=>{ae!=null&&ae.includes("[")?P=P+z.value+S[ce]:P=P===""?P+ae:P+"/"+ae});let Ie=(G=ue[P])==null?void 0:G.map(ae=>{var ce;return(ce=ae==null?void 0:ae.value)==null?void 0:ce.pageData});return Ie==null||Ie.forEach(ae=>{var ce;(ae==null?void 0:ae.name)===(L==null?void 0:L[0])&&((ce=ae==null?void 0:ae.compData)==null||ce.forEach(we=>{var Te;(we==null?void 0:we.key)==="formContent"&&((Te=we==null?void 0:we.contents)==null||Te.forEach(Be=>{(Be==null?void 0:Be.prop)===(L==null?void 0:L[1])&&(W=Be==null?void 0:Be.value)}))}))}),W};return e.watch(()=>r.itemData,async()=>{var Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;const S=(Ie=r.itemData)==null?void 0:Ie.find(fe=>(fe==null?void 0:fe.key)==="formContent"),q=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(fe=>(fe==null?void 0:fe.key)==="formButton"),L=(G=v.cloneDeep(r.itemData))==null?void 0:G.find(fe=>(fe==null?void 0:fe.key)==="formFlex"),ue=(ae=v.cloneDeep(r.itemData))==null?void 0:ae.find(fe=>(fe==null?void 0:fe.key)==="formWrap"),W=(ce=v.cloneDeep(r.itemData))==null?void 0:ce.find(fe=>(fe==null?void 0:fe.key)==="enableWrap");if((ue==null?void 0:ue.contents)==="纵向"?O.value=!1:O.value=!0,D.value=(W==null?void 0:W.contents)===void 0?!1:W==null?void 0:W.contents,$.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((we=L==null?void 0:L.contents)==null?void 0:we.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,((Te=S==null?void 0:S.contents)==null?void 0:Te.length)>0&&Array.isArray(S==null?void 0:S.contents)){let fe=r.allMapContents;const Ve=(U=(Be=v.cloneDeep(S))==null?void 0:Be.contents)==null?void 0:U.map((B,ge)=>{var At,_t,Ft,xt,Ht,Yt,Ot,Aa,wa,Va,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa;let tt=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",Le=(B==null?void 0:B.type)??"",Ge=(B==null?void 0:B.options)??[];if((At=B==null?void 0:B.key)!=null&&At.includes("$")&&(tt=(_t=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:_t[0],((xt=(Ft=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ft[1])==null?void 0:xt.length)>0)){const[wt,Jt]=(Yt=(Ht=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Le=((Ot=Se.FormType.find(yt=>(yt==null?void 0:yt.key)===wt))==null?void 0:Ot.value)??"",((Aa=Jt==null?void 0:Jt.split(","))==null?void 0:Aa.length)>0&&(Ge=(wa=Jt==null?void 0:Jt.split(","))==null?void 0:wa.map(yt=>({label:yt,value:yt})))}let Oe=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(Oe=(Ka=(Va=B==null?void 0:B.contents)==null?void 0:Va.split(","))==null?void 0:Ka.map(wt=>({label:wt,value:wt}))),((Da=B==null?void 0:B.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Oe=(Ca=(ja=B==null?void 0:B.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let pt=!1,dt=(B==null?void 0:B.isFormColHidden)??!1,ct=Se.judgeContents((Ua=v.cloneDeep(B))==null?void 0:Ua.optionUrl,fe),vt=ct!==void 0&&ct!==""?ct:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(Ge==null?void 0:Ge.length)>0?(Wa=Ge==null?void 0:Ge[0])==null?void 0:Wa.value:(B==null?void 0:B.value)??"",bt=!1,Bt=ct!==void 0||Le===""?"Input":Le;if((Array.isArray(ct)&&(ct!=null&&ct.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Bt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.isLoginUser)pt=!0,vt=((Ha=N.value)==null?void 0:Ha.姓名)||((qa=N.value)==null?void 0:qa.account)||((Ga=N.value)==null?void 0:Ga.账号)||((Oa=N.value)==null?void 0:Oa.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(bt=!0,(B==null?void 0:B.isShow)==="originalSignature")Bt="image",vt=h.value+"/"+((ba=N.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(B.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=ze.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var Ma;(Qt==null?void 0:Qt.key)==="formContent"&&((Ma=Qt==null?void 0:Qt.contents)==null||Ma.forEach(St=>{(St==null?void 0:St.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=St==null?void 0:St.value)}))}))})});let Jt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),yt=B==null?void 0:B.isShow;Jt==null||Jt.forEach(Mt=>{Mt!=null&&Mt.value?yt=yt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):yt=yt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((_a=yt==null?void 0:yt.split("==="))==null?void 0:_a[0])+"==='"+((ka=yt==null?void 0:yt.split("==="))==null?void 0:ka[1])+"'":yt=((na=yt==null?void 0:yt.split("="))==null?void 0:na[0])+"='"+((ga=yt==null?void 0:yt.split("="))==null?void 0:ga[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(dt=!1,Bt="image",vt=h.value+"/"+((Xa=N.value)==null?void 0:Xa.signature)):vt=""}return Array.isArray(vt)&&vt.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Bt="Url"),{label:tt??"",name:"t"+ge,prop:v.cloneDeep(B==null?void 0:B.key),type:Bt,value:B!=null&&B.isNewDate&&vt===""?new Date:vt,id:(B==null?void 0:B.id)??ge,contents:(Oe==null?void 0:Oe.length)>0?Oe:Ge??[],width:(B==null?void 0:B.width)??1,isLoginUser:pt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:dt,signature:bt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}}),Qe=Ve==null?void 0:Ve.map(B=>B==null?void 0:B.value);let Ne="";Qe==null||Qe.forEach(B=>{B!==""&&B!==void 0&&(Ne=Ne===""?B:Ne+"/"+B)}),K.setSelectArray(Qe),K.setSelectString(Ne);let ke=(Ae=v.cloneDeep(Ve))==null?void 0:Ae.map(B=>(B!=null&&B.value&&Se.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));ke=ke==null?void 0:ke.map(B=>{var ge,tt,Le,Ge,Oe,pt,dt,ct;if((tt=(ge=B==null?void 0:B.optionUrl)==null?void 0:ge.menuSelect)!=null&&tt.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";B.optionUrl.oldMenuSelect=(Ge=(Le=v.cloneDeep(B))==null?void 0:Le.optionUrl)==null?void 0:Ge.menuSelect,B.optionUrl.menuSelect=(pt=(Oe=B==null?void 0:B.optionUrl)==null?void 0:Oe.menuSelect)==null?void 0:pt.map(bt=>{var Bt,Pt,At,_t,Ft,xt;if(bt!=null&&bt.includes("[")){let Ht=(Pt=(Bt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"))==null?void 0:Pt[1];vt=H((At=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),fe==null?void 0:fe[nt.value],fe),bt=((Ft=(_t=v.cloneDeep(ke))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Ft.value)||H((xt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),fe==null?void 0:fe[nt.value],fe)}return bt}),vt!==""&&B.value===""&&(B.value=w(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(dt=B==null?void 0:B.optionUrl)==null?void 0:dt.groupSelect,fe),Array.isArray(B.value)&&((ct=B.value)!=null&&ct.every(bt=>bt==null?void 0:bt.url))&&(B.type="UPLOAD"))}return B}),u.value=ke,ve.value=((ye=u.value)==null?void 0:ye.every(B=>B==null?void 0:B.disabled))||V.value===nt.value,se.value=(Ke=u.value)==null?void 0:Ke.every(B=>B==null?void 0:B.operable),be.value=(it=u.value)==null?void 0:it.map(B=>B==null?void 0:B.label);let Me=[],xe=[];if((He=v.cloneDeep(u.value))==null||He.forEach(B=>{var ge;Array.isArray(B==null?void 0:B.value)&&((ge=B==null?void 0:B.value)!=null&&ge.find(tt=>{var Le;return(Le=tt==null?void 0:tt.url)==null?void 0:Le.includes(".obj")}))&&(xe=B==null?void 0:B.value)}),(xe==null?void 0:xe.length)>0){const B=(rt=v.cloneDeep(xe))==null?void 0:rt.filter(ge=>{var tt;return(tt=ge==null?void 0:ge.url)==null?void 0:tt.includes(".obj")});B==null||B.forEach(ge=>{var Le,Ge,Oe,pt;const tt=(Le=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Le.map(dt=>dt==null?void 0:dt.url);Me.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((Ge=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Ge.length)===1?(pt=(Oe=xe==null?void 0:xe.filter(dt=>{var ct;return(dt==null?void 0:dt.name)===(ge==null?void 0:ge.name)&&((ct=dt==null?void 0:dt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Oe[0])==null?void 0:pt.url:tt})}),le.setObjUrl(Me)}(Pe=v.cloneDeep(u.value))==null||Pe.forEach(B=>{var ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At;if((tt=(ge=B==null?void 0:B.value)==null?void 0:ge.toString())!=null&&tt.includes(".stl")||(Ge=(Le=B==null?void 0:B.value)==null?void 0:Le.toString())!=null&&Ge.includes(".STL")||(pt=(Oe=B==null?void 0:B.value)==null?void 0:Oe.toString())!=null&&pt.includes(".obj")||(ct=(dt=B==null?void 0:B.value)==null?void 0:dt.toString())!=null&&ct.includes(".mtl")||(bt=(vt=B==null?void 0:B.value)==null?void 0:vt.toString())!=null&&bt.includes(".urdf")){let _t={},Ft=[],xt;Array.isArray(B==null?void 0:B.value)?xt=B==null?void 0:B.value:xt=(Bt=B==null?void 0:B.value)==null?void 0:Bt.split(","),xt==null||xt.forEach(Ht=>{Ht.includes(".mtl")?Ft.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Ft==null?void 0:Ft.length)>0&&(_t.mtlBlobs=Ft),(At=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&At.includes("http:")}})}else u.value=[];let P=st.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(fe=>{var Qe,Ne,ke,Me;let Ve=(Qe=fe==null?void 0:fe.key)==null?void 0:Qe.split("/");return(r==null?void 0:r.compName)===(Ve==null?void 0:Ve[0])&&(Ne=u.value)!=null&&Ne.find(xe=>(xe==null?void 0:xe.prop)===(Ve==null?void 0:Ve[1]))&&(fe.value=(Me=(ke=u.value)==null?void 0:ke.find(xe=>(xe==null?void 0:xe.prop)===(Ve==null?void 0:Ve[1])))==null?void 0:Me.value),fe}),Xe.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let fe={};(gt=v.cloneDeep(u).value)==null||gt.forEach(Ve=>{(Ve==null?void 0:Ve.isMain)===!0&&(fe[(Ve==null?void 0:Ve.prop)??(Ve==null?void 0:Ve.name)]=[{required:!0,message:`${(Ve==null?void 0:Ve.prop)||(Ve==null?void 0:Ve.name)}不能为空`}])}),_.value=fe}if(((at=q==null?void 0:q.contents)==null?void 0:at.length)>0){const fe=[];(et=q==null?void 0:q.contents)==null||et.forEach((Ve,Qe)=>{(Ve==null?void 0:Ve.label)!==""&&fe.push({label:(Ve==null?void 0:Ve.label)??"",id:(Ve==null?void 0:Ve.id)??Qe,type:(Ve==null?void 0:Ve.type)??"",background:Ve==null?void 0:Ve.background})}),J.value=fe}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,S=>{ve.value=S===nt.value},{immediate:!0}),(S,q)=>{const L=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-switch"),W=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Ie=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(Vt.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:ot,onChange:C,formDisabled:ve.value,formLabelsOperable:se.value,isButtonRow:O.value,onPreview:ie,onBlurChange:te,onHandleColEditChange:de,onHandleColTypeChange:Z,onRouteUrl:F,onClickTrigger:he},{operateCol:e.withCtx(({renderColumns:ne,formDisabled:G,formLabelsOperable:ae})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ze},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ue,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:$e,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ue,{"model-value":ae,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ie,{modelValue:be.value,"onUpdate:modelValue":q[0]||(q[0]=ce=>be.value=ce),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ee,onChange:qe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne,ce=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ce.label},[e.createVNode(W,{value:ce.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ce.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var we;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((we=Object.keys(ce))==null?void 0:we.filter(Te=>{var Be;return(Be=Ce.value)==null?void 0:Be.find(U=>(U==null?void 0:U.value)===Te)}),Te=>{var Be,U;return e.openBlock(),e.createElementBlock("div",{key:Te},[e.createVNode(Vt._sfc_main$2,{value:ce==null?void 0:ce[Te],"active-text":(U=(Be=Ce.value)==null?void 0:Be.find(Ae=>(Ae==null?void 0:Ae.value)===Te))==null?void 0:U.label,inactiveText:"",onChange:Ae=>oe(Ae,Te,ce)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Re},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},zo=Lt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),$n=e.ref(0),kr=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:kr(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:kr(r==null?void 0:r.children)},r))},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Cr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Cr(r==null?void 0:r.children,i),r)),n)},It=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{var y;d.value=!0;let $=[];It==null||It.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},J=D=>{r("deleteChange",v.cloneDeep(D))},M=D=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},De=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=It==null?void 0:It.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const me=It==null?void 0:It.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));me?D[me.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=D=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(N,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(N.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>M(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>O(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>le(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(_r,{tableChildContents:N==null?void 0:N.children,onDeleteChange:J,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=Lt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];It==null||It.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},J=D=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},M=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},De=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=It==null?void 0:It.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const me=It==null?void 0:It.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));me?D[me.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),N=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,me)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>J(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(N,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(N,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_r=Lt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Li={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),O=e.ref([]),R=e.ref(""),J=e.ref(""),M=e.ref([]),De=e.ref([]),X=e.ref([]),K=e.ref([]),le=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),N=e.ref([]),E=e.ref([]),me=e.ref([]),Xe=()=>{le.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},st=()=>{var C,I,H;b.value=!0;let h=[];(H=(I=(C=Se.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||H.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),N.value=h,E.value=h},ze=h=>{h||(N.value=E.value)},Ue=async h=>{var C,I,H,w,S,q,L,ue,W,P,Ie,ne;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:I.value)){let G=[],ae=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(W=(ue=Se.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:W.value)==null?void 0:P.value):(L=(q=Se.FormContent)==null?void 0:q.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:L.value;if(ae==null||ae.forEach(ce=>{y.value++,G.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[ce.label])??"",id:y.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),h!=null&&h.菜单选项&&((Ie=h==null?void 0:h.菜单选项)==null?void 0:Ie.length)>0){const ce=await Se.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(we=>((we==null?void 0:we.name)==="组信息选项"&&(we.contents=ce),we))}E.value=await Se.selectToBase(v.cloneDeep(G)),N.value=await Se.selectToBase(v.cloneDeep(G))}else{let G=v.cloneDeep(N.value);if(G=G==null?void 0:G.map(ae=>(ae.value=h==null?void 0:h[ae.name],ae)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const ae=await Se.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=ae),ce))}G=Se.formToOptionsContents(G),E.value=await Se.selectToBase(v.cloneDeep(G))}},Ee=async h=>{await Ue(h),N.value=E.value},V=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return yr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},ee=async h=>{var H,w,S,q,L,ue,W,P,Ie;b.value=!0;let C=[];const I=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(W=(ue=Se.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:W.value)==null?void 0:P.value):(L=(q=Se.FormContent)==null?void 0:q.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:L.value;if(I==null||I.forEach(ne=>{y.value++,C.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):V(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Ie=h==null?void 0:h.menuSelect)==null?void 0:Ie.length)>0){const ne=await Se.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ne),G))}R.value=h==null?void 0:h.id,N.value=await Se.selectToBase(Se.formToOptionsContents(C)),E.value=await Se.selectToBase(Se.formToOptionsContents(C))},se=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;me.value=(C=v.cloneDeep(me.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=me.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ve=()=>{b.value=!1,N.value=[],R.value=""},Ye=async()=>{var H,w,S,q,L,ue,W,P,Ie,ne;N.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(H=Se.FormContent)==null?void 0:H.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((L=(q=Se.FormContent)==null?void 0:q.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:L.value);if((ue=N.value)==null||ue.forEach(G=>{const ae=C==null?void 0:C.find(ce=>(ce==null?void 0:ce.label)===(G==null?void 0:G.label));ae&&(h[ae.key]=G.value)}),h.name=h.label,(W=me.value)!=null&&W.find(G=>G.id===h.id))me.value=(P=me.value)==null?void 0:P.map(G=>(G.id===h.id&&(G=h),G));else{let G=v.cloneDeep(me.value);me.value||(me.value=[]),G.push(h),me.value=G}me.value=me.value.map(({id:G,...ae})=>ae),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Ie=v.cloneDeep(s.originalItemContents))!=null&&Ie.find(G=>(G==null?void 0:G.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=me.value),G)):I.push({key:"tableToForm",contents:me.value}),r("change",I)},nt=h=>{le.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(H=>(H==null?void 0:H.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="page"&&(H.contents=_.value),H)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const Q=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;De.value=(C=v.cloneDeep(De.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="extraButton"&&(H.contents=De.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var I,H,w,S,q;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(L=>{const ue=Ta==null?void 0:Ta.find(W=>(W==null?void 0:W.label)===(L==null?void 0:L.label));ue?h[ue.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(H=De.value)!=null&&H.find(L=>L.id===h.id))De.value=(w=De.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(De.value)??[];L.push(h),De.value=L}le.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="extraButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(L=>((L==null?void 0:L.key)==="extraButton"&&(L.contents=De.value),L)):C.push({key:"extraButton",contents:De.value}),r("change",C)},be=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},Ce=()=>{le.value=!1,D.value=[],R.value=""},$e=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,X.value=C,K.value=C},Fe=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;M.value=(C=v.cloneDeep(M.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>((H==null?void 0:H.key)==="rowButton"&&(H.contents=M.value),H))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let h=[];It==null||It.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,O.value=h},qe=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),X.value=h,K.value=h},he=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,H,w,S,q;X.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=X.value)==null||I.forEach(L=>{const ue=Ia==null?void 0:Ia.find(W=>(W==null?void 0:W.label)===(L==null?void 0:L.label));ue?h[ue.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(H=M.value)!=null&&H.find(L=>L.id===h.id))M.value=(w=M.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(M.value);L.push(h),M.value=L}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="rowButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(L=>((L==null?void 0:L.key)==="rowButton"&&(L.contents=M.value),L)):C.push({key:"rowButton",contents:M.value}),r("change",C)},Y=()=>{f.value=!1,R.value="",K.value=[],X.value=[]},pe=h=>{u.value=!0;let C=[];It==null||It.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,J.value=h==null?void 0:h.id,O.value=C},de=h=>{var C;g.value=xr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var H;return(I==null?void 0:I.key)==="header"&&(I.contents=(H=g.value)!=null&&H.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Z=h=>{var I,H,w;h.type==="fix"?h.id!==""?g.value=Dr(g.value,h):g.value=wr(g.value,h==null?void 0:h.contents):g.value=Cr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(H=v.cloneDeep(s.originalItemContents))!=null&&H.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},oe=h=>{var I;u.value=!0;let C=[];It==null||It.forEach(H=>{y.value++,C.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:h[H.key],id:y.value,contents:H==null?void 0:H.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,J.value="",x.value=C,O.value=C},te=h=>{let C=v.cloneDeep(O.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),O.value=C},ie=()=>{u.value=!1,R.value="",J.value="",O.value=[]},Re=()=>{var I,H,w,S,q,L;x.value=O.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(ue=>{const W=It==null?void 0:It.find(P=>(P==null?void 0:P.label)===(ue==null?void 0:ue.label));W?h[W.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(h.children=ue.children)}),(H=g.value)!=null&&H.find(ue=>ue.id===h.id))g.value=(w=g.value)==null?void 0:w.map(ue=>(ue.id===h.id&&(ue=h),ue));else{let ue=v.cloneDeep(g.value)??[];J.value===""?ue.push(h):ue=ue==null?void 0:ue.map(W=>(W.id===J.value&&(W.children||(W.children=[]),W.children.push(h)),W)),g.value=ue}g.value=(S=g.value)!=null&&S.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,u.value=!1,R.value="",J.value="";let C=v.cloneDeep(s.originalItemContents);(q=v.cloneDeep(s.originalItemContents))!=null&&q.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(L=v.cloneDeep(s.originalItemContents))==null?void 0:L.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),r("change",C)},ot=h=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(H=>(H==null?void 0:H.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(H=>{var w;return(H==null?void 0:H.key)==="header"&&(H.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),H})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:C.contents,M.value=(H=(I=d.value)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:H.contents,De.value=(S=(w=d.value)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="extraButton"))==null?void 0:S.contents,_.value=(L=(q=d.value)==null?void 0:q.find(U=>(U==null?void 0:U.key)==="page"))!=null&&L.contents?!!((W=(ue=d.value)==null?void 0:ue.find(U=>(U==null?void 0:U.key)==="page"))!=null&&W.contents):!1,me.value=(Ie=(P=d.value)==null?void 0:P.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Ie.contents,g.value=(ne=g.value)==null?void 0:ne.map((U,Ae)=>(Array.isArray(U)?U=ri(U):U={label:(U==null?void 0:U.label)??"",prop:(U==null?void 0:U.label)==="操作"?"operate":U==null?void 0:U.prop,width:U!=null&&U.width?parseInt(U.width):"",fixed:(U==null?void 0:U.fixed)??void 0,sortable:(U==null?void 0:U.sortable)??!1,align:(U==null?void 0:U.align)??"left",showOverflowTooltip:(U==null?void 0:U.showOverflowTooltip)??!0,isNotDrag:(U==null?void 0:U.isNotDrag)??!1,isEditCol:(U==null?void 0:U.isEditCol)??!1,isOperate:(U==null?void 0:U.isOperate)??!1,id:(U==null?void 0:U.id)??Ae,formMenuSelect:(U==null?void 0:U.formMenuSelect)??void 0,groupSelect:(U==null?void 0:U.groupSelect)??void 0},U)),g.value=(G=g.value)!=null&&G.every(U=>Array.isArray(U))?(ae=g.value)==null?void 0:ae[0]:g.value,M.value=(ce=M.value)==null?void 0:ce.map((U,Ae)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",textColor:(U==null?void 0:U.textColor)??"#000000",id:(U==null?void 0:U.id)??Ae}),De.value=(we=De.value)==null?void 0:we.map((U,Ae)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",background:(U==null?void 0:U.background)??"var(--ssComponent-primary-color)",id:(U==null?void 0:U.id)??Ae}),me.value)me.value=(Be=me.value)==null?void 0:Be.map(U=>{y.value++;let Ae=U;return Ae.id=y.value,Ae});else{let U=[];const Ae=(Te=Se.getColumnChild(v.cloneDeep(g.value)))==null?void 0:Te.filter(ye=>(ye==null?void 0:ye.prop)!=="operate");Ae==null||Ae.forEach(ye=>{var Ke;y.value++,U.push({label:ye==null?void 0:ye.label,name:(ye==null?void 0:ye.prop)||(ye==null?void 0:ye.label),type:ye!=null&&ye.groupSelect?"Select":"Input",value:"",id:y.value,contents:ye==null?void 0:ye.options,menuSelect:ye==null?void 0:ye.formMenuSelect,groupSelect:(Ke=ye==null?void 0:ye.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),me.value=U}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),H=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(H,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>pe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>oe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>ot(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(_r,{tableChildContents:w==null?void 0:w.children,onDeleteChange:de,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",zi,[e.createElementVNode("div",Li,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>$e(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Fe(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>nt(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Q(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:st},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>ee(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(H,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(H,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:he},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(H,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(H,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:le.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(H,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(H,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:Ue,onChangeVisible:ze,onBlurChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(H,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(H,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Lt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=Kt.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=Kt.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((O=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:O.h)||s,minW:((J=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:J.minW)||ps.value,minH:((De=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:De.minH)||vs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},Er=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,O;return((O=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:O.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>Er(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>Er(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(O=>{for(const[R,J]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===R)return{...O,value:J};return O})},{immediate:!0});const u=g=>Vt.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,O=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(O.type)),{modelValue:O.value,"onUpdate:modelValue":R=>O.value=R,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:R=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=Lt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((le,D)=>(le[D==null?void 0:D.prop]=D==null?void 0:D.rule,le),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,le,D)=>{var N;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(N=s==null?void 0:s.relatedData)==null?void 0:N.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...O(K,le,D)]:y=$,y},O=(K,le,D)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,le)=>{var E,me,Xe,st,ze,Ue,Ee,V,ee;const D=((ze=(st=(Xe=(me=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:me.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Xe.contents)==null?void 0:st.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:ze.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((ee=(V=(Ee=(Ue=s==null?void 0:s.comp)==null?void 0:Ue.compData)==null?void 0:Ee.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:V.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],N=_(D,y,K);f.value=le?ks(N,le):N,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const J=K=>{const le=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const D=le==null?void 0:le.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},M=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},De=(K,le)=>{x.value=le==null?void 0:le.changeProp,J(K)},X=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:De,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=Lt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=Lt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},zs={class:"fix-content"},Ls={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),O=e.ref(!1),R=e.ref(0),J=e.ref([]),M=e.ref([]),De=(V,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[V.key];if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const se=ee[V.key];return yr(se)?se:V.default}return(V==null?void 0:V.label)==="类型"&&ee[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!ee[V.key]?!1:ee[V.key]},X=async V=>{var ve,Ye,nt,Q,z,be;d.value=!0;let ee=[];const se=await((nt=(Ye=(ve=Se.FormContent)==null?void 0:ve.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ye.value)==null?void 0:nt.value)??((z=(Q=Se.FormContent)==null?void 0:Q.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:z.value);if(se==null||se.forEach(Ce=>{R.value++,ee.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,prop:Ce==null?void 0:Ce.prop,value:De(Ce,V),id:R.value,contents:Ce==null?void 0:Ce.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((be=V==null?void 0:V.menuSelect)==null?void 0:be.length)>0){const Ce=await Se.menuToContentType(V==null?void 0:V.menuSelect);ee=ee==null?void 0:ee.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=Ce),$e))}_.value=V==null?void 0:V.id,u.value=await Se.selectToBase(Se.formToOptionsContents(ee)),b.value=await Se.selectToBase(Se.formToOptionsContents(ee))},K=V=>{var se;g.value=!0;let ee=[];(se=Se.FormButton)==null||se.forEach(ve=>{R.value++,ee.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"&&V[ve.key]===""?"normal":V[ve.key],id:R.value,contents:ve==null?void 0:ve.options})}),J.value=ee,M.value=ee,_.value=V==null?void 0:V.id};e.watch(()=>O.value,()=>{var ee,se;let V=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(ve=>(ve==null?void 0:ve.key)==="enableWrap")?V=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="enableWrap"&&(ve.contents=!O.value),ve)):V.push({key:"enableWrap",contents:!O.value}),r("change",V)},{deep:!0});const le=()=>{var se,ve,Ye,nt,Q;J.value=M.value;let V={};if(_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value),(se=J.value)==null||se.forEach(z=>{var Ce;const be=(Ce=Se.FormButton)==null?void 0:Ce.find($e=>($e==null?void 0:$e.label)===(z==null?void 0:z.label));be&&(V[be.key]=z.value)}),(ve=f.value)!=null&&ve.find(z=>z.id===V.id))f.value=(Ye=f.value)==null?void 0:Ye.map(z=>(z.id===V.id&&(z=V),z));else{let z=v.cloneDeep(f.value);f.value||(f.value=[]),z.push(V),f.value=z}g.value=!1,_.value="";let ee=v.cloneDeep(s.originalItemContents);(nt=v.cloneDeep(s.originalItemContents))!=null&&nt.find(z=>(z==null?void 0:z.key)==="formButton")?ee=(Q=v.cloneDeep(s.originalItemContents))==null?void 0:Q.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=f.value),z)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},D=V=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;x.value=(ee=v.cloneDeep(x.value))==null?void 0:ee.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="formContent"&&(ve.contents=x.value),ve))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=V=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(ve=>((ve==null?void 0:ve.key)==="formButton"&&(ve.contents=f.value),ve))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let V=[];(ee=Se.FormButton)==null||ee.forEach(se=>{R.value++,V.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:R.value,contents:se==null?void 0:se.options})}),J.value=V,M.value=V},N=()=>{var ee,se,ve;d.value=!0;let V=[];(ve=(se=(ee=Se.FormContent)==null?void 0:ee.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:se.value)==null||ve.forEach(Ye=>{R.value++,V.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:R.value,contents:Ye==null?void 0:Ye.options})}),u.value=V,b.value=V},E=V=>{let ee=v.cloneDeep(M.value);ee=ee==null?void 0:ee.map(se=>(se.value=V==null?void 0:V[se.name],se)),M.value=ee},me=V=>{const ee=V.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=V.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),ve=V.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");se!=null&&se.value&&Ao.isString(ve.value)&&(ve.value=[ve.value]),!(se!=null&&se.value)&&!Ao.isString(ve.value)&&(ve.value="")},Xe=async V=>{var ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze;if((V==null?void 0:V.类型)!==((se=(ee=b.value)==null?void 0:ee.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:se.value)){let qe=[];const he=await((nt=(Ye=(ve=Se.FormContent)==null?void 0:ve.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ye.value)==null?void 0:nt.value)?await(($e=(Ce=(be=Se.FormContent)==null?void 0:be.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ce.value)==null?void 0:$e.value):(z=(Q=Se.FormContent)==null?void 0:Q.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:z.value;if(he==null||he.forEach(F=>{var pe,de;R.value++;const Y=br(F==null?void 0:F.default)?(V==null?void 0:V[F.label])??F.value??"":F==null?void 0:F.default;qe.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:Y,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((de=(pe=b.value)==null?void 0:pe[0])==null?void 0:de.width)??1})}),V!=null&&V.菜单选项&&((Fe=V==null?void 0:V.菜单选项)==null?void 0:Fe.length)>0){const F=await Se.menuToContentType(V==null?void 0:V.菜单选项);qe=qe==null?void 0:qe.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=F),Y))}me(qe),b.value=await Se.selectToBase(v.cloneDeep(qe)),u.value=await Se.selectToBase(v.cloneDeep(qe))}else{let qe=v.cloneDeep(b.value);if(qe=qe==null?void 0:qe.map(he=>(he.value=V==null?void 0:V[he.name],he)),V!=null&&V.菜单选项&&((Ze=V==null?void 0:V.菜单选项)==null?void 0:Ze.length)>0){const he=await Se.menuToContentType(V==null?void 0:V.菜单选项);qe=qe==null?void 0:qe.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=he),F))}qe=Se.formToOptionsContents(qe),me(qe),b.value=await Se.selectToBase(v.cloneDeep(qe))}},st=V=>{V||(u.value=b.value)},ze=async V=>{await Xe(V),u.value=b.value},Ue=vo(async()=>{var ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he;u.value=b.value;let V={};V.width=((Ye=(ve=u.value)==null?void 0:ve[0])==null?void 0:Ye.width)??1,_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value);let ee=await((z=(Q=(nt=Se.FormContent)==null?void 0:nt.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Q.value)==null?void 0:z.value)??((Ce=(be=Se.FormContent)==null?void 0:be.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Ce.value);if(($e=u.value)==null||$e.forEach(F=>{const Y=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(F==null?void 0:F.label));Y&&(V[Y.key]=F.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Fe=x.value)!=null&&Fe.find(F=>F.id===V.id))x.value=(Ze=x.value)==null?void 0:Ze.map(F=>(F.id===V.id&&(F=V),F));else{let F=v.cloneDeep(x.value);F.push(V),x.value=F}x.value=x.value.map(({id:F,...Y})=>Y),d.value=!1,_.value="";let se=v.cloneDeep(s.originalItemContents);(qe=v.cloneDeep(s.originalItemContents))!=null&&qe.find(F=>(F==null?void 0:F.key)==="formContent")?se=(he=v.cloneDeep(s.originalItemContents))==null?void 0:he.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),Ee=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,ve,Ye,nt,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=v.cloneDeep(s.originalItemContents);x.value=((ee=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:se.contents)??[],O.value=(ve=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ve.contents?!((Ye=V==null?void 0:V.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ye.contents):!0,x.value=(nt=v.cloneDeep(x.value))==null?void 0:nt.map((z,be)=>{var $e;let Ce=z;return Ce.id=(z==null?void 0:z.id)??be,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=(($e=z==null?void 0:z.options)==null?void 0:$e.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,Ce}),x.value=Se.formToOptionsContents(x.value),f.value=(Q=f.value)==null?void 0:Q.map((z,be)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:be})},{deep:!0,immediate:!0}),(V,ee)=>{const se=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:N},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Ye)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>D(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",zs,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ls,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Ye)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>$(Ye)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:O.value,"onUpdate:modelValue":ee[0]||(ee[0]=Ye=>O.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Xe,onChangeVisible:st,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(ve,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ve,{class:"ok-button button",onClick:e.unref(Ue),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ee,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=Lt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),O=X=>{var K;x.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},J=X=>{var K,le,D;if((X==null?void 0:X.buttonName)==="确认"){const $=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(le=_.value)==null?void 0:le.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=M())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),De=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:De,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=Lt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=X=>{var K;u.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},J=X=>{var K,le,D,$;if((X==null?void 0:X.buttonName)==="确认"){const y=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(N=>{y[N]===""&&delete y[N]}),d.value){case"create":(le=b.value)==null||le.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(N=>N.index===(y==null?void 0:y.index)?{...N,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:N);break}r("change",($=M())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),De=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(u.value=((K=X==null?void 0:X.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((le=X==null?void 0:X.find(D=>D.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:De,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Lt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=Lt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var N;if(y.key==="extra"){let E=[];(N=y.value)==null||N.forEach(me=>{var Xe;E.push((Xe=Object.values(me))==null?void 0:Xe[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const O=(D,$,y,N)=>{var me;let E={};((me=D==null?void 0:D[0])==null?void 0:me.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Xe=>(Xe==null?void 0:Xe.key)!=="tableContentName"),f.value=E,x.value=y,_.value=N.id)},R=D=>{var Xe,st,ze,Ue;const $=(st=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:st.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),y=(Ue=(ze=Object.values(v.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:Ue.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),N=y==null?void 0:y.map((Ee,V)=>{var ee;return V===D.index&&(Ee==null?void 0:Ee.comp)==="Table"&&(Ee.compData=(ee=Ee.compData)==null?void 0:ee.map(se=>{var ve,Ye;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Ye=(ve=D.content)==null?void 0:ve.map(nt=>{let Q={};for(let z in nt)z!=="id"&&(Q[z]=nt[z]);return Q}))==null?void 0:Ye.map(nt=>Object.values(nt))),se})),Ee});N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),me={};for(let Ee in E)me[Ee]=N;f.value=me},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},M=D=>{var Xe,st,ze,Ue;const $=(st=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:st.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),y=(Ue=(ze=Object.values(v.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:Ue.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),N=y==null?void 0:y.map((Ee,V)=>(V===D.index&&(Ee.compData=D.contents),Ee));N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),me={};for(let Ee in E)me[Ee]=N;f.value=me},De=()=>{var $,y;let D={};for(let N in x.value)N===(($=Object.keys(f.value))==null?void 0:$[0])?D[N]=(y=Object.values(f.value))==null?void 0:y[0]:D[N]=x.value[N];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},le=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(N==null?void 0:N.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:E,index:(N==null?void 0:N.id)??E,onContentClick:O,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,onChange:R,childItemData:N==null?void 0:N.itemChildData,key:E,onContentChange:M,index:(N==null?void 0:N.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=Lt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Se.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Se.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=Kt.useModelComp(v.pinia),_=e.ref(!1),O=Kt.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:J,isEdit:M,routeToChildPath:De,tableViewContents:X,lockingPage:K,payloadTypes:le}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(O),{loginUserInfo:N}=v.storeToRefs(R),E=e.ref(!1),me=async()=>{var Q,z;(Q=i.value)!=null&&Q.find(be=>(be==null?void 0:be.buttonName)==="保存")&&await se((z=i.value)==null?void 0:z.find(be=>(be==null?void 0:be.buttonName)==="保存")),await Se.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Xe=()=>{u.value=!1,b.value=void 0},st=Q=>Q.map(z=>{const be={};for(const Ce in z){const $e=z[Ce];if(Ce.includes(f.value)){const Fe=Ce.split(f.value);let Ze=be;Fe.forEach((qe,he)=>{he===Fe.length-1?Ze[qe]=$e:(Ze[qe]||(Ze[qe]={}),Ze=Ze[qe])})}else be[Ce]=$e}return be}),ze=async(Q,z,be=[])=>{var $e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot;let Ce=($e=v.cloneDeep(z))==null?void 0:$e.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let h=(F=(he=(qe=(Ze=(Fe=v.cloneDeep(Q))==null?void 0:Fe.split("["))==null?void 0:Ze[1])==null?void 0:qe.split("]"))==null?void 0:he[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(Y=Ce==null?void 0:Ce.find(H=>(H==null?void 0:H.name)===(h==null?void 0:h[0])))==null?void 0:Y.compData;if(!I){let H=(pe=Q==null?void 0:Q.split("["))==null?void 0:pe[0],w=await Se.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",be);I=(de=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:de.compData}I==null||I.forEach(H=>{var w,S,q,L,ue,W;if((H==null?void 0:H.key)==="formContent")(w=H==null?void 0:H.contents)==null||w.forEach(P=>{var Ie;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Ie=P==null?void 0:P.value)==null?void 0:Ie.toString())});else if((H==null?void 0:H.key)==="tableContents"){let P=[],Ie=(S=I==null?void 0:I.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,ne=(h==null?void 0:h[1])??"";if(Ie!=null&&Ie.every(G=>Array.isArray(G))){let G=Se.getColumnChild((ue=Ie==null?void 0:Ie[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(W=H.contents)==null||W.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(we=>!(we!=null&&we.id)),G==null||G.forEach((we,Te)=>{let Be=ae[Te];typeof ae[Te]=="number"&&(Be=ae[Te].toString()),(ne===""||ne===we.prop)&&(ce[we.prop]=Be)}),P.push(ce)}),P=st(P)}else{let G=(q=Ie==null?void 0:Ie.map(ae=>ae==null?void 0:ae.label))==null?void 0:q.filter(ae=>ae!=="操作");(L=H.contents)==null||L.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(we=>!(we!=null&&we.id)),G==null||G.forEach((we,Te)=>{let Be=ae[Te];typeof ae[Te]=="number"&&(Be=ae[Te].toString()),(ne===""||ne===we)&&(ce[we]=Be)}),P.push(ce)})}C=P}})}return C}else if(Q!=null&&Q.includes("/")){let h={};return(Z=v.cloneDeep(Ce))==null||Z.forEach((C,I)=>{var H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;if((C==null?void 0:C.comp)==="Table"){let Ke=Array.isArray((S=(w=(H=C==null?void 0:C.compData)==null?void 0:H.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(W=(ue=(L=(q=C==null?void 0:C.compData)==null?void 0:q.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:L.contents)==null?void 0:ue[0])==null?void 0:W.some(Pe=>Pe==null?void 0:Pe.children):[],it=(ne=(Ie=(P=C==null?void 0:C.compData)==null?void 0:P.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:ne.map(Pe=>(Pe!=null&&Pe.find(gt=>gt==null?void 0:gt.id)&&(Pe=Pe.slice(1)),Pe)),He=(Te=(we=(ce=(ae=(G=C==null?void 0:C.compData)==null?void 0:G.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:ae.contents)==null?void 0:ce[0])==null?void 0:we[0])==null?void 0:Te.label,rt=(U=(Be=C==null?void 0:C.compData)==null?void 0:Be.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:U.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Se.tableToForm(it,rt):h[He]=Se.tableToForm(it,rt);else{const Pe=[];rt=rt.slice(1,rt.length-1),rt==null||rt.forEach((gt,at)=>{it==null||it.forEach(et=>{Pe.push({key:gt.label+et[0],value:et[at+1]})})}),h["form"+I]=Pe}}else{const Ke=(ye=(Ae=C.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:ye.contents;h!=null&&h.form||(h.form=[]);const it=[];Ke==null||Ke.forEach(He=>{He.key!==""&&(He={key:(He==null?void 0:He.key)??(He==null?void 0:He.label),value:He==null?void 0:He.value},it.push(He))}),h.form=[...it,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(Q==="createInsofDataApi"){let h=(oe=v.cloneDeep(z))==null?void 0:oe[0];return h={comp:(te=v.cloneDeep(h))==null?void 0:te.comp,compData:(ie=v.cloneDeep(h))==null?void 0:ie.compData,name:(Re=v.cloneDeep(h))==null?void 0:Re.name,isShow:(ot=v.cloneDeep(h))==null?void 0:ot.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return Q}},Ue=async(Q,z,be)=>{var Fe,Ze,qe;let Ce=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),$e=Ce==null?void 0:Ce.find(he=>(he==null?void 0:he.name)===(be==null?void 0:be[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let he={};for(let te in v.cloneDeep(Q))v.cloneDeep(Q)[te]!=="loginUser"?he[te]=v.cloneDeep(Q)[te]:he[te]=((Fe=N.value)==null?void 0:Fe.account)||((Ze=N.value)==null?void 0:Ze.账号);let F=[],Y=he;Array.isArray(Q)||(Y=[he]),Y==null||Y.forEach(te=>{F.push({[te[be[1]]]:te})});let pe=[],de=F==null?void 0:F.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]});Ce==null||Ce.forEach(te=>{var ie;(te==null?void 0:te.name)===(be==null?void 0:be[0])&&((ie=te==null?void 0:te.compData)==null||ie.forEach(Re=>{var ot;(Re==null?void 0:Re.key)==="tableContents"&&((ot=Re==null?void 0:Re.contents)==null||ot.forEach(h=>{h!=null&&h.some(C=>de.includes(C))&&pe.push({[h.find(C=>C.id).id]:h.find(C=>de.includes(C))})}))}))});let Z=pe==null?void 0:pe.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]}),oe=[];if(Z==null||Z.forEach(te=>{var ot;let ie=(ot=pe==null?void 0:pe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:ot[te],Re=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===ie});oe.push({id:parseInt(te),value:{tableData:Re[ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if(($e==null?void 0:$e.comp)==="Form"){let he=v.cloneDeep($e);he.compData=(qe=he.compData)==null?void 0:qe.map(pe=>{var de;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(de=pe.contents)==null?void 0:de.map(Z=>((Z==null?void 0:Z.key)===(be==null?void 0:be[1])&&(Z.value=(Q==null?void 0:Q[Z==null?void 0:Z.prop])||Q),Z))),pe});let F={};for(let pe in he)pe!=="id"&&(F[pe]=he[pe]);let Y=[];if(Y.push({id:$e==null?void 0:$e.id,keyType:be==null?void 0:be[1],value:{pageData:F}}),(Y==null?void 0:Y.length)>0)return Y}}},Ee=async(Q,z,be)=>{var Fe,Ze,qe,he,F,Y,pe,de,Z,oe;let Ce=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),$e=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.name)===(be==null?void 0:be[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let te={};for(let ie in v.cloneDeep(Q))v.cloneDeep(Q)[ie]!=="loginUser"?te[ie]=v.cloneDeep(Q)[ie]:te[ie]=((Fe=N.value)==null?void 0:Fe.account)||((Ze=N.value)==null?void 0:Ze.账号);await v.createInsofDataApi({key:{type:"data",pageKey:z,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if(($e==null?void 0:$e.comp)==="Form"){let te=v.cloneDeep($e),ie=Object.keys(Q),Re="";(he=(qe=v.cloneDeep(te))==null?void 0:qe.compData)==null||he.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(L=>{var ue;ie.includes(L==null?void 0:L.key)&&(L==null?void 0:L.value)===((ue=N.value)==null?void 0:ue.姓名)&&(Re=L==null?void 0:L.key)}))});let ot=[];(F=Object.values(Q[Re]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&ot.push(w)}),ot=[...new Set(ot)];const h=ot==null?void 0:ot.map(async w=>{var W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae;let S="";(ae=(G=(ne=(Ie=(P=(W=v.cloneDeep(w))==null?void 0:W.split("("))==null?void 0:P[1])==null?void 0:Ie.split(")"))==null?void 0:ne[0])==null?void 0:G.split(":"))==null||ae.forEach(ye=>{S=S===""?S+ye.replaceAll("'",""):S+"/"+ye.replaceAll("'","")});let q=[];(Ae=(U=(Be=(Te=(we=(ce=v.cloneDeep(w))==null?void 0:ce.split("<"))==null?void 0:we[1])==null?void 0:Te.split(">"))==null?void 0:Be[0])==null?void 0:U.split(":"))==null||Ae.forEach(ye=>{q.push(ye.replaceAll("'",""))});const L=await Se.getItemData(S,sessionStorage.getItem("systemKey"),"");let ue="";return L==null||L.forEach(ye=>{var Ke;ye.name===(q==null?void 0:q[0])&&((Ke=ye==null?void 0:ye.compData)==null||Ke.forEach(it=>{var He;(it==null?void 0:it.key)==="formContent"&&((He=it.contents)==null||He.forEach(rt=>{(rt==null?void 0:rt.key)===(q==null?void 0:q[1])&&(ue=rt==null?void 0:rt.value)}))}))}),{[w]:ue}}),C=await Promise.all(h);te.compData=(pe=(Y=v.cloneDeep(te))==null?void 0:Y.compData)==null?void 0:pe.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(L=>{var ue,W,P,Ie;return(ue=Q[Re])!=null&&ue[L==null?void 0:L.key]&&(Q[Re][L==null?void 0:L.key].includes("(")?L.value=(W=C==null?void 0:C.find(ne=>{var G;return((G=Object.keys(ne))==null?void 0:G[0])===Q[Re][L==null?void 0:L.key]}))==null?void 0:W[Q[Re][L==null?void 0:L.key]]:L.value=(Ie=(P=v.cloneDeep(Q))==null?void 0:P[Re])==null?void 0:Ie[L==null?void 0:L.key]),L})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let H="";((de=I==null?void 0:I.data)==null?void 0:de.type)==="success"&&((oe=(Z=I==null?void 0:I.data)==null?void 0:Z.result)==null||oe.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(be==null?void 0:be[0])&&(H=w.id)}),await v.updateInsofDataApi({id:H,value:{pageData:te}}))}}},V=(Q,z="",be={})=>{for(const[Ce,$e]of Object.entries(Q)){const Fe=z?`${z}.${Ce}`:Ce;$e!==null&&typeof $e=="object"&&!Array.isArray($e)&&Object.prototype.toString.call($e)!=="[object Date]"?V($e,Fe,be):be[Fe]=$e}return be},ee=async(Q,z,be,Ce)=>{var Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie;let $e=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=$e==null?void 0:$e.find(ne=>(ne==null?void 0:ne.name)===(be==null?void 0:be[0]));if(Fe){if(!(be!=null&&be[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let ne={},G=[],ae=(qe=(Ze=Fe==null?void 0:Fe.compData)==null?void 0:Ze.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(Te=>Array.isArray(Te))?G=(F=Se.getColumnChild((he=ae==null?void 0:ae[0])==null?void 0:he.filter(Te=>(Te==null?void 0:Te.label)!=="操作")))==null?void 0:F.map(Te=>Te==null?void 0:Te.prop):G=ae==null?void 0:ae.map(Te=>Te==null?void 0:Te.label);for(let Te in v.cloneDeep(Q))if(v.cloneDeep(Q)[Te]!=="loginUser"){let Be=V(v.cloneDeep(Q)[Te]),U={};for(let Ae in Be)if(G!=null&&G.find(ye=>ye===Ae))U[Ae]=Be[Ae];else if(G!=null&&G.find(ye=>(ye==null?void 0:ye.toUpperCase())===(Ae==null?void 0:Ae.toUpperCase()))){let ye=G==null?void 0:G.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(Ae==null?void 0:Ae.toUpperCase()));U[ye]=Be[Ae]}ne[Te]=U}else ne[Te]=((Y=N.value)==null?void 0:Y.account)||((pe=N.value)==null?void 0:pe.账号);let ce=await v.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((Z=(de=ce==null?void 0:ce.data)==null?void 0:de.result)==null?void 0:Z.length)>0){let Te=(te=(oe=ce==null?void 0:ce.data)==null?void 0:oe.result)==null?void 0:te.map(Be=>Be==null?void 0:Be.id);(Te==null?void 0:Te.length)>0&&await v.batchDeleteInsofDataApi({ids:Te})}let we=[];if((ie=Fe==null?void 0:Fe.compData)!=null&&ie.find(Te=>(Te==null?void 0:Te.key)==="pageColumn")&&((h=(ot=(Re=Fe==null?void 0:Fe.compData)==null?void 0:Re.find(Te=>(Te==null?void 0:Te.key)==="pageColumn"))==null?void 0:ot.contents)!=null&&h.includes("["))){const Te=await v.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let Be=((w=(H=(I=(C=Te==null?void 0:Te.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:H.key)==null?void 0:w.pageKey)??"";(S=Object.values(ne))==null||S.forEach(U=>{we.push({key:{type:"data",pageKey:Be,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(ne))==null||q.forEach(Te=>{we.push({key:{type:"data",pageKey:z,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Te}})});(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we})}else if(!(be!=null&&be[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let ne=v.cloneDeep(Fe);ne.compData=(ue=(L=v.cloneDeep(ne))==null?void 0:L.compData)==null?void 0:ue.map(ce=>{var we,Te;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Te=(we=v.cloneDeep(ce))==null?void 0:we.contents)==null?void 0:Te.map(Be=>{var U,Ae;return(U=v.cloneDeep(Q))!=null&&U[Be==null?void 0:Be.key]&&(Be.value=(Ae=v.cloneDeep(Q))==null?void 0:Ae[Be==null?void 0:Be.key]),Be})),ce});const G=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((W=G==null?void 0:G.data)==null?void 0:W.type)==="success"&&((Ie=(P=G==null?void 0:G.data)==null?void 0:P.result)==null||Ie.forEach(ce=>{var we,Te;((Te=(we=ce==null?void 0:ce.value)==null?void 0:we.pageData)==null?void 0:Te.name)===(be==null?void 0:be[0])&&(ae=ce.id)}),await v.updateInsofDataApi({id:ae,value:{pageData:ne}}))}}},se=async Q=>{var z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie;O.setImportLoading(!0);try{if(Q.api){let Re=new WeakMap;(be=(z=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:z.filter(W=>{var P,Ie;return((P=W==null?void 0:W.key)==null?void 0:P.pageKey)!=="menu"&&((Ie=W==null?void 0:W.key)==null?void 0:Ie.pageKey)!=="secret"}))==null||be.forEach(W=>{Re[W.key.pageKey]?Re[W.key.pageKey]=[...Re[W.key.pageKey],W]:Re[W.key.pageKey]=[W]});let h=await Se.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),C="";if(h=h==null?void 0:h.map(W=>{var P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye;if((W==null?void 0:W.comp)==="Form")W.compData=(P=W.compData)==null?void 0:P.map(Ke=>{var it;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(it=Ke.contents)==null?void 0:it.map(He=>{var rt;if((He==null?void 0:He.value)===""&&(He==null?void 0:He.type)==="Select"){let Pe=Se.judgeContents((rt=v.cloneDeep(He))==null?void 0:rt.optionUrl,Re);He.value=He.value||Pe}return He})),Ke});else if((W==null?void 0:W.comp)==="Table"&&(Ie=W.compData)!=null&&Ie.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(G=(ne=W.compData)==null?void 0:ne.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn"))==null?void 0:G.contents,it=((ce=(ae=W.compData)==null?void 0:ae.find(Pe=>(Pe==null?void 0:Pe.key)==="pageGroup"))==null?void 0:ce.contents)??"",He=(Be=(Te=(we=Ke==null?void 0:Ke.split("["))==null?void 0:we[1])==null?void 0:Te.split("]"))==null?void 0:Be[0];C=((U=Ke==null?void 0:Ke.split("["))==null?void 0:U[0])+((ye=(Ae=X.value)==null?void 0:Ae.find(Pe=>(Pe==null?void 0:Pe.key)===He))==null?void 0:ye.value)}return W}),!(C===""||C==="")){const W=await Se.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Re);h=h==null?void 0:h.map(P=>{var Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it;if((P==null?void 0:P.comp)==="Table"&&(Ie=P.compData)!=null&&Ie.find(He=>(He==null?void 0:He.key)==="pageColumn")){let He=(G=(ne=P.compData)==null?void 0:ne.find(et=>(et==null?void 0:et.key)==="pageColumn"))==null?void 0:G.contents,rt=((ce=(ae=P.compData)==null?void 0:ae.find(et=>(et==null?void 0:et.key)==="pageGroup"))==null?void 0:ce.contents)??"",Pe=(Be=(Te=(we=He==null?void 0:He.split("["))==null?void 0:we[1])==null?void 0:Te.split("]"))==null?void 0:Be[0],gt=((U=He==null?void 0:He.split("["))==null?void 0:U[0])+((ye=(Ae=X.value)==null?void 0:Ae.find(et=>(et==null?void 0:et.key)===Pe))==null?void 0:ye.value),at=(Ke=W==null?void 0:W.find(et=>(et==null?void 0:et.name)===(rt===""?d==null?void 0:d.compName:rt)))==null?void 0:Ke.compData;P.compData=(it=P.compData)==null?void 0:it.map(et=>{var fe;return(et==null?void 0:et.key)==="tableContents"&&(et.contents=(fe=at==null?void 0:at.find(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"))==null?void 0:fe.contents),et})}return P})}let I={};if((($e=(Ce=Q==null?void 0:Q.extraValues)==null?void 0:Ce.input)==null?void 0:$e.length)>0){const W=(Ze=(Fe=Q==null?void 0:Q.extraValues)==null?void 0:Fe.input)==null?void 0:Ze.map(async P=>{var Ie;ve!=null&&ve.find(ne=>ne===P)?I=await ze(P,h):I[Object.keys(P)[0]]=await ze((Ie=Object.values(P))==null?void 0:Ie[0],h,Re)});await Promise.all(W)}else I=await ze("/",h);let H=!1;(he=(qe=Q==null?void 0:Q.extraValues)==null?void 0:qe.output)==null||he.forEach(W=>{var P,Ie;(Ie=(P=Object.values(W))==null?void 0:P[0])!=null&&Ie.includes(".doc")&&(H=!0)});let w;if(H){const W=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(Q.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{W.close()})}else w=await v.axios.post(Q.api,I,{headers:{"Content-Type":"application/json"}});let S=(de=(pe=(Y=(F=v.cloneDeep(Q))==null?void 0:F.extraValues)==null?void 0:Y.output)==null?void 0:pe.map(W=>{var P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt;if(!((Ie=(P=Object.values(W))==null?void 0:P[0])!=null&&Ie.includes(".doc"))){let Pe=(U=(Be=(Te=(G=v.cloneDeep((ne=Object.values(W))==null?void 0:ne[0]))==null?void 0:G.split("["))==null?void 0:Te[((we=(ce=v.cloneDeep((ae=Object.values(W))==null?void 0:ae[0]))==null?void 0:ce.split("["))==null?void 0:we.length)-1])==null?void 0:Be.split("]"))==null?void 0:U[0],gt=Pe==null?void 0:Pe.split(":"),at=(Ke=v.cloneDeep((Ae=Object.values(W))==null?void 0:Ae[0]))==null?void 0:Ke.substring(0,v.cloneDeep((ye=Object.values(W))==null?void 0:ye[0]).lastIndexOf("["));if(at=(He=v.cloneDeep(at))==null?void 0:He.slice(0,((it=v.cloneDeep(at))==null?void 0:it.length)-1),at!=null&&at.includes("[")){let et="";if((rt=Se.contentTransArrayToAll(at,"/"))==null||rt.forEach(fe=>{var Ve,Qe,Ne,ke,Me,xe,B;if(!(fe!=null&&fe.includes("[")))et=et===""?et+fe.replaceAll("/",""):et+"/"+fe.replaceAll("/","");else{let ge=v.cloneDeep(fe).slice(1,((Ve=v.cloneDeep(fe))==null?void 0:Ve.length)-1),tt=(xe=(Me=(ke=(Ne=(Qe=v.cloneDeep(ge))==null?void 0:Qe.split("["))==null?void 0:Ne[1])==null?void 0:ke.split("]"))==null?void 0:Me[0])==null?void 0:xe.split(":"),Le="",Ge=(B=h==null?void 0:h.find(Oe=>(Oe==null?void 0:Oe.name)===(tt==null?void 0:tt[0])))==null?void 0:B.compData;Ge==null||Ge.forEach(Oe=>{var pt;(Oe==null?void 0:Oe.key)==="formContent"&&((pt=Oe==null?void 0:Oe.contents)==null||pt.forEach(dt=>{(dt==null?void 0:dt.key)===(tt==null?void 0:tt[1])&&(Le=dt==null?void 0:dt.value)}))}),et=et===""?et+Le.replaceAll("/",""):et+"/"+Le.replaceAll("/","")}}),at=et,at[(at==null?void 0:at.length)-1]!=="/")return at}}}))==null?void 0:de.filter(W=>W);S=[...new Set(v.cloneDeep(S))];let q=S==null?void 0:S.map(async W=>{let P=await Se.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((P==null?void 0:P.length)===0)return await Se.getParentContents(W)});await Promise.all(q);let L=[],ue=(te=(oe=(Z=v.cloneDeep(Q))==null?void 0:Z.extraValues)==null?void 0:oe.output)==null?void 0:te.map(async W=>{var Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe,Ne,ke,Me,xe,B,ge,tt,Le,Ge,Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft,xt,Ht,Yt,Ot,Aa,wa,Va,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa,wt,Jt,yt,vn,Mt,ca,Ea,oa,ma,Qt;if((Be=(Te=Object.values(W))==null?void 0:Te[0])!=null&&Be.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Ie=w.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ne.exec(Ie),ae=G==null?void 0:G[1],ce=document.createElement("a"),we=window.URL.createObjectURL(P);b.value=[{name:ae,blobUrl:we}],u.value=!0}else{let Ma=(Pe=(rt=(He=(Ae=v.cloneDeep((U=Object.values(W))==null?void 0:U[0]))==null?void 0:Ae.split("["))==null?void 0:He[((it=(Ke=v.cloneDeep((ye=Object.values(W))==null?void 0:ye[0]))==null?void 0:Ke.split("["))==null?void 0:it.length)-1])==null?void 0:rt.split("]"))==null?void 0:Pe[0],St=Ma==null?void 0:Ma.split(":"),qt=(et=v.cloneDeep((gt=Object.values(W))==null?void 0:gt[0]))==null?void 0:et.substring(0,v.cloneDeep((at=Object.values(W))==null?void 0:at[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ve=v.cloneDeep(qt))==null?void 0:Ve.slice(0,((fe=v.cloneDeep(qt))==null?void 0:fe.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(Qe=Se.contentTransArrayToAll(qt,"/"))==null||Qe.forEach((Nt,Ut)=>{var Wt,Rt,ua,la,za,Ya,La,Ja,En,rn,hn;if(!(Nt!=null&&Nt.includes("[")))Et=Et===""?Et+Nt.replaceAll("/",""):Et+"/"+Nt.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(Nt))!=null&&Wt.includes("]")?(ln=v.cloneDeep(Nt).slice(1,((Rt=v.cloneDeep(Nt))==null?void 0:Rt.length)-1),va=(La=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:La.split(":")):(ln=v.cloneDeep(Nt).slice(1,(Ja=v.cloneDeep(Nt))==null?void 0:Ja.length),va=(En=v.cloneDeep(ln))==null?void 0:En.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Sn;(ia==null?void 0:ia.key)==="formContent"&&((Sn=ia==null?void 0:ia.contents)==null||Sn.forEach(Fa=>{(Fa==null?void 0:Fa.key)===(va==null?void 0:va[1])&&(Za=Fa==null?void 0:Fa.value)}))}),((hn=Se.contentTransArrayToAll(qt,"/"))==null?void 0:hn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(Ne=D.value)!=null&&Ne.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((ke=Object.keys(W))==null?void 0:ke[0]);if(((Me=w==null?void 0:w.data)==null?void 0:Me.statusCode)===200||((xe=w==null?void 0:w.data)==null?void 0:xe.code)===200){if(((ge=(B=w==null?void 0:w.data)==null?void 0:B.data)!=null&&ge[ra]||(Le=(tt=w==null?void 0:w.data)==null?void 0:tt.result)!=null&&Le[ra])&&(St==null?void 0:St.length)===1)return await ee(((Oe=(Ge=w==null?void 0:w.data)==null?void 0:Ge.data)==null?void 0:Oe[ra])||((dt=(pt=w==null?void 0:w.data)==null?void 0:pt.result)==null?void 0:dt[ra]),v.cloneDeep(qt),St,C);if((vt=(ct=w==null?void 0:w.data)==null?void 0:ct.data)!=null&&vt[ra]||(Bt=(bt=w==null?void 0:w.data)==null?void 0:bt.result)!=null&&Bt[ra]){let Et=await Ue(((At=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:At[ra])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[ra]),v.cloneDeep(qt),St);return Et&&(L=[...L,...Et]),Et}else{if(!((xt=w==null?void 0:w.data)!=null&&xt.data)){let Et=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(St==null?void 0:St[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Rt=>{var ua;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(ua=Rt.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(St==null?void 0:St[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Rt})),Ut});let Nt=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Rt in Ut)Rt!=="id"&&(Wt[Rt]=Ut[Rt]);Nt.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(Nt==null?void 0:Nt.length)>0&&await v.batchUpdateInsofDataApi({dataList:Nt});return}if((St==null?void 0:St.length)===1){const Et=(Aa=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Aa.path;let Nt="";(ja=(Da=(Ka=(Va=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Va.split(")"))==null?void 0:Ka[0])==null?void 0:Da.split(":"))==null||ja.forEach(Rt=>{var ua,la;Nt=Nt===""?Nt+((ua=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:ua.trim()):Nt+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Oa=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Oa.data)!=null&&ba[St==null?void 0:St[0]]?Wt=await ee((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[St==null?void 0:St[0]],Nt,St,C):Wt=await Ee((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,Nt,Ut,Re),Wt}else{const Et=(Jt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Jt.path;let Nt="";return(Ea=(ca=(Mt=(vn=(yt=Et==null?void 0:Et.split("("))==null?void 0:yt[1])==null?void 0:vn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Rt,ua;Nt=Nt===""?Nt+((Rt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Rt.trim()):Nt+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await Ue((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[St==null?void 0:St[0]],Nt,St)}}}}});if(await Promise.all(ue),(L==null?void 0:L.length)>0){let W=[];L==null||L.forEach(ne=>{W!=null&&W.find(G=>{var ae,ce,we,Te;return((ce=(ae=G==null?void 0:G.value)==null?void 0:ae.pageData)==null?void 0:ce.name)===((Te=(we=ne==null?void 0:ne.value)==null?void 0:we.pageData)==null?void 0:Te.name)})||W.push(ne)});let P=[];W==null||W.forEach(ne=>{var ce,we,Te,Be;let G=v.cloneDeep(ne);G.value.pageData.compData=(ce=G.value.pageData.compData)==null?void 0:ce.map(U=>{var Ae;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Ae=U.contents)==null?void 0:Ae.map(ye=>{var it,He,rt,Pe;let Ke=(it=v.cloneDeep(L))==null?void 0:it.find(gt=>(gt==null?void 0:gt.keyType)===(ye==null?void 0:ye.key));if(Ke){let gt=(Pe=(rt=(He=Ke.value.pageData.compData)==null?void 0:He.find(at=>(at==null?void 0:at.key)==="formContent"))==null?void 0:rt.contents)==null?void 0:Pe.find(at=>(at==null?void 0:at.key)===(ye==null?void 0:ye.key));ye.value=gt==null?void 0:gt.value}return ye})),U}),P.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ae=[];(Be=(Te=(we=G==null?void 0:G.value)==null?void 0:we.pageData)==null?void 0:Te.compData)==null||Be.forEach(U=>{var Ae;(U==null?void 0:U.key)==="formContent"&&((Ae=U==null?void 0:U.contents)==null||Ae.forEach(ye=>{var Ke,it,He,rt,Pe,gt;if((it=(Ke=ye==null?void 0:ye.optionUrl)==null?void 0:Ke.menuSelect)!=null&&it.find(at=>at==null?void 0:at.includes("[")))if(ae!=null&&ae.find(at=>{var et,fe,Ve;return((et=at==null?void 0:at.key)==null?void 0:et.join(","))===((Ve=(fe=ye==null?void 0:ye.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:Ve.join(","))})){let at=(He=ae==null?void 0:ae.find(et=>{var fe,Ve,Qe;return((fe=et==null?void 0:et.key)==null?void 0:fe.join(","))===((Qe=(Ve=ye==null?void 0:ye.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Qe.join(","))}))==null?void 0:He.value;at.push({key:ye==null?void 0:ye.prop,groups:(rt=ye==null?void 0:ye.optionUrl)==null?void 0:rt.groupSelect,value:ye==null?void 0:ye.value}),ae=ae==null?void 0:ae.map(et=>{var fe,Ve,Qe;return((fe=et==null?void 0:et.key)==null?void 0:fe.join(","))===((Qe=(Ve=ye==null?void 0:ye.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Qe.join(","))&&(et.value=at),et})}else ae.push({key:(Pe=ye==null?void 0:ye.optionUrl)==null?void 0:Pe.menuSelect,value:[{key:ye==null?void 0:ye.prop,groups:(gt=ye==null?void 0:ye.optionUrl)==null?void 0:gt.groupSelect,value:ye==null?void 0:ye.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(U=>{var ye;let Ae="";return(ye=U==null?void 0:U.key)==null||ye.forEach(Ke=>{var it;if(!(Ke!=null&&Ke.includes("[")))Ae=Ae===""?Ae+Ke:Ae+"/"+Ke;else{let He="",rt=(it=Ke==null?void 0:Ke.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":");h==null||h.forEach(Pe=>{var gt;(Pe==null?void 0:Pe.name)===(rt==null?void 0:rt[0])&&((gt=Pe==null?void 0:Pe.compData)==null||gt.forEach(at=>{var et;(at==null?void 0:at.key)==="formContent"&&((et=at==null?void 0:at.contents)==null||et.forEach(fe=>{(fe==null?void 0:fe.prop)===(rt==null?void 0:rt[1])&&(He=fe==null?void 0:fe.value)}))}))}),Ae=Ae+r.value+He}}),U.key=Ae,U})),ae==null||ae.forEach(U=>{var it,He,rt;let Ae=(it=Re[U.key])==null?void 0:it.find(Pe=>{var gt,at,et,fe,Ve,Qe,Ne;return((at=(gt=Pe==null?void 0:Pe.value)==null?void 0:gt.pageData)==null?void 0:at.name)===((Ve=(fe=(et=U==null?void 0:U.value)==null?void 0:et[0])==null?void 0:fe.groups)==null?void 0:Ve[0])&&((Ne=(Qe=Pe==null?void 0:Pe.value)==null?void 0:Qe.pageData)==null?void 0:Ne.name)!==void 0}),ye=Ae==null?void 0:Ae.id,Ke=(He=Ae==null?void 0:Ae.value)==null?void 0:He.pageData;Ke.compData=(rt=Ke.compData)==null?void 0:rt.map(Pe=>{var gt;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(gt=Pe.contents)==null?void 0:gt.map(at=>{var fe;let et=(fe=U.value)==null?void 0:fe.find(Ve=>(Ve==null?void 0:Ve.key)===(at==null?void 0:at.prop));return et&&(at.value=et.value),at})),Pe}),P.push({id:ye,value:{pageData:Ke}})})});let Ie=(ie=v.cloneDeep(L))==null?void 0:ie[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}E.value=!0},ve=["createInsofDataApi"],Ye=vo(async Q=>{se(Q)},100),nt=async Q=>{var qe,he,F,Y,pe;const z=v.cloneDeep(Q);let be,Ce=new WeakMap,$e=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(he=(qe=$e.data.result)==null?void 0:qe.filter(de=>{var Z,oe;return((Z=de==null?void 0:de.key)==null?void 0:Z.pageKey)!=="menu"&&((oe=de==null?void 0:de.key)==null?void 0:oe.pageKey)!=="secret"}))==null||he.forEach(de=>{Ce[de.key.pageKey]?Ce[de.key.pageKey]=[...Ce[de.key.pageKey],de]:Ce[de.key.pageKey]=[de]}),Q!=null&&Q[0].path&&(be=await(z==null?void 0:z.map(async(de,Z)=>{var I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te;const te=(I=Ce[de==null?void 0:de.path])==null?void 0:I.filter(Be=>{var U;return((U=Be==null?void 0:Be.key)==null?void 0:U.type)==="data"});let ie="";const Re=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);te==null||te.forEach(Be=>{var U,Ae,ye,Ke,it;((Ae=(U=Be==null?void 0:Be.value)==null?void 0:U.tableData)==null?void 0:Ae.算法名称)===((ye=z==null?void 0:z[Z])==null?void 0:ye.method)&&(ie=(it=(Ke=Be==null?void 0:Be.value)==null?void 0:Ke.tableData)==null?void 0:it.算法体)});const ot=await Se.getItemData(de==null?void 0:de.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);let h="",C=(q=(S=(w=(H=ot==null?void 0:ot[0])==null?void 0:H.compData)==null?void 0:w.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Be=>(Be==null?void 0:Be.prop)==="算法体");return(ue=(L=ot==null?void 0:ot[0])==null?void 0:L.compData)==null||ue.forEach(Be=>{var U;(Be==null?void 0:Be.key)==="tableContents"&&((U=Be==null?void 0:Be.contents)==null||U.forEach(Ae=>{Ae!=null&&Ae.find(ye=>ye===(de==null?void 0:de.method))&&(h=Ae[C])}))}),{buttonName:((W=z==null?void 0:z[Z])==null?void 0:W.method)||((ne=(Ie=(P=te==null?void 0:te[0])==null?void 0:P.value)==null?void 0:Ie.tableData)==null?void 0:ne.算法名称),api:(ie===""?(ce=(ae=(G=te==null?void 0:te[0])==null?void 0:G.value)==null?void 0:ae.tableData)==null?void 0:ce.算法体:ie)||h,content:Re==null?void 0:Re.filter(Be=>Be.comp!=="methodButton"),extraContent:(we=v.cloneDeep(de.value))==null?void 0:we.slice(1),methodName:(de==null?void 0:de.path)??"",extraValues:(Te=z==null?void 0:z[Z])==null?void 0:Te.data}})));const Fe=z==null?void 0:z.map(async de=>{var ot,h,C,I,H,w;const Z=(ot=$e.data.result)==null?void 0:ot.filter(S=>{var q,L,ue;return((q=S==null?void 0:S.key)==null?void 0:q.parentTable)===""&&((L=S==null?void 0:S.key)==null?void 0:L.type)==="method"&&((ue=S==null?void 0:S.key)==null?void 0:ue.methodName)===S.method}),oe=Z==null?void 0:Z[0],te=(h=$e.data.result)==null?void 0:h.filter(S=>{var q,L;return((q=S==null?void 0:S.key)==null?void 0:q.type)==="methodData"&&((L=S==null?void 0:S.key)==null?void 0:L.tableId)===(oe==null?void 0:oe.id)}),ie=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce),Re=te==null?void 0:te[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(H=(I=Re==null?void 0:Re.value)==null?void 0:I.tableData)==null?void 0:H[0],content:ie==null?void 0:ie.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(de.value))==null?void 0:w.slice(1),methodName:(de==null?void 0:de.method)??""}}),Ze=(F=Q==null?void 0:Q[0])!=null&&F.path&&((Y=Q==null?void 0:Q[0])==null?void 0:Y.path)!==""?await Promise.all(be):await Promise.all(Fe);i.value=Ze==null?void 0:Ze.filter(de=>de==null?void 0:de.extraContent),(pe=i.value)==null||pe.forEach(de=>{var Z;de.api===""&&((Z=de.content)==null||Z.forEach(oe=>{var te;oe.comp=="Table"&&x.setExtraContents(Se.methodTableToContent(oe.compData,(te=de.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Q,z)=>{var be,Ce,$e;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=i.value)==null?void 0:be.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Ze=Fe==null?void 0:Fe.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:qe=>e.unref(Ye)(Fe),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(De)!==""&&(($e=e.unref(D))==null?void 0:$e[((Ce=e.unref(D))==null?void 0:Ce.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:me,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Xe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=Lt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=Lt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=X=>{var K;x.value=v.cloneDeep(X),r("change",(K=O())==null?void 0:K.compData)},J=X=>{var K,le;if((X==null?void 0:X.buttonName)==="确认"){const D=v.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(le=O())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},M=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},De=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>M("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>M("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:De,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=Lt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var O,R;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(O,R)=>{d.value=R,r("clickStep",O,R)},g=O=>Vt.getComponent(O),f=()=>{var R;const O=(R=s==null?void 0:s.stepList)==null?void 0:R.find((J,M)=>M+1===u.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},x=O=>{r("clickTrigger",O)},_=O=>{r("changeTrigger",O)};return(O,R)=>{var De,X,K,le,D;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(De=n.stepConfig)==null?void 0:De.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(J,{key:y,class:"step-item",onClick:N=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":N=>$.value=N,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(O.$slots,(N,E)=>({name:E,fn:e.withCtx(me=>[e.renderSlot(O.$slots,E,e.mergeProps({ref_for:!0},me||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=Lt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=Lt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=Lt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(Vt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=Lt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],zc={class:"list-icon"},Lc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",zc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=Lt._export_sfc(Lc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=J=>{var De;let M=(De=v.cloneDeep(b.value))==null?void 0:De.map((X,K)=>(J===K&&(X.content=!0),X));b.value=M},f=J=>{var De;let M=(De=v.cloneDeep(b.value))==null?void 0:De.map((X,K)=>(J===K&&(X.content=!1),X));b.value=M,d.value=v.cloneDeep(s.value)},x=(J,M)=>{var le;let De=(le=v.cloneDeep(b.value))==null?void 0:le.map((D,$)=>(J===$&&(D.content=!1),D));b.value=De;const X=v.cloneDeep(s.value),K=X==null?void 0:X.filter((D,$)=>($===J&&(D.name=M),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var J,M,De;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(M=v.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,b.value=(De=v.cloneDeep(u.value))==null?void 0:De.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),O=(J,M,De)=>{var K,le;if(!J)return;let X=v.cloneDeep(s.value);X=(K=X==null?void 0:X.map((D,$)=>($===De&&(D.compData=J),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(le=v.cloneDeep(X))==null?void 0:le.map((D,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},R=J=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=v.cloneDeep(s.value),De=M==null?void 0:M.filter((X,K)=>K!==J);i.setOriginalData(De),i.setItemData(De),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const De=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(mr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:K})=>{var le,D,$,y,N,E,me,Xe,st,ze;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(D=(le=b.value)==null?void 0:le.find(Ue=>Ue.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(y=($=b.value)==null?void 0:$.find(Ue=>Ue.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Vt._sfc_main$3,{modelValue:X.name,"onUpdate:modelValue":Ue=>X.name=Ue,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(N=b.value)==null?void 0:N.find(Ue=>Ue.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ue=>g(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Xe=(me=b.value)==null?void 0:me.find(Ue=>Ue.id===K))!=null&&Xe.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(De,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ue=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(De,{name:"Save",onClick:e.withModifiers(Ue=>x(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ze=(st=b.value)==null?void 0:st.find(Ue=>Ue.id===K))!=null&&ze.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ue=>R(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:X,index:K})=>{var le,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(D=(le=u.value)==null?void 0:le.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>O($,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=Lt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=Lt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),R=e.ref(null),J=Qn(v.pinia),{itemData:M}=v.storeToRefs(J),De=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Q=>{b.value="修改标签页",g.value.title=d.value[Q].title,f.value=Q,u.value=!0},K=Q=>{const z=$(Q);O.value.delete(z),d.value.splice(Q,1),nt()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(Q)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,nt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Q=>{const z=d.value[Q];return z.id||(z.id=D()),z.id},y=Q=>{var Ce;_.value=Q;const z=$(Q);R.value=v.cloneDeep(M.value);let be=O.value.get(z);!be&&((Ce=d.value[Q].children)==null?void 0:Ce.length)>0&&(be=Xe(d.value[Q].children)),be?J.setItemData(v.cloneDeep(be)):J.setItemData([]),x.value=!0},N=e.computed(()=>{const Q=Kt.useModelComp(v.pinia),z=v.storeToRefs(Q).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(be=>{var Ce;if(be.comp==="Tabs"&&_.value>=0){const $e=$(_.value);if((Ce=be.compData)==null?void 0:Ce.some(Ze=>{var qe;return Ze.key==="stepList"&&((qe=Ze.contents)==null?void 0:qe.some(he=>he.id===$e))}))return!1}return!0})}),E=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,me=Q=>{var z;try{const be=v.cloneDeep(Q);be.id=Date.now()+Math.random(),be.comp==="Tabs"&&((z=be.compData)==null||z.forEach($e=>{$e.key==="stepList"&&$e.contents&&$e.contents.forEach(Fe=>{Fe.id=D()})}));const Ce=v.cloneDeep(M.value);Ce.push(be),J.setItemData(Ce)}catch(be){console.error("添加组件失败:",be)}},Xe=Q=>Q.map(z=>{var be;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:st(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:ze(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((be=z.content)==null?void 0:be.originalData)||[]}}}),st=Q=>{if(!Q)return[];const z=[];return Q.rowContents&&z.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&z.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:Q.isEnableWrap}),z},ze=Q=>[],Ue=()=>{if(_.value>=0&&_.value<d.value.length){const Q=$(_.value);O.value.set(Q,v.cloneDeep(M.value)),d.value[_.value].children=ee(M.value),console.log("保存后的数据",ee(M.value))}x.value=!1,_.value=-1,R.value=null,nt()},Ee=()=>{R.value&&J.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},V=()=>{x.value&&Ee()},ee=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((z,be)=>{if(!z||typeof z!="object")return z;const{comp:Ce,name:$e,compData:Fe}=z;switch(Ce){case"Form":return{type:"form",content:se(Fe||[]),value:"表单"};case"Table":return{type:"table",content:ve(Fe||[]),value:"表格"};default:return{type:"xxx",content:Ye(Fe||[]),value:""}}})},se=Q=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},be={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((Ce,$e)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${$e}:`,Ce);return}const{key:Fe,contents:Ze}=Ce,qe=be[Fe];if(!qe){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?z[qe]=!!Ze:z[qe]=Array.isArray(Ze)?Ze:[]}),z},ve=Q=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},be={header:"columns",tableContents:"tableData"};return Q.forEach((Ce,$e)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${$e}:`,Ce);return}const{key:Fe,contents:Ze}=Ce,qe=be[Fe];if(!qe){console.warn(`Unknown Table config key: ${Fe}`);return}z[qe]=Array.isArray(Ze)?Ze:[]}),z},Ye=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),nt=()=>{const Q=[{key:"stepList",contents:d.value}];r("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const z=Q.find(be=>be.key==="stepList");z&&z.contents&&(d.value=z.contents.map(be=>({title:be.title||"",value:be.value||be.title||"",label:be.label||be.title||"",children:be.children||[],id:be.id||D()})))}},{immediate:!0,deep:!0}),(Q,z)=>{const be=e.resolveComponent("svg-icon"),Ce=e.resolveComponent("el-input"),$e=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:De},[e.createVNode(be,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Ze,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",nu,e.toDisplayString(Ze.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:he=>X(qe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:he=>y(qe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:he=>K(qe)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":z[2]||(z[2]=Ze=>u.value=Ze),title:b.value,onBeforeDestroy:z[3]||(z[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode($e,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ce,{modelValue:g.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":z[4]||(z[4]=Ze=>x.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ee},"取消"),e.createElementVNode("button",{onClick:Ue},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:qe=>me(Ze)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Ze.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Ze.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=Lt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function ku(n){return{type:"line",...n}}function xu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},Fo=Kt.useMenuState(v.pinia),Sr=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(O=>{const{name:R}=O;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(O=>{const{key:R}=O;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const R=O==null?void 0:O[0];let J=!1;v.isObject(R)&&(R!=null&&R.id)&&(J=!0);let M=u,De=b;J&&(M=M+1,De=De+1);const X=O==null?void 0:O[M],K=O==null?void 0:O[De];s.push(X),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&Fo.activeMenuPath&&(g=await Se.getItemData(`${Fo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Se.getItemData(`${x}^${s}`,f,"")}return Sr(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Se.getItemData(u,b,"");return Sr(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:O}=i||{};return g&&f&&Se.isNumber(x)&&Se.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:O}):Se.isNumber(u)&&Se.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const O=[];for(let J=0;J<x.length;J++){const M=x[J],De=_[J];O.push({name:M,value:De})}const R=g({data:O});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=Lt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},zu={class:"form-content"},Lu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Z;u.value=b(),(Z=u.value)==null||Z.forEach(oe=>{var ie;const te=oe==null?void 0:oe.prop;oe.value=(ie=g==null?void 0:g.value)==null?void 0:ie[te]}),d.visible=!0},x=Z=>{g.value=Z},_=()=>{var Z;d.visible=!1,r("change",(Z=pe())==null?void 0:Z.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),J=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],M=e.ref({}),De=()=>{const Z=R.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=M.value)==null?void 0:Re[ie]}),oe},X=Z=>{var te;M.value=Z;const oe=De();R.value=oe,r("change",(te=pe())==null?void 0:te.compData)},K=async()=>{const Z=await Se.getMenusContent(),oe=De();oe==null||oe.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=Z)}),R.value=oe,O.visible=!0,await Ze(M.value.menu),await F(M.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),N=()=>{const Z=D.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y.value)==null?void 0:Re[ie]}),oe},E=Z=>{var te;y.value=Z;const oe=N();D.value=oe,r("change",(te=pe())==null?void 0:te.compData)},me=async()=>{await V();const Z=v.cloneDeep(Xe.value),oe=N();oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y==null?void 0:y.value)==null?void 0:Re[ie],ie==="mainKey"&&(te.contents=Z)}),D.value=oe,le.visible=!0},Xe=e.ref([]),st=e.ref([]),ze=e.ref({}),Ue=e.ref({}),Ee=()=>{const{compData:Z}=Ce.value||{},oe=Z==null?void 0:Z.find(I=>{const{key:H}=I;return H==="header"}),te=(oe==null?void 0:oe.contents)||[],ie=te==null?void 0:te.filter((I,H)=>{const{label:w}=I;return w!=="操作"}),Re=ie==null?void 0:ie.findIndex((I,H)=>{const{isMainKey:w}=I;return w});if(Re<0)return[];const ot=Z==null?void 0:Z.find(I=>{const{key:H}=I;return H==="tableContents"}),h=(ot==null?void 0:ot.contents)||[];return h==null?void 0:h.map(I=>{const H=I==null?void 0:I[0];let w=Re;v.isObject(H)&&(H!=null&&H.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},V=async()=>{const Z=await Ee();Xe.value=Z},ee=async Z=>{const oe=sessionStorage.getItem("systemKey");return await Se.getItemData(Z,oe,"")},se=async Z=>{const oe=Z;st.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return ze.value[ie]=te,{label:ie,value:ie}})},ve=Z=>{const{comp:oe,compData:te}=Ue.value||{};if(oe==="Table"){let ie=N();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),qe(ie,te),D.value=ie}},Ye=async()=>{var te,ie;const Z=(te=y==null?void 0:y.value)==null?void 0:te.mainKey,oe=(ie=M==null?void 0:M.value)==null?void 0:ie.menu;if(Z){const ot=`${oe==null?void 0:oe.join("/")}^${Z}`,h=await ee(ot);await se(h);const C=N();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=st.value)}),D.value=C}};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey},async(Z,oe)=>{Z!=oe&&Z&&await Ye()});const nt=async Z=>{const oe=ze.value[Z];Ue.value=oe,await ve()};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&Z&&nt(Z)});const Q=async()=>{var oe;await Ye();const Z=(oe=y.value)==null?void 0:oe.group;await nt(Z)},z=e.ref([]),be=e.ref({}),Ce=e.ref({}),$e=async Z=>{const oe=Z==null?void 0:Z.join("/"),te=sessionStorage.getItem("systemKey");return await Se.getItemData(oe,te,"")},Fe=async Z=>{const oe=await $e(Z);z.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return be.value[ie]=te,{label:ie,value:ie}})},Ze=async(Z,oe)=>{await Fe(Z);const te=De();te==null||te.forEach(ie=>{(ie==null?void 0:ie.prop)==="group"&&(ie.contents=z.value)}),R.value=te};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.menu},async(Z,oe)=>{const te=Z==null?void 0:Z.join("/"),ie=oe==null?void 0:oe.join("/");te!=ie&&await Ze(Z)});const qe=(Z,oe)=>{const te=oe==null?void 0:oe.find(h=>{const{key:C}=h;return C==="header"}),ie=(te==null?void 0:te.contents)||[],Re=ie==null?void 0:ie.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),ot=Re==null?void 0:Re.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Z==null||Z.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=ot)})},he=Z=>{const{comp:oe,compData:te}=Ce.value||{};if(oe==="Table"){M.value.formItems=[];let ie=De();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),qe(ie,te),R.value=ie}},F=async Z=>{const oe=be.value[Z];Ce.value=oe,await he()};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&F(Z)});const Y=async()=>{var te,ie;const Z=(te=M.value)==null?void 0:te.menu;await Ze(Z);const oe=(ie=M.value)==null?void 0:ie.group;await F(oe)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),de=()=>{d.visible=!1,O.visible=!1,le.visible=!1};return e.onMounted(async()=>{var oe,te,ie;R.value=J(),D.value=$();const Z=s==null?void 0:s.itemContents;g.value=((oe=Z==null?void 0:Z.find(Re=>Re.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},M.value=((te=Z==null?void 0:Z.find(Re=>Re.key==="chartDataConfig"))==null?void 0:te.contents)??{},await Y(),y.value=((ie=Z==null?void 0:Z.find(Re=>Re.key==="chartDetailConfig"))==null?void 0:ie.contents)??{},await Q()}),(Z,oe)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[0]||(oe[0]=ie=>f())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[1]||(oe[1]=ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[2]||(oe[2]=ie=>me())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:de,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lu,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:de,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:de,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=Lt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Ln={exports:{}},Uu=Ln.exports,Ro;function Wu(){return Ro||(Ro=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,O){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,O)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Se.commonjsGlobal=="object"&&Se.commonjsGlobal.global===Se.commonjsGlobal?Se.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,O){var R=b.URL||b.webkitURL,J=document.createElement("a");_=_||x.name||"download",J.download=_,J.rel="noopener",typeof x=="string"?(J.href=x,J.origin===location.origin?u(J):d(J.href)?r(x,_,O):u(J,J.target="_blank")):(J.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,O){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,O),_);else if(d(x))r(x,_,O);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,O,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,O);var J=x.type==="application/octet-stream",M=/constructor/i.test(b.HTMLElement)||b.safari,De=/CriOS\/[\d]+/.test(navigator.userAgent);if((De||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var D=X.result;D=De?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},X.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,le=K.createObjectURL(x);R?R.location=le:location.href=le,R=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Ln)),Ln.exports}Wu();const Kn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DuCF3sUz.cjs")).then(n=>n.index));Kn.install=n=>{n.component("ssMenu",Kn)};const Tr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},go=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=go(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},mo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(O=>O!==(b==null?void 0:b[r])),f=r+1,x=mo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(O=>{_.push(O)}),u=_}return u})),d},yo=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=yo(f,g,s,r,x),O=[];O.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{O.push(R)}),b=O}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:Kn,DynamicIcon:Tr,ssDialog:Xt.ssDialog,ssInput:Vt._sfc_main$3},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=Kt.useMenuState(),b=Kt.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),O=e.ref(),{asideMenus:R,menuTriggerType:J,platform:M}=v.storeToRefs(u),{fixMenuStatus:De}=v.storeToRefs(b),X=e.computed(()=>r==null?void 0:r.mode),K=he=>he==null?void 0:he.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),le=e.computed(()=>{let he=[...R.value];if((he==null?void 0:he.length)===0)return _.push("/"),[];const F=Xe(he,E.value);return F.isFlag||(he=F==null?void 0:F.data),he=he==null?void 0:he.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),he}),D=async(he,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(he==null?void 0:he.path),u.setActiveAsideMenu(he),he.isRouter?_.push(he.path):_.push("/"),s("node-click",he,F)},$=async he=>{const F=v.findNodeByPropInTree(le.value,"path",he);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),De.value?b.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(he):(u.setMenuTriggerType("click"),u.setActiveMenuPath(he)),he!=null&&he.startsWith("/")?_.push(he):_.push("/"),x.value++},y=he=>{u.setActiveMenuPath(he)},N=he=>{const F=document.documentElement;he==null||he.forEach(Y=>{F.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const he=sessionStorage.getItem("authority");return he?JSON.parse(he):[]});e.watch(()=>M.value,he=>{he==="browser"?N(bn.browserVerticalMenuClasses):he==="client"?(N(bn.clientHorizontalMenuClasses),N(bn.clientVerticalMenuClasses)):he==="three"&&(N(bn.threeHorizontalMenuClasses),N(bn.threeVerticalMenuClasses))},{immediate:!0});const me=(he,F)=>{function Y(pe){pe==null||pe.forEach(de=>{var oe,te;const Z=(oe=de==null?void 0:de.path)!=null&&oe.startsWith("/")?(te=de==null?void 0:de.path)==null?void 0:te.substring(1):de==null?void 0:de.path;de.show=F==null?void 0:F.some(ie=>ie==null?void 0:ie.includes(Z)),de.children&&Y(de.children)})}return Y(he),he},Xe=(he,F)=>{if(Array.isArray(F)){const Y=Array.from(new Set(F==null?void 0:F.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:me(he,Y),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},st=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),ze=he=>on(he),Ue=e.ref({}),Ee=e.ref([]),V=e.ref({}),ee=e.ref({}),se=he=>{switch(he){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ve=e.ref({}),Ye=he=>{u.setCacheInputMenu({type:st.type,data:he}),u.setIsRefreshMenus(!0)},nt=async(he,F,Y)=>{var pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et,fe,Ve,Qe,Ne;if(F==="create"){let ke=(Y==null?void 0:Y.title)+"(1)",Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),xe=(de=(pe=Me==null?void 0:Me.data)==null?void 0:pe.result)==null?void 0:de[0],B=(Z=xe==null?void 0:xe.value)==null?void 0:Z.pageData;B.compData=(oe=B.compData)==null?void 0:oe.map(Le=>{var Ge;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=mo(Le.contents,(Ge=Y==null?void 0:Y.path)==null?void 0:Ge.split("/"),ke)),Le}),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}});let ge=(ie=(te=Y==null?void 0:Y.path)==null?void 0:te.split("/"))==null?void 0:ie.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}),tt=await Se.getItemData((h=(ot=(Re=Y==null?void 0:Y.path)==null?void 0:Re.split("/"))==null?void 0:ot.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(ge.push(ke),ge=ge==null?void 0:ge.join("/"),(tt==null?void 0:tt.length)>0){let Le=tt==null?void 0:tt[0],Ge=(I=(C=Le==null?void 0:Le.compData)==null?void 0:C.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:I.contents;if(((H=Ge==null?void 0:Ge[0])==null?void 0:H.directiveLabel)==="#isMain"){let Oe=(w=Ge==null?void 0:Ge[0])==null?void 0:w.prop,pt=(q=(S=Le==null?void 0:Le.compData)==null?void 0:S.find(ct=>(ct==null?void 0:ct.key)==="tableContents"))==null?void 0:q.contents,dt;pt==null||pt.forEach(ct=>{var vt,bt;if(ct.length===1)((vt=ct==null?void 0:ct[0])==null?void 0:vt[Oe])===(Y==null?void 0:Y.title)&&(dt=ct==null?void 0:ct[0],dt[Oe]=ke);else{let Bt=(bt=Ge==null?void 0:Ge.filter(_t=>_t!=="操作"))==null?void 0:bt.map(_t=>_t==null?void 0:_t.prop),Pt=ct==null?void 0:ct.filter(_t=>!(_t!=null&&_t.id)),At=Se.getValueToObjectValue(Pt,Bt);At[Oe]=ke,dt=At}}),await v.createInsofDataApi({key:{type:"data",pageKey:(W=(ue=(L=Y==null?void 0:Y.path)==null?void 0:L.split("/"))==null?void 0:ue.filter((ct,vt)=>{var bt,Bt;return vt!==((Bt=(bt=Y==null?void 0:Y.path)==null?void 0:bt.split("/"))==null?void 0:Bt.length)-1}))==null?void 0:W.join("/"),tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ie=f.value)==null?void 0:Ie.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:dt}})}}await Se.newLoadingConstruct(Y==null?void 0:Y.path,ge),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((ce=(ae=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ae.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:ce.join("/")),u.setActiveTopMenuPath((Te=(we=Y==null?void 0:Y.path)==null?void 0:we.split("/"))==null?void 0:Te[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")O.value=Y;else if(F==="delete"){let ke=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),xe=(U=(Be=Me==null?void 0:Me.data)==null?void 0:Be.result)==null?void 0:U[0],B=(Ae=xe==null?void 0:xe.value)==null?void 0:Ae.pageData;if(B.compData=(ye=B.compData)==null?void 0:ye.map(Le=>{var Ge;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=go(Le.contents,(Ge=Y==null?void 0:Y.path)==null?void 0:Ge.split("/"))),Le}),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}}),((it=(Ke=ke==null?void 0:ke.data)==null?void 0:Ke.result)==null?void 0:it.length)>0){let Le=(rt=(He=ke==null?void 0:ke.data)==null?void 0:He.result)==null?void 0:rt.map(Ge=>Ge==null?void 0:Ge.id);(Le==null?void 0:Le.length)>0&&await v.batchDeleteInsofDataApi({ids:Le})}let ge=await Se.getItemData((at=(gt=(Pe=Y==null?void 0:Y.path)==null?void 0:Pe.split("/"))==null?void 0:gt.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:at.join("/"),sessionStorage.getItem("systemKey"),""),tt=[];(ge==null?void 0:ge.length)>0&&(ge==null||ge.forEach(Le=>{var Oe,pt,dt,ct,vt,bt,Bt,Pt,At,_t,Ft;let Ge=(ct=(dt=(pt=(Oe=Le==null?void 0:Le.compData)==null?void 0:Oe.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:pt.contents)==null?void 0:dt[0])==null?void 0:ct.prop;((Pt=(Bt=(bt=(vt=Le==null?void 0:Le.compData)==null?void 0:vt.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:bt.contents)==null?void 0:Bt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(At=Le==null?void 0:Le.compData)==null?void 0:At.find(xt=>(xt==null?void 0:xt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(xt=>{var Ht,Yt,Ot;(xt==null?void 0:xt.length)>1?(xt==null?void 0:xt[1])===(Y==null?void 0:Y.title)&&tt.push((Ht=xt==null?void 0:xt[0])==null?void 0:Ht.id):((Yt=xt==null?void 0:xt[0])==null?void 0:Yt[Ge])===(Y==null?void 0:Y.title)&&tt.push((Ot=xt==null?void 0:xt[0])==null?void 0:Ot.id)}))})),(tt==null?void 0:tt.length)>0&&await v.batchDeleteInsofDataApi({ids:tt}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((Ve=(fe=(et=Y==null?void 0:Y.path)==null?void 0:et.split("/"))==null?void 0:fe.filter((Le,Ge)=>{var Oe,pt;return Ge!==((pt=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:pt.length)-1}))==null?void 0:Ve.join("/")),u.setActiveTopMenuPath((Ne=(Qe=Y==null?void 0:Y.path)==null?void 0:Qe.split("/"))==null?void 0:Ne[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(he,F)=>{var ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;let Y=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(ot=Y==null?void 0:Y.data)==null?void 0:ot.result)==null?void 0:h[0],de=(C=pe==null?void 0:pe.value)==null?void 0:C.pageData;de.compData=(I=de.compData)==null?void 0:I.map(fe=>{var Ve,Qe;return(fe==null?void 0:fe.key)==="menuContents"&&(fe.contents=yo(fe.contents,(Ve=F==null?void 0:F.path)==null?void 0:Ve.split("/"),F==null?void 0:F.title,(Qe=he==null?void 0:he.target)==null?void 0:Qe.value)),fe}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:de}});let Z=(w=(H=F==null?void 0:F.path)==null?void 0:H.split("/"))==null?void 0:w.filter((fe,Ve)=>{var Qe,Ne;return Ve!==((Ne=(Qe=F==null?void 0:F.path)==null?void 0:Qe.split("/"))==null?void 0:Ne.length)-1}),oe=Z==null?void 0:Z.join("/");Z.push((S=he==null?void 0:he.target)==null?void 0:S.value),Z=Z==null?void 0:Z.join("/");let te=await Se.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((P=(W=(ue=(L=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:L.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:ue.contents)==null?void 0:W[0])==null?void 0:P.directiveLabel)==="#isMain"){let fe=(ce=(ae=(G=(ne=(Ie=te==null?void 0:te[0])==null?void 0:Ie.compData)==null?void 0:ne.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:G.contents)==null?void 0:ae[0])==null?void 0:ce.prop,Ve=(Be=(Te=(we=te==null?void 0:te[0])==null?void 0:we.compData)==null?void 0:Te.find(ke=>(ke==null?void 0:ke.key)==="tableContents"))==null?void 0:Be.contents,Qe=(Ke=(ye=(Ae=(U=te==null?void 0:te[0])==null?void 0:U.compData)==null?void 0:Ae.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:ye.contents)==null?void 0:Ke.map(ke=>ke==null?void 0:ke.prop),Ne;if(Ve==null||Ve.forEach(ke=>{var xe;let Me=Se.getValueToObjectValue(ke,Qe);(Me==null?void 0:Me[fe])===F.title&&(Ne=Me,Ne[fe]=(xe=he==null?void 0:he.target)==null?void 0:xe.value)}),Ne){let ke={};for(let xe in Ne)xe!=="id"&&(ke[xe]=Ne==null?void 0:Ne[xe]);let Me=[{id:Ne==null?void 0:Ne.id,value:{tableData:ke}}];await v.batchUpdateInsofDataApi({dataList:Me})}}let ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Re=(He=(it=ie==null?void 0:ie.data)==null?void 0:it.result)==null?void 0:He.map(fe=>({id:fe==null?void 0:fe.id,key:fe==null?void 0:fe.key}));Re=Re==null?void 0:Re.map(fe=>(fe.key.pageKey=Z,fe)),(Re==null?void 0:Re.length)>0&&await v.batchUpdateInsofDataApi({dataList:Re}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Pe=(rt=F==null?void 0:F.path)==null?void 0:rt.split("/"))==null?void 0:Pe.filter((fe,Ve)=>{var Qe,Ne;return Ve!==((Ne=(Qe=F==null?void 0:F.path)==null?void 0:Qe.split("/"))==null?void 0:Ne.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((et=(at=F==null?void 0:F.path)==null?void 0:at.split("/"))==null?void 0:et[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},z=async(he,F)=>{st.type=se(F==null?void 0:F.operateType),await nt(F,st.type,he),ee.value=he,ve.value=F},be=()=>{st.show=!1},Ce=he=>he==null?void 0:he.filter(F=>F.allowInherit),$e=()=>{var Y,pe,de,Z,oe;let he;st.type==="create"&&(he=((Y=ee.value)==null?void 0:Y.path)+"/"+V.value[(pe=V.value)==null?void 0:pe.prop]),st.type==="update"&&(he=(de=ee.value)==null?void 0:de.path);const F={...ee.value,config:Ce((Z=ee.value)==null?void 0:Z.config),children:[],childMenus:[],title:V.value[(oe=V.value)==null?void 0:oe.prop],path:he};console.log("clickSubmitForm",ve.value,ee.value,F),Ye(F),st.show=!1},Fe=he=>{var Y,pe;const F=(Y=he==null?void 0:he.contents)==null?void 0:Y.find(de=>de.key==="formContent");F&&(V.value=(pe=F==null?void 0:F.contents)==null?void 0:pe.reduce((de,Z)=>(de[Z.key]=Z.value,de.prop=Z.key,de),{}))},Ze=e.ref(!1);return{isCollapse:Ze,handleMenuCollapse:()=>{Ze.value=!Ze.value},handleCompChange:Fe,dialogForm:Ue,dialogRenderComps:Ee,getComponents:ze,clickSubmitForm:$e,dialogInfo:st,beforeDialogDestroy:be,clickMenuIcon:z,mode:X,renderMenuList:le,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:N,fixElement:O,onBlur:Q}}}}e.defineComponent(Ir());const $a=v.useLoginState(),{loginUserInfo:An}=v.storeToRefs($a),$t=Kt.useModelComp(v.pinia),Fn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Po,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:$o,routeToChildPath:Xu,payloadTypes:bo,pageMapState:jn,itemExtendData:Vn}=v.storeToRefs($t),zt=Kt.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:ht,platform:jp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(zt),ha=Se.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Se.useOriginalState(v.pinia),{originalPath:eo}=v.storeToRefs(ed),Zt=e.ref(),Ko=Kt.useAuthorityState(v.pinia),Un=e.ref(!0),fn=e.ref(0),Wn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=ht.value)!=null&&i.startsWith("/")?(s=ht.value)==null?void 0:s.substring(1):ht.value;return(n==null?void 0:n.includes(eo.value))||await ud(n)}),td=()=>{$t.setItemGridData([]),$t.setIsEdit("edit"),$t.setSubmitCurStructure(ht.value!=="/平台管理/菜单管理")},ad=()=>{$t.setIsEdit("view"),$t.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),zt.setActiveMenuPath(d)},ro=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},jo=async(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M;try{const De=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),X=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(O=(_=(x=jn.value)==null?void 0:x[ht.value])==null?void 0:_.filter(y=>{var N,E,me;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i&&((me=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:me.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):D=(M=(J=(R=jn.value)==null?void 0:R[ht.value])==null?void 0:J.filter(y=>{var N;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i}))==null?void 0:M.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(De==null?void 0:De.length)>0&&await v.batchAddInsofDataApi({dataList:De}),(X==null?void 0:X.length)>0&&await v.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(De){throw new Error(De)}},od=async n=>{var x,_,O,R,J,M,De,X,K,le;zt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return zt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Po.value)!=null&&$.includes(D))}),d=(x=Po.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(ro(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(ro(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(ro(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(O=en.value)==null?void 0:O.results)==null?void 0:R.length)>0&&((M=(J=en.value)==null?void 0:J.results)!=null&&M.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(De=en.value)==null?void 0:De.results}):(console.log("itemGridData.value",en.value),f.push(await jo(en.value,"gridLayout")))),Vn.value)for(const D in Vn.value)f.push(await jo((X=Vn.value)==null?void 0:X[D],"extend",{target:D,compId:(le=(K=Vn.value)==null?void 0:K[D])==null?void 0:le.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),$t.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),zt.setContentLoading(!1)},Hn=n=>on(n),ft=e.ref([]),rd=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(ht).value;i=i+eo.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(O=>O==null?void 0:O.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),$t.setTableLoading(!1)}},Uo=async n=>{var i,s;try{let r=v.cloneDeep(ht).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+eo.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{$t.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:ht.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),qn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,H,w,S,q,L,ue,W,P,Ie,ne,G,ae,ce,we,Te,Be,U,Ae,ye,Ke,it,He,rt,Pe,gt,at,et;qn.value=null;let r=ht.value;if((d=Zt.value)!=null&&d.compData&&((u=Zt.value)==null?void 0:u.compData)!==ht.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除"){if(typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Uo(n):await Se.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),((O=(_=n==null?void 0:n.column)==null?void 0:_[0])==null?void 0:O.directiveLabel)==="#isMain"){let fe=(M=n==null?void 0:n.singleContent)==null?void 0:M[(J=(R=n==null?void 0:n.column)==null?void 0:R[0])==null?void 0:J.prop],Ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=ht.value+"/"+fe,Ne=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Qe}}),ke=(X=(De=Ve==null?void 0:Ve.data)==null?void 0:De.result)==null?void 0:X[0],Me=(K=ke==null?void 0:ke.value)==null?void 0:K.pageData;if(Me.compData=(le=Me.compData)==null?void 0:le.map(xe=>((xe==null?void 0:xe.key)==="menuContents"&&(xe.contents=go(xe.contents,Qe==null?void 0:Qe.split("/"))),xe)),await v.updateInsofDataApi({id:ke==null?void 0:ke.id,value:{pageData:Me}}),(($=(D=Ne==null?void 0:Ne.data)==null?void 0:D.result)==null?void 0:$.length)>0){let xe=(N=(y=Ne==null?void 0:Ne.data)==null?void 0:y.result)==null?void 0:N.map(B=>B==null?void 0:B.id);(xe==null?void 0:xe.length)>0&&await v.batchDeleteInsofDataApi({ids:xe})}zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((me=(E=Qe==null?void 0:Qe.split("/"))==null?void 0:E.filter((xe,B)=>{var ge;return B!==((ge=Qe==null?void 0:Qe.split("/"))==null?void 0:ge.length)-1}))==null?void 0:me.join("/"))}await $a.setLogRecordAsync({type:"删除",data:n},ht.value)}else if((n==null?void 0:n.buttonName)==="批量删除")if((Xe=n==null?void 0:n.selectItems)!=null&&Xe.every(fe=>typeof(fe==null?void 0:fe.id)=="string")){const fe=(st=n==null?void 0:n.selectItems)==null?void 0:st.map(Ve=>({content:n==null?void 0:n.content,singleContent:Ve,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Uo(fe)}else{const fe=(ze=n==null?void 0:n.selectItems)==null?void 0:ze.map(Ve=>Ve==null?void 0:Ve.id);await v.batchDeleteInsofDataApi({ids:fe}),await $a.setLogRecordAsync({type:"删除",data:fe},ht.value)}else if((n==null?void 0:n.buttonName)==="新增"){let fe={};for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(fe[Qe]=n==null?void 0:n.singleContent[Qe]);const Ve=await Se.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(fe),n==null?void 0:n.column,n,{param:s});if(qn.value={resId:Ve,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((Ee=(Ue=n==null?void 0:n.column)==null?void 0:Ue[0])==null?void 0:Ee.directiveLabel)==="#isMain"&&((ee=(V=n==null?void 0:n.column)==null?void 0:V[0])==null?void 0:ee.directiveColor)!==!0){let Qe=(Ye=n==null?void 0:n.singleContent)==null?void 0:Ye[(ve=(se=n==null?void 0:n.column)==null?void 0:se[0])==null?void 0:ve.prop],Ne=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ke=ht.value+"/"+(Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-3)),Me=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke}}),xe=(Q=(nt=Ne==null?void 0:Ne.data)==null?void 0:nt.result)==null?void 0:Q[0],B=(z=xe==null?void 0:xe.value)==null?void 0:z.pageData;if(B.compData=(be=B.compData)==null?void 0:be.map(ge=>((ge==null?void 0:ge.key)==="menuContents"&&(ge.contents=mo(ge.contents,ke==null?void 0:ke.split("/"),Qe)),ge)),await v.updateInsofDataApi({id:xe==null?void 0:xe.id,value:{pageData:B}}),(($e=(Ce=Me==null?void 0:Me.data)==null?void 0:Ce.result)==null?void 0:$e.length)>0)await Se.newLoadingConstruct(ke,ht.value+"/"+Qe);else{let ge=await v.getInsofDataApi({key:{pageKey:ht.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Ze=(Fe=ge==null?void 0:ge.data)==null?void 0:Fe.result)==null?void 0:Ze.length)>=1?await Se.newLoadingCutFirstConstruct(ht.value+"/",ht.value+"/"+Qe):await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+Qe)}zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((he=(qe=ke==null?void 0:ke.split("/"))==null?void 0:qe.filter((ge,tt)=>{var Le;return tt!==((Le=ke==null?void 0:ke.split("/"))==null?void 0:Le.length)-1}))==null?void 0:he.join("/"))}$t.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((Y=(F=n==null?void 0:n.column)==null?void 0:F[0])==null?void 0:Y.directiveLabel)==="#isMain"&&((de=(pe=n==null?void 0:n.column)==null?void 0:pe[0])==null?void 0:de.directiveColor)!==!0){let fe=(te=n==null?void 0:n.singleContent)==null?void 0:te[(oe=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:oe.prop];if(Se.isNumber((ie=n==null?void 0:n.singleContent)==null?void 0:ie.id)){let Ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=await v.getInsofDataApi({id:(Re=n==null?void 0:n.singleContent)==null?void 0:Re.id}),Ne=(S=(I=(C=(h=(ot=Qe==null?void 0:Qe.data)==null?void 0:ot.result)==null?void 0:h[0])==null?void 0:C.value)==null?void 0:I.tableData)==null?void 0:S[(w=(H=n==null?void 0:n.column)==null?void 0:H[0])==null?void 0:w.prop],ke=ht.value+"/"+Ne,Me=(L=(q=Ve==null?void 0:Ve.data)==null?void 0:q.result)==null?void 0:L[0],xe=(ue=Me==null?void 0:Me.value)==null?void 0:ue.pageData;xe.compData=(W=xe.compData)==null?void 0:W.map(B=>((B==null?void 0:B.key)==="menuContents"&&(B.contents=yo(B.contents,ke==null?void 0:ke.split("/"),Ne,fe)),B)),await v.updateInsofDataApi({id:Me==null?void 0:Me.id,value:{pageData:xe}}),zt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),zt.setIsRefreshMenus(!1),zt.setIsRefreshMenus(!0),zt.setActiveMenuPath((Ie=(P=ke==null?void 0:ke.split("/"))==null?void 0:P.filter((B,ge)=>{var tt;return ge!==((tt=ke==null?void 0:ke.split("/"))==null?void 0:tt.length)-1}))==null?void 0:Ie.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let fe=[],Ve=[],Qe=((G=(ne=n==null?void 0:n.content)==null?void 0:ne[0])==null?void 0:G.id)??"",Ne=s==null?void 0:s.url,ke="",Me="";if(Qe!==""&&((ae=n==null?void 0:n.content)==null?void 0:ae.length)>1&&typeof((we=(ce=n==null?void 0:n.content)==null?void 0:ce[0])==null?void 0:we.id)!="string"){const xe=await v.getInsofDataApi({id:Qe});ke=((Ae=(U=(Be=(Te=xe==null?void 0:xe.data)==null?void 0:Te.result)==null?void 0:Be[0])==null?void 0:U.key)==null?void 0:Ae.tableId)??"",Me=((He=(it=(Ke=(ye=xe==null?void 0:xe.data)==null?void 0:ye.result)==null?void 0:Ke[0])==null?void 0:it.key)==null?void 0:He.pageKey)??""}(rt=n==null?void 0:n.singleContent)==null||rt.forEach(xe=>{let B={};for(let ge in xe)ge!=="id"&&ge!=="index"&&(B[ge]=xe[ge]);typeof(xe==null?void 0:xe.id)=="number"?fe.push({id:xe==null?void 0:xe.id,value:{tableData:B}}):Ve.push({key:{type:i,pageKey:Ne||Me||ht.value,tableId:ke||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:B}})}),(Ve==null?void 0:Ve.length)>0&&await v.batchAddInsofDataApi({dataList:Ve}),(fe==null?void 0:fe.length)>0&&await v.batchUpdateInsofDataApi({dataList:fe})}else{let fe={},Ve=(Pe=n==null?void 0:n.singleContent)==null?void 0:Pe.id;for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(fe[Qe]=n==null?void 0:n.singleContent[Qe]);await Se.fixTableContents(i,r,n==null?void 0:n.index,Ve,sessionStorage.getItem("systemKey"),Object.values(fe),n==null?void 0:n.column,n)}$t.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);$t.setTableLoading(!1),(gt=n==null?void 0:n.column)!=null&&gt.some(fe=>fe==null?void 0:fe.isMainKey)||(ft.value=await Se.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),ft.value=(at=ft.value)==null?void 0:at.filter(fe=>{var Ve;return((Ve=fe==null?void 0:fe.compData)==null?void 0:Ve.length)>0}),ft.value=(et=ft.value)==null?void 0:et.filter(fe=>(fe==null?void 0:fe.comp)!==""),ft.value=Se.getDeepDiffItems(ft.value)),xo.value&&(n==null?void 0:n.buttonName)!=="删除"&&$t.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Fn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Se.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(zt.setActiveMenuPath(null),zt.setActiveMenuPath(i))},Yn=async n=>{ft.value=Se.getDeepDiffItems(n),$t.setItemData(ft.value),$t.setOriginalData(ft.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?Ko.setRouterPageStructure(n):Ko.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>R&&(i=i===""?i+O:i+"/"+O)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>R&&(s=s===""?s+O:s+"/"+O)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue;const i=(_=(x=jn.value)==null?void 0:x[n])==null?void 0:_.filter(Ee=>{var V;return((V=Ee==null?void 0:Ee.key)==null?void 0:V.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(O=i==null?void 0:i.find(Ee=>{var V,ee,se;return(se=(ee=(V=Ee==null?void 0:Ee.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:O.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(De=(M=(J=i==null?void 0:i.find(Ee=>{var V,ee,se;return(se=(ee=(V=Ee==null?void 0:Ee.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:De.compId,d=(X=ft.value)==null?void 0:X.find(Ee=>(Ee==null?void 0:Ee.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(Ee=>(Ee==null?void 0:Ee.prop)===u),g=(Xe=(me=(E=(N=d==null?void 0:d.compData)==null?void 0:N.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:E.contents)==null?void 0:me.find(Ee=>Ee==null?void 0:Ee.isMainKey))==null?void 0:Xe.prop,f=(Ue=(ze=(st=d==null?void 0:d.compData)==null?void 0:st.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:ze.contents)==null?void 0:Ue[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),Kt.ElMessageBox.alert(`超时未提交,【${(i=(n=ht.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=ht.value)!=null&&n.includes(eo.value)))return;const d=(i=ft.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&$t.setLockingPage(ht.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},ko=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=jn.value)==null?void 0:n[ht.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y;if(((r=Zt.value)==null?void 0:r.compData)===ht.value||((d=Gt.value)==null?void 0:d.length)===0)return;zt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:u.filter(pe=>{var de,Z;return((de=pe==null?void 0:pe.key)==null?void 0:de.pageKey)!=="menu"&&((Z=pe==null?void 0:pe.key)==null?void 0:Z.pageKey)!=="secret"}))==null||b.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),ft.value=await Se.getItemData(ht.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=ft.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Zt.value=(f=ft.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((x=Zt.value)==null?void 0:x.compData)===ht.value){let pe=(_=ht.value)==null?void 0:_.split("/").map(de=>({value:de.trim()}));pe=[...pe,...Gt.value??[]]}else{let pe=(R=(O=Zt.value)==null?void 0:O.compData)==null?void 0:R.split("/").map(de=>({value:de.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let de=await Se.getItemData((J=Zt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);de=de==null?void 0:de.filter(ie=>{var Re,ot,h;return Array.isArray(ie==null?void 0:ie.compData)&&((h=(ot=(Re=ie==null?void 0:ie.compData)==null?void 0:Re.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:ot.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Z=(le=(K=(X=(De=(M=de==null?void 0:de[0])==null?void 0:M.compData)==null?void 0:De.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"))==null?void 0:le.prop,oe=(N=(y=($=(D=de==null?void 0:de[0])==null?void 0:D.compData)==null?void 0:$.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:y.contents)==null?void 0:N.findIndex(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"),te=(st=(Xe=(me=(E=de==null?void 0:de[0])==null?void 0:E.compData)==null?void 0:me.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:Xe.contents)==null?void 0:st.map(ie=>{var Re;return(ie==null?void 0:ie.length)>1?ie==null?void 0:ie[oe+1]:(Re=ie==null?void 0:ie[0])==null?void 0:Re[Z]});if(te=te==null?void 0:te.map(ie=>({label:ie,value:ie})),(ze=Gt.value)==null||ze.length,((Ee=(Ue=Gt.value)==null?void 0:Ue[0])==null?void 0:Ee.value)!==""){let ie=await Se.getItemData(ht.value+"/"+((ee=(V=Gt.value)==null?void 0:V[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);ie||(await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((ve=(se=Gt.value)==null?void 0:se[0])==null?void 0:ve.value)),ie=await Se.getItemData(ht.value+"/"+((nt=(Ye=Gt.value)==null?void 0:Ye[0])==null?void 0:nt.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),ft.value=ie}}(pe==null?void 0:pe.length)>0&&((z=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:z.value)===""&&(ft.value=[])}ft.value=(be=ft.value)==null?void 0:be.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!ft.value){let pe=(Fe=($e=(Ce=ht.value)==null?void 0:Ce.split("/"))==null?void 0:$e.filter((de,Z)=>{var oe,te;return Z!==((te=(oe=ht.value)==null?void 0:oe.split("/"))==null?void 0:te.length)-1}))==null?void 0:Fe.join("/");ft.value=await Se.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Ze=ht.value)==null?void 0:Ze.split("/"))==null?void 0:F[((he=(qe=ht.value)==null?void 0:qe.split("/"))==null?void 0:he.length)-1]}await $a.setLogRecordAsync({type:"查询",data:ft.value},ht.value),s!==""&&(ft.value=(Y=ft.value)==null?void 0:Y.map(pe=>{var de;return pe!=null&&pe.isShow&&(pe.compData=(de=pe==null?void 0:pe.compData)==null?void 0:de.map(Z=>{var oe,te,ie,Re,ot;if((Z==null?void 0:Z.key)==="tableContents"){let h=[],C="";C=(Re=(ie=(te=(oe=pe==null?void 0:pe.compData)==null?void 0:oe.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:te.contents)==null?void 0:ie[0])==null?void 0:Re.prop,h=(ot=Z.contents)==null?void 0:ot.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Z.contents=h}return Z})),pe})),ft.value=Se.getDeepDiffItems(ft.value),zt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[ht.value,Gu.value],async n=>{var u,b,g,f,x,_,O,R,J,M,De,X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue,Ee,V,ee,se,ve,Ye,nt,Q,z,be,Ce,$e,Fe,Ze,qe,he,F,Y,pe,de,Z,oe,te,ie,Re,ot;if(!ht.value)return;$t.setLockingPage(""),ft.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Un.value=!1,Fn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Wn.value=r,s){zt.setContentLoading(!0),sessionStorage.setItem("pageKey",ht.value),ha.setSelectTitle([]),ft.value=await Se.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=ft.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Zt.value=(O=ft.value)==null?void 0:O.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Zt.value)!=null&&R.compData)){let I=hd(Zu.value,(J=ht.value)==null?void 0:J.split("/")),H=await Se.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);H!=null&&H.find(w=>(w==null?void 0:w.comp)==="")?h=(De=(M=H==null?void 0:H.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:M.compData)==null?void 0:De.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((X=Zt.value)==null?void 0:X.compData)===ht.value){let I=(K=ht.value)==null?void 0:K.split("/").map(H=>({value:H.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],H=(D=(le=Zt.value)==null?void 0:le.compData)==null?void 0:D.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!H||(H==null?void 0:H.length)===0)H=h;else{let q=await Se.getItemData(($=Zt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);q=q==null?void 0:q.filter(P=>{var Ie,ne,G;return Array.isArray(P==null?void 0:P.compData)&&((G=(ne=(Ie=P==null?void 0:P.compData)==null?void 0:Ie.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ne.contents)==null?void 0:G.find(ae=>(ae==null?void 0:ae.directiveLabel)==="#isMain"))});let L=(Xe=(me=(E=(N=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:me.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Xe.prop,ue=(Ee=(Ue=(ze=(st=q==null?void 0:q[0])==null?void 0:st.compData)==null?void 0:ze.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:Ue.contents)==null?void 0:Ee.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),W=(ve=(se=(ee=(V=q==null?void 0:q[0])==null?void 0:V.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(P=>{var Ie;return(P==null?void 0:P.length)>1?P==null?void 0:P[ue+1]:(Ie=P==null?void 0:P[0])==null?void 0:Ie[L]});if(W=W==null?void 0:W.map(P=>({label:P,value:P})),((Ye=Gt.value)==null?void 0:Ye.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:W,parentContent:(nt=Zt.value)==null?void 0:nt.compData}]),((z=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:z.value)!==""){let P=await Se.getItemData(ht.value+"/"+((Ce=(be=Gt.value)==null?void 0:be[0])==null?void 0:Ce.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Se.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((Fe=($e=Gt.value)==null?void 0:$e[0])==null?void 0:Fe.value)),P=await Se.getItemData(ht.value+"/"+((qe=(Ze=Gt.value)==null?void 0:Ze[0])==null?void 0:qe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),ft.value=P}}(H==null?void 0:H.length)>0&&((F=(he=Gt.value)==null?void 0:he[0])==null?void 0:F.value)===""&&(ft.value=[]),I=[...I,...H??[]],I=[...I,...Gt.value??[]];let w=(Y=ht.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(I!=null&&I.find(L=>(L==null?void 0:L.value)===(q==null?void 0:q.value))));I=[...I,...S],ha.setSelectTitle(I)}ft.value=(pe=ft.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!ft.value){let I=(Z=(de=s==null?void 0:s.split("/"))==null?void 0:de.filter((H,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Z.join("/");ft.value=await Se.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(te=s==null?void 0:s.split("/"))==null?void 0:te[((oe=s==null?void 0:s.split("/"))==null?void 0:oe.length)-1]}await $a.setLogRecordAsync({type:"查询",data:ft.value},ht.value),C!==""&&(ft.value=(ie=ft.value)==null?void 0:ie.map(I=>{var H;return I!=null&&I.isShow&&(I.compData=(H=I==null?void 0:I.compData)==null?void 0:H.map(w=>{var S,q,L,ue,W;if((w==null?void 0:w.key)==="tableContents"){let P=[],Ie="";Ie=(ue=(L=(q=(S=I==null?void 0:I.compData)==null?void 0:S.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:q.contents)==null?void 0:L[0])==null?void 0:ue.prop,P=(W=w.contents)==null?void 0:W.filter(ne=>(ne==null?void 0:ne[Ie])===C||(ne==null?void 0:ne[1])===C),w.contents=P}return w})),I})),ft.value=Se.getDeepDiffItems(ft.value),await cd(ft.value),Or(),pd(s),ko.value=(Re=ft.value)==null?void 0:Re.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),$t.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),$t.setItemData(ft.value),$t.setOriginalData(ft.value),$t.setCurStructureCompIds((ot=ft.value)==null?void 0:ot.map(I=>I==null?void 0:I.id)),$t.setRefreshCurStructure(!1),zt.setChildMenu(""),zt.setContentLoading(!1),$t.setTableLoading(!1),Fn.value=!1}else ft.value=[],Fn.value=!1;e.nextTick(()=>{fn.value=fn.value++,Un.value=!0})},{immediate:!0});e.watch(()=>$o.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,O,R,J,M;if($o.value){let De=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:bo.value})).data.result)==null?void 0:n.filter(y=>{var N,E;return((N=y==null?void 0:y.key)==null?void 0:N.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{De[y.key.pageKey]?De[y.key.pageKey]=[...De[y.key.pageKey],y]:De[y.key.pageKey]=[y]});let K=ht.value;(s=Zt.value)!=null&&s.compData&&((r=Zt.value)==null?void 0:r.compData)!==ht.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(b=ht.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=ht.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=ht.value)==null?void 0:_[0];let D=await Se.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!ft.value){let y=(R=(O=le==null?void 0:le.split("/"))==null?void 0:O.filter((N,E)=>{var me;return E!==((me=le==null?void 0:le.split("/"))==null?void 0:me.length)-1}))==null?void 0:R.join("/");D=await Se.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,De),$=(M=le==null?void 0:le.split("/"))==null?void 0:M[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var N;return y!=null&&y.isShow&&(y.compData=(N=y==null?void 0:y.compData)==null?void 0:N.map(E=>{var me,Xe,st,ze,Ue;if((E==null?void 0:E.key)==="tableContents"){let Ee=[],V="";V=(ze=(st=(Xe=(me=y==null?void 0:y.compData)==null?void 0:me.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Xe.contents)==null?void 0:st[0])==null?void 0:ze.prop,Ee=(Ue=E.contents)==null?void 0:Ue.filter(ee=>(ee==null?void 0:ee[V])===$||(ee==null?void 0:ee[1])===$),E.contents=Ee}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),ft.value=Se.getDeepDiffItems(D),$t.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,O;zt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=An.value)==null?void 0:d.account)||((u=An.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=An.value)==null?void 0:b.account)||((g=An.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(O=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:O.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await $a.setLogRecordAsync({type:"删除",data:s},ht.value)),zt.setActiveMenuPath(Xu.value),ft.value=null,$t.setRouteToChildPath(""),zt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&zt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=ft.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),Lr=(n,i)=>{var f,x,_,O,R;const s=i?n:n-2,r=(f=ft.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),b=u===-1?0:u,g=(R=(O=r==null?void 0:r.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=Lr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=ft.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=Lr(i);g?(un.index=i,un.comp=(u=ft.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=ft.value)==null?void 0:b[n]},xo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>xo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let O=0;const R=[];if(x=x.map(J=>{const M=J.span;return M?(J.span=Number(M),O=O+J.span):R.push(J),J}),O<24){const J=Math.floor((24-O)/_);R.forEach(M=>{M.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const O=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(M,De)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(M.comp)),{key:e.unref(fn),compName:M.name,index:(M==null?void 0:M.id)??De,height:(X=u.value)==null?void 0:X.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=Lt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{De()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),O=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),J=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:me}=E;return me==="baseConfig"});return N==null?void 0:N.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:me}=E;return me==="children"});return N==null?void 0:N.contents}),De=()=>{var y;d.value=R.value||{},x.value=(M==null?void 0:M.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(N=>{var me;const{prop:E}=N;return N.value=(me=J.value)==null?void 0:me[E],N})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;x.value=(M==null?void 0:M.value)||[],_.value=(y=M.value)==null?void 0:y.map(N=>O(N))},{immediate:!0});const X=(y,N)=>{const E=v.cloneDeep(M==null?void 0:M.value);E[N].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),le=(y,N,E)=>{if(!y)return;const me=v.cloneDeep(M==null?void 0:M.value);me[E]&&(me[E].compData=y,x.value=me,r("change",$(),!0))},D=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let N=v.cloneDeep(M==null?void 0:M.value);N=N==null?void 0:N.filter((E,me)=>y!==me),x.value=N,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,N)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[N[1]||(N[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Vt.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:N[0]||(N[0]=me=>f(me))},null,8,["rowContents"])])]),e.createVNode(mr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:me,index:Xe})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(me.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(st=>D(Xe),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:me,index:Xe})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:_.value[Xe],key:Xe,isEnableWrap:!0,onChange:st=>X(st,Xe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(me.comp+"Operate")),{itemContents:me==null?void 0:me.compData,originalItemContents:me.compData,onChange:st=>le(st,me,Xe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=Lt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Wo;Od&&((Wo=window==null?void 0:window.navigator)!=null&&Wo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Md)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Ho(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Ld(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const wn=new Set,$r=new WeakMap;function Fd(){wn.forEach(n=>{n(...$r.get(n))}),wn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!wn.has(n)&&(wn.add(n),wn.size===1&&Promise.resolve().then(Fd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Dn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Dn(n,i);)i.y--}let d;for(;d=Dn(n,i);)i.y=d.y+d.h;return i}function Kd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Dn(s,u);)u.y++}return n}function qo(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Dn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let O=0,R=_.length;O<R;O++){const J=_[O];J.moved||i.y>J.y&&i.y-J.y>J.h/4||(J.static?n=Go(n,J,i,d):n=Go(n,i,J,d))}return n}function Go(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Dn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function jd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Xo(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Yo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,O=x.length;_<O;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(Kd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Jo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var xn={exports:{}},tp=xn.exports,Zo;function ap(){return Zo||(Zo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,De(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=De(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&O(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function O(a,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},O(a,t)}function R(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function J(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},M.apply(this,arguments)}function De(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function $(a){return X(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},N=function(a){return typeof a=="function"},E={window:function(a){return a===le||X(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:N,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&N(a.splice)}};function me(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Xe(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var st={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=st.draggable,t.map.drag=st,t.methodDict.drag="draggable",l.actions.drag=st.defaults},listeners:{"interactions:before-action-move":me,"interactions:action-resume":me,"interactions:action-move":Xe,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:me,move:Xe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},ze=st,Ue={init:function(a){var t=a;Ue.document=t.document,Ue.DocumentFragment=t.DocumentFragment||Ee,Ue.SVGElement=t.SVGElement||Ee,Ue.SVGSVGElement=t.SVGSVGElement||Ee,Ue.SVGElementInstance=t.SVGElementInstance||Ee,Ue.Element=t.Element||Ee,Ue.HTMLElement=t.HTMLElement||Ue.Element,Ue.Event=t.Event,Ue.Touch=t.Touch||Ee,Ue.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ee(){}var V=Ue,ee={init:function(a){var t=V.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!V.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?V.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ee.wheelEvent=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function ve(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ye(a,t){for(;E.element(a);){if(Q(a,t))return a;a=nt(a)}return null}function nt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Q(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var z=function(a){return a.parentNode||a.host};function be(a,t){for(var o,l=[],c=a;(o=z(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function Ce(a,t,o){for(;E.element(a);){if(Q(a,t))return!0;if((a=nt(a))===o)return Q(a,t)}return!1}function $e(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof V.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ze(a){var t,o=Fe(a);if(!se.isIOS7&&o){var l={x:(t=(t=$(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function qe(a){for(var t=[];a;)t.push(a),a=nt(a);return t}function he(a){return!!E.string(a)&&(V.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?nt(o):a==="self"?t.getRect(o):Ye(o,a)}function pe(a,t,o,l){var c=a;return E.string(c)?c=Y(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Ze(c)),c}function de(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Z(a){return!a||"x"in a&&"y"in a||((a=F({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function oe(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function te(a,t,o){var l=o&&a.options[o];return de(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function ie(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Re(a)),E.array(a))return a.forEach(function(T){return ie(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];ie(a,m,o,l)}else if(E.object(t))for(var k in t)ie(Re(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Re(a){return a.trim().split(/ +/)}var ot=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function H(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof V.Event||a instanceof V.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function q(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function L(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function ue(a,t,o){var l=t.length>1?P(t):t[0];q(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function W(a){var t=[];return E.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ie(a){if(!a.length)return null;var t=W(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ot(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ae(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof V.Touch?"touch":"mouse"}function ce(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[$e(t?t[0]:a.target),$e(a.currentTarget)]}var we=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(we.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Te=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Be=function(a){return Te([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ae=function(a,t){return a[U(a,t)]},ye=function(a){x(o,a);var t=J(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,j=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=j,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=U(p,function(T){var j=T.dropzone,A=T.element;return j===l.dropzone&&A===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(we);function Ke(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function it(a,t){for(var o=function(p,m){for(var k=[],T=0,j=p.interactables.list;T<j.length;T++){var A=j[T];if(A.options.drop.enabled){var re=A.options.drop.accept;if(!(E.element(re)&&re!==m||E.string(re)&&!Q(m,re)||E.func(re)&&!re({dropzone:A,draggableElement:m})))for(var _e=0,We=A.getAllElements();_e<We.length;_e++){var je=We[_e];je!==m&&k.push({dropzone:A,element:je,rect:A.getRect(je)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function He(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var j=T[k],A=j.dropzone,re=j.element,_e=j.rect,We=A.dropCheck(t,o,c,p,re,_e);m.push(We?re:null)}var je=function(Je){for(var ut,lt,mt,Dt=[],Tt=0;Tt<Je.length;Tt++){var kt=Je[Tt],Ct=Je[ut];if(kt&&Tt!==ut)if(Ct){var ta=z(kt),jt=z(Ct);if(ta!==kt.ownerDocument)if(jt!==kt.ownerDocument)if(ta!==jt){Dt=Dt.length?Dt:be(Ct);var da=void 0;if(Ct instanceof V.HTMLElement&&kt instanceof V.SVGElement&&!(kt instanceof V.SVGSVGElement)){if(kt===jt)continue;da=kt.ownerSVGElement}else da=kt;for(var ya=be(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var Nn=[ya[Sa-1],ya[Sa],Dt[Sa]];if(Nn[0])for(var yn=Nn[0].lastChild;yn;){if(yn===Nn[1]){ut=Tt,Dt=ya;break}if(yn===Nn[2])break;yn=yn.previousSibling}}else mt=Ct,(parseInt($(lt=kt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt($(mt).getComputedStyle(mt).zIndex,10)||0)&&(ut=Tt);else ut=Tt}else ut=Tt}return ut}(m);return l.activeDrops[je]||null}function rt(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ye(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ye(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ye(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ye(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ye(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ye(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Pe(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Ke(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=it(t,o.element));var m=l,k=He(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=rt(o,0,m)}}var at={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(ze),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=ie(k.listeners),j=Object.keys(T).reduce(function(re,_e){return re[/^(enter|leave)/.test(_e)?"drag".concat(_e):/^(activate|deactivate|move)/.test(_e)?"drop".concat(_e):_e]=T[_e],re},{}),A=m.options.drop.listeners;A&&m.off(A),m.on(j),m.options.drop.listeners=j}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,j,A){return function(re,_e,We,je,Je,ut,lt){var mt=!1;if(!(lt=lt||re.getRect(ut)))return!!re.options.drop.checker&&re.options.drop.checker(_e,We,mt,re,ut,je,Je);var Dt=re.options.drop.overlap;if(Dt==="pointer"){var Tt=te(je,Je,"drag"),kt=q(_e);kt.x+=Tt.x,kt.y+=Tt.y;var Ct=kt.x>lt.left&&kt.x<lt.right,ta=kt.y>lt.top&&kt.y<lt.bottom;mt=Ct&&ta}var jt=je.getRect(Je);if(jt&&Dt==="center"){var da=jt.left+jt.width/2,ya=jt.top+jt.height/2;mt=da>=lt.left&&da<=lt.right&&ya>=lt.top&&ya<=lt.bottom}return jt&&E.number(Dt)&&(mt=Math.max(0,Math.min(lt.right,jt.right)-Math.max(lt.left,jt.left))*Math.max(0,Math.min(lt.bottom,jt.bottom)-Math.max(lt.top,jt.top))/(jt.width*jt.height)>=Dt),re.options.drop.checker&&(mt=re.options.drop.checker(_e,We,mt,re,ut,je,Je)),mt}(this,p,m,k,T,j,A)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=at.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=it(t,o.element),c.events=rt(o,0,l),c.events.activate&&(Ke(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Pe(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Pe(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:it,getDrop:He,getDropEvents:rt,fireDropEvents:Pe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},et=at;function fe(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,k),o.box=Ie(c),o.scale=1,o.ds=0,o.angle=G(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,k),o.box=Ie(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Ve={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ve,t.methodDict.gesture="gesturable",l.actions.gesture=Ve.defaults},listeners:{"interactions:action-start":fe,"interactions:action-move":fe,"interactions:action-end":fe,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},Qe=Ve;function Ne(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=k>=0?p.left:p.right;return o.x<j+m}if(a==="top"){var A=T>=0?p.top:p.bottom;return o.y<A+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:Ce(l,t,c))}function ke(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var Me,xe,B={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;B.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),B.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=B,t.methodDict.resize="resizable",c.actions.resize=B.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),ke(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,j=T.start,A=T.corrected,re=T.delta,_e=T.previous;if(F(_e,A),m){if(F(A,k),p==="reposition"){if(A.top>A.bottom){var We=A.top;A.top=A.bottom,A.bottom=We}if(A.left>A.right){var je=A.left;A.left=A.right,A.right=je}}}else A.top=Math.min(k.top,j.bottom),A.bottom=Math.max(k.bottom,j.top),A.left=Math.min(k.left,j.right),A.right=Math.max(k.right,j.left);for(var Je in A.width=A.right-A.left,A.height=A.bottom-A.top,A)re[Je]=A[Je]-_e[Je];c.edges=l.prepared.edges,c.rect=A,c.deltaRect=re}})(a),ke(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var j in T)T[j]=Ne(j,k.edges[j],m,t._latestPointer.eventTarget,l,c,k.margin||B.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var A=k.axis!=="y"&&m.x>c.right-B.defaultMargin,re=k.axis!=="x"&&m.y>c.bottom-B.defaultMargin;(A||re)&&(a.action={name:"resize",axes:(A?"x":"")+(re?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=B.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var j=T[k];t[j]&&(m+=j)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},ge=B,tt={id:"actions",install:function(a){a.usePlugin(Qe),a.usePlugin(ge),a.usePlugin(ze),a.usePlugin(et)}},Le=0,Ge={request:function(a){return Me(a)},cancel:function(a){return xe(a)},init:function(a){if(Me=a.requestAnimationFrame,xe=a.cancelAnimationFrame,!Me)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];Me=a["".concat(l,"RequestAnimationFrame")],xe=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}Me=Me&&Me.bind(a),xe=xe&&xe.bind(a),Me||(Me=function(c){var p=Date.now(),m=Math.max(0,16-(p-Le)),k=a.setTimeout(function(){c(p+m)},m);return Le=p+m,k},xe=function(c){return clearTimeout(c)})}},Oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){Oe.isScrolling=!0,Ge.cancel(Oe.i),a.autoScroll=Oe,Oe.interaction=a,Oe.prevTime=Oe.now(),Oe.i=Ge.request(Oe.scroll)},stop:function(){Oe.isScrolling=!1,Oe.interaction&&(Oe.interaction.autoScroll=null),Ge.cancel(Oe.i)},scroll:function(){var a=Oe.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=pt(c.container,t,o),m=Oe.now(),k=(m-Oe.prevTime)/1e3,T=c.speed*k;if(T>=1){var j={x:Oe.x*T,y:Oe.y*T};if(j.x||j.y){var A=dt(p);E.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var re=dt(p),_e={x:re.x-A.x,y:re.y-A.y};(_e.x||_e.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:_e,interaction:a,container:p})}Oe.prevTime=m}Oe.isScrolling&&(Ge.cancel(Oe.i),Oe.i=Ge.request(Oe.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Oe.check(t.interactable,t.prepared.name))if(t.simulation)Oe.x=Oe.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,j=t.prepared.name,A=k.options[j].autoScroll,re=pt(A.container,k,T);if(E.window(re))m=o.clientX<Oe.margin,l=o.clientY<Oe.margin,c=o.clientX>re.innerWidth-Oe.margin,p=o.clientY>re.innerHeight-Oe.margin;else{var _e=Fe(re);m=o.clientX<_e.left+Oe.margin,l=o.clientY<_e.top+Oe.margin,c=o.clientX>_e.right-Oe.margin,p=o.clientY>_e.bottom-Oe.margin}Oe.x=c?1:m?-1:0,Oe.y=p?1:l?-1:0,Oe.isScrolling||(Oe.margin=A.margin,Oe.speed=A.speed,Oe.start(t))}}};function pt(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function dt(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var ct={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Oe,Oe.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Oe.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Oe.stop(),Oe.interaction&&(Oe.interaction=null)},"interactions:stop":Oe.stop,"interactions:action-move":function(a){return Oe.onInteractionMove(a)}}},vt=ct;function bt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Bt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Pt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function At(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,j,A,re){var _e=k.getRect(A),We=T.buttons||{0:1,1:4,3:8,4:16}[T.button],je={action:null,interactable:k,interaction:j,element:A,rect:_e,buttons:We};return re.fire("auto-start:check",je),je.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=bt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=bt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=At,t.prototype.styleCursor=Pt}};function Ft(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function xt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var j=l[k],A=c[k],re=j.getAction(t,o,a,A);if(re){var _e=Ft(re,j,A,p,m);if(_e)return{action:_e,interactable:j,element:A}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(A){p.push(A),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var j=xt(a,t,o,p,m,l,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;k=nt(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Bt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Va(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,j=0,A=0;if(!(p&&m&&k))return!1;for(var re=0,_e=l.interactions.list;re<_e.length;re++){var We=_e[re],je=We.prepared.name;if(We.interacting()&&(++T>=k||We.interactable===a&&((j+=je===o.name?1:0)>=p||We.element===t&&(A++,je===o.name&&A>=m))))return!1}return k>0}function Aa(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Va(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var Ka={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Aa(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Va(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Aa,withinInteractionLimit:Ot,validateAction:Ft},Da=Ka,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,j=T.startAxis,A=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?A[0]:T.lockAxis,A!=="xy"&&j!=="xy"&&j!==A){o.prepared.name=null;for(var re=l,_e=function(je){if(je!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&je.testIgnoreAllow(Je,re,l)){var ut=je.getAction(o.downPointer,o.downEvent,o,re);if(ut&&ut.name==="drag"&&function(lt,mt){if(!mt)return!1;var Dt=mt.options.drag.startAxis;return lt==="xy"||Dt==="xy"||Dt===lt}(A,je)&&Da.validateAction(ut,je,re,l,t))return je}}};E.element(re);){var We=t.interactables.forEachMatch(re,_e);if(We){o.prepared.name="drag",o.interactable=We,o.element=re;break}re=nt(re)}}}}}};function Ca(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(Da),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=Ca(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(ja)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Oa={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Q(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||ve(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=Be(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(j){var A=j.interactable.options[j.prepared.name],re=A.modifiers;return re&&re.length?re:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(_e){var We=A[_e];return We&&We.enabled&&{options:We,methods:We._methods}}).filter(function(_e){return!!_e})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),j=0;j<k.length;j++){var A,re=k[j],_e=re.options,We=F({},t.coords),je=null;(A=re.methods)!=null&&A.set&&this.shouldDo(_e,l,o)&&(t.state=re,je=re.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-We.x,y:t.coords.y-We.y})),T.eventProps.push(je)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ut=this.result.rect;if(Je&&ut){var lt=T.rect.left!==ut.left||T.rect.right!==ut.right||T.rect.top!==ut.top||T.rect.bottom!==ut.bottom;T.changed=lt||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var j=0,A=[[p,k],[c,T]];j<A.length;j++){var re=A[j],_e=re[0],We=re[1];_e.page.x+=We.x,_e.page.y+=We.y,_e.client.x+=We.x,_e.client.y+=We.y}var je=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=je.left,Je.right+=je.right,Je.top+=je.top,Je.bottom+=je.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,j=k.methods,A=j.beforeEnd&&j.beforeEnd(t);if(A)return this.endResult=A,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,j=k.rectDelta,A=0,re=[[l.start,m],[l.cur,T]];A<re.length;A++){var _e=re[A],We=_e[0],je=_e[1];We.page.x-=je.x,We.page.y-=je.y,We.client.x-=je.x,We.client.y-=je.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return fa(o)}),this.result=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},wt=Xa,Jt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T,j){var A;u(this,o),(A=t.call(this,l)).relatedTarget=null,A.screenX=void 0,A.screenY=void 0,A.button=void 0,A.buttons=void 0,A.ctrlKey=void 0,A.shiftKey=void 0,A.altKey=void 0,A.metaKey=void 0,A.page=void 0,A.client=void 0,A.delta=void 0,A.rect=void 0,A.x0=void 0,A.y0=void 0,A.t0=void 0,A.dt=void 0,A.duration=void 0,A.clientX0=void 0,A.clientY0=void 0,A.velocity=void 0,A.speed=void 0,A.swipe=void 0,A.axes=void 0,A.preEnd=void 0,k=k||l.element;var re=l.interactable,_e=(re&&re.options||Jt).deltaSource,We=te(re,k,p),je=m==="start",Je=m==="end",ut=je?R(A):l.prevEvent,lt=je?l.coords.start:Je?{page:ut.page,client:ut.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return A.page=F({},lt.page),A.client=F({},lt.client),A.rect=F({},l.rect),A.timeStamp=lt.timeStamp,Je||(A.page.x-=We.x,A.page.y-=We.y,A.client.x-=We.x,A.client.y-=We.y),A.ctrlKey=c.ctrlKey,A.altKey=c.altKey,A.shiftKey=c.shiftKey,A.metaKey=c.metaKey,A.button=c.button,A.buttons=c.buttons,A.target=k,A.currentTarget=k,A.preEnd=T,A.type=j||p+(m||""),A.interactable=re,A.t0=je?l.pointers[l.pointers.length-1].downTime:ut.t0,A.x0=l.coords.start.page.x-We.x,A.y0=l.coords.start.page.y-We.y,A.clientX0=l.coords.start.client.x-We.x,A.clientY0=l.coords.start.client.y-We.y,A.delta=je||Je?{x:0,y:0}:{x:A[_e].x-ut[_e].x,y:A[_e].y-ut[_e].y},A.dt=l.coords.delta.timeStamp,A.duration=A.timeStamp-A.t0,A.velocity=F({},l.coords.velocity[_e]),A.speed=ot(A.velocity.x,A.velocity.y),A.swipe=Je||m==="inertiastart"?A.getSwipe():null,A}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(we);Object.defineProperties(yt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var vn=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=bt(function(A){this.move(A)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(A){Object.defineProperty(o._proxy,A,{get:function(){return p[A]}})};for(var k in Mt)m(k);var T=function(A){Object.defineProperty(o._proxy,A,{value:function(){return p[A].apply(p,arguments)}})};for(var j in ca)T(j);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Bt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ot(c,p)>this.pointerMoveTolerance);var k,T,j,A=this.getPointerIndex(t),re={pointer:t,pointerIndex:A,pointerInfo:this.pointers[A],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,j=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/j,k.page.y=T.page.y/j,k.client.x=T.client.x/j,k.client.y=T.client.y/j,k.timeStamp=j),this._scopeFire("interactions:move",re),m||this.simulation||(this.interacting()&&(re.type=null,this.move(re)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||H(this.coords.delta),(t=F({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=L(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:U(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=L(t),j=this.getPointerIndex(t),A=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),A?A.pointer=t:(A=new vn(T,t,o,null,null),j=this.pointers.length,this.pointers.push(A)),ue(this.coords.cur,this.pointers.map(function(re){return re.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,A.downTime=this.coords.cur.timeStamp,A.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:A,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new yt(this,t,this.prepared.name,o,this.element,l,c)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(oe(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return St(a.coords.cur,t),St(a.coords.delta,t),oe(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Ma(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function St(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Ma},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(St(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ma,"interactions:before-action-move":ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Qt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=qt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=Nt(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ot(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,l=Nt(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ge.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,j=this.interaction,A=Nt(j).resistance,re=(j._now()-this.t0)/1e3;if(re<this.te){var _e,We=1-(Math.exp(-A*re)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,_e={x:Wt(k=We,t,l,p),y:Wt(k,o,c,m)}):_e={x:this.targetOffset.x*We,y:this.targetOffset.y*We};var je={x:_e.x-this.currentOffset.x,y:_e.y-this.currentOffset.y};this.currentOffset.x+=je.x,this.currentOffset.y+=je.y,j.offsetBy(je),j.move(),this.onNextFrame(function(){return T.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=Nt(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ge.cancel(this.timeout)}}]),a}();function Nt(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=nt(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=ie(t,o);for(t in l)this.types[t]=Te(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=ie(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function La(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var En={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(A,re,_e,We,je){var Je=La(je);if(!l[_e]){l[_e]=[];for(var ut=0;ut<c.length;ut++){var lt=c[ut];m(lt,_e,T),m(lt,_e,j,!0)}}var mt=l[_e],Dt=Ae(mt,function(Tt){return Tt.selector===A&&Tt.context===re});Dt||(Dt={selector:A,context:re,listeners:[]},mt.push(Dt)),Dt.listeners.push({func:We,options:Je})},removeDelegate:function(A,re,_e,We,je){var Je,ut=La(je),lt=l[_e],mt=!1;if(lt)for(Je=lt.length-1;Je>=0;Je--){var Dt=lt[Je];if(Dt.selector===A&&Dt.context===re){for(var Tt=Dt.listeners,kt=Tt.length-1;kt>=0;kt--){var Ct=Tt[kt];if(Ct.func===We&&Ja(Ct.options,ut)){Tt.splice(kt,1),Tt.length||(lt.splice(Je,1),k(re,_e,T),k(re,_e,j,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:j,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(A,re,_e,We){if(A.addEventListener){var je=La(We),Je=Ae(o,function(ut){return ut.eventTarget===A});Je||(Je={eventTarget:A,events:{}},o.push(Je)),Je.events[re]||(Je.events[re]=[]),Ae(Je.events[re],function(ut){return ut.func===_e&&Ja(ut.options,je)})||(A.addEventListener(re,_e,p.supportsOptions?je:je.capture),Je.events[re].push({func:_e,options:je}))}}function k(A,re,_e,We){if(A.addEventListener&&A.removeEventListener){var je=U(o,function(ta){return ta.eventTarget===A}),Je=o[je];if(Je&&Je.events)if(re!=="all"){var ut=!1,lt=Je.events[re];if(lt){if(_e==="all"){for(var mt=lt.length-1;mt>=0;mt--){var Dt=lt[mt];k(A,re,Dt.func,Dt.options)}return}for(var Tt=La(We),kt=0;kt<lt.length;kt++){var Ct=lt[kt];if(Ct.func===_e&&Ja(Ct.options,Tt)){A.removeEventListener(re,_e,p.supportsOptions?Tt:Tt.capture),lt.splice(kt,1),lt.length===0&&(delete Je.events[re],ut=!0);break}}}ut&&!Object.keys(Je.events).length&&o.splice(je,1)}else for(re in Je.events)Je.events.hasOwnProperty(re)&&k(A,re,"all")}}function T(A,re){for(var _e=La(re),We=new Ya(A),je=l[A.type],Je=ce(A)[0],ut=Je;E.element(ut);){for(var lt=0;lt<je.length;lt++){var mt=je[lt],Dt=mt.selector,Tt=mt.context;if(Q(ut,Dt)&&ve(Tt,Je)&&ve(Tt,ut)){var kt=mt.listeners;We.currentTarget=ut;for(var Ct=0;Ct<kt.length;Ct++){var ta=kt[Ct];Ja(ta.options,_e)&&ta.func(We)}}}ut=nt(ut)}}function j(A){return T(A,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=nt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!hn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var j=0,A=p.interactions.list;j<A.length;j++){var re=A[j];if(!(re.pointerType!==l||/down/i.test(c)&&re.simulation))return re}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(hn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function hn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ae(o),p=ce(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,A=o.changedTouches;j<A.length;j++){var re=A[j],_e={pointer:re,pointerId:L(re),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},We=sn(_e);T.push([_e.pointer,_e.eventTarget,_e.curEventTarget,We])}}else{var je=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!je;Je++)je=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;je=je||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!je){var ut={pointer:o,pointerId:L(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},lt=sn(ut);T.push([ut.pointer,ut.eventTarget,ut.curEventTarget,lt])}}for(var mt=0;mt<T.length;mt++){var Dt=T[mt],Tt=Dt[0],kt=Dt[1],Ct=Dt[2];Dt[3][a](Tt,o,kt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var j=c&&c.events,A=0;A<p.length;A++){var re=p[A];k(o,re.type,re.listener,j)}}var Sn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=se.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var j=T[k];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var A=function(){var We=_e[re];a.documents.some(function(je){return ve(je.doc,We.downTarget)})||j.removePointer(We.pointer,We.event)},re=0,_e=j.pointers;re<_e.length;re++)A()}}(c=V.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,j=a.interactions.list;T<j.length;T++)j[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(j,k);var T=J(j);function j(){return u(this,j),T.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(A){a.interactions.pointerMoveTolerance=A}},{key:"_now",value:function(){return a.now()}}]),j}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(j,A){return a.fire(j,A)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Oa)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Fa=Sn,Ra=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ra||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||l,this._win=$(he(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Ra.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Ra.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=Be(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ze(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(he(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ve(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?Ce(l,t,o):!!E.element(t)&&ve(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?Ce(l,t,o):!!E.element(t)&&ve(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=ie(o,l,p);for(var k in m){k==="wheel"&&(k=se.wheelEvent);for(var T=0,j=m[k];T<j.length;T++){var A=j[T];ba(k,this._actions)?this.events[t===Ra.On?"on":"off"](k,A):E.string(this.target)?this._scopeEvents[t===Ra.On?"addDelegate":"removeDelegate"](this.target,this._context,k,A,c):this._scopeEvents[t===Ra.On?"add":"remove"](this.target,k,A,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Ra.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Ra.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=U(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ae(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&Q(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=fa(Jt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ie,c.getTouchDistance=ne,c.getTouchAngle=G,c.getElementRect=Ze,c.getElementClientRect=Fe,c.matchesSelector=Q,c.closest=Ye,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.on(A,m,k)}return this}if(E.object(p)){for(var re in p)this.on(re,p[re],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.off(A,m,k)}return this}if(E.object(p)){for(var re in p)this.off(re,p[re],m);return this}var _e;return ba(p,this.scope.actions)?p in this.globalEvents&&(_e=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(_e,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=yt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=J(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return M(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){M(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),V.init(l),se.init(l),Ge.init(l),o.window=l,o.document=l.document,o.usePlugin(Fa),o.usePlugin(En),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[Do(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[Do(m)]))break}this.listenerMaps.splice(l,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function Do(a){return a&&a.replace(/\/.*$/,"")}var Co=new sl,ea=Co.interactStatic,cl=typeof globalThis<"u"?globalThis:window;Co.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,j=T===void 0?{x:0,y:0}:T,A={range:p,grid:a,x:null,y:null},re=0;re<t.length;re++){var _e=t[re],We=_e[0],je=_e[1],Je=Math.round((l-j.x)/a[We]),ut=Math.round((c-j.y)/a[je]);A[We]=Math.max(k.left,Math.min(k.right,Je*a[We]+j.x)),A[je]=Math.max(k.top,Math.min(k.bottom,ut*a[je]+j.y))}return A};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,j=T.equalDelta,A=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=j;var re=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var _e=(re.left?1:-1)*(re.top?1:-1);t.edgeSign={x:_e,y:_e}}else t.edgeSign={x:re.left?-1:1,y:re.top?-1:1};if(k!==!1&&F(l,re),A!=null&&A.length){var We=new _a(a.interaction);We.copyFrom(a.interaction.modification),We.prepareStates(A),t.subModification=We,We.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);oe(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),j=T.delta;return T.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var j=l.height*m;o.x=p.x+(j-c.width)*k.x}}var gl=na(fl,"aspectRatio"),_o=function(){};_o._defaults={};var Tn=_o;function Qa(a,t,o){return E.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var In={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var j=Qa(m.restriction,c,p);if(j){var A=j.right-j.left-t.width,re=j.bottom-j.top-t.height;A<0&&(T.left+=A,T.right+=A),re<0&&(T.top+=re,T.bottom+=re)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(In,"restrict"),Eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var gn={noInner:Eo,noOuter:So,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=de(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},j=Qa(m.outer,l,k)||{};To(T,Eo),To(j,So),o.top?t.y=Math.min(Math.max(j.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(gn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},In.defaults),kl=na({start:In.start,set:In.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return gn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Z(Qa(p.min,t,a.coords))||xl,k=Z(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},gn.noInner),outer:F({},gn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),gn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),to={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,j=T.offsetWithOrigin?function(_e){var We=_e.interaction.element,je=de(pe(_e.state.options.origin,null,null,[We])),Je=je||te(_e.interactable,We,_e.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var A=pe(T.offset,l,c,[o]);(t=de(A)||{x:0,y:0}).x+=j.x,t.y+=j.y}var re=T.relativePoints;m.offsets=p&&re&&re.length?re.map(function(_e,We){return{index:We,relativePoint:_e,x:k.left-p.width*_e.x+t.x,y:k.top-p.height*_e.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=te(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var j=0,A=p;j<A.length;j++)for(var re=A[j],_e=k.x-re.x,We=k.y-re.y,je=0,Je=c.targets.length;je<Je;je++){var ut=c.targets[je],lt=void 0;(lt=E.func(ut)?ut(_e,We,t._proxy,re,je):ut)&&T.push({x:(E.number(lt.x)?lt.x:_e)+re.x,y:(E.number(lt.y)?lt.y:We)+re.y,range:E.number(lt.range)?lt.range:c.range,source:ut,index:je,offset:re})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var Tt=T[Dt],kt=Tt.range,Ct=Tt.x-k.x,ta=Tt.y-k.y,jt=ot(Ct,ta),da=jt<=kt;kt===1/0&&mt.inRange&&mt.range!==1/0&&(da=!1),mt.target&&!(da?mt.inRange&&kt!==1/0?jt/kt<mt.distance/mt.range:kt===1/0&&mt.range!==1/0||jt<mt.distance:!mt.inRange&&jt<mt.distance)||(mt.target=Tt,mt.distance=jt,mt.range=kt,mt.inRange=da,mt.delta.x=Ct,mt.delta.y=ta)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),l.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(to,"snap"),Bn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],to.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var j=T[k],A=void 0;if(A=E.func(j)?j(m.x,m.y,t):j){for(var re=0,_e=o.targetFields;re<_e.length;re++){var We=_e[re],je=We[0],Je=We[1];if(je in A||Je in A){A.x=A[je],A.y=A[Je];break}}o.options.targets.push(A)}}var ut=to.set(a);return o.options=c,ut},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Bn,"snapSize"),ao={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Bn.start(a)):null},set:Bn.set,defaults:F(fa(Bn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:Tn,avoid:Tn,transform:Tn,rubberband:Tn},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=ao,ao){var l=ao[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,Io=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T){var j;if(u(this,o),C(R(j=t.call(this,k)),p),p!==c&&C(R(j),c),j.timeStamp=T,j.originalEvent=p,j.type=l,j.pointerId=L(c),j.pointerType=ae(c),j.target=m,j.currentTarget=null,l==="tap"){var A=k.getPointerIndex(c);j.dt=j.timeStamp-k.pointers[A].downTime;var re=j.timeStamp-k.tapTime;j.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===j.target&&re<500}else l==="doubletap"&&(j.dt=c.timeStamp-k.tapTime,j.double=!0);return j}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(we),mn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=mn,a.defaults.actions.pointerEvents=mn.defaults,F(a.actions.phaselessTypes,mn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&no(a),Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,j=c.pointers[T].hold,A=qe(k),re={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:A,node:null},_e=0;_e<A.length;_e++){var We=A[_e];re.node=We,l.fire("pointerEvents:collect-targets",re)}if(re.targets.length){for(var je=1/0,Je=0,ut=re.targets;Je<ut.length;Je++){var lt=ut[Je].eventable.options.holdDuration;lt<je&&(je=lt)}j.duration=je,j.timeout=setTimeout(function(){Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},je)}})(a,t),Pa(a,t)},"interactions:up":function(a,t){no(a),Pa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){no(a),Pa(a,t)}},PointerEvent:Io,fire:Pa,collectEventTargets:Bo,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Pa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?Bo(a,t):k,j=new Io(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var A={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:j},re=0;re<T.length;re++){var _e=T[re];for(var We in _e.props||{})j[We]=_e.props[We];var je=te(_e.eventable,_e.node);if(j._subtractOrigin(je),j.eventable=_e.eventable,j.currentTarget=_e.node,_e.eventable.fire(j),j._addOrigin(je),j.immediatePropagationStopped||j.propagationStopped&&re+1<T.length&&T[re+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",A),m==="tap"){var Je=j.double?Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=Je,o.tapTime=Je.timeStamp}return j}function Bo(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var j=qe(p),A={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:j,targets:[],node:null},re=0;re<j.length;re++){var _e=j[re];A.node=_e,t.fire("pointerEvents:collect-targets",A)}return m==="hold"&&(A.targets=A.targets.filter(function(We){var je,Je;return We.eventable.options.holdDuration===((je=o.pointers[k])==null||(Je=je.hold)==null?void 0:Je.duration)})),A.targets}function no(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:mn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(mn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,zl={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,j=function(){var re=m[A],_e=l.getRect(re);if(!_e)return 1;var We,je=Ae(p.interactions.list,function(lt){return lt.interacting()&&lt.interactable===l&&lt.element===re&&lt.prepared.name===c.name});if(je)je.move(),T&&(We=je._reflowPromise||new k(function(lt){je._reflowResolve=lt}));else{var Je=Z(_e),ut=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});We=function(lt,mt,Dt,Tt,kt){var Ct=lt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:kt,pointer:kt,eventTarget:Dt,phase:"reflow"};Ct.interactable=mt,Ct.element=Dt,Ct.prevEvent=kt,Ct.updatePointer(kt,kt,Dt,!0),H(Ct.coords.delta),Bt(Ct.prepared,Tt),Ct._doPhase(ta);var jt=lt.window,da=jt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(Tt,mt,Dt),Ct._interacting?(Ct.move(ta),Ct.end(kt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(kt,kt),ya}(p,l,re,c,ut)}T&&T.push(We)},A=0;A<m.length&&!j();A++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},Ll=zl;if(ea.use(Oa),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(tt),ea.use(vt),ea.use(Ll),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(xn,xn.exports)),xn.exports}var np=ap();const Qo=Se.getDefaultExportFromCjs(np),Jn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(Kr),b=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,O=NaN,R=NaN,J=NaN,M=NaN,De=-1,X=-1,K=-1,le=-1,D=r.x,$=r.y,y=r.w,N=r.h;const E=e.ref(),me=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:pe});function Xe(w){ie(w)}function st(){Re()}function ze(w){pa(r.isDraggable)&&(f.draggable=w)}function Ue(w){pa(r.isResizable)&&(f.resizable=w)}function Ee(w){pa(r.isBounded)&&(f.bounded=w)}function V(w){f.transformScale=w}function ee(w){f.rowHeight=w}function se(w){f.maxRows=w}function ve(){f.rtl=Jo()==="rtl",Re()}function Ye(w){f.cols=Math.floor(w)}u.increaseItem(me),e.onBeforeMount(()=>{f.rtl=Jo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,N=r.h,y=r.w,aa(Ze)}),b.on("updateWidth",Xe),b.on("compact",st),b.on("setDraggable",ze),b.on("setResizable",Ue),b.on("setBounded",Ee),b.on("setTransformScale",V),b.on("setRowHeight",ee),b.on("setMaxRows",se),b.on("directionchange",ve),b.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Xe),b.off("compact",st),b.off("setDraggable",ze),b.off("setResizable",Ue),b.off("setBounded",Ee),b.off("setTransformScale",V),b.off("setRowHeight",ee),b.off("setMaxRows",se),b.off("directionchange",ve),b.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(me)}),i({state:f,wrapper:E});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>f.resizable&&!r.static),z=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),be=e.computed(()=>(f.draggable||f.resizable)&&!r.static),Ce=Gd("item"),$e=e.computed(()=>({[Ce.b()]:!0,[Ce.bm("resizable")]:Q.value,[Ce.bm("static")]:r.static,[Ce.bm("resizing")]:f.isResizing,[Ce.bm("dragging")]:f.isDragging,[Ce.bm("transform")]:f.useCssTransforms,[Ce.bm("rtl")]:z.value,[Ce.bm("no-touch")]:nt&&be.value})),Fe=e.computed(()=>[Ce.be("resizer"),z.value&&Ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(H)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(H)}),e.watch(()=>f.rowHeight,()=>{aa(Ze),aa(qe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(H),aa(Ze),aa(qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(H)}),e.watch(z,()=>{aa(H),aa(Ze)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Ze),aa(qe))});function Ze(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=Y(D,$,y,N);f.isDragging&&(w.top=f.dragging.top,z.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?z.value?S=Ud(w.top,w.right,w.width,w.height):S=jd(w.top,w.left,w.width,w.height):z.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function qe(){const w={};for(const S of["width","height"]){const q=f.style[S].match(/^(\d+)px$/);if(!q)return;w[S]=q[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function he(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Xo(w);if(pa(q))return;const{x:L,y:ue}=q,W={width:0,height:0};let P;switch(S){case"resizestart":{H(),De=y,X=N,P=Y(D,$,y,N),W.width=P.width,W.height=P.height,f.resizing=W,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=L),!w.edges.top&&!w.edges.bottom&&(M=ue);const Ie=Yo(J,M,L,ue);z.value?W.width=f.resizing.width-Ie.deltaX/f.transformScale:W.width=f.resizing.width+Ie.deltaX/f.transformScale,W.height=f.resizing.height+Ie.deltaY/f.transformScale,f.resizing=W;break}case"resizeend":{P=Y(D,$,y,N),W.width=P.width,W.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=te(W.height,W.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),J=L,M=ue,(y!==P.w||N!==P.h)&&d("resize",r.i,P.h,P.w,W.height,W.width),w.type==="resizeend"&&(De!==y||X!==N)&&d("resized",r.i,P.h,P.w,W.height,W.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const q=Xo(w);if(pa(q))return;const{x:L,y:ue}=q,W=w.target;if(!W.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,le=$;const ne=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,we=G.right/f.transformScale,Te=ne.right/f.transformScale,Be=G.top/f.transformScale,U=ne.top/f.transformScale;z.value?P.left=(we-Te)*-1:P.left=ae-ce,P.top=Be-U,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Yo(O,R,L,ue);if(z.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const G=W.offsetParent.clientHeight-Z(r.h,f.rowHeight,f.margin[1]);P.top=oe(P.top,0,G);const ae=de(),ce=f.containerWidth-Z(r.w,ae,f.margin[0]);P.left=oe(P.left,0,ce)}f.dragging=P;break}case"dragend":{const ne=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,we=G.right/f.transformScale,Te=ne.right/f.transformScale,Be=G.top/f.transformScale,U=ne.top/f.transformScale;z.value?P.left=(we-Te)*-1:P.left=ae-ce,P.top=Be-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ie;z.value,Ie=pe(P.top,P.left),O=L,R=ue,(D!==Ie.x||$!==Ie.y)&&d("move",r.i,Ie.x,Ie.y),w.type==="dragend"&&(K!==D||le!==$)&&d("moved",r.i,Ie.x,Ie.y),b.emit("dragEvent",w.type,r.i,Ie.x,Ie.y,N,y)}function Y(w,S,q,L){const ue=de();let W;return z.value?W={right:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])}:W={left:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])},W}function pe(w,S){const q=de();let L=Math.round((S-f.margin[0])/(q+f.margin[0])),ue=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return L=Math.max(Math.min(L,f.cols-y),0),ue=Math.max(Math.min(ue,f.maxRows-N),0),{x:L,y:ue}}function de(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Z(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function oe(w,S,q){return Math.max(Math.min(w,q),S)}function te(w,S,q=!1){const L=de();let ue=Math.round((S+f.margin[0])/(L+f.margin[0])),W=0;return q?W=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):W=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ue=Math.max(Math.min(ue,f.cols-D),0),W=Math.max(Math.min(W,f.maxRows-$),0),{w:ue,h:W}}function ie(w,S){f.containerWidth=w}function Re(){Ze()}function ot(){!g.value&&E.value&&(g.value=Qo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Ho(F);function C(){if(ot(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Ho(he);function H(){if(ot(),!!g.value)if(f.resizable&&!r.static){const w=Y(0,0,r.maxW,r.maxH),S=Y(0,0,r.minW,r.minH),q={edges:{left:z.value?`.${Fe.value[0]}`:!1,right:z.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(q.modifiers=[Qo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(q),_||(_=!0,g.value.on("resizestart resizemove resizeend",L=>{L.type==="resizemove"?I(L):he(L)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass($e.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var er;nn&&(er=window==null?void 0:window.navigator)!=null&&er.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function tr(n){return n!=null}function ar(){}const op=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!tr(r)||r==="")return!1;let g;return tr(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Rn;if(nn){for(const n of dp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Rn){const n=Rn[2],i=Rn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},nr="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:nr}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=nr),window.dispatchEvent(n)},_n;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_n||(_n={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),wo=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(wo(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},or=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},On=new WeakMap,rr=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},pn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},lr=an({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),On.has(n)&&!i)return On.get(n);if(Zr(n))return On.set(n,lr),lr;var s=getComputedStyle(n),r=wo(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&rr.test(s.overflowY||""),g=!r&&rr.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),O=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),J=r?0:xa(s.borderRightWidth),M=r?0:xa(s.borderBottomWidth),De=r?0:xa(s.borderLeftWidth),X=O+x,K=f+_,le=De+J,D=R+M,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-le-n.clientWidth:0,N=d?X+le:0,E=d?K+D:0,me=r?r.width:xa(s.width)-N-y,Xe=r?r.height:xa(s.height)-E-$,st=me+X+y+le,ze=Xe+K+$+D,Ue=an({devicePixelContentBoxSize:pn(Math.round(me*devicePixelRatio),Math.round(Xe*devicePixelRatio),u),borderBoxSize:pn(st,ze,u),contentBoxSize:pn(me,Xe,u),contentRect:new Jr(O,f,me,Xe)});return On.set(n,Ue),Ue},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case _n.DEVICE_PIXEL_CONTENT_BOX:return b;case _n.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},ir=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(ir(n);vp();)n=wp(),ir(n);return hp()&&gp(),n>0},lo,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!lo){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),lo=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),lo()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},Pn=0,Sp=function(){return!!Pn},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},sr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cr=function(n){return n===void 0&&(n=0),Date.now()+n},io=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!io){io=!0;var r=cr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(io=!1,i=r-cr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():Cn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),sr.forEach(function(s){return Cn.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),sr.forEach(function(s){return Cn.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,ur=function(n){!Pn&&n>0&&fo.start(),Pn+=n,!Pn&&fo.stop()},Np=function(n){return!wo(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||_n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Mn=new WeakMap,dr=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Mn.set(i,r)},n.observe=function(i,s,r){var d=Mn.get(i),u=d.observationTargets.length===0;dr(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),ur(1),fo.schedule())},n.unobserve=function(i,s){var r=Mn.get(i),d=dr(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),ur(-1))},n.disconnect=function(i){var s=this,r=Mn.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!or(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!or(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function pr(n,i){Zn.set(n,i),nl.observe(n)}function fr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=ar;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(pr(d,n.onResize),i=()=>{fr(d),i=ar})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:pr,unobserveResize:fr,unobserve:r}}const Lp=e.ref(!1);e.computed(()=>Lp.value);const vr="__theme_style__",so="__theme_observer__",hr=e.reactive(new Map),gr=new Map;e.watch(hr,()=>{if(!nn)return;gr.clear();const n=document.head.querySelector(`#${vr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${so} { width: 1px }`,r=1;for(const[d,[u,b]]of hr.entries())s+=` html.${u} .${so}, .${b} .${so} { width: ${++r}px }`,gr.set(r,d);i.textContent=s,i.id=vr,document.head.appendChild(i)});const ol=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=zp(),O=zd();O.on("resizeEvent",R),O.on("dragEvent",J),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Xe(),f.value&&x(f.value,Ld(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),D()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&_(f.value)});function R(ze,Ue,Ee,V,ee,se){E(ze,Ue,Ee,V,ee,se)}function J(ze,Ue,Ee,V,ee,se){N(ze,Ue,Ee,V,ee,se)}e.watch(()=>u.width,(ze,Ue)=>{e.nextTick(()=>{O.emit("updateWidth",ze),Ue===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,ze=>{O.emit("setColNum",ze)}),e.watch(()=>r.rowHeight,ze=>{O.emit("setRowHeight",ze)}),e.watch(()=>r.isDraggable,ze=>{O.emit("setDraggable",ze)}),e.watch(()=>r.isResizable,ze=>{O.emit("setResizable",ze)}),e.watch(()=>r.isBounded,ze=>{O.emit("setBounded",ze)}),e.watch(()=>r.transformScale,ze=>{O.emit("setTransformScale",ze)}),e.watch(()=>r.responsive,ze=>{ze||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,ze=>{O.emit("setMaxRows",ze)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:De})),e.provide(jr,O),i({state:u,getItem:X,resizeEvent:E,dragEvent:N,layoutUpdate:K});function M(ze){b.set(ze.i,ze)}function De(ze){b.delete(ze.i)}function X(ze){return b.get(ze)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const ze=st(g.value,u.originalLayout);if(ze.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(ze);else{const Ue=new Set(ze.map(Ee=>Ee.i));u.originalLayout=u.originalLayout.filter(Ee=>!Ue.has(Ee.i))}u.lastLayoutLength=g.value.length,Xe()}cn(g.value,r.verticalCompact),O.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function $(){if(!r.autoSize)return;const ze=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+ze)+ze+"px"}let y;function N(ze,Ue,Ee,V,ee,se){let ve=qo(g.value,Ue);pa(ve)&&(ve={h:0,w:0,x:0,y:0,i:""}),ze==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ye,{i:nt,x:Q,y:z})=>({...Ye,[nt]:{x:Q,y:z}}),{})),ze==="dragmove"||ze==="dragstart"?(u.placeholder.i=Ue,u.placeholder.x=ve.x,u.placeholder.y=ve.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,ve,Ee,V,!0,r.preventCollision),r.restoreOnDrag?(ve.static=!0,cn(g.value,r.verticalCompact,y),ve.static=!1):cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(ze,Ue,Ee,V,ee,se){let ve=qo(g.value,Ue);pa(ve)&&(ve={h:0,w:0,x:0,y:0,i:""});let Ye;if(r.preventCollision){const nt=Wr(g.value,{...ve,w:se,h:ee}).filter(Q=>Q.i!==ve.i);if(Ye=nt.length>0,Ye){let Q=1/0,z=1/0;nt.forEach(be=>{be.x>ve.x&&(Q=Math.min(Q,be.x)),be.y>ve.y&&(z=Math.min(z,be.y))}),Number.isFinite(Q)&&(ve.w=Q-ve.x),Number.isFinite(z)&&(ve.h=z-ve.y)}}Ye||(ve.w=se,ve.h=ee),ze==="resizestart"||ze==="resizemove"?(u.placeholder.i=Ue,u.placeholder.x=Ee,u.placeholder.y=V,u.placeholder.w=ve.w,u.placeholder.h=ve.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):ze&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&me(),cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="resizeend"&&d("layout-updated",g.value)}function me(){const ze=Jd(r.breakpoints,u.width);if(ze===u.lastBreakpoint)return;const Ue=Gr(ze,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const Ee=Zd(u.originalLayout,u.layouts,r.breakpoints,ze,u.lastBreakpoint,Ue,r.verticalCompact);u.layouts[ze]=Ee,u.lastBreakpoint!==ze&&d("breakpoint-changed",ze,Ee),g.value=Ee,d("update:layout",Ee),u.lastBreakpoint=ze,O.emit("setColNum",Ue)}function Xe(){u.layouts=Object.assign({},r.responsiveLayouts)}function st(ze,Ue){const Ee=new Set(Ue.map(ve=>ve.i)),V=new Set(ze.map(ve=>ve.i)),ee=ze.filter(ve=>!Ee.has(ve.i)),se=Ue.filter(ve=>!V.has(ve.i));return ee.concat(se)}return(ze,Ue)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[ze.$slots.default?e.renderSlot(ze.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,Ee=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:Ee.i,ref_for:!0},Ee),{default:e.withCtx(()=>[e.renderSlot(ze.$slots,"item",{item:Ee})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=Kt.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,J,M,De;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(De=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:De.layout:"vertical"}),f=e.computed(()=>{var R,J;return((J=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},O=(R,J)=>{d("routeUrl",R,J)};return(R,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":J[0]||(J[0]=M=>b.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(M,De)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var X,K,le,D,$,y,N,E,me,Xe,st,ze,Ue;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:De===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(K=M==null?void 0:M.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((D=M==null?void 0:M.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=M==null?void 0:M.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(N=e.unref(ft)[De])==null?void 0:N.showIndex,allowMove:(E=e.unref(ft)[De])==null?void 0:E.allowMove,viewport:(me=e.unref(ft)[De])==null?void 0:me.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(ko),itemData:(Xe=M==null?void 0:M.component)==null?void 0:Xe.compData,childItemData:(st=M==null?void 0:M.component)==null?void 0:st.itemChildData,key:e.unref(fn),cacheNewData:e.unref(qn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??De,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(ze=M==null?void 0:M.component)==null?void 0:ze.tableId,allMapContents:e.unref(Wn),children:(Ue=M==null?void 0:M.component)==null?void 0:Ue.children,level:x.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(zr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,De)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(De)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=M==null?void 0:M.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(fn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??De,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Wn),children:M==null?void 0:M.children,level:x.value,onRowClick:_,onRouteUrl:O},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=Lt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),Kp={TABLE:kn.ssTable,FORM:zo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:zo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return Kp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Tr;exports.activeStepInfo=un;exports.affixItems=rd;exports.allMapContents=Wn;exports.cacheNewData=qn;exports.clickMainKey=zr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=fn;exports.compNames=ko;exports.compShow=Un;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=Hn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=xo;exports.isUndefined=br;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Zt;exports.setComponent=Ir;exports.showItems=ft;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=Kn;exports.st=Jn;exports.stepItems=kd;exports.toNumber=co;exports.toolBar=Ba;exports.verifyButton=md;