ss-component-new 1.2.72 → 1.2.73

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-K11XHLAM.js → MTLLoader-C8f_8u_d.js} +1 -1
  2. package/dist/{MTLLoader-ikqYcjAo.cjs → MTLLoader-bGxXiH2P.cjs} +1 -1
  3. package/dist/{OrbitControls-Cw_tl6K1.js → OrbitControls--BFTtfLk.js} +1 -1
  4. package/dist/{OrbitControls-CS8gOWAT.cjs → OrbitControls-D2Rfszp6.cjs} +1 -1
  5. package/dist/{URDFLoader-BhEBwb_Y.cjs → URDFLoader-B2Mddboq.cjs} +1 -1
  6. package/dist/{URDFLoader-Dlh2X0Iv.js → URDFLoader-BxCn2jnZ.js} +2 -2
  7. package/dist/{animationData-D_zroenU.cjs → animationData-ptkfkBjF.cjs} +1 -1
  8. package/dist/{animationData-C0Dh4mjP.js → animationData-yUSDctu6.js} +1 -1
  9. package/dist/{array-eASasGM2.js → array-BwP37J1t.js} +1 -1
  10. package/dist/{array-Dkcb0MKV.cjs → array-CPzmA4t5.cjs} +1 -1
  11. package/dist/{iconfont-T0wWnxgR.js → iconfont-Bfo51Yte.js} +2 -2
  12. package/dist/{iconfont-77OhOwxs.cjs → iconfont-RRElI-SY.cjs} +1 -1
  13. package/dist/{index-Bd3cJhSh.cjs → index--8jDZXDO.cjs} +1 -1
  14. package/dist/{index-jz3YasSY.js → index-6EZ2c42F.js} +1 -1
  15. package/dist/{index-DVdauMYc.js → index-B2DQOaxH.js} +1 -1
  16. package/dist/{index-Z5WfIite.js → index-B7L2pIgD.js} +3 -3
  17. package/dist/{index-HiZw37CZ.cjs → index-BCj3Biv7.cjs} +1 -1
  18. package/dist/{index-C6Hq4npG.cjs → index-BFWFISwE.cjs} +1 -1
  19. package/dist/{index-Cyiwumzg.js → index-BMG9pw74.js} +1 -1
  20. package/dist/{index-D907HeIK.cjs → index-BNa7hFlv.cjs} +1 -1
  21. package/dist/{index-BUxE-JUG.cjs → index-BjFLyOy2.cjs} +1 -1
  22. package/dist/{index-O38XeeGF.js → index-BjpMFwVb.js} +16 -16
  23. package/dist/{index-DTFPueRJ.cjs → index-BmAvaFkY.cjs} +1 -1
  24. package/dist/{index-BHb9mdSS.js → index-Bo-Isokv.js} +1 -1
  25. package/dist/{index-DvMLV6_i.js → index-C2lTLJyO.js} +1 -1
  26. package/dist/{index-BVsUXckx.js → index-C4Bz7x-a.js} +4 -4
  27. package/dist/{index-BKZZqxv8.js → index-C73fqPKN.js} +7 -7
  28. package/dist/{index-DClp_CE2.cjs → index-CLWM8vdx.cjs} +1 -1
  29. package/dist/{index-BVHMMDYj.cjs → index-CWPdwhFo.cjs} +1 -1
  30. package/dist/{index-Ds1y6Uqe.cjs → index-CWf7Ft_2.cjs} +1 -1
  31. package/dist/{index-vUsExAu6.cjs → index-CfSZ94oy.cjs} +1 -1
  32. package/dist/{index-DzDFCtjN.cjs → index-Cmns7DGJ.cjs} +1 -1
  33. package/dist/{index-Cf-44FjK.cjs → index-DChnUwef.cjs} +1 -1
  34. package/dist/{index-CTnokPli.js → index-DKv5HhZA.js} +4 -4
  35. package/dist/{index-D77fb8YT.cjs → index-DNyv2azK.cjs} +1 -1
  36. package/dist/{index-Dgu3YiKg.cjs → index-DU996MGb.cjs} +1 -1
  37. package/dist/{index-GBag8JpT.cjs → index-DXjIiBKm.cjs} +1 -1
  38. package/dist/{index-Bw5o8WK1.cjs → index-D_6g6WxH.cjs} +1 -1
  39. package/dist/{index-C7_zXFBB.js → index-D_8s9Jv8.js} +1 -1
  40. package/dist/{index-CnUzzOAg.js → index-D_LF-ySC.js} +1 -1
  41. package/dist/{index-Dj4SVmPC.js → index-DfdrLT2k.js} +4 -4
  42. package/dist/{index-YWsdowCe.js → index-DpwZhuPz.js} +1 -1
  43. package/dist/{index-Di9z9n0o.cjs → index-DrtYy1lh.cjs} +1 -1
  44. package/dist/{index-C0TESDF4.cjs → index-DtNajbhX.cjs} +1 -1
  45. package/dist/{index-ECG5cq2t.cjs → index-DwzobGZ4.cjs} +1 -1
  46. package/dist/{index-BtmfheCs.js → index-DxMdNUo0.js} +1 -1
  47. package/dist/{index-DcRnbkgF.cjs → index-Fk0-h7BT.cjs} +1 -1
  48. package/dist/{index-DMSzQRai.js → index-ISwjwHnE.js} +1 -1
  49. package/dist/{index-Dm78GSsI.js → index-PoKBuhpL.js} +1 -1
  50. package/dist/{index-svORarJa.js → index-QXJLZVkw.js} +7 -7
  51. package/dist/{index-BGdo0lqx.cjs → index-cd67kj-n.cjs} +1 -1
  52. package/dist/{index-K-uL8YOH.cjs → index-h40g0hP1.cjs} +1 -1
  53. package/dist/{index-ZM_5Mf9f.js → index-kkkmA8ut.js} +2 -2
  54. package/dist/{index-DJIYiX7n.js → index-mmAwB7MM.js} +3 -3
  55. package/dist/{index-BsynnP1m.js → index-n1LeBjBw.js} +5 -5
  56. package/dist/{index-DBmvCes2.js → index-udkxep-V.js} +2 -2
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BlnK_yzI.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DfCftOkM.js} +1647 -1636
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BzQaSUrd.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-f2cWH6Na.cjs} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B8vp1IiT.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-fXuLTS.cjs} +43 -43
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BqQqbKuV.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-vAxHEUPT.js} +1395 -1383
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Ptcjn9Ky.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-ByXI7fJH.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Dz4nCqvT.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DnJ3D_TN.js} +5 -5
  63. package/dist/{index.vue_vue_type_style_index_1_lang-BwRYUsPu.js → index.vue_vue_type_style_index_1_lang-B12hzlNV.js} +3 -3
  64. package/dist/{index.vue_vue_type_style_index_1_lang-BSiAbU7c.cjs → index.vue_vue_type_style_index_1_lang-BuCtDbIL.cjs} +1 -1
  65. package/dist/{main-DhuYYLjy.js → main-BQkVwQGt.js} +3 -3
  66. package/dist/{main-DYDt57Qc.cjs → main-CKJOZvmd.cjs} +1 -1
  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-CcHi1GT0.js → threeModel-B70hqGbt.js} +4 -4
  72. package/dist/{threeModel-5wvGy8S9.cjs → threeModel-BSxLcY10.cjs} +1 -1
  73. package/dist/{threePreview-DjrtURuf.js → threePreview-B_u6OLOV.js} +3 -3
  74. package/dist/{threePreview-unSCDqCQ.cjs → threePreview-DzxpKE29.cjs} +1 -1
  75. package/dist/{threeSceneView-o0KAzZ_q.cjs → threeSceneView-CxOKxbjP.cjs} +1 -1
  76. package/dist/{threeSceneView-DhSHXsQI.js → threeSceneView-D1tPKP8f.js} +8 -8
  77. package/dist/{threeSceneViewForCPMPIP-CX3biKW2.js → threeSceneViewForCPMPIP-8zR1iiKh.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-5KiGagRG.cjs → threeSceneViewForCPMPIP-CKkRPc08.cjs} +1 -1
  79. package/dist/{threeTrackPathView-ChRPHpPb.cjs → threeTrackPathView-D37NVq6t.cjs} +1 -1
  80. package/dist/{threeTrackPathView-DxGKpAp8.js → threeTrackPathView-DtmXAv5H.js} +3 -3
  81. package/dist/{threeViewerHost-CzYaQhEH.js → threeViewerHost-BNs118k0.js} +2 -2
  82. package/dist/{threeViewerHost-BGIjs6Rt.cjs → threeViewerHost-vo3_msNQ.cjs} +1 -1
  83. package/dist/{urdfTree-DSu_fNLS.cjs → urdfTree-BRyv3OKC.cjs} +1 -1
  84. package/dist/{urdfTree-CJmO7Y4d.js → urdfTree-C45qnYd1.js} +1 -1
  85. package/dist/{workpieceTreePanel-CMuekYhH.js → workpieceTreePanel-BA7m84k8.js} +4 -4
  86. package/dist/{workpieceTreePanel-Cnr0mMqr.cjs → workpieceTreePanel-DQYwtsmB.cjs} +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const da=require("./index-D907HeIK.cjs"),e=require("vue"),p=require("./index-C8qRkCgn.cjs"),Vt=require("./index-DcRnbkgF.cjs"),ze=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B8vp1IiT.cjs"),Yt=require("./index-ECG5cq2t.cjs"),Vo=require("./threeViewerHost-BGIjs6Rt.cjs"),Kt=require("./index-DeBHVrj0.cjs"),Ft=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oo=require("./isString--eJE54G5.cjs"),Mo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),zo=require("./index-C0TESDF4.cjs"),xl=require("./index-BVaHwt5f.cjs"),Fr=require("./index-DzDFCtjN.cjs");var Pr=/\s/;function $r(a){for(var i=a.length;i--&&Pr.test(a.charAt(i)););return i}var jr=/^\s+/;function Kr(a){return a&&a.slice(0,$r(a)+1).replace(jr,"")}var Ro=NaN,Ur=/^[-+]0x[0-9a-f]+$/i,Wr=/^0b[01]+$/i,Hr=/^0o[0-7]+$/i,qr=parseInt;function go(a){if(typeof a=="number")return a;if(p.isSymbol(a))return Ro;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=Kr(a);var s=Wr.test(a);return s||Hr.test(a)?qr(a.slice(2),s?2:8):Ur.test(a)?Ro:+a}var uo=function(){return p.root.Date.now()},Gr="Expected a function",Xr=Math.max,Yr=Math.min;function ko(a,i,s){var l,c,d,x,v,h,D=0,E=!1,_=!1,O=!0;if(typeof a!="function")throw new TypeError(Gr);i=go(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Xr(go(s.maxWait)||0,i):d,O="trailing"in s?!!s.trailing:O);function H(A){var T=l,se=c;return l=c=void 0,D=A,x=a.apply(se,T),x}function V(A){return D=A,v=setTimeout(P,i),E?H(A):x}function ke(A){var T=A-h,se=A-D,Oe=i-T;return _?Yr(Oe,d-se):Oe}function W(A){var T=A-h,se=A-D;return h===void 0||T>=i||T<0||_&&se>=d}function P(){var A=uo();if(W(A))return X(A);v=setTimeout(P,ke(A))}function X(A){return v=void 0,O&&l?H(A):(l=c=void 0,x)}function y(){v!==void 0&&clearTimeout(v),D=0,l=h=c=v=void 0}function L(){return v===void 0?x:X(uo())}function k(){var A=uo(),T=W(A);if(l=arguments,c=this,h=A,T){if(v===void 0)return V(h);if(_)return clearTimeout(v),v=setTimeout(P,i),H(h)}return v===void 0&&(v=setTimeout(P,i)),x}return k.cancel=y,k.flush=L,k}var Jr="[object Boolean]";function wl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Jr}function Dl(a){return a===void 0}const Qr={class:"form-content"},Zr={title:"选择标签"},ei={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ti={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ai={__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(a,{emit:i}){const s=()=>{x.value=!1,v.value=!1,h.value=[]},l=a;e.computed(()=>{var z;const I=(z=ot.value)==null?void 0:z.split("/");return(I==null?void 0:I.some(le=>(le==null?void 0:le.includes("updateLoading"))||(le==null?void 0:le.includes("loading"))))?!1:Fe.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),v=e.ref(!1),h=e.ref([]),{getFileExtension:D}=Vo.useThreeSystem(),E=e.ref(),_=e.ref(!1),O=e.ref(!1),H=e.ref([]),V=e.ref(),ke=e.ref(!1),W=e.ref([]),P=da.useFormToTableComp(p.pinia),X=da.useFormComp(p.pinia),y=e.ref(!1),L=e.ref(),k=p.useLoginState(p.pinia),{loginUserInfo:A}=p.storeToRefs(k),T=e.ref(),se=e.ref(!0),Oe=Kt.useModelComp(p.pinia),{tableViewContents:at,itemData:Be,isEdit:Fe,routeToChildPath:he,lockingPage:B}=p.storeToRefs(Oe),te=e.ref(null),ne=e.ref(!1),de=e.ref(!1),Xe=Kt.useMenuState(),{activeMenuPath:ot}=p.storeToRefs(Xe),G=ze.useOriginalState(p.pinia),{originalPath:R}=p.storeToRefs(G),ve=e.ref([]),xe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Me=async I=>{de.value=I,await tt("disabled",null,I,!0)},Ve=async I=>{await tt("operable",null,I,!0)};e.watch(()=>ot.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Je=()=>{e.nextTick(()=>{st()})},He=I=>{var J;d.value=(J=d.value)==null?void 0:J.map(z=>({...z,isFormColHidden:!(I!=null&&I.includes(z.label))}))};e.onUnmounted(()=>{te.value=null});const it=I=>{c("clickTrigger",I)},ee=async I=>{var J,z,le,F,U,be;if(I===""){let oe="";(J=d.value)==null||J.forEach(ge=>{ge!=null&&ge.isMain&&(oe=ge==null?void 0:ge.value)});let q=await ze.getItemData(he.value,sessionStorage.getItem("systemKey"),"");oe=((be=(U=(F=(le=(z=q==null?void 0:q[0])==null?void 0:z.compData)==null?void 0:le.find(ge=>(ge==null?void 0:ge.key)==="mainRouters"))==null?void 0:F.contents)==null?void 0:U[0])==null?void 0:be.routerContent)+R.value+oe;let ae=await ze.getItemData(oe,sessionStorage.getItem("systemKey"),"");ke.value=!0,W.value=ae==null?void 0:ae.filter(ge=>(ge==null?void 0:ge.comp)!=="methodButton"),c("routeUrl",W.value)}},st=()=>{var J;const I=(J=te.value)==null?void 0:J.$el;I&&ze.Sortable.create(I,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:le,newIndex:F}=z;if(le===F)return;const U=d.value.splice(le,1)[0];d.value.splice(F,0,U)}})},tt=async(I,J,z,le=!1)=>{var F,U,be,oe,q,Q,ae,ge;try{Oe.setRefreshCurStructure(!1);const fe=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((F=fe==null?void 0:fe.data)==null?void 0:F.code)===200){let ye=(q=(oe=(be=(U=fe==null?void 0:fe.data)==null?void 0:U.result)==null?void 0:be[0])==null?void 0:oe.value)==null?void 0:q.pageData;le?ye={...ye,compData:(ae=ye==null?void 0:ye.compData)==null?void 0:ae.map(re=>{var ce;return(re==null?void 0:re.key)==="formContent"?{...re,contents:(ce=re==null?void 0:re.contents)==null?void 0:ce.map(Ee=>({...Ee,[I]:z}))}:re})}:ye={...ye,compData:(Q=ye==null?void 0:ye.compData)==null?void 0:Q.map(re=>{var ce;return(re==null?void 0:re.key)==="formContent"?{...re,contents:(ce=re==null?void 0:re.contents)==null?void 0:ce.map(Ee=>(Ee==null?void 0:Ee.prop)===(J==null?void 0:J.prop)?{...Ee,[I]:z}:Ee)}:re})};const $=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:ye}});((ge=$==null?void 0:$.data)==null?void 0:ge.code)===200?(p.ElMessage.success("编辑成功"),Oe.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},Re=async(I,J)=>{await tt("label",J,I)},pe=async(I,J)=>{I&&await tt("type",J,I)},ie=async(I,J,z)=>{await tt(J,z,I,!1)},ue=(I,J)=>{T.value===J?se.value=!1:se.value=!0,T.value=J==null?void 0:J.changeProp},Te=async I=>{var z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;let J=[];if((z=I==null?void 0:I.toString())!=null&&z.includes(".urdf")){if(I.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:I,extension:D(I)}],v.value=!0,x.value=!0;return}if((le=I==null?void 0:I.toString())!=null&&le.includes(".stl")||(F=I==null?void 0:I.toString())!=null&&F.includes(".STL")||(U=I==null?void 0:I.toString())!=null&&U.includes(".obj")||(be=I==null?void 0:I.toString())!=null&&be.includes(".mtl")){const Ze=((oe=I==null?void 0:I.toString())==null?void 0:oe.split(",")).map(Ne=>({url:Ne,extension:D(Ne)}));h.value=Ze,v.value=!1,x.value=!0;return}if((q=I==null?void 0:I.toString())!=null&&q.includes(".stl")||(Q=I==null?void 0:I.toString())!=null&&Q.includes(".STL")||(ae=I==null?void 0:I.toString())!=null&&ae.includes(".obj")||(ge=I==null?void 0:I.toString())!=null&&ge.includes(".mtl")){let Ee,Ze=[],Ne={};if(Array.isArray(I)?Ee=I:Ee=I==null?void 0:I.split(","),Ee==null||Ee.forEach(Ae=>{Ae.includes(".mtl")?Ze.push(Ae):Ne.blob=Ne.blob?Ne.blob+","+Ae:Ae}),(Ze==null?void 0:Ze.length)>0&&(Ne.mtlBlobs=Ze),(ye=(fe=Object.values(Ne))==null?void 0:fe[0])!=null&&ye.includes("http:"))J.push(Ne);else{const Ae=new Blob([Ne.blob],{type:"application/octet-stream;charset=UTF-8"});let me=URL.createObjectURL(Ae),rt="";($=I==null?void 0:I.split("/"))==null||$.forEach((Ue,Ke)=>{var De;Ke===((De=I==null?void 0:I.split("/"))==null?void 0:De.length)-1&&(rt=Ue)}),(re=Ne.blob)!=null&&re.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),V.value=[{name:rt,blobUrl:me}],O.value=!0}}else{const Ee=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ze=await p.axios.get(I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ee.close()}),Ne=new Blob([Ze.data],{type:"application/octet-stream;charset=UTF-8"});let Ae=URL.createObjectURL(Ne),me="";(ce=I==null?void 0:I.split("/"))==null||ce.forEach((rt,Ue)=>{var Ke;Ue===((Ke=I==null?void 0:I.split("/"))==null?void 0:Ke.length)-1&&(me=rt)}),V.value=[{name:me,blobUrl:Ae}],O.value=!0}(J==null?void 0:J.length)>0&&X.setBlobUrls(J)},Ge=()=>{O.value=!1},ft=I=>{var U,be,oe,q;const J=(be=(U=p.cloneDeep(l.itemData))==null?void 0:U.find(Q=>(Q==null?void 0:Q.key)==="formContent"))==null?void 0:be.contents,z=p.cloneDeep(I.content);let le={};z&&((oe=Object.values(z))==null?void 0:oe.length)>0&&((q=Object.values(z))==null||q.forEach((Q,ae)=>{le[J[ae].key]=Q}));const F={content:le,index:l==null?void 0:l.index,buttonName:I==null?void 0:I.buttonName};c("change",F)},g=e.computed(()=>"http://222.92.178.198:62001"),C=async I=>{var fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye;if(!I)return;(ye=(fe=l==null?void 0:l.itemData)==null?void 0:fe.find(Ce=>(Ce==null?void 0:Ce.key)==="parentFormPath"))==null||ye.contents;let J=at.value;(J==null?void 0:J.length)>0&&(J=J==null?void 0:J.map(Ce=>{var je,Qe,M,Se;let $e=(je=Ce==null?void 0:Ce.key)==null?void 0:je.split("/");return(l==null?void 0:l.compName)===($e==null?void 0:$e[0])&&(Qe=d.value)!=null&&Qe.find(ct=>(ct==null?void 0:ct.prop)===($e==null?void 0:$e[1]))&&(Ce.value=(Se=(M=d.value)==null?void 0:M.find(ct=>(ct==null?void 0:ct.prop)===($e==null?void 0:$e[1])))==null?void 0:Se.value),Ce}),Oe.setTableViewContents(J));const z=p.cloneDeep(l.itemData);let le=z==null?void 0:z.map(Ce=>{var $e;return(Ce==null?void 0:Ce.key)==="formContent"&&(($e=Ce.contents)==null||$e.map((je,Qe)=>{var M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et,It,Tt,jt,Rt,qt;return je.type=(Se=(M=d.value)==null?void 0:M.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Se.type,je.options=je!=null&&je.options?je.options:((et=(nt=(ct=je==null?void 0:je.key)==null?void 0:ct.split("$"))==null?void 0:nt[1])==null?void 0:et.length)>0?(dt=(We=da.formGetOptions((ut=(Ie=je==null?void 0:je.key)==null?void 0:Ie.split("$"))==null?void 0:ut[1]))==null?void 0:We.split(","))==null?void 0:dt.map(Ct=>({label:Ct,value:Ct})):[],(ht=je==null?void 0:je.key)!=null&&ht.includes("$")&&(je.key=(Dt=(mt=je==null?void 0:je.key)==null?void 0:mt.split("$"))==null?void 0:Dt[0]),je.signature=(Et=(Mt=d.value)==null?void 0:Mt.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Et.signature,je.isLoginUser=(Tt=(It=d.value)==null?void 0:It.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Tt.isLoginUser,je.value=(jt=Object.values(I))==null?void 0:jt[Qe],je.isFormColHidden=(qt=(Rt=d.value)==null?void 0:Rt.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:qt.isFormColHidden,je})),Ce}),F=d.value,U=(re=($=p.cloneDeep(le))==null?void 0:$.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:re.contents;if(F=F==null?void 0:F.map(Ce=>{var $e;return Ce.value=($e=U==null?void 0:U.find((je,Qe)=>((je==null?void 0:je.id)??Qe)===(Ce==null?void 0:Ce.id)))==null?void 0:$e.value,Ce}),!se.value){c("contentChange",{contents:le,index:l.index});return}let be="",oe=(Ze=(Ee=(ce=p.cloneDeep(le))==null?void 0:ce.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:Ee.contents)==null?void 0:Ze.find((Ce,$e)=>{var je,Qe,M;return(Ce==null?void 0:Ce.label)===T.value||$e.toString()===((M=(Qe=(je=T.value)==null?void 0:je.split("t"))==null?void 0:Qe[1])==null?void 0:M.toString())}),q=(Ne=oe==null?void 0:oe.optionUrl)==null?void 0:Ne.menuSelect,Q=!0;if((rt=(me=(Ae=p.cloneDeep(le))==null?void 0:Ae.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:me.contents)==null||rt.forEach(Ce=>{var $e,je,Qe,M,Se,ct;Q&&((Qe=(je=($e=Ce==null?void 0:Ce.optionUrl)==null?void 0:$e.groupSelect)==null?void 0:je[1])!=null&&Qe.includes("["))&&(be=(Se=(M=Ce==null?void 0:Ce.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Se[1],JSON.stringify(q)===JSON.stringify((ct=Ce==null?void 0:Ce.optionUrl)==null?void 0:ct.menuSelect)&&(Q=!1))}),(Ue=oe==null?void 0:oe.optionUrl)!=null&&Ue.menuSelect&&se.value){let Ce=await da.getSelectRow(oe),$e,je=(Ke=oe==null?void 0:oe.optionUrl)==null?void 0:Ke.menuSelect;if(Ce==null||Ce.forEach(Qe=>{var M,Se,ct,nt,et,Ie,ut,We,dt,ht;be===((Se=(M=oe==null?void 0:oe.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Se[1])&&((et=(nt=(ct=oe==null?void 0:oe.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])!=null&&et.includes("["))&&((ht=p.cloneDeep(Qe))==null?void 0:ht[(dt=(We=(ut=(Ie=oe==null?void 0:oe.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:ut[1])==null?void 0:We.replaceAll("[",""))==null?void 0:dt.replaceAll("]","")])===(oe==null?void 0:oe.value)&&($e=Qe)}),$e){let Qe=p.cloneDeep(F);Qe=Qe==null?void 0:Qe.map(Se=>{var ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt;return($e!=null&&$e[Se==null?void 0:Se.label]||$e!=null&&$e[(Ie=(et=(nt=(ct=Se==null?void 0:Se.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Ie.replaceAll("]","")])&&((dt=(We=(ut=Se==null?void 0:Se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:We[1])!=null&&dt.includes("["))&&je!=null&&je.every(Et=>{var It,Tt;return(Tt=(It=Se==null?void 0:Se.optionUrl)==null?void 0:It.menuSelect)==null?void 0:Tt.includes(Et)})&&(Se.value=($e==null?void 0:$e[Se==null?void 0:Se.label])||($e==null?void 0:$e[(Mt=(Dt=(mt=(ht=Se==null?void 0:Se.optionUrl)==null?void 0:ht.groupSelect)==null?void 0:mt[1])==null?void 0:Dt.replaceAll("[",""))==null?void 0:Mt.replaceAll("]","")]),Array.isArray(Se.value)&&Se.value.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(Se.type="Upload")),Se}),Qe=Qe==null?void 0:Qe.map(Se=>{var ct,nt,et;return(ct=Se==null?void 0:Se.optionUrl)!=null&&ct.oldMenuSelect&&(Se.optionUrl.menuSelect=(et=(nt=p.cloneDeep(Se))==null?void 0:nt.optionUrl)==null?void 0:et.oldMenuSelect),Se}),d.value=p.cloneDeep(Qe);let M=p.cloneDeep(Qe);M=M==null?void 0:M.map(Se=>{var ct,nt,et,Ie,ut,We;return(nt=(ct=Se==null?void 0:Se.optionUrl)==null?void 0:ct.menuSelect)!=null&&nt.some(dt=>dt==null?void 0:dt.includes("["))&&(Se.optionUrl.oldMenuSelect=(Ie=(et=p.cloneDeep(Se))==null?void 0:et.optionUrl)==null?void 0:Ie.menuSelect,Se.optionUrl.menuSelect=(We=(ut=Se==null?void 0:Se.optionUrl)==null?void 0:ut.menuSelect)==null?void 0:We.map(dt=>{var ht,mt,Dt,Mt;if(dt!=null&&dt.includes("[")){let Et=(mt=(ht=dt==null?void 0:dt.replaceAll("[","").replaceAll("]",""))==null?void 0:ht.split(":"))==null?void 0:mt[1];dt=(Mt=(Dt=p.cloneDeep(Qe))==null?void 0:Dt.find(It=>(It==null?void 0:It.label)===Et))==null?void 0:Mt.value}return dt})),Se}),d.value=M}else d.value=F;le=le==null?void 0:le.map(Qe=>{var M;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(M=Qe.contents)==null?void 0:M.map(Se=>{var ct,nt,et,Ie;return Se.value=((nt=(ct=d.value)==null?void 0:ct.find(ut=>(ut==null?void 0:ut.label)===(Se==null?void 0:Se.key)))==null?void 0:nt.value)??(Se==null?void 0:Se.value),Se.type=((Ie=(et=d.value)==null?void 0:et.find(ut=>(ut==null?void 0:ut.prop)===(Se==null?void 0:Se.key)))==null?void 0:Ie.type)??(Se==null?void 0:Se.type),Se})),Qe})}se.value=!1,c("contentChange",{contents:le,index:l.index});let ae=[],ge=[];if((_e=p.cloneDeep((De=le==null?void 0:le.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:De.contents))==null||_e.forEach(Ce=>{var $e;Array.isArray(Ce==null?void 0:Ce.value)&&(($e=Ce==null?void 0:Ce.value)!=null&&$e.find(je=>{var Qe;return(Qe=je==null?void 0:je.url)==null?void 0:Qe.includes(".obj")}))&&(ge=Ce==null?void 0:Ce.value)}),(ge==null?void 0:ge.length)>0){const Ce=(Ye=p.cloneDeep(ge))==null?void 0:Ye.filter($e=>{var je;return(je=$e==null?void 0:$e.url)==null?void 0:je.includes(".obj")});Ce==null||Ce.forEach($e=>{var Qe,M,Se,ct;const je=(Qe=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Qe.map(nt=>nt==null?void 0:nt.url);ae.push({objUrl:$e==null?void 0:$e.url,mtlUrls:((M=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:M.length)===1?(ct=(Se=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Se[0])==null?void 0:ct.url:je})}),X.setObjUrl(ae)}},K=I=>{if(!I)return;const J=[];let z="";for(let le of I)(le.includes("[")||z.includes("["))&&(z+=le.trim(),p.cloneDeep(z).split("【").length-1===p.cloneDeep(z).split("】").length-1&&p.cloneDeep(z).split("[").length-1===p.cloneDeep(z).split("]").length-1&&(J.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return J},Y=(I,J,z)=>{let le="";const F=J==null?void 0:J.map(U=>{var be;return(be=U==null?void 0:U.value)==null?void 0:be.pageData});return F==null||F.forEach(U=>{var be;(U==null?void 0:U.name)===(I==null?void 0:I[0])&&((be=U==null?void 0:U.compData)==null||be.forEach(oe=>{var q;(oe==null?void 0:oe.key)==="formContent"&&((q=oe==null?void 0:oe.contents)==null||q.forEach(Q=>{var ae;(Q==null?void 0:Q.prop)===(I==null?void 0:I[1])&&(le=(Q==null?void 0:Q.value)===""?ze.judgeContents((ae=p.cloneDeep(Q))==null?void 0:ae.optionUrl,z):Q==null?void 0:Q.value)}))}))}),le},w=(I,J,z,le)=>{var oe,q;let F="",U="";(oe=p.cloneDeep(J))==null||oe.forEach((Q,ae)=>{Q!=null&&Q.includes("[")?U=U+R.value+I[ae]:U=U===""?U+Q:U+"/"+Q});let be=(q=le[U])==null?void 0:q.map(Q=>{var ae;return(ae=Q==null?void 0:Q.value)==null?void 0:ae.pageData});return be==null||be.forEach(Q=>{var ae;(Q==null?void 0:Q.name)===(z==null?void 0:z[0])&&((ae=Q==null?void 0:Q.compData)==null||ae.forEach(ge=>{var fe;(ge==null?void 0:ge.key)==="formContent"&&((fe=ge==null?void 0:ge.contents)==null||fe.forEach(ye=>{(ye==null?void 0:ye.prop)===(z==null?void 0:z[1])&&(F=ye==null?void 0:ye.value)}))}))}),F};return e.watch(()=>l.itemData,async()=>{var be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke;const I=(be=l.itemData)==null?void 0:be.find(De=>(De==null?void 0:De.key)==="formContent"),J=(oe=p.cloneDeep(l.itemData))==null?void 0:oe.find(De=>(De==null?void 0:De.key)==="formButton"),z=(q=p.cloneDeep(l.itemData))==null?void 0:q.find(De=>(De==null?void 0:De.key)==="formFlex"),le=(Q=p.cloneDeep(l.itemData))==null?void 0:Q.find(De=>(De==null?void 0:De.key)==="formWrap"),F=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(De=>(De==null?void 0:De.key)==="enableWrap");if((le==null?void 0:le.contents)==="纵向"?_.value=!1:_.value=!0,y.value=(F==null?void 0:F.contents)===void 0?!1:F==null?void 0:F.contents,L.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((ge=z==null?void 0:z.contents)==null?void 0:ge.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((fe=I==null?void 0:I.contents)==null?void 0:fe.length)>0&&Array.isArray(I==null?void 0:I.contents)){let De=l.allMapContents;const _e=($=(ye=p.cloneDeep(I))==null?void 0:ye.contents)==null?void 0:$.map((M,Se)=>{var Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In,mn,Gn,Xn,Yn,$n,Bn,yn,On,An,an,Dn,Jn;let ct=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",nt=(M==null?void 0:M.type)??"",et=(M==null?void 0:M.options)??[];if((Et=M==null?void 0:M.key)!=null&&Et.includes("$")&&(ct=(It=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:It[0],((jt=(Tt=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Tt[1])==null?void 0:jt.length)>0)){const[kt,Jt]=(qt=(Rt=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Rt[1])==null?void 0:qt.split(/[()]/);nt=((Ct=ze.FormType.find(gt=>(gt==null?void 0:gt.key)===kt))==null?void 0:Ct.value)??"",((xn=Jt==null?void 0:Jt.split(","))==null?void 0:xn.length)>0&&(et=(hn=Jt==null?void 0:Jt.split(","))==null?void 0:hn.map(gt=>({label:gt,value:gt})))}let Ie=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Ie=(Sn=(wn=M==null?void 0:M.contents)==null?void 0:wn.split(","))==null?void 0:Sn.map(kt=>({label:kt,value:kt}))),((vn=M==null?void 0:M.optionUrl)==null?void 0:vn.selectRelateType)==="自定义绑定"&&(Ie=(gn=(Tn=M==null?void 0:M.optionUrl)==null?void 0:Tn.defaultSelect)==null?void 0:gn.map(kt=>({label:kt,value:kt})));let ut=!1,We=(M==null?void 0:M.isFormColHidden)??!1,dt=ze.judgeContents((In=p.cloneDeep(M))==null?void 0:In.optionUrl,De),ht=dt!==void 0&&dt!==""?dt:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(et==null?void 0:et.length)>0?(mn=et==null?void 0:et[0])==null?void 0:mn.value:(M==null?void 0:M.value)??"",mt=!1,Dt=dt!==void 0||nt===""?"Input":nt;if((Array.isArray(dt)&&(dt!=null&&dt.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url)))||Array.isArray(ht)&&(ht!=null&&ht.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url))))&&(Dt="upload"),typeof ht=="string"&&(ht!=null&&ht.includes("loginUser"))&&!(ht!=null&&ht.includes("loginUserSign"))||M!=null&&M.isLoginUser)ut=!0,ht=((Gn=A.value)==null?void 0:Gn.姓名)||((Xn=A.value)==null?void 0:Xn.account)||((Yn=A.value)==null?void 0:Yn.账号)||(($n=A.value)==null?void 0:$n.userName);else if(typeof ht=="string"&&(ht!=null&&ht.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(mt=!0,(M==null?void 0:M.isShow)==="originalSignature")Dt="image",ht=g.value+"/"+((Bn=A.value)==null?void 0:Bn.signature);else{let kt=[...new Set(K(M.isShow))].map(zt=>{var Mn,on,Cn,Zt;return{key:(Zt=(Cn=(on=(Mn=zt==null?void 0:zt.split("["))==null?void 0:Mn[1])==null?void 0:on.split("]"))==null?void 0:Cn[0])==null?void 0:Zt.split(":"),value:""}});(yn=Be.value)==null||yn.forEach(zt=>{kt==null||kt.forEach((cn,Mn)=>{var Cn;let on=cn==null?void 0:cn.key;(zt==null?void 0:zt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Cn=zt==null?void 0:zt.compData)==null||Cn.forEach(Zt=>{var jn;(Zt==null?void 0:Zt.key)==="formContent"&&((jn=Zt==null?void 0:Zt.contents)==null||jn.forEach(Bt=>{(Bt==null?void 0:Bt.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(kt[Mn].value=Bt==null?void 0:Bt.value)}))}))})});let Jt=kt==null?void 0:kt.map(zt=>{var cn;return zt.key="["+((cn=zt.key)==null?void 0:cn.join(":"))+"]",zt}),gt=M==null?void 0:M.isShow;Jt==null||Jt.forEach(zt=>{zt!=null&&zt.value?gt=gt.replaceAll(zt==null?void 0:zt.key,"'"+(zt==null?void 0:zt.value)+"'"):gt=gt.replaceAll(zt==null?void 0:zt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((On=gt==null?void 0:gt.split("==="))==null?void 0:On[0])+"==='"+((An=gt==null?void 0:gt.split("==="))==null?void 0:An[1])+"'":gt=((an=gt==null?void 0:gt.split("="))==null?void 0:an[0])+"='"+((Dn=gt==null?void 0:gt.split("="))==null?void 0:Dn[1])+"'"),gt!=null&&gt.includes("=")&&!(gt!=null&&gt.includes("=="))&&!(gt!=null&&gt.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(We=!1,Dt="image",ht=g.value+"/"+((Jn=A.value)==null?void 0:Jn.signature)):ht=""}return Array.isArray(ht)&&ht.every(kt=>(kt==null?void 0:kt.url)&&(kt==null?void 0:kt.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Dt="Url"),{label:ct??"",name:"t"+Se,prop:p.cloneDeep(M==null?void 0:M.key),type:Dt,value:M!=null&&M.isNewDate&&ht===""?new Date:ht,id:(M==null?void 0:M.id)??Se,contents:(Ie==null?void 0:Ie.length)>0?Ie:et??[],width:(M==null?void 0:M.width)??1,isLoginUser:ut,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:We,signature:mt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1}}),Ye=_e==null?void 0:_e.map(M=>M==null?void 0:M.value);let Ce="";Ye==null||Ye.forEach(M=>{M!==""&&M!==void 0&&(Ce=Ce===""?M:Ce+"/"+M)}),P.setSelectArray(Ye),P.setSelectString(Ce);let $e=(re=p.cloneDeep(_e))==null?void 0:re.map(M=>(M!=null&&M.value&&ze.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));$e=$e==null?void 0:$e.map(M=>{var Se,ct,nt,et,Ie,ut,We,dt;if((ct=(Se=M==null?void 0:M.optionUrl)==null?void 0:Se.menuSelect)!=null&&ct.some(ht=>ht==null?void 0:ht.includes("["))){let ht="";M.optionUrl.oldMenuSelect=(et=(nt=p.cloneDeep(M))==null?void 0:nt.optionUrl)==null?void 0:et.menuSelect,M.optionUrl.menuSelect=(ut=(Ie=M==null?void 0:M.optionUrl)==null?void 0:Ie.menuSelect)==null?void 0:ut.map(mt=>{var Dt,Mt,Et,It,Tt,jt;if(mt!=null&&mt.includes("[")){let Rt=(Mt=(Dt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:Dt.split(":"))==null?void 0:Mt[1];ht=Y((Et=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:Et.split(":"),De==null?void 0:De[ot.value],De),mt=((Tt=(It=p.cloneDeep($e))==null?void 0:It.find(qt=>(qt==null?void 0:qt.label)===Rt))==null?void 0:Tt.value)||Y((jt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:jt.split(":"),De==null?void 0:De[ot.value],De)}return mt}),ht!==""&&M.value===""&&(M.value=w(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(We=M==null?void 0:M.optionUrl)==null?void 0:We.groupSelect,De),Array.isArray(M.value)&&((dt=M.value)!=null&&dt.every(mt=>mt==null?void 0:mt.url))&&(M.type="UPLOAD"))}return M}),d.value=$e,de.value=((ce=d.value)==null?void 0:ce.every(M=>M==null?void 0:M.disabled))||B.value===ot.value,ne.value=(Ee=d.value)==null?void 0:Ee.every(M=>M==null?void 0:M.operable),ve.value=(Ze=d.value)==null?void 0:Ze.map(M=>M==null?void 0:M.label);let je=[],Qe=[];if((Ne=p.cloneDeep(d.value))==null||Ne.forEach(M=>{var Se;Array.isArray(M==null?void 0:M.value)&&((Se=M==null?void 0:M.value)!=null&&Se.find(ct=>{var nt;return(nt=ct==null?void 0:ct.url)==null?void 0:nt.includes(".obj")}))&&(Qe=M==null?void 0:M.value)}),(Qe==null?void 0:Qe.length)>0){const M=(Ae=p.cloneDeep(Qe))==null?void 0:Ae.filter(Se=>{var ct;return(ct=Se==null?void 0:Se.url)==null?void 0:ct.includes(".obj")});M==null||M.forEach(Se=>{var nt,et,Ie,ut;const ct=(nt=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:nt.map(We=>We==null?void 0:We.url);je.push({objUrl:Se==null?void 0:Se.url,mtlUrls:((et=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:et.length)===1?(ut=(Ie=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:ut.url:ct})}),X.setObjUrl(je)}(me=p.cloneDeep(d.value))==null||me.forEach(M=>{var Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et;if((ct=(Se=M==null?void 0:M.value)==null?void 0:Se.toString())!=null&&ct.includes(".stl")||(et=(nt=M==null?void 0:M.value)==null?void 0:nt.toString())!=null&&et.includes(".STL")||(ut=(Ie=M==null?void 0:M.value)==null?void 0:Ie.toString())!=null&&ut.includes(".obj")||(dt=(We=M==null?void 0:M.value)==null?void 0:We.toString())!=null&&dt.includes(".mtl")||(mt=(ht=M==null?void 0:M.value)==null?void 0:ht.toString())!=null&&mt.includes(".urdf")){let It={},Tt=[],jt;Array.isArray(M==null?void 0:M.value)?jt=M==null?void 0:M.value:jt=(Dt=M==null?void 0:M.value)==null?void 0:Dt.split(","),jt==null||jt.forEach(Rt=>{Rt.includes(".mtl")?Tt.push(Rt):It.blob=It.blob==="undefined"?Rt:It.blob+","+Rt}),(Tt==null?void 0:Tt.length)>0&&(It.mtlBlobs=Tt),(Et=(Mt=Object.values(It))==null?void 0:Mt[0])!=null&&Et.includes("http:")}})}else d.value=[];let U=at.value;if((U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(De=>{var Ye,Ce,$e,je;let _e=(Ye=De==null?void 0:De.key)==null?void 0:Ye.split("/");return(l==null?void 0:l.compName)===(_e==null?void 0:_e[0])&&(Ce=d.value)!=null&&Ce.find(Qe=>(Qe==null?void 0:Qe.prop)===(_e==null?void 0:_e[1]))&&(De.value=(je=($e=d.value)==null?void 0:$e.find(Qe=>(Qe==null?void 0:Qe.prop)===(_e==null?void 0:_e[1])))==null?void 0:je.value),De}),Oe.setTableViewContents(U)),l!=null&&l.formRules)E.value=l==null?void 0:l.formRules;else{let De={};(rt=p.cloneDeep(d).value)==null||rt.forEach(_e=>{(_e==null?void 0:_e.isMain)===!0&&(De[(_e==null?void 0:_e.prop)??(_e==null?void 0:_e.name)]=[{required:!0,message:`${(_e==null?void 0:_e.prop)||(_e==null?void 0:_e.name)}不能为空`}])}),E.value=De}if(((Ue=J==null?void 0:J.contents)==null?void 0:Ue.length)>0){const De=[];(Ke=J==null?void 0:J.contents)==null||Ke.forEach((_e,Ye)=>{(_e==null?void 0:_e.label)!==""&&De.push({label:(_e==null?void 0:_e.label)??"",id:(_e==null?void 0:_e.id)??Ye,type:(_e==null?void 0:_e.type)??"",background:_e==null?void 0:_e.background})}),H.value=De}else H.value=[]},{deep:!0,immediate:!0}),e.watch(()=>B.value,I=>{de.value=I===ot.value},{immediate:!0}),(I,J)=>{const z=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-switch"),F=e.resolveComponent("el-checkbox"),U=e.resolveComponent("el-popover"),be=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Qr,[e.createVNode(Vt.ssForm,{rowContents:d.value,formRules:E.value,buttonValue:H.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:ft,onChange:C,formDisabled:de.value,formLabelsOperable:ne.value,isButtonRow:_.value,onPreview:Te,onBlurChange:ue,onHandleColEditChange:Re,onHandleColTypeChange:pe,onRouteUrl:ee,onClickTrigger:it},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:q,formLabelsOperable:Q})=>[e.createVNode(U,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Je},{reference:e.withCtx(()=>[e.createElementVNode("span",Zr,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ei,[J[1]||(J[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(le,{"model-value":q,"active-text":"禁用","inactive-text":"",onChange:Me,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(le,{"model-value":Q,"active-text":"编辑所有标签","inactive-text":"",onChange:Ve},null,8,["model-value"]),J[2]||(J[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(be,{modelValue:ve.value,"onUpdate:modelValue":J[0]||(J[0]=ae=>ve.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:He},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(F,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(U,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ge;return[e.createElementVNode("div",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=Object.keys(ae))==null?void 0:ge.filter(fe=>{var ye;return(ye=xe.value)==null?void 0:ye.find($=>($==null?void 0:$.value)===fe)}),fe=>{var ye,$;return e.openBlock(),e.createElementBlock("div",{key:fe},[e.createVNode(Vt._sfc_main$1,{value:ae==null?void 0:ae[fe],"active-text":($=(ye=xe.value)==null?void 0:ye.find(re=>(re==null?void 0:re.value)===fe))==null?void 0:$.label,inactiveText:"",onChange:re=>ie(re,fe,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(z,{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"]),O.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:V.value,onDestroy:Ge},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Vo.ThreeViewerHost,{files:h.value,onGetAnimationData:I.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Lo=Ft._export_sfc(ai,[["__scopeId","data-v-e237c271"]]),qa=e.ref(0),Cl=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Cl(l==null?void 0:l.children)},l))},oi=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Cl(l==null?void 0:l.children)},l))},El=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,i),l)),a)},_l=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,i),l)),a)},Sl=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,i),l)),a)},Tl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=Tl(l==null?void 0:l.children,i),l)),a)},Nt=[{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"}],ri=[{label:"新增",value:"add"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ri},{key:"background",label:"按钮背景色",type:"Color"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],ii={class:"table-header-child"},si={class:"table-header-child-main"},ci={class:"table-header-child-content"},ui={class:"table-header-child-content-item"},pi={class:"fix-button"},di={key:0},fi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=ze.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=y=>{var k;c.value=!0;let L=[];Nt==null||Nt.forEach(A=>{let T=p.cloneDeep(v.value)+1;x.setTableIndex(T),L.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:y[A.key],id:v.value,contents:A==null?void 0:A.options})}),y!=null&&y.children&&((k=y==null?void 0:y.children)==null?void 0:k.length)>0&&L.push({children:y==null?void 0:y.children,isFormColHidden:!0}),h.value=y==null?void 0:y.id,D.value=L,E.value=L},O=y=>{l("fixChange",p.cloneDeep(y))},H=y=>{l("deleteChange",p.cloneDeep(y))},V=y=>{c.value=!0;let L=[];Nt==null||Nt.forEach(k=>{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),L.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=y==null?void 0:y.id,D.value=L,E.value=L},ke=y=>{let L=p.cloneDeep(E.value);L=L==null?void 0:L.map(k=>(k.children||(k.value=y==null?void 0:y[k.name]),k)),E.value=L},W=()=>{var L,k;D.value=E.value;let y={};if(h.value!=="")y.id=h.value,(L=D.value)==null||L.forEach(A=>{const T=Nt==null?void 0:Nt.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));T?y[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"fix"});else{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),y.id="id"+v.value,(k=D.value)==null||k.forEach(T=>{const se=Nt==null?void 0:Nt.find(Oe=>(Oe==null?void 0:Oe.label)===(T==null?void 0:T.label));se?y[se.key]=T.value:T!=null&&T.children&&T.children.length>0&&(y.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},P=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},X=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",y),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(y,L)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",ui,e.toDisplayString(A.label),1),e.createElementVNode("div",pi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>X(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",di,[e.createVNode(Il,{tableChildContents:A==null?void 0:A.children,onDeleteChange:H,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",fi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:W},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},vi=Ft._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),gi={class:"table-header-child"},mi={class:"table-header-child-main"},yi={class:"table-header-child-content"},bi={class:"table-header-child-content-item"},ki={class:"fix-button"},xi={key:0},wi={class:"form-content"},Di={class:"dialog-footer"},Ci={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=ze.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=y=>{l("fixChange",p.cloneDeep(y))},O=y=>{var k;c.value=!0;let L=[];Nt==null||Nt.forEach(A=>{let T=p.cloneDeep(v.value)+1;x.setTableIndex(T),L.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:y[A.key],id:v.value,contents:A==null?void 0:A.options})}),y!=null&&y.children&&((k=y==null?void 0:y.children)==null?void 0:k.length)>0&&L.push({children:y==null?void 0:y.children,isFormColHidden:!0}),h.value=y==null?void 0:y.id,D.value=L,E.value=L},H=y=>{c.value=!0;let L=[];Nt==null||Nt.forEach(k=>{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),L.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=y==null?void 0:y.id,D.value=L,E.value=L},V=y=>{let L=p.cloneDeep(E.value);L=L==null?void 0:L.map(k=>(k.children||(k.value=y==null?void 0:y[k.name]),k)),E.value=L},ke=()=>{var L,k;D.value=E.value;let y={};if(h.value!=="")y.id=h.value,(L=D.value)==null||L.forEach(A=>{const T=Nt==null?void 0:Nt.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));T?y[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"fix"});else{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),y.id="idChild"+v.value,(k=D.value)==null||k.forEach(T=>{const se=Nt==null?void 0:Nt.find(Oe=>(Oe==null?void 0:Oe.label)===(T==null?void 0:T.label));se?y[se.key]=T.value:T!=null&&T.children&&T.children.length>0&&(y.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},W=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},P=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",y),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},X=y=>{l("deleteChange",y)};return(y,L)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,se)=>(e.openBlock(),e.createElementBlock("div",mi,[e.createElementVNode("div",yi,[e.createElementVNode("div",bi,e.toDisplayString(T.label),1),e.createElementVNode("div",ki,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>H(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>O(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>P(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",xi,[e.createVNode(vi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:X,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",wi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Di,[e.createVNode(A,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>L[0]||(L[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>L[1]||(L[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Il=Ft._export_sfc(Ci,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},_i={class:"table-operate-item"},Si={class:"operate-title"},Ti={class:"operate-content"},Ii={class:"fix-content"},Bi={class:"fix-content-label"},Ai={class:"fix-button"},Ni={key:0},Vi={class:"operate-title"},Oi={class:"operate-content"},Mi={class:"fix-content"},zi={class:"fix-content-label"},Ri={class:"fix-button"},Li={class:"operate-title"},Fi={class:"operate-content"},Pi={class:"fix-content"},$i={class:"fix-content-label"},ji={class:"fix-button"},Ki={class:"operate-title"},Ui={class:"operate-content"},Wi={class:"fix-content"},Hi={class:"fix-content-label"},qi={class:"fix-button"},Gi={class:"operate-content"},Xi={style:{display:"flex","justify-content":"space-between"}},Yi={class:"form-content"},Ji={class:"dialog-footer"},Qi={class:"form-content"},Zi={class:"dialog-footer"},es={class:"form-content"},ts={class:"dialog-footer"},ns={class:"form-content"},as={class:"dialog-footer"},os={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),v=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),O=e.ref(""),H=e.ref(""),V=e.ref([]),ke=e.ref([]),W=e.ref([]),P=e.ref([]),X=e.ref(!1),y=e.ref([]),L=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),se=e.ref([]),Oe=()=>{X.value=!0;let g=[];Rn==null||Rn.forEach(C=>{k.value++,g.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:k.value,contents:C==null?void 0:C.options})}),y.value=g,L.value=g},at=()=>{var C,K,Y;x.value=!0;let g=[];(Y=(K=(C=ze.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:K.value)==null||Y.forEach(w=>{k.value++,g.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:k.value,contents:w==null?void 0:w.options})}),A.value=g,T.value=g},Be=g=>{g||(A.value=T.value)},Fe=async g=>{var C,K,Y,w,I,J,z,le,F,U,be,oe;if((g==null?void 0:g.类型)!==((K=(C=T.value)==null?void 0:C.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:K.value)){let q=[],Q=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:w.value)==null?void 0:I.value)?await((U=(F=(le=ze.FormContent)==null?void 0:le.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:F.value)==null?void 0:U.value):(z=(J=ze.FormContent)==null?void 0:J.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:z.value;if(Q==null||Q.forEach(ae=>{k.value++,q.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label),type:ae.type,value:ae!=null&&ae.属性名?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):(g==null?void 0:g[ae.label])??"",id:k.value,contents:ae==null?void 0:ae.options,prop:(ae==null?void 0:ae.prop)||(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label)})}),g!=null&&g.菜单选项&&((be=g==null?void 0:g.菜单选项)==null?void 0:be.length)>0){const ae=await ze.menuToContentType(g==null?void 0:g.菜单选项);q=q==null?void 0:q.map(ge=>((ge==null?void 0:ge.name)==="组信息选项"&&(ge.contents=ae),ge))}T.value=await ze.selectToBase(p.cloneDeep(q)),A.value=await ze.selectToBase(p.cloneDeep(q))}else{let q=p.cloneDeep(A.value);if(q=q==null?void 0:q.map(Q=>(Q.value=g==null?void 0:g[Q.name],Q)),g!=null&&g.菜单选项&&((oe=g==null?void 0:g.菜单选项)==null?void 0:oe.length)>0){const Q=await ze.menuToContentType(g==null?void 0:g.菜单选项);q=q==null?void 0:q.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Q),ae))}q=ze.formToOptionsContents(q),T.value=await ze.selectToBase(p.cloneDeep(q))}},he=async g=>{await Fe(g),A.value=T.value},B=(g,C)=>{if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="selectRelateType"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.selectRelateType)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="menuSelect"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.menuSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="groupSelect"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.groupSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="originalContent")return(C==null?void 0:C.value)||C[g.key];if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="multiple"){const K=C[g.key];return wl(K)?K:g.default}return(g==null?void 0:g.label)==="类型"&&C[g.key]===""?"Input":(g==null?void 0:g.key)==="isFormColHidden"&&!C[g.key]?!1:C[g.key]},te=async g=>{var Y,w,I,J,z,le,F,U,be;x.value=!0;let C=[];const K=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:w.value)==null?void 0:I.value)?await((U=(F=(le=ze.FormContent)==null?void 0:le.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:F.value)==null?void 0:U.value):(z=(J=ze.FormContent)==null?void 0:J.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:z.value;if(K==null||K.forEach(oe=>{k.value++,C.push({label:oe==null?void 0:oe.label,name:(oe==null?void 0:oe.name)||(oe==null?void 0:oe.label),type:oe.type,value:(oe==null?void 0:oe.label)==="属性名"?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):B(oe,g),id:k.value,contents:oe==null?void 0:oe.options})}),g!=null&&g.menuSelect&&((be=g==null?void 0:g.menuSelect)==null?void 0:be.length)>0){const oe=await ze.menuToContentType(g==null?void 0:g.menuSelect);C=C==null?void 0:C.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=oe),q))}O.value=g==null?void 0:g.id,A.value=await ze.selectToBase(ze.formToOptionsContents(C)),T.value=await ze.selectToBase(ze.formToOptionsContents(C))},ne=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;se.value=(C=p.cloneDeep(se.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=se.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{x.value=!1,A.value=[],O.value=""},Xe=async()=>{var Y,w,I,J,z,le,F,U,be,oe;A.value=T.value;let g={};O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value);let C=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(q=>{var Q,ae;return(q==null?void 0:q.key)===(((ae=(Q=A.value)==null?void 0:Q.find(ge=>(ge==null?void 0:ge.label)==="类型"))==null?void 0:ae.value)??"label")}))==null?void 0:w.value)==null?void 0:I.value)??((z=(J=ze.FormContent)==null?void 0:J.find(q=>{var Q,ae;return(q==null?void 0:q.key)===(((ae=(Q=A.value)==null?void 0:Q.find(ge=>(ge==null?void 0:ge.label)==="类型"))==null?void 0:ae.value)??"label")}))==null?void 0:z.value);if((le=A.value)==null||le.forEach(q=>{const Q=C==null?void 0:C.find(ae=>(ae==null?void 0:ae.label)===(q==null?void 0:q.label));Q&&(g[Q.key]=q.value)}),g.name=g.label,(F=se.value)!=null&&F.find(q=>q.id===g.id))se.value=(U=se.value)==null?void 0:U.map(q=>(q.id===g.id&&(q=g),q));else{let q=p.cloneDeep(se.value);se.value||(se.value=[]),q.push(g),se.value=q}se.value=se.value.map(({id:q,...Q})=>Q),x.value=!1,O.value="";let K=p.cloneDeep(s.originalItemContents);(be=p.cloneDeep(s.originalItemContents))!=null&&be.find(q=>(q==null?void 0:q.key)==="tableToForm")?K=(oe=p.cloneDeep(s.originalItemContents))==null?void 0:oe.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=se.value),q)):K.push({key:"tableToForm",contents:se.value}),l("change",K)},ot=g=>{X.value=!0;let C=[];Rn==null||Rn.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:g[K.key],id:k.value,contents:K==null?void 0:K.options})}),O.value=g==null?void 0:g.id,y.value=C,L.value=C};e.watch(()=>E.value,()=>{var C,K;let g=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?g=(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):g.push({key:"page",contents:E.value}),l("change",g)},{deep:!0});const G=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;ke.value=(C=p.cloneDeep(ke.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=ke.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>{var K,Y,w,I,J;y.value=L.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=y.value)==null||K.forEach(z=>{const le=Rn==null?void 0:Rn.find(F=>(F==null?void 0:F.label)===(z==null?void 0:z.label));le?g[le.key]=z.value:z!=null&&z.children&&z.children.length>0&&(g.children=z.children)}),(Y=ke.value)!=null&&Y.find(z=>z.id===g.id))ke.value=(w=ke.value)==null?void 0:w.map(z=>(z.id===g.id&&(z=g),z));else{let z=p.cloneDeep(ke.value)??[];z.push(g),ke.value=z}X.value=!1,O.value="";let C=p.cloneDeep(s.originalItemContents);(I=p.cloneDeep(s.originalItemContents))!=null&&I.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(J=p.cloneDeep(s.originalItemContents))==null?void 0:J.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=ke.value),z)):C.push({key:"extraButton",contents:ke.value}),l("change",C)},ve=g=>{let C=p.cloneDeep(L.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),L.value=C},xe=()=>{X.value=!1,y.value=[],O.value=""},Me=g=>{h.value=!0;let C=[];Ln==null||Ln.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:g[K.key],id:k.value,contents:K==null?void 0:K.options})}),O.value=g==null?void 0:g.id,W.value=C,P.value=C},Ve=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=V.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Je=()=>{d.value=!0;let g=[];Nt==null||Nt.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=g,_.value=g},He=()=>{h.value=!0;let g=[];Ln==null||Ln.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),W.value=g,P.value=g},it=g=>{let C=p.cloneDeep(P.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),P.value=C},ee=()=>{var K,Y,w,I,J;W.value=P.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=W.value)==null||K.forEach(z=>{const le=Ln==null?void 0:Ln.find(F=>(F==null?void 0:F.label)===(z==null?void 0:z.label));le?g[le.key]=z.value:z!=null&&z.children&&z.children.length>0&&(g.children=z.children)}),(Y=V.value)!=null&&Y.find(z=>z.id===g.id))V.value=(w=V.value)==null?void 0:w.map(z=>(z.id===g.id&&(z=g),z));else{let z=p.cloneDeep(V.value);z.push(g),V.value=z}h.value=!1,O.value="";let C=p.cloneDeep(s.originalItemContents);(I=p.cloneDeep(s.originalItemContents))!=null&&I.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(J=p.cloneDeep(s.originalItemContents))==null?void 0:J.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=V.value),z)):C.push({key:"rowButton",contents:V.value}),l("change",C)},st=()=>{h.value=!1,O.value="",P.value=[],W.value=[]},tt=g=>{d.value=!0;let C=[];Nt==null||Nt.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:"",id:k.value,contents:K==null?void 0:K.options})}),D.value=C,H.value=g==null?void 0:g.id,_.value=C},Re=g=>{var C;v.value=El(p.cloneDeep(v.value),g==null?void 0:g.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(K=>{var Y;return(K==null?void 0:K.key)==="header"&&(K.contents=(Y=v.value)!=null&&Y.some(w=>w==null?void 0:w.children)?[v.value]:v.value),K}))},pe=g=>{var K,Y,w;g.type==="fix"?g.id!==""?v.value=Sl(v.value,g):v.value=_l(v.value,g==null?void 0:g.contents):v.value=Tl(v.value,g),v.value=(K=v.value)!=null&&K.some(I=>I==null?void 0:I.children)?[v.value]:v.value,O.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(I=>(I==null?void 0:I.key)==="header")?C=(w=p.cloneDeep(s.originalItemContents))==null?void 0:w.map(I=>((I==null?void 0:I.key)==="header"&&(I.contents=v.value),I)):C.push({key:"header",contents:v.value}),l("change",C)},ie=g=>{var K;d.value=!0;let C=[];Nt==null||Nt.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:g[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),g!=null&&g.children&&((K=g==null?void 0:g.children)==null?void 0:K.length)>0&&C.push({children:g==null?void 0:g.children,isFormColHidden:!0}),O.value=g==null?void 0:g.id,H.value="",D.value=C,_.value=C},ue=g=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),_.value=C},Te=()=>{d.value=!1,O.value="",H.value="",_.value=[]},Ge=()=>{var K,Y,w,I,J,z;D.value=_.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=D.value)==null||K.forEach(le=>{const F=Nt==null?void 0:Nt.find(U=>(U==null?void 0:U.label)===(le==null?void 0:le.label));F?g[F.key]=le.value:le!=null&&le.children&&le.children.length>0&&(g.children=le.children)}),(Y=v.value)!=null&&Y.find(le=>le.id===g.id))v.value=(w=v.value)==null?void 0:w.map(le=>(le.id===g.id&&(le=g),le));else{let le=p.cloneDeep(v.value)??[];H.value===""?le.push(g):le=le==null?void 0:le.map(F=>(F.id===H.value&&(F.children||(F.children=[]),F.children.push(g)),F)),v.value=le}v.value=(I=v.value)!=null&&I.some(le=>le==null?void 0:le.children)?[v.value]:v.value,d.value=!1,O.value="",H.value="";let C=p.cloneDeep(s.originalItemContents);(J=p.cloneDeep(s.originalItemContents))!=null&&J.find(le=>(le==null?void 0:le.key)==="header")?C=(z=p.cloneDeep(s.originalItemContents))==null?void 0:z.map(le=>((le==null?void 0:le.key)==="header"&&(le.contents=v.value),le)):C.push({key:"header",contents:v.value}),l("change",C)},ft=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;v.value=(C=p.cloneDeep(v.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>{var w;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(w=v.value)!=null&&w.some(I=>I==null?void 0:I.children)?[v.value]:v.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),v.value=(C=(g=c.value)==null?void 0:g.find($=>($==null?void 0:$.key)==="header"))==null?void 0:C.contents,V.value=(Y=(K=c.value)==null?void 0:K.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:Y.contents,ke.value=(I=(w=c.value)==null?void 0:w.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:I.contents,E.value=(z=(J=c.value)==null?void 0:J.find($=>($==null?void 0:$.key)==="page"))!=null&&z.contents?!!((F=(le=c.value)==null?void 0:le.find($=>($==null?void 0:$.key)==="page"))!=null&&F.contents):!1,se.value=(be=(U=c.value)==null?void 0:U.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:be.contents,v.value=(oe=v.value)==null?void 0:oe.map(($,re)=>(Array.isArray($)?$=oi($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??re,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),v.value=(q=v.value)!=null&&q.every($=>Array.isArray($))?(Q=v.value)==null?void 0:Q[0]:v.value,V.value=(ae=V.value)==null?void 0:ae.map(($,re)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??re}),ke.value=(ge=ke.value)==null?void 0:ge.map(($,re)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??re}),se.value)se.value=(ye=se.value)==null?void 0:ye.map($=>{k.value++;let re=$;return re.id=k.value,re});else{let $=[];const re=(fe=ze.getColumnChild(p.cloneDeep(v.value)))==null?void 0:fe.filter(ce=>(ce==null?void 0:ce.prop)!=="operate");re==null||re.forEach(ce=>{var Ee;k.value++,$.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.label),type:ce!=null&&ce.groupSelect?"Select":"Input",value:"",id:k.value,contents:ce==null?void 0:ce.options,menuSelect:ce==null?void 0:ce.formMenuSelect,groupSelect:(Ee=ce==null?void 0:ce.groupSelect)==null?void 0:Ee.split(":"),selectRelateType:"关联绑定列"})}),se.value=$}},{deep:!0,immediate:!0}),(g,C)=>{const K=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",_i,[e.createElementVNode("div",Si,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Je,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Ii,[e.createElementVNode("div",Bi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(K,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>tt(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ie(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ft(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Ni,[e.createVNode(Il,{tableChildContents:w==null?void 0:w.children,onDeleteChange:Re,onFixChange:pe},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Vi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:He},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Mi,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ri,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>Me(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>Ve(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Li,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Oe},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Pi,[e.createElementVNode("div",$i,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>ot(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>G(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ki,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Wi,[e.createElementVNode("div",Hi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",qi,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>te(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ne(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",Gi,[e.createElementVNode("div",Xi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Vt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=w=>E.value=w)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(Y,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:st,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:W.value,key:W.value,isEnableWrap:!0,onChange:it},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(Y,{onClick:st,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:X.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",es,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ts,[e.createVNode(Y,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:R,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Fe,onChangeVisible:Be,onBlurChange:he},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(Y,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Ft._export_sfc(os,[["__scopeId","data-v-7a6b87b5"]]),rs=Kt.useModelComp(p.pinia),{pageMapState:is}=p.storeToRefs(rs),ss=Kt.useMenuState(p.pinia),{activeMenuPath:cs}=p.storeToRefs(ss),us=e.ref(24),ps=e.ref(6),ds=e.ref(70),fs=e.ref(.18),hs=e.ref(45),vs=(a,i,s,l)=>{var c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((v=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:v.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||us.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:((H=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:H.minW)||ps.value,minH:((ke=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ke.minH)||fs.value,maxH:((P=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:P.maxH)||hs.value,i:((y=(X=a==null?void 0:a.value)==null?void 0:X.tableData)==null?void 0:y.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},gs=(a,i)=>{var l,c,d,x,v,h,D,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Bl=(a,i,s)=>{var x,v;const l=(v=(x=is.value)==null?void 0:x[cs.value])==null?void 0:v.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,_;return((_=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:_.id)===a.id}),d=gs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Bl(h,D))),{...vs(c,i,d,a)}},ms=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Bl(l,c)):[]},ys=a=>({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}]}]}}),bs=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),ks=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,v=>{var E;const h=ys(s==null?void 0:s.optionItems),D=v?(E=h[v==null?void 0:v.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[O,H]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===O)return{..._,value:H};return _})},{immediate:!0});const d=v=>Vt.getComponent(v),x=v=>{var h,D;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(O=>({...O,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(O=>({...O,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:v==null?void 0:v.prop})};return(v,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(_.type)),{modelValue:_.value,"onUpdate:modelValue":O=>_.value=O,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:O=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),xs=Ft._export_sfc(ks,[["__scopeId","data-v-6c233914"]]),ws=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(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=P=>P==null?void 0:P.reduce((X,y)=>(X[y==null?void 0:y.prop]=y==null?void 0:y.rule,X),{}),v=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(P,X,y)=>{var A;let L=[];(s==null?void 0:s.activeTabName)==="任务配置"?(L=[{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:P},{label:"按钮名称",value:"按钮名称",children:X}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(L=[{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:(A=s==null?void 0:s.relatedData)==null?void 0:A.map(T=>({label:T==null?void 0:T.任务名称,value:T==null?void 0:T.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return y&&(y==null?void 0:y.length)>0?k=[...L,..._(P,X,y)]:k=L,k},_=(P,X,y)=>{const L=[{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 y?L==null?void 0:L.filter(k=>y==null?void 0:y.includes(k==null?void 0:k.prop)):L},O=(P,X)=>{var T,se,Oe,at,Be,Fe,he,B,te;const y=((Be=(at=(Oe=(se=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:se.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Oe.contents)==null?void 0:at.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:Be.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],L=/button/i,k=((te=(B=(he=(Fe=s==null?void 0:s.comp)==null?void 0:Fe.compData)==null?void 0:he.filter(ne=>L.test(ne==null?void 0:ne.key)))==null?void 0:B.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:te.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],A=E(y,k,P);h.value=X?bs(A,X):A,P&&(P==null?void 0:P.length)>0&&d.value.push(...P==null?void 0:P.map(ne=>({prop:ne,rule:c})))};e.onMounted(()=>{O(null,s==null?void 0:s.extendItem)});const H=P=>{const X=P==null?void 0:P[D.value];if(D.value==="执行任务"){if(!(X!=null&&X.join("/")))return;const y=X==null?void 0:X.join("/");O(y==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:y==="进度设置/进度条"?["进度关键词"]:null,P)}},V=P=>{l("change",{target:s==null?void 0:s.target,extendConfigs:P})},ke=(P,X)=>{D.value=X==null?void 0:X.changeProp,H(P)},W=P=>{l("onButtonClick",P)};return(P,X)=>(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:V,onBlurChange:ke,onOnButtonClick:W},null,8,["rowContents","formRules","buttonValue"]))}}),Ds=Ft._export_sfc(ws,[["__scopeId","data-v-7c660c1f"]]),Cs={};function Es(a,i){return null}const _s=Ft._export_sfc(Cs,[["render",Es]]),Ss={class:"form-operate-content"},Ts={class:"form-operate-item"},Is={class:"operate-title"},Bs={class:"operate-content"},As={class:"fix-content"},Ns={class:"fix-button"},Vs={class:"operate-title"},Os={class:"operate-content"},Ms={class:"fix-content"},zs={class:"fix-button"},Rs={style:{display:"flex","justify-content":"space-between"}},Ls={class:"form-content"},Fs={class:"dialog-footer"},Ps={class:"form-content"},$s={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),x=e.ref([]),v=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),O=e.ref(0),H=e.ref([]),V=e.ref([]),ke=(B,te)=>{if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="selectRelateType"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.selectRelateType)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="menuSelect"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.menuSelect)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="groupSelect"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.groupSelect)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="originalContent")return(te==null?void 0:te.value)||te[B.key];if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="multiple"){const ne=te[B.key];return wl(ne)?ne:B.default}return(B==null?void 0:B.label)==="类型"&&te[B.key]===""?"Input":(B==null?void 0:B.key)==="isFormColHidden"&&!te[B.key]?!1:te[B.key]},W=async B=>{var de,Xe,ot,G,R,ve;c.value=!0;let te=[];const ne=await((ot=(Xe=(de=ze.FormContent)==null?void 0:de.find(xe=>(xe==null?void 0:xe.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:Xe.value)==null?void 0:ot.value)??((R=(G=ze.FormContent)==null?void 0:G.find(xe=>(xe==null?void 0:xe.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:R.value);if(ne==null||ne.forEach(xe=>{O.value++,te.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,B),id:O.value,contents:xe==null?void 0:xe.options,width:(B==null?void 0:B.width)??1})}),B!=null&&B.menuSelect&&((ve=B==null?void 0:B.menuSelect)==null?void 0:ve.length)>0){const xe=await ze.menuToContentType(B==null?void 0:B.menuSelect);te=te==null?void 0:te.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=xe),Me))}E.value=B==null?void 0:B.id,d.value=await ze.selectToBase(ze.formToOptionsContents(te)),x.value=await ze.selectToBase(ze.formToOptionsContents(te))},P=B=>{var ne;v.value=!0;let te=[];(ne=ze.FormButton)==null||ne.forEach(de=>{O.value++,te.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&B[de.key]===""?"normal":B[de.key],id:O.value,contents:de==null?void 0:de.options})}),H.value=te,V.value=te,E.value=B==null?void 0:B.id};e.watch(()=>_.value,()=>{var te,ne;let B=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(de=>(de==null?void 0:de.key)==="enableWrap")?B=(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!_.value),de)):B.push({key:"enableWrap",contents:!_.value}),l("change",B)},{deep:!0});const X=()=>{var ne,de,Xe,ot,G;H.value=V.value;let B={};if(E.value!==""?B.id=E.value:(O.value++,B.id="id"+O.value),(ne=H.value)==null||ne.forEach(R=>{var xe;const ve=(xe=ze.FormButton)==null?void 0:xe.find(Me=>(Me==null?void 0:Me.label)===(R==null?void 0:R.label));ve&&(B[ve.key]=R.value)}),(de=h.value)!=null&&de.find(R=>R.id===B.id))h.value=(Xe=h.value)==null?void 0:Xe.map(R=>(R.id===B.id&&(R=B),R));else{let R=p.cloneDeep(h.value);h.value||(h.value=[]),R.push(B),h.value=R}v.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(ot=p.cloneDeep(s.originalItemContents))!=null&&ot.find(R=>(R==null?void 0:R.key)==="formButton")?te=(G=p.cloneDeep(s.originalItemContents))==null?void 0:G.map(R=>((R==null?void 0:R.key)==="formButton"&&(R.contents=h.value),R)):te.push({key:"formButton",contents:h.value}),l("change",te)},y=B=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ne;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=D.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=B=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ne;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=h.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;v.value=!0;let B=[];(te=ze.FormButton)==null||te.forEach(ne=>{O.value++,B.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:O.value,contents:ne==null?void 0:ne.options})}),H.value=B,V.value=B},A=()=>{var te,ne,de;c.value=!0;let B=[];(de=(ne=(te=ze.FormContent)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.key)==="Input"))==null?void 0:ne.value)==null||de.forEach(Xe=>{O.value++,B.push({label:Xe==null?void 0:Xe.label,name:Xe==null?void 0:Xe.label,type:Xe.type,value:(Xe==null?void 0:Xe.label)==="类型"?"Input":"",id:O.value,contents:Xe==null?void 0:Xe.options})}),d.value=B,x.value=B},T=B=>{let te=p.cloneDeep(V.value);te=te==null?void 0:te.map(ne=>(ne.value=B==null?void 0:B[ne.name],ne)),V.value=te},se=B=>{const te=B.find(Xe=>(Xe==null?void 0:Xe.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ne=B.find(Xe=>(Xe==null?void 0:Xe.name)==="多选"),de=B.find(Xe=>(Xe==null?void 0:Xe.name)==="初始值");ne!=null&&ne.value&&Oo.isString(de.value)&&(de.value=[de.value]),!(ne!=null&&ne.value)&&!Oo.isString(de.value)&&(de.value="")},Oe=async B=>{var te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je;if((B==null?void 0:B.类型)!==((ne=(te=x.value)==null?void 0:te.find(He=>(He==null?void 0:He.label)==="类型"))==null?void 0:ne.value)){let He=[];const it=await((ot=(Xe=(de=ze.FormContent)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:Xe.value)==null?void 0:ot.value)?await((Me=(xe=(ve=ze.FormContent)==null?void 0:ve.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:xe.value)==null?void 0:Me.value):(R=(G=ze.FormContent)==null?void 0:G.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:R.value;if(it==null||it.forEach(ee=>{var tt,Re;O.value++;const st=Dl(ee==null?void 0:ee.default)?(B==null?void 0:B[ee.label])??ee.value??"":ee==null?void 0:ee.default;He.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:st,prop:ee==null?void 0:ee.prop,id:O.value,contents:ee==null?void 0:ee.options,width:((Re=(tt=x.value)==null?void 0:tt[0])==null?void 0:Re.width)??1})}),B!=null&&B.菜单选项&&((Ve=B==null?void 0:B.菜单选项)==null?void 0:Ve.length)>0){const ee=await ze.menuToContentType(B==null?void 0:B.菜单选项);He=He==null?void 0:He.map(st=>((st==null?void 0:st.name)==="组信息选项"&&(st.contents=ee),st))}se(He),x.value=await ze.selectToBase(p.cloneDeep(He)),d.value=await ze.selectToBase(p.cloneDeep(He))}else{let He=p.cloneDeep(x.value);if(He=He==null?void 0:He.map(it=>(it.value=B==null?void 0:B[it.name],it)),B!=null&&B.菜单选项&&((Je=B==null?void 0:B.菜单选项)==null?void 0:Je.length)>0){const it=await ze.menuToContentType(B==null?void 0:B.菜单选项);He=He==null?void 0:He.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=it),ee))}He=ze.formToOptionsContents(He),se(He),x.value=await ze.selectToBase(p.cloneDeep(He))}},at=B=>{B||(d.value=x.value)},Be=async B=>{await Oe(B),d.value=x.value},Fe=ko(async()=>{var de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it;d.value=x.value;let B={};B.width=((Xe=(de=d.value)==null?void 0:de[0])==null?void 0:Xe.width)??1,E.value!==""?B.id=E.value:(O.value++,B.id="id"+O.value);let te=await((R=(G=(ot=ze.FormContent)==null?void 0:ot.find(ee=>{var st,tt;return(ee==null?void 0:ee.key)===(((tt=(st=d.value)==null?void 0:st.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:tt.value)??"label")}))==null?void 0:G.value)==null?void 0:R.value)??((xe=(ve=ze.FormContent)==null?void 0:ve.find(ee=>{var st,tt;return(ee==null?void 0:ee.key)===(((tt=(st=d.value)==null?void 0:st.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:tt.value)??"label")}))==null?void 0:xe.value);if((Me=d.value)==null||Me.forEach(ee=>{const st=te==null?void 0:te.find(tt=>(tt==null?void 0:tt.label)===(ee==null?void 0:ee.label));st&&(B[st.key]=ee.value)}),B.width=B.width?B.width:1,B.key=B==null?void 0:B.label,B.isFormColHidden=B==null?void 0:B.isFormColHidden,(Ve=D.value)!=null&&Ve.find(ee=>ee.id===B.id))D.value=(Je=D.value)==null?void 0:Je.map(ee=>(ee.id===B.id&&(ee=B),ee));else{let ee=p.cloneDeep(D.value);ee.push(B),D.value=ee}D.value=D.value.map(({id:ee,...st})=>st),c.value=!1,E.value="";let ne=p.cloneDeep(s.originalItemContents);(He=p.cloneDeep(s.originalItemContents))!=null&&He.find(ee=>(ee==null?void 0:ee.key)==="formContent")?ne=(it=p.cloneDeep(s.originalItemContents))==null?void 0:it.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=D.value),ee)):ne.push({key:"formContent",contents:D.value}),l("change",ne)},300),he=()=>{c.value=!1,v.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ne,de,Xe,ot,G;if(!s.originalItemContents||s.originalItemContents.length===0)return;const B=p.cloneDeep(s.originalItemContents);D.value=((te=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ne=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="formButton"))==null?void 0:ne.contents)??[],_.value=(de=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&de.contents?!((Xe=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&Xe.contents):!0,D.value=(ot=p.cloneDeep(D.value))==null?void 0:ot.map((R,ve)=>{var Me;let xe=R;return xe.id=(R==null?void 0:R.id)??ve,R!=null&&R.label||(R.label=(R==null?void 0:R.key)??(R==null?void 0:R.label)??""),R!=null&&R.type||(R.type=(R==null?void 0:R.type)??""),R.contents=((Me=R==null?void 0:R.options)==null?void 0:Me.length)===0?(R==null?void 0:R.contents)??"":R==null?void 0:R.options,xe}),D.value=ze.formToOptionsContents(D.value),h.value=(G=h.value)==null?void 0:G.map((R,ve)=>R={label:(R==null?void 0:R.label)??"",type:(R==null?void 0:R.type)??"",background:(R==null?void 0:R.background)??"var(--ssComponent-primary-color)",id:ve})},{deep:!0,immediate:!0}),(B,te)=>{const ne=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ss,[e.createElementVNode("div",Ts,[e.createElementVNode("div",Is,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Xe,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Ns,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>W(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>y(Xe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Vs,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Xe,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",Ms,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",zs,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>P(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>L(Xe)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Rs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Vt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Xe=>_.value=Xe)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Oe,onChangeVisible:at,onBlurChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fs,[e.createVNode(de,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(de,{class:"ok-button button",onClick:e.unref(Fe),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:v.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:he,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Fo=Ft._export_sfc($s,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Ks={class:"module-data"},Us={class:"step-module layout"},Ws={class:"form-content"},Hs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=W=>{var P;D.value=W,l("change",(P=V())==null?void 0:P.compData)},O=(W,P)=>{var X,y;switch(W){case"create":(X=d.value)==null||X.forEach(L=>{L.value=""}),h.value="create",v.visible=!0;break;case"update":(y=d.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),h.value="update",v.visible=!0;break;case"delete":E.value.splice(P,1),h.value="delete";break}},H=W=>{var P,X,y;if((W==null?void 0:W.buttonName)==="确认"){const L=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(L).forEach(k=>{L[k]===""&&delete L[k]}),h.value){case"create":E.value.push({...L,index:((P=E.value)==null?void 0:P.length)+1});break;case"update":E.value=(X=E.value)==null?void 0:X.map(k=>k.index===(L==null?void 0:L.index)?{...k,title:L==null?void 0:L.title,description:L==null?void 0:L.description}:k);break}l("change",(y=V())==null?void 0:y.compData),v.visible=!1}else v.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ke=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(D.value=((P=W==null?void 0:W.find(y=>y.key==="stepConfig"))==null?void 0:P.contents)??{},E.value=((X=W==null?void 0:W.find(y=>y.key==="stepList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.title),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>O("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:ke,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),qs=Ft._export_sfc(Hs,[["__scopeId","data-v-7dbd17f2"]]),Gs={class:"step-module content"},Xs={class:"module-data"},Ys={class:"step-module layout"},Js={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),x=e.ref([]),v=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}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=W=>{var P;d.value=W,l("change",(P=V())==null?void 0:P.compData)},O=(W,P)=>{var X,y;switch(W){case"create":(X=h.value)==null||X.forEach(L=>{L.value=""}),c.value="create",E.visible=!0;break;case"update":(y=h.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(P,1),c.value="delete";break}},H=W=>{var P,X,y,L;if((W==null?void 0:W.buttonName)==="确认"){const k=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(X=x.value)==null||X.push({...k,index:((P=x.value)==null?void 0:P.length)+1});break;case"update":x.value=(y=x.value)==null?void 0:y.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(L=V())==null?void 0:L.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ke=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(d.value=((P=W==null?void 0:W.find(y=>y.key==="timeLineConfig"))==null?void 0:P.contents)??{},x.value=((X=W==null?void 0:W.find(y=>y.key==="timeLineList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Gs,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.content),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>O("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ys,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:v.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ke,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Js,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Ft._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),ec={};function tc(a,i){return e.openBlock(),e.createElementBlock("div")}const nc=Ft._export_sfc(ec,[["render",tc]]),ac={class:"extra-content"},oc={key:0},lc={key:1},rc={class:"dialog-footer"},ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=i,v=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var L;const y=p.cloneDeep(s.itemData);c.value=(L=p.cloneDeep(y))==null?void 0:L.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(se=>{var Oe;T.push((Oe=Object.values(se))==null?void 0:Oe[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(y,L,k,A)=>{var se;let T={};((se=y==null?void 0:y[0])==null?void 0:se.contents)==="详情"&&(v.value=!0,T[L]=y,d.value=y==null?void 0:y.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},O=y=>{var Oe,at,Be,Fe;const L=(at=(Oe=Object.values(p.cloneDeep(h.value)))==null?void 0:Oe[0])==null?void 0:at.filter(he=>(he==null?void 0:he.key)==="tableContentName"),k=(Fe=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Fe.filter(he=>(he==null?void 0:he.key)!=="tableContentName"),A=k==null?void 0:k.map((he,B)=>{var te;return B===y.index&&(he==null?void 0:he.comp)==="Table"&&(he.compData=(te=he.compData)==null?void 0:te.map(ne=>{var de,Xe;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(Xe=(de=y.content)==null?void 0:de.map(ot=>{let G={};for(let R in ot)R!=="id"&&(G[R]=ot[R]);return G}))==null?void 0:Xe.map(ot=>Object.values(ot))),ne})),he});A.unshift(L==null?void 0:L[0]);let T=p.cloneDeep(h.value),se={};for(let he in T)se[he]=A;h.value=se},H=()=>{v.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=y=>{var Oe,at,Be,Fe;const L=(at=(Oe=Object.values(p.cloneDeep(h.value)))==null?void 0:Oe[0])==null?void 0:at.filter(he=>(he==null?void 0:he.key)==="tableContentName"),k=(Fe=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Fe.filter(he=>(he==null?void 0:he.key)!=="tableContentName"),A=k==null?void 0:k.map((he,B)=>(B===y.index&&(he.compData=y.contents),he));A.unshift(L==null?void 0:L[0]);let T=p.cloneDeep(h.value),se={};for(let he in T)se[he]=A;h.value=se},ke=()=>{var L,k;let y={};for(let A in D.value)A===((L=Object.keys(h.value))==null?void 0:L[0])?y[A]=(k=Object.values(h.value))==null?void 0:k[0]:y[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:y},"methodData"),v.value=!1,h.value={},D.value={},E.value=void 0},W=()=>{v.value=!1,h.value={},D.value={},E.value=void 0},P=y=>{x("change",y,"methodData")},X=y=>ma(y);return(y,L)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",oc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(X(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:T,index:(A==null?void 0:A.id)??T,onContentClick:_,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:v.value,onBeforeDestroy:W},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(X(A.comp)),{itemData:A==null?void 0:A.compData,onChange:O,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:V,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",rc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>L[0]||(L[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>L[1]||(L[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},sc=Ft._export_sfc(ic,[["__scopeId","data-v-2d9c5ab2"]]);let St="$R";const cc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),uc=a=>{var s,l;let i=a.trim();if((i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"){let c=(l=(s=i==null?void 0:i.replace(":",St))==null?void 0:s.split(St))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},pc=a=>{var s;let i=a.trim();return(i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"&&((s=Ga(i,","))==null?void 0:s.length)===1},dc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),fc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),hc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),Da=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},_a=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},vc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Po=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},Ga=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Po(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Po(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},gc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),mc=a=>{var i,s,l,c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt;if(hc(a)){let Ue={},Ke=(l=(s=(i=a==null?void 0:a.replace(":",St))==null?void 0:i.split(St))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),De="",_e="",Ye=(d=(c=a==null?void 0:a.replace(":",St))==null?void 0:c.split(St))==null?void 0:d[1];if((Ye==null?void 0:Ye[0])==="("&&(_e=(h=(v=(x=Ye==null?void 0:Ye.split("("))==null?void 0:x[1])==null?void 0:v.split(")"))==null?void 0:h[0],Ye=(E=(D=Ye==null?void 0:Ye.replace(")",St))==null?void 0:D.split(St))==null?void 0:E[1]),((_=Ga(Ye,"/"))==null?void 0:_.length)>1)De=(O=Ga(Ye,"/"))==null?void 0:O.map(Ce=>Ce==null?void 0:Ce.replaceAll("/","").replaceAll("'",""));else if(Ye.includes("{")||Ye.includes("("))if(Ye.includes("{")?De=De+((X=(P=(W=(ke=(V=(H=Ye==null?void 0:Ye.split("{"))==null?void 0:H[1])==null?void 0:V.split("}"))==null?void 0:ke[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))==null?void 0:P.replaceAll("[","(["))==null?void 0:X.replaceAll("]","])"))+"[":De=De+((se=(T=(A=(k=(L=(y=Ye==null?void 0:Ye.split("("))==null?void 0:y[1])==null?void 0:L.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:se.replaceAll("]","])"))+"[",!((Oe=Ye==null?void 0:Ye.split(")"))!=null&&Oe[1]))De=De+((Fe=(Be=(at=Ye==null?void 0:Ye.split("["))==null?void 0:at[1])==null?void 0:Be.split("]"))==null?void 0:Fe[0])+"]";else{const Ce=(ne=(te=(B=(he=Ye==null?void 0:Ye.split(")"))==null?void 0:he[1])==null?void 0:B.replace("[",St))==null?void 0:te.split(St))==null?void 0:ne[1];if(Ye!=null&&Ye.includes("?"))De=((de=Ye==null?void 0:Ye.split("?"))==null?void 0:de[1])+"&&"+((ot=(Xe=Ye==null?void 0:Ye.split("?"))==null?void 0:Xe[0])==null?void 0:ot.replaceAll("#","==="));else if(Ce){const $e=Ce.lastIndexOf("]"),je=Ce.substring(0,$e)+St+Ce.substring($e+1);De=De+((G=je==null?void 0:je.split(St))==null?void 0:G[0])+"]"}else De=(xe=(ve=(R=a==null?void 0:a.replace(":",St))==null?void 0:R.split(St))==null?void 0:ve[1])==null?void 0:xe.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Je=(Ve=(Me=a==null?void 0:a.replace(":",St))==null?void 0:Me.split(St))==null?void 0:Ve[1])==null?void 0:Je.replaceAll("'","");else{let Ce=(ee=(it=(He=a==null?void 0:a.replace(":",St))==null?void 0:He.split(St))==null?void 0:it[1])==null?void 0:ee.replaceAll("'","");De=((Re=(tt=(st=Ce==null?void 0:Ce.split("?"))==null?void 0:st[1])==null?void 0:tt.split(":"))==null?void 0:Re[0])+"&&"+((pe=Ce==null?void 0:Ce.split("?"))==null?void 0:pe[0])}return Ue[Ke]=_e!==""?_e+"$##"+De:De,{groupName:"",formContents:[[Ue]]}}else{let Ue={},Ke="",De="";if(a.includes("#")){Ke=(ue=(ie=a==null?void 0:a.split("#"))==null?void 0:ie[0])==null?void 0:ue.replaceAll("'","");let _e=(Ge=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Ge.replaceAll("'","");_e!=null&&_e.includes("{")?De=De+((K=(C=(g=(ft=_e==null?void 0:_e.split("{"))==null?void 0:ft[1])==null?void 0:g.split("}"))==null?void 0:C[0])==null?void 0:K.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((J=(I=(w=(Y=_e==null?void 0:_e.split("("))==null?void 0:Y[1])==null?void 0:w.split(")"))==null?void 0:I[0])==null?void 0:J.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((oe=(le=(z=_e==null?void 0:_e.replace("[",St))==null?void 0:z.split(St))==null?void 0:le[1])==null?void 0:oe.slice(0,((be=(U=(F=_e==null?void 0:_e.replace("[",St))==null?void 0:F.split(St))==null?void 0:U[1])==null?void 0:be.length)-1))}else{let _e=(ae=(Q=(q=a==null?void 0:a.split("]"))==null?void 0:q[0])==null?void 0:Q.split("["))==null?void 0:ae[1];if((ge=_e==null?void 0:_e.split(":"))==null||ge.forEach((Ye,Ce)=>{var $e;(($e=_e==null?void 0:_e.split(":"))==null?void 0:$e.length)-1===Ce&&(Ke=Ye==null?void 0:Ye.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((re=($=(ye=(fe=a==null?void 0:a.split("]"))==null?void 0:fe[1])==null?void 0:ye.replace(":",St).split(St))==null?void 0:$[1])==null?void 0:re.replaceAll("'",""))??"";else{let Ye=(me=(Ae=(Ne=(Ze=(Ee=(ce=p.cloneDeep(a))==null?void 0:ce.split("("))==null?void 0:Ee[1])==null?void 0:Ze.split(")"))==null?void 0:Ne[0])==null?void 0:Ae.replaceAll("{","").replaceAll("}",""))==null?void 0:me.replaceAll("'","").replaceAll(":","/"),Ce="";(rt=_e==null?void 0:_e.split(":"))==null||rt.forEach($e=>{Ce=Ce===""?Ce+($e==null?void 0:$e.replaceAll("'","")):Ce+":"+($e==null?void 0:$e.replaceAll("'",""))}),De=Ye+"["+Ce+"]"}}return Ue[Ke]=De,{groupName:"",formContents:[[Ue]]}}},yc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),bc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},kc=a=>{var d,x,v,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=Da(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(v=Da(p.cloneDeep(i)))==null?void 0:v.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(D=p.cloneDeep(s))==null?void 0:D.map(E=>{var _,O;return E=(O=(_=E.replace(")",St))==null?void 0:_.split(St))==null?void 0:O[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I;let _=(V=(H=p.cloneDeep(E))==null?void 0:H.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",St).split(St);if(((W=(ke=p.cloneDeep(_))==null?void 0:ke[0])==null?void 0:W.replaceAll("'",""))==="输入"){if(!((X=(P=p.cloneDeep(_))==null?void 0:P[1])!=null&&X.includes("["))&&!((L=(y=p.cloneDeep(_))==null?void 0:y[1])!=null&&L.includes("("))){ze.IsJson((k=p.cloneDeep(_))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(_))==null?void 0:A[1].replaceAll("'",'"')));return}if(((se=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:se[0])==="["){let J=(Fe=(Oe=p.cloneDeep(_))==null?void 0:Oe[1])==null?void 0:Fe.slice(1,((Be=(at=p.cloneDeep(_))==null?void 0:at[1])==null?void 0:Be.length)-1);(B=(he=Da(J))==null?void 0:he.filter(z=>z!==","))==null||B.forEach(z=>{var oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce;let le={},F=(Q=(q=p.cloneDeep(z))==null?void 0:q.slice(1,((oe=p.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:Q.replace(":",St).split(St),U=(ae=F==null?void 0:F[0])==null?void 0:ae.replaceAll("'",""),be;(ge=F==null?void 0:F[1])!=null&&ge.includes("(")?(be=(Ae=(Ne=(Ze=(Ee=(ce=(re=($=(ye=p.cloneDeep(F))==null?void 0:ye[1])==null?void 0:$.replaceAll("{",""))==null?void 0:re.replaceAll("}",""))==null?void 0:ce.split("("))==null?void 0:Ee[1])==null?void 0:Ze.split(")"))==null?void 0:Ne[0])==null?void 0:Ae.replaceAll(":","/").replaceAll("'",""),(rt=(me=p.cloneDeep(F))==null?void 0:me[1])!=null&&rt.includes("[")&&(be=p.cloneDeep(be)+"["+((Ce=(Ye=(_e=(De=(Ke=(Ue=p.cloneDeep(F))==null?void 0:Ue[1])==null?void 0:Ke.split("["))==null?void 0:De[1])==null?void 0:_e.split("]"))==null?void 0:Ye[0])==null?void 0:Ce.replaceAll("'",""))+"]")):be=(fe=F==null?void 0:F[1])==null?void 0:fe.replaceAll("'",""),le[U]=be,c.push(le)})}}else{if(!((ne=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ne.includes("["))&&!((Xe=(de=p.cloneDeep(_))==null?void 0:de[1])!=null&&Xe.includes("("))){ze.IsJson((ot=p.cloneDeep(_))==null?void 0:ot[1].replaceAll("'",'"'))&&l.push(JSON.parse((G=p.cloneDeep(_))==null?void 0:G[1].replaceAll("'",'"')));return}if(((ve=(R=p.cloneDeep(_))==null?void 0:R[1])==null?void 0:ve[0])==="["){let J=(Je=(xe=p.cloneDeep(_))==null?void 0:xe[1])==null?void 0:Je.slice(1,((Ve=(Me=p.cloneDeep(_))==null?void 0:Me[1])==null?void 0:Ve.length)-1);(it=(He=Da(J))==null?void 0:He.filter(z=>z!==","))==null||it.forEach(z=>{var oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt;let le={},F=(Q=(q=p.cloneDeep(z))==null?void 0:q.slice(1,((oe=p.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:Q.replace(":",St).split(St),U=(ae=F==null?void 0:F[0])==null?void 0:ae.replaceAll("'",""),be;if(!((ge=F==null?void 0:F[1])!=null&&ge.includes("(")))be=(fe=F==null?void 0:F[1])==null?void 0:fe.replaceAll("'","");else if(be=(Ze=(Ee=(ce=(re=($=(ye=p.cloneDeep(F))==null?void 0:ye[1])==null?void 0:$.replaceAll("{",""))==null?void 0:re.replaceAll("}",""))==null?void 0:ce.replace("(",St))==null?void 0:Ee.split(St))==null?void 0:Ze[1],be=(Ae=(Ne=bc(p.cloneDeep(be),St))==null?void 0:Ne.split(St))==null?void 0:Ae[0],!(be!=null&&be.includes("(")))be=(me=p.cloneDeep(be))==null?void 0:me.replaceAll(":","/").replaceAll("'",""),(Ue=(rt=p.cloneDeep(F))==null?void 0:rt[1])!=null&&Ue.includes("[")&&(be=p.cloneDeep(be)+"["+((M=(Qe=(je=($e=(De=(Ke=p.cloneDeep(F))==null?void 0:Ke[1])==null?void 0:De.split("["))==null?void 0:$e[((Ce=(Ye=(_e=p.cloneDeep(F))==null?void 0:_e[1])==null?void 0:Ye.split("["))==null?void 0:Ce.length)-1])==null?void 0:je.split("]"))==null?void 0:Qe[0])==null?void 0:M.replaceAll("'",""))+"]");else{let Dt="";(Se=_a(be,":"))==null||Se.forEach(Mt=>{var Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In;if(!(Mt!=null&&Mt.includes("(")))Dt=Dt===""?Dt+((Et=Mt==null?void 0:Mt.replaceAll(":",""))==null?void 0:Et.replaceAll("'","")):Dt+"/"+((It=Mt==null?void 0:Mt.replaceAll(":",""))==null?void 0:It.replaceAll("'",""));else{let mn=(wn=(hn=(xn=(Ct=(qt=(Rt=(jt=(Tt=p.cloneDeep(Mt))==null?void 0:Tt.replaceAll("{",""))==null?void 0:jt.replaceAll("}",""))==null?void 0:Rt.replace("(",St))==null?void 0:qt.split(St))==null?void 0:Ct[1])==null?void 0:xn.split(")"))==null?void 0:hn[0])==null?void 0:wn.replaceAll(":","/").replaceAll("'","");mn=mn+"["+((In=(gn=(Tn=(vn=(Sn=p.cloneDeep(Mt))==null?void 0:Sn.split("["))==null?void 0:vn[1])==null?void 0:Tn.split("]"))==null?void 0:gn[0])==null?void 0:In.replaceAll("'",""))+"]",Dt=Dt===""?Dt+"["+mn+"]":Dt+"/["+mn+"]"}}),be=Dt+"["+((mt=(ht=(dt=(We=(nt=(ct=p.cloneDeep(F))==null?void 0:ct[1])==null?void 0:nt.split("["))==null?void 0:We[((ut=(Ie=(et=p.cloneDeep(F))==null?void 0:et[1])==null?void 0:Ie.split("["))==null?void 0:ut.length)-1])==null?void 0:dt.split("]"))==null?void 0:ht[0])==null?void 0:mt.replaceAll("'",""))+"]"}le[U]=be,l.push(le)})}else{let J=(Re=(ee=p.cloneDeep(_))==null?void 0:ee[1])==null?void 0:Re.slice(1,((tt=(st=p.cloneDeep(_))==null?void 0:st[1])==null?void 0:tt.length)-1),z={},le=(K=(C=(ue=(ie=(pe=p.cloneDeep(J))==null?void 0:pe.split("]"))==null?void 0:ie[0])==null?void 0:ue.split(":"))==null?void 0:C[((g=(ft=(Ge=(Te=p.cloneDeep(J))==null?void 0:Te.split("]"))==null?void 0:Ge[0])==null?void 0:ft.split(":"))==null?void 0:g.length)-1])==null?void 0:K.replaceAll("'",""),F=((I=(w=(Y=p.cloneDeep(J))==null?void 0:Y.split("]"))==null?void 0:w[0])==null?void 0:I.replaceAll("'",""))+"]";z[le]=F,l.push(z)}}}),{output:l,input:c}},xc=Kt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(xc),Vn=Kt.useMenuState(p.pinia),{activeMenuPath:na}=p.storeToRefs(Vn),Ca=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Ca),wc=ze.useOriginalState(p.pinia),{originalPath:Dc}=p.storeToRefs(wc),Qt=Dc.value,Cc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const v=x.match(i);v&&d.push({idx:Number(v[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,v)=>x.idx-v.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],v=[];c.forEach(_=>{var O;return(((O=_.names)==null?void 0:O.length)>d?x:v).push(_)});const h=v.map(_=>_.item),D=new Map;for(const _ of x){const O=_.names[_.names.length-d-1].value;D.has(O)||D.set(O,[]),D.get(O).push(_)}return[...Array.from(D.entries()).map(([_,O])=>{var H;return O[0].names.length===1&&((H=O[0].names[0])==null?void 0:H.idx)===-1?O[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(O,d+1)}}),...h]}if(s)return l(s,0)},Aa=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:Cc(a),Ec=a=>{let i=[];return a==null||a.forEach(l=>{var d,x;let c=((x=(d=l==null?void 0:l.compData)==null?void 0:d.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:x.contents)??[];i=[...i,...c]}),a==null?void 0:a.map(l=>(i!=null&&i.find(c=>(c==null?void 0:c.prop)===(l==null?void 0:l.name))&&(l.isShow=!1),l))},Al=async()=>{var d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge;Vn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:x.length)>0){let fe=(H=(O=(_=(E=(D=(h=(v=i==null?void 0:i.data)==null?void 0:v.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:O.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:H.contents;a=(ke=(V=p.cloneDeep(fe))==null?void 0:V[0])==null?void 0:ke.label}let s=na.value;(X=na.value)!=null&&X.includes(`updateLoading${((W=Xt.value)==null?void 0:W.account)||((P=Xt.value)==null?void 0:P.账号)}`)?s=p.cloneDeep(na).value:(k=na.value)!=null&&k.includes(`loading${((y=Xt.value)==null?void 0:y.account)||((L=Xt.value)==null?void 0:L.账号)}`)&&(s=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((T=Xt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Oe=(se=l==null?void 0:l.data)==null?void 0:se.result)==null?void 0:Oe.length)>0){let fe="",ye=[];(Be=(at=l==null?void 0:l.data)==null?void 0:at.result)==null||Be.forEach(re=>{var ce,Ee,Ze,Ne,Ae;((Ee=(ce=re==null?void 0:re.value)==null?void 0:ce.pageData)==null?void 0:Ee.comp)==="Form"&&((Ae=(Ne=(Ze=re==null?void 0:re.value)==null?void 0:Ze.pageData)==null?void 0:Ne.compData)==null||Ae.forEach(me=>{(me==null?void 0:me.key)==="formContent"&&(ye=[...ye,...me==null?void 0:me.contents])}))});let $=ye==null?void 0:ye.find(re=>(re==null?void 0:re.isMain)===!0);if($?(fe=$==null?void 0:$.value,a=$==null?void 0:$.key):fe=(G=(ot=(Xe=(de=(ne=(te=(B=(he=(Fe=l==null?void 0:l.data)==null?void 0:Fe.result)==null?void 0:he[0])==null?void 0:B.value)==null?void 0:te.pageData)==null?void 0:ne.compData)==null?void 0:de.find(re=>(re==null?void 0:re.key)==="formContent"))==null?void 0:Xe.contents)==null?void 0:ot.find(re=>{var ce,Ee;return(re==null?void 0:re.key)===a||((Ee=(ce=re==null?void 0:re.optionUrl)==null?void 0:ce.groupSelect)==null?void 0:Ee[1])===a}))==null?void 0:G.value,(xe=na.value)!=null&&xe.includes(`updateLoading${((R=Xt.value)==null?void 0:R.account)||((ve=Xt.value)==null?void 0:ve.账号)}`)){let re=[],ce=[];const Ee=await p.getInsofDataApi({key:{pageKey:(ie=na.value.split(Qt+`updateLoading${((Re=Xt.value)==null?void 0:Re.account)||((pe=Xt.value)==null?void 0:pe.账号)}`))==null?void 0:ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(ue=Ee==null?void 0:Ee.data)==null?void 0:ue.result)==null?void 0:Te.length)>0){let Ze=(Ge=l==null?void 0:l.data)==null?void 0:Ge.result,Ne=(ft=p.cloneDeep(Ze))==null?void 0:ft.map(async Ae=>{var me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct;if(((me=Ae==null?void 0:Ae.key)==null?void 0:me.type)==="structure"){let nt=(De=(Ke=(Ue=(rt=Ae==null?void 0:Ae.value)==null?void 0:rt.pageData)==null?void 0:Ue.compData)==null?void 0:Ke.find(et=>(et==null?void 0:et.key)==="parentFormPath"))==null?void 0:De.contents;if(nt){let et=await ze.getItemData(nt,sessionStorage.getItem("systemKey"),""),Ie=($e=(Ce=(Ye=(_e=Ae==null?void 0:Ae.value)==null?void 0:_e.pageData)==null?void 0:Ye.compData)==null?void 0:Ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:$e.contents,ut=et==null?void 0:et.filter(We=>(We==null?void 0:We.comp)==="Form");ut==null||ut.forEach(We=>{var dt;(dt=We==null?void 0:We.compData)==null||dt.forEach(ht=>{var mt,Dt;if((ht==null?void 0:ht.key)==="formContent"&&((mt=ht==null?void 0:ht.contents)==null?void 0:mt.some(Et=>Ie==null?void 0:Ie.find(It=>(It==null?void 0:It.prop)===(Et==null?void 0:Et.prop))))){let Et=We;Et.compData=(Dt=Et.compData)==null?void 0:Dt.map(Tt=>{var jt;return(Tt==null?void 0:Tt.key)==="formContent"&&(Tt.contents=(jt=Tt.contents)==null?void 0:jt.map(Rt=>{var qt;return Ie!=null&&Ie.find(Ct=>(Ct==null?void 0:Ct.prop)===(Rt==null?void 0:Rt.prop))&&(Rt.value=(qt=Ie==null?void 0:Ie.find(Ct=>(Ct==null?void 0:Ct.prop)===(Rt==null?void 0:Rt.prop)))==null?void 0:qt.value),Rt})),Tt});let It={};for(let Tt in Et)Tt!=="id"&&(It[Tt]=Et[Tt]);c.push({id:We==null?void 0:We.id,value:{pageData:It}})}})})}else if((Qe=(je=Ee==null?void 0:Ee.data)==null?void 0:je.result)!=null&&Qe.find(et=>{var Ie,ut,We,dt;return((ut=(Ie=et==null?void 0:et.value)==null?void 0:Ie.pageData)==null?void 0:ut.name)===((dt=(We=Ae==null?void 0:Ae.value)==null?void 0:We.pageData)==null?void 0:dt.name)})){let et=Ae==null?void 0:Ae.key;et.pageKey=p.cloneDeep(_n).value+Qt+fe,c.push({id:(ct=(Se=(M=Ee==null?void 0:Ee.data)==null?void 0:M.result)==null?void 0:Se.find(Ie=>{var ut,We,dt,ht;return((We=(ut=Ie==null?void 0:Ie.value)==null?void 0:ut.pageData)==null?void 0:We.name)===((ht=(dt=Ae==null?void 0:Ae.value)==null?void 0:dt.pageData)==null?void 0:ht.name)}))==null?void 0:ct.id,key:et,value:Ae==null?void 0:Ae.value})}else{let et=Ae==null?void 0:Ae.key;et.pageKey=p.cloneDeep(_n).value+Qt+fe,re.push({key:et,value:Ae==null?void 0:Ae.value})}}});await Promise.all(Ne),(C=(g=l==null?void 0:l.data)==null?void 0:g.result)==null||C.forEach(Ae=>{var rt,Ue,Ke;let me=(rt=p.cloneDeep(Ae))==null?void 0:rt.key;me.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ue=Xt.value)==null?void 0:Ue.account)||((Ke=Xt.value)==null?void 0:Ke.账号)}`,Vn.setChildMenu(me.pageKey),c.push({id:Ae==null?void 0:Ae.id,key:me})})}if(fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(K=c==null?void 0:c[0])!=null&&K.key&&await Ca.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(re==null?void 0:re.length)>0&&(await p.batchAddInsofDataApi({dataList:re}),(w=re==null?void 0:re[0])!=null&&w.key&&await Ca.setLogRecordAsync({type:"保存",data:re},(I=re==null?void 0:re[0])==null?void 0:I.key));const Ze=await p.getInsofDataApi({key:{pageKey:(le=na.value.split(Qt+`updateLoading${((J=Xt.value)==null?void 0:J.account)||((z=Xt.value)==null?void 0:z.账号)}`))==null?void 0:le[0],systemKey:sessionStorage.getItem("systemKey")}});if(((U=(F=Ze==null?void 0:Ze.data)==null?void 0:F.result)==null?void 0:U.length)>0){let Ne=[],Ae=(be=l==null?void 0:l.data)==null?void 0:be.result;(oe=p.cloneDeep(Ae))==null||oe.forEach(me=>{var rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se;if(((rt=me==null?void 0:me.key)==null?void 0:rt.type)!=="structure"){let ct=(De=(Ke=(Ue=Ze==null?void 0:Ze.data)==null?void 0:Ue.result)==null?void 0:Ke.filter(ut=>{var We;return((We=ut==null?void 0:ut.key)==null?void 0:We.type)==="data"}))==null?void 0:De.map(ut=>ut==null?void 0:ut.id);Ne=[...Ne,...ct];let nt=($e=(Ce=(Ye=(_e=p.cloneDeep(Ae))==null?void 0:_e.find(ut=>{var We;return((We=me==null?void 0:me.key)==null?void 0:We.tableId)===(ut==null?void 0:ut.id)}))==null?void 0:Ye.value)==null?void 0:Ce.pageData)==null?void 0:$e.name,et=(M=(Qe=(je=Ze==null?void 0:Ze.data)==null?void 0:je.result)==null?void 0:Qe.find(ut=>{var We,dt;return((dt=(We=ut==null?void 0:ut.value)==null?void 0:We.pageData)==null?void 0:dt.name)===nt}))==null?void 0:M.id,Ie=(Se=p.cloneDeep(me))==null?void 0:Se.key;Ie.tableId=et,Ie.pageKey=p.cloneDeep(_n).value+Qt+fe,ce.push({key:Ie,value:me==null?void 0:me.value})}}),(Ne==null?void 0:Ne.length)>0&&(Ne=[...new Set(Ne)],await p.batchDeleteInsofDataApi({ids:Ne})),(Q=(q=l==null?void 0:l.data)==null?void 0:q.result)==null||Q.forEach(me=>{var Ue,Ke,De;let rt=(Ue=p.cloneDeep(me))==null?void 0:Ue.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((De=Xt.value)==null?void 0:De.账号)}`,Vn.setChildMenu(rt.pageKey),c.push({id:me==null?void 0:me.id,key:rt})})}(ce==null?void 0:ce.length)>0&&(await p.batchAddInsofDataApi({dataList:ce}),(ae=re==null?void 0:re[0])!=null&&ae.key&&await Ca.setLogRecordAsync({type:"保存",data:ce},(ge=ce==null?void 0:ce[0])==null?void 0:ge.key)),p.ElMessage.success("保存成功")}}else{if((Ve=(Me=l==null?void 0:l.data)==null?void 0:Me.result)==null||Ve.forEach(re=>{var Ee;let ce=(Ee=p.cloneDeep(re))==null?void 0:Ee.key;ce.pageKey=p.cloneDeep(_n).value+Qt+fe,Vn.setChildMenu(ce.pageKey),c.push({id:re==null?void 0:re.id,key:ce})}),fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1),Vn.setChildMenu("");return}(Je=c==null?void 0:c[0])!=null&&Je.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Ca.setLogRecordAsync({type:"保存",data:c},(He=c==null?void 0:c[0])==null?void 0:He.key)),await ze.loadingConstruct(p.cloneDeep(_n).value+Qt+fe,p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((it=Xt.value)==null?void 0:it.account)||((ee=Xt.value)==null?void 0:ee.账号)}`),Vn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((st=Xt.value)==null?void 0:st.account)||((tt=Xt.value)==null?void 0:tt.账号)}`),p.ElMessage.success("保存成功")}}Vn.setImportLoading(!1)},_c={key:0,class:"method-content"},Sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=ze.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),v=ze.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(v),D=Kt.useModelComp(p.pinia),E=e.ref(!1),_=Kt.useMenuState(p.pinia),O=p.useLoginState(p.pinia),{itemData:H,isEdit:V,routeToChildPath:ke,tableViewContents:W,lockingPage:P,payloadTypes:X}=p.storeToRefs(D),{activeMenuPath:y,platform:L,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(O),T=e.ref(!1),se=async()=>{var G,R;(G=i.value)!=null&&G.find(ve=>(ve==null?void 0:ve.buttonName)==="保存")&&await ne((R=i.value)==null?void 0:R.find(ve=>(ve==null?void 0:ve.buttonName)==="保存")),await Al()};e.watch(()=>H.value,async()=>{V.value==="view"&&!T.value&&await ot(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Oe=()=>{d.value=!1,x.value=void 0},at=G=>G.map(R=>{const ve={};for(const xe in R){const Me=R[xe];if(xe.includes(h.value)){const Ve=xe.split(h.value);let Je=ve;Ve.forEach((He,it)=>{it===Ve.length-1?Je[He]=Me:(Je[He]||(Je[He]={}),Je=Je[He])})}else ve[xe]=Me}return ve}),Be=async(G,R,ve=[])=>{var Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft;let xe=(Me=p.cloneDeep(R))==null?void 0:Me.filter(g=>(g==null?void 0:g.comp)!=="methodButton");if(G!=null&&G.includes("[")){let g=(ee=(it=(He=(Je=(Ve=p.cloneDeep(G))==null?void 0:Ve.split("["))==null?void 0:Je[1])==null?void 0:He.split("]"))==null?void 0:it[0])==null?void 0:ee.split(":"),C="";if(g!=null&&g[0]){let K=(st=xe==null?void 0:xe.find(Y=>(Y==null?void 0:Y.name)===(g==null?void 0:g[0])))==null?void 0:st.compData;if(!K){let Y=(tt=G==null?void 0:G.split("["))==null?void 0:tt[0],w=await ze.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",ve);K=(Re=w==null?void 0:w.find(I=>(I==null?void 0:I.name)===(g==null?void 0:g[0])))==null?void 0:Re.compData}K==null||K.forEach(Y=>{var w,I,J,z,le,F;if((Y==null?void 0:Y.key)==="formContent")(w=Y==null?void 0:Y.contents)==null||w.forEach(U=>{var be;(U==null?void 0:U.key)===(g==null?void 0:g[1])&&(Array.isArray(U==null?void 0:U.value)?C=U==null?void 0:U.value:C=(be=U==null?void 0:U.value)==null?void 0:be.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let U=[],be=(I=K==null?void 0:K.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:I.contents,oe=(g==null?void 0:g[1])??"";if(be!=null&&be.every(q=>Array.isArray(q))){let q=ze.getColumnChild((le=be==null?void 0:be[0])==null?void 0:le.filter(Q=>(Q==null?void 0:Q.label)!=="操作"));(F=Y.contents)==null||F.forEach(Q=>{let ae={};Q=Q==null?void 0:Q.filter(ge=>!(ge!=null&&ge.id)),q==null||q.forEach((ge,fe)=>{let ye=Q[fe];typeof Q[fe]=="number"&&(ye=Q[fe].toString()),(oe===""||oe===ge.prop)&&(ae[ge.prop]=ye)}),U.push(ae)}),U=at(U)}else{let q=(J=be==null?void 0:be.map(Q=>Q==null?void 0:Q.label))==null?void 0:J.filter(Q=>Q!=="操作");(z=Y.contents)==null||z.forEach(Q=>{let ae={};Q=Q==null?void 0:Q.filter(ge=>!(ge!=null&&ge.id)),q==null||q.forEach((ge,fe)=>{let ye=Q[fe];typeof Q[fe]=="number"&&(ye=Q[fe].toString()),(oe===""||oe===ge)&&(ae[ge]=ye)}),U.push(ae)})}C=U}})}return C}else if(G!=null&&G.includes("/")){let g={};return(pe=p.cloneDeep(xe))==null||pe.forEach((C,K)=>{var Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;if((C==null?void 0:C.comp)==="Table"){let Ee=Array.isArray((I=(w=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:w.contents)==null?void 0:I[0])?(F=(le=(z=(J=C==null?void 0:C.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:z.contents)==null?void 0:le[0])==null?void 0:F.some(me=>me==null?void 0:me.children):[],Ze=(oe=(be=(U=C==null?void 0:C.compData)==null?void 0:U.find(me=>(me==null?void 0:me.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:oe.map(me=>(me!=null&&me.find(rt=>rt==null?void 0:rt.id)&&(me=me.slice(1)),me)),Ne=(fe=(ge=(ae=(Q=(q=C==null?void 0:C.compData)==null?void 0:q.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)==null?void 0:ae[0])==null?void 0:ge[0])==null?void 0:fe.label,Ae=($=(ye=C==null?void 0:C.compData)==null?void 0:ye.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:$.contents;if(Ee)(Ee==null?void 0:Ee.length)===0?g[C.name]=g!=null&&g[C.name]?g[C.name]:ze.tableToForm(Ze,Ae):g[Ne]=ze.tableToForm(Ze,Ae);else{const me=[];Ae=Ae.slice(1,Ae.length-1),Ae==null||Ae.forEach((rt,Ue)=>{Ze==null||Ze.forEach(Ke=>{me.push({key:rt.label+Ke[0],value:Ke[Ue+1]})})}),g["form"+K]=me}}else{const Ee=(ce=(re=C.compData)==null?void 0:re.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:ce.contents;g!=null&&g.form||(g.form=[]);const Ze=[];Ee==null||Ee.forEach(Ne=>{Ne.key!==""&&(Ne={key:(Ne==null?void 0:Ne.key)??(Ne==null?void 0:Ne.label),value:Ne==null?void 0:Ne.value},Ze.push(Ne))}),g.form=[...Ze,...p.cloneDeep(g==null?void 0:g.form)]}}),g}else{if(G==="createInsofDataApi"){let g=(ie=p.cloneDeep(R))==null?void 0:ie[0];return g={comp:(ue=p.cloneDeep(g))==null?void 0:ue.comp,compData:(Te=p.cloneDeep(g))==null?void 0:Te.compData,name:(Ge=p.cloneDeep(g))==null?void 0:Ge.name,isShow:(ft=p.cloneDeep(g))==null?void 0:ft.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:y.value},value:{pageData:g}}}return G}},Fe=async(G,R,ve)=>{var Ve,Je,He;let xe=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Me=xe==null?void 0:xe.find(it=>(it==null?void 0:it.name)===(ve==null?void 0:ve[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let it={};for(let ue in p.cloneDeep(G))p.cloneDeep(G)[ue]!=="loginUser"?it[ue]=p.cloneDeep(G)[ue]:it[ue]=((Ve=A.value)==null?void 0:Ve.account)||((Je=A.value)==null?void 0:Je.账号);let ee=[],st=it;Array.isArray(G)||(st=[it]),st==null||st.forEach(ue=>{ee.push({[ue[ve[1]]]:ue})});let tt=[],Re=ee==null?void 0:ee.map(ue=>{var Te;return(Te=Object.keys(ue))==null?void 0:Te[0]});xe==null||xe.forEach(ue=>{var Te;(ue==null?void 0:ue.name)===(ve==null?void 0:ve[0])&&((Te=ue==null?void 0:ue.compData)==null||Te.forEach(Ge=>{var ft;(Ge==null?void 0:Ge.key)==="tableContents"&&((ft=Ge==null?void 0:Ge.contents)==null||ft.forEach(g=>{g!=null&&g.some(C=>Re.includes(C))&&tt.push({[g.find(C=>C.id).id]:g.find(C=>Re.includes(C))})}))}))});let pe=tt==null?void 0:tt.map(ue=>{var Te;return(Te=Object.keys(ue))==null?void 0:Te[0]}),ie=[];if(pe==null||pe.forEach(ue=>{var ft;let Te=(ft=tt==null?void 0:tt.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0].toString())===ue.toString()}))==null?void 0:ft[ue],Ge=ee==null?void 0:ee.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0])===Te});ie.push({id:parseInt(ue),value:{tableData:Ge[Te]}})}),(ie==null?void 0:ie.length)>0)return ie}else if((Me==null?void 0:Me.comp)==="Form"){let it=p.cloneDeep(Me);it.compData=(He=it.compData)==null?void 0:He.map(tt=>{var Re;return(tt==null?void 0:tt.key)==="formContent"&&(tt.contents=(Re=tt.contents)==null?void 0:Re.map(pe=>((pe==null?void 0:pe.key)===(ve==null?void 0:ve[1])&&(pe.value=(G==null?void 0:G[pe==null?void 0:pe.prop])||G),pe))),tt});let ee={};for(let tt in it)tt!=="id"&&(ee[tt]=it[tt]);let st=[];if(st.push({id:Me==null?void 0:Me.id,keyType:ve==null?void 0:ve[1],value:{pageData:ee}}),(st==null?void 0:st.length)>0)return st}}},he=async(G,R,ve)=>{var Ve,Je,He,it,ee,st,tt,Re,pe,ie;let xe=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Me=xe==null?void 0:xe.find(ue=>(ue==null?void 0:ue.name)===(ve==null?void 0:ve[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let ue={};for(let Te in p.cloneDeep(G))p.cloneDeep(G)[Te]!=="loginUser"?ue[Te]=p.cloneDeep(G)[Te]:ue[Te]=((Ve=A.value)==null?void 0:Ve.account)||((Je=A.value)==null?void 0:Je.账号);await p.createInsofDataApi({key:{type:"data",pageKey:R,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ue}})}else if((Me==null?void 0:Me.comp)==="Form"){let ue=p.cloneDeep(Me),Te=Object.keys(G),Ge="";(it=(He=p.cloneDeep(ue))==null?void 0:He.compData)==null||it.forEach(w=>{var I,J;(w==null?void 0:w.key)==="formContent"&&((J=(I=p.cloneDeep(w))==null?void 0:I.contents)==null||J.forEach(z=>{var le;Te.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((le=A.value)==null?void 0:le.姓名)&&(Ge=z==null?void 0:z.key)}))});let ft=[];(ee=Object.values(G[Ge]))==null||ee.forEach(w=>{w!=null&&w.includes("(")&&ft.push(w)}),ft=[...new Set(ft)];const g=ft==null?void 0:ft.map(async w=>{var F,U,be,oe,q,Q,ae,ge,fe,ye,$,re;let I="";(Q=(q=(oe=(be=(U=(F=p.cloneDeep(w))==null?void 0:F.split("("))==null?void 0:U[1])==null?void 0:be.split(")"))==null?void 0:oe[0])==null?void 0:q.split(":"))==null||Q.forEach(ce=>{I=I===""?I+ce.replaceAll("'",""):I+"/"+ce.replaceAll("'","")});let J=[];(re=($=(ye=(fe=(ge=(ae=p.cloneDeep(w))==null?void 0:ae.split("<"))==null?void 0:ge[1])==null?void 0:fe.split(">"))==null?void 0:ye[0])==null?void 0:$.split(":"))==null||re.forEach(ce=>{J.push(ce.replaceAll("'",""))});const z=await ze.getItemData(I,sessionStorage.getItem("systemKey"),"");let le="";return z==null||z.forEach(ce=>{var Ee;ce.name===(J==null?void 0:J[0])&&((Ee=ce==null?void 0:ce.compData)==null||Ee.forEach(Ze=>{var Ne;(Ze==null?void 0:Ze.key)==="formContent"&&((Ne=Ze.contents)==null||Ne.forEach(Ae=>{(Ae==null?void 0:Ae.key)===(J==null?void 0:J[1])&&(le=Ae==null?void 0:Ae.value)}))}))}),{[w]:le}}),C=await Promise.all(g);ue.compData=(tt=(st=p.cloneDeep(ue))==null?void 0:st.compData)==null?void 0:tt.map(w=>{var I,J;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(J=(I=p.cloneDeep(w))==null?void 0:I.contents)==null?void 0:J.map(z=>{var le,F,U,be;return(le=G[Ge])!=null&&le[z==null?void 0:z.key]&&(G[Ge][z==null?void 0:z.key].includes("(")?z.value=(F=C==null?void 0:C.find(oe=>{var q;return((q=Object.keys(oe))==null?void 0:q[0])===G[Ge][z==null?void 0:z.key]}))==null?void 0:F[G[Ge][z==null?void 0:z.key]]:z.value=(be=(U=p.cloneDeep(G))==null?void 0:U[Ge])==null?void 0:be[z==null?void 0:z.key]),z})),w});const K=await p.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Re=K==null?void 0:K.data)==null?void 0:Re.type)==="success"&&((ie=(pe=K==null?void 0:K.data)==null?void 0:pe.result)==null||ie.forEach(w=>{var I,J;((J=(I=w==null?void 0:w.value)==null?void 0:I.pageData)==null?void 0:J.name)===(ve==null?void 0:ve[0])&&(Y=w.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:ue}}))}}},B=(G,R="",ve={})=>{for(const[xe,Me]of Object.entries(G)){const Ve=R?`${R}.${xe}`:xe;Me!==null&&typeof Me=="object"&&!Array.isArray(Me)&&Object.prototype.toString.call(Me)!=="[object Date]"?B(Me,Ve,ve):ve[Ve]=Me}return ve},te=async(G,R,ve,xe)=>{var Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be;let Me=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Ve=Me==null?void 0:Me.find(oe=>(oe==null?void 0:oe.name)===(ve==null?void 0:ve[0]));if(Ve){if(!(ve!=null&&ve[1])&&(Ve==null?void 0:Ve.comp)==="Table"){let oe={},q=[],Q=(He=(Je=Ve==null?void 0:Ve.compData)==null?void 0:Je.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:He.contents;Q!=null&&Q.every(fe=>Array.isArray(fe))?q=(ee=ze.getColumnChild((it=Q==null?void 0:Q[0])==null?void 0:it.filter(fe=>(fe==null?void 0:fe.label)!=="操作")))==null?void 0:ee.map(fe=>fe==null?void 0:fe.prop):q=Q==null?void 0:Q.map(fe=>fe==null?void 0:fe.label);for(let fe in p.cloneDeep(G))if(p.cloneDeep(G)[fe]!=="loginUser"){let ye=B(p.cloneDeep(G)[fe]),$={};for(let re in ye)if(q!=null&&q.find(ce=>ce===re))$[re]=ye[re];else if(q!=null&&q.find(ce=>(ce==null?void 0:ce.toUpperCase())===(re==null?void 0:re.toUpperCase()))){let ce=q==null?void 0:q.find(Ee=>(Ee==null?void 0:Ee.toUpperCase())===(re==null?void 0:re.toUpperCase()));$[ce]=ye[re]}oe[fe]=$}else oe[fe]=((st=A.value)==null?void 0:st.account)||((tt=A.value)==null?void 0:tt.账号);let ae=await p.getInsofDataApi({keyLikes:{tableId:Ve==null?void 0:Ve.id}});if(((pe=(Re=ae==null?void 0:ae.data)==null?void 0:Re.result)==null?void 0:pe.length)>0){let fe=(ue=(ie=ae==null?void 0:ae.data)==null?void 0:ie.result)==null?void 0:ue.map(ye=>ye==null?void 0:ye.id);(fe==null?void 0:fe.length)>0&&await p.batchDeleteInsofDataApi({ids:fe})}let ge=[];if((Te=Ve==null?void 0:Ve.compData)!=null&&Te.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")&&((g=(ft=(Ge=Ve==null?void 0:Ve.compData)==null?void 0:Ge.find(fe=>(fe==null?void 0:fe.key)==="pageColumn"))==null?void 0:ft.contents)!=null&&g.includes("["))){const fe=await p.getInsofDataApi({id:Ve==null?void 0:Ve.tableId});let ye=((w=(Y=(K=(C=fe==null?void 0:fe.data)==null?void 0:C.result)==null?void 0:K[0])==null?void 0:Y.key)==null?void 0:w.pageKey)??"";(I=Object.values(oe))==null||I.forEach($=>{ge.push({key:{type:"data",pageKey:ye,tableId:Ve==null?void 0:Ve.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(J=Object.values(oe))==null||J.forEach(fe=>{ge.push({key:{type:"data",pageKey:R,tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})});(ge==null?void 0:ge.length)>0&&await p.batchAddInsofDataApi({dataList:ge})}else if(!(ve!=null&&ve[1])&&(Ve==null?void 0:Ve.comp)==="Form"){let oe=p.cloneDeep(Ve);oe.compData=(le=(z=p.cloneDeep(oe))==null?void 0:z.compData)==null?void 0:le.map(ae=>{var ge,fe;return(ae==null?void 0:ae.key)==="formContent"&&(ae.contents=(fe=(ge=p.cloneDeep(ae))==null?void 0:ge.contents)==null?void 0:fe.map(ye=>{var $,re;return($=p.cloneDeep(G))!=null&&$[ye==null?void 0:ye.key]&&(ye.value=(re=p.cloneDeep(G))==null?void 0:re[ye==null?void 0:ye.key]),ye})),ae});const q=await p.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let Q="";((F=q==null?void 0:q.data)==null?void 0:F.type)==="success"&&((be=(U=q==null?void 0:q.data)==null?void 0:U.result)==null||be.forEach(ae=>{var ge,fe;((fe=(ge=ae==null?void 0:ae.value)==null?void 0:ge.pageData)==null?void 0:fe.name)===(ve==null?void 0:ve[0])&&(Q=ae.id)}),await p.updateInsofDataApi({id:Q,value:{pageData:oe}}))}}},ne=async G=>{var R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te;_.setImportLoading(!0);try{if(G.api){let Ge=new WeakMap;(ve=(R=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:X.value})).data.result)==null?void 0:R.filter(F=>{var U,be;return((U=F==null?void 0:F.key)==null?void 0:U.pageKey)!=="menu"&&((be=F==null?void 0:F.key)==null?void 0:be.pageKey)!=="secret"}))==null||ve.forEach(F=>{Ge[F.key.pageKey]?Ge[F.key.pageKey]=[...Ge[F.key.pageKey],F]:Ge[F.key.pageKey]=[F]});let g=await ze.getItemData((k==null?void 0:k.value)===""?y.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),C="";if(g=g==null?void 0:g.map(F=>{var U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;if((F==null?void 0:F.comp)==="Form")F.compData=(U=F.compData)==null?void 0:U.map(Ee=>{var Ze;return(Ee==null?void 0:Ee.key)==="formContent"&&(Ee.contents=(Ze=Ee.contents)==null?void 0:Ze.map(Ne=>{var Ae;if((Ne==null?void 0:Ne.value)===""&&(Ne==null?void 0:Ne.type)==="Select"){let me=ze.judgeContents((Ae=p.cloneDeep(Ne))==null?void 0:Ae.optionUrl,Ge);Ne.value=Ne.value||me}return Ne})),Ee});else if((F==null?void 0:F.comp)==="Table"&&(be=F.compData)!=null&&be.find(Ee=>(Ee==null?void 0:Ee.key)==="pageColumn")){let Ee=(q=(oe=F.compData)==null?void 0:oe.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:q.contents,Ze=((ae=(Q=F.compData)==null?void 0:Q.find(me=>(me==null?void 0:me.key)==="pageGroup"))==null?void 0:ae.contents)??"",Ne=(ye=(fe=(ge=Ee==null?void 0:Ee.split("["))==null?void 0:ge[1])==null?void 0:fe.split("]"))==null?void 0:ye[0];C=(($=Ee==null?void 0:Ee.split("["))==null?void 0:$[0])+((ce=(re=W.value)==null?void 0:re.find(me=>(me==null?void 0:me.key)===Ne))==null?void 0:ce.value)}return F}),!(C===""||C==="")){const F=await ze.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);g=g==null?void 0:g.map(U=>{var be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze;if((U==null?void 0:U.comp)==="Table"&&(be=U.compData)!=null&&be.find(Ne=>(Ne==null?void 0:Ne.key)==="pageColumn")){let Ne=(q=(oe=U.compData)==null?void 0:oe.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn"))==null?void 0:q.contents,Ae=((ae=(Q=U.compData)==null?void 0:Q.find(Ke=>(Ke==null?void 0:Ke.key)==="pageGroup"))==null?void 0:ae.contents)??"",me=(ye=(fe=(ge=Ne==null?void 0:Ne.split("["))==null?void 0:ge[1])==null?void 0:fe.split("]"))==null?void 0:ye[0],rt=(($=Ne==null?void 0:Ne.split("["))==null?void 0:$[0])+((ce=(re=W.value)==null?void 0:re.find(Ke=>(Ke==null?void 0:Ke.key)===me))==null?void 0:ce.value),Ue=(Ee=F==null?void 0:F.find(Ke=>(Ke==null?void 0:Ke.name)===(Ae===""?c==null?void 0:c.compName:Ae)))==null?void 0:Ee.compData;U.compData=(Ze=U.compData)==null?void 0:Ze.map(Ke=>{var De;return(Ke==null?void 0:Ke.key)==="tableContents"&&(Ke.contents=(De=Ue==null?void 0:Ue.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:De.contents),Ke})}return U})}let K={};if(((Me=(xe=G==null?void 0:G.extraValues)==null?void 0:xe.input)==null?void 0:Me.length)>0){const F=(Je=(Ve=G==null?void 0:G.extraValues)==null?void 0:Ve.input)==null?void 0:Je.map(async U=>{var be;de!=null&&de.find(oe=>oe===U)?K=await Be(U,g):K[Object.keys(U)[0]]=await Be((be=Object.values(U))==null?void 0:be[0],g,Ge)});await Promise.all(F)}else K=await Be("/",g);let Y=!1;(it=(He=G==null?void 0:G.extraValues)==null?void 0:He.output)==null||it.forEach(F=>{var U,be;(be=(U=Object.values(F))==null?void 0:U[0])!=null&&be.includes(".doc")&&(Y=!0)});let w;if(Y){const F=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await p.axios.post(G.api,K,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{F.close()})}else w=await p.axios.post(G.api,K,{headers:{"Content-Type":"application/json"}});let I=(Re=(tt=(st=(ee=p.cloneDeep(G))==null?void 0:ee.extraValues)==null?void 0:st.output)==null?void 0:tt.map(F=>{var U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae;if(!((be=(U=Object.values(F))==null?void 0:U[0])!=null&&be.includes(".doc"))){let me=($=(ye=(fe=(q=p.cloneDeep((oe=Object.values(F))==null?void 0:oe[0]))==null?void 0:q.split("["))==null?void 0:fe[((ge=(ae=p.cloneDeep((Q=Object.values(F))==null?void 0:Q[0]))==null?void 0:ae.split("["))==null?void 0:ge.length)-1])==null?void 0:ye.split("]"))==null?void 0:$[0],rt=me==null?void 0:me.split(":"),Ue=(Ee=p.cloneDeep((re=Object.values(F))==null?void 0:re[0]))==null?void 0:Ee.substring(0,p.cloneDeep((ce=Object.values(F))==null?void 0:ce[0]).lastIndexOf("["));if(Ue=(Ne=p.cloneDeep(Ue))==null?void 0:Ne.slice(0,((Ze=p.cloneDeep(Ue))==null?void 0:Ze.length)-1),Ue!=null&&Ue.includes("[")){let Ke="";if((Ae=_a(Ue,"/"))==null||Ae.forEach(De=>{var _e,Ye,Ce,$e,je,Qe,M;if(!(De!=null&&De.includes("[")))Ke=Ke===""?Ke+De.replaceAll("/",""):Ke+"/"+De.replaceAll("/","");else{let Se=p.cloneDeep(De).slice(1,((_e=p.cloneDeep(De))==null?void 0:_e.length)-1),ct=(Qe=(je=($e=(Ce=(Ye=p.cloneDeep(Se))==null?void 0:Ye.split("["))==null?void 0:Ce[1])==null?void 0:$e.split("]"))==null?void 0:je[0])==null?void 0:Qe.split(":"),nt="",et=(M=g==null?void 0:g.find(Ie=>(Ie==null?void 0:Ie.name)===(ct==null?void 0:ct[0])))==null?void 0:M.compData;et==null||et.forEach(Ie=>{var ut;(Ie==null?void 0:Ie.key)==="formContent"&&((ut=Ie==null?void 0:Ie.contents)==null||ut.forEach(We=>{(We==null?void 0:We.key)===(ct==null?void 0:ct[1])&&(nt=We==null?void 0:We.value)}))}),Ke=Ke===""?Ke+nt.replaceAll("/",""):Ke+"/"+nt.replaceAll("/","")}}),Ue=Ke,Ue[(Ue==null?void 0:Ue.length)-1]!=="/")return Ue}}}))==null?void 0:Re.filter(F=>F);I=[...new Set(p.cloneDeep(I))];let J=I==null?void 0:I.map(async F=>{let U=await ze.getItemData(F,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((U==null?void 0:U.length)===0)return await ze.getParentContents(F)});await Promise.all(J);let z=[],le=(ue=(ie=(pe=p.cloneDeep(G))==null?void 0:pe.extraValues)==null?void 0:ie.output)==null?void 0:ue.map(async F=>{var fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In,mn,Gn,Xn,Yn,$n,Bn,yn,On,An,an,Dn,Jn,kt,Jt,gt,ya,zt,cn,Mn,on,Cn,Zt;if((ye=(fe=Object.values(F))==null?void 0:fe[0])!=null&&ye.includes(".doc")){var U=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),be=w.headers["content-disposition"],oe=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=oe.exec(be),Q=q==null?void 0:q[1],ae=document.createElement("a"),ge=window.URL.createObjectURL(U);x.value=[{name:Q,blobUrl:ge}],d.value=!0}else{let jn=(me=(Ae=(Ne=(re=p.cloneDeep(($=Object.values(F))==null?void 0:$[0]))==null?void 0:re.split("["))==null?void 0:Ne[((Ze=(Ee=p.cloneDeep((ce=Object.values(F))==null?void 0:ce[0]))==null?void 0:Ee.split("["))==null?void 0:Ze.length)-1])==null?void 0:Ae.split("]"))==null?void 0:me[0],Bt=jn==null?void 0:jn.split(":"),Gt=(Ke=p.cloneDeep((rt=Object.values(F))==null?void 0:rt[0]))==null?void 0:Ke.substring(0,p.cloneDeep((Ue=Object.values(F))==null?void 0:Ue[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(_e=p.cloneDeep(Gt))==null?void 0:_e.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=y.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let _t="";(Ye=_a(Gt,"/"))==null||Ye.forEach((Ot,Wt)=>{var Ht,$t,un,rn,Kn,Qn,Un,Zn,Na,sa,ba;if(!(Ot!=null&&Ot.includes("[")))_t=_t===""?_t+Ot.replaceAll("/",""):_t+"/"+Ot.replaceAll("/","");else{let ca="",bn="";(Ht=p.cloneDeep(Ot))!=null&&Ht.includes("]")?(ca=p.cloneDeep(Ot).slice(1,(($t=p.cloneDeep(Ot))==null?void 0:$t.length)-1),bn=(Un=(Qn=(Kn=(rn=(un=p.cloneDeep(ca))==null?void 0:un.split("["))==null?void 0:rn[1])==null?void 0:Kn.split("]"))==null?void 0:Qn[0])==null?void 0:Un.split(":")):(ca=p.cloneDeep(Ot).slice(1,(Zn=p.cloneDeep(Ot))==null?void 0:Zn.length),bn=(Na=p.cloneDeep(ca))==null?void 0:Na.split("/"));let ea="",ua=(sa=g==null?void 0:g.find(sn=>(sn==null?void 0:sn.name)===(bn==null?void 0:bn[0])))==null?void 0:sa.compData;ua==null||ua.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Wn=>{(Wn==null?void 0:Wn.key)===(bn==null?void 0:bn[1])&&(ea=Wn==null?void 0:Wn.value)}))}),((ba=_a(Gt,"/"))==null?void 0:ba.length)-1!==Wt?_t=_t===""?_t+ea.replaceAll("/",""):_t+"/"+ea.replaceAll("/",""):_t=_t+l.value+ea.replaceAll("/","")}}),(Ce=y.value)!=null&&Ce.includes(_t)?Gt=y.value:Gt=_t}let ln=p.cloneDeep(($e=Object.keys(F))==null?void 0:$e[0]);if(((je=w==null?void 0:w.data)==null?void 0:je.statusCode)===200||((Qe=w==null?void 0:w.data)==null?void 0:Qe.code)===200){if(((Se=(M=w==null?void 0:w.data)==null?void 0:M.data)!=null&&Se[ln]||(nt=(ct=w==null?void 0:w.data)==null?void 0:ct.result)!=null&&nt[ln])&&(Bt==null?void 0:Bt.length)===1)return await te(((Ie=(et=w==null?void 0:w.data)==null?void 0:et.data)==null?void 0:Ie[ln])||((We=(ut=w==null?void 0:w.data)==null?void 0:ut.result)==null?void 0:We[ln]),p.cloneDeep(Gt),Bt,C);if((ht=(dt=w==null?void 0:w.data)==null?void 0:dt.data)!=null&&ht[ln]||(Dt=(mt=w==null?void 0:w.data)==null?void 0:mt.result)!=null&&Dt[ln]){let _t=await Fe(((Et=(Mt=w==null?void 0:w.data)==null?void 0:Mt.data)==null?void 0:Et[ln])||((Tt=(It=w==null?void 0:w.data)==null?void 0:It.result)==null?void 0:Tt[ln]),p.cloneDeep(Gt),Bt);return _t&&(z=[...z,..._t]),_t}else{if(!((jt=w==null?void 0:w.data)!=null&&jt.data)){let _t=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);_t=_t==null?void 0:_t.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(Bt==null?void 0:Bt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var un;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(un=$t.contents)==null?void 0:un.map(rn=>{var Kn,Qn;return(rn==null?void 0:rn.key)===(Bt==null?void 0:Bt[1])&&(rn.value=(Qn=(Kn=w==null?void 0:w.data)==null?void 0:Kn.result)==null?void 0:Qn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let Ot=[];(Rt=_t==null?void 0:_t.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Rt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);Ot.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(Ot==null?void 0:Ot.length)>0&&await p.batchUpdateInsofDataApi({dataList:Ot});return}if((Bt==null?void 0:Bt.length)===1){const _t=(xn=(Ct=(qt=w==null?void 0:w.data)==null?void 0:qt.data)==null?void 0:Ct.path)==null?void 0:xn.path;let Ot="";(Tn=(vn=(Sn=(wn=(hn=_t==null?void 0:_t.split("("))==null?void 0:hn[1])==null?void 0:wn.split(")"))==null?void 0:Sn[0])==null?void 0:vn.split(":"))==null||Tn.forEach($t=>{var un,rn;Ot=Ot===""?Ot+((un=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:un.trim()):Ot+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Xn=(Gn=(mn=(In=(gn=_t==null?void 0:_t.split("<"))==null?void 0:gn[1])==null?void 0:In.split(">"))==null?void 0:mn[0])==null?void 0:Gn.replaceAll("'",""))==null?void 0:Xn.trim()],Ht;return(Bn=($n=(Yn=w==null?void 0:w.data)==null?void 0:Yn.data)==null?void 0:$n.data)!=null&&Bn[Bt==null?void 0:Bt[0]]?Ht=await te((An=(On=(yn=w==null?void 0:w.data)==null?void 0:yn.data)==null?void 0:On.data)==null?void 0:An[Bt==null?void 0:Bt[0]],Ot,Bt,C):Ht=await he((Dn=(an=w==null?void 0:w.data)==null?void 0:an.data)==null?void 0:Dn.data,Ot,Wt,Ge),Ht}else{const _t=(Jt=(kt=(Jn=w==null?void 0:w.data)==null?void 0:Jn.data)==null?void 0:kt.path)==null?void 0:Jt.path;let Ot="";return(Mn=(cn=(zt=(ya=(gt=_t==null?void 0:_t.split("("))==null?void 0:gt[1])==null?void 0:ya.split(")"))==null?void 0:zt[0])==null?void 0:cn.split(":"))==null||Mn.forEach(Ht=>{var $t,un;Ot=Ot===""?Ot+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):Ot+"/"+((un=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:un.trim())}),await Fe((Zt=(Cn=(on=w==null?void 0:w.data)==null?void 0:on.data)==null?void 0:Cn.data)==null?void 0:Zt[Bt==null?void 0:Bt[0]],Ot,Bt)}}}}});if(await Promise.all(le),(z==null?void 0:z.length)>0){let F=[];z==null||z.forEach(oe=>{F!=null&&F.find(q=>{var Q,ae,ge,fe;return((ae=(Q=q==null?void 0:q.value)==null?void 0:Q.pageData)==null?void 0:ae.name)===((fe=(ge=oe==null?void 0:oe.value)==null?void 0:ge.pageData)==null?void 0:fe.name)})||F.push(oe)});let U=[];F==null||F.forEach(oe=>{var ae,ge,fe,ye;let q=p.cloneDeep(oe);q.value.pageData.compData=(ae=q.value.pageData.compData)==null?void 0:ae.map($=>{var re;return($==null?void 0:$.key)==="formContent"&&($.contents=(re=$.contents)==null?void 0:re.map(ce=>{var Ze,Ne,Ae,me;let Ee=(Ze=p.cloneDeep(z))==null?void 0:Ze.find(rt=>(rt==null?void 0:rt.keyType)===(ce==null?void 0:ce.key));if(Ee){let rt=(me=(Ae=(Ne=Ee.value.pageData.compData)==null?void 0:Ne.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:Ae.contents)==null?void 0:me.find(Ue=>(Ue==null?void 0:Ue.key)===(ce==null?void 0:ce.key));ce.value=rt==null?void 0:rt.value}return ce})),$}),U.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let Q=[];(ye=(fe=(ge=q==null?void 0:q.value)==null?void 0:ge.pageData)==null?void 0:fe.compData)==null||ye.forEach($=>{var re;($==null?void 0:$.key)==="formContent"&&((re=$==null?void 0:$.contents)==null||re.forEach(ce=>{var Ee,Ze,Ne,Ae,me,rt;if((Ze=(Ee=ce==null?void 0:ce.optionUrl)==null?void 0:Ee.menuSelect)!=null&&Ze.find(Ue=>Ue==null?void 0:Ue.includes("[")))if(Q!=null&&Q.find(Ue=>{var Ke,De,_e;return((Ke=Ue==null?void 0:Ue.key)==null?void 0:Ke.join(","))===((_e=(De=ce==null?void 0:ce.optionUrl)==null?void 0:De.menuSelect)==null?void 0:_e.join(","))})){let Ue=(Ne=Q==null?void 0:Q.find(Ke=>{var De,_e,Ye;return((De=Ke==null?void 0:Ke.key)==null?void 0:De.join(","))===((Ye=(_e=ce==null?void 0:ce.optionUrl)==null?void 0:_e.menuSelect)==null?void 0:Ye.join(","))}))==null?void 0:Ne.value;Ue.push({key:ce==null?void 0:ce.prop,groups:(Ae=ce==null?void 0:ce.optionUrl)==null?void 0:Ae.groupSelect,value:ce==null?void 0:ce.value}),Q=Q==null?void 0:Q.map(Ke=>{var De,_e,Ye;return((De=Ke==null?void 0:Ke.key)==null?void 0:De.join(","))===((Ye=(_e=ce==null?void 0:ce.optionUrl)==null?void 0:_e.menuSelect)==null?void 0:Ye.join(","))&&(Ke.value=Ue),Ke})}else Q.push({key:(me=ce==null?void 0:ce.optionUrl)==null?void 0:me.menuSelect,value:[{key:ce==null?void 0:ce.prop,groups:(rt=ce==null?void 0:ce.optionUrl)==null?void 0:rt.groupSelect,value:ce==null?void 0:ce.value}]})}))}),(Q==null?void 0:Q.length)>0&&(Q=Q==null?void 0:Q.map($=>{var ce;let re="";return(ce=$==null?void 0:$.key)==null||ce.forEach(Ee=>{var Ze;if(!(Ee!=null&&Ee.includes("[")))re=re===""?re+Ee:re+"/"+Ee;else{let Ne="",Ae=(Ze=Ee==null?void 0:Ee.replaceAll("[","").replaceAll("]",""))==null?void 0:Ze.split(":");g==null||g.forEach(me=>{var rt;(me==null?void 0:me.name)===(Ae==null?void 0:Ae[0])&&((rt=me==null?void 0:me.compData)==null||rt.forEach(Ue=>{var Ke;(Ue==null?void 0:Ue.key)==="formContent"&&((Ke=Ue==null?void 0:Ue.contents)==null||Ke.forEach(De=>{(De==null?void 0:De.prop)===(Ae==null?void 0:Ae[1])&&(Ne=De==null?void 0:De.value)}))}))}),re=re+l.value+Ne}}),$.key=re,$})),Q==null||Q.forEach($=>{var Ze,Ne,Ae;let re=(Ze=Ge[$.key])==null?void 0:Ze.find(me=>{var rt,Ue,Ke,De,_e,Ye,Ce;return((Ue=(rt=me==null?void 0:me.value)==null?void 0:rt.pageData)==null?void 0:Ue.name)===((_e=(De=(Ke=$==null?void 0:$.value)==null?void 0:Ke[0])==null?void 0:De.groups)==null?void 0:_e[0])&&((Ce=(Ye=me==null?void 0:me.value)==null?void 0:Ye.pageData)==null?void 0:Ce.name)!==void 0}),ce=re==null?void 0:re.id,Ee=(Ne=re==null?void 0:re.value)==null?void 0:Ne.pageData;Ee.compData=(Ae=Ee.compData)==null?void 0:Ae.map(me=>{var rt;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(rt=me.contents)==null?void 0:rt.map(Ue=>{var De;let Ke=(De=$.value)==null?void 0:De.find(_e=>(_e==null?void 0:_e.key)===(Ue==null?void 0:Ue.prop));return Ke&&(Ue.value=Ke.value),Ue})),me}),U.push({id:ce,value:{pageData:Ee}})})});let be=(Te=p.cloneDeep(z))==null?void 0:Te[0];(U==null?void 0:U.length)>0&&await p.batchUpdateInsofDataApi({dataList:U})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},de=["createInsofDataApi"],Xe=ko(async G=>{ne(G)},100),ot=async G=>{var He,it,ee,st,tt;const R=p.cloneDeep(G);let ve,xe=new WeakMap,Me=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:X.value});(it=(He=Me.data.result)==null?void 0:He.filter(Re=>{var pe,ie;return((pe=Re==null?void 0:Re.key)==null?void 0:pe.pageKey)!=="menu"&&((ie=Re==null?void 0:Re.key)==null?void 0:ie.pageKey)!=="secret"}))==null||it.forEach(Re=>{xe[Re.key.pageKey]?xe[Re.key.pageKey]=[...xe[Re.key.pageKey],Re]:xe[Re.key.pageKey]=[Re]}),G!=null&&G[0].path&&(ve=await(R==null?void 0:R.map(async(Re,pe)=>{var K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe;const ue=(K=xe[Re==null?void 0:Re.path])==null?void 0:K.filter(ye=>{var $;return(($=ye==null?void 0:ye.key)==null?void 0:$.type)==="data"});let Te="";const Ge=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);ue==null||ue.forEach(ye=>{var $,re,ce,Ee,Ze;((re=($=ye==null?void 0:ye.value)==null?void 0:$.tableData)==null?void 0:re.算法名称)===((ce=R==null?void 0:R[pe])==null?void 0:ce.method)&&(Te=(Ze=(Ee=ye==null?void 0:ye.value)==null?void 0:Ee.tableData)==null?void 0:Ze.算法体)});const ft=await ze.getItemData(Re==null?void 0:Re.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let g="",C=(J=(I=(w=(Y=ft==null?void 0:ft[0])==null?void 0:Y.compData)==null?void 0:w.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:I.contents)==null?void 0:J.findIndex(ye=>(ye==null?void 0:ye.prop)==="算法体");return(le=(z=ft==null?void 0:ft[0])==null?void 0:z.compData)==null||le.forEach(ye=>{var $;(ye==null?void 0:ye.key)==="tableContents"&&(($=ye==null?void 0:ye.contents)==null||$.forEach(re=>{re!=null&&re.find(ce=>ce===(Re==null?void 0:Re.method))&&(g=re[C])}))}),{buttonName:((F=R==null?void 0:R[pe])==null?void 0:F.method)||((oe=(be=(U=ue==null?void 0:ue[0])==null?void 0:U.value)==null?void 0:be.tableData)==null?void 0:oe.算法名称),api:(Te===""?(ae=(Q=(q=ue==null?void 0:ue[0])==null?void 0:q.value)==null?void 0:Q.tableData)==null?void 0:ae.算法体:Te)||g,content:Ge==null?void 0:Ge.filter(ye=>ye.comp!=="methodButton"),extraContent:(ge=p.cloneDeep(Re.value))==null?void 0:ge.slice(1),methodName:(Re==null?void 0:Re.path)??"",extraValues:(fe=R==null?void 0:R[pe])==null?void 0:fe.data}})));const Ve=R==null?void 0:R.map(async Re=>{var ft,g,C,K,Y,w;const pe=(ft=Me.data.result)==null?void 0:ft.filter(I=>{var J,z,le;return((J=I==null?void 0:I.key)==null?void 0:J.parentTable)===""&&((z=I==null?void 0:I.key)==null?void 0:z.type)==="method"&&((le=I==null?void 0:I.key)==null?void 0:le.methodName)===I.method}),ie=pe==null?void 0:pe[0],ue=(g=Me.data.result)==null?void 0:g.filter(I=>{var J,z;return((J=I==null?void 0:I.key)==null?void 0:J.type)==="methodData"&&((z=I==null?void 0:I.key)==null?void 0:z.tableId)===(ie==null?void 0:ie.id)}),Te=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Ge=ue==null?void 0:ue[0];return{buttonName:(C=ie==null?void 0:ie.key)==null?void 0:C.methodKey,api:(Y=(K=Ge==null?void 0:Ge.value)==null?void 0:K.tableData)==null?void 0:Y[0],content:Te==null?void 0:Te.filter(I=>I.comp!=="methodButton"),extraContent:(w=p.cloneDeep(Re.value))==null?void 0:w.slice(1),methodName:(Re==null?void 0:Re.method)??""}}),Je=(ee=G==null?void 0:G[0])!=null&&ee.path&&((st=G==null?void 0:G[0])==null?void 0:st.path)!==""?await Promise.all(ve):await Promise.all(Ve);i.value=Je==null?void 0:Je.filter(Re=>Re==null?void 0:Re.extraContent),(tt=i.value)==null||tt.forEach(Re=>{var pe;Re.api===""&&((pe=Re.content)==null||pe.forEach(ie=>{var ue;ie.comp=="Table"&&D.setExtraContents(ze.methodTableToContent(ie.compData,(ue=Re.extraContent)==null?void 0:ue[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!T.value&&await ot(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(G,R)=>{var ve,xe,Me;return e.unref(V)!=="edit"?(e.openBlock(),e.createElementBlock("div",_c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ve=i.value)==null?void 0:ve.filter(Ve=>(Ve==null?void 0:Ve.buttonName)!=="保存"),Ve=>{var Je;return e.openBlock(),e.createElementBlock("div",null,[Ve.api!==""?(e.openBlock(),e.createBlock(e.unref(Mo._sfc_main),{key:0,disabled:e.unref(P)===e.unref(y)&&!((Je=Ve==null?void 0:Ve.buttonName)!=null&&Je.includes("预览")),class:"calculator-content",modelValue:Ve.buttonName,onClickTrigger:He=>e.unref(Xe)(Ve),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Me=e.unref(y))==null?void 0:Me[((xe=e.unref(y))==null?void 0:xe.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Mo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:se,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Oe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Tc=Ft._export_sfc(Sc,[["__scopeId","data-v-11fca7e0"]]),Ic={};function Bc(a,i){return" 567 "}const Ac=Ft._export_sfc(Ic,[["render",Bc]]),Nc={class:"module content"},Vc={class:"module data"},Oc={class:"module layout"},Mc={class:"form-content"},zc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=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}]),h=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:""}]),D=e.ref({}),E=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),O=W=>{var P;D.value=p.cloneDeep(W),l("change",(P=_())==null?void 0:P.compData)},H=W=>{var P,X;if((W==null?void 0:W.buttonName)==="确认"){const y=p.cloneDeep(W==null?void 0:W.content);switch(d.value){case"create":E.value.push({...y,index:((P=E.value)==null?void 0:P.length)+1});break}l("change",(X=_())==null?void 0:X.compData),c.visible=!1}else c.visible=!1},V=(W,P)=>{var X,y;switch(W){case"create":(X=h.value)==null||X.forEach(L=>{L.value=""}),d.value="create",c.visible=!0;break;case"update":(y=h.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(P,1),d.value="delete";break}},ke=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(D.value=((P=W==null?void 0:W.find(y=>y.key==="signConfig"))==null?void 0:P.contents)??{},E.value=((X=W==null?void 0:W.find(y=>y.key==="signTypeList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Nc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.label),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>V("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Oc,[e.createVNode(Vt.ssForm,{rowContents:v.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ke,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Mc,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Rc=Ft._export_sfc(zc,[["__scopeId","data-v-487e0536"]]),Lc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var _,O;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(O=s==null?void 0:s.stepConfig)==null?void 0:O.active}),x=(_,O)=>{c.value=O,l("clickStep",_,O)},v=_=>Vt.getComponent(_),h=()=>{var O;const _=(O=s==null?void 0:s.stepList)==null?void 0:O.find((H,V)=>V+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,O)=>{var ke,W,P,X,y;const H=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ke=a.stepConfig)==null?void 0:ke.direction,active:d.value,"finish-status":"success",simple:(W=a.stepConfig)==null?void 0:W.simple,"align-center":((P=a.stepConfig)==null?void 0:P.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(L,k)=>(e.openBlock(),e.createBlock(H,{key:k,class:"step-item",onClick:A=>x(L,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:L==null?void 0:L.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:L==null?void 0:L.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(X=a.stepConfig)!=null&&X.allowTrigger&&((y=a.stepConfig)!=null&&y.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(L,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(L==null?void 0:L.type)),{modelValue:L.value,"onUpdate:modelValue":A=>L.value=A,onClickTrigger:D,onChangeTrigger:E,content:L==null?void 0:L.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(se=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},se||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Fc=Ft._export_sfc(Lc,[["__scopeId","data-v-d7c99969"]]),Pc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),x=(v,h)=>{l("clickStep",v,h)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var h,D;d.value=(h=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(v,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Fc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),$c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),jc=Ft._export_sfc($c,[["__scopeId","data-v-4172a886"]]),Kc={class:"line-content"},Uc={class:"line-time"},Wc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(jc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:v})=>[e.createElementVNode("span",Kc,e.toDisplayString(x),1),e.createElementVNode("span",Uc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),Hc=Ft._export_sfc(Wc,[["__scopeId","data-v-b4d9deed"]]),qc={class:"tabs-content"},Gc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createVNode(Vt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Xc=Ft._export_sfc(Gc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Yc={class:"type-select"},Jc=["onClick"],Qc={class:"list-icon"},Zc={__name:"modelSelect",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rr),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(v)},[e.createElementVNode("div",Qc,[e.createVNode(x,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Jc)]))),128))])}}},eu=Ft._export_sfc(Zc,[["__scopeId","data-v-91799bf8"]]),tu={class:"fill-content"},nu={class:"operate-content"},au={class:"collapse-title-content"},ou={class:"collapse-title-item"},lu={key:1},ru=["onClick"],iu={class:"icon-content"},su={key:0,class:"edit-content"},cu=["onClick"],uu={class:"comp-child"},pu={__name:"modelFill",setup(a){const i=lo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),v=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,P)=>(H===P&&(W.content=!0),W));x.value=V},h=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,P)=>(H===P&&(W.content=!1),W));x.value=V,c.value=p.cloneDeep(s.value)},D=(H,V)=>{var X;let ke=(X=p.cloneDeep(x.value))==null?void 0:X.map((y,L)=>(H===L&&(y.content=!1),y));x.value=ke;const W=p.cloneDeep(s.value),P=W==null?void 0:W.filter((y,L)=>(L===H&&(y.name=V),y));i.setOriginalData(P),i.setItemData(P)};e.watch(()=>s.value,()=>{var H,V,ke;!s.value||((H=s.value)==null?void 0:H.length)===0?c.value=[]:c.value=(V=p.cloneDeep(s.value))==null?void 0:V.filter(W=>(W==null?void 0:W.comp)!=="methodButton"),d.value=c.value,x.value=(ke=p.cloneDeep(d.value))==null?void 0:ke.map((W,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const E=H=>ma(H),_=(H,V,ke)=>{var P,X;if(!H)return;let W=p.cloneDeep(s.value);W=(P=W==null?void 0:W.map((y,L)=>(L===ke&&(y.compData=H),y)))==null?void 0:P.filter(y=>(y==null?void 0:y.comp)!=="methodButton"),x.value=(X=p.cloneDeep(W))==null?void 0:X.map((y,L)=>({id:L,content:!1})),i.setOriginalData(W),i.setItemData(W)},O=H=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(s.value),ke=V==null?void 0:V.filter((W,P)=>P!==H);i.setOriginalData(ke),i.setItemData(ke),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,V)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",tu,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",nu,[e.createVNode(xl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:W,index:P})=>{var X,y,L,k,A,T,se,Oe,at,Be;return[e.createElementVNode("div",au,[e.createElementVNode("div",ou,[(y=(X=x.value)==null?void 0:X.find(Fe=>Fe.id===P))!=null&&y.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:W.name&&W.name!==""?"8px":"0px"})},e.toDisplayString(W.name),5)),(k=(L=x.value)==null?void 0:L.find(Fe=>Fe.id===P))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",lu,[e.createVNode(Vt._sfc_main$2,{modelValue:W.name,"onUpdate:modelValue":Fe=>W.name=Fe,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(Fe=>Fe.id===P))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Fe=>v(P),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ru))]),e.createElementVNode("div",iu,[(Oe=(se=x.value)==null?void 0:se.find(Fe=>Fe.id===P))!=null&&Oe.content?(e.openBlock(),e.createElementBlock("div",su,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Fe=>h(P),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(Fe=>D(P,W.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Be=(at=x.value)==null?void 0:at.find(Fe=>Fe.id===P))!=null&&Be.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Fe=>O(P),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,cu))])])]}),content:e.withCtx(({item:W,index:P})=>{var X,y;return[e.createElementVNode("div",uu,[e.createTextVNode(e.toDisplayString(E(W.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(W.comp+"Operate")),{itemContents:W==null?void 0:W.compData,originalItemContents:(y=(X=d.value)==null?void 0:X.find((L,k)=>k===P))==null?void 0:y.compData,onChange:L=>_(L,W,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},du=Ft._export_sfc(pu,[["__scopeId","data-v-a46a44b9"]]),fu={key:0,class:"show-content"},hu={style:{display:"flex"}},vu={__name:"modelShow",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>ma(d);return(d,x)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",fu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",hu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},gu=Ft._export_sfc(vu,[["__scopeId","data-v-3f3e863e"]]),mu={class:"tabs-header"},yu={class:"tabs-list"},bu={class:"tab-name"},ku={class:"tab-actions"},xu=["onClick"],wu=["onClick"],Du=["onClick"],Cu={class:"model-operate"},Eu={class:"model-select",style:{display:"unset"}},_u={class:"existing-components"},Su={class:"component-list"},Tu=["onClick"],Iu={class:"component-info"},Bu={class:"component-type"},Au={class:"component-name"},Nu={class:"model-fill"},Vu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(""),v=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),O=e.ref(null),H=lo(p.pinia),{itemData:V}=p.storeToRefs(H),ke=()=>{x.value="新增标签页",v.value.title="",h.value=-1,d.value=!0},W=G=>{x.value="修改标签页",v.value.title=c.value[G].title,h.value=G,d.value=!0},P=G=>{const R=L(G);_.value.delete(R),c.value.splice(G,1),ot()},X=()=>{if(v.value.title.trim()){if(h.value===-1){const G={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:y()};c.value.push(G)}else c.value[h.value].title=v.value.title,c.value[h.value].value=v.value.title,c.value[h.value].label=v.value.title;d.value=!1,ot()}},y=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,L=G=>{const R=c.value[G];return R.id||(R.id=y()),R.id},k=G=>{var xe;E.value=G;const R=L(G);O.value=p.cloneDeep(V.value);let ve=_.value.get(R);!ve&&((xe=c.value[G].children)==null?void 0:xe.length)>0&&(ve=Oe(c.value[G].children)),ve?H.setItemData(p.cloneDeep(ve)):H.setItemData([]),D.value=!0},A=e.computed(()=>{const G=Kt.useModelComp(p.pinia),R=p.storeToRefs(G).itemData.value;return console.log("可用组件数据",R),!R||!Array.isArray(R)?[]:R.filter(ve=>{var xe;if(ve.comp==="Tabs"&&E.value>=0){const Me=L(E.value);if((xe=ve.compData)==null?void 0:xe.some(Je=>{var He;return Je.key==="stepList"&&((He=Je.contents)==null?void 0:He.some(it=>it.id===Me))}))return!1}return!0})}),T=G=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[G]||G,se=G=>{var R;try{const ve=p.cloneDeep(G);ve.id=Date.now()+Math.random(),ve.comp==="Tabs"&&((R=ve.compData)==null||R.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Ve=>{Ve.id=y()})}));const xe=p.cloneDeep(V.value);xe.push(ve),H.setItemData(xe)}catch(ve){console.error("添加组件失败:",ve)}},Oe=G=>G.map(R=>{var ve;switch(R.type){case"form":return{comp:"Form",name:R.value||"表单",compData:at(R.content)};case"table":return{comp:"Table",name:R.value||"表格",compData:Be(R.content)};default:return{comp:"Unknown",name:R.value||"",compData:((ve=R.content)==null?void 0:ve.originalData)||[]}}}),at=G=>{if(!G)return[];const R=[];return G.rowContents&&R.push({key:"formContent",contents:G.rowContents}),G.buttonValue&&R.push({key:"formButton",contents:G.buttonValue}),typeof G.isEnableWrap<"u"&&R.push({key:"enableWrap",contents:G.isEnableWrap}),R},Be=G=>[],Fe=()=>{if(E.value>=0&&E.value<c.value.length){const G=L(E.value);_.value.set(G,p.cloneDeep(V.value)),c.value[E.value].children=te(V.value),console.log("保存后的数据",te(V.value))}D.value=!1,E.value=-1,O.value=null,ot()},he=()=>{O.value&&H.setItemData(p.cloneDeep(O.value)),D.value=!1,E.value=-1,O.value=null},B=()=>{D.value&&he()},te=G=>{if(!Array.isArray(G))throw new Error("sourceData must be an array");return G.map((R,ve)=>{if(!R||typeof R!="object")return R;const{comp:xe,name:Me,compData:Ve}=R;switch(xe){case"Form":return{type:"form",content:ne(Ve||[]),value:"表单"};case"Table":return{type:"table",content:de(Ve||[]),value:"表格"};default:return{type:"xxx",content:Xe(Ve||[]),value:""}}})},ne=G=>{const R={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ve={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return G.forEach((xe,Me)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Me}:`,xe);return}const{key:Ve,contents:Je}=xe,He=ve[Ve];if(!He){console.warn(`Unknown Form config key: ${Ve}`);return}Ve==="enableWrap"?R[He]=!!Je:R[He]=Array.isArray(Je)?Je:[]}),R},de=G=>{const R={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ve={header:"columns",tableContents:"tableData"};return G.forEach((xe,Me)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Me}:`,xe);return}const{key:Ve,contents:Je}=xe,He=ve[Ve];if(!He){console.warn(`Unknown Table config key: ${Ve}`);return}R[He]=Array.isArray(Je)?Je:[]}),R},Xe=G=>(console.log("Default conversion logic - to be implemented"),{originalData:G,processed:!1,componentType:"unknown"}),ot=()=>{const G=[{key:"stepList",contents:c.value}];l("change",G)};return e.watch(()=>s.itemContents,G=>{if(G&&G.length>0){const R=G.find(ve=>ve.key==="stepList");R&&R.contents&&(c.value=R.contents.map(ve=>({title:ve.title||"",value:ve.value||ve.title||"",label:ve.label||ve.title||"",children:ve.children||[],id:ve.id||y()})))}},{immediate:!0,deep:!0}),(G,R)=>{const ve=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Ve=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",mu,[R[6]||(R[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ve,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),R[5]||(R[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Je,He)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:He},[e.createElementVNode("span",bu,e.toDisplayString(Je.title),1),e.createElementVNode("div",ku,[e.createElementVNode("button",{onClick:it=>W(He)},"修改标题",8,xu),e.createElementVNode("button",{onClick:it=>k(He)},"布局调整",8,wu),e.createElementVNode("button",{onClick:it=>P(He)},"删除",8,Du)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":R[2]||(R[2]=Je=>d.value=Je),title:x.value,onBeforeDestroy:R[3]||(R[3]=Je=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:R[1]||(R[1]=Je=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:X},"确定")]),default:e.withCtx(()=>[e.createVNode(Ve,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:v.value.title,"onUpdate:modelValue":R[0]||(R[0]=Je=>v.value.title=Je),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":R[4]||(R[4]=Je=>D.value=Je),title:"布局调整",fullScreen:"",onBeforeDestroy:B},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:he},"取消"),e.createElementVNode("button",{onClick:Fe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Cu,[e.createElementVNode("div",Eu,[e.createVNode(eu),e.createElementVNode("div",_u,[R[8]||(R[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Je=>(e.openBlock(),e.createElementBlock("div",{key:Je.id,class:"component-item",onClick:He=>se(Je)},[e.createElementVNode("div",Iu,[e.createElementVNode("span",Bu,e.toDisplayString(T(Je.comp)),1),e.createElementVNode("span",Au,e.toDisplayString(Je.name),1)]),R[7]||(R[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Tu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:G.innerWidth},[e.createVNode(gu)])),e.createElementVNode("div",Nu,[e.createVNode(du)])])]),_:1},8,["modelValue"])])}}},Ou=Ft._export_sfc(Vu,[["__scopeId","data-v-9096ed0d"]]);function Mu(){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 zu(a){return{type:"line",...a}}function Ru(){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 Lu(a){return{type:"bar",barWidth:"60%",...a}}function Fu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Pu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Pn={line:{initBaseoptions:Mu,initSeries:zu},bar:{initBaseoptions:Ru,initSeries:Lu},pie:{initBaseoptions:Fu,initSeries:Pu}},$o=Kt.useMenuState(p.pinia),Nl=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},v=a==null?void 0:a.find(_=>{const{name:O}=_;return O===c});if(!v)return{names:s,values:l};const h=(E=v==null?void 0:v.compData)==null?void 0:E.find(_=>{const{key:O}=_;return O==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const O=_==null?void 0:_[0];let H=!1;p.isObject(O)&&(O!=null&&O.id)&&(H=!0);let V=d,ke=x;H&&(V=V+1,ke=ke+1);const W=_==null?void 0:_[V],P=_==null?void 0:_[ke];s.push(W),l.push(P)}),{names:s,values:l}},$u=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let v=null;const h=sessionStorage.getItem("systemKey");if(x&&$o.activeMenuPath&&(v=await ze.getItemData(`${$o.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");v=await ze.getItemData(`${D}^${s}`,h,"")}return Nl(v,{group:l,nameCol:c,valueCol:d})},ju=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),v=await ze.getItemData(d,x,"");return Nl(v,{group:s,nameCol:l,valueCol:c})},xo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:v,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return v&&h&&Vt.isNumber(D)&&Vt.isNumber(E)?await $u({menu:l,mainKey:v,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Vt.isNumber(d)&&Vt.isNumber(x)?await ju({menu:l,group:c,nameCol:d,valueCol:x}):s},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=v({data:E});return h.series.push(_),h},Uu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=v({data:E});return h.series.push(_),h},Wu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;const _=[];for(let H=0;H<D.length;H++){const V=D[H],ke=E[H];_.push({name:V,value:ke})}const O=v({data:_});return h.series.push(O),h},Hu=async(a=[])=>{var x,v,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((v=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await Uu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Wu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},qu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await Hu(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Fr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Gu=Ft._export_sfc(qu,[["__scopeId","data-v-d4c081e8"]]),Xu={class:"chart-module layout"},Yu={class:"chart-module content"},Ju={class:"chart-module content"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np={class:"form-content"},ap={class:"dialog-footer"},op=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),h=()=>{var pe;d.value=x(),(pe=d.value)==null||pe.forEach(ie=>{var Te;const ue=ie==null?void 0:ie.prop;ie.value=(Te=v==null?void 0:v.value)==null?void 0:Te[ue]}),c.visible=!0},D=pe=>{v.value=pe},E=()=>{var pe;c.visible=!1,l("change",(pe=tt())==null?void 0:pe.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),O=e.ref([]),H=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ke=()=>{const pe=O.value,ie=p.cloneDeep(pe);return ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=V.value)==null?void 0:Ge[Te]}),ie},W=pe=>{var ue;V.value=pe;const ie=ke();O.value=ie,l("change",(ue=tt())==null?void 0:ue.compData)},P=async()=>{const pe=await ze.getMenusContent(),ie=ke();ie==null||ie.forEach(ue=>{(ue==null?void 0:ue.prop)==="menu"&&(ue.contents=pe)}),O.value=ie,_.visible=!0,await Je(V.value.menu),await ee(V.value.group)},X=e.reactive({visible:!1,width:"840",title:"详情页配置"}),y=e.ref([]),L=()=>[{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:[]}],k=e.ref({}),A=()=>{const pe=y.value,ie=p.cloneDeep(pe);return ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=k.value)==null?void 0:Ge[Te]}),ie},T=pe=>{var ue;k.value=pe;const ie=A();y.value=ie,l("change",(ue=tt())==null?void 0:ue.compData)},se=async()=>{await B();const pe=p.cloneDeep(Oe.value),ie=A();ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=k==null?void 0:k.value)==null?void 0:Ge[Te],Te==="mainKey"&&(ue.contents=pe)}),y.value=ie,X.visible=!0},Oe=e.ref([]),at=e.ref([]),Be=e.ref({}),Fe=e.ref({}),he=()=>{const{compData:pe}=xe.value||{},ie=pe==null?void 0:pe.find(K=>{const{key:Y}=K;return Y==="header"}),ue=(ie==null?void 0:ie.contents)||[],Te=ue==null?void 0:ue.filter((K,Y)=>{const{label:w}=K;return w!=="操作"}),Ge=Te==null?void 0:Te.findIndex((K,Y)=>{const{isMainKey:w}=K;return w});if(Ge<0)return[];const ft=pe==null?void 0:pe.find(K=>{const{key:Y}=K;return Y==="tableContents"}),g=(ft==null?void 0:ft.contents)||[];return g==null?void 0:g.map(K=>{const Y=K==null?void 0:K[0];let w=Ge;p.isObject(Y)&&(Y!=null&&Y.id)&&(w=w+1);const I=K==null?void 0:K[w];return{label:I,value:I}})},B=async()=>{const pe=await he();Oe.value=pe},te=async pe=>{const ie=sessionStorage.getItem("systemKey");return await ze.getItemData(pe,ie,"")},ne=async pe=>{const ie=pe;at.value=ie==null?void 0:ie.map(ue=>{const{name:Te}=ue;return Be.value[Te]=ue,{label:Te,value:Te}})},de=pe=>{const{comp:ie,compData:ue}=Fe.value||{};if(ie==="Table"){let Te=A();Te=Te.filter(Ge=>{const{prop:ft}=Ge;return ft!=="formItems"}),He(Te,ue),y.value=Te}},Xe=async()=>{var ue,Te;const pe=(ue=k==null?void 0:k.value)==null?void 0:ue.mainKey,ie=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(pe){const ft=`${ie==null?void 0:ie.join("/")}^${pe}`,g=await te(ft);await ne(g);const C=A();C==null||C.forEach(K=>{(K==null?void 0:K.prop)==="group"&&(K.contents=at.value)}),y.value=C}};e.watch(()=>{var pe;return(pe=k==null?void 0:k.value)==null?void 0:pe.mainKey},async(pe,ie)=>{pe!=ie&&pe&&await Xe()});const ot=async pe=>{const ie=Be.value[pe];Fe.value=ie,await de()};e.watch(()=>{var pe;return(pe=k==null?void 0:k.value)==null?void 0:pe.group},async(pe,ie)=>{pe!=ie&&pe&&ot(pe)});const G=async()=>{var ie;await Xe();const pe=(ie=k.value)==null?void 0:ie.group;await ot(pe)},R=e.ref([]),ve=e.ref({}),xe=e.ref({}),Me=async pe=>{const ie=pe==null?void 0:pe.join("/"),ue=sessionStorage.getItem("systemKey");return await ze.getItemData(ie,ue,"")},Ve=async pe=>{const ie=await Me(pe);R.value=ie==null?void 0:ie.map(ue=>{const{name:Te}=ue;return ve.value[Te]=ue,{label:Te,value:Te}})},Je=async(pe,ie)=>{await Ve(pe);const ue=ke();ue==null||ue.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=R.value)}),O.value=ue};e.watch(()=>{var pe;return(pe=V==null?void 0:V.value)==null?void 0:pe.menu},async(pe,ie)=>{const ue=pe==null?void 0:pe.join("/"),Te=ie==null?void 0:ie.join("/");ue!=Te&&await Je(pe)});const He=(pe,ie)=>{const ue=ie==null?void 0:ie.find(g=>{const{key:C}=g;return C==="header"}),Te=(ue==null?void 0:ue.contents)||[],Ge=Te==null?void 0:Te.filter((g,C)=>{const{label:K}=g;return K!=="操作"}),ft=Ge==null?void 0:Ge.map((g,C)=>{const{label:K}=g;return{label:K,value:C}});pe==null||pe.forEach(g=>{const C=g==null?void 0:g.prop;(C==="nameCol"||C==="valueCol")&&(g.contents=ft)})},it=pe=>{const{comp:ie,compData:ue}=xe.value||{};if(ie==="Table"){V.value.formItems=[];let Te=ke();Te=Te.filter(Ge=>{const{prop:ft}=Ge;return ft!=="formItems"}),He(Te,ue),O.value=Te}},ee=async pe=>{const ie=ve.value[pe];xe.value=ie,await it()};e.watch(()=>{var pe;return(pe=V==null?void 0:V.value)==null?void 0:pe.group},async(pe,ie)=>{pe!=ie&&ee(pe)});const st=async()=>{var ue,Te;const pe=(ue=V.value)==null?void 0:ue.menu;await Je(pe);const ie=(Te=V.value)==null?void 0:Te.group;await ee(ie)},tt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),Re=()=>{c.visible=!1,_.visible=!1,X.visible=!1};return e.onMounted(async()=>{var ie,ue,Te;O.value=H(),y.value=L();const pe=s==null?void 0:s.itemContents;v.value=((ie=pe==null?void 0:pe.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:ie.contents)??{},V.value=((ue=pe==null?void 0:pe.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:ue.contents)??{},await st(),k.value=((Te=pe==null?void 0:pe.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await G()}),(pe,ie)=>{const ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xu,[ie[4]||(ie[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[0]||(ie[0]=Te=>h())},{default:e.withCtx(()=>ie[3]||(ie[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Yu,[ie[6]||(ie[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[1]||(ie[1]=Te=>P())},{default:e.withCtx(()=>ie[5]||(ie[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Ju,[ie[8]||(ie[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[2]||(ie[2]=Te=>se())},{default:e.withCtx(()=>ie[7]||(ie[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Re,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[9]||(ie[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ue,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>ie[10]||(ie[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:Re,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[11]||(ie[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ue,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>ie[12]||(ie[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:X.visible,title:X.title,onBeforeDestroy:Re,width:X.width},{default:e.withCtx(()=>[e.createElementVNode("div",np,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[13]||(ie[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ue,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>ie[14]||(ie[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),lp=Ft._export_sfc(op,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},rp=Ka.exports,jo;function ip(){return jo||(jo=1,function(a,i){(function(s,l){l()})(rp,function(){function s(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,_){var O=new XMLHttpRequest;O.open("GET",D),O.responseType="blob",O.onload=function(){h(O.response,E,_)},O.onerror=function(){console.error("could not download file")},O.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ze.commonjsGlobal=="object"&&ze.commonjsGlobal.global===ze.commonjsGlobal?ze.commonjsGlobal:void 0,v=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(D,E,_){var O=x.URL||x.webkitURL,H=document.createElement("a");E=E||D.name||"download",H.download=E,H.rel="noopener",typeof D=="string"?(H.href=D,H.origin===location.origin?d(H):c(H.href)?l(D,E,_):d(H,H.target="_blank")):(H.href=O.createObjectURL(D),setTimeout(function(){O.revokeObjectURL(H.href)},4e4),setTimeout(function(){d(H)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,_){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,_),E);else if(c(D))l(D,E,_);else{var O=document.createElement("a");O.href=D,O.target="_blank",setTimeout(function(){d(O)})}}:function(D,E,_,O){if(O=O||open("","_blank"),O&&(O.document.title=O.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var H=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||H&&V||v)&&typeof FileReader<"u"){var W=new FileReader;W.onloadend=function(){var y=W.result;y=ke?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),O?O.location.href=y:location=y,O=null},W.readAsDataURL(D)}else{var P=x.URL||x.webkitURL,X=P.createObjectURL(D);O?O.location=X:location.href=X,O=null,setTimeout(function(){P.revokeObjectURL(X)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}ip();const ra=p.useLoginState(),{loginUserInfo:La}=p.storeToRefs(ra),Pt=Kt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:sp,itemGridData:aa,curStructureCompIds:Ko,isSubmitCurStructure:cp,isRefreshCurStructure:up,freshContent:Uo,routeToChildPath:pp,payloadTypes:dp,pageMapState:Xa,itemExtendData:Fa}=p.storeToRefs(Pt),fn=Kt.useMenuState(p.pinia),{activeTopMenuPath:fp,activeMenuPath:Lt,platform:of,activeAsideMenu:hp,buttonTriggerType:vp}=p.storeToRefs(fn),kn=da.useUnit(p.pinia),{selectTitle:Wo}=p.storeToRefs(kn),gp=ze.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(gp),Ho=Kt.useAuthorityState(p.pinia),Ya=e.ref(!0),va=e.ref(0),Ja=e.ref([]),ga=e.computed(async()=>{var i,s;const a=(i=Lt.value)!=null&&i.startsWith("/")?(s=Lt.value)==null?void 0:s.substring(1):Lt.value;return(a==null?void 0:a.includes(ro.value))||await _p(a)}),mp=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(Lt.value!=="/平台管理/菜单管理")},yp=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},bp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Wo.value.length===1)bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value),kn.setSelectIndex(""),kn.setSelectMenu(""),kn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),l,!1,[],await ga.value);let c=-1;(i=Wo.value)==null||i.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&s.push(d)}),kn.setSelectTitle(s),l!==""?kn.setSelectMenu(a==null?void 0:a.key):(kn.setSelectIndex(""),kn.setSelectMenu(""))}bt.value=Aa(bt.value),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value)},po=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const v=await x(d);if(((c=v==null?void 0:v.data)==null?void 0:c.code)===200)return v.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},qo=async(a,i,s,l)=>{var c,d,x,v,h,D,E,_,O,H,V;try{const ke=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:k}})),W=(v=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:v.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),P=JSON.parse(p.cloneDeep(JSON.stringify(a))),X=(h=P==null?void 0:P.results)==null?void 0:h.map(k=>k.id);let y;s?y=(_=(E=(D=Xa.value)==null?void 0:D[Lt.value])==null?void 0:E.filter(k=>{var A,T,se;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((se=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:se.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):y=(V=(H=(O=Xa.value)==null?void 0:O[Lt.value])==null?void 0:H.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:V.map(k=>k==null?void 0:k.id);const L=y==null?void 0:y.filter(k=>!(X!=null&&X.includes(k))&&typeof k=="number");(ke==null?void 0:ke.length)>0&&await p.batchAddInsofDataApi({dataList:ke}),(W==null?void 0:W.length)>0&&await p.batchUpdateInsofDataApi({dataList:W}),(L==null?void 0:L.length)>0&&await p.batchDeleteInsofDataApi({ids:L})}catch(ke){throw new Error(ke)}},kp=async a=>{var D,E,_,O,H,V,ke,W,P,X;fn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(sp.value)));if(!cp.value)return fn.setCacheStructures({key:vp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(y=>y.id),l=s.filter(y=>{var L;return!((L=Ko.value)!=null&&L.includes(y))}),c=(D=Ko.value)==null?void 0:D.filter(y=>!s.includes(y)),d=[...l,...c].filter(y=>typeof y!==null&&typeof y<"u"),x=i==null?void 0:i.filter(y=>!y.id),v=i==null?void 0:i.filter(y=>y.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(po(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(po(x,"create",a)),v&&(v==null?void 0:v.length)>0&&h.push(po(v,"update",a)),aa.value&&((E=aa.value)!=null&&E.isDelete&&((O=(_=aa.value)==null?void 0:_.results)==null?void 0:O.length)>0&&((V=(H=aa.value)==null?void 0:H.results)!=null&&V.every(y=>typeof y=="number"))?await p.batchDeleteInsofDataApi({ids:(ke=aa.value)==null?void 0:ke.results}):(console.log("itemGridData.value",aa.value),h.push(await qo(aa.value,"gridLayout")))),Fa.value)for(const y in Fa.value)h.push(await qo((W=Fa.value)==null?void 0:W[y],"extend",{target:y,compId:(X=(P=Fa.value)==null?void 0:P[y])==null?void 0:X.compId},y));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(y=>{p.ElMessage.success(y)}),fn.setContentLoading(!1)},Qa=a=>ma(a),bt=e.ref([]),xp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Vl=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),wp=async a=>{var l,c,d,x,v,h;let i=p.cloneDeep(Lt).value;i=i+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(v=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:v.map(_=>_==null?void 0:_.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},Go=async a=>{var i,s;try{let l=p.cloneDeep(Lt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var v;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((v=Object.values(x==null?void 0:x.singleContent))==null?void 0:v[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var v;return((v=x==null?void 0:x.data)==null?void 0:v.code)===200}))){const x=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),v=await p.batchDeleteInsofDataApi({ids:x});((s=v==null?void 0:v.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await wp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},Dp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Lt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Ol=e.ref(0),Za=e.ref(null),eo=async(a,i="data",s)=>{var l,c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Go(a):await ze.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id,a),await ra.setLogRecordAsync({type:"删除",data:a},Lt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(se=>typeof(se==null?void 0:se.id)=="string")){const se=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Oe=>({content:a==null?void 0:a.content,singleContent:Oe,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Go(se)}else{const se=(v=a==null?void 0:a.selectItems)==null?void 0:v.map(Oe=>Oe==null?void 0:Oe.id);await p.batchDeleteInsofDataApi({ids:se}),await ra.setLogRecordAsync({type:"删除",data:se},Lt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let se={};for(let at in a==null?void 0:a.singleContent)at!=="id"&&at!=="index"&&(se[at]=a==null?void 0:a.singleContent[at]);const Oe=await ze.addTableContents(i,Lt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a,{param:s});Za.value={resId:Oe,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Pt.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let se=[],Oe=[],at=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Be=s==null?void 0:s.url,Fe="",he="";if(at!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((O=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:O.id)!="string"){const B=await p.getInsofDataApi({id:at});Fe=((W=(ke=(V=(H=B==null?void 0:B.data)==null?void 0:H.result)==null?void 0:V[0])==null?void 0:ke.key)==null?void 0:W.tableId)??"",he=((L=(y=(X=(P=B==null?void 0:B.data)==null?void 0:P.result)==null?void 0:X[0])==null?void 0:y.key)==null?void 0:L.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(B=>{let te={};for(let ne in B)ne!=="id"&&ne!=="index"&&(te[ne]=B[ne]);typeof(B==null?void 0:B.id)=="number"?se.push({id:B==null?void 0:B.id,value:{tableData:te}}):Oe.push({key:{type:i,pageKey:Be||he||Lt.value,tableId:Fe||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Oe==null?void 0:Oe.length)>0&&await p.batchAddInsofDataApi({dataList:Oe}),(se==null?void 0:se.length)>0&&await p.batchUpdateInsofDataApi({dataList:se})}else{let se={},Oe=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let at in a==null?void 0:a.singleContent)at!=="id"&&at!=="index"&&(se[at]=a==null?void 0:a.singleContent[at]);await ze.fixTableContents(i,Lt.value,a==null?void 0:a.index,Oe,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a)}Pt.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await Dp(a==null?void 0:a.value);Pt.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(se=>se==null?void 0:se.isMainKey)||(bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value)),bt.value=Aa(bt.value),Do.value&&(a==null?void 0:a.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},Cp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await Cp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await ze.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(v=>v.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(fn.setActiveMenuPath(null),fn.setActiveMenuPath(i))},no=a=>{bt.value=Aa(a),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value)},Ep=async a=>{var i;await e.nextTick(),(i=hp.value)!=null&&i.isRouter?Ho.setRouterPageStructure(a):Ho.setRouterPageStructure([])},_p=async a=>{var d,x,v,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-2>O&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-1>O&&(s=s===""?s+_:s+"/"+_)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(v=l==null?void 0:l.data)==null?void 0:v.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},Sp=e.ref(),Fn=e.ref(null),Tp=a=>{var D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(he=>{var B;return((B=he==null?void 0:he.key)==null?void 0:B.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Sp.value=i;const s=(O=(_=i==null?void 0:i.find(he=>{var B,te,ne;return(ne=(te=(B=he==null?void 0:he.value)==null?void 0:B.tableData)==null?void 0:te.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:_.value)==null?void 0:O.tableData;if(!s)return Fn.value=null;const l=(ke=(V=(H=i==null?void 0:i.find(he=>{var B,te,ne;return(ne=(te=(B=he==null?void 0:he.value)==null?void 0:B.tableData)==null?void 0:te.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:H.key)==null?void 0:V.relatedInfo)==null?void 0:ke.compId,c=(W=bt.value)==null?void 0:W.find(he=>(he==null?void 0:he.id)===l);if(!c)return Fn.value=null;const d=(X=s==null?void 0:s.任务关键词)==null?void 0:X[((P=s==null?void 0:s.任务关键词)==null?void 0:P.length)-1],x=(k=(L=(y=c==null?void 0:c.compData)==null?void 0:y.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:L.contents)==null?void 0:k.findIndex(he=>(he==null?void 0:he.prop)===d),v=(Oe=(se=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:T.contents)==null?void 0:se.find(he=>he==null?void 0:he.isMainKey))==null?void 0:Oe.prop,h=(Fe=(Be=(at=c==null?void 0:c.compData)==null?void 0:at.find(he=>(he==null?void 0:he.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:Fe[x];Fn.value={prop:d,value:h,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:v},console.log("getPageExtendData:",s,i)},Ip=()=>{var a,i;console.log("倒计时结束时"),Kt.ElMessageBox.alert(`超时未提交,【${(i=(a=Lt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ml=()=>{var a,i,s,l;try{if(fp.value!=="报告中心"||!((a=Lt.value)!=null&&a.includes(ro.value)))return;const c=(i=bt.value)==null?void 0:i.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,v=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));v!=null&&v.value&&(v==null?void 0:v.value)!==(d==null?void 0:d.value)&&Pt.setLockingPage(Lt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},wo=e.ref([]),Bp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Lt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Lt.value,up.value],async a=>{var d,x,v,h,D,E,_,O,H,V,ke,W,P;if(!Lt.value)return;Pt.setLockingPage(""),bt.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,Ya.value=!1,Ua.value=!0;const s=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(v=a==null?void 0:a[0])==null?void 0:v.substring(1):a==null?void 0:a[0];let l=new WeakMap;if((D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:dp.value})).data.result)==null?void 0:h.filter(X=>{var y,L;return((y=X==null?void 0:X.key)==null?void 0:y.pageKey)!=="menu"&&((L=X==null?void 0:X.key)==null?void 0:L.pageKey)!=="secret"}))==null||D.forEach(X=>{l[X.key.pageKey]?l[X.key.pageKey]=[...l[X.key.pageKey],X]:l[X.key.pageKey]=[X]}),Ja.value=l,s){fn.setContentLoading(!0),sessionStorage.setItem("pageKey",Lt.value),bt.value=await ze.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value,l);let X="";if(!bt.value){let y=(_=(E=s==null?void 0:s.split("/"))==null?void 0:E.filter((L,k)=>{var A;return k!==((A=s==null?void 0:s.split("/"))==null?void 0:A.length)-1}))==null?void 0:_.join("/");bt.value=await ze.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value,l),X=(H=s==null?void 0:s.split("/"))==null?void 0:H[((O=s==null?void 0:s.split("/"))==null?void 0:O.length)-1]}await ra.setLogRecordAsync({type:"查询",data:bt.value},Lt.value),bt.value=Ec(bt.value),X!==""&&(bt.value=(V=bt.value)==null?void 0:V.map(y=>{var L;return y!=null&&y.isShow&&(y.compData=(L=y==null?void 0:y.compData)==null?void 0:L.map(k=>{var A,T,se,Oe,at;if((k==null?void 0:k.key)==="tableContents"){let Be=[],Fe="";Fe=(Oe=(se=(T=(A=y==null?void 0:y.compData)==null?void 0:A.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:T.contents)==null?void 0:se[0])==null?void 0:Oe.prop,Be=(at=k.contents)==null?void 0:at.filter(he=>(he==null?void 0:he[Fe])===X||(he==null?void 0:he[1])===X),k.contents=Be}return k})),y})),bt.value=Aa(bt.value),await Ep(bt.value),Ml(),Tp(s),wo.value=(ke=bt.value)==null?void 0:ke.map(y=>({label:y==null?void 0:y.name,value:y==null?void 0:y.id})),Pt.setExtraContents([]),kn.setSelectTitle([]),kn.setSelectIndex(""),kn.setSelectMenu(""),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value),Pt.setCurStructureCompIds((W=bt.value)==null?void 0:W.map(y=>y==null?void 0:y.id)),Pt.setRefreshCurStructure(!1),kn.setSelectTitle((P=Lt.value)==null?void 0:P.split("/").map(y=>({value:y.trim()}))),fn.setChildMenu(""),fn.setContentLoading(!1),Pt.setTableLoading(!1),Ua.value=!1}else bt.value=[],Ua.value=!1;e.nextTick(()=>{va.value=va.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Uo.value,async()=>{if(Uo.value){let a=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value);bt.value=Aa(a),Pt.setFreshContent(!1),Ml()}},{deep:!0});const Ap=async()=>{var c,d,x,v,h,D,E,_;fn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=La.value)==null?void 0:c.account)||((d=La.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=La.value)==null?void 0:x.account)||((v=La.value)==null?void 0:v.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(O=>O==null?void 0:O.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(O=>O==null?void 0:O.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(O=>O!==null&&O))&&(await p.batchDeleteInsofDataApi({ids:s}),await ra.setLogRecordAsync({type:"删除",data:s},Lt.value)),fn.setActiveMenuPath(pp.value),bt.value=null,Pt.setRouteToChildPath(""),fn.setChildMenu("")},Np=a=>new RegExp("button","i").test(a),Vp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),zl=a=>{if(Vp(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&fn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Rl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Op=a=>{Ol.value=a},fa=e.reactive({index:0,comp:null}),Mp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:zp(i,s)}))}),Ll=(a,i)=>{var h,D,E,_,O;const s=i?a:a-2,l=(h=bt.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=d===-1?0:d,v=(O=(_=l==null?void 0:l.compData)==null?void 0:_.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:O.contents;return{valid:v==null?void 0:v.every(H=>H==null?void 0:H[x+1]),length:(v==null?void 0:v.length)||0}},zp=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Ll(i,!0);fa.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Fl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=bt.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:v}=Ll(i);v?(fa.index=i,fa.comp=(d=bt.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else fa.index=i,fa.comp=(x=bt.value)==null?void 0:x[a]},Do=e.computed(()=>{var a,i;return(i=(a=Vl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Do.value,a=>{a&&Fl(0)},{immediate:!0});const Rp={class:"layout"},Lp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:O}=_;return O==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:O}=_;return O==="children"});return D==null?void 0:D.contents}),v=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const O=[];if(D=D.map(H=>{const V=H.span;return V?(H.span=Number(V),_=_+H.span):O.push(H),H}),_<24){const H=Math.floor((24-_)/E);O.forEach(V=>{V.span=H})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var H;const _=e.resolveComponent("el-col"),O=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Rp,[e.createVNode(O,{style:e.normalizeStyle({height:(H=d.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(V,ke)=>(e.openBlock(),e.createBlock(_,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var W;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(va),compName:V.name,index:(V==null?void 0:V.id)??ke,height:(W=d.value)==null?void 0:W.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Fp=Ft._export_sfc(Lp,[["__scopeId","data-v-ab9a36ed"]]),Pp={class:"layout-operate"},$p={class:"layout-module"},jp={class:"collapse-title-item"},Kp={class:"collapse-title"},Up={class:"icon-content"},Wp=["onClick"],Hp={class:"comp-child"},qp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{ke()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),v=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",L(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],O=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),H=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(T=>{const{key:se}=T;return se==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(T=>{const{key:se}=T;return se==="children"});return A==null?void 0:A.contents}),ke=()=>{var k;c.value=O.value||{},D.value=(V==null?void 0:V.value)||[],x.value=v(),x.value=(k=x.value)==null?void 0:k.map(A=>{var se;const{prop:T}=A;return A.value=(se=H.value)==null?void 0:se[T],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const W=(k,A)=>{const T=p.cloneDeep(V==null?void 0:V.value);T[A].span=k.span,D.value=T,l("change",L(),!0)},P=k=>ma(k),X=(k,A,T)=>{if(!k)return;const se=p.cloneDeep(V==null?void 0:V.value);se[T]&&(se[T].compData=k,D.value=se,l("change",L(),!0))},y=k=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((T,se)=>k!==se),D.value=A,l("change",L(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const T=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Pp,[e.createElementVNode("div",$p,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Vt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=se=>h(se))},null,8,["rowContents"])])]),e.createVNode(xl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:se,index:Oe})=>[e.createElementVNode("div",jp,[e.createElementVNode("div",Kp,e.toDisplayString(se.name),1),e.createElementVNode("div",Up,[e.createElementVNode("div",{onClick:e.withModifiers(at=>y(Oe),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Wp)])])]),content:e.withCtx(({item:se,index:Oe})=>[e.createElementVNode("div",Hp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:E.value[Oe],key:Oe,isEnableWrap:!0,onChange:at=>W(at,Oe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(se.comp+"Operate")),{itemContents:se==null?void 0:se.compData,originalItemContents:se.compData,onChange:at=>X(at,se,Oe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Gp=Ft._export_sfc(qp,[["__scopeId","data-v-ba05456e"]]),Xp=typeof window<"u";var Xo;Xp&&((Xo=window==null?void 0:window.navigator)!=null&&Xo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dn(a){return a==null}function Pl(){}const Yp=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(Yp)));function Jp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function Yo(a,i=16){if(typeof a!="function")return Pl;const s=(...d)=>{a(...d)};if(i<=0)return $l(s);let l=0,c;return function(...d){const x=Date.now(),v=x-l;clearTimeout(c),v>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-v))}}function Qp(a,i=100){if(typeof a!="function")return Pl;const s=(...c)=>{a(...c)};if(i<=0)return $l(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function $l(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const Sa=new Set,jl=new WeakMap;function Zp(){Sa.forEach(a=>{a(...jl.get(a))}),Sa.clear()}function nn(a,...i){if(typeof a!="function")return a;jl.set(a,i),!Sa.has(a)&&(Sa.add(a),Sa.size===1&&Promise.resolve().then(Zp))}const Kl=Symbol("LAYOUT_KEY"),Ul=Symbol("EMITTER_KEY");function ed(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function mo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=td(a[s]);return i}function td(a){return{...a}}function Wl(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function pa(a,i,s){const l=ql(a),c=Gl(a),d=Array(a.length);for(let x=0,v=c.length;x<v;x++){let h=c[x];h.static||(h=nd(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function nd(a,i,s,l){if(s)for(;i.y>0&&!Ta(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Ta(a,i);)i.y--}let c;for(;c=Ta(a,i);)i.y=c.y+c.h;return i}function ad(a,i){const s=ql(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Ta(s,d);)d.y++}return a}function Jo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Ta(a,i){for(let s=0,l=a.length;s<l;s++)if(Wl(a[s],i))return a[s]}function Hl(a,i){return a.filter(s=>Wl(s,i))}function ql(a){return a.filter(i=>i.static)}function yo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,v=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=Gl(a);h&&(D=D.reverse());const E=Hl(D,i);if(d&&E.length)return i.x=x,i.y=v,i.moved=!1,a;for(let _=0,O=E.length;_<O;_++){const H=E[_];H.moved||i.y>H.y&&i.y-H.y>H.h/4||(H.static?a=Qo(a,H,i,c):a=Qo(a,i,H,c))}return a}function Qo(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Ta(a,c))return yo(a,s,void 0,c.y,!1)}return yo(a,s,void 0,s.y+1,!1)}function od(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function rd(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function id(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function Gl(a){return Array.from(a).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 sd(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let v=0;v<s.length;v++)if(typeof x[s[v]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[v]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function cd(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function Zo(a){return ud(a)}function ud(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function el(a,i,s,l){return pd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function pd(a){return typeof a=="number"&&!Number.isNaN(a)}function dd(a,i){const s=Yl(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const x=s[c];i>a[x]&&(l=x)}return l}function Xl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function fd(a,i,s,l,c,d,x){if(i[l])return mo(i[l]);let v=a;const h=Yl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const O=D[E];if(i[O]){v=i[O];break}}return v=mo(v||[]),pa(ad(v,{cols:d}),x)}function Yl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let hd="auto";function vd(){return typeof document<"u"}function tl(){return vd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):hd}var Ea={exports:{}},gd=Ea.exports,nl;function md(){return nl||(nl=1,function(a,i){(function(s,l){a.exports=l()})(gd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=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},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ke(r.key),r)}}function v(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ke(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&_(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function _(n,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},_(n,t)}function O(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function H(n){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,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,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 O(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,m){for(;!Object.prototype.hasOwnProperty.call(f,m)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ke(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var W=function(n){return!(!n||!n.Window)&&n instanceof n.Window},P=void 0,X=void 0;function y(n){P=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),X=n}function L(n){return W(n)?n:(n.ownerDocument||n).defaultView||X.window}typeof window<"u"&&window&&y(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===X||W(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=L(n)||X;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function se(n){var t=n.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 Oe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var at={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=at.draggable,t.map.drag=at,t.methodDict.drag="draggable",r.actions.drag=at.defaults},listeners:{"interactions:before-action-move":se,"interactions:action-resume":se,"interactions:action-move":Oe,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return T.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):T.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:se,move:Oe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Be=at,Fe={init:function(n){var t=n;Fe.document=t.document,Fe.DocumentFragment=t.DocumentFragment||he,Fe.SVGElement=t.SVGElement||he,Fe.SVGSVGElement=t.SVGSVGElement||he,Fe.SVGElementInstance=t.SVGElementInstance||he,Fe.Element=t.Element||he,Fe.HTMLElement=t.HTMLElement||Fe.Element,Fe.Event=t.Event,Fe.Touch=t.Touch||he,Fe.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 he(){}var B=Fe,te={init:function(n){var t=B.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&B.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!B.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?B.PointerEvent===n.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,te.wheelEvent=B.document&&"onmousewheel"in B.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=te;function de(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Xe(n,t){for(;T.element(n);){if(G(n,t))return n;n=ot(n)}return null}function ot(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function G(n,t){return X!==P&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var R=function(n){return n.parentNode||n.host};function ve(n,t){for(var o,r=[],u=n;(o=R(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function xe(n,t,o){for(;T.element(n);){if(G(n,t))return!0;if((n=ot(n))===o)return G(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Ve(n){var t=n instanceof B.SVGElement?n.getBoundingClientRect():n.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 Je(n){var t,o=Ve(n);if(!ne.isIOS7&&o){var r={x:(t=(t=L(n))||X).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function He(n){for(var t=[];n;)t.push(n),n=ot(n);return t}function it(n){return!!T.string(n)&&(B.document.querySelector(n),!0)}function ee(n,t){for(var o in t)n[o]=t[o];return n}function st(n,t,o){return n==="parent"?ot(o):n==="self"?t.getRect(o):Xe(o,n)}function tt(n,t,o,r){var u=n;return T.string(u)?u=st(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Je(u)),u}function Re(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function pe(n){return!n||"x"in n&&"y"in n||((n=ee({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function ie(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ue(n,t,o){var r=o&&n.options[o];return Re(tt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},T.string(n)&&n.search(" ")!==-1&&(n=Ge(n)),T.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(T.object(n)&&(t=n,n=""),T.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(T.array(t))for(var u=0,f=t;u<f.length;u++){var m=f[u];Te(n,m,o,r)}else if(T.object(t))for(var b in t)Te(Ge(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Ge(n){return n.trim().split(/ +/)}var ft=function(n,t){return Math.sqrt(n*n+t*t)},g=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(g.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function K(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function Y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function w(n){return n instanceof B.Event||n instanceof B.Touch}function I(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function J(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&w(n)?(I("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):I("page",n,t),t}function z(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function le(n,t,o){var r=t.length>1?U(t):t[0];J(r,n.page),function(u,f){f=f||{},ne.isOperaMobile&&w(u)?I("screen",u,f):I("client",u,f)}(r,n.client),n.timeStamp=o}function F(n){var t=[];return T.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function U(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function be(n){if(!n.length)return null;var t=F(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function oe(n,t){var o=t+"X",r=t+"Y",u=F(n),f=u[0][o]-u[1][o],m=u[0][r]-u[1][r];return ft(f,m)}function q(n,t){var o=t+"X",r=t+"Y",u=F(n),f=u[1][o]-u[0][o],m=u[1][r]-u[0][r];return 180*Math.atan2(m,f)/Math.PI}function Q(n){return T.string(n.pointerType)?n.pointerType:T.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof B.Touch?"touch":"mouse"}function ae(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var ge=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(ge.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var fe=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},ye=function(n){return fe([],n)},$=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},re=function(n,t){return n[$(n,t)]},ce=function(n){D(o,n);var t=H(o);function o(r,u,f){var m;d(this,o),(m=t.call(this,u._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return m.type=f,m.target=S,m.currentTarget=S,m.dropzone=j,m.dragEvent=u,m.relatedTarget=u.target,m.draggable=u.interactable,m.timeStamp=u.timeStamp,m}return v(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,m=$(f,function(S){var j=S.dropzone,N=S.element;return j===r.dropzone&&N===r.target});u.activeDrops.splice(m,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ge);function Ee(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,m=u.element;t.dropzone=f,t.target=m,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Ze(n,t){for(var o=function(f,m){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var N=j[S];if(N.options.drop.enabled){var Z=N.options.drop.accept;if(!(T.element(Z)&&Z!==m||T.string(Z)&&!G(m,Z)||T.func(Z)&&!Z({dropzone:N,draggableElement:m})))for(var we=0,Pe=N.getAllElements();we<Pe.length;we++){var Le=Pe[we];Le!==m&&b.push({dropzone:N,element:Le,rect:N.getRect(Le)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Ne(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,m=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],N=j.dropzone,Z=j.element,we=j.rect,Pe=N.dropCheck(t,o,u,f,Z,we);m.push(Pe?Z:null)}var Le=function(qe){for(var pt,lt,vt,xt=[],At=0;At<qe.length;At++){var yt=qe[At],wt=qe[pt];if(yt&&At!==pt)if(wt){var tn=R(yt),Ut=R(wt);if(tn!==yt.ownerDocument)if(Ut!==yt.ownerDocument)if(tn!==Ut){xt=xt.length?xt:ve(wt);var pn=void 0;if(wt instanceof B.HTMLElement&&yt instanceof B.SVGElement&&!(yt instanceof B.SVGSVGElement)){if(yt===Ut)continue;pn=yt.ownerSVGElement}else pn=yt;for(var En=ve(pn,wt.ownerDocument),zn=0;En[zn]&&En[zn]===xt[zn];)zn++;var Ra=[En[zn-1],En[zn],xt[zn]];if(Ra[0])for(var wa=Ra[0].lastChild;wa;){if(wa===Ra[1]){pt=At,xt=En;break}if(wa===Ra[2])break;wa=wa.previousSibling}}else vt=wt,(parseInt(L(lt=yt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(L(vt).getComputedStyle(vt).zIndex,10)||0)&&(pt=At);else pt=At}else pt=At}return pt}(m);return r.activeDrops[Le]||null}function Ae(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ce(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ce(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ce(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ce(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ce(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ce(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function me(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Ee(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function rt(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Ze(t,o.element));var m=r,b=Ne(o,m,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ae(o,0,m)}}var Ue={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Be),r.prototype.dropzone=function(f){return function(m,b){if(T.object(b)){if(m.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),j=Object.keys(S).reduce(function(Z,we){return Z[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=S[we],Z},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(j),m.options.drop.listeners=j}return T.func(b.ondrop)&&m.on("drop",b.ondrop),T.func(b.ondropactivate)&&m.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&m.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&m.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&m.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&m.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?m.options.drop.overlap=b.overlap:T.number(b.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(m.options.drop.accept=b.accept),"checker"in b&&(m.options.drop.checker=b.checker),m}return T.bool(b)?(m.options.drop.enabled=b,m):m.options.drop}(this,f)},r.prototype.dropCheck=function(f,m,b,S,j,N){return function(Z,we,Pe,Le,qe,pt,lt){var vt=!1;if(!(lt=lt||Z.getRect(pt)))return!!Z.options.drop.checker&&Z.options.drop.checker(we,Pe,vt,Z,pt,Le,qe);var xt=Z.options.drop.overlap;if(xt==="pointer"){var At=ue(Le,qe,"drag"),yt=J(we);yt.x+=At.x,yt.y+=At.y;var wt=yt.x>lt.left&&yt.x<lt.right,tn=yt.y>lt.top&&yt.y<lt.bottom;vt=wt&&tn}var Ut=Le.getRect(qe);if(Ut&&xt==="center"){var pn=Ut.left+Ut.width/2,En=Ut.top+Ut.height/2;vt=pn>=lt.left&&pn<=lt.right&&En>=lt.top&&En<=lt.bottom}return Ut&&T.number(xt)&&(vt=Math.max(0,Math.min(lt.right,Ut.right)-Math.max(lt.left,Ut.left))*Math.max(0,Math.min(lt.bottom,Ut.bottom)-Math.max(lt.top,Ut.top))/(Ut.width*Ut.height)>=xt),Z.options.drop.checker&&(vt=Z.options.drop.checker(we,Pe,vt,Z,pt,Le,qe)),vt}(this,f,m,b,S,j,N)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},ee(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ue.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.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(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Ze(t,o.element),u.events=Ae(o,0,r),u.events.activate&&(Ee(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":rt,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;me(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;rt(n,t),me(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.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:Ze,getDrop:Ne,getDropEvents:Ae,fireDropEvents:me,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ke=Ue;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(j){return j.pointer}),f=r==="start",m=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=oe(u,b),o.box=be(u),o.scale=1,o.ds=0,o.angle=q(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=oe(u,b),o.box=be(u),o.scale=o.distance/t.gesture.startDistance,o.angle=q(u,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,T.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var _e={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return T.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):T.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=_e,t.methodDict.gesture="gesturable",r.actions.gesture=_e.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},Ye=_e;function Ce(n,t,o,r,u,f,m){if(!t)return!1;if(t===!0){var b=T.number(f.width)?f.width:f.right-f.left,S=T.number(f.height)?f.height:f.bottom-f.top;if(m=Math.min(m,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=b>=0?f.left:f.right;return o.x<j+m}if(n==="top"){var N=S>=0?f.top:f.bottom;return o.y<N+m}if(n==="right")return o.x>(b>=0?f.right:f.left)-m;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-m}return!!T.element(r)&&(T.element(t)?t===r:xe(r,t,u))}function $e(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var je,Qe,M={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;M.cursors=function(f){return f.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),M.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(m,b,S){return T.object(b)?(m.options.resize.enabled=b.enabled!==!1,m.setPerAction("resize",b),m.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?m.options.resize.axis=b.axis:b.axis===null&&(m.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?m.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(m.options.resize.square=b.square),m):T.bool(b)?(m.options.resize.enabled=b,m):m.options.resize}(this,f,n)},t.map.resize=M,t.methodDict.resize="resizable",u.actions.resize=M.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:ee({},f),corrected:ee({},f),previous:ee({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),$e(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,m=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,N=S.corrected,Z=S.delta,we=S.previous;if(ee(we,N),m){if(ee(N,b),f==="reposition"){if(N.top>N.bottom){var Pe=N.top;N.top=N.bottom,N.bottom=Pe}if(N.left>N.right){var Le=N.left;N.left=N.right,N.right=Le}}}else N.top=Math.min(b.top,j.bottom),N.bottom=Math.max(b.bottom,j.top),N.left=Math.min(b.left,j.right),N.right=Math.max(b.right,j.left);for(var qe in N.width=N.right-N.left,N.height=N.bottom-N.top,N)Z[qe]=N[qe]-we[qe];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=Z}})(n),$e(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var m=ee({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(T.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var j in S)S[j]=Ce(j,b.edges[j],m,t._latestPointer.eventTarget,r,u,b.margin||M.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var N=b.axis!=="y"&&m.x>u.right-M.defaultMargin,Z=b.axis!=="x"&&m.y>u.bottom-M.defaultMargin;(N||Z)&&(n.action={name:"resize",axes:(N?"x":"")+(Z?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=M.cursors,f=null;if(o)f=u[r+o];else if(t){for(var m="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(m+=j)}f=u[m]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Se=M,ct={id:"actions",install:function(n){n.usePlugin(Ye),n.usePlugin(Se),n.usePlugin(Be),n.usePlugin(Ke)}},nt=0,et={request:function(n){return je(n)},cancel:function(n){return Qe(n)},init:function(n){if(je=n.requestAnimationFrame,Qe=n.cancelAnimationFrame,!je)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];je=n["".concat(r,"RequestAnimationFrame")],Qe=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}je=je&&je.bind(n),Qe=Qe&&Qe.bind(n),je||(je=function(u){var f=Date.now(),m=Math.max(0,16-(f-nt)),b=n.setTimeout(function(){u(f+m)},m);return nt=f+m,b},Qe=function(u){return clearTimeout(u)})}},Ie={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(n){Ie.isScrolling=!0,et.cancel(Ie.i),n.autoScroll=Ie,Ie.interaction=n,Ie.prevTime=Ie.now(),Ie.i=et.request(Ie.scroll)},stop:function(){Ie.isScrolling=!1,Ie.interaction&&(Ie.interaction.autoScroll=null),et.cancel(Ie.i)},scroll:function(){var n=Ie.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=ut(u.container,t,o),m=Ie.now(),b=(m-Ie.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Ie.x*S,y:Ie.y*S};if(j.x||j.y){var N=We(f);T.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Z=We(f),we={x:Z.x-N.x,y:Z.y-N.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:n,container:f})}Ie.prevTime=m}Ie.isScrolling&&(et.cancel(Ie.i),Ie.i=et.request(Ie.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Ie.check(t.interactable,t.prepared.name))if(t.simulation)Ie.x=Ie.y=0;else{var r,u,f,m,b=t.interactable,S=t.element,j=t.prepared.name,N=b.options[j].autoScroll,Z=ut(N.container,b,S);if(T.window(Z))m=o.clientX<Ie.margin,r=o.clientY<Ie.margin,u=o.clientX>Z.innerWidth-Ie.margin,f=o.clientY>Z.innerHeight-Ie.margin;else{var we=Ve(Z);m=o.clientX<we.left+Ie.margin,r=o.clientY<we.top+Ie.margin,u=o.clientX>we.right-Ie.margin,f=o.clientY>we.bottom-Ie.margin}Ie.x=u?1:m?-1:0,Ie.y=f?1:r?-1:0,Ie.isScrolling||(Ie.margin=N.margin,Ie.speed=N.speed,Ie.start(t))}}};function ut(n,t,o){return(T.string(n)?st(n,t,o):n)||L(o)}function We(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var dt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Ie,Ie.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ie.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Ie.stop(),Ie.interaction&&(Ie.interaction=null)},"interactions:stop":Ie.stop,"interactions:action-move":function(n){return Ie.onInteractionMove(n)}}},ht=dt;function mt(n,t){var o=!1;return function(){return o||(X.console.warn(t),o=!0),n.apply(this,arguments)}}function Dt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function Mt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Et(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var It={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var m=function(b,S,j,N,Z){var we=b.getRect(N),Pe=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Le={action:null,interactable:b,interaction:j,element:N,rect:we,buttons:Pe};return Z.fire("auto-start:check",Le),Le.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,m,this,f,u):m},t.prototype.ignoreFrom=mt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=mt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Et,t.prototype.styleCursor=Mt}};function Tt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Ct(t,o,n,u)?n:null}function jt(n,t,o,r,u,f,m){for(var b=0,S=r.length;b<S;b++){var j=r[b],N=u[b],Z=j.getAction(t,o,n,N);if(Z){var we=Tt(Z,j,N,f,m);if(we)return{action:we,interactable:j,element:N}}}return{action:null,interactable:null,element:null}}function Rt(n,t,o,r,u){var f=[],m=[],b=r;function S(N){f.push(N),m.push(b)}for(;T.element(b);){f=[],m=[],u.interactables.forEachMatch(b,S);var j=jt(n,t,o,f,m,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=ot(b)}return{action:null,interactable:null,element:null}}function qt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Dt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,wn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ct(n,t,o,r){var u=n.options,f=u[o.name].max,m=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,N=0;if(!(f&&m&&b))return!1;for(var Z=0,we=r.interactions.list;Z<we.length;Z++){var Pe=we[Z],Le=Pe.prepared.name;if(Pe.interacting()&&(++S>=b||Pe.interactable===n&&((j+=Le===o.name?1:0)>=f||Pe.element===t&&(N++,Le===o.name&&N>=m))))return!1}return b>0}function xn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function hn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function wn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var m=o.options[u.name].cursorChecker;f=T.func(m)?m(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}hn(n.element,f||"",t)}else t.autoStart.cursorElement&&hn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(It),o.base.actionChecker=null,o.base.styleCursor=!0,ee(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return xn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Ct,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||qt(o,Rt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||qt(u,Rt(u,f,m,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,m=u.prepared.name;m&&f&&(f.options[m].manualStart||!Ct(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),wn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&hn(o.element,"",t)}},maxInteractions:xn,withinInteractionLimit:Ct,validateAction:Tt},vn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var m=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,N=m>b?"x":m<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?N[0]:S.lockAxis,N!=="xy"&&j!=="xy"&&j!==N){o.prepared.name=null;for(var Z=r,we=function(Le){if(Le!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&Le.testIgnoreAllow(qe,Z,r)){var pt=Le.getAction(o.downPointer,o.downEvent,o,Z);if(pt&&pt.name==="drag"&&function(lt,vt){if(!vt)return!1;var xt=vt.options.drag.startAxis;return lt==="xy"||xt==="xy"||xt===lt}(N,Le)&&vn.validateAction(pt,Le,Z,r,t))return Le}}};T.element(Z);){var Pe=t.interactables.forEachMatch(Z,we);if(Pe){o.prepared.name="drag",o.interactable=Pe,o.element=Z;break}Z=ot(Z)}}}}}};function gn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(vn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=gn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;gn(t)>0&&(t.prepared.name=null)}},getHoldDuration:gn},mn=In,Gn={id:"auto-start",install:function(n){n.usePlugin(vn),n.usePlugin(mn),n.usePlugin(Tn)}},Xn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):T.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Yn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var $n={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Xn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var m=r.options.preventDefault;if(m!=="never")if(m!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=L(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||T.element(f.target)&&G(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||de(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Yn,n},{})};function Bn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function yn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=yn(r):T.array(r)?t[o]=ye(r):t[o]=r}return t}var On=function(){function n(t){d(this,n),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=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,m=this.interaction,b=function(j){var N=j.interactable.options[j.prepared.name],Z=N.modifiers;return Z&&Z.length?Z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var Pe=N[we];return Pe&&Pe.enabled&&{options:Pe,methods:Pe._methods}}).filter(function(we){return!!we})}(m);this.prepareStates(b),this.startEdges=ee({},m.edges),this.edges=ee({},this.startEdges),this.startOffset=(r=m.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{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,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,m=t.edges;t.coords=ee({},t.pageCoords),t.rect=ee({},f),t.edges=ee({},m);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),j=0;j<b.length;j++){var N,Z=b[j],we=Z.options,Pe=ee({},t.coords),Le=null;(N=Z.methods)!=null&&N.set&&this.shouldDo(we,r,o)&&(t.state=Z,Le=Z.methods.set(t),ie(t.edges,t.rect,{x:t.coords.x-Pe.x,y:t.coords.y-Pe.y})),S.eventProps.push(Le)}ee(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var qe=this.result.coords,pt=this.result.rect;if(qe&&pt){var lt=S.rect.left!==pt.left||S.rect.right!==pt.right||S.rect.top!==pt.top||S.rect.bottom!==pt.bottom;S.changed=lt||qe.x!==S.coords.x||qe.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,m=this.result,b=this.startDelta,S=m.delta;r==="start"&&ee(this.startDelta,m.delta);for(var j=0,N=[[f,b],[u,S]];j<N.length;j++){var Z=N[j],we=Z[0],Pe=Z[1];we.page.x+=Pe.x,we.page.y+=Pe.y,we.client.x+=Pe.x,we.client.y+=Pe.y}var Le=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=Le.left,qe.right+=Le.right,qe.top+=Le.top,qe.bottom+=Le.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};m.coords.x+=S.x,m.coords.y+=S.y,m.delta.x+=S.x,m.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,m=0;m<u.length;m++){var b=u[m];t.state=b;var S=b.options,j=b.methods,N=j.beforeEnd&&j.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=ee({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var m=f[u];r.state=m,m.methods.stop&&m.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,m=r.name;this.states.push({options:u,methods:f,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var m=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,N=0,Z=[[r.start,m],[r.cur,S]];N<Z.length;N++){var we=Z[N],Pe=we[0],Le=we[1];Pe.page.x-=Le.x,Pe.page.y-=Le.y,Pe.client.x-=Le.x,Pe.client.y-=Le.y}u.left-=j.left,u.right-=j.right,u.top-=j.top,u.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="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 yn(o)}),this.result=An(ee({},t.result.coords),ee({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var m=f||{};for(var b in m.enabled=m.enabled!==!1,o)b in m||(m[b]=o[b]);var S={options:m,methods:r,name:t,enable:function(){return m.enabled=!0,S},disable:function(){return m.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Dn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Jn={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new On(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Dn,"interactions:action-move":Dn,"interactions:action-end":Dn,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},kt=Jn,Jt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},gt=function(n){D(o,n);var t=H(o);function o(r,u,f,m,b,S,j){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,b=b||r.element;var Z=r.interactable,we=(Z&&Z.options||Jt).deltaSource,Pe=ue(Z,b,f),Le=m==="start",qe=m==="end",pt=Le?O(N):r.prevEvent,lt=Le?r.coords.start:qe?{page:pt.page,client:pt.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=ee({},lt.page),N.client=ee({},lt.client),N.rect=ee({},r.rect),N.timeStamp=lt.timeStamp,qe||(N.page.x-=Pe.x,N.page.y-=Pe.y,N.client.x-=Pe.x,N.client.y-=Pe.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=b,N.currentTarget=b,N.preEnd=S,N.type=j||f+(m||""),N.interactable=Z,N.t0=Le?r.pointers[r.pointers.length-1].downTime:pt.t0,N.x0=r.coords.start.page.x-Pe.x,N.y0=r.coords.start.page.y-Pe.y,N.clientX0=r.coords.start.client.x-Pe.x,N.clientY0=r.coords.start.client.y-Pe.y,N.delta=Le||qe?{x:0,y:0}:{x:N[we].x-pt[we].x,y:N[we].y-pt[we].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=ee({},r.coords.velocity[we]),N.speed=ft(N.velocity.x,N.velocity.y),N.swipe=qe||m==="inertiastart"?N.getSwipe():null,N}return v(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,m=202.5<=u&&u<337.5;return{up:m,down:!m&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ge);Object.defineProperties(gt.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var ya=v(function n(t,o,r,u,f){d(this,n),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=r,this.downTime=u,this.downTarget=f}),zt=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),cn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Mn=0,on=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),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=mt(function(N){this.move(N)},"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=Mn++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var b in zt)m(b);var S=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var j in cn)S(j);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Dt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?ee({},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,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,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&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ft(u,f)>this.pointerMoveTolerance);var b,S,j,N=this.getPointerIndex(t),Z={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:m,interaction:this};m||(b=this.coords.velocity,S=this.coords.delta,j=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/j,b.page.y=S.page.y/j,b.client.x=S.client.x/j,b.client.y=S.client.y/j,b.timeStamp=j),this._scopeFire("interactions:move",Z),m||this.simulation||(this.interacting()&&(Z.type=null,this.move(Z)),this.pointerWasMoved&&K(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=ee({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,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:m,curEventTarget:u,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=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,m,b,S=z(t),j=this.getPointerIndex(t),N=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new ya(S,t,o,null,null),j=this.pointers.length,this.pointers.push(N)),le(this.coords.cur,this.pointers.map(function(Z){return Z.pointer}),this._now()),f=this.coords.delta,m=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-m.page.x,f.page.y=b.page.y-m.page.y,f.client.x=b.client.x-m.client.x,f.client.y=b.client.y-m.client.y,f.timeStamp=b.timeStamp-m.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,C(this.downPointer,t),this.interacting()||(K(this.coords.start,this.coords.cur),K(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new gt(this,t,this.prepared.name,o,this.element,r,u)}},{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,r=t.phase,u=t.preEnd,f=t.type,m=this.rect;if(m&&r==="move"&&(ie(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(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Cn(n){Zt(n.interaction)}function Zt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Bt(n.coords.cur,t),Bt(n.coords.delta,t),ie(n.edges,n.rect,t),t.x=0,t.y=0,!0}function jn(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Bt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}cn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=jn},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(Bt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Cn,"interactions:before-action-move":Cn,"interactions:before-action-end":function(n){var t=n.interaction;if(Zt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ln=Gt,_t=function(){function n(t){d(this,n),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 v(n,[{key:"start",value:function(t){var o=this.interaction,r=Ot(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=ft(u.x,u.y),m=this.modification||(this.modification=new On(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,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&&f>r.minSpeed&&f>r.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,r=Ot(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var m=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(b),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=et.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,m,b,S=this,j=this.interaction,N=Ot(j).resistance,Z=(j._now()-this.t0)/1e3;if(Z<this.te){var we,Pe=1-(Math.exp(-N*Z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,m=this.modifiedOffset.y,we={x:Ht(b=Pe,t,r,f),y:Ht(b,o,u,m)}):we={x:this.targetOffset.x*Pe,y:this.targetOffset.y*Pe};var Le={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Le.x,this.currentOffset.y+=Le.y,j.offsetBy(Le),j.move(),this.onNextFrame(function(){return S.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,r=o._now()-this.t0,u=Ot(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},m={x:f.x-this.currentOffset.x,y:f.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,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),K(f.coords.prev,f.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,et.cancel(this.timeout)}}]),n}();function Ot(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(kt),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new _t(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;T.element(u);){if(u===t.element){r.resume(n);break}u=ot(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Dn,"interactions:action-inertiastart":Dn,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var un=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Kn=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},t||{})}return v(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=fe(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,m=r[t];f<m.length;f++){var b=m[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Qn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Un(n){return T.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Zn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:m,remove:b,addDelegate:function(N,Z,we,Pe,Le){var qe=Un(Le);if(!r[we]){r[we]=[];for(var pt=0;pt<u.length;pt++){var lt=u[pt];m(lt,we,S),m(lt,we,j,!0)}}var vt=r[we],xt=re(vt,function(At){return At.selector===N&&At.context===Z});xt||(xt={selector:N,context:Z,listeners:[]},vt.push(xt)),xt.listeners.push({func:Pe,options:qe})},removeDelegate:function(N,Z,we,Pe,Le){var qe,pt=Un(Le),lt=r[we],vt=!1;if(lt)for(qe=lt.length-1;qe>=0;qe--){var xt=lt[qe];if(xt.selector===N&&xt.context===Z){for(var At=xt.listeners,yt=At.length-1;yt>=0;yt--){var wt=At[yt];if(wt.func===Pe&&Zn(wt.options,pt)){At.splice(yt,1),At.length||(lt.splice(qe,1),b(Z,we,S),b(Z,we,j,!0)),vt=!0;break}}if(vt)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,Z,we,Pe){if(N.addEventListener){var Le=Un(Pe),qe=re(o,function(pt){return pt.eventTarget===N});qe||(qe={eventTarget:N,events:{}},o.push(qe)),qe.events[Z]||(qe.events[Z]=[]),re(qe.events[Z],function(pt){return pt.func===we&&Zn(pt.options,Le)})||(N.addEventListener(Z,we,f.supportsOptions?Le:Le.capture),qe.events[Z].push({func:we,options:Le}))}}function b(N,Z,we,Pe){if(N.addEventListener&&N.removeEventListener){var Le=$(o,function(tn){return tn.eventTarget===N}),qe=o[Le];if(qe&&qe.events)if(Z!=="all"){var pt=!1,lt=qe.events[Z];if(lt){if(we==="all"){for(var vt=lt.length-1;vt>=0;vt--){var xt=lt[vt];b(N,Z,xt.func,xt.options)}return}for(var At=Un(Pe),yt=0;yt<lt.length;yt++){var wt=lt[yt];if(wt.func===we&&Zn(wt.options,At)){N.removeEventListener(Z,we,f.supportsOptions?At:At.capture),lt.splice(yt,1),lt.length===0&&(delete qe.events[Z],pt=!0);break}}}pt&&!Object.keys(qe.events).length&&o.splice(Le,1)}else for(Z in qe.events)qe.events.hasOwnProperty(Z)&&b(N,Z,"all")}}function S(N,Z){for(var we=Un(Z),Pe=new Qn(N),Le=r[N.type],qe=ae(N)[0],pt=qe;T.element(pt);){for(var lt=0;lt<Le.length;lt++){var vt=Le[lt],xt=vt.selector,At=vt.context;if(G(pt,xt)&&de(At,qe)&&de(At,pt)){var yt=vt.listeners;Pe.currentTarget=pt;for(var wt=0;wt<yt.length;wt++){var tn=yt[wt];Zn(tn.options,we)&&tn.func(Pe)}}}pt=ot(pt)}}function j(N){return S(N,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},sa={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=sa.methodOrder;t<o.length;t++){var r=o[t],u=sa[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,m=u.interactions.list;f<m.length;f++){var b=m[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=ot(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var m=0,b=f.interactions.list;m<b.length;m++){var S=b[m];if(S.pointerType===r){if(S.simulation&&!ba(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,N=f.interactions.list;j<N.length;j++){var Z=N[j];if(!(Z.pointerType!==r||/down/i.test(u)&&Z.simulation))return Z}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ba(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ba(n,t){return n.pointers.some(function(o){return o.id===t})}var ca=sa,bn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ea(n,t){return function(o){var r=t.interactions.list,u=Q(o),f=ae(o),m=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,N=o.changedTouches;j<N.length;j++){var Z=N[j],we={pointer:Z,pointerId:z(Z),pointerType:u,eventType:o.type,eventTarget:m,curEventTarget:b,scope:t},Pe=ua(we);S.push([we.pointer,we.eventTarget,we.curEventTarget,Pe])}}else{var Le=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<r.length&&!Le;qe++)Le=r[qe].pointerType!=="mouse"&&r[qe].pointerIsDown;Le=Le||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Le){var pt={pointer:o,pointerId:z(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:m,scope:t},lt=ua(pt);S.push([pt.pointer,pt.eventTarget,pt.curEventTarget,lt])}}for(var vt=0;vt<S.length;vt++){var xt=S[vt],At=xt[0],yt=xt[1],wt=xt[2];xt[3][n](At,o,yt,wt)}}}function ua(n){var t=n.pointerType,o=n.scope,r={interaction:ca.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,m=r.events,b=m[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),m.delegatedEvents)b(o,S,m.delegateListener),b(o,S,m.delegateUseCapture,!0);for(var j=u&&u.events,N=0;N<f.length;N++){var Z=f[N];b(o,Z.type,Z.listener,j)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<bn.length;o++){var r=bn[o];t[r]=ea(r,n)}var u,f=ne.pEventTypes;function m(){for(var b=0,S=n.interactions.list;b<S.length;b++){var j=S[b];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var N=function(){var Pe=we[Z];n.documents.some(function(Le){return de(Le.doc,Pe.downTarget)})||j.removePointer(Pe.pointer,Pe.event)},Z=0,we=j.pointers;Z<we.length;Z++)N()}}(u=B.PointerEvent?[{type:f.down,listener:m},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.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(b){for(var S=0,j=n.interactions.list;S<j.length;S++)j[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(j,b);var S=H(j);function j(){return d(this,j),S.apply(this,arguments)}return v(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),j}(on),n.interactions={list:[],new:function(b){b.scopeFire=function(j,N){return n.fire(j,N)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin($n)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ea,methodNames:bn},Wn=Va,Hn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Hn||{}),ir=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Kn,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||r,this._win=L(it(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return T.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),T.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),T.func(o.onend)&&this.on("".concat(t,"end"),o.onend),T.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,m=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(m==null||m(S))&&Bn(S,f._actions)};(T.array(o)||T.object(o))&&this._onOff(Hn.Off,t,o,void 0,b),(T.array(r)||T.object(r))&&this._onOff(Hn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,m=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,m.listeners,b),T.array(b)?m[f]=ye(b):T.plainObject(b)?(m[f]=ee(m[f]||{},yn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(m[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?m[f].enabled=b:m[f]=b}}},{key:"getRect",value:function(t){return t=t||(T.element(this.target)?this.target:null),T.string(this.target)&&(t=t||this._context.querySelector(this.target)),Je(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=ee({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(it(o)||T.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][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 T.string(t)?Array.from(this._context.querySelectorAll(t)):T.func(t)&&t.getAllElements?t.getAllElements():T.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||de(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!T.element(r)&&(T.string(t)?xe(r,t,o):!!T.element(t)&&de(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?xe(r,t,o):!!T.element(t)&&de(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){T.object(o)&&!T.array(o)&&(u=r,r=null);var m=Te(o,r,f);for(var b in m){b==="wheel"&&(b=ne.wheelEvent);for(var S=0,j=m[b];S<j.length;S++){var N=j[S];Bn(b,this._actions)?this.events[t===Hn.On?"on":"off"](b,N):T.string(this.target)?this._scopeEvents[t===Hn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,N,u):this._scopeEvents[t===Hn.On?"add":"remove"](this.target,b,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(Hn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(Hn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in T.object(t)||(t={}),this.options=yn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,ee(ee({},o.perAction),o.actions[u])),this[f](t[u])}for(var m in t)m!=="getRect"?T.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(T.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,m=u.context,b=u.listeners;f===this.target&&m===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),sr=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,m=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=$(m,function(S){return S===u});m.splice(b,1)}})}return v(n,[{key:"new",value:function(t,o){o=ee(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),T.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=T.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return re(f,function(m){return m._context===r&&(u||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],m=void 0;if((T.string(f.target)?T.element(t)&&G(t,f.target):t===f.target)&&f.inContext(t)&&(m=o(f)),m!==void 0)return m}}}]),n}(),cr=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=yn(Jt),this.Eventable=Kn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(m,b){var S=r.interactables.getExisting(m,b);return S||((S=r.interactables.new(m,b)).events.global=f.globalEvents),S};return u.getPointerAverage=U,u.getTouchBBox=be,u.getTouchDistance=oe,u.getTouchAngle=q,u.getElementRect=Je,u.getElementClientRect=Ve,u.matchesSelector=G,u.closest=Xe,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,m){return this.scope.usePlugin(f,m),this},u.isSet=function(f,m){return!!this.scope.interactables.get(f,m&&m.context)},u.on=mt(function(f,m,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,j=f;S<j.length;S++){var N=j[S];this.on(N,m,b)}return this}if(T.object(f)){for(var Z in f)this.on(Z,f[Z],m);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(m):this.globalEvents[f]=[m]:this.scope.events.add(this.scope.document,f,m,{options:b}),this},"The interact.on() method is being deprecated"),u.off=mt(function(f,m,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,j=f;S<j.length;S++){var N=j[S];this.off(N,m,b)}return this}if(T.object(f)){for(var Z in f)this.off(Z,f[Z],m);return this}var we;return Bn(f,this.scope.actions)?f in this.globalEvents&&(we=this.globalEvents[f].indexOf(m))!==-1&&this.globalEvents[f].splice(we,1):this.scope.events.remove(this.scope.document,f,m,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var f=0,m=this.scope.interactions.list;f<m.length;f++)m[f].stop();return this},u.pointerMoveTolerance=function(f){return T.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,m){this.scope.addDocument(f,m)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=gt,this.Interactable=void 0,this.interactables=new sr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=H(f);function f(){return d(this,f),u.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return V(E(f.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){V(E(f.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}))}}]),f}(ir)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,T.window(r)&&y(r),B.init(r),ne.init(r),et.init(r),o.window=r,o.document=r.document,o.usePlugin(Wn),o.usePlugin(Na),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 r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[Eo(S)]=!0,b},{});r<u;r++){var m=this.listenerMaps[r].id;if(m&&(f[m]||f[Eo(m)]))break}this.listenerMaps.splice(r,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 r=L(t);o=o?ee({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=L(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{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()}}]),n}();function Eo(n){return n&&n.replace(/\/.*$/,"")}var _o=new cr,en=_o.interactStatic,ur=typeof globalThis<"u"?globalThis:window;_o.init(ur);var pr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,m=n.limits,b=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,S=n.offset,j=S===void 0?{x:0,y:0}:S,N={range:f,grid:n,x:null,y:null},Z=0;Z<t.length;Z++){var we=t[Z],Pe=we[0],Le=we[1],qe=Math.round((r-j.x)/n[Pe]),pt=Math.round((u-j.y)/n[Le]);N[Pe]=Math.max(b.left,Math.min(b.right,qe*n[Pe]+j.x)),N[Le]=Math.max(b.top,Math.min(b.bottom,pt*n[Le]+j.y))}return N};return o.grid=n,o.coordFields=t,o}}),dr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=ee(t.snappers||{},pr),t.createSnapGrid=t.snappers.grid}},fr=dr,hr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,m=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,N=S.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=ee({},u),t.startRect=ee({},o),t.ratio=m,t.equalDelta=j;var Z=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var we=(Z.left?1:-1)*(Z.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:Z.left?-1:1,y:Z.top?-1:1};if(b!==!1&&ee(r,Z),N!=null&&N.length){var Pe=new On(n.interaction);Pe.copyFrom(n.interaction.modification),Pe.prepareStates(N),t.subModification=Pe,Pe.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=ee({},r),m=t.equalDelta?vr:gr;if(ee(n.edges,u),m(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=ee({},o);ie(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),j=S.delta;return S.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),ee(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function gr(n,t,o,r){var u=n.startRect,f=n.startCoords,m=n.ratio,b=n.edgeSign;if(t){var S=r.width/m;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*m;o.x=f.x+(j-u.width)*b.x}}var mr=an(hr,"aspectRatio"),So=function(){};So._defaults={};var Oa=So;function ta(n,t,o){return T.func(n)?tt(n,t.interactable,t.element,[o.x,o.y,t]):tt(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,m=r.options,b=m.elementRect,S=ee({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&b){var j=ta(m.restriction,u,f);if(j){var N=j.right-j.left-t.width,Z=j.bottom-j.top-t.height;N<0&&(S.left+=N,S.right+=N),Z<0&&(S.top+=Z,S.bottom+=Z)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,m=ta(u.restriction,o,t);if(m){var b=function(S){return!S||"left"in S&&"top"in S||((S=ee({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(m);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},yr=an(Ma,"restrict"),To={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Bo(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ka={noInner:To,noOuter:Io,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Re(ta(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,m=u.options;if(o){var b=ee({},t),S=ta(m.inner,r,b)||{},j=ta(m.outer,r,b)||{};Bo(S,To),Bo(j,Io),o.top?t.y=Math.min(Math.max(j.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},br=an(ka,"restrictEdges"),kr=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),xr=an({start:Ma.start,set:Ma.set,defaults:kr},"restrictRect"),wr={width:-1/0,height:-1/0},Dr={width:1/0,height:1/0},Cr=an({start:function(n){return ka.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var m=pe(ta(f.min,t,n.coords))||wr,b=pe(ta(f.max,t,n.coords))||Dr;o.options={endOnly:f.endOnly,inner:ee({},ka.noInner),outer:ee({},ka.noOuter)},u.top?(o.options.inner.top=r.bottom-m.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+m.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-m.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+m.width,o.options.outer.right=r.left+b.width),ka.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,m=n.state,b=n.startOffset,S=m.options,j=S.offsetWithOrigin?function(we){var Pe=we.interaction.element,Le=Re(tt(we.state.options.origin,null,null,[Pe])),qe=Le||ue(we.interactable,Pe,we.interaction.prepared.name);return qe}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=tt(S.offset,r,u,[o]);(t=Re(N)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Z=S.relativePoints;m.offsets=f&&Z&&Z.length?Z.map(function(we,Pe){return{index:Pe,relativePoint:we,x:b.left-f.width*we.x+t.x,y:b.top-f.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,m=ue(t.interactable,t.element,t.prepared.name),b=ee({},o),S=[];u.offsetWithOrigin||(b.x-=m.x,b.y-=m.y);for(var j=0,N=f;j<N.length;j++)for(var Z=N[j],we=b.x-Z.x,Pe=b.y-Z.y,Le=0,qe=u.targets.length;Le<qe;Le++){var pt=u.targets[Le],lt=void 0;(lt=T.func(pt)?pt(we,Pe,t._proxy,Z,Le):pt)&&S.push({x:(T.number(lt.x)?lt.x:we)+Z.x,y:(T.number(lt.y)?lt.y:Pe)+Z.y,range:T.number(lt.range)?lt.range:u.range,source:pt,index:Le,offset:Z})}for(var vt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},xt=0;xt<S.length;xt++){var At=S[xt],yt=At.range,wt=At.x-b.x,tn=At.y-b.y,Ut=ft(wt,tn),pn=Ut<=yt;yt===1/0&&vt.inRange&&vt.range!==1/0&&(pn=!1),vt.target&&!(pn?vt.inRange&&yt!==1/0?Ut/yt<vt.distance/vt.range:yt===1/0&&vt.range!==1/0||Ut<vt.distance:!vt.inRange&&Ut<vt.distance)||(vt.target=At,vt.distance=Ut,vt.range=yt,vt.inRange=pn,vt.delta.x=wt,vt.delta.y=tn)}return vt.inRange&&(o.x=vt.target.x,o.y=vt.target.y),r.closest=vt,vt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Er=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,m={x:r.x-f[0].x,y:r.y-f[0].y};o.options=ee({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],N=void 0;if(N=T.func(j)?j(m.x,m.y,t):j){for(var Z=0,we=o.targetFields;Z<we.length;Z++){var Pe=we[Z],Le=Pe[0],qe=Pe[1];if(Le in N||qe in N){N.x=N[Le],N.y=N[qe];break}}o.options.targets.push(N)}}var pt=io.set(n);return o.options=u,pt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_r=an(za,"snapSize"),so={aspectRatio:mr,restrictEdges:br,restrict:yr,restrictRect:xr,restrictSize:Cr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:ee(yn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Er,snapSize:_r,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},Sr={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(kt),n.usePlugin(fr),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Tr=Sr,Ao=function(n){D(o,n);var t=H(o);function o(r,u,f,m,b,S){var j;if(d(this,o),C(O(j=t.call(this,b)),f),f!==u&&C(O(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=z(u),j.pointerType=Q(u),j.target=m,j.currentTarget=null,r==="tap"){var N=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[N].downTime;var Z=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&Z<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return v(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ge),xa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=xa,n.defaults.actions.pointerEvents=xa.defaults,ee(n.actions.phaselessTypes,xa.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,N=He(b),Z={interaction:u,pointer:f,event:m,eventTarget:b,type:"hold",targets:[],path:N,node:null},we=0;we<N.length;we++){var Pe=N[we];Z.node=Pe,r.fire("pointerEvents:collect-targets",Z)}if(Z.targets.length){for(var Le=1/0,qe=0,pt=Z.targets;qe<pt.length;qe++){var lt=pt[qe].eventable.options.holdDuration;lt<Le&&(Le=lt)}j.duration=Le,j.timeout=setTimeout(function(){qn({interaction:u,eventTarget:b,pointer:f,event:m,type:"hold"},r)},Le)}})(n,t),qn(n,t)},"interactions:up":function(n,t){co(n),qn(n,t),function(o,r){var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget;u.pointerWasMoved||qn({interaction:u,eventTarget:b,pointer:f,event:m,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),qn(n,t)}},PointerEvent:Ao,fire:qn,collectEventTargets:No,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 qn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,m=n.type,b=n.targets,S=b===void 0?No(n,t):b,j=new Ao(m,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:m,pointerEvent:j},Z=0;Z<S.length;Z++){var we=S[Z];for(var Pe in we.props||{})j[Pe]=we.props[Pe];var Le=ue(we.eventable,we.node);if(j._subtractOrigin(Le),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(Le),j.immediatePropagationStopped||j.propagationStopped&&Z+1<S.length&&S[Z+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var qe=j.double?qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=qe,o.tapTime=qe.timeStamp}return j}function No(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,m=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(m==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=He(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:m,path:j,targets:[],node:null},Z=0;Z<j.length;Z++){var we=j[Z];N.node=we,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(Pe){var Le,qe;return Pe.eventable.options.holdDuration===((Le=o.pointers[b])==null||(qe=Le.hold)==null?void 0:qe.duration)})),N.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Ir=Object.freeze({__proto__:null,default:xa});function Br(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Ar={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(xa);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Br,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var m=f[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},m))}}})},Nr=Ar,Vr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return ee(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(m){var b=m.events,S=b.options;b.types[u]&&b.types[u].length&&m.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:m}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;ee(o.events.options,t.pointerEvents.defaults),ee(o.events.options,r.pointerEvents||{})}}},Or=Vr,Mr={id:"pointer-events",install:function(n){n.usePlugin(Ir),n.usePlugin(Nr),n.usePlugin(Or)}},zr=Mr,Rr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var m=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var Z=m[N],we=r.getRect(Z);if(!we)return 1;var Pe,Le=re(f.interactions.list,function(lt){return lt.interacting()&&lt.interactable===r&&lt.element===Z&&lt.prepared.name===u.name});if(Le)Le.move(),S&&(Pe=Le._reflowPromise||new b(function(lt){Le._reflowResolve=lt}));else{var qe=pe(we),pt=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:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:f.now()});Pe=function(lt,vt,xt,At,yt){var wt=lt.interactions.new({pointerType:"reflow"}),tn={interaction:wt,event:yt,pointer:yt,eventTarget:xt,phase:"reflow"};wt.interactable=vt,wt.element=xt,wt.prevEvent=yt,wt.updatePointer(yt,yt,xt,!0),Y(wt.coords.delta),Dt(wt.prepared,At),wt._doPhase(tn);var Ut=lt.window,pn=Ut.Promise,En=pn?new pn(function(zn){wt._reflowResolve=zn}):void 0;return wt._reflowPromise=En,wt.start(At,vt,xt),wt._interacting?(wt.move(tn),wt.end(yt)):(wt.stop(),wt._reflowResolve()),wt.removePointer(yt,yt),En}(f,r,Z,u,pt)}S&&S.push(Pe)},N=0;N<m.length&&!j();N++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Lr=Rr;if(en.use($n),en.use(ln),en.use(zr),en.use(un),en.use(Tr),en.use(Gn),en.use(ct),en.use(ht),en.use(Lr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ea,Ea.exports)),Ea.exports}var yd=md();const al=ze.getDefaultExportFromCjs(yd),ao=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(Kl),x=e.inject(Ul);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),h=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 D=!1,E=!1,_=NaN,O=NaN,H=NaN,V=NaN,ke=-1,W=-1,P=-1,X=-1,y=l.x,L=l.y,k=l.w,A=l.h;const T=e.ref(),se=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:tt});function Oe(w){Te(w)}function at(){Ge()}function Be(w){dn(l.isDraggable)&&(h.draggable=w)}function Fe(w){dn(l.isResizable)&&(h.resizable=w)}function he(w){dn(l.isBounded)&&(h.bounded=w)}function B(w){h.transformScale=w}function te(w){h.rowHeight=w}function ne(w){h.maxRows=w}function de(){h.rtl=tl()==="rtl",Ge()}function Xe(w){h.cols=Math.floor(w)}d.increaseItem(se),e.onBeforeMount(()=>{h.rtl=tl()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Xl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,dn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,dn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,dn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{y=l.x,L=l.y,A=l.h,k=l.w,nn(Je)}),x.on("updateWidth",Oe),x.on("compact",at),x.on("setDraggable",Be),x.on("setResizable",Fe),x.on("setBounded",he),x.on("setTransformScale",B),x.on("setRowHeight",te),x.on("setMaxRows",ne),x.on("directionchange",de),x.on("setColNum",Xe)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Oe),x.off("compact",at),x.off("setDraggable",Be),x.off("setResizable",Fe),x.off("setBounded",he),x.off("setTransformScale",B),x.off("setRowHeight",te),x.off("setMaxRows",ne),x.off("directionchange",de),x.off("setColNum",Xe),v.value&&(v.value.unset(),v.value=null),d.decreaseItem(se)}),i({state:h,wrapper:T});const ot=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,G=e.computed(()=>h.resizable&&!l.static),R=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),ve=e.computed(()=>(h.draggable||h.resizable)&&!l.static),xe=cd("item"),Me=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:G.value,[xe.bm("static")]:l.static,[xe.bm("resizing")]:h.isResizing,[xe.bm("dragging")]:h.isDragging,[xe.bm("transform")]:h.useCssTransforms,[xe.bm("rtl")]:R.value,[xe.bm("no-touch")]:ot&&ve.value})),Ve=e.computed(()=>[xe.be("resizer"),R.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,w=>{h.draggable=w}),e.watch(()=>l.static,()=>{nn(C),nn(Y)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,w=>{h.resizable=w}),e.watch(()=>l.isBounded,w=>{h.bounded=w}),e.watch(()=>h.resizable,()=>{nn(Y)}),e.watch(()=>h.rowHeight,()=>{nn(Je),nn(He)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(Y),nn(Je),nn(He)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Y)}),e.watch(R,()=>{nn(Y),nn(Je)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const w=d.margin;!w||w[0]===h.margin[0]&&w[1]===h.margin[1]||(h.margin=w.map(Number),nn(Je),nn(He))});function Je(){l.x+l.w>h.cols?(y=0,k=l.w>h.cols?h.cols:l.w):(y=l.x,k=l.w);const w=st(y,L,k,A);h.isDragging&&(w.top=h.dragging.top,R.value?w.right=h.dragging.left:w.left=h.dragging.left),h.isResizing&&(w.width=h.resizing.width,w.height=h.resizing.height);let I;h.useCssTransforms?R.value?I=ld(w.top,w.right,w.width,w.height):I=od(w.top,w.left,w.width,w.height):R.value?I=id(w.top,w.right,w.width,w.height):I=rd(w.top,w.left,w.width,w.height),h.style=I}function He(){const w={};for(const I of["width","height"]){const J=h.style[I].match(/^(\d+)px$/);if(!J)return;w[I]=J[1]}c("container-resized",l.i,l.h,l.w,w.height,w.width)}function it(w){if(l.static)return;const I=w.type;if(I==="resizestart"&&h.isResizing||I!=="resizestart"&&!h.isResizing)return;const J=Zo(w);if(dn(J))return;const{x:z,y:le}=J,F={width:0,height:0};let U;switch(I){case"resizestart":{Y(),ke=k,W=A,U=st(y,L,k,A),F.width=U.width,F.height=U.height,h.resizing=F,h.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(H=z),!w.edges.top&&!w.edges.bottom&&(V=le);const be=el(H,V,z,le);R.value?F.width=h.resizing.width-be.deltaX/h.transformScale:F.width=h.resizing.width+be.deltaX/h.transformScale,F.height=h.resizing.height+be.deltaY/h.transformScale,h.resizing=F;break}case"resizeend":{U=st(y,L,k,A),F.width=U.width,F.height=U.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}U=ue(F.height,F.width),U.w<l.minW&&(U.w=l.minW),U.w>l.maxW&&(U.w=l.maxW),U.h<l.minH&&(U.h=l.minH),U.h>l.maxH&&(U.h=l.maxH),U.h<1&&(U.h=1),U.w<1&&(U.w=1),H=z,V=le,(k!==U.w||A!==U.h)&&c("resize",l.i,U.h,U.w,F.height,F.width),w.type==="resizeend"&&(ke!==k||W!==A)&&c("resized",l.i,U.h,U.w,F.height,F.width),x.emit("resizeEvent",w.type,l.i,y,L,U.h,U.w)}function ee(w){if(l.static||h.isResizing)return;const I=w.type;if(I==="dragstart"&&h.isDragging||I!=="dragstart"&&!h.isDragging)return;const J=Zo(w);if(dn(J))return;const{x:z,y:le}=J,F=w.target;if(!F.offsetParent)return;const U={top:0,left:0};switch(I){case"dragstart":{P=y,X=L;const oe=F.offsetParent.getBoundingClientRect(),q=F.getBoundingClientRect(),Q=q.left/h.transformScale,ae=oe.left/h.transformScale,ge=q.right/h.transformScale,fe=oe.right/h.transformScale,ye=q.top/h.transformScale,$=oe.top/h.transformScale;R.value?U.left=(ge-fe)*-1:U.left=Q-ae,U.top=ye-$,h.dragging=U,h.isDragging=!0;break}case"dragmove":{const oe=el(_,O,z,le);if(R.value?U.left=h.dragging.left-oe.deltaX/h.transformScale:U.left=h.dragging.left+oe.deltaX/h.transformScale,U.top=h.dragging.top+oe.deltaY/h.transformScale,h.bounded){const q=F.offsetParent.clientHeight-pe(l.h,h.rowHeight,h.margin[1]);U.top=ie(U.top,0,q);const Q=Re(),ae=h.containerWidth-pe(l.w,Q,h.margin[0]);U.left=ie(U.left,0,ae)}h.dragging=U;break}case"dragend":{const oe=F.offsetParent.getBoundingClientRect(),q=F.getBoundingClientRect(),Q=q.left/h.transformScale,ae=oe.left/h.transformScale,ge=q.right/h.transformScale,fe=oe.right/h.transformScale,ye=q.top/h.transformScale,$=oe.top/h.transformScale;R.value?U.left=(ge-fe)*-1:U.left=Q-ae,U.top=ye-$,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let be;R.value,be=tt(U.top,U.left),_=z,O=le,(y!==be.x||L!==be.y)&&c("move",l.i,be.x,be.y),w.type==="dragend"&&(P!==y||X!==L)&&c("moved",l.i,be.x,be.y),x.emit("dragEvent",w.type,l.i,be.x,be.y,A,k)}function st(w,I,J,z){const le=Re();let F;return R.value?F={right:Math.round(le*w+(w+1)*h.margin[0]),top:Math.round(h.rowHeight*I+(I+1)*h.margin[1]),width:J===1/0?J:Math.round(le*J+Math.max(0,J-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])}:F={left:Math.round(le*w+(w+1)*h.margin[0]),top:Math.round(h.rowHeight*I+(I+1)*h.margin[1]),width:J===1/0?J:Math.round(le*J+Math.max(0,J-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])},F}function tt(w,I){const J=Re();let z=Math.round((I-h.margin[0])/(J+h.margin[0])),le=Math.round((w-h.margin[1])/(h.rowHeight+h.margin[1]));return z=Math.max(Math.min(z,h.cols-k),0),le=Math.max(Math.min(le,h.maxRows-A),0),{x:z,y:le}}function Re(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function pe(w,I,J){return Number.isFinite(w)?Math.round(I*w+Math.max(0,w-1)*J):w}function ie(w,I,J){return Math.max(Math.min(w,J),I)}function ue(w,I,J=!1){const z=Re();let le=Math.round((I+h.margin[0])/(z+h.margin[0])),F=0;return J?F=Math.ceil((w+h.margin[1])/(h.rowHeight+h.margin[1])):F=Math.round((w+h.margin[1])/(h.rowHeight+h.margin[1])),le=Math.max(Math.min(le,h.cols-y),0),F=Math.max(Math.min(F,h.maxRows-L),0),{w:le,h:F}}function Te(w,I){h.containerWidth=w}function Ge(){Je()}function ft(){!v.value&&T.value&&(v.value=al(T.value),h.useStyleCursor||v.value.styleCursor(!1))}const g=Yo(ee);function C(){if(ft(),!!v.value)if(h.draggable&&!l.static){const w={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(w),D||(D=!0,v.value.on("dragstart dragmove dragend",I=>{I.type==="dragmove"?g(I):ee(I)}))}else v.value.draggable({enabled:!1})}const K=Yo(it);function Y(){if(ft(),!!v.value)if(h.resizable&&!l.static){const w=st(0,0,l.maxW,l.maxH),I=st(0,0,l.minW,l.minH),J={edges:{left:R.value?`.${Ve.value[0]}`:!1,right:R.value?!1:`.${Ve.value[0]}`,bottom:`.${Ve.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:I.height*h.transformScale,width:I.width*h.transformScale},max:{height:w.height*h.transformScale,width:w.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(J.modifiers=[al.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(J),E||(E=!0,v.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?K(z):it(z)}))}else v.value.resizable({enabled:!1})}return(w,I)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(Me.value),style:e.normalizeStyle(h.style)},[e.renderSlot(w.$slots,"default"),G.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ve.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ia=typeof window<"u";var ol;ia&&(ol=window==null?void 0:window.navigator)!=null&&ol.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ll(a){return a!=null}function rl(){}const bd=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(bd)));const kd=ia&&("ontouchstart"in window||wd()>0),xd=kd?"pointerdown":"click";function wd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Dd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ll(l)||l==="")return!1;let v;return ll(s)?v=new s(l,{bubbles:c,cancelable:d}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,c,d)),Object.assign(v,x),a.dispatchEvent(v)}const Cd="clickoutside",Ed=new Set;ia&&document.addEventListener(xd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Ed.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&Dd(l,{type:Cd})})},!0);const _d=[["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 Wa;if(ia){for(const a of _d)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Sd=new Set,Td=new WeakMap;if(ia&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Sd.forEach(s=>{s.value=!1}),document[a]){const s=Td.get(document[a]);s&&(s.value=!0)}},!1)}const Jl=new Map;Jl.set("x",0);Jl.set("y",0);var oa=[],Id=function(){return oa.some(function(a){return a.activeTargets.length>0})},Bd=function(){return oa.some(function(a){return a.skippedTargets.length>0})},il="ResizeObserver loop completed with undelivered notifications.",Ad=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:il}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=il),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var la=function(a){return Object.freeze(a)},Nd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,la(this)}return a}(),Ql=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,la(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,x=i.bottom,v=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:v,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Co=function(a){return a instanceof SVGElement&&"getBBox"in a},Zl=function(a){if(Co(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},sl=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Vd=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ia=typeof window<"u"?window:{},Pa=new WeakMap,cl=/auto|scroll/,Od=/^tb|vertical/,Md=/msie|trident/i.test(Ia.navigator&&Ia.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},ha=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Nd((s?i:a)||0,(s?a:i)||0)},ul=la({devicePixelContentBoxSize:ha(),borderBoxSize:ha(),contentBoxSize:ha(),contentRect:new Ql(0,0,0,0)}),er=function(a,i){if(i===void 0&&(i=!1),Pa.has(a)&&!i)return Pa.get(a);if(Zl(a))return Pa.set(a,ul),ul;var s=getComputedStyle(a),l=Co(a)&&a.ownerSVGElement&&a.getBBox(),c=!Md&&s.boxSizing==="border-box",d=Od.test(s.writingMode||""),x=!l&&cl.test(s.overflowY||""),v=!l&&cl.test(s.overflowX||""),h=l?0:Nn(s.paddingTop),D=l?0:Nn(s.paddingRight),E=l?0:Nn(s.paddingBottom),_=l?0:Nn(s.paddingLeft),O=l?0:Nn(s.borderTopWidth),H=l?0:Nn(s.borderRightWidth),V=l?0:Nn(s.borderBottomWidth),ke=l?0:Nn(s.borderLeftWidth),W=_+D,P=h+E,X=ke+H,y=O+V,L=v?a.offsetHeight-y-a.clientHeight:0,k=x?a.offsetWidth-X-a.clientWidth:0,A=c?W+X:0,T=c?P+y:0,se=l?l.width:Nn(s.width)-A-k,Oe=l?l.height:Nn(s.height)-T-L,at=se+W+k+X,Be=Oe+P+L+y,Fe=la({devicePixelContentBoxSize:ha(Math.round(se*devicePixelRatio),Math.round(Oe*devicePixelRatio),d),borderBoxSize:ha(at,Be,d),contentBoxSize:ha(se,Oe,d),contentRect:new Ql(_,h,se,Oe)});return Pa.set(a,Fe),Fe},tr=function(a,i,s){var l=er(a,s),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(i){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},zd=function(){function a(i){var s=er(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=la([s.borderBoxSize]),this.contentBoxSize=la([s.contentBoxSize]),this.devicePixelContentBoxSize=la([s.devicePixelContentBoxSize])}return a}(),nr=function(a){if(Zl(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Rd=function(){var a=1/0,i=[];oa.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(v){var h=new zd(v.target),D=nr(v.target);x.push(h),v.lastReportedSize=tr(v.target,v.observedBox),D<a&&(a=D)}),i.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},pl=function(a){oa.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(nr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Ld=function(){var a=0;for(pl(a);Id();)a=Rd(),pl(a);return Bd()&&Ad(),a>0},fo,ar=[],Fd=function(){return ar.splice(0).forEach(function(a){return a()})},Pd=function(a){if(!fo){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Fd()}).observe(s,l),fo=function(){s.textContent="".concat(i?i--:i++)}}ar.push(a),fo()},$d=function(a){Pd(function(){requestAnimationFrame(a)})},Ha=0,jd=function(){return!!Ha},Kd=250,Ud={attributes:!0,characterData:!0,childList:!0,subtree:!0},dl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],fl=function(a){return a===void 0&&(a=0),Date.now()+a},ho=!1,Wd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=Kd),!ho){ho=!0;var l=fl(i);$d(function(){var c=!1;try{c=Ld()}finally{if(ho=!1,i=l-fl(),!jd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ud)};document.body?s():Ia.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),dl.forEach(function(s){return Ia.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),dl.forEach(function(s){return Ia.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),bo=new Wd,hl=function(a){!Ha&&a>0&&bo.start(),Ha+=a,!Ha&&bo.stop()},Hd=function(a){return!Co(a)&&!Vd(a)&&getComputedStyle(a).display==="inline"},qd=function(){function a(i,s){this.target=i,this.observedBox=s||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=tr(this.target,this.observedBox,!0);return Hd(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Gd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,vl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},ja=function(){function a(){}return a.connect=function(i,s){var l=new Gd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;vl(c.observationTargets,s)<0&&(d&&oa.push(c),c.observationTargets.push(new qd(s,l&&l.box)),hl(1),bo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=vl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&oa.splice(oa.indexOf(l),1),l.observationTargets.splice(c,1),hl(-1))},a.disconnect=function(i){var s=this,l=$a.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Xd=function(){function a(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.");ja.connect(this,i)}return a.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(!sl(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,i,s)},a.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(!sl(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,i)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Yd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:v}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:v??D}))}}}const or=new(ia&&window.ResizeObserver||Xd)(Yd);function gl(a,i){oo.set(a,i),or.observe(a)}function ml(a){oo.has(a)&&(or.unobserve(a),oo.delete(a))}function Jd(a={}){let i=rl;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(gl(c,a.onResize),i=()=>{ml(c),i=rl})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:gl,unobserveResize:ml,unobserve:l}}const Qd=e.ref(!1);e.computed(()=>Qd.value);const yl="__theme_style__",vo="__theme_observer__",bl=e.reactive(new Map),kl=new Map;e.watch(bl,()=>{if(!ia)return;kl.clear();const a=document.head.querySelector(`#${yl}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${vo} { width: 1px }`,l=1;for(const[c,[d,x]]of bl.entries())s+=` html.${d} .${vo}, .${x} .${vo} { width: ${++l}px }`,kl.set(l,c);i.textContent=s,i.id=yl,document.head.appendChild(i)});const lr=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,v=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Jd(),_=Jp();_.on("resizeEvent",O),_.on("dragEvent",H),e.onBeforeMount(()=>{c("layout-before-mount",v.value)}),e.onMounted(()=>{c("layout-mounted",v.value),e.nextTick(()=>{sd(v.value),d.originalLayout=v.value,e.nextTick(()=>{Oe(),h.value&&D(h.value,Qp(y,16)),pa(v.value,l.verticalCompact),c("layout-updated",v.value),X(),y()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function O(Be,Fe,he,B,te,ne){T(Be,Fe,he,B,te,ne)}function H(Be,Fe,he,B,te,ne){A(Be,Fe,he,B,te,ne)}e.watch(()=>d.width,(Be,Fe)=>{e.nextTick(()=>{_.emit("updateWidth",Be),Fe===-1&&e.nextTick(()=>{c("layout-ready",v.value)}),X()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,P()}),e.watch(()=>l.colNum,Be=>{_.emit("setColNum",Be)}),e.watch(()=>l.rowHeight,Be=>{_.emit("setRowHeight",Be)}),e.watch(()=>l.isDraggable,Be=>{_.emit("setDraggable",Be)}),e.watch(()=>l.isResizable,Be=>{_.emit("setResizable",Be)}),e.watch(()=>l.isBounded,Be=>{_.emit("setBounded",Be)}),e.watch(()=>l.transformScale,Be=>{_.emit("setTransformScale",Be)}),e.watch(()=>l.responsive,Be=>{Be||(c("update:layout",d.originalLayout),_.emit("setColNum",l.colNum)),y()}),e.watch(()=>l.maxRows,Be=>{_.emit("setMaxRows",Be)}),e.watch([()=>l.margin,()=>l.margin[1]],X),e.provide(Kl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ke})),e.provide(Ul,_),i({state:d,getItem:W,resizeEvent:T,dragEvent:A,layoutUpdate:P});function V(Be){x.set(Be.i,Be)}function ke(Be){x.delete(Be.i)}function W(Be){return x.get(Be)}function P(){if(!dn(v.value)&&!dn(d.originalLayout)){if(v.value.length!==d.originalLayout.length){const Be=at(v.value,d.originalLayout);if(Be.length>0)if(v.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Be);else{const Fe=new Set(Be.map(he=>he.i));d.originalLayout=d.originalLayout.filter(he=>!Fe.has(he.i))}d.lastLayoutLength=v.value.length,Oe()}pa(v.value,l.verticalCompact),_.emit("updateWidth",d.width),X(),c("layout-updated",v.value)}}function X(){d.mergedStyle={height:L()}}function y(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function L(){if(!l.autoSize)return;const Be=parseFloat(l.margin[1]);return ed(v.value)*(l.rowHeight+Be)+Be+"px"}let k;function A(Be,Fe,he,B,te,ne){let de=Jo(v.value,Fe);dn(de)&&(de={h:0,w:0,x:0,y:0,i:""}),Be==="dragstart"&&!l.verticalCompact&&(k=v.value.reduce((Xe,{i:ot,x:G,y:R})=>({...Xe,[ot]:{x:G,y:R}}),{})),Be==="dragmove"||Be==="dragstart"?(d.placeholder.i=Fe,d.placeholder.x=de.x,d.placeholder.y=de.y,d.placeholder.w=ne,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),v.value=yo(v.value,de,he,B,!0,l.preventCollision),l.restoreOnDrag?(de.static=!0,pa(v.value,l.verticalCompact,k),de.static=!1):pa(v.value,l.verticalCompact),_.emit("compact"),X(),Be==="dragend"&&(k=void 0,c("layout-updated",v.value))}function T(Be,Fe,he,B,te,ne){let de=Jo(v.value,Fe);dn(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Xe;if(l.preventCollision){const ot=Hl(v.value,{...de,w:ne,h:te}).filter(G=>G.i!==de.i);if(Xe=ot.length>0,Xe){let G=1/0,R=1/0;ot.forEach(ve=>{ve.x>de.x&&(G=Math.min(G,ve.x)),ve.y>de.y&&(R=Math.min(R,ve.y))}),Number.isFinite(G)&&(de.w=G-de.x),Number.isFinite(R)&&(de.h=R-de.y)}}Xe||(de.w=ne,de.h=te),Be==="resizestart"||Be==="resizemove"?(d.placeholder.i=Fe,d.placeholder.x=he,d.placeholder.y=B,d.placeholder.w=de.w,d.placeholder.h=de.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Be&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&se(),pa(v.value,l.verticalCompact),_.emit("compact"),X(),Be==="resizeend"&&c("layout-updated",v.value)}function se(){const Be=dd(l.breakpoints,d.width);if(Be===d.lastBreakpoint)return;const Fe=Xl(Be,l.cols);!dn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mo(v.value));const he=fd(d.originalLayout,d.layouts,l.breakpoints,Be,d.lastBreakpoint,Fe,l.verticalCompact);d.layouts[Be]=he,d.lastBreakpoint!==Be&&c("breakpoint-changed",Be,he),v.value=he,c("update:layout",he),d.lastBreakpoint=Be,_.emit("setColNum",Fe)}function Oe(){d.layouts=Object.assign({},l.responsiveLayouts)}function at(Be,Fe){const he=new Set(Fe.map(de=>de.i)),B=new Set(Be.map(de=>de.i)),te=Be.filter(de=>!he.has(de.i)),ne=Fe.filter(de=>!B.has(de.i));return te.concat(ne)}return(Be,Fe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Be.$slots.default?e.renderSlot(Be.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,he=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:he.i,ref_for:!0},he),{default:e.withCtx(()=>[e.renderSlot(Be.$slots,"item",{item:he})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Zd={key:0,class:"item-view-group"},ef={key:0,class:"item-view-group"},tf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=Kt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),v=e.computed(()=>{var O,H,V,ke;return((O=d==null?void 0:d.children)==null?void 0:O.length)>0&&((H=d==null?void 0:d.children)!=null&&H.every(W=>W==null?void 0:W.layout))?(ke=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ke.layout:"vertical"}),h=e.computed(()=>{var O,H;return((H=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:H.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=O=>{c("rowClick",O)},_=(O,H)=>{c("routeUrl",O,H)};return(O,H)=>h.value?(e.openBlock(),e.createBlock(e.unref(lr),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=V=>x.value=V),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(V,ke)=>(e.openBlock(),e.createBlock(e.unref(ao),{key:V.i,x:V.x,y:V.y,"min-h":V.minH,"max-h":V.maxH,"min-w":V.minW,w:V.w,h:V.h,i:V.i},{default:e.withCtx(()=>{var W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((X=(P=V==null?void 0:V.component)==null?void 0:P.comp)==null?void 0:X.toUpperCase())!=="TABLE"&&((y=V==null?void 0:V.component)!=null&&y.name)?(e.openBlock(),e.createElementBlock("div",Zd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((L=V==null?void 0:V.component)==null?void 0:L.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:v.value,config:{showIndex:(A=e.unref(bt)[ke])==null?void 0:A.showIndex,allowMove:(T=e.unref(bt)[ke])==null?void 0:T.allowMove,viewport:(se=e.unref(bt)[ke])==null?void 0:se.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(wo),itemData:(Oe=V==null?void 0:V.component)==null?void 0:Oe.compData,childItemData:(at=V==null?void 0:V.component)==null?void 0:at.itemChildData,key:e.unref(va),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Be=V==null?void 0:V.component)==null?void 0:Be.tableId,allMapContents:e.unref(Ja),children:(Fe=V==null?void 0:V.component)==null?void 0:Fe.children,level:D.value,onRowClick:E,onRouteUrl:_,onClickTrigger:e.unref(zl),onClickMainKey:e.unref(Rl)},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(d==null?void 0:d.children,(V,ke)=>{var W,P;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(V==null?void 0:V.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((P=V==null?void 0:V.comp)==null?void 0:P.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(va),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:_},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),nf=Ft._export_sfc(tf,[["__scopeId","data-v-c498af99"]]),rr=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"}]),af={TABLE:da.ssTable,FORM:Lo,TABLEOPERATE:ls,TABLESTYLE:xs,TABLEEXTEND:Ds,TABLEINTERACTION:_s,FORMOPERATE:Fo,FOLD:nc,CALCULATOR:sc,METHODBUTTON:Tc,AVATARUPLOAD:zo.ssAvatar,SIGNATURE:zo.ssSignature,FORMTOP:Lo,STEP:Pc,STEPOPERATE:qs,TIMELINE:Hc,TIMELINEOPERATE:Zs,FORMTOPOPERATE:Fo,SIGNATUREOPERATE:Rc,AVATARUPLOADOPERATE:Ac,TABS:Xc,TABSOPERATE:Ou,CHART:Gu,CHARTOPERATE:lp,LAYOUT:Fp,LAYOUTOPERATE:Gp,PARENTITEM:nf};function ma(a){return af[a==null?void 0:a.toUpperCase()]||null}exports.De=lr;exports.activeStepInfo=fa;exports.affixItems=xp;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=yc;exports.checkIsQuote=fc;exports.checkIsShowGroup=cc;exports.checkIsShowGroupForm=dc;exports.checkIsShowTable=gc;exports.checkIsTableCheck=pc;exports.checkIsUsingGroup=uc;exports.clickMainKey=Rl;exports.clickSavePage=kp;exports.clickStep=Fl;exports.clickTrigger=zl;exports.compId=va;exports.compNames=wo;exports.compShow=Ya;exports.contentTransArray=Da;exports.contentTransArrayToAll=_a;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ko;exports.existLayouts=Bp;exports.formToExtraContent=mc;exports.generateLayouts=ms;exports.getComponent=ma;exports.getComponents=Qa;exports.getExtraContents=kc;exports.getSliceContLength=Op;exports.gridRowHeight=ds;exports.isStepLayout=Do;exports.isUndefined=Dl;exports.newContentTransArrayToAllNoExtra=vc;exports.onBack=yp;exports.onChange=eo;exports.onClick=bp;exports.onContentChange=to;exports.onExtendTaskEnd=Ip;exports.onPageBack=Ap;exports.onPageChange=no;exports.onSaveBack=Al;exports.onSelectFixContent=mp;exports.renderShowItems=Vl;exports.showItems=bt;exports.sliceTableLength=Ol;exports.slotContent=rr;exports.st=ao;exports.stepItems=Mp;exports.toNumber=go;exports.toolBar=Fn;exports.verifyButton=Np;
1
+ "use strict";const da=require("./index-BNa7hFlv.cjs"),e=require("vue"),p=require("./index-C8qRkCgn.cjs"),Vt=require("./index-Fk0-h7BT.cjs"),ze=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-fXuLTS.cjs"),Yt=require("./index-DwzobGZ4.cjs"),Vo=require("./threeViewerHost-vo3_msNQ.cjs"),Kt=require("./index-DeBHVrj0.cjs"),Ft=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oo=require("./isString--eJE54G5.cjs"),Mo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),zo=require("./index-DtNajbhX.cjs"),xl=require("./index-BVaHwt5f.cjs"),Fr=require("./index-Cmns7DGJ.cjs");var Pr=/\s/;function $r(a){for(var i=a.length;i--&&Pr.test(a.charAt(i)););return i}var jr=/^\s+/;function Kr(a){return a&&a.slice(0,$r(a)+1).replace(jr,"")}var Ro=NaN,Ur=/^[-+]0x[0-9a-f]+$/i,Wr=/^0b[01]+$/i,Hr=/^0o[0-7]+$/i,qr=parseInt;function go(a){if(typeof a=="number")return a;if(p.isSymbol(a))return Ro;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=Kr(a);var s=Wr.test(a);return s||Hr.test(a)?qr(a.slice(2),s?2:8):Ur.test(a)?Ro:+a}var uo=function(){return p.root.Date.now()},Gr="Expected a function",Xr=Math.max,Yr=Math.min;function ko(a,i,s){var l,c,d,x,v,h,D=0,E=!1,_=!1,O=!0;if(typeof a!="function")throw new TypeError(Gr);i=go(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Xr(go(s.maxWait)||0,i):d,O="trailing"in s?!!s.trailing:O);function H(A){var T=l,se=c;return l=c=void 0,D=A,x=a.apply(se,T),x}function V(A){return D=A,v=setTimeout(P,i),E?H(A):x}function ke(A){var T=A-h,se=A-D,Oe=i-T;return _?Yr(Oe,d-se):Oe}function W(A){var T=A-h,se=A-D;return h===void 0||T>=i||T<0||_&&se>=d}function P(){var A=uo();if(W(A))return X(A);v=setTimeout(P,ke(A))}function X(A){return v=void 0,O&&l?H(A):(l=c=void 0,x)}function y(){v!==void 0&&clearTimeout(v),D=0,l=h=c=v=void 0}function L(){return v===void 0?x:X(uo())}function k(){var A=uo(),T=W(A);if(l=arguments,c=this,h=A,T){if(v===void 0)return V(h);if(_)return clearTimeout(v),v=setTimeout(P,i),H(h)}return v===void 0&&(v=setTimeout(P,i)),x}return k.cancel=y,k.flush=L,k}var Jr="[object Boolean]";function wl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Jr}function Dl(a){return a===void 0}const Qr={class:"form-content"},Zr={title:"选择标签"},ei={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ti={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ai={__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(a,{emit:i}){const s=()=>{x.value=!1,v.value=!1,h.value=[]},l=a;e.computed(()=>{var z;const I=(z=ot.value)==null?void 0:z.split("/");return(I==null?void 0:I.some(le=>(le==null?void 0:le.includes("updateLoading"))||(le==null?void 0:le.includes("loading"))))?!1:Fe.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),v=e.ref(!1),h=e.ref([]),{getFileExtension:D}=Vo.useThreeSystem(),E=e.ref(),_=e.ref(!1),O=e.ref(!1),H=e.ref([]),V=e.ref(),ke=e.ref(!1),W=e.ref([]),P=da.useFormToTableComp(p.pinia),X=da.useFormComp(p.pinia),y=e.ref(!1),L=e.ref(),k=p.useLoginState(p.pinia),{loginUserInfo:A}=p.storeToRefs(k),T=e.ref(),se=e.ref(!0),Oe=Kt.useModelComp(p.pinia),{tableViewContents:at,itemData:Be,isEdit:Fe,routeToChildPath:he,lockingPage:B}=p.storeToRefs(Oe),te=e.ref(null),ne=e.ref(!1),de=e.ref(!1),Xe=Kt.useMenuState(),{activeMenuPath:ot}=p.storeToRefs(Xe),G=ze.useOriginalState(p.pinia),{originalPath:R}=p.storeToRefs(G),ve=e.ref([]),xe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Me=async I=>{de.value=I,await tt("disabled",null,I,!0)},Ve=async I=>{await tt("operable",null,I,!0)};e.watch(()=>ot.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Je=()=>{e.nextTick(()=>{st()})},He=I=>{var J;d.value=(J=d.value)==null?void 0:J.map(z=>({...z,isFormColHidden:!(I!=null&&I.includes(z.label))}))};e.onUnmounted(()=>{te.value=null});const it=I=>{c("clickTrigger",I)},ee=async I=>{var J,z,le,F,U,be;if(I===""){let oe="";(J=d.value)==null||J.forEach(ge=>{ge!=null&&ge.isMain&&(oe=ge==null?void 0:ge.value)});let q=await ze.getItemData(he.value,sessionStorage.getItem("systemKey"),"");oe=((be=(U=(F=(le=(z=q==null?void 0:q[0])==null?void 0:z.compData)==null?void 0:le.find(ge=>(ge==null?void 0:ge.key)==="mainRouters"))==null?void 0:F.contents)==null?void 0:U[0])==null?void 0:be.routerContent)+R.value+oe;let ae=await ze.getItemData(oe,sessionStorage.getItem("systemKey"),"");ke.value=!0,W.value=ae==null?void 0:ae.filter(ge=>(ge==null?void 0:ge.comp)!=="methodButton"),c("routeUrl",W.value)}},st=()=>{var J;const I=(J=te.value)==null?void 0:J.$el;I&&ze.Sortable.create(I,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:le,newIndex:F}=z;if(le===F)return;const U=d.value.splice(le,1)[0];d.value.splice(F,0,U)}})},tt=async(I,J,z,le=!1)=>{var F,U,be,oe,q,Q,ae,ge;try{Oe.setRefreshCurStructure(!1);const fe=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((F=fe==null?void 0:fe.data)==null?void 0:F.code)===200){let ye=(q=(oe=(be=(U=fe==null?void 0:fe.data)==null?void 0:U.result)==null?void 0:be[0])==null?void 0:oe.value)==null?void 0:q.pageData;le?ye={...ye,compData:(ae=ye==null?void 0:ye.compData)==null?void 0:ae.map(re=>{var ce;return(re==null?void 0:re.key)==="formContent"?{...re,contents:(ce=re==null?void 0:re.contents)==null?void 0:ce.map(Ee=>({...Ee,[I]:z}))}:re})}:ye={...ye,compData:(Q=ye==null?void 0:ye.compData)==null?void 0:Q.map(re=>{var ce;return(re==null?void 0:re.key)==="formContent"?{...re,contents:(ce=re==null?void 0:re.contents)==null?void 0:ce.map(Ee=>(Ee==null?void 0:Ee.prop)===(J==null?void 0:J.prop)?{...Ee,[I]:z}:Ee)}:re})};const $=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:ye}});((ge=$==null?void 0:$.data)==null?void 0:ge.code)===200?(p.ElMessage.success("编辑成功"),Oe.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},Re=async(I,J)=>{await tt("label",J,I)},pe=async(I,J)=>{I&&await tt("type",J,I)},ie=async(I,J,z)=>{await tt(J,z,I,!1)},ue=(I,J)=>{T.value===J?se.value=!1:se.value=!0,T.value=J==null?void 0:J.changeProp},Te=async I=>{var z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;let J=[];if((z=I==null?void 0:I.toString())!=null&&z.includes(".urdf")){if(I.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:I,extension:D(I)}],v.value=!0,x.value=!0;return}if((le=I==null?void 0:I.toString())!=null&&le.includes(".stl")||(F=I==null?void 0:I.toString())!=null&&F.includes(".STL")||(U=I==null?void 0:I.toString())!=null&&U.includes(".obj")||(be=I==null?void 0:I.toString())!=null&&be.includes(".mtl")){const Ze=((oe=I==null?void 0:I.toString())==null?void 0:oe.split(",")).map(Ne=>({url:Ne,extension:D(Ne)}));h.value=Ze,v.value=!1,x.value=!0;return}if((q=I==null?void 0:I.toString())!=null&&q.includes(".stl")||(Q=I==null?void 0:I.toString())!=null&&Q.includes(".STL")||(ae=I==null?void 0:I.toString())!=null&&ae.includes(".obj")||(ge=I==null?void 0:I.toString())!=null&&ge.includes(".mtl")){let Ee,Ze=[],Ne={};if(Array.isArray(I)?Ee=I:Ee=I==null?void 0:I.split(","),Ee==null||Ee.forEach(Ae=>{Ae.includes(".mtl")?Ze.push(Ae):Ne.blob=Ne.blob?Ne.blob+","+Ae:Ae}),(Ze==null?void 0:Ze.length)>0&&(Ne.mtlBlobs=Ze),(ye=(fe=Object.values(Ne))==null?void 0:fe[0])!=null&&ye.includes("http:"))J.push(Ne);else{const Ae=new Blob([Ne.blob],{type:"application/octet-stream;charset=UTF-8"});let me=URL.createObjectURL(Ae),rt="";($=I==null?void 0:I.split("/"))==null||$.forEach((Ue,Ke)=>{var De;Ke===((De=I==null?void 0:I.split("/"))==null?void 0:De.length)-1&&(rt=Ue)}),(re=Ne.blob)!=null&&re.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),V.value=[{name:rt,blobUrl:me}],O.value=!0}}else{const Ee=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ze=await p.axios.get(I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ee.close()}),Ne=new Blob([Ze.data],{type:"application/octet-stream;charset=UTF-8"});let Ae=URL.createObjectURL(Ne),me="";(ce=I==null?void 0:I.split("/"))==null||ce.forEach((rt,Ue)=>{var Ke;Ue===((Ke=I==null?void 0:I.split("/"))==null?void 0:Ke.length)-1&&(me=rt)}),V.value=[{name:me,blobUrl:Ae}],O.value=!0}(J==null?void 0:J.length)>0&&X.setBlobUrls(J)},Ge=()=>{O.value=!1},ft=I=>{var U,be,oe,q;const J=(be=(U=p.cloneDeep(l.itemData))==null?void 0:U.find(Q=>(Q==null?void 0:Q.key)==="formContent"))==null?void 0:be.contents,z=p.cloneDeep(I.content);let le={};z&&((oe=Object.values(z))==null?void 0:oe.length)>0&&((q=Object.values(z))==null||q.forEach((Q,ae)=>{le[J[ae].key]=Q}));const F={content:le,index:l==null?void 0:l.index,buttonName:I==null?void 0:I.buttonName};c("change",F)},g=e.computed(()=>"http://222.92.178.198:62001"),C=async I=>{var fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye;if(!I)return;(ye=(fe=l==null?void 0:l.itemData)==null?void 0:fe.find(Ce=>(Ce==null?void 0:Ce.key)==="parentFormPath"))==null||ye.contents;let J=at.value;(J==null?void 0:J.length)>0&&(J=J==null?void 0:J.map(Ce=>{var je,Qe,M,Se;let $e=(je=Ce==null?void 0:Ce.key)==null?void 0:je.split("/");return(l==null?void 0:l.compName)===($e==null?void 0:$e[0])&&(Qe=d.value)!=null&&Qe.find(ct=>(ct==null?void 0:ct.prop)===($e==null?void 0:$e[1]))&&(Ce.value=(Se=(M=d.value)==null?void 0:M.find(ct=>(ct==null?void 0:ct.prop)===($e==null?void 0:$e[1])))==null?void 0:Se.value),Ce}),Oe.setTableViewContents(J));const z=p.cloneDeep(l.itemData);let le=z==null?void 0:z.map(Ce=>{var $e;return(Ce==null?void 0:Ce.key)==="formContent"&&(($e=Ce.contents)==null||$e.map((je,Qe)=>{var M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et,It,Tt,jt,Rt,qt;return je.type=(Se=(M=d.value)==null?void 0:M.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Se.type,je.options=je!=null&&je.options?je.options:((et=(nt=(ct=je==null?void 0:je.key)==null?void 0:ct.split("$"))==null?void 0:nt[1])==null?void 0:et.length)>0?(dt=(We=da.formGetOptions((ut=(Ie=je==null?void 0:je.key)==null?void 0:Ie.split("$"))==null?void 0:ut[1]))==null?void 0:We.split(","))==null?void 0:dt.map(Ct=>({label:Ct,value:Ct})):[],(ht=je==null?void 0:je.key)!=null&&ht.includes("$")&&(je.key=(Dt=(mt=je==null?void 0:je.key)==null?void 0:mt.split("$"))==null?void 0:Dt[0]),je.signature=(Et=(Mt=d.value)==null?void 0:Mt.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Et.signature,je.isLoginUser=(Tt=(It=d.value)==null?void 0:It.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:Tt.isLoginUser,je.value=(jt=Object.values(I))==null?void 0:jt[Qe],je.isFormColHidden=(qt=(Rt=d.value)==null?void 0:Rt.find(Ct=>(Ct==null?void 0:Ct.prop)===(je==null?void 0:je.prop)))==null?void 0:qt.isFormColHidden,je})),Ce}),F=d.value,U=(re=($=p.cloneDeep(le))==null?void 0:$.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:re.contents;if(F=F==null?void 0:F.map(Ce=>{var $e;return Ce.value=($e=U==null?void 0:U.find((je,Qe)=>((je==null?void 0:je.id)??Qe)===(Ce==null?void 0:Ce.id)))==null?void 0:$e.value,Ce}),!se.value){c("contentChange",{contents:le,index:l.index});return}let be="",oe=(Ze=(Ee=(ce=p.cloneDeep(le))==null?void 0:ce.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:Ee.contents)==null?void 0:Ze.find((Ce,$e)=>{var je,Qe,M;return(Ce==null?void 0:Ce.label)===T.value||$e.toString()===((M=(Qe=(je=T.value)==null?void 0:je.split("t"))==null?void 0:Qe[1])==null?void 0:M.toString())}),q=(Ne=oe==null?void 0:oe.optionUrl)==null?void 0:Ne.menuSelect,Q=!0;if((rt=(me=(Ae=p.cloneDeep(le))==null?void 0:Ae.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:me.contents)==null||rt.forEach(Ce=>{var $e,je,Qe,M,Se,ct;Q&&((Qe=(je=($e=Ce==null?void 0:Ce.optionUrl)==null?void 0:$e.groupSelect)==null?void 0:je[1])!=null&&Qe.includes("["))&&(be=(Se=(M=Ce==null?void 0:Ce.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Se[1],JSON.stringify(q)===JSON.stringify((ct=Ce==null?void 0:Ce.optionUrl)==null?void 0:ct.menuSelect)&&(Q=!1))}),(Ue=oe==null?void 0:oe.optionUrl)!=null&&Ue.menuSelect&&se.value){let Ce=await da.getSelectRow(oe),$e,je=(Ke=oe==null?void 0:oe.optionUrl)==null?void 0:Ke.menuSelect;if(Ce==null||Ce.forEach(Qe=>{var M,Se,ct,nt,et,Ie,ut,We,dt,ht;be===((Se=(M=oe==null?void 0:oe.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Se[1])&&((et=(nt=(ct=oe==null?void 0:oe.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])!=null&&et.includes("["))&&((ht=p.cloneDeep(Qe))==null?void 0:ht[(dt=(We=(ut=(Ie=oe==null?void 0:oe.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:ut[1])==null?void 0:We.replaceAll("[",""))==null?void 0:dt.replaceAll("]","")])===(oe==null?void 0:oe.value)&&($e=Qe)}),$e){let Qe=p.cloneDeep(F);Qe=Qe==null?void 0:Qe.map(Se=>{var ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt;return($e!=null&&$e[Se==null?void 0:Se.label]||$e!=null&&$e[(Ie=(et=(nt=(ct=Se==null?void 0:Se.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Ie.replaceAll("]","")])&&((dt=(We=(ut=Se==null?void 0:Se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:We[1])!=null&&dt.includes("["))&&je!=null&&je.every(Et=>{var It,Tt;return(Tt=(It=Se==null?void 0:Se.optionUrl)==null?void 0:It.menuSelect)==null?void 0:Tt.includes(Et)})&&(Se.value=($e==null?void 0:$e[Se==null?void 0:Se.label])||($e==null?void 0:$e[(Mt=(Dt=(mt=(ht=Se==null?void 0:Se.optionUrl)==null?void 0:ht.groupSelect)==null?void 0:mt[1])==null?void 0:Dt.replaceAll("[",""))==null?void 0:Mt.replaceAll("]","")]),Array.isArray(Se.value)&&Se.value.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(Se.type="Upload")),Se}),Qe=Qe==null?void 0:Qe.map(Se=>{var ct,nt,et;return(ct=Se==null?void 0:Se.optionUrl)!=null&&ct.oldMenuSelect&&(Se.optionUrl.menuSelect=(et=(nt=p.cloneDeep(Se))==null?void 0:nt.optionUrl)==null?void 0:et.oldMenuSelect),Se}),d.value=p.cloneDeep(Qe);let M=p.cloneDeep(Qe);M=M==null?void 0:M.map(Se=>{var ct,nt,et,Ie,ut,We;return(nt=(ct=Se==null?void 0:Se.optionUrl)==null?void 0:ct.menuSelect)!=null&&nt.some(dt=>dt==null?void 0:dt.includes("["))&&(Se.optionUrl.oldMenuSelect=(Ie=(et=p.cloneDeep(Se))==null?void 0:et.optionUrl)==null?void 0:Ie.menuSelect,Se.optionUrl.menuSelect=(We=(ut=Se==null?void 0:Se.optionUrl)==null?void 0:ut.menuSelect)==null?void 0:We.map(dt=>{var ht,mt,Dt,Mt;if(dt!=null&&dt.includes("[")){let Et=(mt=(ht=dt==null?void 0:dt.replaceAll("[","").replaceAll("]",""))==null?void 0:ht.split(":"))==null?void 0:mt[1];dt=(Mt=(Dt=p.cloneDeep(Qe))==null?void 0:Dt.find(It=>(It==null?void 0:It.label)===Et))==null?void 0:Mt.value}return dt})),Se}),d.value=M}else d.value=F;le=le==null?void 0:le.map(Qe=>{var M;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(M=Qe.contents)==null?void 0:M.map(Se=>{var ct,nt,et,Ie;return Se.value=((nt=(ct=d.value)==null?void 0:ct.find(ut=>(ut==null?void 0:ut.label)===(Se==null?void 0:Se.key)))==null?void 0:nt.value)??(Se==null?void 0:Se.value),Se.type=((Ie=(et=d.value)==null?void 0:et.find(ut=>(ut==null?void 0:ut.prop)===(Se==null?void 0:Se.key)))==null?void 0:Ie.type)??(Se==null?void 0:Se.type),Se})),Qe})}se.value=!1,c("contentChange",{contents:le,index:l.index});let ae=[],ge=[];if((_e=p.cloneDeep((De=le==null?void 0:le.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:De.contents))==null||_e.forEach(Ce=>{var $e;Array.isArray(Ce==null?void 0:Ce.value)&&(($e=Ce==null?void 0:Ce.value)!=null&&$e.find(je=>{var Qe;return(Qe=je==null?void 0:je.url)==null?void 0:Qe.includes(".obj")}))&&(ge=Ce==null?void 0:Ce.value)}),(ge==null?void 0:ge.length)>0){const Ce=(Ye=p.cloneDeep(ge))==null?void 0:Ye.filter($e=>{var je;return(je=$e==null?void 0:$e.url)==null?void 0:je.includes(".obj")});Ce==null||Ce.forEach($e=>{var Qe,M,Se,ct;const je=(Qe=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Qe.map(nt=>nt==null?void 0:nt.url);ae.push({objUrl:$e==null?void 0:$e.url,mtlUrls:((M=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:M.length)===1?(ct=(Se=ge==null?void 0:ge.filter(nt=>{var et;return(nt==null?void 0:nt.name)===($e==null?void 0:$e.name)&&((et=nt==null?void 0:nt.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Se[0])==null?void 0:ct.url:je})}),X.setObjUrl(ae)}},K=I=>{if(!I)return;const J=[];let z="";for(let le of I)(le.includes("[")||z.includes("["))&&(z+=le.trim(),p.cloneDeep(z).split("【").length-1===p.cloneDeep(z).split("】").length-1&&p.cloneDeep(z).split("[").length-1===p.cloneDeep(z).split("]").length-1&&(J.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return J},Y=(I,J,z)=>{let le="";const F=J==null?void 0:J.map(U=>{var be;return(be=U==null?void 0:U.value)==null?void 0:be.pageData});return F==null||F.forEach(U=>{var be;(U==null?void 0:U.name)===(I==null?void 0:I[0])&&((be=U==null?void 0:U.compData)==null||be.forEach(oe=>{var q;(oe==null?void 0:oe.key)==="formContent"&&((q=oe==null?void 0:oe.contents)==null||q.forEach(Q=>{var ae;(Q==null?void 0:Q.prop)===(I==null?void 0:I[1])&&(le=(Q==null?void 0:Q.value)===""?ze.judgeContents((ae=p.cloneDeep(Q))==null?void 0:ae.optionUrl,z):Q==null?void 0:Q.value)}))}))}),le},w=(I,J,z,le)=>{var oe,q;let F="",U="";(oe=p.cloneDeep(J))==null||oe.forEach((Q,ae)=>{Q!=null&&Q.includes("[")?U=U+R.value+I[ae]:U=U===""?U+Q:U+"/"+Q});let be=(q=le[U])==null?void 0:q.map(Q=>{var ae;return(ae=Q==null?void 0:Q.value)==null?void 0:ae.pageData});return be==null||be.forEach(Q=>{var ae;(Q==null?void 0:Q.name)===(z==null?void 0:z[0])&&((ae=Q==null?void 0:Q.compData)==null||ae.forEach(ge=>{var fe;(ge==null?void 0:ge.key)==="formContent"&&((fe=ge==null?void 0:ge.contents)==null||fe.forEach(ye=>{(ye==null?void 0:ye.prop)===(z==null?void 0:z[1])&&(F=ye==null?void 0:ye.value)}))}))}),F};return e.watch(()=>l.itemData,async()=>{var be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke;const I=(be=l.itemData)==null?void 0:be.find(De=>(De==null?void 0:De.key)==="formContent"),J=(oe=p.cloneDeep(l.itemData))==null?void 0:oe.find(De=>(De==null?void 0:De.key)==="formButton"),z=(q=p.cloneDeep(l.itemData))==null?void 0:q.find(De=>(De==null?void 0:De.key)==="formFlex"),le=(Q=p.cloneDeep(l.itemData))==null?void 0:Q.find(De=>(De==null?void 0:De.key)==="formWrap"),F=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(De=>(De==null?void 0:De.key)==="enableWrap");if((le==null?void 0:le.contents)==="纵向"?_.value=!1:_.value=!0,y.value=(F==null?void 0:F.contents)===void 0?!1:F==null?void 0:F.contents,L.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((ge=z==null?void 0:z.contents)==null?void 0:ge.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((fe=I==null?void 0:I.contents)==null?void 0:fe.length)>0&&Array.isArray(I==null?void 0:I.contents)){let De=l.allMapContents;const _e=($=(ye=p.cloneDeep(I))==null?void 0:ye.contents)==null?void 0:$.map((M,Se)=>{var Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In,mn,Gn,Xn,Yn,$n,Bn,yn,On,An,an,Dn,Jn;let ct=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",nt=(M==null?void 0:M.type)??"",et=(M==null?void 0:M.options)??[];if((Et=M==null?void 0:M.key)!=null&&Et.includes("$")&&(ct=(It=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:It[0],((jt=(Tt=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Tt[1])==null?void 0:jt.length)>0)){const[kt,Jt]=(qt=(Rt=p.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Rt[1])==null?void 0:qt.split(/[()]/);nt=((Ct=ze.FormType.find(gt=>(gt==null?void 0:gt.key)===kt))==null?void 0:Ct.value)??"",((xn=Jt==null?void 0:Jt.split(","))==null?void 0:xn.length)>0&&(et=(hn=Jt==null?void 0:Jt.split(","))==null?void 0:hn.map(gt=>({label:gt,value:gt})))}let Ie=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Ie=(Sn=(wn=M==null?void 0:M.contents)==null?void 0:wn.split(","))==null?void 0:Sn.map(kt=>({label:kt,value:kt}))),((vn=M==null?void 0:M.optionUrl)==null?void 0:vn.selectRelateType)==="自定义绑定"&&(Ie=(gn=(Tn=M==null?void 0:M.optionUrl)==null?void 0:Tn.defaultSelect)==null?void 0:gn.map(kt=>({label:kt,value:kt})));let ut=!1,We=(M==null?void 0:M.isFormColHidden)??!1,dt=ze.judgeContents((In=p.cloneDeep(M))==null?void 0:In.optionUrl,De),ht=dt!==void 0&&dt!==""?dt:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(et==null?void 0:et.length)>0?(mn=et==null?void 0:et[0])==null?void 0:mn.value:(M==null?void 0:M.value)??"",mt=!1,Dt=dt!==void 0||nt===""?"Input":nt;if((Array.isArray(dt)&&(dt!=null&&dt.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url)))||Array.isArray(ht)&&(ht!=null&&ht.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url))))&&(Dt="upload"),typeof ht=="string"&&(ht!=null&&ht.includes("loginUser"))&&!(ht!=null&&ht.includes("loginUserSign"))||M!=null&&M.isLoginUser)ut=!0,ht=((Gn=A.value)==null?void 0:Gn.姓名)||((Xn=A.value)==null?void 0:Xn.account)||((Yn=A.value)==null?void 0:Yn.账号)||(($n=A.value)==null?void 0:$n.userName);else if(typeof ht=="string"&&(ht!=null&&ht.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(mt=!0,(M==null?void 0:M.isShow)==="originalSignature")Dt="image",ht=g.value+"/"+((Bn=A.value)==null?void 0:Bn.signature);else{let kt=[...new Set(K(M.isShow))].map(zt=>{var Mn,on,Cn,Zt;return{key:(Zt=(Cn=(on=(Mn=zt==null?void 0:zt.split("["))==null?void 0:Mn[1])==null?void 0:on.split("]"))==null?void 0:Cn[0])==null?void 0:Zt.split(":"),value:""}});(yn=Be.value)==null||yn.forEach(zt=>{kt==null||kt.forEach((cn,Mn)=>{var Cn;let on=cn==null?void 0:cn.key;(zt==null?void 0:zt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Cn=zt==null?void 0:zt.compData)==null||Cn.forEach(Zt=>{var jn;(Zt==null?void 0:Zt.key)==="formContent"&&((jn=Zt==null?void 0:Zt.contents)==null||jn.forEach(Bt=>{(Bt==null?void 0:Bt.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(kt[Mn].value=Bt==null?void 0:Bt.value)}))}))})});let Jt=kt==null?void 0:kt.map(zt=>{var cn;return zt.key="["+((cn=zt.key)==null?void 0:cn.join(":"))+"]",zt}),gt=M==null?void 0:M.isShow;Jt==null||Jt.forEach(zt=>{zt!=null&&zt.value?gt=gt.replaceAll(zt==null?void 0:zt.key,"'"+(zt==null?void 0:zt.value)+"'"):gt=gt.replaceAll(zt==null?void 0:zt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((On=gt==null?void 0:gt.split("==="))==null?void 0:On[0])+"==='"+((An=gt==null?void 0:gt.split("==="))==null?void 0:An[1])+"'":gt=((an=gt==null?void 0:gt.split("="))==null?void 0:an[0])+"='"+((Dn=gt==null?void 0:gt.split("="))==null?void 0:Dn[1])+"'"),gt!=null&&gt.includes("=")&&!(gt!=null&&gt.includes("=="))&&!(gt!=null&&gt.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(We=!1,Dt="image",ht=g.value+"/"+((Jn=A.value)==null?void 0:Jn.signature)):ht=""}return Array.isArray(ht)&&ht.every(kt=>(kt==null?void 0:kt.url)&&(kt==null?void 0:kt.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Dt="Url"),{label:ct??"",name:"t"+Se,prop:p.cloneDeep(M==null?void 0:M.key),type:Dt,value:M!=null&&M.isNewDate&&ht===""?new Date:ht,id:(M==null?void 0:M.id)??Se,contents:(Ie==null?void 0:Ie.length)>0?Ie:et??[],width:(M==null?void 0:M.width)??1,isLoginUser:ut,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:We,signature:mt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1}}),Ye=_e==null?void 0:_e.map(M=>M==null?void 0:M.value);let Ce="";Ye==null||Ye.forEach(M=>{M!==""&&M!==void 0&&(Ce=Ce===""?M:Ce+"/"+M)}),P.setSelectArray(Ye),P.setSelectString(Ce);let $e=(re=p.cloneDeep(_e))==null?void 0:re.map(M=>(M!=null&&M.value&&ze.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));$e=$e==null?void 0:$e.map(M=>{var Se,ct,nt,et,Ie,ut,We,dt;if((ct=(Se=M==null?void 0:M.optionUrl)==null?void 0:Se.menuSelect)!=null&&ct.some(ht=>ht==null?void 0:ht.includes("["))){let ht="";M.optionUrl.oldMenuSelect=(et=(nt=p.cloneDeep(M))==null?void 0:nt.optionUrl)==null?void 0:et.menuSelect,M.optionUrl.menuSelect=(ut=(Ie=M==null?void 0:M.optionUrl)==null?void 0:Ie.menuSelect)==null?void 0:ut.map(mt=>{var Dt,Mt,Et,It,Tt,jt;if(mt!=null&&mt.includes("[")){let Rt=(Mt=(Dt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:Dt.split(":"))==null?void 0:Mt[1];ht=Y((Et=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:Et.split(":"),De==null?void 0:De[ot.value],De),mt=((Tt=(It=p.cloneDeep($e))==null?void 0:It.find(qt=>(qt==null?void 0:qt.label)===Rt))==null?void 0:Tt.value)||Y((jt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:jt.split(":"),De==null?void 0:De[ot.value],De)}return mt}),ht!==""&&M.value===""&&(M.value=w(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(We=M==null?void 0:M.optionUrl)==null?void 0:We.groupSelect,De),Array.isArray(M.value)&&((dt=M.value)!=null&&dt.every(mt=>mt==null?void 0:mt.url))&&(M.type="UPLOAD"))}return M}),d.value=$e,de.value=((ce=d.value)==null?void 0:ce.every(M=>M==null?void 0:M.disabled))||B.value===ot.value,ne.value=(Ee=d.value)==null?void 0:Ee.every(M=>M==null?void 0:M.operable),ve.value=(Ze=d.value)==null?void 0:Ze.map(M=>M==null?void 0:M.label);let je=[],Qe=[];if((Ne=p.cloneDeep(d.value))==null||Ne.forEach(M=>{var Se;Array.isArray(M==null?void 0:M.value)&&((Se=M==null?void 0:M.value)!=null&&Se.find(ct=>{var nt;return(nt=ct==null?void 0:ct.url)==null?void 0:nt.includes(".obj")}))&&(Qe=M==null?void 0:M.value)}),(Qe==null?void 0:Qe.length)>0){const M=(Ae=p.cloneDeep(Qe))==null?void 0:Ae.filter(Se=>{var ct;return(ct=Se==null?void 0:Se.url)==null?void 0:ct.includes(".obj")});M==null||M.forEach(Se=>{var nt,et,Ie,ut;const ct=(nt=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:nt.map(We=>We==null?void 0:We.url);je.push({objUrl:Se==null?void 0:Se.url,mtlUrls:((et=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:et.length)===1?(ut=(Ie=Qe==null?void 0:Qe.filter(We=>{var dt;return(We==null?void 0:We.name)===(Se==null?void 0:Se.name)&&((dt=We==null?void 0:We.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:ut.url:ct})}),X.setObjUrl(je)}(me=p.cloneDeep(d.value))==null||me.forEach(M=>{var Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et;if((ct=(Se=M==null?void 0:M.value)==null?void 0:Se.toString())!=null&&ct.includes(".stl")||(et=(nt=M==null?void 0:M.value)==null?void 0:nt.toString())!=null&&et.includes(".STL")||(ut=(Ie=M==null?void 0:M.value)==null?void 0:Ie.toString())!=null&&ut.includes(".obj")||(dt=(We=M==null?void 0:M.value)==null?void 0:We.toString())!=null&&dt.includes(".mtl")||(mt=(ht=M==null?void 0:M.value)==null?void 0:ht.toString())!=null&&mt.includes(".urdf")){let It={},Tt=[],jt;Array.isArray(M==null?void 0:M.value)?jt=M==null?void 0:M.value:jt=(Dt=M==null?void 0:M.value)==null?void 0:Dt.split(","),jt==null||jt.forEach(Rt=>{Rt.includes(".mtl")?Tt.push(Rt):It.blob=It.blob==="undefined"?Rt:It.blob+","+Rt}),(Tt==null?void 0:Tt.length)>0&&(It.mtlBlobs=Tt),(Et=(Mt=Object.values(It))==null?void 0:Mt[0])!=null&&Et.includes("http:")}})}else d.value=[];let U=at.value;if((U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(De=>{var Ye,Ce,$e,je;let _e=(Ye=De==null?void 0:De.key)==null?void 0:Ye.split("/");return(l==null?void 0:l.compName)===(_e==null?void 0:_e[0])&&(Ce=d.value)!=null&&Ce.find(Qe=>(Qe==null?void 0:Qe.prop)===(_e==null?void 0:_e[1]))&&(De.value=(je=($e=d.value)==null?void 0:$e.find(Qe=>(Qe==null?void 0:Qe.prop)===(_e==null?void 0:_e[1])))==null?void 0:je.value),De}),Oe.setTableViewContents(U)),l!=null&&l.formRules)E.value=l==null?void 0:l.formRules;else{let De={};(rt=p.cloneDeep(d).value)==null||rt.forEach(_e=>{(_e==null?void 0:_e.isMain)===!0&&(De[(_e==null?void 0:_e.prop)??(_e==null?void 0:_e.name)]=[{required:!0,message:`${(_e==null?void 0:_e.prop)||(_e==null?void 0:_e.name)}不能为空`}])}),E.value=De}if(((Ue=J==null?void 0:J.contents)==null?void 0:Ue.length)>0){const De=[];(Ke=J==null?void 0:J.contents)==null||Ke.forEach((_e,Ye)=>{(_e==null?void 0:_e.label)!==""&&De.push({label:(_e==null?void 0:_e.label)??"",id:(_e==null?void 0:_e.id)??Ye,type:(_e==null?void 0:_e.type)??"",background:_e==null?void 0:_e.background})}),H.value=De}else H.value=[]},{deep:!0,immediate:!0}),e.watch(()=>B.value,I=>{de.value=I===ot.value},{immediate:!0}),(I,J)=>{const z=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-switch"),F=e.resolveComponent("el-checkbox"),U=e.resolveComponent("el-popover"),be=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Qr,[e.createVNode(Vt.ssForm,{rowContents:d.value,formRules:E.value,buttonValue:H.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:ft,onChange:C,formDisabled:de.value,formLabelsOperable:ne.value,isButtonRow:_.value,onPreview:Te,onBlurChange:ue,onHandleColEditChange:Re,onHandleColTypeChange:pe,onRouteUrl:ee,onClickTrigger:it},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:q,formLabelsOperable:Q})=>[e.createVNode(U,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Je},{reference:e.withCtx(()=>[e.createElementVNode("span",Zr,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ei,[J[1]||(J[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(le,{"model-value":q,"active-text":"禁用","inactive-text":"",onChange:Me,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(le,{"model-value":Q,"active-text":"编辑所有标签","inactive-text":"",onChange:Ve},null,8,["model-value"]),J[2]||(J[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(be,{modelValue:ve.value,"onUpdate:modelValue":J[0]||(J[0]=ae=>ve.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:He},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(F,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(U,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ge;return[e.createElementVNode("div",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=Object.keys(ae))==null?void 0:ge.filter(fe=>{var ye;return(ye=xe.value)==null?void 0:ye.find($=>($==null?void 0:$.value)===fe)}),fe=>{var ye,$;return e.openBlock(),e.createElementBlock("div",{key:fe},[e.createVNode(Vt._sfc_main$1,{value:ae==null?void 0:ae[fe],"active-text":($=(ye=xe.value)==null?void 0:ye.find(re=>(re==null?void 0:re.value)===fe))==null?void 0:$.label,inactiveText:"",onChange:re=>ie(re,fe,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(z,{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"]),O.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:V.value,onDestroy:Ge},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Vo.ThreeViewerHost,{files:h.value,onGetAnimationData:I.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Lo=Ft._export_sfc(ai,[["__scopeId","data-v-e237c271"]]),qa=e.ref(0),Cl=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Cl(l==null?void 0:l.children)},l))},oi=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Cl(l==null?void 0:l.children)},l))},El=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,i),l)),a)},_l=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,i),l)),a)},Sl=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,i),l)),a)},Tl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=Tl(l==null?void 0:l.children,i),l)),a)},Nt=[{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"}],ri=[{label:"新增",value:"add"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ri},{key:"background",label:"按钮背景色",type:"Color"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],ii={class:"table-header-child"},si={class:"table-header-child-main"},ci={class:"table-header-child-content"},ui={class:"table-header-child-content-item"},pi={class:"fix-button"},di={key:0},fi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=ze.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=y=>{var k;c.value=!0;let L=[];Nt==null||Nt.forEach(A=>{let T=p.cloneDeep(v.value)+1;x.setTableIndex(T),L.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:y[A.key],id:v.value,contents:A==null?void 0:A.options})}),y!=null&&y.children&&((k=y==null?void 0:y.children)==null?void 0:k.length)>0&&L.push({children:y==null?void 0:y.children,isFormColHidden:!0}),h.value=y==null?void 0:y.id,D.value=L,E.value=L},O=y=>{l("fixChange",p.cloneDeep(y))},H=y=>{l("deleteChange",p.cloneDeep(y))},V=y=>{c.value=!0;let L=[];Nt==null||Nt.forEach(k=>{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),L.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=y==null?void 0:y.id,D.value=L,E.value=L},ke=y=>{let L=p.cloneDeep(E.value);L=L==null?void 0:L.map(k=>(k.children||(k.value=y==null?void 0:y[k.name]),k)),E.value=L},W=()=>{var L,k;D.value=E.value;let y={};if(h.value!=="")y.id=h.value,(L=D.value)==null||L.forEach(A=>{const T=Nt==null?void 0:Nt.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));T?y[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"fix"});else{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),y.id="id"+v.value,(k=D.value)==null||k.forEach(T=>{const se=Nt==null?void 0:Nt.find(Oe=>(Oe==null?void 0:Oe.label)===(T==null?void 0:T.label));se?y[se.key]=T.value:T!=null&&T.children&&T.children.length>0&&(y.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},P=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},X=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",y),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(y,L)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",ui,e.toDisplayString(A.label),1),e.createElementVNode("div",pi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>X(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",di,[e.createVNode(Il,{tableChildContents:A==null?void 0:A.children,onDeleteChange:H,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",fi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:W},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},vi=Ft._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),gi={class:"table-header-child"},mi={class:"table-header-child-main"},yi={class:"table-header-child-content"},bi={class:"table-header-child-content-item"},ki={class:"fix-button"},xi={key:0},wi={class:"form-content"},Di={class:"dialog-footer"},Ci={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=ze.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=y=>{l("fixChange",p.cloneDeep(y))},O=y=>{var k;c.value=!0;let L=[];Nt==null||Nt.forEach(A=>{let T=p.cloneDeep(v.value)+1;x.setTableIndex(T),L.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:y[A.key],id:v.value,contents:A==null?void 0:A.options})}),y!=null&&y.children&&((k=y==null?void 0:y.children)==null?void 0:k.length)>0&&L.push({children:y==null?void 0:y.children,isFormColHidden:!0}),h.value=y==null?void 0:y.id,D.value=L,E.value=L},H=y=>{c.value=!0;let L=[];Nt==null||Nt.forEach(k=>{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),L.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=y==null?void 0:y.id,D.value=L,E.value=L},V=y=>{let L=p.cloneDeep(E.value);L=L==null?void 0:L.map(k=>(k.children||(k.value=y==null?void 0:y[k.name]),k)),E.value=L},ke=()=>{var L,k;D.value=E.value;let y={};if(h.value!=="")y.id=h.value,(L=D.value)==null||L.forEach(A=>{const T=Nt==null?void 0:Nt.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));T?y[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"fix"});else{let A=p.cloneDeep(v.value)+1;x.setTableIndex(A),y.id="idChild"+v.value,(k=D.value)==null||k.forEach(T=>{const se=Nt==null?void 0:Nt.find(Oe=>(Oe==null?void 0:Oe.label)===(T==null?void 0:T.label));se?y[se.key]=T.value:T!=null&&T.children&&T.children.length>0&&(y.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(y),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},W=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},P=y=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",y),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},X=y=>{l("deleteChange",y)};return(y,L)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,se)=>(e.openBlock(),e.createElementBlock("div",mi,[e.createElementVNode("div",yi,[e.createElementVNode("div",bi,e.toDisplayString(T.label),1),e.createElementVNode("div",ki,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>H(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>O(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>P(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",xi,[e.createVNode(vi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:X,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",wi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Di,[e.createVNode(A,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>L[0]||(L[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>L[1]||(L[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Il=Ft._export_sfc(Ci,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},_i={class:"table-operate-item"},Si={class:"operate-title"},Ti={class:"operate-content"},Ii={class:"fix-content"},Bi={class:"fix-content-label"},Ai={class:"fix-button"},Ni={key:0},Vi={class:"operate-title"},Oi={class:"operate-content"},Mi={class:"fix-content"},zi={class:"fix-content-label"},Ri={class:"fix-button"},Li={class:"operate-title"},Fi={class:"operate-content"},Pi={class:"fix-content"},$i={class:"fix-content-label"},ji={class:"fix-button"},Ki={class:"operate-title"},Ui={class:"operate-content"},Wi={class:"fix-content"},Hi={class:"fix-content-label"},qi={class:"fix-button"},Gi={class:"operate-content"},Xi={style:{display:"flex","justify-content":"space-between"}},Yi={class:"form-content"},Ji={class:"dialog-footer"},Qi={class:"form-content"},Zi={class:"dialog-footer"},es={class:"form-content"},ts={class:"dialog-footer"},ns={class:"form-content"},as={class:"dialog-footer"},os={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),v=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),O=e.ref(""),H=e.ref(""),V=e.ref([]),ke=e.ref([]),W=e.ref([]),P=e.ref([]),X=e.ref(!1),y=e.ref([]),L=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),se=e.ref([]),Oe=()=>{X.value=!0;let g=[];Rn==null||Rn.forEach(C=>{k.value++,g.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:k.value,contents:C==null?void 0:C.options})}),y.value=g,L.value=g},at=()=>{var C,K,Y;x.value=!0;let g=[];(Y=(K=(C=ze.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:K.value)==null||Y.forEach(w=>{k.value++,g.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:k.value,contents:w==null?void 0:w.options})}),A.value=g,T.value=g},Be=g=>{g||(A.value=T.value)},Fe=async g=>{var C,K,Y,w,I,J,z,le,F,U,be,oe;if((g==null?void 0:g.类型)!==((K=(C=T.value)==null?void 0:C.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:K.value)){let q=[],Q=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:w.value)==null?void 0:I.value)?await((U=(F=(le=ze.FormContent)==null?void 0:le.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:F.value)==null?void 0:U.value):(z=(J=ze.FormContent)==null?void 0:J.find(ae=>(ae==null?void 0:ae.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:z.value;if(Q==null||Q.forEach(ae=>{k.value++,q.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label),type:ae.type,value:ae!=null&&ae.属性名?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):(g==null?void 0:g[ae.label])??"",id:k.value,contents:ae==null?void 0:ae.options,prop:(ae==null?void 0:ae.prop)||(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label)})}),g!=null&&g.菜单选项&&((be=g==null?void 0:g.菜单选项)==null?void 0:be.length)>0){const ae=await ze.menuToContentType(g==null?void 0:g.菜单选项);q=q==null?void 0:q.map(ge=>((ge==null?void 0:ge.name)==="组信息选项"&&(ge.contents=ae),ge))}T.value=await ze.selectToBase(p.cloneDeep(q)),A.value=await ze.selectToBase(p.cloneDeep(q))}else{let q=p.cloneDeep(A.value);if(q=q==null?void 0:q.map(Q=>(Q.value=g==null?void 0:g[Q.name],Q)),g!=null&&g.菜单选项&&((oe=g==null?void 0:g.菜单选项)==null?void 0:oe.length)>0){const Q=await ze.menuToContentType(g==null?void 0:g.菜单选项);q=q==null?void 0:q.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Q),ae))}q=ze.formToOptionsContents(q),T.value=await ze.selectToBase(p.cloneDeep(q))}},he=async g=>{await Fe(g),A.value=T.value},B=(g,C)=>{if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="selectRelateType"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.selectRelateType)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="menuSelect"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.menuSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="groupSelect"){const K=C==null?void 0:C.optionUrl;return(K==null?void 0:K.groupSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="originalContent")return(C==null?void 0:C.value)||C[g.key];if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="multiple"){const K=C[g.key];return wl(K)?K:g.default}return(g==null?void 0:g.label)==="类型"&&C[g.key]===""?"Input":(g==null?void 0:g.key)==="isFormColHidden"&&!C[g.key]?!1:C[g.key]},te=async g=>{var Y,w,I,J,z,le,F,U,be;x.value=!0;let C=[];const K=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:w.value)==null?void 0:I.value)?await((U=(F=(le=ze.FormContent)==null?void 0:le.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:F.value)==null?void 0:U.value):(z=(J=ze.FormContent)==null?void 0:J.find(oe=>(oe==null?void 0:oe.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:z.value;if(K==null||K.forEach(oe=>{k.value++,C.push({label:oe==null?void 0:oe.label,name:(oe==null?void 0:oe.name)||(oe==null?void 0:oe.label),type:oe.type,value:(oe==null?void 0:oe.label)==="属性名"?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):B(oe,g),id:k.value,contents:oe==null?void 0:oe.options})}),g!=null&&g.menuSelect&&((be=g==null?void 0:g.menuSelect)==null?void 0:be.length)>0){const oe=await ze.menuToContentType(g==null?void 0:g.menuSelect);C=C==null?void 0:C.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=oe),q))}O.value=g==null?void 0:g.id,A.value=await ze.selectToBase(ze.formToOptionsContents(C)),T.value=await ze.selectToBase(ze.formToOptionsContents(C))},ne=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;se.value=(C=p.cloneDeep(se.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=se.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{x.value=!1,A.value=[],O.value=""},Xe=async()=>{var Y,w,I,J,z,le,F,U,be,oe;A.value=T.value;let g={};O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value);let C=await((I=(w=(Y=ze.FormContent)==null?void 0:Y.find(q=>{var Q,ae;return(q==null?void 0:q.key)===(((ae=(Q=A.value)==null?void 0:Q.find(ge=>(ge==null?void 0:ge.label)==="类型"))==null?void 0:ae.value)??"label")}))==null?void 0:w.value)==null?void 0:I.value)??((z=(J=ze.FormContent)==null?void 0:J.find(q=>{var Q,ae;return(q==null?void 0:q.key)===(((ae=(Q=A.value)==null?void 0:Q.find(ge=>(ge==null?void 0:ge.label)==="类型"))==null?void 0:ae.value)??"label")}))==null?void 0:z.value);if((le=A.value)==null||le.forEach(q=>{const Q=C==null?void 0:C.find(ae=>(ae==null?void 0:ae.label)===(q==null?void 0:q.label));Q&&(g[Q.key]=q.value)}),g.name=g.label,(F=se.value)!=null&&F.find(q=>q.id===g.id))se.value=(U=se.value)==null?void 0:U.map(q=>(q.id===g.id&&(q=g),q));else{let q=p.cloneDeep(se.value);se.value||(se.value=[]),q.push(g),se.value=q}se.value=se.value.map(({id:q,...Q})=>Q),x.value=!1,O.value="";let K=p.cloneDeep(s.originalItemContents);(be=p.cloneDeep(s.originalItemContents))!=null&&be.find(q=>(q==null?void 0:q.key)==="tableToForm")?K=(oe=p.cloneDeep(s.originalItemContents))==null?void 0:oe.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=se.value),q)):K.push({key:"tableToForm",contents:se.value}),l("change",K)},ot=g=>{X.value=!0;let C=[];Rn==null||Rn.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:g[K.key],id:k.value,contents:K==null?void 0:K.options})}),O.value=g==null?void 0:g.id,y.value=C,L.value=C};e.watch(()=>E.value,()=>{var C,K;let g=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?g=(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):g.push({key:"page",contents:E.value}),l("change",g)},{deep:!0});const G=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;ke.value=(C=p.cloneDeep(ke.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=ke.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>{var K,Y,w,I,J;y.value=L.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=y.value)==null||K.forEach(z=>{const le=Rn==null?void 0:Rn.find(F=>(F==null?void 0:F.label)===(z==null?void 0:z.label));le?g[le.key]=z.value:z!=null&&z.children&&z.children.length>0&&(g.children=z.children)}),(Y=ke.value)!=null&&Y.find(z=>z.id===g.id))ke.value=(w=ke.value)==null?void 0:w.map(z=>(z.id===g.id&&(z=g),z));else{let z=p.cloneDeep(ke.value)??[];z.push(g),ke.value=z}X.value=!1,O.value="";let C=p.cloneDeep(s.originalItemContents);(I=p.cloneDeep(s.originalItemContents))!=null&&I.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(J=p.cloneDeep(s.originalItemContents))==null?void 0:J.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=ke.value),z)):C.push({key:"extraButton",contents:ke.value}),l("change",C)},ve=g=>{let C=p.cloneDeep(L.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),L.value=C},xe=()=>{X.value=!1,y.value=[],O.value=""},Me=g=>{h.value=!0;let C=[];Ln==null||Ln.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:g[K.key],id:k.value,contents:K==null?void 0:K.options})}),O.value=g==null?void 0:g.id,W.value=C,P.value=C},Ve=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=V.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Je=()=>{d.value=!0;let g=[];Nt==null||Nt.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=g,_.value=g},He=()=>{h.value=!0;let g=[];Ln==null||Ln.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),W.value=g,P.value=g},it=g=>{let C=p.cloneDeep(P.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),P.value=C},ee=()=>{var K,Y,w,I,J;W.value=P.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=W.value)==null||K.forEach(z=>{const le=Ln==null?void 0:Ln.find(F=>(F==null?void 0:F.label)===(z==null?void 0:z.label));le?g[le.key]=z.value:z!=null&&z.children&&z.children.length>0&&(g.children=z.children)}),(Y=V.value)!=null&&Y.find(z=>z.id===g.id))V.value=(w=V.value)==null?void 0:w.map(z=>(z.id===g.id&&(z=g),z));else{let z=p.cloneDeep(V.value);z.push(g),V.value=z}h.value=!1,O.value="";let C=p.cloneDeep(s.originalItemContents);(I=p.cloneDeep(s.originalItemContents))!=null&&I.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(J=p.cloneDeep(s.originalItemContents))==null?void 0:J.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=V.value),z)):C.push({key:"rowButton",contents:V.value}),l("change",C)},st=()=>{h.value=!1,O.value="",P.value=[],W.value=[]},tt=g=>{d.value=!0;let C=[];Nt==null||Nt.forEach(K=>{k.value++,C.push({label:K==null?void 0:K.label,name:K==null?void 0:K.label,type:K.type,value:"",id:k.value,contents:K==null?void 0:K.options})}),D.value=C,H.value=g==null?void 0:g.id,_.value=C},Re=g=>{var C;v.value=El(p.cloneDeep(v.value),g==null?void 0:g.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(K=>{var Y;return(K==null?void 0:K.key)==="header"&&(K.contents=(Y=v.value)!=null&&Y.some(w=>w==null?void 0:w.children)?[v.value]:v.value),K}))},pe=g=>{var K,Y,w;g.type==="fix"?g.id!==""?v.value=Sl(v.value,g):v.value=_l(v.value,g==null?void 0:g.contents):v.value=Tl(v.value,g),v.value=(K=v.value)!=null&&K.some(I=>I==null?void 0:I.children)?[v.value]:v.value,O.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(I=>(I==null?void 0:I.key)==="header")?C=(w=p.cloneDeep(s.originalItemContents))==null?void 0:w.map(I=>((I==null?void 0:I.key)==="header"&&(I.contents=v.value),I)):C.push({key:"header",contents:v.value}),l("change",C)},ie=g=>{var K;d.value=!0;let C=[];Nt==null||Nt.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:g[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),g!=null&&g.children&&((K=g==null?void 0:g.children)==null?void 0:K.length)>0&&C.push({children:g==null?void 0:g.children,isFormColHidden:!0}),O.value=g==null?void 0:g.id,H.value="",D.value=C,_.value=C},ue=g=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(K=>(K.children||(K.value=g==null?void 0:g[K.name]),K)),_.value=C},Te=()=>{d.value=!1,O.value="",H.value="",_.value=[]},Ge=()=>{var K,Y,w,I,J,z;D.value=_.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(K=D.value)==null||K.forEach(le=>{const F=Nt==null?void 0:Nt.find(U=>(U==null?void 0:U.label)===(le==null?void 0:le.label));F?g[F.key]=le.value:le!=null&&le.children&&le.children.length>0&&(g.children=le.children)}),(Y=v.value)!=null&&Y.find(le=>le.id===g.id))v.value=(w=v.value)==null?void 0:w.map(le=>(le.id===g.id&&(le=g),le));else{let le=p.cloneDeep(v.value)??[];H.value===""?le.push(g):le=le==null?void 0:le.map(F=>(F.id===H.value&&(F.children||(F.children=[]),F.children.push(g)),F)),v.value=le}v.value=(I=v.value)!=null&&I.some(le=>le==null?void 0:le.children)?[v.value]:v.value,d.value=!1,O.value="",H.value="";let C=p.cloneDeep(s.originalItemContents);(J=p.cloneDeep(s.originalItemContents))!=null&&J.find(le=>(le==null?void 0:le.key)==="header")?C=(z=p.cloneDeep(s.originalItemContents))==null?void 0:z.map(le=>((le==null?void 0:le.key)==="header"&&(le.contents=v.value),le)):C.push({key:"header",contents:v.value}),l("change",C)},ft=g=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,K;v.value=(C=p.cloneDeep(v.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(g==null?void 0:g.id)),l("change",(K=p.cloneDeep(s.originalItemContents))==null?void 0:K.map(Y=>{var w;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(w=v.value)!=null&&w.some(I=>I==null?void 0:I.children)?[v.value]:v.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),v.value=(C=(g=c.value)==null?void 0:g.find($=>($==null?void 0:$.key)==="header"))==null?void 0:C.contents,V.value=(Y=(K=c.value)==null?void 0:K.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:Y.contents,ke.value=(I=(w=c.value)==null?void 0:w.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:I.contents,E.value=(z=(J=c.value)==null?void 0:J.find($=>($==null?void 0:$.key)==="page"))!=null&&z.contents?!!((F=(le=c.value)==null?void 0:le.find($=>($==null?void 0:$.key)==="page"))!=null&&F.contents):!1,se.value=(be=(U=c.value)==null?void 0:U.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:be.contents,v.value=(oe=v.value)==null?void 0:oe.map(($,re)=>(Array.isArray($)?$=oi($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??re,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),v.value=(q=v.value)!=null&&q.every($=>Array.isArray($))?(Q=v.value)==null?void 0:Q[0]:v.value,V.value=(ae=V.value)==null?void 0:ae.map(($,re)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??re}),ke.value=(ge=ke.value)==null?void 0:ge.map(($,re)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??re}),se.value)se.value=(ye=se.value)==null?void 0:ye.map($=>{k.value++;let re=$;return re.id=k.value,re});else{let $=[];const re=(fe=ze.getColumnChild(p.cloneDeep(v.value)))==null?void 0:fe.filter(ce=>(ce==null?void 0:ce.prop)!=="operate");re==null||re.forEach(ce=>{var Ee;k.value++,$.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.label),type:ce!=null&&ce.groupSelect?"Select":"Input",value:"",id:k.value,contents:ce==null?void 0:ce.options,menuSelect:ce==null?void 0:ce.formMenuSelect,groupSelect:(Ee=ce==null?void 0:ce.groupSelect)==null?void 0:Ee.split(":"),selectRelateType:"关联绑定列"})}),se.value=$}},{deep:!0,immediate:!0}),(g,C)=>{const K=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",_i,[e.createElementVNode("div",Si,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Je,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Ii,[e.createElementVNode("div",Bi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(K,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>tt(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ie(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ft(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Ni,[e.createVNode(Il,{tableChildContents:w==null?void 0:w.children,onDeleteChange:Re,onFixChange:pe},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Vi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:He},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Mi,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ri,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>Me(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>Ve(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Li,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Oe},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Pi,[e.createElementVNode("div",$i,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>ot(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>G(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ki,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(K,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(w,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",Wi,[e.createElementVNode("div",Hi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",qi,[e.createVNode(K,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:J=>te(w)},null,8,["onClick"]),e.createVNode(K,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>ne(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",Gi,[e.createElementVNode("div",Xi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Vt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=w=>E.value=w)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(Y,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:st,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:W.value,key:W.value,isEnableWrap:!0,onChange:it},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(Y,{onClick:st,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:X.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",es,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ts,[e.createVNode(Y,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:R,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Fe,onChangeVisible:Be,onBlurChange:he},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(Y,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Ft._export_sfc(os,[["__scopeId","data-v-7a6b87b5"]]),rs=Kt.useModelComp(p.pinia),{pageMapState:is}=p.storeToRefs(rs),ss=Kt.useMenuState(p.pinia),{activeMenuPath:cs}=p.storeToRefs(ss),us=e.ref(24),ps=e.ref(6),ds=e.ref(70),fs=e.ref(.18),hs=e.ref(45),vs=(a,i,s,l)=>{var c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((v=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:v.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||us.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:((H=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:H.minW)||ps.value,minH:((ke=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ke.minH)||fs.value,maxH:((P=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:P.maxH)||hs.value,i:((y=(X=a==null?void 0:a.value)==null?void 0:X.tableData)==null?void 0:y.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},gs=(a,i)=>{var l,c,d,x,v,h,D,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Bl=(a,i,s)=>{var x,v;const l=(v=(x=is.value)==null?void 0:x[cs.value])==null?void 0:v.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,_;return((_=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:_.id)===a.id}),d=gs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Bl(h,D))),{...vs(c,i,d,a)}},ms=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Bl(l,c)):[]},ys=a=>({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}]}]}}),bs=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),ks=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,v=>{var E;const h=ys(s==null?void 0:s.optionItems),D=v?(E=h[v==null?void 0:v.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[O,H]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===O)return{..._,value:H};return _})},{immediate:!0});const d=v=>Vt.getComponent(v),x=v=>{var h,D;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(O=>({...O,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(O=>({...O,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:v==null?void 0:v.prop})};return(v,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(_.type)),{modelValue:_.value,"onUpdate:modelValue":O=>_.value=O,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:O=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),xs=Ft._export_sfc(ks,[["__scopeId","data-v-6c233914"]]),ws=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(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=P=>P==null?void 0:P.reduce((X,y)=>(X[y==null?void 0:y.prop]=y==null?void 0:y.rule,X),{}),v=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(P,X,y)=>{var A;let L=[];(s==null?void 0:s.activeTabName)==="任务配置"?(L=[{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:P},{label:"按钮名称",value:"按钮名称",children:X}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(L=[{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:(A=s==null?void 0:s.relatedData)==null?void 0:A.map(T=>({label:T==null?void 0:T.任务名称,value:T==null?void 0:T.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return y&&(y==null?void 0:y.length)>0?k=[...L,..._(P,X,y)]:k=L,k},_=(P,X,y)=>{const L=[{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 y?L==null?void 0:L.filter(k=>y==null?void 0:y.includes(k==null?void 0:k.prop)):L},O=(P,X)=>{var T,se,Oe,at,Be,Fe,he,B,te;const y=((Be=(at=(Oe=(se=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:se.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Oe.contents)==null?void 0:at.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:Be.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],L=/button/i,k=((te=(B=(he=(Fe=s==null?void 0:s.comp)==null?void 0:Fe.compData)==null?void 0:he.filter(ne=>L.test(ne==null?void 0:ne.key)))==null?void 0:B.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:te.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],A=E(y,k,P);h.value=X?bs(A,X):A,P&&(P==null?void 0:P.length)>0&&d.value.push(...P==null?void 0:P.map(ne=>({prop:ne,rule:c})))};e.onMounted(()=>{O(null,s==null?void 0:s.extendItem)});const H=P=>{const X=P==null?void 0:P[D.value];if(D.value==="执行任务"){if(!(X!=null&&X.join("/")))return;const y=X==null?void 0:X.join("/");O(y==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:y==="进度设置/进度条"?["进度关键词"]:null,P)}},V=P=>{l("change",{target:s==null?void 0:s.target,extendConfigs:P})},ke=(P,X)=>{D.value=X==null?void 0:X.changeProp,H(P)},W=P=>{l("onButtonClick",P)};return(P,X)=>(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:V,onBlurChange:ke,onOnButtonClick:W},null,8,["rowContents","formRules","buttonValue"]))}}),Ds=Ft._export_sfc(ws,[["__scopeId","data-v-7c660c1f"]]),Cs={};function Es(a,i){return null}const _s=Ft._export_sfc(Cs,[["render",Es]]),Ss={class:"form-operate-content"},Ts={class:"form-operate-item"},Is={class:"operate-title"},Bs={class:"operate-content"},As={class:"fix-content"},Ns={class:"fix-button"},Vs={class:"operate-title"},Os={class:"operate-content"},Ms={class:"fix-content"},zs={class:"fix-button"},Rs={style:{display:"flex","justify-content":"space-between"}},Ls={class:"form-content"},Fs={class:"dialog-footer"},Ps={class:"form-content"},$s={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),x=e.ref([]),v=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),O=e.ref(0),H=e.ref([]),V=e.ref([]),ke=(B,te)=>{if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="selectRelateType"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.selectRelateType)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="menuSelect"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.menuSelect)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="groupSelect"){const ne=te==null?void 0:te.optionUrl;return(ne==null?void 0:ne.groupSelect)||te[B.key]}if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="originalContent")return(te==null?void 0:te.value)||te[B.key];if((te==null?void 0:te.type)=="Select"&&(B==null?void 0:B.key)==="multiple"){const ne=te[B.key];return wl(ne)?ne:B.default}return(B==null?void 0:B.label)==="类型"&&te[B.key]===""?"Input":(B==null?void 0:B.key)==="isFormColHidden"&&!te[B.key]?!1:te[B.key]},W=async B=>{var de,Xe,ot,G,R,ve;c.value=!0;let te=[];const ne=await((ot=(Xe=(de=ze.FormContent)==null?void 0:de.find(xe=>(xe==null?void 0:xe.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:Xe.value)==null?void 0:ot.value)??((R=(G=ze.FormContent)==null?void 0:G.find(xe=>(xe==null?void 0:xe.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:R.value);if(ne==null||ne.forEach(xe=>{O.value++,te.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,B),id:O.value,contents:xe==null?void 0:xe.options,width:(B==null?void 0:B.width)??1})}),B!=null&&B.menuSelect&&((ve=B==null?void 0:B.menuSelect)==null?void 0:ve.length)>0){const xe=await ze.menuToContentType(B==null?void 0:B.menuSelect);te=te==null?void 0:te.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=xe),Me))}E.value=B==null?void 0:B.id,d.value=await ze.selectToBase(ze.formToOptionsContents(te)),x.value=await ze.selectToBase(ze.formToOptionsContents(te))},P=B=>{var ne;v.value=!0;let te=[];(ne=ze.FormButton)==null||ne.forEach(de=>{O.value++,te.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&B[de.key]===""?"normal":B[de.key],id:O.value,contents:de==null?void 0:de.options})}),H.value=te,V.value=te,E.value=B==null?void 0:B.id};e.watch(()=>_.value,()=>{var te,ne;let B=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(de=>(de==null?void 0:de.key)==="enableWrap")?B=(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!_.value),de)):B.push({key:"enableWrap",contents:!_.value}),l("change",B)},{deep:!0});const X=()=>{var ne,de,Xe,ot,G;H.value=V.value;let B={};if(E.value!==""?B.id=E.value:(O.value++,B.id="id"+O.value),(ne=H.value)==null||ne.forEach(R=>{var xe;const ve=(xe=ze.FormButton)==null?void 0:xe.find(Me=>(Me==null?void 0:Me.label)===(R==null?void 0:R.label));ve&&(B[ve.key]=R.value)}),(de=h.value)!=null&&de.find(R=>R.id===B.id))h.value=(Xe=h.value)==null?void 0:Xe.map(R=>(R.id===B.id&&(R=B),R));else{let R=p.cloneDeep(h.value);h.value||(h.value=[]),R.push(B),h.value=R}v.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(ot=p.cloneDeep(s.originalItemContents))!=null&&ot.find(R=>(R==null?void 0:R.key)==="formButton")?te=(G=p.cloneDeep(s.originalItemContents))==null?void 0:G.map(R=>((R==null?void 0:R.key)==="formButton"&&(R.contents=h.value),R)):te.push({key:"formButton",contents:h.value}),l("change",te)},y=B=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ne;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=D.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=B=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ne;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=h.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;v.value=!0;let B=[];(te=ze.FormButton)==null||te.forEach(ne=>{O.value++,B.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:O.value,contents:ne==null?void 0:ne.options})}),H.value=B,V.value=B},A=()=>{var te,ne,de;c.value=!0;let B=[];(de=(ne=(te=ze.FormContent)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.key)==="Input"))==null?void 0:ne.value)==null||de.forEach(Xe=>{O.value++,B.push({label:Xe==null?void 0:Xe.label,name:Xe==null?void 0:Xe.label,type:Xe.type,value:(Xe==null?void 0:Xe.label)==="类型"?"Input":"",id:O.value,contents:Xe==null?void 0:Xe.options})}),d.value=B,x.value=B},T=B=>{let te=p.cloneDeep(V.value);te=te==null?void 0:te.map(ne=>(ne.value=B==null?void 0:B[ne.name],ne)),V.value=te},se=B=>{const te=B.find(Xe=>(Xe==null?void 0:Xe.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ne=B.find(Xe=>(Xe==null?void 0:Xe.name)==="多选"),de=B.find(Xe=>(Xe==null?void 0:Xe.name)==="初始值");ne!=null&&ne.value&&Oo.isString(de.value)&&(de.value=[de.value]),!(ne!=null&&ne.value)&&!Oo.isString(de.value)&&(de.value="")},Oe=async B=>{var te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je;if((B==null?void 0:B.类型)!==((ne=(te=x.value)==null?void 0:te.find(He=>(He==null?void 0:He.label)==="类型"))==null?void 0:ne.value)){let He=[];const it=await((ot=(Xe=(de=ze.FormContent)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:Xe.value)==null?void 0:ot.value)?await((Me=(xe=(ve=ze.FormContent)==null?void 0:ve.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:xe.value)==null?void 0:Me.value):(R=(G=ze.FormContent)==null?void 0:G.find(ee=>(ee==null?void 0:ee.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:R.value;if(it==null||it.forEach(ee=>{var tt,Re;O.value++;const st=Dl(ee==null?void 0:ee.default)?(B==null?void 0:B[ee.label])??ee.value??"":ee==null?void 0:ee.default;He.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:st,prop:ee==null?void 0:ee.prop,id:O.value,contents:ee==null?void 0:ee.options,width:((Re=(tt=x.value)==null?void 0:tt[0])==null?void 0:Re.width)??1})}),B!=null&&B.菜单选项&&((Ve=B==null?void 0:B.菜单选项)==null?void 0:Ve.length)>0){const ee=await ze.menuToContentType(B==null?void 0:B.菜单选项);He=He==null?void 0:He.map(st=>((st==null?void 0:st.name)==="组信息选项"&&(st.contents=ee),st))}se(He),x.value=await ze.selectToBase(p.cloneDeep(He)),d.value=await ze.selectToBase(p.cloneDeep(He))}else{let He=p.cloneDeep(x.value);if(He=He==null?void 0:He.map(it=>(it.value=B==null?void 0:B[it.name],it)),B!=null&&B.菜单选项&&((Je=B==null?void 0:B.菜单选项)==null?void 0:Je.length)>0){const it=await ze.menuToContentType(B==null?void 0:B.菜单选项);He=He==null?void 0:He.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=it),ee))}He=ze.formToOptionsContents(He),se(He),x.value=await ze.selectToBase(p.cloneDeep(He))}},at=B=>{B||(d.value=x.value)},Be=async B=>{await Oe(B),d.value=x.value},Fe=ko(async()=>{var de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it;d.value=x.value;let B={};B.width=((Xe=(de=d.value)==null?void 0:de[0])==null?void 0:Xe.width)??1,E.value!==""?B.id=E.value:(O.value++,B.id="id"+O.value);let te=await((R=(G=(ot=ze.FormContent)==null?void 0:ot.find(ee=>{var st,tt;return(ee==null?void 0:ee.key)===(((tt=(st=d.value)==null?void 0:st.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:tt.value)??"label")}))==null?void 0:G.value)==null?void 0:R.value)??((xe=(ve=ze.FormContent)==null?void 0:ve.find(ee=>{var st,tt;return(ee==null?void 0:ee.key)===(((tt=(st=d.value)==null?void 0:st.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:tt.value)??"label")}))==null?void 0:xe.value);if((Me=d.value)==null||Me.forEach(ee=>{const st=te==null?void 0:te.find(tt=>(tt==null?void 0:tt.label)===(ee==null?void 0:ee.label));st&&(B[st.key]=ee.value)}),B.width=B.width?B.width:1,B.key=B==null?void 0:B.label,B.isFormColHidden=B==null?void 0:B.isFormColHidden,(Ve=D.value)!=null&&Ve.find(ee=>ee.id===B.id))D.value=(Je=D.value)==null?void 0:Je.map(ee=>(ee.id===B.id&&(ee=B),ee));else{let ee=p.cloneDeep(D.value);ee.push(B),D.value=ee}D.value=D.value.map(({id:ee,...st})=>st),c.value=!1,E.value="";let ne=p.cloneDeep(s.originalItemContents);(He=p.cloneDeep(s.originalItemContents))!=null&&He.find(ee=>(ee==null?void 0:ee.key)==="formContent")?ne=(it=p.cloneDeep(s.originalItemContents))==null?void 0:it.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=D.value),ee)):ne.push({key:"formContent",contents:D.value}),l("change",ne)},300),he=()=>{c.value=!1,v.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ne,de,Xe,ot,G;if(!s.originalItemContents||s.originalItemContents.length===0)return;const B=p.cloneDeep(s.originalItemContents);D.value=((te=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ne=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="formButton"))==null?void 0:ne.contents)??[],_.value=(de=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&de.contents?!((Xe=B==null?void 0:B.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&Xe.contents):!0,D.value=(ot=p.cloneDeep(D.value))==null?void 0:ot.map((R,ve)=>{var Me;let xe=R;return xe.id=(R==null?void 0:R.id)??ve,R!=null&&R.label||(R.label=(R==null?void 0:R.key)??(R==null?void 0:R.label)??""),R!=null&&R.type||(R.type=(R==null?void 0:R.type)??""),R.contents=((Me=R==null?void 0:R.options)==null?void 0:Me.length)===0?(R==null?void 0:R.contents)??"":R==null?void 0:R.options,xe}),D.value=ze.formToOptionsContents(D.value),h.value=(G=h.value)==null?void 0:G.map((R,ve)=>R={label:(R==null?void 0:R.label)??"",type:(R==null?void 0:R.type)??"",background:(R==null?void 0:R.background)??"var(--ssComponent-primary-color)",id:ve})},{deep:!0,immediate:!0}),(B,te)=>{const ne=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ss,[e.createElementVNode("div",Ts,[e.createElementVNode("div",Is,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Xe,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Ns,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>W(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>y(Xe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Vs,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Xe,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",Ms,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",zs,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>P(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>L(Xe)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Rs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Vt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Xe=>_.value=Xe)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Oe,onChangeVisible:at,onBlurChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fs,[e.createVNode(de,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(de,{class:"ok-button button",onClick:e.unref(Fe),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:v.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:he,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Fo=Ft._export_sfc($s,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Ks={class:"module-data"},Us={class:"step-module layout"},Ws={class:"form-content"},Hs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=W=>{var P;D.value=W,l("change",(P=V())==null?void 0:P.compData)},O=(W,P)=>{var X,y;switch(W){case"create":(X=d.value)==null||X.forEach(L=>{L.value=""}),h.value="create",v.visible=!0;break;case"update":(y=d.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),h.value="update",v.visible=!0;break;case"delete":E.value.splice(P,1),h.value="delete";break}},H=W=>{var P,X,y;if((W==null?void 0:W.buttonName)==="确认"){const L=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(L).forEach(k=>{L[k]===""&&delete L[k]}),h.value){case"create":E.value.push({...L,index:((P=E.value)==null?void 0:P.length)+1});break;case"update":E.value=(X=E.value)==null?void 0:X.map(k=>k.index===(L==null?void 0:L.index)?{...k,title:L==null?void 0:L.title,description:L==null?void 0:L.description}:k);break}l("change",(y=V())==null?void 0:y.compData),v.visible=!1}else v.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ke=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(D.value=((P=W==null?void 0:W.find(y=>y.key==="stepConfig"))==null?void 0:P.contents)??{},E.value=((X=W==null?void 0:W.find(y=>y.key==="stepList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.title),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>O("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:ke,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),qs=Ft._export_sfc(Hs,[["__scopeId","data-v-7dbd17f2"]]),Gs={class:"step-module content"},Xs={class:"module-data"},Ys={class:"step-module layout"},Js={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),x=e.ref([]),v=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}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=W=>{var P;d.value=W,l("change",(P=V())==null?void 0:P.compData)},O=(W,P)=>{var X,y;switch(W){case"create":(X=h.value)==null||X.forEach(L=>{L.value=""}),c.value="create",E.visible=!0;break;case"update":(y=h.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(P,1),c.value="delete";break}},H=W=>{var P,X,y,L;if((W==null?void 0:W.buttonName)==="确认"){const k=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(X=x.value)==null||X.push({...k,index:((P=x.value)==null?void 0:P.length)+1});break;case"update":x.value=(y=x.value)==null?void 0:y.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(L=V())==null?void 0:L.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ke=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(d.value=((P=W==null?void 0:W.find(y=>y.key==="timeLineConfig"))==null?void 0:P.contents)??{},x.value=((X=W==null?void 0:W.find(y=>y.key==="timeLineList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Gs,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.content),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>O("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ys,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:v.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ke,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Js,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Ft._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),ec={};function tc(a,i){return e.openBlock(),e.createElementBlock("div")}const nc=Ft._export_sfc(ec,[["render",tc]]),ac={class:"extra-content"},oc={key:0},lc={key:1},rc={class:"dialog-footer"},ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=i,v=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var L;const y=p.cloneDeep(s.itemData);c.value=(L=p.cloneDeep(y))==null?void 0:L.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(se=>{var Oe;T.push((Oe=Object.values(se))==null?void 0:Oe[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(y,L,k,A)=>{var se;let T={};((se=y==null?void 0:y[0])==null?void 0:se.contents)==="详情"&&(v.value=!0,T[L]=y,d.value=y==null?void 0:y.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},O=y=>{var Oe,at,Be,Fe;const L=(at=(Oe=Object.values(p.cloneDeep(h.value)))==null?void 0:Oe[0])==null?void 0:at.filter(he=>(he==null?void 0:he.key)==="tableContentName"),k=(Fe=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Fe.filter(he=>(he==null?void 0:he.key)!=="tableContentName"),A=k==null?void 0:k.map((he,B)=>{var te;return B===y.index&&(he==null?void 0:he.comp)==="Table"&&(he.compData=(te=he.compData)==null?void 0:te.map(ne=>{var de,Xe;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(Xe=(de=y.content)==null?void 0:de.map(ot=>{let G={};for(let R in ot)R!=="id"&&(G[R]=ot[R]);return G}))==null?void 0:Xe.map(ot=>Object.values(ot))),ne})),he});A.unshift(L==null?void 0:L[0]);let T=p.cloneDeep(h.value),se={};for(let he in T)se[he]=A;h.value=se},H=()=>{v.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=y=>{var Oe,at,Be,Fe;const L=(at=(Oe=Object.values(p.cloneDeep(h.value)))==null?void 0:Oe[0])==null?void 0:at.filter(he=>(he==null?void 0:he.key)==="tableContentName"),k=(Fe=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Fe.filter(he=>(he==null?void 0:he.key)!=="tableContentName"),A=k==null?void 0:k.map((he,B)=>(B===y.index&&(he.compData=y.contents),he));A.unshift(L==null?void 0:L[0]);let T=p.cloneDeep(h.value),se={};for(let he in T)se[he]=A;h.value=se},ke=()=>{var L,k;let y={};for(let A in D.value)A===((L=Object.keys(h.value))==null?void 0:L[0])?y[A]=(k=Object.values(h.value))==null?void 0:k[0]:y[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:y},"methodData"),v.value=!1,h.value={},D.value={},E.value=void 0},W=()=>{v.value=!1,h.value={},D.value={},E.value=void 0},P=y=>{x("change",y,"methodData")},X=y=>ma(y);return(y,L)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",oc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(X(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:T,index:(A==null?void 0:A.id)??T,onContentClick:_,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:v.value,onBeforeDestroy:W},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(X(A.comp)),{itemData:A==null?void 0:A.compData,onChange:O,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:V,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",rc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>L[0]||(L[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>L[1]||(L[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},sc=Ft._export_sfc(ic,[["__scopeId","data-v-2d9c5ab2"]]);let St="$R";const cc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),uc=a=>{var s,l;let i=a.trim();if((i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"){let c=(l=(s=i==null?void 0:i.replace(":",St))==null?void 0:s.split(St))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},pc=a=>{var s;let i=a.trim();return(i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"&&((s=Ga(i,","))==null?void 0:s.length)===1},dc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),fc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),hc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),Da=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},_a=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},vc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Po=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},Ga=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Po(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Po(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},gc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),mc=a=>{var i,s,l,c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt;if(hc(a)){let Ue={},Ke=(l=(s=(i=a==null?void 0:a.replace(":",St))==null?void 0:i.split(St))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),De="",_e="",Ye=(d=(c=a==null?void 0:a.replace(":",St))==null?void 0:c.split(St))==null?void 0:d[1];if((Ye==null?void 0:Ye[0])==="("&&(_e=(h=(v=(x=Ye==null?void 0:Ye.split("("))==null?void 0:x[1])==null?void 0:v.split(")"))==null?void 0:h[0],Ye=(E=(D=Ye==null?void 0:Ye.replace(")",St))==null?void 0:D.split(St))==null?void 0:E[1]),((_=Ga(Ye,"/"))==null?void 0:_.length)>1)De=(O=Ga(Ye,"/"))==null?void 0:O.map(Ce=>Ce==null?void 0:Ce.replaceAll("/","").replaceAll("'",""));else if(Ye.includes("{")||Ye.includes("("))if(Ye.includes("{")?De=De+((X=(P=(W=(ke=(V=(H=Ye==null?void 0:Ye.split("{"))==null?void 0:H[1])==null?void 0:V.split("}"))==null?void 0:ke[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))==null?void 0:P.replaceAll("[","(["))==null?void 0:X.replaceAll("]","])"))+"[":De=De+((se=(T=(A=(k=(L=(y=Ye==null?void 0:Ye.split("("))==null?void 0:y[1])==null?void 0:L.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:se.replaceAll("]","])"))+"[",!((Oe=Ye==null?void 0:Ye.split(")"))!=null&&Oe[1]))De=De+((Fe=(Be=(at=Ye==null?void 0:Ye.split("["))==null?void 0:at[1])==null?void 0:Be.split("]"))==null?void 0:Fe[0])+"]";else{const Ce=(ne=(te=(B=(he=Ye==null?void 0:Ye.split(")"))==null?void 0:he[1])==null?void 0:B.replace("[",St))==null?void 0:te.split(St))==null?void 0:ne[1];if(Ye!=null&&Ye.includes("?"))De=((de=Ye==null?void 0:Ye.split("?"))==null?void 0:de[1])+"&&"+((ot=(Xe=Ye==null?void 0:Ye.split("?"))==null?void 0:Xe[0])==null?void 0:ot.replaceAll("#","==="));else if(Ce){const $e=Ce.lastIndexOf("]"),je=Ce.substring(0,$e)+St+Ce.substring($e+1);De=De+((G=je==null?void 0:je.split(St))==null?void 0:G[0])+"]"}else De=(xe=(ve=(R=a==null?void 0:a.replace(":",St))==null?void 0:R.split(St))==null?void 0:ve[1])==null?void 0:xe.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Je=(Ve=(Me=a==null?void 0:a.replace(":",St))==null?void 0:Me.split(St))==null?void 0:Ve[1])==null?void 0:Je.replaceAll("'","");else{let Ce=(ee=(it=(He=a==null?void 0:a.replace(":",St))==null?void 0:He.split(St))==null?void 0:it[1])==null?void 0:ee.replaceAll("'","");De=((Re=(tt=(st=Ce==null?void 0:Ce.split("?"))==null?void 0:st[1])==null?void 0:tt.split(":"))==null?void 0:Re[0])+"&&"+((pe=Ce==null?void 0:Ce.split("?"))==null?void 0:pe[0])}return Ue[Ke]=_e!==""?_e+"$##"+De:De,{groupName:"",formContents:[[Ue]]}}else{let Ue={},Ke="",De="";if(a.includes("#")){Ke=(ue=(ie=a==null?void 0:a.split("#"))==null?void 0:ie[0])==null?void 0:ue.replaceAll("'","");let _e=(Ge=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Ge.replaceAll("'","");_e!=null&&_e.includes("{")?De=De+((K=(C=(g=(ft=_e==null?void 0:_e.split("{"))==null?void 0:ft[1])==null?void 0:g.split("}"))==null?void 0:C[0])==null?void 0:K.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((J=(I=(w=(Y=_e==null?void 0:_e.split("("))==null?void 0:Y[1])==null?void 0:w.split(")"))==null?void 0:I[0])==null?void 0:J.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((oe=(le=(z=_e==null?void 0:_e.replace("[",St))==null?void 0:z.split(St))==null?void 0:le[1])==null?void 0:oe.slice(0,((be=(U=(F=_e==null?void 0:_e.replace("[",St))==null?void 0:F.split(St))==null?void 0:U[1])==null?void 0:be.length)-1))}else{let _e=(ae=(Q=(q=a==null?void 0:a.split("]"))==null?void 0:q[0])==null?void 0:Q.split("["))==null?void 0:ae[1];if((ge=_e==null?void 0:_e.split(":"))==null||ge.forEach((Ye,Ce)=>{var $e;(($e=_e==null?void 0:_e.split(":"))==null?void 0:$e.length)-1===Ce&&(Ke=Ye==null?void 0:Ye.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((re=($=(ye=(fe=a==null?void 0:a.split("]"))==null?void 0:fe[1])==null?void 0:ye.replace(":",St).split(St))==null?void 0:$[1])==null?void 0:re.replaceAll("'",""))??"";else{let Ye=(me=(Ae=(Ne=(Ze=(Ee=(ce=p.cloneDeep(a))==null?void 0:ce.split("("))==null?void 0:Ee[1])==null?void 0:Ze.split(")"))==null?void 0:Ne[0])==null?void 0:Ae.replaceAll("{","").replaceAll("}",""))==null?void 0:me.replaceAll("'","").replaceAll(":","/"),Ce="";(rt=_e==null?void 0:_e.split(":"))==null||rt.forEach($e=>{Ce=Ce===""?Ce+($e==null?void 0:$e.replaceAll("'","")):Ce+":"+($e==null?void 0:$e.replaceAll("'",""))}),De=Ye+"["+Ce+"]"}}return Ue[Ke]=De,{groupName:"",formContents:[[Ue]]}}},yc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),bc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},kc=a=>{var d,x,v,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=Da(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(v=Da(p.cloneDeep(i)))==null?void 0:v.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(D=p.cloneDeep(s))==null?void 0:D.map(E=>{var _,O;return E=(O=(_=E.replace(")",St))==null?void 0:_.split(St))==null?void 0:O[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I;let _=(V=(H=p.cloneDeep(E))==null?void 0:H.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",St).split(St);if(((W=(ke=p.cloneDeep(_))==null?void 0:ke[0])==null?void 0:W.replaceAll("'",""))==="输入"){if(!((X=(P=p.cloneDeep(_))==null?void 0:P[1])!=null&&X.includes("["))&&!((L=(y=p.cloneDeep(_))==null?void 0:y[1])!=null&&L.includes("("))){ze.IsJson((k=p.cloneDeep(_))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(_))==null?void 0:A[1].replaceAll("'",'"')));return}if(((se=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:se[0])==="["){let J=(Fe=(Oe=p.cloneDeep(_))==null?void 0:Oe[1])==null?void 0:Fe.slice(1,((Be=(at=p.cloneDeep(_))==null?void 0:at[1])==null?void 0:Be.length)-1);(B=(he=Da(J))==null?void 0:he.filter(z=>z!==","))==null||B.forEach(z=>{var oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce;let le={},F=(Q=(q=p.cloneDeep(z))==null?void 0:q.slice(1,((oe=p.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:Q.replace(":",St).split(St),U=(ae=F==null?void 0:F[0])==null?void 0:ae.replaceAll("'",""),be;(ge=F==null?void 0:F[1])!=null&&ge.includes("(")?(be=(Ae=(Ne=(Ze=(Ee=(ce=(re=($=(ye=p.cloneDeep(F))==null?void 0:ye[1])==null?void 0:$.replaceAll("{",""))==null?void 0:re.replaceAll("}",""))==null?void 0:ce.split("("))==null?void 0:Ee[1])==null?void 0:Ze.split(")"))==null?void 0:Ne[0])==null?void 0:Ae.replaceAll(":","/").replaceAll("'",""),(rt=(me=p.cloneDeep(F))==null?void 0:me[1])!=null&&rt.includes("[")&&(be=p.cloneDeep(be)+"["+((Ce=(Ye=(_e=(De=(Ke=(Ue=p.cloneDeep(F))==null?void 0:Ue[1])==null?void 0:Ke.split("["))==null?void 0:De[1])==null?void 0:_e.split("]"))==null?void 0:Ye[0])==null?void 0:Ce.replaceAll("'",""))+"]")):be=(fe=F==null?void 0:F[1])==null?void 0:fe.replaceAll("'",""),le[U]=be,c.push(le)})}}else{if(!((ne=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ne.includes("["))&&!((Xe=(de=p.cloneDeep(_))==null?void 0:de[1])!=null&&Xe.includes("("))){ze.IsJson((ot=p.cloneDeep(_))==null?void 0:ot[1].replaceAll("'",'"'))&&l.push(JSON.parse((G=p.cloneDeep(_))==null?void 0:G[1].replaceAll("'",'"')));return}if(((ve=(R=p.cloneDeep(_))==null?void 0:R[1])==null?void 0:ve[0])==="["){let J=(Je=(xe=p.cloneDeep(_))==null?void 0:xe[1])==null?void 0:Je.slice(1,((Ve=(Me=p.cloneDeep(_))==null?void 0:Me[1])==null?void 0:Ve.length)-1);(it=(He=Da(J))==null?void 0:He.filter(z=>z!==","))==null||it.forEach(z=>{var oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt;let le={},F=(Q=(q=p.cloneDeep(z))==null?void 0:q.slice(1,((oe=p.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:Q.replace(":",St).split(St),U=(ae=F==null?void 0:F[0])==null?void 0:ae.replaceAll("'",""),be;if(!((ge=F==null?void 0:F[1])!=null&&ge.includes("(")))be=(fe=F==null?void 0:F[1])==null?void 0:fe.replaceAll("'","");else if(be=(Ze=(Ee=(ce=(re=($=(ye=p.cloneDeep(F))==null?void 0:ye[1])==null?void 0:$.replaceAll("{",""))==null?void 0:re.replaceAll("}",""))==null?void 0:ce.replace("(",St))==null?void 0:Ee.split(St))==null?void 0:Ze[1],be=(Ae=(Ne=bc(p.cloneDeep(be),St))==null?void 0:Ne.split(St))==null?void 0:Ae[0],!(be!=null&&be.includes("(")))be=(me=p.cloneDeep(be))==null?void 0:me.replaceAll(":","/").replaceAll("'",""),(Ue=(rt=p.cloneDeep(F))==null?void 0:rt[1])!=null&&Ue.includes("[")&&(be=p.cloneDeep(be)+"["+((M=(Qe=(je=($e=(De=(Ke=p.cloneDeep(F))==null?void 0:Ke[1])==null?void 0:De.split("["))==null?void 0:$e[((Ce=(Ye=(_e=p.cloneDeep(F))==null?void 0:_e[1])==null?void 0:Ye.split("["))==null?void 0:Ce.length)-1])==null?void 0:je.split("]"))==null?void 0:Qe[0])==null?void 0:M.replaceAll("'",""))+"]");else{let Dt="";(Se=_a(be,":"))==null||Se.forEach(Mt=>{var Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In;if(!(Mt!=null&&Mt.includes("(")))Dt=Dt===""?Dt+((Et=Mt==null?void 0:Mt.replaceAll(":",""))==null?void 0:Et.replaceAll("'","")):Dt+"/"+((It=Mt==null?void 0:Mt.replaceAll(":",""))==null?void 0:It.replaceAll("'",""));else{let mn=(wn=(hn=(xn=(Ct=(qt=(Rt=(jt=(Tt=p.cloneDeep(Mt))==null?void 0:Tt.replaceAll("{",""))==null?void 0:jt.replaceAll("}",""))==null?void 0:Rt.replace("(",St))==null?void 0:qt.split(St))==null?void 0:Ct[1])==null?void 0:xn.split(")"))==null?void 0:hn[0])==null?void 0:wn.replaceAll(":","/").replaceAll("'","");mn=mn+"["+((In=(gn=(Tn=(vn=(Sn=p.cloneDeep(Mt))==null?void 0:Sn.split("["))==null?void 0:vn[1])==null?void 0:Tn.split("]"))==null?void 0:gn[0])==null?void 0:In.replaceAll("'",""))+"]",Dt=Dt===""?Dt+"["+mn+"]":Dt+"/["+mn+"]"}}),be=Dt+"["+((mt=(ht=(dt=(We=(nt=(ct=p.cloneDeep(F))==null?void 0:ct[1])==null?void 0:nt.split("["))==null?void 0:We[((ut=(Ie=(et=p.cloneDeep(F))==null?void 0:et[1])==null?void 0:Ie.split("["))==null?void 0:ut.length)-1])==null?void 0:dt.split("]"))==null?void 0:ht[0])==null?void 0:mt.replaceAll("'",""))+"]"}le[U]=be,l.push(le)})}else{let J=(Re=(ee=p.cloneDeep(_))==null?void 0:ee[1])==null?void 0:Re.slice(1,((tt=(st=p.cloneDeep(_))==null?void 0:st[1])==null?void 0:tt.length)-1),z={},le=(K=(C=(ue=(ie=(pe=p.cloneDeep(J))==null?void 0:pe.split("]"))==null?void 0:ie[0])==null?void 0:ue.split(":"))==null?void 0:C[((g=(ft=(Ge=(Te=p.cloneDeep(J))==null?void 0:Te.split("]"))==null?void 0:Ge[0])==null?void 0:ft.split(":"))==null?void 0:g.length)-1])==null?void 0:K.replaceAll("'",""),F=((I=(w=(Y=p.cloneDeep(J))==null?void 0:Y.split("]"))==null?void 0:w[0])==null?void 0:I.replaceAll("'",""))+"]";z[le]=F,l.push(z)}}}),{output:l,input:c}},xc=Kt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(xc),Vn=Kt.useMenuState(p.pinia),{activeMenuPath:na}=p.storeToRefs(Vn),Ca=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Ca),wc=ze.useOriginalState(p.pinia),{originalPath:Dc}=p.storeToRefs(wc),Qt=Dc.value,Cc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const v=x.match(i);v&&d.push({idx:Number(v[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,v)=>x.idx-v.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],v=[];c.forEach(_=>{var O;return(((O=_.names)==null?void 0:O.length)>d?x:v).push(_)});const h=v.map(_=>_.item),D=new Map;for(const _ of x){const O=_.names[_.names.length-d-1].value;D.has(O)||D.set(O,[]),D.get(O).push(_)}return[...Array.from(D.entries()).map(([_,O])=>{var H;return O[0].names.length===1&&((H=O[0].names[0])==null?void 0:H.idx)===-1?O[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(O,d+1)}}),...h]}if(s)return l(s,0)},Aa=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:Cc(a),Ec=a=>{let i=[];return a==null||a.forEach(l=>{var d,x;let c=((x=(d=l==null?void 0:l.compData)==null?void 0:d.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:x.contents)??[];i=[...i,...c]}),a==null?void 0:a.map(l=>(i!=null&&i.find(c=>(c==null?void 0:c.prop)===(l==null?void 0:l.name))&&(l.isShow=!1),l))},Al=async()=>{var d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe,he,B,te,ne,de,Xe,ot,G,R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge;Vn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:x.length)>0){let fe=(H=(O=(_=(E=(D=(h=(v=i==null?void 0:i.data)==null?void 0:v.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:O.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:H.contents;a=(ke=(V=p.cloneDeep(fe))==null?void 0:V[0])==null?void 0:ke.label}let s=na.value;(X=na.value)!=null&&X.includes(`updateLoading${((W=Xt.value)==null?void 0:W.account)||((P=Xt.value)==null?void 0:P.账号)}`)?s=p.cloneDeep(na).value:(k=na.value)!=null&&k.includes(`loading${((y=Xt.value)==null?void 0:y.account)||((L=Xt.value)==null?void 0:L.账号)}`)&&(s=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((T=Xt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Oe=(se=l==null?void 0:l.data)==null?void 0:se.result)==null?void 0:Oe.length)>0){let fe="",ye=[];(Be=(at=l==null?void 0:l.data)==null?void 0:at.result)==null||Be.forEach(re=>{var ce,Ee,Ze,Ne,Ae;((Ee=(ce=re==null?void 0:re.value)==null?void 0:ce.pageData)==null?void 0:Ee.comp)==="Form"&&((Ae=(Ne=(Ze=re==null?void 0:re.value)==null?void 0:Ze.pageData)==null?void 0:Ne.compData)==null||Ae.forEach(me=>{(me==null?void 0:me.key)==="formContent"&&(ye=[...ye,...me==null?void 0:me.contents])}))});let $=ye==null?void 0:ye.find(re=>(re==null?void 0:re.isMain)===!0);if($?(fe=$==null?void 0:$.value,a=$==null?void 0:$.key):fe=(G=(ot=(Xe=(de=(ne=(te=(B=(he=(Fe=l==null?void 0:l.data)==null?void 0:Fe.result)==null?void 0:he[0])==null?void 0:B.value)==null?void 0:te.pageData)==null?void 0:ne.compData)==null?void 0:de.find(re=>(re==null?void 0:re.key)==="formContent"))==null?void 0:Xe.contents)==null?void 0:ot.find(re=>{var ce,Ee;return(re==null?void 0:re.key)===a||((Ee=(ce=re==null?void 0:re.optionUrl)==null?void 0:ce.groupSelect)==null?void 0:Ee[1])===a}))==null?void 0:G.value,(xe=na.value)!=null&&xe.includes(`updateLoading${((R=Xt.value)==null?void 0:R.account)||((ve=Xt.value)==null?void 0:ve.账号)}`)){let re=[],ce=[];const Ee=await p.getInsofDataApi({key:{pageKey:(ie=na.value.split(Qt+`updateLoading${((Re=Xt.value)==null?void 0:Re.account)||((pe=Xt.value)==null?void 0:pe.账号)}`))==null?void 0:ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(ue=Ee==null?void 0:Ee.data)==null?void 0:ue.result)==null?void 0:Te.length)>0){let Ze=(Ge=l==null?void 0:l.data)==null?void 0:Ge.result,Ne=(ft=p.cloneDeep(Ze))==null?void 0:ft.map(async Ae=>{var me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct;if(((me=Ae==null?void 0:Ae.key)==null?void 0:me.type)==="structure"){let nt=(De=(Ke=(Ue=(rt=Ae==null?void 0:Ae.value)==null?void 0:rt.pageData)==null?void 0:Ue.compData)==null?void 0:Ke.find(et=>(et==null?void 0:et.key)==="parentFormPath"))==null?void 0:De.contents;if(nt){let et=await ze.getItemData(nt,sessionStorage.getItem("systemKey"),""),Ie=($e=(Ce=(Ye=(_e=Ae==null?void 0:Ae.value)==null?void 0:_e.pageData)==null?void 0:Ye.compData)==null?void 0:Ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:$e.contents,ut=et==null?void 0:et.filter(We=>(We==null?void 0:We.comp)==="Form");ut==null||ut.forEach(We=>{var dt;(dt=We==null?void 0:We.compData)==null||dt.forEach(ht=>{var mt,Dt;if((ht==null?void 0:ht.key)==="formContent"&&((mt=ht==null?void 0:ht.contents)==null?void 0:mt.some(Et=>Ie==null?void 0:Ie.find(It=>(It==null?void 0:It.prop)===(Et==null?void 0:Et.prop))))){let Et=We;Et.compData=(Dt=Et.compData)==null?void 0:Dt.map(Tt=>{var jt;return(Tt==null?void 0:Tt.key)==="formContent"&&(Tt.contents=(jt=Tt.contents)==null?void 0:jt.map(Rt=>{var qt;return Ie!=null&&Ie.find(Ct=>(Ct==null?void 0:Ct.prop)===(Rt==null?void 0:Rt.prop))&&(Rt.value=(qt=Ie==null?void 0:Ie.find(Ct=>(Ct==null?void 0:Ct.prop)===(Rt==null?void 0:Rt.prop)))==null?void 0:qt.value),Rt})),Tt});let It={};for(let Tt in Et)Tt!=="id"&&(It[Tt]=Et[Tt]);c.push({id:We==null?void 0:We.id,value:{pageData:It}})}})})}else if((Qe=(je=Ee==null?void 0:Ee.data)==null?void 0:je.result)!=null&&Qe.find(et=>{var Ie,ut,We,dt;return((ut=(Ie=et==null?void 0:et.value)==null?void 0:Ie.pageData)==null?void 0:ut.name)===((dt=(We=Ae==null?void 0:Ae.value)==null?void 0:We.pageData)==null?void 0:dt.name)})){let et=Ae==null?void 0:Ae.key;et.pageKey=p.cloneDeep(_n).value+Qt+fe,c.push({id:(ct=(Se=(M=Ee==null?void 0:Ee.data)==null?void 0:M.result)==null?void 0:Se.find(Ie=>{var ut,We,dt,ht;return((We=(ut=Ie==null?void 0:Ie.value)==null?void 0:ut.pageData)==null?void 0:We.name)===((ht=(dt=Ae==null?void 0:Ae.value)==null?void 0:dt.pageData)==null?void 0:ht.name)}))==null?void 0:ct.id,key:et,value:Ae==null?void 0:Ae.value})}else{let et=Ae==null?void 0:Ae.key;et.pageKey=p.cloneDeep(_n).value+Qt+fe,re.push({key:et,value:Ae==null?void 0:Ae.value})}}});await Promise.all(Ne),(C=(g=l==null?void 0:l.data)==null?void 0:g.result)==null||C.forEach(Ae=>{var rt,Ue,Ke;let me=(rt=p.cloneDeep(Ae))==null?void 0:rt.key;me.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ue=Xt.value)==null?void 0:Ue.account)||((Ke=Xt.value)==null?void 0:Ke.账号)}`,Vn.setChildMenu(me.pageKey),c.push({id:Ae==null?void 0:Ae.id,key:me})})}if(fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(K=c==null?void 0:c[0])!=null&&K.key&&await Ca.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(re==null?void 0:re.length)>0&&(await p.batchAddInsofDataApi({dataList:re}),(w=re==null?void 0:re[0])!=null&&w.key&&await Ca.setLogRecordAsync({type:"保存",data:re},(I=re==null?void 0:re[0])==null?void 0:I.key));const Ze=await p.getInsofDataApi({key:{pageKey:(le=na.value.split(Qt+`updateLoading${((J=Xt.value)==null?void 0:J.account)||((z=Xt.value)==null?void 0:z.账号)}`))==null?void 0:le[0],systemKey:sessionStorage.getItem("systemKey")}});if(((U=(F=Ze==null?void 0:Ze.data)==null?void 0:F.result)==null?void 0:U.length)>0){let Ne=[],Ae=(be=l==null?void 0:l.data)==null?void 0:be.result;(oe=p.cloneDeep(Ae))==null||oe.forEach(me=>{var rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se;if(((rt=me==null?void 0:me.key)==null?void 0:rt.type)!=="structure"){let ct=(De=(Ke=(Ue=Ze==null?void 0:Ze.data)==null?void 0:Ue.result)==null?void 0:Ke.filter(ut=>{var We;return((We=ut==null?void 0:ut.key)==null?void 0:We.type)==="data"}))==null?void 0:De.map(ut=>ut==null?void 0:ut.id);Ne=[...Ne,...ct];let nt=($e=(Ce=(Ye=(_e=p.cloneDeep(Ae))==null?void 0:_e.find(ut=>{var We;return((We=me==null?void 0:me.key)==null?void 0:We.tableId)===(ut==null?void 0:ut.id)}))==null?void 0:Ye.value)==null?void 0:Ce.pageData)==null?void 0:$e.name,et=(M=(Qe=(je=Ze==null?void 0:Ze.data)==null?void 0:je.result)==null?void 0:Qe.find(ut=>{var We,dt;return((dt=(We=ut==null?void 0:ut.value)==null?void 0:We.pageData)==null?void 0:dt.name)===nt}))==null?void 0:M.id,Ie=(Se=p.cloneDeep(me))==null?void 0:Se.key;Ie.tableId=et,Ie.pageKey=p.cloneDeep(_n).value+Qt+fe,ce.push({key:Ie,value:me==null?void 0:me.value})}}),(Ne==null?void 0:Ne.length)>0&&(Ne=[...new Set(Ne)],await p.batchDeleteInsofDataApi({ids:Ne})),(Q=(q=l==null?void 0:l.data)==null?void 0:q.result)==null||Q.forEach(me=>{var Ue,Ke,De;let rt=(Ue=p.cloneDeep(me))==null?void 0:Ue.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((De=Xt.value)==null?void 0:De.账号)}`,Vn.setChildMenu(rt.pageKey),c.push({id:me==null?void 0:me.id,key:rt})})}(ce==null?void 0:ce.length)>0&&(await p.batchAddInsofDataApi({dataList:ce}),(ae=re==null?void 0:re[0])!=null&&ae.key&&await Ca.setLogRecordAsync({type:"保存",data:ce},(ge=ce==null?void 0:ce[0])==null?void 0:ge.key)),p.ElMessage.success("保存成功")}}else{if((Ve=(Me=l==null?void 0:l.data)==null?void 0:Me.result)==null||Ve.forEach(re=>{var Ee;let ce=(Ee=p.cloneDeep(re))==null?void 0:Ee.key;ce.pageKey=p.cloneDeep(_n).value+Qt+fe,Vn.setChildMenu(ce.pageKey),c.push({id:re==null?void 0:re.id,key:ce})}),fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1),Vn.setChildMenu("");return}(Je=c==null?void 0:c[0])!=null&&Je.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Ca.setLogRecordAsync({type:"保存",data:c},(He=c==null?void 0:c[0])==null?void 0:He.key)),await ze.loadingConstruct(p.cloneDeep(_n).value+Qt+fe,p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((it=Xt.value)==null?void 0:it.account)||((ee=Xt.value)==null?void 0:ee.账号)}`),Vn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((st=Xt.value)==null?void 0:st.account)||((tt=Xt.value)==null?void 0:tt.账号)}`),p.ElMessage.success("保存成功")}}Vn.setImportLoading(!1)},_c={key:0,class:"method-content"},Sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=ze.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),v=ze.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(v),D=Kt.useModelComp(p.pinia),E=e.ref(!1),_=Kt.useMenuState(p.pinia),O=p.useLoginState(p.pinia),{itemData:H,isEdit:V,routeToChildPath:ke,tableViewContents:W,lockingPage:P,payloadTypes:X}=p.storeToRefs(D),{activeMenuPath:y,platform:L,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(O),T=e.ref(!1),se=async()=>{var G,R;(G=i.value)!=null&&G.find(ve=>(ve==null?void 0:ve.buttonName)==="保存")&&await ne((R=i.value)==null?void 0:R.find(ve=>(ve==null?void 0:ve.buttonName)==="保存")),await Al()};e.watch(()=>H.value,async()=>{V.value==="view"&&!T.value&&await ot(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Oe=()=>{d.value=!1,x.value=void 0},at=G=>G.map(R=>{const ve={};for(const xe in R){const Me=R[xe];if(xe.includes(h.value)){const Ve=xe.split(h.value);let Je=ve;Ve.forEach((He,it)=>{it===Ve.length-1?Je[He]=Me:(Je[He]||(Je[He]={}),Je=Je[He])})}else ve[xe]=Me}return ve}),Be=async(G,R,ve=[])=>{var Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft;let xe=(Me=p.cloneDeep(R))==null?void 0:Me.filter(g=>(g==null?void 0:g.comp)!=="methodButton");if(G!=null&&G.includes("[")){let g=(ee=(it=(He=(Je=(Ve=p.cloneDeep(G))==null?void 0:Ve.split("["))==null?void 0:Je[1])==null?void 0:He.split("]"))==null?void 0:it[0])==null?void 0:ee.split(":"),C="";if(g!=null&&g[0]){let K=(st=xe==null?void 0:xe.find(Y=>(Y==null?void 0:Y.name)===(g==null?void 0:g[0])))==null?void 0:st.compData;if(!K){let Y=(tt=G==null?void 0:G.split("["))==null?void 0:tt[0],w=await ze.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",ve);K=(Re=w==null?void 0:w.find(I=>(I==null?void 0:I.name)===(g==null?void 0:g[0])))==null?void 0:Re.compData}K==null||K.forEach(Y=>{var w,I,J,z,le,F;if((Y==null?void 0:Y.key)==="formContent")(w=Y==null?void 0:Y.contents)==null||w.forEach(U=>{var be;(U==null?void 0:U.key)===(g==null?void 0:g[1])&&(Array.isArray(U==null?void 0:U.value)?C=U==null?void 0:U.value:C=(be=U==null?void 0:U.value)==null?void 0:be.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let U=[],be=(I=K==null?void 0:K.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:I.contents,oe=(g==null?void 0:g[1])??"";if(be!=null&&be.every(q=>Array.isArray(q))){let q=ze.getColumnChild((le=be==null?void 0:be[0])==null?void 0:le.filter(Q=>(Q==null?void 0:Q.label)!=="操作"));(F=Y.contents)==null||F.forEach(Q=>{let ae={};Q=Q==null?void 0:Q.filter(ge=>!(ge!=null&&ge.id)),q==null||q.forEach((ge,fe)=>{let ye=Q[fe];typeof Q[fe]=="number"&&(ye=Q[fe].toString()),(oe===""||oe===ge.prop)&&(ae[ge.prop]=ye)}),U.push(ae)}),U=at(U)}else{let q=(J=be==null?void 0:be.map(Q=>Q==null?void 0:Q.label))==null?void 0:J.filter(Q=>Q!=="操作");(z=Y.contents)==null||z.forEach(Q=>{let ae={};Q=Q==null?void 0:Q.filter(ge=>!(ge!=null&&ge.id)),q==null||q.forEach((ge,fe)=>{let ye=Q[fe];typeof Q[fe]=="number"&&(ye=Q[fe].toString()),(oe===""||oe===ge)&&(ae[ge]=ye)}),U.push(ae)})}C=U}})}return C}else if(G!=null&&G.includes("/")){let g={};return(pe=p.cloneDeep(xe))==null||pe.forEach((C,K)=>{var Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;if((C==null?void 0:C.comp)==="Table"){let Ee=Array.isArray((I=(w=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:w.contents)==null?void 0:I[0])?(F=(le=(z=(J=C==null?void 0:C.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:z.contents)==null?void 0:le[0])==null?void 0:F.some(me=>me==null?void 0:me.children):[],Ze=(oe=(be=(U=C==null?void 0:C.compData)==null?void 0:U.find(me=>(me==null?void 0:me.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:oe.map(me=>(me!=null&&me.find(rt=>rt==null?void 0:rt.id)&&(me=me.slice(1)),me)),Ne=(fe=(ge=(ae=(Q=(q=C==null?void 0:C.compData)==null?void 0:q.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)==null?void 0:ae[0])==null?void 0:ge[0])==null?void 0:fe.label,Ae=($=(ye=C==null?void 0:C.compData)==null?void 0:ye.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:$.contents;if(Ee)(Ee==null?void 0:Ee.length)===0?g[C.name]=g!=null&&g[C.name]?g[C.name]:ze.tableToForm(Ze,Ae):g[Ne]=ze.tableToForm(Ze,Ae);else{const me=[];Ae=Ae.slice(1,Ae.length-1),Ae==null||Ae.forEach((rt,Ue)=>{Ze==null||Ze.forEach(Ke=>{me.push({key:rt.label+Ke[0],value:Ke[Ue+1]})})}),g["form"+K]=me}}else{const Ee=(ce=(re=C.compData)==null?void 0:re.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:ce.contents;g!=null&&g.form||(g.form=[]);const Ze=[];Ee==null||Ee.forEach(Ne=>{Ne.key!==""&&(Ne={key:(Ne==null?void 0:Ne.key)??(Ne==null?void 0:Ne.label),value:Ne==null?void 0:Ne.value},Ze.push(Ne))}),g.form=[...Ze,...p.cloneDeep(g==null?void 0:g.form)]}}),g}else{if(G==="createInsofDataApi"){let g=(ie=p.cloneDeep(R))==null?void 0:ie[0];return g={comp:(ue=p.cloneDeep(g))==null?void 0:ue.comp,compData:(Te=p.cloneDeep(g))==null?void 0:Te.compData,name:(Ge=p.cloneDeep(g))==null?void 0:Ge.name,isShow:(ft=p.cloneDeep(g))==null?void 0:ft.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:y.value},value:{pageData:g}}}return G}},Fe=async(G,R,ve)=>{var Ve,Je,He;let xe=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Me=xe==null?void 0:xe.find(it=>(it==null?void 0:it.name)===(ve==null?void 0:ve[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let it={};for(let ue in p.cloneDeep(G))p.cloneDeep(G)[ue]!=="loginUser"?it[ue]=p.cloneDeep(G)[ue]:it[ue]=((Ve=A.value)==null?void 0:Ve.account)||((Je=A.value)==null?void 0:Je.账号);let ee=[],st=it;Array.isArray(G)||(st=[it]),st==null||st.forEach(ue=>{ee.push({[ue[ve[1]]]:ue})});let tt=[],Re=ee==null?void 0:ee.map(ue=>{var Te;return(Te=Object.keys(ue))==null?void 0:Te[0]});xe==null||xe.forEach(ue=>{var Te;(ue==null?void 0:ue.name)===(ve==null?void 0:ve[0])&&((Te=ue==null?void 0:ue.compData)==null||Te.forEach(Ge=>{var ft;(Ge==null?void 0:Ge.key)==="tableContents"&&((ft=Ge==null?void 0:Ge.contents)==null||ft.forEach(g=>{g!=null&&g.some(C=>Re.includes(C))&&tt.push({[g.find(C=>C.id).id]:g.find(C=>Re.includes(C))})}))}))});let pe=tt==null?void 0:tt.map(ue=>{var Te;return(Te=Object.keys(ue))==null?void 0:Te[0]}),ie=[];if(pe==null||pe.forEach(ue=>{var ft;let Te=(ft=tt==null?void 0:tt.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0].toString())===ue.toString()}))==null?void 0:ft[ue],Ge=ee==null?void 0:ee.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0])===Te});ie.push({id:parseInt(ue),value:{tableData:Ge[Te]}})}),(ie==null?void 0:ie.length)>0)return ie}else if((Me==null?void 0:Me.comp)==="Form"){let it=p.cloneDeep(Me);it.compData=(He=it.compData)==null?void 0:He.map(tt=>{var Re;return(tt==null?void 0:tt.key)==="formContent"&&(tt.contents=(Re=tt.contents)==null?void 0:Re.map(pe=>((pe==null?void 0:pe.key)===(ve==null?void 0:ve[1])&&(pe.value=(G==null?void 0:G[pe==null?void 0:pe.prop])||G),pe))),tt});let ee={};for(let tt in it)tt!=="id"&&(ee[tt]=it[tt]);let st=[];if(st.push({id:Me==null?void 0:Me.id,keyType:ve==null?void 0:ve[1],value:{pageData:ee}}),(st==null?void 0:st.length)>0)return st}}},he=async(G,R,ve)=>{var Ve,Je,He,it,ee,st,tt,Re,pe,ie;let xe=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Me=xe==null?void 0:xe.find(ue=>(ue==null?void 0:ue.name)===(ve==null?void 0:ve[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let ue={};for(let Te in p.cloneDeep(G))p.cloneDeep(G)[Te]!=="loginUser"?ue[Te]=p.cloneDeep(G)[Te]:ue[Te]=((Ve=A.value)==null?void 0:Ve.account)||((Je=A.value)==null?void 0:Je.账号);await p.createInsofDataApi({key:{type:"data",pageKey:R,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ue}})}else if((Me==null?void 0:Me.comp)==="Form"){let ue=p.cloneDeep(Me),Te=Object.keys(G),Ge="";(it=(He=p.cloneDeep(ue))==null?void 0:He.compData)==null||it.forEach(w=>{var I,J;(w==null?void 0:w.key)==="formContent"&&((J=(I=p.cloneDeep(w))==null?void 0:I.contents)==null||J.forEach(z=>{var le;Te.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((le=A.value)==null?void 0:le.姓名)&&(Ge=z==null?void 0:z.key)}))});let ft=[];(ee=Object.values(G[Ge]))==null||ee.forEach(w=>{w!=null&&w.includes("(")&&ft.push(w)}),ft=[...new Set(ft)];const g=ft==null?void 0:ft.map(async w=>{var F,U,be,oe,q,Q,ae,ge,fe,ye,$,re;let I="";(Q=(q=(oe=(be=(U=(F=p.cloneDeep(w))==null?void 0:F.split("("))==null?void 0:U[1])==null?void 0:be.split(")"))==null?void 0:oe[0])==null?void 0:q.split(":"))==null||Q.forEach(ce=>{I=I===""?I+ce.replaceAll("'",""):I+"/"+ce.replaceAll("'","")});let J=[];(re=($=(ye=(fe=(ge=(ae=p.cloneDeep(w))==null?void 0:ae.split("<"))==null?void 0:ge[1])==null?void 0:fe.split(">"))==null?void 0:ye[0])==null?void 0:$.split(":"))==null||re.forEach(ce=>{J.push(ce.replaceAll("'",""))});const z=await ze.getItemData(I,sessionStorage.getItem("systemKey"),"");let le="";return z==null||z.forEach(ce=>{var Ee;ce.name===(J==null?void 0:J[0])&&((Ee=ce==null?void 0:ce.compData)==null||Ee.forEach(Ze=>{var Ne;(Ze==null?void 0:Ze.key)==="formContent"&&((Ne=Ze.contents)==null||Ne.forEach(Ae=>{(Ae==null?void 0:Ae.key)===(J==null?void 0:J[1])&&(le=Ae==null?void 0:Ae.value)}))}))}),{[w]:le}}),C=await Promise.all(g);ue.compData=(tt=(st=p.cloneDeep(ue))==null?void 0:st.compData)==null?void 0:tt.map(w=>{var I,J;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(J=(I=p.cloneDeep(w))==null?void 0:I.contents)==null?void 0:J.map(z=>{var le,F,U,be;return(le=G[Ge])!=null&&le[z==null?void 0:z.key]&&(G[Ge][z==null?void 0:z.key].includes("(")?z.value=(F=C==null?void 0:C.find(oe=>{var q;return((q=Object.keys(oe))==null?void 0:q[0])===G[Ge][z==null?void 0:z.key]}))==null?void 0:F[G[Ge][z==null?void 0:z.key]]:z.value=(be=(U=p.cloneDeep(G))==null?void 0:U[Ge])==null?void 0:be[z==null?void 0:z.key]),z})),w});const K=await p.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Re=K==null?void 0:K.data)==null?void 0:Re.type)==="success"&&((ie=(pe=K==null?void 0:K.data)==null?void 0:pe.result)==null||ie.forEach(w=>{var I,J;((J=(I=w==null?void 0:w.value)==null?void 0:I.pageData)==null?void 0:J.name)===(ve==null?void 0:ve[0])&&(Y=w.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:ue}}))}}},B=(G,R="",ve={})=>{for(const[xe,Me]of Object.entries(G)){const Ve=R?`${R}.${xe}`:xe;Me!==null&&typeof Me=="object"&&!Array.isArray(Me)&&Object.prototype.toString.call(Me)!=="[object Date]"?B(Me,Ve,ve):ve[Ve]=Me}return ve},te=async(G,R,ve,xe)=>{var Je,He,it,ee,st,tt,Re,pe,ie,ue,Te,Ge,ft,g,C,K,Y,w,I,J,z,le,F,U,be;let Me=await ze.getItemData(R,sessionStorage.getItem("systemKey"),""),Ve=Me==null?void 0:Me.find(oe=>(oe==null?void 0:oe.name)===(ve==null?void 0:ve[0]));if(Ve){if(!(ve!=null&&ve[1])&&(Ve==null?void 0:Ve.comp)==="Table"){let oe={},q=[],Q=(He=(Je=Ve==null?void 0:Ve.compData)==null?void 0:Je.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:He.contents;Q!=null&&Q.every(fe=>Array.isArray(fe))?q=(ee=ze.getColumnChild((it=Q==null?void 0:Q[0])==null?void 0:it.filter(fe=>(fe==null?void 0:fe.label)!=="操作")))==null?void 0:ee.map(fe=>fe==null?void 0:fe.prop):q=Q==null?void 0:Q.map(fe=>fe==null?void 0:fe.label);for(let fe in p.cloneDeep(G))if(p.cloneDeep(G)[fe]!=="loginUser"){let ye=B(p.cloneDeep(G)[fe]),$={};for(let re in ye)if(q!=null&&q.find(ce=>ce===re))$[re]=ye[re];else if(q!=null&&q.find(ce=>(ce==null?void 0:ce.toUpperCase())===(re==null?void 0:re.toUpperCase()))){let ce=q==null?void 0:q.find(Ee=>(Ee==null?void 0:Ee.toUpperCase())===(re==null?void 0:re.toUpperCase()));$[ce]=ye[re]}oe[fe]=$}else oe[fe]=((st=A.value)==null?void 0:st.account)||((tt=A.value)==null?void 0:tt.账号);let ae=await p.getInsofDataApi({keyLikes:{tableId:Ve==null?void 0:Ve.id}});if(((pe=(Re=ae==null?void 0:ae.data)==null?void 0:Re.result)==null?void 0:pe.length)>0){let fe=(ue=(ie=ae==null?void 0:ae.data)==null?void 0:ie.result)==null?void 0:ue.map(ye=>ye==null?void 0:ye.id);(fe==null?void 0:fe.length)>0&&await p.batchDeleteInsofDataApi({ids:fe})}let ge=[];if((Te=Ve==null?void 0:Ve.compData)!=null&&Te.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")&&((g=(ft=(Ge=Ve==null?void 0:Ve.compData)==null?void 0:Ge.find(fe=>(fe==null?void 0:fe.key)==="pageColumn"))==null?void 0:ft.contents)!=null&&g.includes("["))){const fe=await p.getInsofDataApi({id:Ve==null?void 0:Ve.tableId});let ye=((w=(Y=(K=(C=fe==null?void 0:fe.data)==null?void 0:C.result)==null?void 0:K[0])==null?void 0:Y.key)==null?void 0:w.pageKey)??"";(I=Object.values(oe))==null||I.forEach($=>{ge.push({key:{type:"data",pageKey:ye,tableId:Ve==null?void 0:Ve.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(J=Object.values(oe))==null||J.forEach(fe=>{ge.push({key:{type:"data",pageKey:R,tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})});(ge==null?void 0:ge.length)>0&&await p.batchAddInsofDataApi({dataList:ge})}else if(!(ve!=null&&ve[1])&&(Ve==null?void 0:Ve.comp)==="Form"){let oe=p.cloneDeep(Ve);oe.compData=(le=(z=p.cloneDeep(oe))==null?void 0:z.compData)==null?void 0:le.map(ae=>{var ge,fe;return(ae==null?void 0:ae.key)==="formContent"&&(ae.contents=(fe=(ge=p.cloneDeep(ae))==null?void 0:ge.contents)==null?void 0:fe.map(ye=>{var $,re;return($=p.cloneDeep(G))!=null&&$[ye==null?void 0:ye.key]&&(ye.value=(re=p.cloneDeep(G))==null?void 0:re[ye==null?void 0:ye.key]),ye})),ae});const q=await p.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let Q="";((F=q==null?void 0:q.data)==null?void 0:F.type)==="success"&&((be=(U=q==null?void 0:q.data)==null?void 0:U.result)==null||be.forEach(ae=>{var ge,fe;((fe=(ge=ae==null?void 0:ae.value)==null?void 0:ge.pageData)==null?void 0:fe.name)===(ve==null?void 0:ve[0])&&(Q=ae.id)}),await p.updateInsofDataApi({id:Q,value:{pageData:oe}}))}}},ne=async G=>{var R,ve,xe,Me,Ve,Je,He,it,ee,st,tt,Re,pe,ie,ue,Te;_.setImportLoading(!0);try{if(G.api){let Ge=new WeakMap;(ve=(R=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:X.value})).data.result)==null?void 0:R.filter(F=>{var U,be;return((U=F==null?void 0:F.key)==null?void 0:U.pageKey)!=="menu"&&((be=F==null?void 0:F.key)==null?void 0:be.pageKey)!=="secret"}))==null||ve.forEach(F=>{Ge[F.key.pageKey]?Ge[F.key.pageKey]=[...Ge[F.key.pageKey],F]:Ge[F.key.pageKey]=[F]});let g=await ze.getItemData((k==null?void 0:k.value)===""?y.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),C="";if(g=g==null?void 0:g.map(F=>{var U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce;if((F==null?void 0:F.comp)==="Form")F.compData=(U=F.compData)==null?void 0:U.map(Ee=>{var Ze;return(Ee==null?void 0:Ee.key)==="formContent"&&(Ee.contents=(Ze=Ee.contents)==null?void 0:Ze.map(Ne=>{var Ae;if((Ne==null?void 0:Ne.value)===""&&(Ne==null?void 0:Ne.type)==="Select"){let me=ze.judgeContents((Ae=p.cloneDeep(Ne))==null?void 0:Ae.optionUrl,Ge);Ne.value=Ne.value||me}return Ne})),Ee});else if((F==null?void 0:F.comp)==="Table"&&(be=F.compData)!=null&&be.find(Ee=>(Ee==null?void 0:Ee.key)==="pageColumn")){let Ee=(q=(oe=F.compData)==null?void 0:oe.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:q.contents,Ze=((ae=(Q=F.compData)==null?void 0:Q.find(me=>(me==null?void 0:me.key)==="pageGroup"))==null?void 0:ae.contents)??"",Ne=(ye=(fe=(ge=Ee==null?void 0:Ee.split("["))==null?void 0:ge[1])==null?void 0:fe.split("]"))==null?void 0:ye[0];C=(($=Ee==null?void 0:Ee.split("["))==null?void 0:$[0])+((ce=(re=W.value)==null?void 0:re.find(me=>(me==null?void 0:me.key)===Ne))==null?void 0:ce.value)}return F}),!(C===""||C==="")){const F=await ze.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);g=g==null?void 0:g.map(U=>{var be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze;if((U==null?void 0:U.comp)==="Table"&&(be=U.compData)!=null&&be.find(Ne=>(Ne==null?void 0:Ne.key)==="pageColumn")){let Ne=(q=(oe=U.compData)==null?void 0:oe.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn"))==null?void 0:q.contents,Ae=((ae=(Q=U.compData)==null?void 0:Q.find(Ke=>(Ke==null?void 0:Ke.key)==="pageGroup"))==null?void 0:ae.contents)??"",me=(ye=(fe=(ge=Ne==null?void 0:Ne.split("["))==null?void 0:ge[1])==null?void 0:fe.split("]"))==null?void 0:ye[0],rt=(($=Ne==null?void 0:Ne.split("["))==null?void 0:$[0])+((ce=(re=W.value)==null?void 0:re.find(Ke=>(Ke==null?void 0:Ke.key)===me))==null?void 0:ce.value),Ue=(Ee=F==null?void 0:F.find(Ke=>(Ke==null?void 0:Ke.name)===(Ae===""?c==null?void 0:c.compName:Ae)))==null?void 0:Ee.compData;U.compData=(Ze=U.compData)==null?void 0:Ze.map(Ke=>{var De;return(Ke==null?void 0:Ke.key)==="tableContents"&&(Ke.contents=(De=Ue==null?void 0:Ue.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:De.contents),Ke})}return U})}let K={};if(((Me=(xe=G==null?void 0:G.extraValues)==null?void 0:xe.input)==null?void 0:Me.length)>0){const F=(Je=(Ve=G==null?void 0:G.extraValues)==null?void 0:Ve.input)==null?void 0:Je.map(async U=>{var be;de!=null&&de.find(oe=>oe===U)?K=await Be(U,g):K[Object.keys(U)[0]]=await Be((be=Object.values(U))==null?void 0:be[0],g,Ge)});await Promise.all(F)}else K=await Be("/",g);let Y=!1;(it=(He=G==null?void 0:G.extraValues)==null?void 0:He.output)==null||it.forEach(F=>{var U,be;(be=(U=Object.values(F))==null?void 0:U[0])!=null&&be.includes(".doc")&&(Y=!0)});let w;if(Y){const F=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await p.axios.post(G.api,K,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{F.close()})}else w=await p.axios.post(G.api,K,{headers:{"Content-Type":"application/json"}});let I=(Re=(tt=(st=(ee=p.cloneDeep(G))==null?void 0:ee.extraValues)==null?void 0:st.output)==null?void 0:tt.map(F=>{var U,be,oe,q,Q,ae,ge,fe,ye,$,re,ce,Ee,Ze,Ne,Ae;if(!((be=(U=Object.values(F))==null?void 0:U[0])!=null&&be.includes(".doc"))){let me=($=(ye=(fe=(q=p.cloneDeep((oe=Object.values(F))==null?void 0:oe[0]))==null?void 0:q.split("["))==null?void 0:fe[((ge=(ae=p.cloneDeep((Q=Object.values(F))==null?void 0:Q[0]))==null?void 0:ae.split("["))==null?void 0:ge.length)-1])==null?void 0:ye.split("]"))==null?void 0:$[0],rt=me==null?void 0:me.split(":"),Ue=(Ee=p.cloneDeep((re=Object.values(F))==null?void 0:re[0]))==null?void 0:Ee.substring(0,p.cloneDeep((ce=Object.values(F))==null?void 0:ce[0]).lastIndexOf("["));if(Ue=(Ne=p.cloneDeep(Ue))==null?void 0:Ne.slice(0,((Ze=p.cloneDeep(Ue))==null?void 0:Ze.length)-1),Ue!=null&&Ue.includes("[")){let Ke="";if((Ae=_a(Ue,"/"))==null||Ae.forEach(De=>{var _e,Ye,Ce,$e,je,Qe,M;if(!(De!=null&&De.includes("[")))Ke=Ke===""?Ke+De.replaceAll("/",""):Ke+"/"+De.replaceAll("/","");else{let Se=p.cloneDeep(De).slice(1,((_e=p.cloneDeep(De))==null?void 0:_e.length)-1),ct=(Qe=(je=($e=(Ce=(Ye=p.cloneDeep(Se))==null?void 0:Ye.split("["))==null?void 0:Ce[1])==null?void 0:$e.split("]"))==null?void 0:je[0])==null?void 0:Qe.split(":"),nt="",et=(M=g==null?void 0:g.find(Ie=>(Ie==null?void 0:Ie.name)===(ct==null?void 0:ct[0])))==null?void 0:M.compData;et==null||et.forEach(Ie=>{var ut;(Ie==null?void 0:Ie.key)==="formContent"&&((ut=Ie==null?void 0:Ie.contents)==null||ut.forEach(We=>{(We==null?void 0:We.key)===(ct==null?void 0:ct[1])&&(nt=We==null?void 0:We.value)}))}),Ke=Ke===""?Ke+nt.replaceAll("/",""):Ke+"/"+nt.replaceAll("/","")}}),Ue=Ke,Ue[(Ue==null?void 0:Ue.length)-1]!=="/")return Ue}}}))==null?void 0:Re.filter(F=>F);I=[...new Set(p.cloneDeep(I))];let J=I==null?void 0:I.map(async F=>{let U=await ze.getItemData(F,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((U==null?void 0:U.length)===0)return await ze.getParentContents(F)});await Promise.all(J);let z=[],le=(ue=(ie=(pe=p.cloneDeep(G))==null?void 0:pe.extraValues)==null?void 0:ie.output)==null?void 0:ue.map(async F=>{var fe,ye,$,re,ce,Ee,Ze,Ne,Ae,me,rt,Ue,Ke,De,_e,Ye,Ce,$e,je,Qe,M,Se,ct,nt,et,Ie,ut,We,dt,ht,mt,Dt,Mt,Et,It,Tt,jt,Rt,qt,Ct,xn,hn,wn,Sn,vn,Tn,gn,In,mn,Gn,Xn,Yn,$n,Bn,yn,On,An,an,Dn,Jn,kt,Jt,gt,ya,zt,cn,Mn,on,Cn,Zt;if((ye=(fe=Object.values(F))==null?void 0:fe[0])!=null&&ye.includes(".doc")){var U=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),be=w.headers["content-disposition"],oe=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=oe.exec(be),Q=q==null?void 0:q[1],ae=document.createElement("a"),ge=window.URL.createObjectURL(U);x.value=[{name:Q,blobUrl:ge}],d.value=!0}else{let jn=(me=(Ae=(Ne=(re=p.cloneDeep(($=Object.values(F))==null?void 0:$[0]))==null?void 0:re.split("["))==null?void 0:Ne[((Ze=(Ee=p.cloneDeep((ce=Object.values(F))==null?void 0:ce[0]))==null?void 0:Ee.split("["))==null?void 0:Ze.length)-1])==null?void 0:Ae.split("]"))==null?void 0:me[0],Bt=jn==null?void 0:jn.split(":"),Gt=(Ke=p.cloneDeep((rt=Object.values(F))==null?void 0:rt[0]))==null?void 0:Ke.substring(0,p.cloneDeep((Ue=Object.values(F))==null?void 0:Ue[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(_e=p.cloneDeep(Gt))==null?void 0:_e.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=y.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let _t="";(Ye=_a(Gt,"/"))==null||Ye.forEach((Ot,Wt)=>{var Ht,$t,un,rn,Kn,Qn,Un,Zn,Na,sa,ba;if(!(Ot!=null&&Ot.includes("[")))_t=_t===""?_t+Ot.replaceAll("/",""):_t+"/"+Ot.replaceAll("/","");else{let ca="",bn="";(Ht=p.cloneDeep(Ot))!=null&&Ht.includes("]")?(ca=p.cloneDeep(Ot).slice(1,(($t=p.cloneDeep(Ot))==null?void 0:$t.length)-1),bn=(Un=(Qn=(Kn=(rn=(un=p.cloneDeep(ca))==null?void 0:un.split("["))==null?void 0:rn[1])==null?void 0:Kn.split("]"))==null?void 0:Qn[0])==null?void 0:Un.split(":")):(ca=p.cloneDeep(Ot).slice(1,(Zn=p.cloneDeep(Ot))==null?void 0:Zn.length),bn=(Na=p.cloneDeep(ca))==null?void 0:Na.split("/"));let ea="",ua=(sa=g==null?void 0:g.find(sn=>(sn==null?void 0:sn.name)===(bn==null?void 0:bn[0])))==null?void 0:sa.compData;ua==null||ua.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Wn=>{(Wn==null?void 0:Wn.key)===(bn==null?void 0:bn[1])&&(ea=Wn==null?void 0:Wn.value)}))}),((ba=_a(Gt,"/"))==null?void 0:ba.length)-1!==Wt?_t=_t===""?_t+ea.replaceAll("/",""):_t+"/"+ea.replaceAll("/",""):_t=_t+l.value+ea.replaceAll("/","")}}),(Ce=y.value)!=null&&Ce.includes(_t)?Gt=y.value:Gt=_t}let ln=p.cloneDeep(($e=Object.keys(F))==null?void 0:$e[0]);if(((je=w==null?void 0:w.data)==null?void 0:je.statusCode)===200||((Qe=w==null?void 0:w.data)==null?void 0:Qe.code)===200){if(((Se=(M=w==null?void 0:w.data)==null?void 0:M.data)!=null&&Se[ln]||(nt=(ct=w==null?void 0:w.data)==null?void 0:ct.result)!=null&&nt[ln])&&(Bt==null?void 0:Bt.length)===1)return await te(((Ie=(et=w==null?void 0:w.data)==null?void 0:et.data)==null?void 0:Ie[ln])||((We=(ut=w==null?void 0:w.data)==null?void 0:ut.result)==null?void 0:We[ln]),p.cloneDeep(Gt),Bt,C);if((ht=(dt=w==null?void 0:w.data)==null?void 0:dt.data)!=null&&ht[ln]||(Dt=(mt=w==null?void 0:w.data)==null?void 0:mt.result)!=null&&Dt[ln]){let _t=await Fe(((Et=(Mt=w==null?void 0:w.data)==null?void 0:Mt.data)==null?void 0:Et[ln])||((Tt=(It=w==null?void 0:w.data)==null?void 0:It.result)==null?void 0:Tt[ln]),p.cloneDeep(Gt),Bt);return _t&&(z=[...z,..._t]),_t}else{if(!((jt=w==null?void 0:w.data)!=null&&jt.data)){let _t=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);_t=_t==null?void 0:_t.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(Bt==null?void 0:Bt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var un;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(un=$t.contents)==null?void 0:un.map(rn=>{var Kn,Qn;return(rn==null?void 0:rn.key)===(Bt==null?void 0:Bt[1])&&(rn.value=(Qn=(Kn=w==null?void 0:w.data)==null?void 0:Kn.result)==null?void 0:Qn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let Ot=[];(Rt=_t==null?void 0:_t.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Rt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);Ot.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(Ot==null?void 0:Ot.length)>0&&await p.batchUpdateInsofDataApi({dataList:Ot});return}if((Bt==null?void 0:Bt.length)===1){const _t=(xn=(Ct=(qt=w==null?void 0:w.data)==null?void 0:qt.data)==null?void 0:Ct.path)==null?void 0:xn.path;let Ot="";(Tn=(vn=(Sn=(wn=(hn=_t==null?void 0:_t.split("("))==null?void 0:hn[1])==null?void 0:wn.split(")"))==null?void 0:Sn[0])==null?void 0:vn.split(":"))==null||Tn.forEach($t=>{var un,rn;Ot=Ot===""?Ot+((un=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:un.trim()):Ot+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Xn=(Gn=(mn=(In=(gn=_t==null?void 0:_t.split("<"))==null?void 0:gn[1])==null?void 0:In.split(">"))==null?void 0:mn[0])==null?void 0:Gn.replaceAll("'",""))==null?void 0:Xn.trim()],Ht;return(Bn=($n=(Yn=w==null?void 0:w.data)==null?void 0:Yn.data)==null?void 0:$n.data)!=null&&Bn[Bt==null?void 0:Bt[0]]?Ht=await te((An=(On=(yn=w==null?void 0:w.data)==null?void 0:yn.data)==null?void 0:On.data)==null?void 0:An[Bt==null?void 0:Bt[0]],Ot,Bt,C):Ht=await he((Dn=(an=w==null?void 0:w.data)==null?void 0:an.data)==null?void 0:Dn.data,Ot,Wt,Ge),Ht}else{const _t=(Jt=(kt=(Jn=w==null?void 0:w.data)==null?void 0:Jn.data)==null?void 0:kt.path)==null?void 0:Jt.path;let Ot="";return(Mn=(cn=(zt=(ya=(gt=_t==null?void 0:_t.split("("))==null?void 0:gt[1])==null?void 0:ya.split(")"))==null?void 0:zt[0])==null?void 0:cn.split(":"))==null||Mn.forEach(Ht=>{var $t,un;Ot=Ot===""?Ot+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):Ot+"/"+((un=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:un.trim())}),await Fe((Zt=(Cn=(on=w==null?void 0:w.data)==null?void 0:on.data)==null?void 0:Cn.data)==null?void 0:Zt[Bt==null?void 0:Bt[0]],Ot,Bt)}}}}});if(await Promise.all(le),(z==null?void 0:z.length)>0){let F=[];z==null||z.forEach(oe=>{F!=null&&F.find(q=>{var Q,ae,ge,fe;return((ae=(Q=q==null?void 0:q.value)==null?void 0:Q.pageData)==null?void 0:ae.name)===((fe=(ge=oe==null?void 0:oe.value)==null?void 0:ge.pageData)==null?void 0:fe.name)})||F.push(oe)});let U=[];F==null||F.forEach(oe=>{var ae,ge,fe,ye;let q=p.cloneDeep(oe);q.value.pageData.compData=(ae=q.value.pageData.compData)==null?void 0:ae.map($=>{var re;return($==null?void 0:$.key)==="formContent"&&($.contents=(re=$.contents)==null?void 0:re.map(ce=>{var Ze,Ne,Ae,me;let Ee=(Ze=p.cloneDeep(z))==null?void 0:Ze.find(rt=>(rt==null?void 0:rt.keyType)===(ce==null?void 0:ce.key));if(Ee){let rt=(me=(Ae=(Ne=Ee.value.pageData.compData)==null?void 0:Ne.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:Ae.contents)==null?void 0:me.find(Ue=>(Ue==null?void 0:Ue.key)===(ce==null?void 0:ce.key));ce.value=rt==null?void 0:rt.value}return ce})),$}),U.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let Q=[];(ye=(fe=(ge=q==null?void 0:q.value)==null?void 0:ge.pageData)==null?void 0:fe.compData)==null||ye.forEach($=>{var re;($==null?void 0:$.key)==="formContent"&&((re=$==null?void 0:$.contents)==null||re.forEach(ce=>{var Ee,Ze,Ne,Ae,me,rt;if((Ze=(Ee=ce==null?void 0:ce.optionUrl)==null?void 0:Ee.menuSelect)!=null&&Ze.find(Ue=>Ue==null?void 0:Ue.includes("[")))if(Q!=null&&Q.find(Ue=>{var Ke,De,_e;return((Ke=Ue==null?void 0:Ue.key)==null?void 0:Ke.join(","))===((_e=(De=ce==null?void 0:ce.optionUrl)==null?void 0:De.menuSelect)==null?void 0:_e.join(","))})){let Ue=(Ne=Q==null?void 0:Q.find(Ke=>{var De,_e,Ye;return((De=Ke==null?void 0:Ke.key)==null?void 0:De.join(","))===((Ye=(_e=ce==null?void 0:ce.optionUrl)==null?void 0:_e.menuSelect)==null?void 0:Ye.join(","))}))==null?void 0:Ne.value;Ue.push({key:ce==null?void 0:ce.prop,groups:(Ae=ce==null?void 0:ce.optionUrl)==null?void 0:Ae.groupSelect,value:ce==null?void 0:ce.value}),Q=Q==null?void 0:Q.map(Ke=>{var De,_e,Ye;return((De=Ke==null?void 0:Ke.key)==null?void 0:De.join(","))===((Ye=(_e=ce==null?void 0:ce.optionUrl)==null?void 0:_e.menuSelect)==null?void 0:Ye.join(","))&&(Ke.value=Ue),Ke})}else Q.push({key:(me=ce==null?void 0:ce.optionUrl)==null?void 0:me.menuSelect,value:[{key:ce==null?void 0:ce.prop,groups:(rt=ce==null?void 0:ce.optionUrl)==null?void 0:rt.groupSelect,value:ce==null?void 0:ce.value}]})}))}),(Q==null?void 0:Q.length)>0&&(Q=Q==null?void 0:Q.map($=>{var ce;let re="";return(ce=$==null?void 0:$.key)==null||ce.forEach(Ee=>{var Ze;if(!(Ee!=null&&Ee.includes("[")))re=re===""?re+Ee:re+"/"+Ee;else{let Ne="",Ae=(Ze=Ee==null?void 0:Ee.replaceAll("[","").replaceAll("]",""))==null?void 0:Ze.split(":");g==null||g.forEach(me=>{var rt;(me==null?void 0:me.name)===(Ae==null?void 0:Ae[0])&&((rt=me==null?void 0:me.compData)==null||rt.forEach(Ue=>{var Ke;(Ue==null?void 0:Ue.key)==="formContent"&&((Ke=Ue==null?void 0:Ue.contents)==null||Ke.forEach(De=>{(De==null?void 0:De.prop)===(Ae==null?void 0:Ae[1])&&(Ne=De==null?void 0:De.value)}))}))}),re=re+l.value+Ne}}),$.key=re,$})),Q==null||Q.forEach($=>{var Ze,Ne,Ae;let re=(Ze=Ge[$.key])==null?void 0:Ze.find(me=>{var rt,Ue,Ke,De,_e,Ye,Ce;return((Ue=(rt=me==null?void 0:me.value)==null?void 0:rt.pageData)==null?void 0:Ue.name)===((_e=(De=(Ke=$==null?void 0:$.value)==null?void 0:Ke[0])==null?void 0:De.groups)==null?void 0:_e[0])&&((Ce=(Ye=me==null?void 0:me.value)==null?void 0:Ye.pageData)==null?void 0:Ce.name)!==void 0}),ce=re==null?void 0:re.id,Ee=(Ne=re==null?void 0:re.value)==null?void 0:Ne.pageData;Ee.compData=(Ae=Ee.compData)==null?void 0:Ae.map(me=>{var rt;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(rt=me.contents)==null?void 0:rt.map(Ue=>{var De;let Ke=(De=$.value)==null?void 0:De.find(_e=>(_e==null?void 0:_e.key)===(Ue==null?void 0:Ue.prop));return Ke&&(Ue.value=Ke.value),Ue})),me}),U.push({id:ce,value:{pageData:Ee}})})});let be=(Te=p.cloneDeep(z))==null?void 0:Te[0];(U==null?void 0:U.length)>0&&await p.batchUpdateInsofDataApi({dataList:U})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},de=["createInsofDataApi"],Xe=ko(async G=>{ne(G)},100),ot=async G=>{var He,it,ee,st,tt;const R=p.cloneDeep(G);let ve,xe=new WeakMap,Me=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:X.value});(it=(He=Me.data.result)==null?void 0:He.filter(Re=>{var pe,ie;return((pe=Re==null?void 0:Re.key)==null?void 0:pe.pageKey)!=="menu"&&((ie=Re==null?void 0:Re.key)==null?void 0:ie.pageKey)!=="secret"}))==null||it.forEach(Re=>{xe[Re.key.pageKey]?xe[Re.key.pageKey]=[...xe[Re.key.pageKey],Re]:xe[Re.key.pageKey]=[Re]}),G!=null&&G[0].path&&(ve=await(R==null?void 0:R.map(async(Re,pe)=>{var K,Y,w,I,J,z,le,F,U,be,oe,q,Q,ae,ge,fe;const ue=(K=xe[Re==null?void 0:Re.path])==null?void 0:K.filter(ye=>{var $;return(($=ye==null?void 0:ye.key)==null?void 0:$.type)==="data"});let Te="";const Ge=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);ue==null||ue.forEach(ye=>{var $,re,ce,Ee,Ze;((re=($=ye==null?void 0:ye.value)==null?void 0:$.tableData)==null?void 0:re.算法名称)===((ce=R==null?void 0:R[pe])==null?void 0:ce.method)&&(Te=(Ze=(Ee=ye==null?void 0:ye.value)==null?void 0:Ee.tableData)==null?void 0:Ze.算法体)});const ft=await ze.getItemData(Re==null?void 0:Re.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let g="",C=(J=(I=(w=(Y=ft==null?void 0:ft[0])==null?void 0:Y.compData)==null?void 0:w.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:I.contents)==null?void 0:J.findIndex(ye=>(ye==null?void 0:ye.prop)==="算法体");return(le=(z=ft==null?void 0:ft[0])==null?void 0:z.compData)==null||le.forEach(ye=>{var $;(ye==null?void 0:ye.key)==="tableContents"&&(($=ye==null?void 0:ye.contents)==null||$.forEach(re=>{re!=null&&re.find(ce=>ce===(Re==null?void 0:Re.method))&&(g=re[C])}))}),{buttonName:((F=R==null?void 0:R[pe])==null?void 0:F.method)||((oe=(be=(U=ue==null?void 0:ue[0])==null?void 0:U.value)==null?void 0:be.tableData)==null?void 0:oe.算法名称),api:(Te===""?(ae=(Q=(q=ue==null?void 0:ue[0])==null?void 0:q.value)==null?void 0:Q.tableData)==null?void 0:ae.算法体:Te)||g,content:Ge==null?void 0:Ge.filter(ye=>ye.comp!=="methodButton"),extraContent:(ge=p.cloneDeep(Re.value))==null?void 0:ge.slice(1),methodName:(Re==null?void 0:Re.path)??"",extraValues:(fe=R==null?void 0:R[pe])==null?void 0:fe.data}})));const Ve=R==null?void 0:R.map(async Re=>{var ft,g,C,K,Y,w;const pe=(ft=Me.data.result)==null?void 0:ft.filter(I=>{var J,z,le;return((J=I==null?void 0:I.key)==null?void 0:J.parentTable)===""&&((z=I==null?void 0:I.key)==null?void 0:z.type)==="method"&&((le=I==null?void 0:I.key)==null?void 0:le.methodName)===I.method}),ie=pe==null?void 0:pe[0],ue=(g=Me.data.result)==null?void 0:g.filter(I=>{var J,z;return((J=I==null?void 0:I.key)==null?void 0:J.type)==="methodData"&&((z=I==null?void 0:I.key)==null?void 0:z.tableId)===(ie==null?void 0:ie.id)}),Te=await ze.getItemData(y.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Ge=ue==null?void 0:ue[0];return{buttonName:(C=ie==null?void 0:ie.key)==null?void 0:C.methodKey,api:(Y=(K=Ge==null?void 0:Ge.value)==null?void 0:K.tableData)==null?void 0:Y[0],content:Te==null?void 0:Te.filter(I=>I.comp!=="methodButton"),extraContent:(w=p.cloneDeep(Re.value))==null?void 0:w.slice(1),methodName:(Re==null?void 0:Re.method)??""}}),Je=(ee=G==null?void 0:G[0])!=null&&ee.path&&((st=G==null?void 0:G[0])==null?void 0:st.path)!==""?await Promise.all(ve):await Promise.all(Ve);i.value=Je==null?void 0:Je.filter(Re=>Re==null?void 0:Re.extraContent),(tt=i.value)==null||tt.forEach(Re=>{var pe;Re.api===""&&((pe=Re.content)==null||pe.forEach(ie=>{var ue;ie.comp=="Table"&&D.setExtraContents(ze.methodTableToContent(ie.compData,(ue=Re.extraContent)==null?void 0:ue[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!T.value&&await ot(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(G,R)=>{var ve,xe,Me;return e.unref(V)!=="edit"?(e.openBlock(),e.createElementBlock("div",_c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ve=i.value)==null?void 0:ve.filter(Ve=>(Ve==null?void 0:Ve.buttonName)!=="保存"),Ve=>{var Je;return e.openBlock(),e.createElementBlock("div",null,[Ve.api!==""?(e.openBlock(),e.createBlock(e.unref(Mo._sfc_main),{key:0,disabled:e.unref(P)===e.unref(y)&&!((Je=Ve==null?void 0:Ve.buttonName)!=null&&Je.includes("预览")),class:"calculator-content",modelValue:Ve.buttonName,onClickTrigger:He=>e.unref(Xe)(Ve),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Me=e.unref(y))==null?void 0:Me[((xe=e.unref(y))==null?void 0:xe.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Mo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:se,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Oe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Tc=Ft._export_sfc(Sc,[["__scopeId","data-v-11fca7e0"]]),Ic={};function Bc(a,i){return" 567 "}const Ac=Ft._export_sfc(Ic,[["render",Bc]]),Nc={class:"module content"},Vc={class:"module data"},Oc={class:"module layout"},Mc={class:"form-content"},zc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=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}]),h=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:""}]),D=e.ref({}),E=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),O=W=>{var P;D.value=p.cloneDeep(W),l("change",(P=_())==null?void 0:P.compData)},H=W=>{var P,X;if((W==null?void 0:W.buttonName)==="确认"){const y=p.cloneDeep(W==null?void 0:W.content);switch(d.value){case"create":E.value.push({...y,index:((P=E.value)==null?void 0:P.length)+1});break}l("change",(X=_())==null?void 0:X.compData),c.visible=!1}else c.visible=!1},V=(W,P)=>{var X,y;switch(W){case"create":(X=h.value)==null||X.forEach(L=>{L.value=""}),d.value="create",c.visible=!0;break;case"update":(y=h.value)==null||y.forEach(L=>{L.value=P[L==null?void 0:L.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(P,1),d.value="delete";break}},ke=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,W=>{var P,X;W&&(D.value=((P=W==null?void 0:W.find(y=>y.key==="signConfig"))==null?void 0:P.contents)??{},E.value=((X=W==null?void 0:W.find(y=>y.key==="signTypeList"))==null?void 0:X.contents)??[])},{immediate:!0}),(W,P)=>{const X=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Nc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(y,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=L=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(L,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(L==null?void 0:L.label),1),e.createElementVNode("div",null,[e.createVNode(y,{type:"primary",size:"small",onClick:A=>V("update",{...L,index:k+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(y,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Oc,[e.createVNode(Vt.ssForm,{rowContents:v.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ke,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Mc,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Rc=Ft._export_sfc(zc,[["__scopeId","data-v-487e0536"]]),Lc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var _,O;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(O=s==null?void 0:s.stepConfig)==null?void 0:O.active}),x=(_,O)=>{c.value=O,l("clickStep",_,O)},v=_=>Vt.getComponent(_),h=()=>{var O;const _=(O=s==null?void 0:s.stepList)==null?void 0:O.find((H,V)=>V+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,O)=>{var ke,W,P,X,y;const H=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ke=a.stepConfig)==null?void 0:ke.direction,active:d.value,"finish-status":"success",simple:(W=a.stepConfig)==null?void 0:W.simple,"align-center":((P=a.stepConfig)==null?void 0:P.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(L,k)=>(e.openBlock(),e.createBlock(H,{key:k,class:"step-item",onClick:A=>x(L,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:L==null?void 0:L.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:L==null?void 0:L.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(X=a.stepConfig)!=null&&X.allowTrigger&&((y=a.stepConfig)!=null&&y.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(L,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(L==null?void 0:L.type)),{modelValue:L.value,"onUpdate:modelValue":A=>L.value=A,onClickTrigger:D,onChangeTrigger:E,content:L==null?void 0:L.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(se=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},se||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Fc=Ft._export_sfc(Lc,[["__scopeId","data-v-d7c99969"]]),Pc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),x=(v,h)=>{l("clickStep",v,h)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var h,D;d.value=(h=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(v,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Fc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),$c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),jc=Ft._export_sfc($c,[["__scopeId","data-v-4172a886"]]),Kc={class:"line-content"},Uc={class:"line-time"},Wc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(jc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:v})=>[e.createElementVNode("span",Kc,e.toDisplayString(x),1),e.createElementVNode("span",Uc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),Hc=Ft._export_sfc(Wc,[["__scopeId","data-v-b4d9deed"]]),qc={class:"tabs-content"},Gc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createVNode(Vt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Xc=Ft._export_sfc(Gc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Yc={class:"type-select"},Jc=["onClick"],Qc={class:"list-icon"},Zc={__name:"modelSelect",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rr),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(v)},[e.createElementVNode("div",Qc,[e.createVNode(x,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Jc)]))),128))])}}},eu=Ft._export_sfc(Zc,[["__scopeId","data-v-91799bf8"]]),tu={class:"fill-content"},nu={class:"operate-content"},au={class:"collapse-title-content"},ou={class:"collapse-title-item"},lu={key:1},ru=["onClick"],iu={class:"icon-content"},su={key:0,class:"edit-content"},cu=["onClick"],uu={class:"comp-child"},pu={__name:"modelFill",setup(a){const i=lo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),v=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,P)=>(H===P&&(W.content=!0),W));x.value=V},h=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,P)=>(H===P&&(W.content=!1),W));x.value=V,c.value=p.cloneDeep(s.value)},D=(H,V)=>{var X;let ke=(X=p.cloneDeep(x.value))==null?void 0:X.map((y,L)=>(H===L&&(y.content=!1),y));x.value=ke;const W=p.cloneDeep(s.value),P=W==null?void 0:W.filter((y,L)=>(L===H&&(y.name=V),y));i.setOriginalData(P),i.setItemData(P)};e.watch(()=>s.value,()=>{var H,V,ke;!s.value||((H=s.value)==null?void 0:H.length)===0?c.value=[]:c.value=(V=p.cloneDeep(s.value))==null?void 0:V.filter(W=>(W==null?void 0:W.comp)!=="methodButton"),d.value=c.value,x.value=(ke=p.cloneDeep(d.value))==null?void 0:ke.map((W,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const E=H=>ma(H),_=(H,V,ke)=>{var P,X;if(!H)return;let W=p.cloneDeep(s.value);W=(P=W==null?void 0:W.map((y,L)=>(L===ke&&(y.compData=H),y)))==null?void 0:P.filter(y=>(y==null?void 0:y.comp)!=="methodButton"),x.value=(X=p.cloneDeep(W))==null?void 0:X.map((y,L)=>({id:L,content:!1})),i.setOriginalData(W),i.setItemData(W)},O=H=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(s.value),ke=V==null?void 0:V.filter((W,P)=>P!==H);i.setOriginalData(ke),i.setItemData(ke),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,V)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",tu,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",nu,[e.createVNode(xl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:W,index:P})=>{var X,y,L,k,A,T,se,Oe,at,Be;return[e.createElementVNode("div",au,[e.createElementVNode("div",ou,[(y=(X=x.value)==null?void 0:X.find(Fe=>Fe.id===P))!=null&&y.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:W.name&&W.name!==""?"8px":"0px"})},e.toDisplayString(W.name),5)),(k=(L=x.value)==null?void 0:L.find(Fe=>Fe.id===P))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",lu,[e.createVNode(Vt._sfc_main$2,{modelValue:W.name,"onUpdate:modelValue":Fe=>W.name=Fe,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(Fe=>Fe.id===P))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Fe=>v(P),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ru))]),e.createElementVNode("div",iu,[(Oe=(se=x.value)==null?void 0:se.find(Fe=>Fe.id===P))!=null&&Oe.content?(e.openBlock(),e.createElementBlock("div",su,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Fe=>h(P),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(Fe=>D(P,W.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Be=(at=x.value)==null?void 0:at.find(Fe=>Fe.id===P))!=null&&Be.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Fe=>O(P),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,cu))])])]}),content:e.withCtx(({item:W,index:P})=>{var X,y;return[e.createElementVNode("div",uu,[e.createTextVNode(e.toDisplayString(E(W.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(W.comp+"Operate")),{itemContents:W==null?void 0:W.compData,originalItemContents:(y=(X=d.value)==null?void 0:X.find((L,k)=>k===P))==null?void 0:y.compData,onChange:L=>_(L,W,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},du=Ft._export_sfc(pu,[["__scopeId","data-v-a46a44b9"]]),fu={key:0,class:"show-content"},hu={style:{display:"flex"}},vu={__name:"modelShow",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>ma(d);return(d,x)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",fu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",hu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},gu=Ft._export_sfc(vu,[["__scopeId","data-v-3f3e863e"]]),mu={class:"tabs-header"},yu={class:"tabs-list"},bu={class:"tab-name"},ku={class:"tab-actions"},xu=["onClick"],wu=["onClick"],Du=["onClick"],Cu={class:"model-operate"},Eu={class:"model-select",style:{display:"unset"}},_u={class:"existing-components"},Su={class:"component-list"},Tu=["onClick"],Iu={class:"component-info"},Bu={class:"component-type"},Au={class:"component-name"},Nu={class:"model-fill"},Vu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(""),v=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),O=e.ref(null),H=lo(p.pinia),{itemData:V}=p.storeToRefs(H),ke=()=>{x.value="新增标签页",v.value.title="",h.value=-1,d.value=!0},W=G=>{x.value="修改标签页",v.value.title=c.value[G].title,h.value=G,d.value=!0},P=G=>{const R=L(G);_.value.delete(R),c.value.splice(G,1),ot()},X=()=>{if(v.value.title.trim()){if(h.value===-1){const G={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:y()};c.value.push(G)}else c.value[h.value].title=v.value.title,c.value[h.value].value=v.value.title,c.value[h.value].label=v.value.title;d.value=!1,ot()}},y=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,L=G=>{const R=c.value[G];return R.id||(R.id=y()),R.id},k=G=>{var xe;E.value=G;const R=L(G);O.value=p.cloneDeep(V.value);let ve=_.value.get(R);!ve&&((xe=c.value[G].children)==null?void 0:xe.length)>0&&(ve=Oe(c.value[G].children)),ve?H.setItemData(p.cloneDeep(ve)):H.setItemData([]),D.value=!0},A=e.computed(()=>{const G=Kt.useModelComp(p.pinia),R=p.storeToRefs(G).itemData.value;return console.log("可用组件数据",R),!R||!Array.isArray(R)?[]:R.filter(ve=>{var xe;if(ve.comp==="Tabs"&&E.value>=0){const Me=L(E.value);if((xe=ve.compData)==null?void 0:xe.some(Je=>{var He;return Je.key==="stepList"&&((He=Je.contents)==null?void 0:He.some(it=>it.id===Me))}))return!1}return!0})}),T=G=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[G]||G,se=G=>{var R;try{const ve=p.cloneDeep(G);ve.id=Date.now()+Math.random(),ve.comp==="Tabs"&&((R=ve.compData)==null||R.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Ve=>{Ve.id=y()})}));const xe=p.cloneDeep(V.value);xe.push(ve),H.setItemData(xe)}catch(ve){console.error("添加组件失败:",ve)}},Oe=G=>G.map(R=>{var ve;switch(R.type){case"form":return{comp:"Form",name:R.value||"表单",compData:at(R.content)};case"table":return{comp:"Table",name:R.value||"表格",compData:Be(R.content)};default:return{comp:"Unknown",name:R.value||"",compData:((ve=R.content)==null?void 0:ve.originalData)||[]}}}),at=G=>{if(!G)return[];const R=[];return G.rowContents&&R.push({key:"formContent",contents:G.rowContents}),G.buttonValue&&R.push({key:"formButton",contents:G.buttonValue}),typeof G.isEnableWrap<"u"&&R.push({key:"enableWrap",contents:G.isEnableWrap}),R},Be=G=>[],Fe=()=>{if(E.value>=0&&E.value<c.value.length){const G=L(E.value);_.value.set(G,p.cloneDeep(V.value)),c.value[E.value].children=te(V.value),console.log("保存后的数据",te(V.value))}D.value=!1,E.value=-1,O.value=null,ot()},he=()=>{O.value&&H.setItemData(p.cloneDeep(O.value)),D.value=!1,E.value=-1,O.value=null},B=()=>{D.value&&he()},te=G=>{if(!Array.isArray(G))throw new Error("sourceData must be an array");return G.map((R,ve)=>{if(!R||typeof R!="object")return R;const{comp:xe,name:Me,compData:Ve}=R;switch(xe){case"Form":return{type:"form",content:ne(Ve||[]),value:"表单"};case"Table":return{type:"table",content:de(Ve||[]),value:"表格"};default:return{type:"xxx",content:Xe(Ve||[]),value:""}}})},ne=G=>{const R={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ve={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return G.forEach((xe,Me)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Me}:`,xe);return}const{key:Ve,contents:Je}=xe,He=ve[Ve];if(!He){console.warn(`Unknown Form config key: ${Ve}`);return}Ve==="enableWrap"?R[He]=!!Je:R[He]=Array.isArray(Je)?Je:[]}),R},de=G=>{const R={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ve={header:"columns",tableContents:"tableData"};return G.forEach((xe,Me)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Me}:`,xe);return}const{key:Ve,contents:Je}=xe,He=ve[Ve];if(!He){console.warn(`Unknown Table config key: ${Ve}`);return}R[He]=Array.isArray(Je)?Je:[]}),R},Xe=G=>(console.log("Default conversion logic - to be implemented"),{originalData:G,processed:!1,componentType:"unknown"}),ot=()=>{const G=[{key:"stepList",contents:c.value}];l("change",G)};return e.watch(()=>s.itemContents,G=>{if(G&&G.length>0){const R=G.find(ve=>ve.key==="stepList");R&&R.contents&&(c.value=R.contents.map(ve=>({title:ve.title||"",value:ve.value||ve.title||"",label:ve.label||ve.title||"",children:ve.children||[],id:ve.id||y()})))}},{immediate:!0,deep:!0}),(G,R)=>{const ve=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Ve=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",mu,[R[6]||(R[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ve,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),R[5]||(R[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Je,He)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:He},[e.createElementVNode("span",bu,e.toDisplayString(Je.title),1),e.createElementVNode("div",ku,[e.createElementVNode("button",{onClick:it=>W(He)},"修改标题",8,xu),e.createElementVNode("button",{onClick:it=>k(He)},"布局调整",8,wu),e.createElementVNode("button",{onClick:it=>P(He)},"删除",8,Du)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":R[2]||(R[2]=Je=>d.value=Je),title:x.value,onBeforeDestroy:R[3]||(R[3]=Je=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:R[1]||(R[1]=Je=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:X},"确定")]),default:e.withCtx(()=>[e.createVNode(Ve,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:v.value.title,"onUpdate:modelValue":R[0]||(R[0]=Je=>v.value.title=Je),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":R[4]||(R[4]=Je=>D.value=Je),title:"布局调整",fullScreen:"",onBeforeDestroy:B},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:he},"取消"),e.createElementVNode("button",{onClick:Fe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Cu,[e.createElementVNode("div",Eu,[e.createVNode(eu),e.createElementVNode("div",_u,[R[8]||(R[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Je=>(e.openBlock(),e.createElementBlock("div",{key:Je.id,class:"component-item",onClick:He=>se(Je)},[e.createElementVNode("div",Iu,[e.createElementVNode("span",Bu,e.toDisplayString(T(Je.comp)),1),e.createElementVNode("span",Au,e.toDisplayString(Je.name),1)]),R[7]||(R[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Tu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:G.innerWidth},[e.createVNode(gu)])),e.createElementVNode("div",Nu,[e.createVNode(du)])])]),_:1},8,["modelValue"])])}}},Ou=Ft._export_sfc(Vu,[["__scopeId","data-v-9096ed0d"]]);function Mu(){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 zu(a){return{type:"line",...a}}function Ru(){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 Lu(a){return{type:"bar",barWidth:"60%",...a}}function Fu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Pu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Pn={line:{initBaseoptions:Mu,initSeries:zu},bar:{initBaseoptions:Ru,initSeries:Lu},pie:{initBaseoptions:Fu,initSeries:Pu}},$o=Kt.useMenuState(p.pinia),Nl=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},v=a==null?void 0:a.find(_=>{const{name:O}=_;return O===c});if(!v)return{names:s,values:l};const h=(E=v==null?void 0:v.compData)==null?void 0:E.find(_=>{const{key:O}=_;return O==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const O=_==null?void 0:_[0];let H=!1;p.isObject(O)&&(O!=null&&O.id)&&(H=!0);let V=d,ke=x;H&&(V=V+1,ke=ke+1);const W=_==null?void 0:_[V],P=_==null?void 0:_[ke];s.push(W),l.push(P)}),{names:s,values:l}},$u=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let v=null;const h=sessionStorage.getItem("systemKey");if(x&&$o.activeMenuPath&&(v=await ze.getItemData(`${$o.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");v=await ze.getItemData(`${D}^${s}`,h,"")}return Nl(v,{group:l,nameCol:c,valueCol:d})},ju=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),v=await ze.getItemData(d,x,"");return Nl(v,{group:s,nameCol:l,valueCol:c})},xo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:v,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return v&&h&&Vt.isNumber(D)&&Vt.isNumber(E)?await $u({menu:l,mainKey:v,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Vt.isNumber(d)&&Vt.isNumber(x)?await ju({menu:l,group:c,nameCol:d,valueCol:x}):s},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=v({data:E});return h.series.push(_),h},Uu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=v({data:E});return h.series.push(_),h},Wu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Pn==null?void 0:Pn[l];if(!d)return;const{initBaseoptions:x,initSeries:v}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;const _=[];for(let H=0;H<D.length;H++){const V=D[H],ke=E[H];_.push({name:V,value:ke})}const O=v({data:_});return h.series.push(O),h},Hu=async(a=[])=>{var x,v,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((v=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await Uu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Wu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},qu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await Hu(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Fr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Gu=Ft._export_sfc(qu,[["__scopeId","data-v-d4c081e8"]]),Xu={class:"chart-module layout"},Yu={class:"chart-module content"},Ju={class:"chart-module content"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np={class:"form-content"},ap={class:"dialog-footer"},op=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),h=()=>{var pe;d.value=x(),(pe=d.value)==null||pe.forEach(ie=>{var Te;const ue=ie==null?void 0:ie.prop;ie.value=(Te=v==null?void 0:v.value)==null?void 0:Te[ue]}),c.visible=!0},D=pe=>{v.value=pe},E=()=>{var pe;c.visible=!1,l("change",(pe=tt())==null?void 0:pe.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),O=e.ref([]),H=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ke=()=>{const pe=O.value,ie=p.cloneDeep(pe);return ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=V.value)==null?void 0:Ge[Te]}),ie},W=pe=>{var ue;V.value=pe;const ie=ke();O.value=ie,l("change",(ue=tt())==null?void 0:ue.compData)},P=async()=>{const pe=await ze.getMenusContent(),ie=ke();ie==null||ie.forEach(ue=>{(ue==null?void 0:ue.prop)==="menu"&&(ue.contents=pe)}),O.value=ie,_.visible=!0,await Je(V.value.menu),await ee(V.value.group)},X=e.reactive({visible:!1,width:"840",title:"详情页配置"}),y=e.ref([]),L=()=>[{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:[]}],k=e.ref({}),A=()=>{const pe=y.value,ie=p.cloneDeep(pe);return ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=k.value)==null?void 0:Ge[Te]}),ie},T=pe=>{var ue;k.value=pe;const ie=A();y.value=ie,l("change",(ue=tt())==null?void 0:ue.compData)},se=async()=>{await B();const pe=p.cloneDeep(Oe.value),ie=A();ie==null||ie.forEach(ue=>{var Ge;const Te=ue==null?void 0:ue.prop;ue.value=(Ge=k==null?void 0:k.value)==null?void 0:Ge[Te],Te==="mainKey"&&(ue.contents=pe)}),y.value=ie,X.visible=!0},Oe=e.ref([]),at=e.ref([]),Be=e.ref({}),Fe=e.ref({}),he=()=>{const{compData:pe}=xe.value||{},ie=pe==null?void 0:pe.find(K=>{const{key:Y}=K;return Y==="header"}),ue=(ie==null?void 0:ie.contents)||[],Te=ue==null?void 0:ue.filter((K,Y)=>{const{label:w}=K;return w!=="操作"}),Ge=Te==null?void 0:Te.findIndex((K,Y)=>{const{isMainKey:w}=K;return w});if(Ge<0)return[];const ft=pe==null?void 0:pe.find(K=>{const{key:Y}=K;return Y==="tableContents"}),g=(ft==null?void 0:ft.contents)||[];return g==null?void 0:g.map(K=>{const Y=K==null?void 0:K[0];let w=Ge;p.isObject(Y)&&(Y!=null&&Y.id)&&(w=w+1);const I=K==null?void 0:K[w];return{label:I,value:I}})},B=async()=>{const pe=await he();Oe.value=pe},te=async pe=>{const ie=sessionStorage.getItem("systemKey");return await ze.getItemData(pe,ie,"")},ne=async pe=>{const ie=pe;at.value=ie==null?void 0:ie.map(ue=>{const{name:Te}=ue;return Be.value[Te]=ue,{label:Te,value:Te}})},de=pe=>{const{comp:ie,compData:ue}=Fe.value||{};if(ie==="Table"){let Te=A();Te=Te.filter(Ge=>{const{prop:ft}=Ge;return ft!=="formItems"}),He(Te,ue),y.value=Te}},Xe=async()=>{var ue,Te;const pe=(ue=k==null?void 0:k.value)==null?void 0:ue.mainKey,ie=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(pe){const ft=`${ie==null?void 0:ie.join("/")}^${pe}`,g=await te(ft);await ne(g);const C=A();C==null||C.forEach(K=>{(K==null?void 0:K.prop)==="group"&&(K.contents=at.value)}),y.value=C}};e.watch(()=>{var pe;return(pe=k==null?void 0:k.value)==null?void 0:pe.mainKey},async(pe,ie)=>{pe!=ie&&pe&&await Xe()});const ot=async pe=>{const ie=Be.value[pe];Fe.value=ie,await de()};e.watch(()=>{var pe;return(pe=k==null?void 0:k.value)==null?void 0:pe.group},async(pe,ie)=>{pe!=ie&&pe&&ot(pe)});const G=async()=>{var ie;await Xe();const pe=(ie=k.value)==null?void 0:ie.group;await ot(pe)},R=e.ref([]),ve=e.ref({}),xe=e.ref({}),Me=async pe=>{const ie=pe==null?void 0:pe.join("/"),ue=sessionStorage.getItem("systemKey");return await ze.getItemData(ie,ue,"")},Ve=async pe=>{const ie=await Me(pe);R.value=ie==null?void 0:ie.map(ue=>{const{name:Te}=ue;return ve.value[Te]=ue,{label:Te,value:Te}})},Je=async(pe,ie)=>{await Ve(pe);const ue=ke();ue==null||ue.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=R.value)}),O.value=ue};e.watch(()=>{var pe;return(pe=V==null?void 0:V.value)==null?void 0:pe.menu},async(pe,ie)=>{const ue=pe==null?void 0:pe.join("/"),Te=ie==null?void 0:ie.join("/");ue!=Te&&await Je(pe)});const He=(pe,ie)=>{const ue=ie==null?void 0:ie.find(g=>{const{key:C}=g;return C==="header"}),Te=(ue==null?void 0:ue.contents)||[],Ge=Te==null?void 0:Te.filter((g,C)=>{const{label:K}=g;return K!=="操作"}),ft=Ge==null?void 0:Ge.map((g,C)=>{const{label:K}=g;return{label:K,value:C}});pe==null||pe.forEach(g=>{const C=g==null?void 0:g.prop;(C==="nameCol"||C==="valueCol")&&(g.contents=ft)})},it=pe=>{const{comp:ie,compData:ue}=xe.value||{};if(ie==="Table"){V.value.formItems=[];let Te=ke();Te=Te.filter(Ge=>{const{prop:ft}=Ge;return ft!=="formItems"}),He(Te,ue),O.value=Te}},ee=async pe=>{const ie=ve.value[pe];xe.value=ie,await it()};e.watch(()=>{var pe;return(pe=V==null?void 0:V.value)==null?void 0:pe.group},async(pe,ie)=>{pe!=ie&&ee(pe)});const st=async()=>{var ue,Te;const pe=(ue=V.value)==null?void 0:ue.menu;await Je(pe);const ie=(Te=V.value)==null?void 0:Te.group;await ee(ie)},tt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),Re=()=>{c.visible=!1,_.visible=!1,X.visible=!1};return e.onMounted(async()=>{var ie,ue,Te;O.value=H(),y.value=L();const pe=s==null?void 0:s.itemContents;v.value=((ie=pe==null?void 0:pe.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:ie.contents)??{},V.value=((ue=pe==null?void 0:pe.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:ue.contents)??{},await st(),k.value=((Te=pe==null?void 0:pe.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await G()}),(pe,ie)=>{const ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xu,[ie[4]||(ie[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[0]||(ie[0]=Te=>h())},{default:e.withCtx(()=>ie[3]||(ie[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Yu,[ie[6]||(ie[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[1]||(ie[1]=Te=>P())},{default:e.withCtx(()=>ie[5]||(ie[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Ju,[ie[8]||(ie[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ue,{id:"themeButton",onClick:ie[2]||(ie[2]=Te=>se())},{default:e.withCtx(()=>ie[7]||(ie[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Re,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[9]||(ie[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ue,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>ie[10]||(ie[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:Re,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[11]||(ie[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ue,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>ie[12]||(ie[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:X.visible,title:X.title,onBeforeDestroy:Re,width:X.width},{default:e.withCtx(()=>[e.createElementVNode("div",np,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createVNode(ue,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>ie[13]||(ie[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ue,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>ie[14]||(ie[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),lp=Ft._export_sfc(op,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},rp=Ka.exports,jo;function ip(){return jo||(jo=1,function(a,i){(function(s,l){l()})(rp,function(){function s(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,_){var O=new XMLHttpRequest;O.open("GET",D),O.responseType="blob",O.onload=function(){h(O.response,E,_)},O.onerror=function(){console.error("could not download file")},O.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ze.commonjsGlobal=="object"&&ze.commonjsGlobal.global===ze.commonjsGlobal?ze.commonjsGlobal:void 0,v=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(D,E,_){var O=x.URL||x.webkitURL,H=document.createElement("a");E=E||D.name||"download",H.download=E,H.rel="noopener",typeof D=="string"?(H.href=D,H.origin===location.origin?d(H):c(H.href)?l(D,E,_):d(H,H.target="_blank")):(H.href=O.createObjectURL(D),setTimeout(function(){O.revokeObjectURL(H.href)},4e4),setTimeout(function(){d(H)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,_){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,_),E);else if(c(D))l(D,E,_);else{var O=document.createElement("a");O.href=D,O.target="_blank",setTimeout(function(){d(O)})}}:function(D,E,_,O){if(O=O||open("","_blank"),O&&(O.document.title=O.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var H=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||H&&V||v)&&typeof FileReader<"u"){var W=new FileReader;W.onloadend=function(){var y=W.result;y=ke?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),O?O.location.href=y:location=y,O=null},W.readAsDataURL(D)}else{var P=x.URL||x.webkitURL,X=P.createObjectURL(D);O?O.location=X:location.href=X,O=null,setTimeout(function(){P.revokeObjectURL(X)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}ip();const ra=p.useLoginState(),{loginUserInfo:La}=p.storeToRefs(ra),Pt=Kt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:sp,itemGridData:aa,curStructureCompIds:Ko,isSubmitCurStructure:cp,isRefreshCurStructure:up,freshContent:Uo,routeToChildPath:pp,payloadTypes:dp,pageMapState:Xa,itemExtendData:Fa}=p.storeToRefs(Pt),fn=Kt.useMenuState(p.pinia),{activeTopMenuPath:fp,activeMenuPath:Lt,platform:of,activeAsideMenu:hp,buttonTriggerType:vp}=p.storeToRefs(fn),kn=da.useUnit(p.pinia),{selectTitle:Wo}=p.storeToRefs(kn),gp=ze.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(gp),Ho=Kt.useAuthorityState(p.pinia),Ya=e.ref(!0),va=e.ref(0),Ja=e.ref([]),ga=e.computed(async()=>{var i,s;const a=(i=Lt.value)!=null&&i.startsWith("/")?(s=Lt.value)==null?void 0:s.substring(1):Lt.value;return(a==null?void 0:a.includes(ro.value))||await _p(a)}),mp=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(Lt.value!=="/平台管理/菜单管理")},yp=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},bp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Wo.value.length===1)bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value),kn.setSelectIndex(""),kn.setSelectMenu(""),kn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),l,!1,[],await ga.value);let c=-1;(i=Wo.value)==null||i.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&s.push(d)}),kn.setSelectTitle(s),l!==""?kn.setSelectMenu(a==null?void 0:a.key):(kn.setSelectIndex(""),kn.setSelectMenu(""))}bt.value=Aa(bt.value),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value)},po=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const v=await x(d);if(((c=v==null?void 0:v.data)==null?void 0:c.code)===200)return v.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},qo=async(a,i,s,l)=>{var c,d,x,v,h,D,E,_,O,H,V;try{const ke=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:k}})),W=(v=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:v.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),P=JSON.parse(p.cloneDeep(JSON.stringify(a))),X=(h=P==null?void 0:P.results)==null?void 0:h.map(k=>k.id);let y;s?y=(_=(E=(D=Xa.value)==null?void 0:D[Lt.value])==null?void 0:E.filter(k=>{var A,T,se;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((se=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:se.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):y=(V=(H=(O=Xa.value)==null?void 0:O[Lt.value])==null?void 0:H.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:V.map(k=>k==null?void 0:k.id);const L=y==null?void 0:y.filter(k=>!(X!=null&&X.includes(k))&&typeof k=="number");(ke==null?void 0:ke.length)>0&&await p.batchAddInsofDataApi({dataList:ke}),(W==null?void 0:W.length)>0&&await p.batchUpdateInsofDataApi({dataList:W}),(L==null?void 0:L.length)>0&&await p.batchDeleteInsofDataApi({ids:L})}catch(ke){throw new Error(ke)}},kp=async a=>{var D,E,_,O,H,V,ke,W,P,X;fn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(sp.value)));if(!cp.value)return fn.setCacheStructures({key:vp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(y=>y.id),l=s.filter(y=>{var L;return!((L=Ko.value)!=null&&L.includes(y))}),c=(D=Ko.value)==null?void 0:D.filter(y=>!s.includes(y)),d=[...l,...c].filter(y=>typeof y!==null&&typeof y<"u"),x=i==null?void 0:i.filter(y=>!y.id),v=i==null?void 0:i.filter(y=>y.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(po(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(po(x,"create",a)),v&&(v==null?void 0:v.length)>0&&h.push(po(v,"update",a)),aa.value&&((E=aa.value)!=null&&E.isDelete&&((O=(_=aa.value)==null?void 0:_.results)==null?void 0:O.length)>0&&((V=(H=aa.value)==null?void 0:H.results)!=null&&V.every(y=>typeof y=="number"))?await p.batchDeleteInsofDataApi({ids:(ke=aa.value)==null?void 0:ke.results}):(console.log("itemGridData.value",aa.value),h.push(await qo(aa.value,"gridLayout")))),Fa.value)for(const y in Fa.value)h.push(await qo((W=Fa.value)==null?void 0:W[y],"extend",{target:y,compId:(X=(P=Fa.value)==null?void 0:P[y])==null?void 0:X.compId},y));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(y=>{p.ElMessage.success(y)}),fn.setContentLoading(!1)},Qa=a=>ma(a),bt=e.ref([]),xp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Vl=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),wp=async a=>{var l,c,d,x,v,h;let i=p.cloneDeep(Lt).value;i=i+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(v=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:v.map(_=>_==null?void 0:_.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},Go=async a=>{var i,s;try{let l=p.cloneDeep(Lt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var v;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((v=Object.values(x==null?void 0:x.singleContent))==null?void 0:v[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var v;return((v=x==null?void 0:x.data)==null?void 0:v.code)===200}))){const x=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),v=await p.batchDeleteInsofDataApi({ids:x});((s=v==null?void 0:v.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await wp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},Dp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Lt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Ol=e.ref(0),Za=e.ref(null),eo=async(a,i="data",s)=>{var l,c,d,x,v,h,D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Go(a):await ze.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id,a),await ra.setLogRecordAsync({type:"删除",data:a},Lt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(se=>typeof(se==null?void 0:se.id)=="string")){const se=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Oe=>({content:a==null?void 0:a.content,singleContent:Oe,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Go(se)}else{const se=(v=a==null?void 0:a.selectItems)==null?void 0:v.map(Oe=>Oe==null?void 0:Oe.id);await p.batchDeleteInsofDataApi({ids:se}),await ra.setLogRecordAsync({type:"删除",data:se},Lt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let se={};for(let at in a==null?void 0:a.singleContent)at!=="id"&&at!=="index"&&(se[at]=a==null?void 0:a.singleContent[at]);const Oe=await ze.addTableContents(i,Lt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a,{param:s});Za.value={resId:Oe,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Pt.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let se=[],Oe=[],at=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Be=s==null?void 0:s.url,Fe="",he="";if(at!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((O=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:O.id)!="string"){const B=await p.getInsofDataApi({id:at});Fe=((W=(ke=(V=(H=B==null?void 0:B.data)==null?void 0:H.result)==null?void 0:V[0])==null?void 0:ke.key)==null?void 0:W.tableId)??"",he=((L=(y=(X=(P=B==null?void 0:B.data)==null?void 0:P.result)==null?void 0:X[0])==null?void 0:y.key)==null?void 0:L.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(B=>{let te={};for(let ne in B)ne!=="id"&&ne!=="index"&&(te[ne]=B[ne]);typeof(B==null?void 0:B.id)=="number"?se.push({id:B==null?void 0:B.id,value:{tableData:te}}):Oe.push({key:{type:i,pageKey:Be||he||Lt.value,tableId:Fe||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Oe==null?void 0:Oe.length)>0&&await p.batchAddInsofDataApi({dataList:Oe}),(se==null?void 0:se.length)>0&&await p.batchUpdateInsofDataApi({dataList:se})}else{let se={},Oe=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let at in a==null?void 0:a.singleContent)at!=="id"&&at!=="index"&&(se[at]=a==null?void 0:a.singleContent[at]);await ze.fixTableContents(i,Lt.value,a==null?void 0:a.index,Oe,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a)}Pt.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await Dp(a==null?void 0:a.value);Pt.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(se=>se==null?void 0:se.isMainKey)||(bt.value=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value)),bt.value=Aa(bt.value),Do.value&&(a==null?void 0:a.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},Cp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await Cp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await ze.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(v=>v.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(fn.setActiveMenuPath(null),fn.setActiveMenuPath(i))},no=a=>{bt.value=Aa(a),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value)},Ep=async a=>{var i;await e.nextTick(),(i=hp.value)!=null&&i.isRouter?Ho.setRouterPageStructure(a):Ho.setRouterPageStructure([])},_p=async a=>{var d,x,v,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-2>O&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-1>O&&(s=s===""?s+_:s+"/"+_)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(v=l==null?void 0:l.data)==null?void 0:v.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},Sp=e.ref(),Fn=e.ref(null),Tp=a=>{var D,E,_,O,H,V,ke,W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(he=>{var B;return((B=he==null?void 0:he.key)==null?void 0:B.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Sp.value=i;const s=(O=(_=i==null?void 0:i.find(he=>{var B,te,ne;return(ne=(te=(B=he==null?void 0:he.value)==null?void 0:B.tableData)==null?void 0:te.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:_.value)==null?void 0:O.tableData;if(!s)return Fn.value=null;const l=(ke=(V=(H=i==null?void 0:i.find(he=>{var B,te,ne;return(ne=(te=(B=he==null?void 0:he.value)==null?void 0:B.tableData)==null?void 0:te.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:H.key)==null?void 0:V.relatedInfo)==null?void 0:ke.compId,c=(W=bt.value)==null?void 0:W.find(he=>(he==null?void 0:he.id)===l);if(!c)return Fn.value=null;const d=(X=s==null?void 0:s.任务关键词)==null?void 0:X[((P=s==null?void 0:s.任务关键词)==null?void 0:P.length)-1],x=(k=(L=(y=c==null?void 0:c.compData)==null?void 0:y.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:L.contents)==null?void 0:k.findIndex(he=>(he==null?void 0:he.prop)===d),v=(Oe=(se=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:T.contents)==null?void 0:se.find(he=>he==null?void 0:he.isMainKey))==null?void 0:Oe.prop,h=(Fe=(Be=(at=c==null?void 0:c.compData)==null?void 0:at.find(he=>(he==null?void 0:he.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:Fe[x];Fn.value={prop:d,value:h,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:v},console.log("getPageExtendData:",s,i)},Ip=()=>{var a,i;console.log("倒计时结束时"),Kt.ElMessageBox.alert(`超时未提交,【${(i=(a=Lt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ml=()=>{var a,i,s,l;try{if(fp.value!=="报告中心"||!((a=Lt.value)!=null&&a.includes(ro.value)))return;const c=(i=bt.value)==null?void 0:i.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,v=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));v!=null&&v.value&&(v==null?void 0:v.value)!==(d==null?void 0:d.value)&&Pt.setLockingPage(Lt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},wo=e.ref([]),Bp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Lt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Lt.value,up.value],async a=>{var d,x,v,h,D,E,_,O,H,V,ke,W,P;if(!Lt.value)return;Pt.setLockingPage(""),bt.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,Ya.value=!1,Ua.value=!0;const s=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(v=a==null?void 0:a[0])==null?void 0:v.substring(1):a==null?void 0:a[0];let l=new WeakMap;if((D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:dp.value})).data.result)==null?void 0:h.filter(X=>{var y,L;return((y=X==null?void 0:X.key)==null?void 0:y.pageKey)!=="menu"&&((L=X==null?void 0:X.key)==null?void 0:L.pageKey)!=="secret"}))==null||D.forEach(X=>{l[X.key.pageKey]?l[X.key.pageKey]=[...l[X.key.pageKey],X]:l[X.key.pageKey]=[X]}),Ja.value=l,s){fn.setContentLoading(!0),sessionStorage.setItem("pageKey",Lt.value),bt.value=await ze.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value,l);let X="";if(!bt.value){let y=(_=(E=s==null?void 0:s.split("/"))==null?void 0:E.filter((L,k)=>{var A;return k!==((A=s==null?void 0:s.split("/"))==null?void 0:A.length)-1}))==null?void 0:_.join("/");bt.value=await ze.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value,l),X=(H=s==null?void 0:s.split("/"))==null?void 0:H[((O=s==null?void 0:s.split("/"))==null?void 0:O.length)-1]}await ra.setLogRecordAsync({type:"查询",data:bt.value},Lt.value),bt.value=Ec(bt.value),X!==""&&(bt.value=(V=bt.value)==null?void 0:V.map(y=>{var L;return y!=null&&y.isShow&&(y.compData=(L=y==null?void 0:y.compData)==null?void 0:L.map(k=>{var A,T,se,Oe,at;if((k==null?void 0:k.key)==="tableContents"){let Be=[],Fe="";Fe=(Oe=(se=(T=(A=y==null?void 0:y.compData)==null?void 0:A.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:T.contents)==null?void 0:se[0])==null?void 0:Oe.prop,Be=(at=k.contents)==null?void 0:at.filter(he=>(he==null?void 0:he[Fe])===X||(he==null?void 0:he[1])===X),k.contents=Be}return k})),y})),bt.value=Aa(bt.value),await Ep(bt.value),Ml(),Tp(s),wo.value=(ke=bt.value)==null?void 0:ke.map(y=>({label:y==null?void 0:y.name,value:y==null?void 0:y.id})),Pt.setExtraContents([]),kn.setSelectTitle([]),kn.setSelectIndex(""),kn.setSelectMenu(""),Pt.setItemData(bt.value),Pt.setOriginalData(bt.value),Pt.setCurStructureCompIds((W=bt.value)==null?void 0:W.map(y=>y==null?void 0:y.id)),Pt.setRefreshCurStructure(!1),kn.setSelectTitle((P=Lt.value)==null?void 0:P.split("/").map(y=>({value:y.trim()}))),fn.setChildMenu(""),fn.setContentLoading(!1),Pt.setTableLoading(!1),Ua.value=!1}else bt.value=[],Ua.value=!1;e.nextTick(()=>{va.value=va.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Uo.value,async()=>{if(Uo.value){let a=await ze.getItemData(Lt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ga.value);bt.value=Aa(a),Pt.setFreshContent(!1),Ml()}},{deep:!0});const Ap=async()=>{var c,d,x,v,h,D,E,_;fn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=La.value)==null?void 0:c.account)||((d=La.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=La.value)==null?void 0:x.account)||((v=La.value)==null?void 0:v.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(O=>O==null?void 0:O.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(O=>O==null?void 0:O.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(O=>O!==null&&O))&&(await p.batchDeleteInsofDataApi({ids:s}),await ra.setLogRecordAsync({type:"删除",data:s},Lt.value)),fn.setActiveMenuPath(pp.value),bt.value=null,Pt.setRouteToChildPath(""),fn.setChildMenu("")},Np=a=>new RegExp("button","i").test(a),Vp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),zl=a=>{if(Vp(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&fn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Rl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Op=a=>{Ol.value=a},fa=e.reactive({index:0,comp:null}),Mp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:zp(i,s)}))}),Ll=(a,i)=>{var h,D,E,_,O;const s=i?a:a-2,l=(h=bt.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=d===-1?0:d,v=(O=(_=l==null?void 0:l.compData)==null?void 0:_.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:O.contents;return{valid:v==null?void 0:v.every(H=>H==null?void 0:H[x+1]),length:(v==null?void 0:v.length)||0}},zp=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Ll(i,!0);fa.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Fl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=bt.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:v}=Ll(i);v?(fa.index=i,fa.comp=(d=bt.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else fa.index=i,fa.comp=(x=bt.value)==null?void 0:x[a]},Do=e.computed(()=>{var a,i;return(i=(a=Vl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Do.value,a=>{a&&Fl(0)},{immediate:!0});const Rp={class:"layout"},Lp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:O}=_;return O==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:O}=_;return O==="children"});return D==null?void 0:D.contents}),v=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const O=[];if(D=D.map(H=>{const V=H.span;return V?(H.span=Number(V),_=_+H.span):O.push(H),H}),_<24){const H=Math.floor((24-_)/E);O.forEach(V=>{V.span=H})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var H;const _=e.resolveComponent("el-col"),O=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Rp,[e.createVNode(O,{style:e.normalizeStyle({height:(H=d.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(V,ke)=>(e.openBlock(),e.createBlock(_,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var W;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(va),compName:V.name,index:(V==null?void 0:V.id)??ke,height:(W=d.value)==null?void 0:W.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Fp=Ft._export_sfc(Lp,[["__scopeId","data-v-ab9a36ed"]]),Pp={class:"layout-operate"},$p={class:"layout-module"},jp={class:"collapse-title-item"},Kp={class:"collapse-title"},Up={class:"icon-content"},Wp=["onClick"],Hp={class:"comp-child"},qp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{ke()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),v=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",L(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],O=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),H=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(T=>{const{key:se}=T;return se==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(T=>{const{key:se}=T;return se==="children"});return A==null?void 0:A.contents}),ke=()=>{var k;c.value=O.value||{},D.value=(V==null?void 0:V.value)||[],x.value=v(),x.value=(k=x.value)==null?void 0:k.map(A=>{var se;const{prop:T}=A;return A.value=(se=H.value)==null?void 0:se[T],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const W=(k,A)=>{const T=p.cloneDeep(V==null?void 0:V.value);T[A].span=k.span,D.value=T,l("change",L(),!0)},P=k=>ma(k),X=(k,A,T)=>{if(!k)return;const se=p.cloneDeep(V==null?void 0:V.value);se[T]&&(se[T].compData=k,D.value=se,l("change",L(),!0))},y=k=>{Kt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((T,se)=>k!==se),D.value=A,l("change",L(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const T=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Pp,[e.createElementVNode("div",$p,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Vt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=se=>h(se))},null,8,["rowContents"])])]),e.createVNode(xl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:se,index:Oe})=>[e.createElementVNode("div",jp,[e.createElementVNode("div",Kp,e.toDisplayString(se.name),1),e.createElementVNode("div",Up,[e.createElementVNode("div",{onClick:e.withModifiers(at=>y(Oe),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Wp)])])]),content:e.withCtx(({item:se,index:Oe})=>[e.createElementVNode("div",Hp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:E.value[Oe],key:Oe,isEnableWrap:!0,onChange:at=>W(at,Oe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(se.comp+"Operate")),{itemContents:se==null?void 0:se.compData,originalItemContents:se.compData,onChange:at=>X(at,se,Oe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Gp=Ft._export_sfc(qp,[["__scopeId","data-v-ba05456e"]]),Xp=typeof window<"u";var Xo;Xp&&((Xo=window==null?void 0:window.navigator)!=null&&Xo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dn(a){return a==null}function Pl(){}const Yp=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(Yp)));function Jp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function Yo(a,i=16){if(typeof a!="function")return Pl;const s=(...d)=>{a(...d)};if(i<=0)return $l(s);let l=0,c;return function(...d){const x=Date.now(),v=x-l;clearTimeout(c),v>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-v))}}function Qp(a,i=100){if(typeof a!="function")return Pl;const s=(...c)=>{a(...c)};if(i<=0)return $l(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function $l(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const Sa=new Set,jl=new WeakMap;function Zp(){Sa.forEach(a=>{a(...jl.get(a))}),Sa.clear()}function nn(a,...i){if(typeof a!="function")return a;jl.set(a,i),!Sa.has(a)&&(Sa.add(a),Sa.size===1&&Promise.resolve().then(Zp))}const Kl=Symbol("LAYOUT_KEY"),Ul=Symbol("EMITTER_KEY");function ed(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function mo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=td(a[s]);return i}function td(a){return{...a}}function Wl(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function pa(a,i,s){const l=ql(a),c=Gl(a),d=Array(a.length);for(let x=0,v=c.length;x<v;x++){let h=c[x];h.static||(h=nd(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function nd(a,i,s,l){if(s)for(;i.y>0&&!Ta(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Ta(a,i);)i.y--}let c;for(;c=Ta(a,i);)i.y=c.y+c.h;return i}function ad(a,i){const s=ql(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Ta(s,d);)d.y++}return a}function Jo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Ta(a,i){for(let s=0,l=a.length;s<l;s++)if(Wl(a[s],i))return a[s]}function Hl(a,i){return a.filter(s=>Wl(s,i))}function ql(a){return a.filter(i=>i.static)}function yo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,v=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=Gl(a);h&&(D=D.reverse());const E=Hl(D,i);if(d&&E.length)return i.x=x,i.y=v,i.moved=!1,a;for(let _=0,O=E.length;_<O;_++){const H=E[_];H.moved||i.y>H.y&&i.y-H.y>H.h/4||(H.static?a=Qo(a,H,i,c):a=Qo(a,i,H,c))}return a}function Qo(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Ta(a,c))return yo(a,s,void 0,c.y,!1)}return yo(a,s,void 0,s.y+1,!1)}function od(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function rd(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function id(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function Gl(a){return Array.from(a).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 sd(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let v=0;v<s.length;v++)if(typeof x[s[v]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[v]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function cd(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function Zo(a){return ud(a)}function ud(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function el(a,i,s,l){return pd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function pd(a){return typeof a=="number"&&!Number.isNaN(a)}function dd(a,i){const s=Yl(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const x=s[c];i>a[x]&&(l=x)}return l}function Xl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function fd(a,i,s,l,c,d,x){if(i[l])return mo(i[l]);let v=a;const h=Yl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const O=D[E];if(i[O]){v=i[O];break}}return v=mo(v||[]),pa(ad(v,{cols:d}),x)}function Yl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let hd="auto";function vd(){return typeof document<"u"}function tl(){return vd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):hd}var Ea={exports:{}},gd=Ea.exports,nl;function md(){return nl||(nl=1,function(a,i){(function(s,l){a.exports=l()})(gd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=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},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ke(r.key),r)}}function v(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ke(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&_(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function _(n,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},_(n,t)}function O(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function H(n){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,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,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 O(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,m){for(;!Object.prototype.hasOwnProperty.call(f,m)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ke(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var W=function(n){return!(!n||!n.Window)&&n instanceof n.Window},P=void 0,X=void 0;function y(n){P=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),X=n}function L(n){return W(n)?n:(n.ownerDocument||n).defaultView||X.window}typeof window<"u"&&window&&y(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===X||W(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=L(n)||X;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function se(n){var t=n.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 Oe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var at={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=at.draggable,t.map.drag=at,t.methodDict.drag="draggable",r.actions.drag=at.defaults},listeners:{"interactions:before-action-move":se,"interactions:action-resume":se,"interactions:action-move":Oe,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return T.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):T.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:se,move:Oe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Be=at,Fe={init:function(n){var t=n;Fe.document=t.document,Fe.DocumentFragment=t.DocumentFragment||he,Fe.SVGElement=t.SVGElement||he,Fe.SVGSVGElement=t.SVGSVGElement||he,Fe.SVGElementInstance=t.SVGElementInstance||he,Fe.Element=t.Element||he,Fe.HTMLElement=t.HTMLElement||Fe.Element,Fe.Event=t.Event,Fe.Touch=t.Touch||he,Fe.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 he(){}var B=Fe,te={init:function(n){var t=B.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&B.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!B.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?B.PointerEvent===n.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,te.wheelEvent=B.document&&"onmousewheel"in B.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=te;function de(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Xe(n,t){for(;T.element(n);){if(G(n,t))return n;n=ot(n)}return null}function ot(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function G(n,t){return X!==P&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var R=function(n){return n.parentNode||n.host};function ve(n,t){for(var o,r=[],u=n;(o=R(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function xe(n,t,o){for(;T.element(n);){if(G(n,t))return!0;if((n=ot(n))===o)return G(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Ve(n){var t=n instanceof B.SVGElement?n.getBoundingClientRect():n.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 Je(n){var t,o=Ve(n);if(!ne.isIOS7&&o){var r={x:(t=(t=L(n))||X).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function He(n){for(var t=[];n;)t.push(n),n=ot(n);return t}function it(n){return!!T.string(n)&&(B.document.querySelector(n),!0)}function ee(n,t){for(var o in t)n[o]=t[o];return n}function st(n,t,o){return n==="parent"?ot(o):n==="self"?t.getRect(o):Xe(o,n)}function tt(n,t,o,r){var u=n;return T.string(u)?u=st(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Je(u)),u}function Re(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function pe(n){return!n||"x"in n&&"y"in n||((n=ee({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function ie(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ue(n,t,o){var r=o&&n.options[o];return Re(tt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},T.string(n)&&n.search(" ")!==-1&&(n=Ge(n)),T.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(T.object(n)&&(t=n,n=""),T.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(T.array(t))for(var u=0,f=t;u<f.length;u++){var m=f[u];Te(n,m,o,r)}else if(T.object(t))for(var b in t)Te(Ge(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Ge(n){return n.trim().split(/ +/)}var ft=function(n,t){return Math.sqrt(n*n+t*t)},g=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(g.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function K(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function Y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function w(n){return n instanceof B.Event||n instanceof B.Touch}function I(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function J(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&w(n)?(I("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):I("page",n,t),t}function z(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function le(n,t,o){var r=t.length>1?U(t):t[0];J(r,n.page),function(u,f){f=f||{},ne.isOperaMobile&&w(u)?I("screen",u,f):I("client",u,f)}(r,n.client),n.timeStamp=o}function F(n){var t=[];return T.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function U(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function be(n){if(!n.length)return null;var t=F(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function oe(n,t){var o=t+"X",r=t+"Y",u=F(n),f=u[0][o]-u[1][o],m=u[0][r]-u[1][r];return ft(f,m)}function q(n,t){var o=t+"X",r=t+"Y",u=F(n),f=u[1][o]-u[0][o],m=u[1][r]-u[0][r];return 180*Math.atan2(m,f)/Math.PI}function Q(n){return T.string(n.pointerType)?n.pointerType:T.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof B.Touch?"touch":"mouse"}function ae(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var ge=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(ge.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var fe=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},ye=function(n){return fe([],n)},$=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},re=function(n,t){return n[$(n,t)]},ce=function(n){D(o,n);var t=H(o);function o(r,u,f){var m;d(this,o),(m=t.call(this,u._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return m.type=f,m.target=S,m.currentTarget=S,m.dropzone=j,m.dragEvent=u,m.relatedTarget=u.target,m.draggable=u.interactable,m.timeStamp=u.timeStamp,m}return v(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,m=$(f,function(S){var j=S.dropzone,N=S.element;return j===r.dropzone&&N===r.target});u.activeDrops.splice(m,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ge);function Ee(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,m=u.element;t.dropzone=f,t.target=m,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Ze(n,t){for(var o=function(f,m){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var N=j[S];if(N.options.drop.enabled){var Z=N.options.drop.accept;if(!(T.element(Z)&&Z!==m||T.string(Z)&&!G(m,Z)||T.func(Z)&&!Z({dropzone:N,draggableElement:m})))for(var we=0,Pe=N.getAllElements();we<Pe.length;we++){var Le=Pe[we];Le!==m&&b.push({dropzone:N,element:Le,rect:N.getRect(Le)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Ne(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,m=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],N=j.dropzone,Z=j.element,we=j.rect,Pe=N.dropCheck(t,o,u,f,Z,we);m.push(Pe?Z:null)}var Le=function(qe){for(var pt,lt,vt,xt=[],At=0;At<qe.length;At++){var yt=qe[At],wt=qe[pt];if(yt&&At!==pt)if(wt){var tn=R(yt),Ut=R(wt);if(tn!==yt.ownerDocument)if(Ut!==yt.ownerDocument)if(tn!==Ut){xt=xt.length?xt:ve(wt);var pn=void 0;if(wt instanceof B.HTMLElement&&yt instanceof B.SVGElement&&!(yt instanceof B.SVGSVGElement)){if(yt===Ut)continue;pn=yt.ownerSVGElement}else pn=yt;for(var En=ve(pn,wt.ownerDocument),zn=0;En[zn]&&En[zn]===xt[zn];)zn++;var Ra=[En[zn-1],En[zn],xt[zn]];if(Ra[0])for(var wa=Ra[0].lastChild;wa;){if(wa===Ra[1]){pt=At,xt=En;break}if(wa===Ra[2])break;wa=wa.previousSibling}}else vt=wt,(parseInt(L(lt=yt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(L(vt).getComputedStyle(vt).zIndex,10)||0)&&(pt=At);else pt=At}else pt=At}return pt}(m);return r.activeDrops[Le]||null}function Ae(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ce(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ce(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ce(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ce(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ce(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ce(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function me(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Ee(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function rt(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Ze(t,o.element));var m=r,b=Ne(o,m,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ae(o,0,m)}}var Ue={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Be),r.prototype.dropzone=function(f){return function(m,b){if(T.object(b)){if(m.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),j=Object.keys(S).reduce(function(Z,we){return Z[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=S[we],Z},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(j),m.options.drop.listeners=j}return T.func(b.ondrop)&&m.on("drop",b.ondrop),T.func(b.ondropactivate)&&m.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&m.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&m.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&m.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&m.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?m.options.drop.overlap=b.overlap:T.number(b.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(m.options.drop.accept=b.accept),"checker"in b&&(m.options.drop.checker=b.checker),m}return T.bool(b)?(m.options.drop.enabled=b,m):m.options.drop}(this,f)},r.prototype.dropCheck=function(f,m,b,S,j,N){return function(Z,we,Pe,Le,qe,pt,lt){var vt=!1;if(!(lt=lt||Z.getRect(pt)))return!!Z.options.drop.checker&&Z.options.drop.checker(we,Pe,vt,Z,pt,Le,qe);var xt=Z.options.drop.overlap;if(xt==="pointer"){var At=ue(Le,qe,"drag"),yt=J(we);yt.x+=At.x,yt.y+=At.y;var wt=yt.x>lt.left&&yt.x<lt.right,tn=yt.y>lt.top&&yt.y<lt.bottom;vt=wt&&tn}var Ut=Le.getRect(qe);if(Ut&&xt==="center"){var pn=Ut.left+Ut.width/2,En=Ut.top+Ut.height/2;vt=pn>=lt.left&&pn<=lt.right&&En>=lt.top&&En<=lt.bottom}return Ut&&T.number(xt)&&(vt=Math.max(0,Math.min(lt.right,Ut.right)-Math.max(lt.left,Ut.left))*Math.max(0,Math.min(lt.bottom,Ut.bottom)-Math.max(lt.top,Ut.top))/(Ut.width*Ut.height)>=xt),Z.options.drop.checker&&(vt=Z.options.drop.checker(we,Pe,vt,Z,pt,Le,qe)),vt}(this,f,m,b,S,j,N)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},ee(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ue.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.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(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Ze(t,o.element),u.events=Ae(o,0,r),u.events.activate&&(Ee(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":rt,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;me(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;rt(n,t),me(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.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:Ze,getDrop:Ne,getDropEvents:Ae,fireDropEvents:me,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ke=Ue;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(j){return j.pointer}),f=r==="start",m=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=oe(u,b),o.box=be(u),o.scale=1,o.ds=0,o.angle=q(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=oe(u,b),o.box=be(u),o.scale=o.distance/t.gesture.startDistance,o.angle=q(u,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,T.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var _e={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return T.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):T.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=_e,t.methodDict.gesture="gesturable",r.actions.gesture=_e.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},Ye=_e;function Ce(n,t,o,r,u,f,m){if(!t)return!1;if(t===!0){var b=T.number(f.width)?f.width:f.right-f.left,S=T.number(f.height)?f.height:f.bottom-f.top;if(m=Math.min(m,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=b>=0?f.left:f.right;return o.x<j+m}if(n==="top"){var N=S>=0?f.top:f.bottom;return o.y<N+m}if(n==="right")return o.x>(b>=0?f.right:f.left)-m;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-m}return!!T.element(r)&&(T.element(t)?t===r:xe(r,t,u))}function $e(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var je,Qe,M={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;M.cursors=function(f){return f.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),M.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(m,b,S){return T.object(b)?(m.options.resize.enabled=b.enabled!==!1,m.setPerAction("resize",b),m.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?m.options.resize.axis=b.axis:b.axis===null&&(m.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?m.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(m.options.resize.square=b.square),m):T.bool(b)?(m.options.resize.enabled=b,m):m.options.resize}(this,f,n)},t.map.resize=M,t.methodDict.resize="resizable",u.actions.resize=M.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:ee({},f),corrected:ee({},f),previous:ee({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),$e(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,m=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,N=S.corrected,Z=S.delta,we=S.previous;if(ee(we,N),m){if(ee(N,b),f==="reposition"){if(N.top>N.bottom){var Pe=N.top;N.top=N.bottom,N.bottom=Pe}if(N.left>N.right){var Le=N.left;N.left=N.right,N.right=Le}}}else N.top=Math.min(b.top,j.bottom),N.bottom=Math.max(b.bottom,j.top),N.left=Math.min(b.left,j.right),N.right=Math.max(b.right,j.left);for(var qe in N.width=N.right-N.left,N.height=N.bottom-N.top,N)Z[qe]=N[qe]-we[qe];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=Z}})(n),$e(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var m=ee({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(T.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var j in S)S[j]=Ce(j,b.edges[j],m,t._latestPointer.eventTarget,r,u,b.margin||M.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var N=b.axis!=="y"&&m.x>u.right-M.defaultMargin,Z=b.axis!=="x"&&m.y>u.bottom-M.defaultMargin;(N||Z)&&(n.action={name:"resize",axes:(N?"x":"")+(Z?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=M.cursors,f=null;if(o)f=u[r+o];else if(t){for(var m="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(m+=j)}f=u[m]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Se=M,ct={id:"actions",install:function(n){n.usePlugin(Ye),n.usePlugin(Se),n.usePlugin(Be),n.usePlugin(Ke)}},nt=0,et={request:function(n){return je(n)},cancel:function(n){return Qe(n)},init:function(n){if(je=n.requestAnimationFrame,Qe=n.cancelAnimationFrame,!je)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];je=n["".concat(r,"RequestAnimationFrame")],Qe=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}je=je&&je.bind(n),Qe=Qe&&Qe.bind(n),je||(je=function(u){var f=Date.now(),m=Math.max(0,16-(f-nt)),b=n.setTimeout(function(){u(f+m)},m);return nt=f+m,b},Qe=function(u){return clearTimeout(u)})}},Ie={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(n){Ie.isScrolling=!0,et.cancel(Ie.i),n.autoScroll=Ie,Ie.interaction=n,Ie.prevTime=Ie.now(),Ie.i=et.request(Ie.scroll)},stop:function(){Ie.isScrolling=!1,Ie.interaction&&(Ie.interaction.autoScroll=null),et.cancel(Ie.i)},scroll:function(){var n=Ie.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=ut(u.container,t,o),m=Ie.now(),b=(m-Ie.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Ie.x*S,y:Ie.y*S};if(j.x||j.y){var N=We(f);T.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Z=We(f),we={x:Z.x-N.x,y:Z.y-N.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:n,container:f})}Ie.prevTime=m}Ie.isScrolling&&(et.cancel(Ie.i),Ie.i=et.request(Ie.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Ie.check(t.interactable,t.prepared.name))if(t.simulation)Ie.x=Ie.y=0;else{var r,u,f,m,b=t.interactable,S=t.element,j=t.prepared.name,N=b.options[j].autoScroll,Z=ut(N.container,b,S);if(T.window(Z))m=o.clientX<Ie.margin,r=o.clientY<Ie.margin,u=o.clientX>Z.innerWidth-Ie.margin,f=o.clientY>Z.innerHeight-Ie.margin;else{var we=Ve(Z);m=o.clientX<we.left+Ie.margin,r=o.clientY<we.top+Ie.margin,u=o.clientX>we.right-Ie.margin,f=o.clientY>we.bottom-Ie.margin}Ie.x=u?1:m?-1:0,Ie.y=f?1:r?-1:0,Ie.isScrolling||(Ie.margin=N.margin,Ie.speed=N.speed,Ie.start(t))}}};function ut(n,t,o){return(T.string(n)?st(n,t,o):n)||L(o)}function We(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var dt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Ie,Ie.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ie.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Ie.stop(),Ie.interaction&&(Ie.interaction=null)},"interactions:stop":Ie.stop,"interactions:action-move":function(n){return Ie.onInteractionMove(n)}}},ht=dt;function mt(n,t){var o=!1;return function(){return o||(X.console.warn(t),o=!0),n.apply(this,arguments)}}function Dt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function Mt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Et(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var It={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var m=function(b,S,j,N,Z){var we=b.getRect(N),Pe=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Le={action:null,interactable:b,interaction:j,element:N,rect:we,buttons:Pe};return Z.fire("auto-start:check",Le),Le.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,m,this,f,u):m},t.prototype.ignoreFrom=mt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=mt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Et,t.prototype.styleCursor=Mt}};function Tt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Ct(t,o,n,u)?n:null}function jt(n,t,o,r,u,f,m){for(var b=0,S=r.length;b<S;b++){var j=r[b],N=u[b],Z=j.getAction(t,o,n,N);if(Z){var we=Tt(Z,j,N,f,m);if(we)return{action:we,interactable:j,element:N}}}return{action:null,interactable:null,element:null}}function Rt(n,t,o,r,u){var f=[],m=[],b=r;function S(N){f.push(N),m.push(b)}for(;T.element(b);){f=[],m=[],u.interactables.forEachMatch(b,S);var j=jt(n,t,o,f,m,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=ot(b)}return{action:null,interactable:null,element:null}}function qt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Dt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,wn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ct(n,t,o,r){var u=n.options,f=u[o.name].max,m=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,N=0;if(!(f&&m&&b))return!1;for(var Z=0,we=r.interactions.list;Z<we.length;Z++){var Pe=we[Z],Le=Pe.prepared.name;if(Pe.interacting()&&(++S>=b||Pe.interactable===n&&((j+=Le===o.name?1:0)>=f||Pe.element===t&&(N++,Le===o.name&&N>=m))))return!1}return b>0}function xn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function hn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function wn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var m=o.options[u.name].cursorChecker;f=T.func(m)?m(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}hn(n.element,f||"",t)}else t.autoStart.cursorElement&&hn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(It),o.base.actionChecker=null,o.base.styleCursor=!0,ee(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return xn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Ct,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||qt(o,Rt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||qt(u,Rt(u,f,m,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,m=u.prepared.name;m&&f&&(f.options[m].manualStart||!Ct(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),wn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&hn(o.element,"",t)}},maxInteractions:xn,withinInteractionLimit:Ct,validateAction:Tt},vn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var m=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,N=m>b?"x":m<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?N[0]:S.lockAxis,N!=="xy"&&j!=="xy"&&j!==N){o.prepared.name=null;for(var Z=r,we=function(Le){if(Le!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&Le.testIgnoreAllow(qe,Z,r)){var pt=Le.getAction(o.downPointer,o.downEvent,o,Z);if(pt&&pt.name==="drag"&&function(lt,vt){if(!vt)return!1;var xt=vt.options.drag.startAxis;return lt==="xy"||xt==="xy"||xt===lt}(N,Le)&&vn.validateAction(pt,Le,Z,r,t))return Le}}};T.element(Z);){var Pe=t.interactables.forEachMatch(Z,we);if(Pe){o.prepared.name="drag",o.interactable=Pe,o.element=Z;break}Z=ot(Z)}}}}}};function gn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(vn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=gn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;gn(t)>0&&(t.prepared.name=null)}},getHoldDuration:gn},mn=In,Gn={id:"auto-start",install:function(n){n.usePlugin(vn),n.usePlugin(mn),n.usePlugin(Tn)}},Xn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):T.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Yn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var $n={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Xn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var m=r.options.preventDefault;if(m!=="never")if(m!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=L(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||T.element(f.target)&&G(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||de(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Yn,n},{})};function Bn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function yn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=yn(r):T.array(r)?t[o]=ye(r):t[o]=r}return t}var On=function(){function n(t){d(this,n),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=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,m=this.interaction,b=function(j){var N=j.interactable.options[j.prepared.name],Z=N.modifiers;return Z&&Z.length?Z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var Pe=N[we];return Pe&&Pe.enabled&&{options:Pe,methods:Pe._methods}}).filter(function(we){return!!we})}(m);this.prepareStates(b),this.startEdges=ee({},m.edges),this.edges=ee({},this.startEdges),this.startOffset=(r=m.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{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,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,m=t.edges;t.coords=ee({},t.pageCoords),t.rect=ee({},f),t.edges=ee({},m);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),j=0;j<b.length;j++){var N,Z=b[j],we=Z.options,Pe=ee({},t.coords),Le=null;(N=Z.methods)!=null&&N.set&&this.shouldDo(we,r,o)&&(t.state=Z,Le=Z.methods.set(t),ie(t.edges,t.rect,{x:t.coords.x-Pe.x,y:t.coords.y-Pe.y})),S.eventProps.push(Le)}ee(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var qe=this.result.coords,pt=this.result.rect;if(qe&&pt){var lt=S.rect.left!==pt.left||S.rect.right!==pt.right||S.rect.top!==pt.top||S.rect.bottom!==pt.bottom;S.changed=lt||qe.x!==S.coords.x||qe.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,m=this.result,b=this.startDelta,S=m.delta;r==="start"&&ee(this.startDelta,m.delta);for(var j=0,N=[[f,b],[u,S]];j<N.length;j++){var Z=N[j],we=Z[0],Pe=Z[1];we.page.x+=Pe.x,we.page.y+=Pe.y,we.client.x+=Pe.x,we.client.y+=Pe.y}var Le=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=Le.left,qe.right+=Le.right,qe.top+=Le.top,qe.bottom+=Le.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};m.coords.x+=S.x,m.coords.y+=S.y,m.delta.x+=S.x,m.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,m=0;m<u.length;m++){var b=u[m];t.state=b;var S=b.options,j=b.methods,N=j.beforeEnd&&j.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=ee({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var m=f[u];r.state=m,m.methods.stop&&m.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,m=r.name;this.states.push({options:u,methods:f,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var m=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,N=0,Z=[[r.start,m],[r.cur,S]];N<Z.length;N++){var we=Z[N],Pe=we[0],Le=we[1];Pe.page.x-=Le.x,Pe.page.y-=Le.y,Pe.client.x-=Le.x,Pe.client.y-=Le.y}u.left-=j.left,u.right-=j.right,u.top-=j.top,u.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="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 yn(o)}),this.result=An(ee({},t.result.coords),ee({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var m=f||{};for(var b in m.enabled=m.enabled!==!1,o)b in m||(m[b]=o[b]);var S={options:m,methods:r,name:t,enable:function(){return m.enabled=!0,S},disable:function(){return m.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Dn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Jn={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new On(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Dn,"interactions:action-move":Dn,"interactions:action-end":Dn,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},kt=Jn,Jt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},gt=function(n){D(o,n);var t=H(o);function o(r,u,f,m,b,S,j){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,b=b||r.element;var Z=r.interactable,we=(Z&&Z.options||Jt).deltaSource,Pe=ue(Z,b,f),Le=m==="start",qe=m==="end",pt=Le?O(N):r.prevEvent,lt=Le?r.coords.start:qe?{page:pt.page,client:pt.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=ee({},lt.page),N.client=ee({},lt.client),N.rect=ee({},r.rect),N.timeStamp=lt.timeStamp,qe||(N.page.x-=Pe.x,N.page.y-=Pe.y,N.client.x-=Pe.x,N.client.y-=Pe.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=b,N.currentTarget=b,N.preEnd=S,N.type=j||f+(m||""),N.interactable=Z,N.t0=Le?r.pointers[r.pointers.length-1].downTime:pt.t0,N.x0=r.coords.start.page.x-Pe.x,N.y0=r.coords.start.page.y-Pe.y,N.clientX0=r.coords.start.client.x-Pe.x,N.clientY0=r.coords.start.client.y-Pe.y,N.delta=Le||qe?{x:0,y:0}:{x:N[we].x-pt[we].x,y:N[we].y-pt[we].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=ee({},r.coords.velocity[we]),N.speed=ft(N.velocity.x,N.velocity.y),N.swipe=qe||m==="inertiastart"?N.getSwipe():null,N}return v(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,m=202.5<=u&&u<337.5;return{up:m,down:!m&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ge);Object.defineProperties(gt.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var ya=v(function n(t,o,r,u,f){d(this,n),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=r,this.downTime=u,this.downTarget=f}),zt=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),cn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Mn=0,on=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),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=mt(function(N){this.move(N)},"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=Mn++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var b in zt)m(b);var S=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var j in cn)S(j);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Dt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?ee({},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,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,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&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ft(u,f)>this.pointerMoveTolerance);var b,S,j,N=this.getPointerIndex(t),Z={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:m,interaction:this};m||(b=this.coords.velocity,S=this.coords.delta,j=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/j,b.page.y=S.page.y/j,b.client.x=S.client.x/j,b.client.y=S.client.y/j,b.timeStamp=j),this._scopeFire("interactions:move",Z),m||this.simulation||(this.interacting()&&(Z.type=null,this.move(Z)),this.pointerWasMoved&&K(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=ee({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,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:m,curEventTarget:u,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=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,m,b,S=z(t),j=this.getPointerIndex(t),N=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new ya(S,t,o,null,null),j=this.pointers.length,this.pointers.push(N)),le(this.coords.cur,this.pointers.map(function(Z){return Z.pointer}),this._now()),f=this.coords.delta,m=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-m.page.x,f.page.y=b.page.y-m.page.y,f.client.x=b.client.x-m.client.x,f.client.y=b.client.y-m.client.y,f.timeStamp=b.timeStamp-m.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,C(this.downPointer,t),this.interacting()||(K(this.coords.start,this.coords.cur),K(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new gt(this,t,this.prepared.name,o,this.element,r,u)}},{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,r=t.phase,u=t.preEnd,f=t.type,m=this.rect;if(m&&r==="move"&&(ie(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(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Cn(n){Zt(n.interaction)}function Zt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Bt(n.coords.cur,t),Bt(n.coords.delta,t),ie(n.edges,n.rect,t),t.x=0,t.y=0,!0}function jn(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Bt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}cn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=jn},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(Bt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Cn,"interactions:before-action-move":Cn,"interactions:before-action-end":function(n){var t=n.interaction;if(Zt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ln=Gt,_t=function(){function n(t){d(this,n),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 v(n,[{key:"start",value:function(t){var o=this.interaction,r=Ot(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=ft(u.x,u.y),m=this.modification||(this.modification=new On(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,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&&f>r.minSpeed&&f>r.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,r=Ot(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var m=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(b),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=et.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,m,b,S=this,j=this.interaction,N=Ot(j).resistance,Z=(j._now()-this.t0)/1e3;if(Z<this.te){var we,Pe=1-(Math.exp(-N*Z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,m=this.modifiedOffset.y,we={x:Ht(b=Pe,t,r,f),y:Ht(b,o,u,m)}):we={x:this.targetOffset.x*Pe,y:this.targetOffset.y*Pe};var Le={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Le.x,this.currentOffset.y+=Le.y,j.offsetBy(Le),j.move(),this.onNextFrame(function(){return S.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,r=o._now()-this.t0,u=Ot(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},m={x:f.x-this.currentOffset.x,y:f.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,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),K(f.coords.prev,f.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,et.cancel(this.timeout)}}]),n}();function Ot(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(kt),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new _t(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;T.element(u);){if(u===t.element){r.resume(n);break}u=ot(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Dn,"interactions:action-inertiastart":Dn,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var un=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Kn=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},t||{})}return v(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=fe(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,m=r[t];f<m.length;f++){var b=m[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Qn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Un(n){return T.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Zn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:m,remove:b,addDelegate:function(N,Z,we,Pe,Le){var qe=Un(Le);if(!r[we]){r[we]=[];for(var pt=0;pt<u.length;pt++){var lt=u[pt];m(lt,we,S),m(lt,we,j,!0)}}var vt=r[we],xt=re(vt,function(At){return At.selector===N&&At.context===Z});xt||(xt={selector:N,context:Z,listeners:[]},vt.push(xt)),xt.listeners.push({func:Pe,options:qe})},removeDelegate:function(N,Z,we,Pe,Le){var qe,pt=Un(Le),lt=r[we],vt=!1;if(lt)for(qe=lt.length-1;qe>=0;qe--){var xt=lt[qe];if(xt.selector===N&&xt.context===Z){for(var At=xt.listeners,yt=At.length-1;yt>=0;yt--){var wt=At[yt];if(wt.func===Pe&&Zn(wt.options,pt)){At.splice(yt,1),At.length||(lt.splice(qe,1),b(Z,we,S),b(Z,we,j,!0)),vt=!0;break}}if(vt)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,Z,we,Pe){if(N.addEventListener){var Le=Un(Pe),qe=re(o,function(pt){return pt.eventTarget===N});qe||(qe={eventTarget:N,events:{}},o.push(qe)),qe.events[Z]||(qe.events[Z]=[]),re(qe.events[Z],function(pt){return pt.func===we&&Zn(pt.options,Le)})||(N.addEventListener(Z,we,f.supportsOptions?Le:Le.capture),qe.events[Z].push({func:we,options:Le}))}}function b(N,Z,we,Pe){if(N.addEventListener&&N.removeEventListener){var Le=$(o,function(tn){return tn.eventTarget===N}),qe=o[Le];if(qe&&qe.events)if(Z!=="all"){var pt=!1,lt=qe.events[Z];if(lt){if(we==="all"){for(var vt=lt.length-1;vt>=0;vt--){var xt=lt[vt];b(N,Z,xt.func,xt.options)}return}for(var At=Un(Pe),yt=0;yt<lt.length;yt++){var wt=lt[yt];if(wt.func===we&&Zn(wt.options,At)){N.removeEventListener(Z,we,f.supportsOptions?At:At.capture),lt.splice(yt,1),lt.length===0&&(delete qe.events[Z],pt=!0);break}}}pt&&!Object.keys(qe.events).length&&o.splice(Le,1)}else for(Z in qe.events)qe.events.hasOwnProperty(Z)&&b(N,Z,"all")}}function S(N,Z){for(var we=Un(Z),Pe=new Qn(N),Le=r[N.type],qe=ae(N)[0],pt=qe;T.element(pt);){for(var lt=0;lt<Le.length;lt++){var vt=Le[lt],xt=vt.selector,At=vt.context;if(G(pt,xt)&&de(At,qe)&&de(At,pt)){var yt=vt.listeners;Pe.currentTarget=pt;for(var wt=0;wt<yt.length;wt++){var tn=yt[wt];Zn(tn.options,we)&&tn.func(Pe)}}}pt=ot(pt)}}function j(N){return S(N,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},sa={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=sa.methodOrder;t<o.length;t++){var r=o[t],u=sa[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,m=u.interactions.list;f<m.length;f++){var b=m[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=ot(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var m=0,b=f.interactions.list;m<b.length;m++){var S=b[m];if(S.pointerType===r){if(S.simulation&&!ba(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,N=f.interactions.list;j<N.length;j++){var Z=N[j];if(!(Z.pointerType!==r||/down/i.test(u)&&Z.simulation))return Z}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ba(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ba(n,t){return n.pointers.some(function(o){return o.id===t})}var ca=sa,bn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ea(n,t){return function(o){var r=t.interactions.list,u=Q(o),f=ae(o),m=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,N=o.changedTouches;j<N.length;j++){var Z=N[j],we={pointer:Z,pointerId:z(Z),pointerType:u,eventType:o.type,eventTarget:m,curEventTarget:b,scope:t},Pe=ua(we);S.push([we.pointer,we.eventTarget,we.curEventTarget,Pe])}}else{var Le=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<r.length&&!Le;qe++)Le=r[qe].pointerType!=="mouse"&&r[qe].pointerIsDown;Le=Le||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Le){var pt={pointer:o,pointerId:z(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:m,scope:t},lt=ua(pt);S.push([pt.pointer,pt.eventTarget,pt.curEventTarget,lt])}}for(var vt=0;vt<S.length;vt++){var xt=S[vt],At=xt[0],yt=xt[1],wt=xt[2];xt[3][n](At,o,yt,wt)}}}function ua(n){var t=n.pointerType,o=n.scope,r={interaction:ca.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,m=r.events,b=m[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),m.delegatedEvents)b(o,S,m.delegateListener),b(o,S,m.delegateUseCapture,!0);for(var j=u&&u.events,N=0;N<f.length;N++){var Z=f[N];b(o,Z.type,Z.listener,j)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<bn.length;o++){var r=bn[o];t[r]=ea(r,n)}var u,f=ne.pEventTypes;function m(){for(var b=0,S=n.interactions.list;b<S.length;b++){var j=S[b];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var N=function(){var Pe=we[Z];n.documents.some(function(Le){return de(Le.doc,Pe.downTarget)})||j.removePointer(Pe.pointer,Pe.event)},Z=0,we=j.pointers;Z<we.length;Z++)N()}}(u=B.PointerEvent?[{type:f.down,listener:m},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.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(b){for(var S=0,j=n.interactions.list;S<j.length;S++)j[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(j,b);var S=H(j);function j(){return d(this,j),S.apply(this,arguments)}return v(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),j}(on),n.interactions={list:[],new:function(b){b.scopeFire=function(j,N){return n.fire(j,N)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin($n)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ea,methodNames:bn},Wn=Va,Hn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Hn||{}),ir=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Kn,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||r,this._win=L(it(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return T.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),T.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),T.func(o.onend)&&this.on("".concat(t,"end"),o.onend),T.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,m=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(m==null||m(S))&&Bn(S,f._actions)};(T.array(o)||T.object(o))&&this._onOff(Hn.Off,t,o,void 0,b),(T.array(r)||T.object(r))&&this._onOff(Hn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,m=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,m.listeners,b),T.array(b)?m[f]=ye(b):T.plainObject(b)?(m[f]=ee(m[f]||{},yn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(m[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?m[f].enabled=b:m[f]=b}}},{key:"getRect",value:function(t){return t=t||(T.element(this.target)?this.target:null),T.string(this.target)&&(t=t||this._context.querySelector(this.target)),Je(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=ee({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(it(o)||T.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][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 T.string(t)?Array.from(this._context.querySelectorAll(t)):T.func(t)&&t.getAllElements?t.getAllElements():T.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||de(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!T.element(r)&&(T.string(t)?xe(r,t,o):!!T.element(t)&&de(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?xe(r,t,o):!!T.element(t)&&de(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){T.object(o)&&!T.array(o)&&(u=r,r=null);var m=Te(o,r,f);for(var b in m){b==="wheel"&&(b=ne.wheelEvent);for(var S=0,j=m[b];S<j.length;S++){var N=j[S];Bn(b,this._actions)?this.events[t===Hn.On?"on":"off"](b,N):T.string(this.target)?this._scopeEvents[t===Hn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,N,u):this._scopeEvents[t===Hn.On?"add":"remove"](this.target,b,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(Hn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(Hn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in T.object(t)||(t={}),this.options=yn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,ee(ee({},o.perAction),o.actions[u])),this[f](t[u])}for(var m in t)m!=="getRect"?T.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(T.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,m=u.context,b=u.listeners;f===this.target&&m===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),sr=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,m=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=$(m,function(S){return S===u});m.splice(b,1)}})}return v(n,[{key:"new",value:function(t,o){o=ee(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),T.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=T.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return re(f,function(m){return m._context===r&&(u||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],m=void 0;if((T.string(f.target)?T.element(t)&&G(t,f.target):t===f.target)&&f.inContext(t)&&(m=o(f)),m!==void 0)return m}}}]),n}(),cr=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=yn(Jt),this.Eventable=Kn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(m,b){var S=r.interactables.getExisting(m,b);return S||((S=r.interactables.new(m,b)).events.global=f.globalEvents),S};return u.getPointerAverage=U,u.getTouchBBox=be,u.getTouchDistance=oe,u.getTouchAngle=q,u.getElementRect=Je,u.getElementClientRect=Ve,u.matchesSelector=G,u.closest=Xe,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,m){return this.scope.usePlugin(f,m),this},u.isSet=function(f,m){return!!this.scope.interactables.get(f,m&&m.context)},u.on=mt(function(f,m,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,j=f;S<j.length;S++){var N=j[S];this.on(N,m,b)}return this}if(T.object(f)){for(var Z in f)this.on(Z,f[Z],m);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(m):this.globalEvents[f]=[m]:this.scope.events.add(this.scope.document,f,m,{options:b}),this},"The interact.on() method is being deprecated"),u.off=mt(function(f,m,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,j=f;S<j.length;S++){var N=j[S];this.off(N,m,b)}return this}if(T.object(f)){for(var Z in f)this.off(Z,f[Z],m);return this}var we;return Bn(f,this.scope.actions)?f in this.globalEvents&&(we=this.globalEvents[f].indexOf(m))!==-1&&this.globalEvents[f].splice(we,1):this.scope.events.remove(this.scope.document,f,m,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var f=0,m=this.scope.interactions.list;f<m.length;f++)m[f].stop();return this},u.pointerMoveTolerance=function(f){return T.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,m){this.scope.addDocument(f,m)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=gt,this.Interactable=void 0,this.interactables=new sr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=H(f);function f(){return d(this,f),u.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return V(E(f.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){V(E(f.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}))}}]),f}(ir)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,T.window(r)&&y(r),B.init(r),ne.init(r),et.init(r),o.window=r,o.document=r.document,o.usePlugin(Wn),o.usePlugin(Na),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 r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[Eo(S)]=!0,b},{});r<u;r++){var m=this.listenerMaps[r].id;if(m&&(f[m]||f[Eo(m)]))break}this.listenerMaps.splice(r,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 r=L(t);o=o?ee({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=L(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{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()}}]),n}();function Eo(n){return n&&n.replace(/\/.*$/,"")}var _o=new cr,en=_o.interactStatic,ur=typeof globalThis<"u"?globalThis:window;_o.init(ur);var pr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,m=n.limits,b=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,S=n.offset,j=S===void 0?{x:0,y:0}:S,N={range:f,grid:n,x:null,y:null},Z=0;Z<t.length;Z++){var we=t[Z],Pe=we[0],Le=we[1],qe=Math.round((r-j.x)/n[Pe]),pt=Math.round((u-j.y)/n[Le]);N[Pe]=Math.max(b.left,Math.min(b.right,qe*n[Pe]+j.x)),N[Le]=Math.max(b.top,Math.min(b.bottom,pt*n[Le]+j.y))}return N};return o.grid=n,o.coordFields=t,o}}),dr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=ee(t.snappers||{},pr),t.createSnapGrid=t.snappers.grid}},fr=dr,hr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,m=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,N=S.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=ee({},u),t.startRect=ee({},o),t.ratio=m,t.equalDelta=j;var Z=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var we=(Z.left?1:-1)*(Z.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:Z.left?-1:1,y:Z.top?-1:1};if(b!==!1&&ee(r,Z),N!=null&&N.length){var Pe=new On(n.interaction);Pe.copyFrom(n.interaction.modification),Pe.prepareStates(N),t.subModification=Pe,Pe.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=ee({},r),m=t.equalDelta?vr:gr;if(ee(n.edges,u),m(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=ee({},o);ie(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),j=S.delta;return S.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),ee(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function gr(n,t,o,r){var u=n.startRect,f=n.startCoords,m=n.ratio,b=n.edgeSign;if(t){var S=r.width/m;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*m;o.x=f.x+(j-u.width)*b.x}}var mr=an(hr,"aspectRatio"),So=function(){};So._defaults={};var Oa=So;function ta(n,t,o){return T.func(n)?tt(n,t.interactable,t.element,[o.x,o.y,t]):tt(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,m=r.options,b=m.elementRect,S=ee({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&b){var j=ta(m.restriction,u,f);if(j){var N=j.right-j.left-t.width,Z=j.bottom-j.top-t.height;N<0&&(S.left+=N,S.right+=N),Z<0&&(S.top+=Z,S.bottom+=Z)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,m=ta(u.restriction,o,t);if(m){var b=function(S){return!S||"left"in S&&"top"in S||((S=ee({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(m);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},yr=an(Ma,"restrict"),To={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Bo(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ka={noInner:To,noOuter:Io,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Re(ta(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,m=u.options;if(o){var b=ee({},t),S=ta(m.inner,r,b)||{},j=ta(m.outer,r,b)||{};Bo(S,To),Bo(j,Io),o.top?t.y=Math.min(Math.max(j.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},br=an(ka,"restrictEdges"),kr=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),xr=an({start:Ma.start,set:Ma.set,defaults:kr},"restrictRect"),wr={width:-1/0,height:-1/0},Dr={width:1/0,height:1/0},Cr=an({start:function(n){return ka.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var m=pe(ta(f.min,t,n.coords))||wr,b=pe(ta(f.max,t,n.coords))||Dr;o.options={endOnly:f.endOnly,inner:ee({},ka.noInner),outer:ee({},ka.noOuter)},u.top?(o.options.inner.top=r.bottom-m.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+m.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-m.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+m.width,o.options.outer.right=r.left+b.width),ka.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,m=n.state,b=n.startOffset,S=m.options,j=S.offsetWithOrigin?function(we){var Pe=we.interaction.element,Le=Re(tt(we.state.options.origin,null,null,[Pe])),qe=Le||ue(we.interactable,Pe,we.interaction.prepared.name);return qe}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=tt(S.offset,r,u,[o]);(t=Re(N)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Z=S.relativePoints;m.offsets=f&&Z&&Z.length?Z.map(function(we,Pe){return{index:Pe,relativePoint:we,x:b.left-f.width*we.x+t.x,y:b.top-f.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,m=ue(t.interactable,t.element,t.prepared.name),b=ee({},o),S=[];u.offsetWithOrigin||(b.x-=m.x,b.y-=m.y);for(var j=0,N=f;j<N.length;j++)for(var Z=N[j],we=b.x-Z.x,Pe=b.y-Z.y,Le=0,qe=u.targets.length;Le<qe;Le++){var pt=u.targets[Le],lt=void 0;(lt=T.func(pt)?pt(we,Pe,t._proxy,Z,Le):pt)&&S.push({x:(T.number(lt.x)?lt.x:we)+Z.x,y:(T.number(lt.y)?lt.y:Pe)+Z.y,range:T.number(lt.range)?lt.range:u.range,source:pt,index:Le,offset:Z})}for(var vt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},xt=0;xt<S.length;xt++){var At=S[xt],yt=At.range,wt=At.x-b.x,tn=At.y-b.y,Ut=ft(wt,tn),pn=Ut<=yt;yt===1/0&&vt.inRange&&vt.range!==1/0&&(pn=!1),vt.target&&!(pn?vt.inRange&&yt!==1/0?Ut/yt<vt.distance/vt.range:yt===1/0&&vt.range!==1/0||Ut<vt.distance:!vt.inRange&&Ut<vt.distance)||(vt.target=At,vt.distance=Ut,vt.range=yt,vt.inRange=pn,vt.delta.x=wt,vt.delta.y=tn)}return vt.inRange&&(o.x=vt.target.x,o.y=vt.target.y),r.closest=vt,vt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Er=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,m={x:r.x-f[0].x,y:r.y-f[0].y};o.options=ee({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],N=void 0;if(N=T.func(j)?j(m.x,m.y,t):j){for(var Z=0,we=o.targetFields;Z<we.length;Z++){var Pe=we[Z],Le=Pe[0],qe=Pe[1];if(Le in N||qe in N){N.x=N[Le],N.y=N[qe];break}}o.options.targets.push(N)}}var pt=io.set(n);return o.options=u,pt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_r=an(za,"snapSize"),so={aspectRatio:mr,restrictEdges:br,restrict:yr,restrictRect:xr,restrictSize:Cr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:ee(yn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Er,snapSize:_r,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},Sr={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(kt),n.usePlugin(fr),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Tr=Sr,Ao=function(n){D(o,n);var t=H(o);function o(r,u,f,m,b,S){var j;if(d(this,o),C(O(j=t.call(this,b)),f),f!==u&&C(O(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=z(u),j.pointerType=Q(u),j.target=m,j.currentTarget=null,r==="tap"){var N=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[N].downTime;var Z=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&Z<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return v(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ge),xa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=xa,n.defaults.actions.pointerEvents=xa.defaults,ee(n.actions.phaselessTypes,xa.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,N=He(b),Z={interaction:u,pointer:f,event:m,eventTarget:b,type:"hold",targets:[],path:N,node:null},we=0;we<N.length;we++){var Pe=N[we];Z.node=Pe,r.fire("pointerEvents:collect-targets",Z)}if(Z.targets.length){for(var Le=1/0,qe=0,pt=Z.targets;qe<pt.length;qe++){var lt=pt[qe].eventable.options.holdDuration;lt<Le&&(Le=lt)}j.duration=Le,j.timeout=setTimeout(function(){qn({interaction:u,eventTarget:b,pointer:f,event:m,type:"hold"},r)},Le)}})(n,t),qn(n,t)},"interactions:up":function(n,t){co(n),qn(n,t),function(o,r){var u=o.interaction,f=o.pointer,m=o.event,b=o.eventTarget;u.pointerWasMoved||qn({interaction:u,eventTarget:b,pointer:f,event:m,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),qn(n,t)}},PointerEvent:Ao,fire:qn,collectEventTargets:No,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 qn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,m=n.type,b=n.targets,S=b===void 0?No(n,t):b,j=new Ao(m,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:m,pointerEvent:j},Z=0;Z<S.length;Z++){var we=S[Z];for(var Pe in we.props||{})j[Pe]=we.props[Pe];var Le=ue(we.eventable,we.node);if(j._subtractOrigin(Le),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(Le),j.immediatePropagationStopped||j.propagationStopped&&Z+1<S.length&&S[Z+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var qe=j.double?qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=qe,o.tapTime=qe.timeStamp}return j}function No(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,m=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(m==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=He(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:m,path:j,targets:[],node:null},Z=0;Z<j.length;Z++){var we=j[Z];N.node=we,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(Pe){var Le,qe;return Pe.eventable.options.holdDuration===((Le=o.pointers[b])==null||(qe=Le.hold)==null?void 0:qe.duration)})),N.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Ir=Object.freeze({__proto__:null,default:xa});function Br(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Ar={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(xa);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Br,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var m=f[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},m))}}})},Nr=Ar,Vr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return ee(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(m){var b=m.events,S=b.options;b.types[u]&&b.types[u].length&&m.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:m}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;ee(o.events.options,t.pointerEvents.defaults),ee(o.events.options,r.pointerEvents||{})}}},Or=Vr,Mr={id:"pointer-events",install:function(n){n.usePlugin(Ir),n.usePlugin(Nr),n.usePlugin(Or)}},zr=Mr,Rr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var m=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var Z=m[N],we=r.getRect(Z);if(!we)return 1;var Pe,Le=re(f.interactions.list,function(lt){return lt.interacting()&&lt.interactable===r&&lt.element===Z&&lt.prepared.name===u.name});if(Le)Le.move(),S&&(Pe=Le._reflowPromise||new b(function(lt){Le._reflowResolve=lt}));else{var qe=pe(we),pt=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:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:f.now()});Pe=function(lt,vt,xt,At,yt){var wt=lt.interactions.new({pointerType:"reflow"}),tn={interaction:wt,event:yt,pointer:yt,eventTarget:xt,phase:"reflow"};wt.interactable=vt,wt.element=xt,wt.prevEvent=yt,wt.updatePointer(yt,yt,xt,!0),Y(wt.coords.delta),Dt(wt.prepared,At),wt._doPhase(tn);var Ut=lt.window,pn=Ut.Promise,En=pn?new pn(function(zn){wt._reflowResolve=zn}):void 0;return wt._reflowPromise=En,wt.start(At,vt,xt),wt._interacting?(wt.move(tn),wt.end(yt)):(wt.stop(),wt._reflowResolve()),wt.removePointer(yt,yt),En}(f,r,Z,u,pt)}S&&S.push(Pe)},N=0;N<m.length&&!j();N++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Lr=Rr;if(en.use($n),en.use(ln),en.use(zr),en.use(un),en.use(Tr),en.use(Gn),en.use(ct),en.use(ht),en.use(Lr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ea,Ea.exports)),Ea.exports}var yd=md();const al=ze.getDefaultExportFromCjs(yd),ao=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(Kl),x=e.inject(Ul);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),h=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 D=!1,E=!1,_=NaN,O=NaN,H=NaN,V=NaN,ke=-1,W=-1,P=-1,X=-1,y=l.x,L=l.y,k=l.w,A=l.h;const T=e.ref(),se=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:tt});function Oe(w){Te(w)}function at(){Ge()}function Be(w){dn(l.isDraggable)&&(h.draggable=w)}function Fe(w){dn(l.isResizable)&&(h.resizable=w)}function he(w){dn(l.isBounded)&&(h.bounded=w)}function B(w){h.transformScale=w}function te(w){h.rowHeight=w}function ne(w){h.maxRows=w}function de(){h.rtl=tl()==="rtl",Ge()}function Xe(w){h.cols=Math.floor(w)}d.increaseItem(se),e.onBeforeMount(()=>{h.rtl=tl()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Xl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,dn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,dn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,dn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{y=l.x,L=l.y,A=l.h,k=l.w,nn(Je)}),x.on("updateWidth",Oe),x.on("compact",at),x.on("setDraggable",Be),x.on("setResizable",Fe),x.on("setBounded",he),x.on("setTransformScale",B),x.on("setRowHeight",te),x.on("setMaxRows",ne),x.on("directionchange",de),x.on("setColNum",Xe)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Oe),x.off("compact",at),x.off("setDraggable",Be),x.off("setResizable",Fe),x.off("setBounded",he),x.off("setTransformScale",B),x.off("setRowHeight",te),x.off("setMaxRows",ne),x.off("directionchange",de),x.off("setColNum",Xe),v.value&&(v.value.unset(),v.value=null),d.decreaseItem(se)}),i({state:h,wrapper:T});const ot=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,G=e.computed(()=>h.resizable&&!l.static),R=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),ve=e.computed(()=>(h.draggable||h.resizable)&&!l.static),xe=cd("item"),Me=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:G.value,[xe.bm("static")]:l.static,[xe.bm("resizing")]:h.isResizing,[xe.bm("dragging")]:h.isDragging,[xe.bm("transform")]:h.useCssTransforms,[xe.bm("rtl")]:R.value,[xe.bm("no-touch")]:ot&&ve.value})),Ve=e.computed(()=>[xe.be("resizer"),R.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,w=>{h.draggable=w}),e.watch(()=>l.static,()=>{nn(C),nn(Y)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,w=>{h.resizable=w}),e.watch(()=>l.isBounded,w=>{h.bounded=w}),e.watch(()=>h.resizable,()=>{nn(Y)}),e.watch(()=>h.rowHeight,()=>{nn(Je),nn(He)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(Y),nn(Je),nn(He)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Y)}),e.watch(R,()=>{nn(Y),nn(Je)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const w=d.margin;!w||w[0]===h.margin[0]&&w[1]===h.margin[1]||(h.margin=w.map(Number),nn(Je),nn(He))});function Je(){l.x+l.w>h.cols?(y=0,k=l.w>h.cols?h.cols:l.w):(y=l.x,k=l.w);const w=st(y,L,k,A);h.isDragging&&(w.top=h.dragging.top,R.value?w.right=h.dragging.left:w.left=h.dragging.left),h.isResizing&&(w.width=h.resizing.width,w.height=h.resizing.height);let I;h.useCssTransforms?R.value?I=ld(w.top,w.right,w.width,w.height):I=od(w.top,w.left,w.width,w.height):R.value?I=id(w.top,w.right,w.width,w.height):I=rd(w.top,w.left,w.width,w.height),h.style=I}function He(){const w={};for(const I of["width","height"]){const J=h.style[I].match(/^(\d+)px$/);if(!J)return;w[I]=J[1]}c("container-resized",l.i,l.h,l.w,w.height,w.width)}function it(w){if(l.static)return;const I=w.type;if(I==="resizestart"&&h.isResizing||I!=="resizestart"&&!h.isResizing)return;const J=Zo(w);if(dn(J))return;const{x:z,y:le}=J,F={width:0,height:0};let U;switch(I){case"resizestart":{Y(),ke=k,W=A,U=st(y,L,k,A),F.width=U.width,F.height=U.height,h.resizing=F,h.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(H=z),!w.edges.top&&!w.edges.bottom&&(V=le);const be=el(H,V,z,le);R.value?F.width=h.resizing.width-be.deltaX/h.transformScale:F.width=h.resizing.width+be.deltaX/h.transformScale,F.height=h.resizing.height+be.deltaY/h.transformScale,h.resizing=F;break}case"resizeend":{U=st(y,L,k,A),F.width=U.width,F.height=U.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}U=ue(F.height,F.width),U.w<l.minW&&(U.w=l.minW),U.w>l.maxW&&(U.w=l.maxW),U.h<l.minH&&(U.h=l.minH),U.h>l.maxH&&(U.h=l.maxH),U.h<1&&(U.h=1),U.w<1&&(U.w=1),H=z,V=le,(k!==U.w||A!==U.h)&&c("resize",l.i,U.h,U.w,F.height,F.width),w.type==="resizeend"&&(ke!==k||W!==A)&&c("resized",l.i,U.h,U.w,F.height,F.width),x.emit("resizeEvent",w.type,l.i,y,L,U.h,U.w)}function ee(w){if(l.static||h.isResizing)return;const I=w.type;if(I==="dragstart"&&h.isDragging||I!=="dragstart"&&!h.isDragging)return;const J=Zo(w);if(dn(J))return;const{x:z,y:le}=J,F=w.target;if(!F.offsetParent)return;const U={top:0,left:0};switch(I){case"dragstart":{P=y,X=L;const oe=F.offsetParent.getBoundingClientRect(),q=F.getBoundingClientRect(),Q=q.left/h.transformScale,ae=oe.left/h.transformScale,ge=q.right/h.transformScale,fe=oe.right/h.transformScale,ye=q.top/h.transformScale,$=oe.top/h.transformScale;R.value?U.left=(ge-fe)*-1:U.left=Q-ae,U.top=ye-$,h.dragging=U,h.isDragging=!0;break}case"dragmove":{const oe=el(_,O,z,le);if(R.value?U.left=h.dragging.left-oe.deltaX/h.transformScale:U.left=h.dragging.left+oe.deltaX/h.transformScale,U.top=h.dragging.top+oe.deltaY/h.transformScale,h.bounded){const q=F.offsetParent.clientHeight-pe(l.h,h.rowHeight,h.margin[1]);U.top=ie(U.top,0,q);const Q=Re(),ae=h.containerWidth-pe(l.w,Q,h.margin[0]);U.left=ie(U.left,0,ae)}h.dragging=U;break}case"dragend":{const oe=F.offsetParent.getBoundingClientRect(),q=F.getBoundingClientRect(),Q=q.left/h.transformScale,ae=oe.left/h.transformScale,ge=q.right/h.transformScale,fe=oe.right/h.transformScale,ye=q.top/h.transformScale,$=oe.top/h.transformScale;R.value?U.left=(ge-fe)*-1:U.left=Q-ae,U.top=ye-$,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let be;R.value,be=tt(U.top,U.left),_=z,O=le,(y!==be.x||L!==be.y)&&c("move",l.i,be.x,be.y),w.type==="dragend"&&(P!==y||X!==L)&&c("moved",l.i,be.x,be.y),x.emit("dragEvent",w.type,l.i,be.x,be.y,A,k)}function st(w,I,J,z){const le=Re();let F;return R.value?F={right:Math.round(le*w+(w+1)*h.margin[0]),top:Math.round(h.rowHeight*I+(I+1)*h.margin[1]),width:J===1/0?J:Math.round(le*J+Math.max(0,J-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])}:F={left:Math.round(le*w+(w+1)*h.margin[0]),top:Math.round(h.rowHeight*I+(I+1)*h.margin[1]),width:J===1/0?J:Math.round(le*J+Math.max(0,J-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])},F}function tt(w,I){const J=Re();let z=Math.round((I-h.margin[0])/(J+h.margin[0])),le=Math.round((w-h.margin[1])/(h.rowHeight+h.margin[1]));return z=Math.max(Math.min(z,h.cols-k),0),le=Math.max(Math.min(le,h.maxRows-A),0),{x:z,y:le}}function Re(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function pe(w,I,J){return Number.isFinite(w)?Math.round(I*w+Math.max(0,w-1)*J):w}function ie(w,I,J){return Math.max(Math.min(w,J),I)}function ue(w,I,J=!1){const z=Re();let le=Math.round((I+h.margin[0])/(z+h.margin[0])),F=0;return J?F=Math.ceil((w+h.margin[1])/(h.rowHeight+h.margin[1])):F=Math.round((w+h.margin[1])/(h.rowHeight+h.margin[1])),le=Math.max(Math.min(le,h.cols-y),0),F=Math.max(Math.min(F,h.maxRows-L),0),{w:le,h:F}}function Te(w,I){h.containerWidth=w}function Ge(){Je()}function ft(){!v.value&&T.value&&(v.value=al(T.value),h.useStyleCursor||v.value.styleCursor(!1))}const g=Yo(ee);function C(){if(ft(),!!v.value)if(h.draggable&&!l.static){const w={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(w),D||(D=!0,v.value.on("dragstart dragmove dragend",I=>{I.type==="dragmove"?g(I):ee(I)}))}else v.value.draggable({enabled:!1})}const K=Yo(it);function Y(){if(ft(),!!v.value)if(h.resizable&&!l.static){const w=st(0,0,l.maxW,l.maxH),I=st(0,0,l.minW,l.minH),J={edges:{left:R.value?`.${Ve.value[0]}`:!1,right:R.value?!1:`.${Ve.value[0]}`,bottom:`.${Ve.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:I.height*h.transformScale,width:I.width*h.transformScale},max:{height:w.height*h.transformScale,width:w.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(J.modifiers=[al.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(J),E||(E=!0,v.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?K(z):it(z)}))}else v.value.resizable({enabled:!1})}return(w,I)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(Me.value),style:e.normalizeStyle(h.style)},[e.renderSlot(w.$slots,"default"),G.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ve.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ia=typeof window<"u";var ol;ia&&(ol=window==null?void 0:window.navigator)!=null&&ol.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ll(a){return a!=null}function rl(){}const bd=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(bd)));const kd=ia&&("ontouchstart"in window||wd()>0),xd=kd?"pointerdown":"click";function wd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Dd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ll(l)||l==="")return!1;let v;return ll(s)?v=new s(l,{bubbles:c,cancelable:d}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,c,d)),Object.assign(v,x),a.dispatchEvent(v)}const Cd="clickoutside",Ed=new Set;ia&&document.addEventListener(xd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Ed.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&Dd(l,{type:Cd})})},!0);const _d=[["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 Wa;if(ia){for(const a of _d)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Sd=new Set,Td=new WeakMap;if(ia&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Sd.forEach(s=>{s.value=!1}),document[a]){const s=Td.get(document[a]);s&&(s.value=!0)}},!1)}const Jl=new Map;Jl.set("x",0);Jl.set("y",0);var oa=[],Id=function(){return oa.some(function(a){return a.activeTargets.length>0})},Bd=function(){return oa.some(function(a){return a.skippedTargets.length>0})},il="ResizeObserver loop completed with undelivered notifications.",Ad=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:il}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=il),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var la=function(a){return Object.freeze(a)},Nd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,la(this)}return a}(),Ql=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,la(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,x=i.bottom,v=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:v,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Co=function(a){return a instanceof SVGElement&&"getBBox"in a},Zl=function(a){if(Co(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},sl=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Vd=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ia=typeof window<"u"?window:{},Pa=new WeakMap,cl=/auto|scroll/,Od=/^tb|vertical/,Md=/msie|trident/i.test(Ia.navigator&&Ia.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},ha=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Nd((s?i:a)||0,(s?a:i)||0)},ul=la({devicePixelContentBoxSize:ha(),borderBoxSize:ha(),contentBoxSize:ha(),contentRect:new Ql(0,0,0,0)}),er=function(a,i){if(i===void 0&&(i=!1),Pa.has(a)&&!i)return Pa.get(a);if(Zl(a))return Pa.set(a,ul),ul;var s=getComputedStyle(a),l=Co(a)&&a.ownerSVGElement&&a.getBBox(),c=!Md&&s.boxSizing==="border-box",d=Od.test(s.writingMode||""),x=!l&&cl.test(s.overflowY||""),v=!l&&cl.test(s.overflowX||""),h=l?0:Nn(s.paddingTop),D=l?0:Nn(s.paddingRight),E=l?0:Nn(s.paddingBottom),_=l?0:Nn(s.paddingLeft),O=l?0:Nn(s.borderTopWidth),H=l?0:Nn(s.borderRightWidth),V=l?0:Nn(s.borderBottomWidth),ke=l?0:Nn(s.borderLeftWidth),W=_+D,P=h+E,X=ke+H,y=O+V,L=v?a.offsetHeight-y-a.clientHeight:0,k=x?a.offsetWidth-X-a.clientWidth:0,A=c?W+X:0,T=c?P+y:0,se=l?l.width:Nn(s.width)-A-k,Oe=l?l.height:Nn(s.height)-T-L,at=se+W+k+X,Be=Oe+P+L+y,Fe=la({devicePixelContentBoxSize:ha(Math.round(se*devicePixelRatio),Math.round(Oe*devicePixelRatio),d),borderBoxSize:ha(at,Be,d),contentBoxSize:ha(se,Oe,d),contentRect:new Ql(_,h,se,Oe)});return Pa.set(a,Fe),Fe},tr=function(a,i,s){var l=er(a,s),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(i){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},zd=function(){function a(i){var s=er(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=la([s.borderBoxSize]),this.contentBoxSize=la([s.contentBoxSize]),this.devicePixelContentBoxSize=la([s.devicePixelContentBoxSize])}return a}(),nr=function(a){if(Zl(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Rd=function(){var a=1/0,i=[];oa.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(v){var h=new zd(v.target),D=nr(v.target);x.push(h),v.lastReportedSize=tr(v.target,v.observedBox),D<a&&(a=D)}),i.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},pl=function(a){oa.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(nr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Ld=function(){var a=0;for(pl(a);Id();)a=Rd(),pl(a);return Bd()&&Ad(),a>0},fo,ar=[],Fd=function(){return ar.splice(0).forEach(function(a){return a()})},Pd=function(a){if(!fo){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Fd()}).observe(s,l),fo=function(){s.textContent="".concat(i?i--:i++)}}ar.push(a),fo()},$d=function(a){Pd(function(){requestAnimationFrame(a)})},Ha=0,jd=function(){return!!Ha},Kd=250,Ud={attributes:!0,characterData:!0,childList:!0,subtree:!0},dl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],fl=function(a){return a===void 0&&(a=0),Date.now()+a},ho=!1,Wd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=Kd),!ho){ho=!0;var l=fl(i);$d(function(){var c=!1;try{c=Ld()}finally{if(ho=!1,i=l-fl(),!jd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ud)};document.body?s():Ia.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),dl.forEach(function(s){return Ia.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),dl.forEach(function(s){return Ia.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),bo=new Wd,hl=function(a){!Ha&&a>0&&bo.start(),Ha+=a,!Ha&&bo.stop()},Hd=function(a){return!Co(a)&&!Vd(a)&&getComputedStyle(a).display==="inline"},qd=function(){function a(i,s){this.target=i,this.observedBox=s||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=tr(this.target,this.observedBox,!0);return Hd(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Gd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,vl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},ja=function(){function a(){}return a.connect=function(i,s){var l=new Gd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;vl(c.observationTargets,s)<0&&(d&&oa.push(c),c.observationTargets.push(new qd(s,l&&l.box)),hl(1),bo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=vl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&oa.splice(oa.indexOf(l),1),l.observationTargets.splice(c,1),hl(-1))},a.disconnect=function(i){var s=this,l=$a.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Xd=function(){function a(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.");ja.connect(this,i)}return a.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(!sl(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,i,s)},a.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(!sl(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,i)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Yd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:v}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:v??D}))}}}const or=new(ia&&window.ResizeObserver||Xd)(Yd);function gl(a,i){oo.set(a,i),or.observe(a)}function ml(a){oo.has(a)&&(or.unobserve(a),oo.delete(a))}function Jd(a={}){let i=rl;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(gl(c,a.onResize),i=()=>{ml(c),i=rl})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:gl,unobserveResize:ml,unobserve:l}}const Qd=e.ref(!1);e.computed(()=>Qd.value);const yl="__theme_style__",vo="__theme_observer__",bl=e.reactive(new Map),kl=new Map;e.watch(bl,()=>{if(!ia)return;kl.clear();const a=document.head.querySelector(`#${yl}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${vo} { width: 1px }`,l=1;for(const[c,[d,x]]of bl.entries())s+=` html.${d} .${vo}, .${x} .${vo} { width: ${++l}px }`,kl.set(l,c);i.textContent=s,i.id=yl,document.head.appendChild(i)});const lr=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,v=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Jd(),_=Jp();_.on("resizeEvent",O),_.on("dragEvent",H),e.onBeforeMount(()=>{c("layout-before-mount",v.value)}),e.onMounted(()=>{c("layout-mounted",v.value),e.nextTick(()=>{sd(v.value),d.originalLayout=v.value,e.nextTick(()=>{Oe(),h.value&&D(h.value,Qp(y,16)),pa(v.value,l.verticalCompact),c("layout-updated",v.value),X(),y()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function O(Be,Fe,he,B,te,ne){T(Be,Fe,he,B,te,ne)}function H(Be,Fe,he,B,te,ne){A(Be,Fe,he,B,te,ne)}e.watch(()=>d.width,(Be,Fe)=>{e.nextTick(()=>{_.emit("updateWidth",Be),Fe===-1&&e.nextTick(()=>{c("layout-ready",v.value)}),X()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,P()}),e.watch(()=>l.colNum,Be=>{_.emit("setColNum",Be)}),e.watch(()=>l.rowHeight,Be=>{_.emit("setRowHeight",Be)}),e.watch(()=>l.isDraggable,Be=>{_.emit("setDraggable",Be)}),e.watch(()=>l.isResizable,Be=>{_.emit("setResizable",Be)}),e.watch(()=>l.isBounded,Be=>{_.emit("setBounded",Be)}),e.watch(()=>l.transformScale,Be=>{_.emit("setTransformScale",Be)}),e.watch(()=>l.responsive,Be=>{Be||(c("update:layout",d.originalLayout),_.emit("setColNum",l.colNum)),y()}),e.watch(()=>l.maxRows,Be=>{_.emit("setMaxRows",Be)}),e.watch([()=>l.margin,()=>l.margin[1]],X),e.provide(Kl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ke})),e.provide(Ul,_),i({state:d,getItem:W,resizeEvent:T,dragEvent:A,layoutUpdate:P});function V(Be){x.set(Be.i,Be)}function ke(Be){x.delete(Be.i)}function W(Be){return x.get(Be)}function P(){if(!dn(v.value)&&!dn(d.originalLayout)){if(v.value.length!==d.originalLayout.length){const Be=at(v.value,d.originalLayout);if(Be.length>0)if(v.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Be);else{const Fe=new Set(Be.map(he=>he.i));d.originalLayout=d.originalLayout.filter(he=>!Fe.has(he.i))}d.lastLayoutLength=v.value.length,Oe()}pa(v.value,l.verticalCompact),_.emit("updateWidth",d.width),X(),c("layout-updated",v.value)}}function X(){d.mergedStyle={height:L()}}function y(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function L(){if(!l.autoSize)return;const Be=parseFloat(l.margin[1]);return ed(v.value)*(l.rowHeight+Be)+Be+"px"}let k;function A(Be,Fe,he,B,te,ne){let de=Jo(v.value,Fe);dn(de)&&(de={h:0,w:0,x:0,y:0,i:""}),Be==="dragstart"&&!l.verticalCompact&&(k=v.value.reduce((Xe,{i:ot,x:G,y:R})=>({...Xe,[ot]:{x:G,y:R}}),{})),Be==="dragmove"||Be==="dragstart"?(d.placeholder.i=Fe,d.placeholder.x=de.x,d.placeholder.y=de.y,d.placeholder.w=ne,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),v.value=yo(v.value,de,he,B,!0,l.preventCollision),l.restoreOnDrag?(de.static=!0,pa(v.value,l.verticalCompact,k),de.static=!1):pa(v.value,l.verticalCompact),_.emit("compact"),X(),Be==="dragend"&&(k=void 0,c("layout-updated",v.value))}function T(Be,Fe,he,B,te,ne){let de=Jo(v.value,Fe);dn(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Xe;if(l.preventCollision){const ot=Hl(v.value,{...de,w:ne,h:te}).filter(G=>G.i!==de.i);if(Xe=ot.length>0,Xe){let G=1/0,R=1/0;ot.forEach(ve=>{ve.x>de.x&&(G=Math.min(G,ve.x)),ve.y>de.y&&(R=Math.min(R,ve.y))}),Number.isFinite(G)&&(de.w=G-de.x),Number.isFinite(R)&&(de.h=R-de.y)}}Xe||(de.w=ne,de.h=te),Be==="resizestart"||Be==="resizemove"?(d.placeholder.i=Fe,d.placeholder.x=he,d.placeholder.y=B,d.placeholder.w=de.w,d.placeholder.h=de.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Be&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&se(),pa(v.value,l.verticalCompact),_.emit("compact"),X(),Be==="resizeend"&&c("layout-updated",v.value)}function se(){const Be=dd(l.breakpoints,d.width);if(Be===d.lastBreakpoint)return;const Fe=Xl(Be,l.cols);!dn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mo(v.value));const he=fd(d.originalLayout,d.layouts,l.breakpoints,Be,d.lastBreakpoint,Fe,l.verticalCompact);d.layouts[Be]=he,d.lastBreakpoint!==Be&&c("breakpoint-changed",Be,he),v.value=he,c("update:layout",he),d.lastBreakpoint=Be,_.emit("setColNum",Fe)}function Oe(){d.layouts=Object.assign({},l.responsiveLayouts)}function at(Be,Fe){const he=new Set(Fe.map(de=>de.i)),B=new Set(Be.map(de=>de.i)),te=Be.filter(de=>!he.has(de.i)),ne=Fe.filter(de=>!B.has(de.i));return te.concat(ne)}return(Be,Fe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Be.$slots.default?e.renderSlot(Be.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,he=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:he.i,ref_for:!0},he),{default:e.withCtx(()=>[e.renderSlot(Be.$slots,"item",{item:he})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Zd={key:0,class:"item-view-group"},ef={key:0,class:"item-view-group"},tf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=Kt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),v=e.computed(()=>{var O,H,V,ke;return((O=d==null?void 0:d.children)==null?void 0:O.length)>0&&((H=d==null?void 0:d.children)!=null&&H.every(W=>W==null?void 0:W.layout))?(ke=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ke.layout:"vertical"}),h=e.computed(()=>{var O,H;return((H=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:H.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=O=>{c("rowClick",O)},_=(O,H)=>{c("routeUrl",O,H)};return(O,H)=>h.value?(e.openBlock(),e.createBlock(e.unref(lr),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=V=>x.value=V),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(V,ke)=>(e.openBlock(),e.createBlock(e.unref(ao),{key:V.i,x:V.x,y:V.y,"min-h":V.minH,"max-h":V.maxH,"min-w":V.minW,w:V.w,h:V.h,i:V.i},{default:e.withCtx(()=>{var W,P,X,y,L,k,A,T,se,Oe,at,Be,Fe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((X=(P=V==null?void 0:V.component)==null?void 0:P.comp)==null?void 0:X.toUpperCase())!=="TABLE"&&((y=V==null?void 0:V.component)!=null&&y.name)?(e.openBlock(),e.createElementBlock("div",Zd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((L=V==null?void 0:V.component)==null?void 0:L.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:v.value,config:{showIndex:(A=e.unref(bt)[ke])==null?void 0:A.showIndex,allowMove:(T=e.unref(bt)[ke])==null?void 0:T.allowMove,viewport:(se=e.unref(bt)[ke])==null?void 0:se.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(wo),itemData:(Oe=V==null?void 0:V.component)==null?void 0:Oe.compData,childItemData:(at=V==null?void 0:V.component)==null?void 0:at.itemChildData,key:e.unref(va),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Be=V==null?void 0:V.component)==null?void 0:Be.tableId,allMapContents:e.unref(Ja),children:(Fe=V==null?void 0:V.component)==null?void 0:Fe.children,level:D.value,onRowClick:E,onRouteUrl:_,onClickTrigger:e.unref(zl),onClickMainKey:e.unref(Rl)},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(d==null?void 0:d.children,(V,ke)=>{var W,P;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(V==null?void 0:V.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((P=V==null?void 0:V.comp)==null?void 0:P.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(va),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:_},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),nf=Ft._export_sfc(tf,[["__scopeId","data-v-c498af99"]]),rr=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"}]),af={TABLE:da.ssTable,FORM:Lo,TABLEOPERATE:ls,TABLESTYLE:xs,TABLEEXTEND:Ds,TABLEINTERACTION:_s,FORMOPERATE:Fo,FOLD:nc,CALCULATOR:sc,METHODBUTTON:Tc,AVATARUPLOAD:zo.ssAvatar,SIGNATURE:zo.ssSignature,FORMTOP:Lo,STEP:Pc,STEPOPERATE:qs,TIMELINE:Hc,TIMELINEOPERATE:Zs,FORMTOPOPERATE:Fo,SIGNATUREOPERATE:Rc,AVATARUPLOADOPERATE:Ac,TABS:Xc,TABSOPERATE:Ou,CHART:Gu,CHARTOPERATE:lp,LAYOUT:Fp,LAYOUTOPERATE:Gp,PARENTITEM:nf};function ma(a){return af[a==null?void 0:a.toUpperCase()]||null}exports.De=lr;exports.activeStepInfo=fa;exports.affixItems=xp;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=yc;exports.checkIsQuote=fc;exports.checkIsShowGroup=cc;exports.checkIsShowGroupForm=dc;exports.checkIsShowTable=gc;exports.checkIsTableCheck=pc;exports.checkIsUsingGroup=uc;exports.clickMainKey=Rl;exports.clickSavePage=kp;exports.clickStep=Fl;exports.clickTrigger=zl;exports.compId=va;exports.compNames=wo;exports.compShow=Ya;exports.contentTransArray=Da;exports.contentTransArrayToAll=_a;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ko;exports.existLayouts=Bp;exports.formToExtraContent=mc;exports.generateLayouts=ms;exports.getComponent=ma;exports.getComponents=Qa;exports.getExtraContents=kc;exports.getSliceContLength=Op;exports.gridRowHeight=ds;exports.isStepLayout=Do;exports.isUndefined=Dl;exports.newContentTransArrayToAllNoExtra=vc;exports.onBack=yp;exports.onChange=eo;exports.onClick=bp;exports.onContentChange=to;exports.onExtendTaskEnd=Ip;exports.onPageBack=Ap;exports.onPageChange=no;exports.onSaveBack=Al;exports.onSelectFixContent=mp;exports.renderShowItems=Vl;exports.showItems=bt;exports.sliceTableLength=Ol;exports.slotContent=rr;exports.st=ao;exports.stepItems=Mp;exports.toNumber=go;exports.toolBar=Fn;exports.verifyButton=Np;