ss-component-new 1.2.34 → 1.2.36

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 (102) hide show
  1. package/dist/{MTLLoader-BzJ43684.js → MTLLoader-B4lJr_ku.js} +1 -1
  2. package/dist/{MTLLoader-BK95MfNU.cjs → MTLLoader-CkNQ5SUP.cjs} +1 -1
  3. package/dist/{OrbitControls-2eTi7aWC.cjs → OrbitControls-CpTJa--7.cjs} +1 -1
  4. package/dist/{OrbitControls-D-HKj8Fo.js → OrbitControls-CwAfnF56.js} +1 -1
  5. package/dist/{animationData-0sWRlTij.cjs → animationData-CF6-_eBc.cjs} +1 -1
  6. package/dist/{animationData-B5nSa3Wr.js → animationData-ETdtTXwF.js} +3 -3
  7. package/dist/{array-BRaoaWrW.js → array-BUiCaQsR.js} +1 -1
  8. package/dist/{array-C44hFkbE.cjs → array-CbzJvO5y.cjs} +1 -1
  9. package/dist/config.js +2 -2
  10. package/dist/{dataUtil-CEoQ4Ndk.cjs → dataUtil-DFkONpps.cjs} +1 -1
  11. package/dist/{dataUtil-CQtKj9uA.js → dataUtil-oabcbdyY.js} +1 -1
  12. package/dist/{fileUtil-DtGYyEnX.cjs → fileUtil-BezA0XEu.cjs} +1 -1
  13. package/dist/{fileUtil-Dj784v6C.js → fileUtil-xUu_aleM.js} +1 -1
  14. package/dist/{iconfont-C9S_ZYmF.cjs → iconfont-Bc_5-mGm.cjs} +1 -1
  15. package/dist/{iconfont-B00HEBSZ.js → iconfont-Cj5twyUW.js} +2 -2
  16. package/dist/{index-C1qs0RQj.cjs → index-7jCqww1w.cjs} +1 -1
  17. package/dist/{index--C6k-D2N.js → index-B35gkDgD.js} +1 -1
  18. package/dist/{index-C4l0VtK0.cjs → index-B3_Z46NG.cjs} +1 -1
  19. package/dist/{index-DZR8LUZN.js → index-BA_mOmgl.js} +2 -2
  20. package/dist/{index-BtpjDKvW.cjs → index-BHkXSoxP.cjs} +1 -1
  21. package/dist/{index-CWLJn5Pm.cjs → index-BOfa3R-1.cjs} +1 -1
  22. package/dist/{index-15b-TQsb.js → index-BWDmAGYH.js} +2 -2
  23. package/dist/{index-fLRprcfZ.cjs → index-BahsZur-.cjs} +1 -1
  24. package/dist/{index-CD9AL3Zp.cjs → index-Bha2dAuG.cjs} +1 -1
  25. package/dist/{index-DRtjEAPe.js → index-BjLowWoy.js} +2 -2
  26. package/dist/{index-pApFSSVJ.js → index-BnNI_rxz.js} +2 -2
  27. package/dist/{index-CshWG_Bn.cjs → index-BntUSUuQ.cjs} +1 -1
  28. package/dist/{index-ClIX3WK6.js → index-BopRIRaa.js} +5 -5
  29. package/dist/{index-CPGdT7Ir.js → index-Bp59pdeu.js} +3 -3
  30. package/dist/{index-BalMucur.cjs → index-BsQpRUkg.cjs} +1 -1
  31. package/dist/{index-sNFUCD37.cjs → index-Bsj_M3tu.cjs} +1 -1
  32. package/dist/{index-BDnhFcKf.js → index-BwL33eO2.js} +2 -2
  33. package/dist/{index-ClijEvVw.js → index-C-4KKbC7.js} +27 -26
  34. package/dist/{index-BhXhtoRc.js → index-CTIVfb14.js} +2 -2
  35. package/dist/{index-DFF7L3iO.js → index-CUeHiWp_.js} +1 -1
  36. package/dist/{index-Dmx1WOtT.cjs → index-CV-9wRXp.cjs} +1 -1
  37. package/dist/{index-BDRc8Y81.js → index-CWQAImyg.js} +1 -1
  38. package/dist/{index-J7ZV_p_y.js → index-CX9ZToOe.js} +7 -7
  39. package/dist/{index-Cf9pDAXa.js → index-C_FC7JhD.js} +5 -5
  40. package/dist/{index-CamDUXA9.js → index-CcKVjgvm.js} +1 -1
  41. package/dist/{index-D7eQxqbc.cjs → index-CfKLvZ17.cjs} +1 -1
  42. package/dist/{index-CgjAehAI.cjs → index-Ci05kJVO.cjs} +1 -1
  43. package/dist/{index-CkTe2T2S.cjs → index-CizvuDrT.cjs} +1 -1
  44. package/dist/{index-C8Pcs5aU.cjs → index-CnW0XyMI.cjs} +1 -1
  45. package/dist/{index-DBtBAS_Q.cjs → index-CnasZ7DR.cjs} +1 -1
  46. package/dist/{index-7_o-VRMN.js → index-CowSp0mU.js} +2 -2
  47. package/dist/{index-DVYQdx3z.cjs → index-Cs1m0QHY.cjs} +1 -1
  48. package/dist/{index-Dwzx2xTf.js → index-CvI-Xndo.js} +1 -1
  49. package/dist/{index-rwUPu6ZD.cjs → index-CvrlW6Kj.cjs} +1 -1
  50. package/dist/{index-BWrns3Oc.cjs → index-D4X5ZbsB.cjs} +1 -1
  51. package/dist/{index-Dr4WmRi_.js → index-DHOgfCKk.js} +5 -5
  52. package/dist/{index-CocGAXyD.js → index-DK1sT-Gv.js} +11 -11
  53. package/dist/{index-Dj0KOUf5.js → index-DPLITXsJ.js} +20 -20
  54. package/dist/{index-DH8MpnEO.js → index-DalL4U6b.js} +1 -1
  55. package/dist/{index-Dpt2UYlJ.cjs → index-DbW_sD5N.cjs} +1 -1
  56. package/dist/{index-HQwjD7os.cjs → index-DynEv7dZ.cjs} +1 -1
  57. package/dist/{index-DjhlRPC-.cjs → index-ExjSK4s1.cjs} +1 -1
  58. package/dist/{index-DABjfIra.js → index-GOk9tc6o.js} +1 -1
  59. package/dist/{index-CnE7ML6c.cjs → index-LcSS6r-3.cjs} +1 -1
  60. package/dist/{index-CIIVTNal.cjs → index-RfA-XD5A.cjs} +1 -1
  61. package/dist/{index-aYtsSmZR.js → index-bFFymrtu.js} +2 -2
  62. package/dist/{index-b8sQiO-W.js → index-bhZxftEb.js} +5 -5
  63. package/dist/{index-DcJFFIQw.cjs → index-h5XWazmL.cjs} +1 -1
  64. package/dist/{index-CNwegUef.js → index-ixEWAWI8.js} +3 -3
  65. package/dist/{index-B--EuduQ.js → index-peUgec1X.js} +8 -8
  66. package/dist/{index-BdKvrPvY.cjs → index-vDXPLbzt.cjs} +1 -1
  67. package/dist/{index-DlHrVgZ8.cjs → index-w9_VhKWc.cjs} +1 -1
  68. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CX15bSA6.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B8Lpp-LG.js} +6138 -6136
  69. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-hIVK_HWV.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-yBjOSB4T.cjs} +13 -13
  70. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C5hViTw-.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js} +1 -1
  71. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0V41x5SW.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs} +1 -1
  72. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B95xPNJf.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-DTRpzofW.js} +5 -5
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-qUMVkjAK.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DaxZVXAO.cjs} +1 -1
  74. package/dist/{index.vue_vue_type_style_index_1_lang-Cgrrd0F_.js → index.vue_vue_type_style_index_1_lang-BX_Iweoa.js} +4 -4
  75. package/dist/{index.vue_vue_type_style_index_1_lang-C1o8R3nH.cjs → index.vue_vue_type_style_index_1_lang-BgqA98cE.cjs} +1 -1
  76. package/dist/{index.vue_vue_type_style_index_1_lang-4wOK4zzH.js → index.vue_vue_type_style_index_1_lang-CWCaf0OP.js} +12 -4
  77. package/dist/{index.vue_vue_type_style_index_1_lang-C4diM8a_.cjs → index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs} +1 -1
  78. package/dist/{main-CB1J3P3P.cjs → main-BnGiV5RB.cjs} +1 -1
  79. package/dist/{main-DJo5OeDN.js → main-DHZFoZje.js} +4 -4
  80. package/dist/ss-component.cjs +1 -1
  81. package/dist/ss-component.css +1 -1
  82. package/dist/ss-component.js +10 -10
  83. package/dist/ss-component2.cjs +1 -1
  84. package/dist/ss-component2.js +11 -11
  85. package/dist/{threeModel-CuxcqV63.cjs → threeModel-BHsadPD8.cjs} +1 -1
  86. package/dist/{threeModel-D04_GFIf.js → threeModel-BkNMl4gC.js} +4 -4
  87. package/dist/{threePreview-V9Xz9HjD.js → threePreview-BhHpGgi8.js} +3 -3
  88. package/dist/{threePreview-CW0sFOSX.cjs → threePreview-q2XmhoL-.cjs} +1 -1
  89. package/dist/{threeSceneView-DDsAajYr.js → threeSceneView-CDFoPU6x.js} +10 -10
  90. package/dist/{threeSceneView-BF_WPeoa.cjs → threeSceneView-D_2JHUdz.cjs} +1 -1
  91. package/dist/{threeSceneViewForCPMPIP-BRcYZwUP.js → threeSceneViewForCPMPIP-BBelwG21.js} +9 -9
  92. package/dist/{threeSceneViewForCPMPIP-QaddctTy.cjs → threeSceneViewForCPMPIP-DSIkOvjL.cjs} +1 -1
  93. package/dist/{threeTrackPathView-B7nPn2Ux.cjs → threeTrackPathView-CClVyd1p.cjs} +1 -1
  94. package/dist/{threeTrackPathView-4BeFstTz.js → threeTrackPathView-CeCre9ru.js} +4 -4
  95. package/dist/{threeViewerHost-jb5Evx2L.cjs → threeViewerHost-B2ROtL1I.cjs} +1 -1
  96. package/dist/{threeViewerHost-Cn8KRcg6.js → threeViewerHost-DLd9bynL.js} +3 -3
  97. package/dist/{urdfTree-BKFaMWwA.cjs → urdfTree-B2NsYdY-.cjs} +1 -1
  98. package/dist/{urdfTree-6IOpa4uv.js → urdfTree-vu4m_HnH.js} +1 -1
  99. package/dist/{workpieceTreePanel-BxHEIkWb.js → workpieceTreePanel-CXVtdZfX.js} +5 -5
  100. package/dist/{workpieceTreePanel-cCIDMmlI.cjs → workpieceTreePanel-Dif_gJAG.cjs} +1 -1
  101. package/package.json +1 -1
  102. package/public/config.js +2 -2
@@ -1 +1 @@
1
- "use strict";const da=require("./index-rwUPu6ZD.cjs"),e=require("vue"),p=require("./index-DEBf-IBT.cjs"),Tt=require("./index-BdKvrPvY.cjs"),_e=require("./index.vue_vue_type_style_index_1_lang-C4diM8a_.cjs"),Xt=require("./index-CgjAehAI.cjs"),No=require("./threeViewerHost-jb5Evx2L.cjs"),fa=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0V41x5SW.cjs"),Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Vo=require("./isString-D6Z6SOrb.cjs"),Oo=require("./index-D7eQxqbc.cjs"),kl=require("./index-BVaHwt5f.cjs"),Rr=require("./index-CnE7ML6c.cjs");var Fr=/\s/;function Lr(a){for(var i=a.length;i--&&Fr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Lr(a)+1).replace($r,"")}var Mo=NaN,Kr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function zo(a){if(typeof a=="number")return a;if(p.isSymbol(a))return Mo;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=jr(a);var s=Ur.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Kr.test(a)?Mo:+a}var lo=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function ho(a,i,s){var l,c,d,x,g,h,D=0,E=!1,_=!1,V=!0;if(typeof a!="function")throw new TypeError(qr);i=zo(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Gr(zo(s.maxWait)||0,i):d,V="trailing"in s?!!s.trailing:V);function O(A){var T=l,le=c;return l=c=void 0,D=A,x=a.apply(le,T),x}function W(A){return D=A,g=setTimeout(K,i),E?O(A):x}function De(A){var T=A-h,le=A-D,Le=i-T;return _?Xr(Le,d-le):Le}function q(A){var T=A-h,le=A-D;return h===void 0||T>=i||T<0||_&&le>=d}function K(){var A=lo();if(q(A))return ie(A);g=setTimeout(K,De(A))}function ie(A){return g=void 0,V&&l?O(A):(l=c=void 0,x)}function w(){g!==void 0&&clearTimeout(g),D=0,l=h=c=g=void 0}function z(){return g===void 0?x:ie(lo())}function k(){var A=lo(),T=q(A);if(l=arguments,c=this,h=A,T){if(g===void 0)return W(h);if(_)return clearTimeout(g),g=setTimeout(K,i),O(h)}return g===void 0&&(g=setTimeout(K,i)),x}return k.cancel=w,k.flush=z,k}var Yr="[object Boolean]";function xl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function wl(a){return a===void 0}const Jr={class:"form-content"},Qr={title:"选择标签"},Zr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__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,g.value=!1,h.value=[]},l=a;e.computed(()=>{var Z;const v=(Z=Ue.value)==null?void 0:Z.split("/");return(v==null?void 0:v.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:Be.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),g=e.ref(!1),h=e.ref([]);No.useThreeSystem();const D=e.ref(),E=e.ref(!1),_=e.ref(!1),V=e.ref([]),O=e.ref(),W=e.ref(!1),De=e.ref([]),q=da.useFormToTableComp(p.pinia),K=da.useFormComp(p.pinia),ie=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),T=e.ref(!0),le=_e.useModelComp(p.pinia),{tableViewContents:Le,itemData:ot,isEdit:Be,routeToChildPath:Ke,lockingPage:xe}=p.storeToRefs(le),I=e.ref(null),te=e.ref(!1),ee=e.ref(!1),he=_e.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(he),st=_e.useOriginalState(p.pinia),{originalPath:H}=p.storeToRefs(st),M=e.ref([]),me=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),be=async v=>{ee.value=v,await tt("disabled",null,v,!0)},ze=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Oe=()=>{e.nextTick(()=>{Q()})},Ye=v=>{var L;d.value=(L=d.value)==null?void 0:L.map(Z=>({...Z,isFormColHidden:!(v!=null&&v.includes(Z.label))}))};e.onUnmounted(()=>{I.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var L,Z,P,ue,R,X;if(v===""){let se="";(L=d.value)==null||L.forEach(G=>{G!=null&&G.isMain&&(se=G==null?void 0:G.value)});let ve=await _e.getItemData(Ke.value,sessionStorage.getItem("systemKey"),"");se=((X=(R=(ue=(P=(Z=ve==null?void 0:ve[0])==null?void 0:Z.compData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="mainRouters"))==null?void 0:ue.contents)==null?void 0:R[0])==null?void 0:X.routerContent)+H.value+se;let ae=await _e.getItemData(se,sessionStorage.getItem("systemKey"),"");W.value=!0,De.value=ae==null?void 0:ae.filter(G=>(G==null?void 0:G.comp)!=="methodButton"),c("routeUrl",De.value)}},Q=()=>{var L;const v=(L=I.value)==null?void 0:L.$el;v&&fa.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Z=>{const{oldIndex:P,newIndex:ue}=Z;if(P===ue)return;const R=d.value.splice(P,1)[0];d.value.splice(ue,0,R)}})},tt=async(v,L,Z,P=!1)=>{var ue,R,X,se,ve,$,ae,G;try{le.setRefreshCurStructure(!1);const Se=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((ue=Se==null?void 0:Se.data)==null?void 0:ue.code)===200){let de=(ve=(se=(X=(R=Se==null?void 0:Se.data)==null?void 0:R.result)==null?void 0:X[0])==null?void 0:se.value)==null?void 0:ve.pageData;P?de={...de,compData:(ae=de==null?void 0:de.compData)==null?void 0:ae.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"?{...F,contents:(fe=F==null?void 0:F.contents)==null?void 0:fe.map(ne=>({...ne,[v]:Z}))}:F})}:de={...de,compData:($=de==null?void 0:de.compData)==null?void 0:$.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"?{...F,contents:(fe=F==null?void 0:F.contents)==null?void 0:fe.map(ne=>(ne==null?void 0:ne.prop)===(L==null?void 0:L.prop)?{...ne,[v]:Z}:ne)}:F})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:de}});((G=Ee==null?void 0:Ee.data)==null?void 0:G.code)===200?(p.ElMessage.success("编辑成功"),le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},nt=async(v,L)=>{await tt("label",L,v)},Pe=async(v,L)=>{v&&await tt("type",L,v)},ce=async(v,L,Z)=>{await tt(L,Z,v,!1)},oe=(v,L)=>{A.value===L?T.value=!1:T.value=!0,A.value=L==null?void 0:L.changeProp},re=async v=>{var Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe;let L=[];if((Z=v==null?void 0:v.toString())!=null&&Z.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],g.value=!0,x.value=!0;return}if((P=v==null?void 0:v.toString())!=null&&P.includes(".stl")||(ue=v==null?void 0:v.toString())!=null&&ue.includes(".STL")||(R=v==null?void 0:v.toString())!=null&&R.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){h.value=(se=v==null?void 0:v.toString())==null?void 0:se.split(","),g.value=!1,x.value=!0;return}if((ve=v==null?void 0:v.toString())!=null&&ve.includes(".stl")||($=v==null?void 0:v.toString())!=null&&$.includes(".STL")||(ae=v==null?void 0:v.toString())!=null&&ae.includes(".obj")||(G=v==null?void 0:v.toString())!=null&&G.includes(".mtl")){let ne,Ae=[],Je={};if(Array.isArray(v)?ne=v:ne=v==null?void 0:v.split(","),ne==null||ne.forEach(Me=>{Me.includes(".mtl")?Ae.push(Me):Je.blob=Je.blob?Je.blob+","+Me:Me}),(Ae==null?void 0:Ae.length)>0&&(Je.mtlBlobs=Ae),(de=(Se=Object.values(Je))==null?void 0:Se[0])!=null&&de.includes("http:"))L.push(Je);else{const Me=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ve=URL.createObjectURL(Me),ge="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,je)=>{var ye;je===((ye=v==null?void 0:v.split("/"))==null?void 0:ye.length)-1&&(ge=ct)}),(F=Je.blob)!=null&&F.includes(".stl")&&(ge=(ge==null?void 0:ge.replaceAll(">",""))+".urdf"),O.value=[{name:ge,blobUrl:Ve}],_.value=!0}}else{const ne=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ae=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ne.close()}),Je=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(Je),Ve="";(fe=v==null?void 0:v.split("/"))==null||fe.forEach((ge,ct)=>{var je;ct===((je=v==null?void 0:v.split("/"))==null?void 0:je.length)-1&&(Ve=ge)}),O.value=[{name:Ve,blobUrl:Me}],_.value=!0}(L==null?void 0:L.length)>0&&K.setBlobUrls(L)},Ie=()=>{_.value=!1},Xe=v=>{var R,X,se,ve;const L=(X=(R=p.cloneDeep(l.itemData))==null?void 0:R.find($=>($==null?void 0:$.key)==="formContent"))==null?void 0:X.contents,Z=p.cloneDeep(v.content);let P={};Z&&((se=Object.values(Z))==null?void 0:se.length)>0&&((ve=Object.values(Z))==null||ve.forEach(($,ae)=>{P[L[ae].key]=$}));const ue={content:P,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",ue)},dt=e.computed(()=>"http://222.92.178.198:62001"),m=async v=>{var Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe;if(!v)return;(de=(Se=l==null?void 0:l.itemData)==null?void 0:Se.find(pe=>(pe==null?void 0:pe.key)==="parentFormPath"))==null||de.contents;let L=Le.value;(L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(pe=>{var Fe,We,N,Ce;let Ne=(Fe=pe==null?void 0:pe.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Ne==null?void 0:Ne[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ne==null?void 0:Ne[1]))&&(pe.value=(Ce=(N=d.value)==null?void 0:N.find(ut=>(ut==null?void 0:ut.prop)===(Ne==null?void 0:Ne[1])))==null?void 0:Ce.value),pe}),le.setTableViewContents(L));const Z=p.cloneDeep(l.itemData);let P=Z==null?void 0:Z.map(pe=>{var Ne;return(pe==null?void 0:pe.key)==="formContent"&&((Ne=pe.contents)==null||Ne.map((Fe,We)=>{var N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Kt,Ft;return Fe.type=(Ce=(N=d.value)==null?void 0:N.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ce.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ft=(et=(ut=Fe==null?void 0:Fe.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=da.formGetOptions((Te=(rt=Fe==null?void 0:Fe.key)==null?void 0:rt.split("$"))==null?void 0:Te[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Fe==null?void 0:Fe.key)!=null&&pt.includes("$")&&(Fe.key=(It=(vt=Fe==null?void 0:Fe.key)==null?void 0:vt.split("$"))==null?void 0:It[0]),Fe.signature=(xt=(Bt=d.value)==null?void 0:Bt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:xt.signature,Fe.isLoginUser=(Ot=(wt=d.value)==null?void 0:wt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ot.isLoginUser,Fe.value=(At=Object.values(v))==null?void 0:At[We],Fe.isFormColHidden=(Ft=(Kt=d.value)==null?void 0:Kt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ft.isFormColHidden,Fe})),pe}),ue=d.value,R=(F=(Ee=p.cloneDeep(P))==null?void 0:Ee.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:F.contents;if(ue=ue==null?void 0:ue.map(pe=>{var Ne;return pe.value=(Ne=R==null?void 0:R.find((Fe,We)=>((Fe==null?void 0:Fe.id)??We)===(pe==null?void 0:pe.id)))==null?void 0:Ne.value,pe}),!T.value){c("contentChange",{contents:P,index:l.index});return}let X="",se=(Ae=(ne=(fe=p.cloneDeep(P))==null?void 0:fe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ne.contents)==null?void 0:Ae.find((pe,Ne)=>{var Fe,We,N;return(pe==null?void 0:pe.label)===A.value||Ne.toString()===((N=(We=(Fe=A.value)==null?void 0:Fe.split("t"))==null?void 0:We[1])==null?void 0:N.toString())}),ve=(Je=se==null?void 0:se.optionUrl)==null?void 0:Je.menuSelect,$=!0;if((ge=(Ve=(Me=p.cloneDeep(P))==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:Ve.contents)==null||ge.forEach(pe=>{var Ne,Fe,We,N,Ce,ut;$&&((We=(Fe=(Ne=pe==null?void 0:pe.optionUrl)==null?void 0:Ne.groupSelect)==null?void 0:Fe[1])!=null&&We.includes("["))&&(X=(Ce=(N=pe==null?void 0:pe.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1],JSON.stringify(ve)===JSON.stringify((ut=pe==null?void 0:pe.optionUrl)==null?void 0:ut.menuSelect)&&($=!1))}),(ct=se==null?void 0:se.optionUrl)!=null&&ct.menuSelect&&T.value){let pe=await da.getSelectRow(se),Ne,Fe=(je=se==null?void 0:se.optionUrl)==null?void 0:je.menuSelect;if(pe==null||pe.forEach(We=>{var N,Ce,ut,et,ft,rt,Te,Ze,He,pt;X===((Ce=(N=se==null?void 0:se.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=se==null?void 0:se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Te=(rt=se==null?void 0:se.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Te[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(se==null?void 0:se.value)&&(Ne=We)}),Ne){let We=p.cloneDeep(ue);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt;return(Ne!=null&&Ne[Ce==null?void 0:Ce.label]||Ne!=null&&Ne[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Te=Ce==null?void 0:Ce.optionUrl)==null?void 0:Te.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Fe!=null&&Fe.every(xt=>{var wt,Ot;return(Ot=(wt=Ce==null?void 0:Ce.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:Ot.includes(xt)})&&(Ce.value=(Ne==null?void 0:Ne[Ce==null?void 0:Ce.label])||(Ne==null?void 0:Ne[(Bt=(It=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(xt=>(xt==null?void 0:xt.url)&&(xt==null?void 0:xt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let N=p.cloneDeep(We);N=N==null?void 0:N.map(Ce=>{var ut,et,ft,rt,Te,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Te=Ce==null?void 0:Ce.optionUrl)==null?void 0:Te.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,It,Bt;if(He!=null&&He.includes("[")){let xt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(Bt=(It=p.cloneDeep(We))==null?void 0:It.find(wt=>(wt==null?void 0:wt.label)===xt))==null?void 0:Bt.value}return He})),Ce}),d.value=N}else d.value=ue;P=P==null?void 0:P.map(We=>{var N;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(N=We.contents)==null?void 0:N.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Te=>(Te==null?void 0:Te.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Te=>(Te==null?void 0:Te.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}T.value=!1,c("contentChange",{contents:P,index:l.index});let ae=[],G=[];if((we=p.cloneDeep((ye=P==null?void 0:P.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ye.contents))==null||we.forEach(pe=>{var Ne;Array.isArray(pe==null?void 0:pe.value)&&((Ne=pe==null?void 0:pe.value)!=null&&Ne.find(Fe=>{var We;return(We=Fe==null?void 0:Fe.url)==null?void 0:We.includes(".obj")}))&&(G=pe==null?void 0:pe.value)}),(G==null?void 0:G.length)>0){const pe=(Qe=p.cloneDeep(G))==null?void 0:Qe.filter(Ne=>{var Fe;return(Fe=Ne==null?void 0:Ne.url)==null?void 0:Fe.includes(".obj")});pe==null||pe.forEach(Ne=>{var We,N,Ce,ut;const Fe=(We=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);ae.push({objUrl:Ne==null?void 0:Ne.url,mtlUrls:((N=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:N.length)===1?(ut=(Ce=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Fe})}),K.setObjUrl(ae)}},C=v=>{if(!v)return;const L=[];let Z="";for(let P of v)(P.includes("[")||Z.includes("["))&&(Z+=P.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&&(L.push(Z.replace(/\/\*[\s\S]*?\*\//g,"")),Z=""));return L},U=(v,L,Z)=>{let P="";const ue=L==null?void 0:L.map(R=>{var X;return(X=R==null?void 0:R.value)==null?void 0:X.pageData});return ue==null||ue.forEach(R=>{var X;(R==null?void 0:R.name)===(v==null?void 0:v[0])&&((X=R==null?void 0:R.compData)==null||X.forEach(se=>{var ve;(se==null?void 0:se.key)==="formContent"&&((ve=se==null?void 0:se.contents)==null||ve.forEach($=>{var ae;($==null?void 0:$.prop)===(v==null?void 0:v[1])&&(P=($==null?void 0:$.value)===""?_e.judgeContents((ae=p.cloneDeep($))==null?void 0:ae.optionUrl,Z):$==null?void 0:$.value)}))}))}),P},Y=(v,L,Z,P)=>{var se,ve;let ue="",R="";(se=p.cloneDeep(L))==null||se.forEach(($,ae)=>{$!=null&&$.includes("[")?R=R+H.value+v[ae]:R=R===""?R+$:R+"/"+$});let X=(ve=P[R])==null?void 0:ve.map($=>{var ae;return(ae=$==null?void 0:$.value)==null?void 0:ae.pageData});return X==null||X.forEach($=>{var ae;($==null?void 0:$.name)===(Z==null?void 0:Z[0])&&((ae=$==null?void 0:$.compData)==null||ae.forEach(G=>{var Se;(G==null?void 0:G.key)==="formContent"&&((Se=G==null?void 0:G.contents)==null||Se.forEach(de=>{(de==null?void 0:de.prop)===(Z==null?void 0:Z[1])&&(ue=de==null?void 0:de.value)}))}))}),ue};return e.watch(()=>l.itemData,async()=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je;const v=(X=l.itemData)==null?void 0:X.find(ye=>(ye==null?void 0:ye.key)==="formContent"),L=(se=p.cloneDeep(l.itemData))==null?void 0:se.find(ye=>(ye==null?void 0:ye.key)==="formButton"),Z=(ve=p.cloneDeep(l.itemData))==null?void 0:ve.find(ye=>(ye==null?void 0:ye.key)==="formFlex"),P=($=p.cloneDeep(l.itemData))==null?void 0:$.find(ye=>(ye==null?void 0:ye.key)==="formWrap"),ue=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(ye=>(ye==null?void 0:ye.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?E.value=!1:E.value=!0,ie.value=(ue==null?void 0:ue.contents)===void 0?!1:ue==null?void 0:ue.contents,w.value=typeof(Z==null?void 0:Z.contents)!="boolean"?!(!(Z!=null&&Z.contents)===""||((G=Z==null?void 0:Z.contents)==null?void 0:G.toUpperCase())==="VERTICAL"):Z==null?void 0:Z.contents,((Se=v==null?void 0:v.contents)==null?void 0:Se.length)>0&&Array.isArray(v==null?void 0:v.contents)){let ye=l.allMapContents;const we=(Ee=(de=p.cloneDeep(v))==null?void 0:de.contents)==null?void 0:Ee.map((N,Ce)=>{var xt,wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn,vn,Gn,Xn,Yn,$n,In,gn,Mn,Bn,nn,Dn;let ut=(N==null?void 0:N.label)??(N==null?void 0:N.key)??"",et=(N==null?void 0:N.type)??"",ft=(N==null?void 0:N.options)??[];if((xt=N==null?void 0:N.key)!=null&&xt.includes("$")&&(ut=(wt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:wt[0],((At=(Ot=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ot[1])==null?void 0:At.length)>0)){const[bt,Yt]=(Ft=(Kt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Kt[1])==null?void 0:Ft.split(/[()]/);et=((Vt=_e.FormType.find(gt=>(gt==null?void 0:gt.key)===bt))==null?void 0:Vt.value)??"",((Ht=Yt==null?void 0:Yt.split(","))==null?void 0:Ht.length)>0&&(ft=(xn=Yt==null?void 0:Yt.split(","))==null?void 0:xn.map(gt=>({label:gt,value:gt})))}let rt=[];N!=null&&N.contents&&!Array.isArray(N==null?void 0:N.contents)&&(rt=(wn=(dn=N==null?void 0:N.contents)==null?void 0:dn.split(","))==null?void 0:wn.map(bt=>({label:bt,value:bt}))),((_n=N==null?void 0:N.optionUrl)==null?void 0:_n.selectRelateType)==="自定义绑定"&&(rt=(Sn=(fn=N==null?void 0:N.optionUrl)==null?void 0:fn.defaultSelect)==null?void 0:Sn.map(bt=>({label:bt,value:bt})));let Te=!1,Ze=(N==null?void 0:N.isFormColHidden)??!1,He=_e.judgeContents((hn=p.cloneDeep(N))==null?void 0:hn.optionUrl,ye),pt=He!==void 0&&He!==""?He:N!=null&&N.originalContent&&(N==null?void 0:N.originalContent)!==""?N.originalContent:N!=null&&N.value?N.value:(ft==null?void 0:ft.length)>0?(Tn=ft==null?void 0:ft[0])==null?void 0:Tn.value:(N==null?void 0:N.value)??"",vt=!1,It=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url))))&&(It="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.isLoginUser)Te=!0,pt=((vn=k.value)==null?void 0:vn.姓名)||((Gn=k.value)==null?void 0:Gn.account)||((Xn=k.value)==null?void 0:Xn.账号)||((Yn=k.value)==null?void 0:Yn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.signature||N!=null&&N.isShow)if(vt=!0,(N==null?void 0:N.isShow)==="originalSignature")It="image",pt=dt.value+"/"+(($n=k.value)==null?void 0:$n.signature);else{let bt=[...new Set(C(N.isShow))].map(Mt=>{var An,an,Nn,Qt;return{key:(Qt=(Nn=(an=(An=Mt==null?void 0:Mt.split("["))==null?void 0:An[1])==null?void 0:an.split("]"))==null?void 0:Nn[0])==null?void 0:Qt.split(":"),value:""}});(In=ot.value)==null||In.forEach(Mt=>{bt==null||bt.forEach((mn,An)=>{var Nn;let an=mn==null?void 0:mn.key;(Mt==null?void 0:Mt.name)===(an==null?void 0:an[0].replaceAll("'",""))&&((Nn=Mt==null?void 0:Mt.compData)==null||Nn.forEach(Qt=>{var jn;(Qt==null?void 0:Qt.key)==="formContent"&&((jn=Qt==null?void 0:Qt.contents)==null||jn.forEach(yn=>{(yn==null?void 0:yn.prop)===(an==null?void 0:an[1].replaceAll("'",""))&&(bt[An].value=yn==null?void 0:yn.value)}))}))})});let Yt=bt==null?void 0:bt.map(Mt=>{var mn;return Mt.key="["+((mn=Mt.key)==null?void 0:mn.join(":"))+"]",Mt}),gt=N==null?void 0:N.isShow;Yt==null||Yt.forEach(Mt=>{Mt!=null&&Mt.value?gt=gt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):gt=gt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((gn=gt==null?void 0:gt.split("==="))==null?void 0:gn[0])+"==='"+((Mn=gt==null?void 0:gt.split("==="))==null?void 0:Mn[1])+"'":gt=((Bn=gt==null?void 0:gt.split("="))==null?void 0:Bn[0])+"='"+((nn=gt==null?void 0:gt.split("="))==null?void 0:nn[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 }`)()?(Ze=!1,It="image",pt=dt.value+"/"+((Dn=k.value)==null?void 0:Dn.signature)):pt=""}return Array.isArray(pt)&&pt.every(bt=>(bt==null?void 0:bt.url)&&(bt==null?void 0:bt.name))&&(N.type="Upload"),N!=null&&N.isMainUrl&&(It="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(N==null?void 0:N.key),type:It,value:N!=null&&N.isNewDate&&pt===""?new Date:pt,id:(N==null?void 0:N.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(N==null?void 0:N.width)??1,isLoginUser:Te,config:N==null?void 0:N.config,optionUrl:(N==null?void 0:N.optionUrl)??N,isFormColHidden:Ze,signature:vt,isMain:N==null?void 0:N.isMain,isMainUrl:N==null?void 0:N.isMainUrl,operable:(N==null?void 0:N.operable)??!1,disabled:(N==null?void 0:N.disabled)??!1}}),Qe=we==null?void 0:we.map(N=>N==null?void 0:N.value);let pe="";Qe==null||Qe.forEach(N=>{N!==""&&N!==void 0&&(pe=pe===""?N:pe+"/"+N)}),q.setSelectArray(Qe),q.setSelectString(pe);let Ne=(F=p.cloneDeep(we))==null?void 0:F.map(N=>(N!=null&&N.value&&_e.IsJson(N==null?void 0:N.value)&&Array.isArray(JSON.parse(N==null?void 0:N.value))&&(N.value=JSON.parse(N.value)),N));Ne=Ne==null?void 0:Ne.map(N=>{var Ce,ut,et,ft,rt,Te,Ze,He;if((ut=(Ce=N==null?void 0:N.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";N.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(N))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,N.optionUrl.menuSelect=(Te=(rt=N==null?void 0:N.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Te.map(vt=>{var It,Bt,xt,wt,Ot,At;if(vt!=null&&vt.includes("[")){let Kt=(Bt=(It=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Bt[1];pt=U((xt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),ye==null?void 0:ye[Ue.value],ye),vt=((Ot=(wt=p.cloneDeep(Ne))==null?void 0:wt.find(Ft=>(Ft==null?void 0:Ft.label)===Kt))==null?void 0:Ot.value)||U((At=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),ye==null?void 0:ye[Ue.value],ye)}return vt}),pt!==""&&N.value===""&&(N.value=Y(N.optionUrl.menuSelect,N.optionUrl.oldMenuSelect,(Ze=N==null?void 0:N.optionUrl)==null?void 0:Ze.groupSelect,ye),Array.isArray(N.value)&&((He=N.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(N.type="UPLOAD"))}return N}),d.value=Ne,ee.value=((fe=d.value)==null?void 0:fe.every(N=>N==null?void 0:N.disabled))||xe.value===Ue.value,te.value=(ne=d.value)==null?void 0:ne.every(N=>N==null?void 0:N.operable),M.value=(Ae=d.value)==null?void 0:Ae.map(N=>N==null?void 0:N.label);let Fe=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(N=>{var Ce;Array.isArray(N==null?void 0:N.value)&&((Ce=N==null?void 0:N.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=N==null?void 0:N.value)}),(We==null?void 0:We.length)>0){const N=(Me=p.cloneDeep(We))==null?void 0:Me.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});N==null||N.forEach(Ce=>{var et,ft,rt,Te;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Fe.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Te=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Te.url:ut})}),K.setObjUrl(Fe)}(Ve=p.cloneDeep(d.value))==null||Ve.forEach(N=>{var Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt;if((ut=(Ce=N==null?void 0:N.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=N==null?void 0:N.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Te=(rt=N==null?void 0:N.value)==null?void 0:rt.toString())!=null&&Te.includes(".obj")||(He=(Ze=N==null?void 0:N.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=N==null?void 0:N.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let wt={},Ot=[],At;Array.isArray(N==null?void 0:N.value)?At=N==null?void 0:N.value:At=(It=N==null?void 0:N.value)==null?void 0:It.split(","),At==null||At.forEach(Kt=>{Kt.includes(".mtl")?Ot.push(Kt):wt.blob=wt.blob==="undefined"?Kt:wt.blob+","+Kt}),(Ot==null?void 0:Ot.length)>0&&(wt.mtlBlobs=Ot),(xt=(Bt=Object.values(wt))==null?void 0:Bt[0])!=null&&xt.includes("http:")}})}else d.value=[];let R=Le.value;if((R==null?void 0:R.length)>0&&(R=R==null?void 0:R.map(ye=>{var Qe,pe,Ne,Fe;let we=(Qe=ye==null?void 0:ye.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(we==null?void 0:we[0])&&(pe=d.value)!=null&&pe.find(We=>(We==null?void 0:We.prop)===(we==null?void 0:we[1]))&&(ye.value=(Fe=(Ne=d.value)==null?void 0:Ne.find(We=>(We==null?void 0:We.prop)===(we==null?void 0:we[1])))==null?void 0:Fe.value),ye}),le.setTableViewContents(R)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let ye={};(ge=p.cloneDeep(d).value)==null||ge.forEach(we=>{(we==null?void 0:we.isMain)===!0&&(ye[(we==null?void 0:we.prop)??(we==null?void 0:we.name)]=[{required:!0,message:`${(we==null?void 0:we.prop)||(we==null?void 0:we.name)}不能为空`}])}),D.value=ye}if(((ct=L==null?void 0:L.contents)==null?void 0:ct.length)>0){const ye=[];(je=L==null?void 0:L.contents)==null||je.forEach((we,Qe)=>{(we==null?void 0:we.label)!==""&&ye.push({label:(we==null?void 0:we.label)??"",id:(we==null?void 0:we.id)??Qe,type:(we==null?void 0:we.type)??"",background:we==null?void 0:we.background})}),V.value=ye}else V.value=[]},{deep:!0,immediate:!0}),e.watch(()=>xe.value,v=>{ee.value=v===Ue.value},{immediate:!0}),(v,L)=>{const Z=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),ue=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-popover"),X=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Tt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:V.value,isRowFlex:!1,isEnableWrap:ie.value,onOnButtonClick:Xe,onChange:m,formDisabled:ee.value,formLabelsOperable:te.value,isButtonRow:E.value,onPreview:re,onBlurChange:oe,onHandleColEditChange:nt,onHandleColTypeChange:Pe,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:se,formDisabled:ve,formLabelsOperable:$})=>[e.createVNode(R,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Oe},{reference:e.withCtx(()=>[e.createElementVNode("span",Qr,[e.createVNode(Z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Zr,[L[1]||(L[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":ve,"active-text":"禁用","inactive-text":"",onChange:be,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:ze},null,8,["model-value"]),L[2]||(L[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(X,{modelValue:M.value,"onUpdate:modelValue":L[0]||(L[0]=ae=>M.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:I,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(ue,{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(R,{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 G;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=Object.keys(ae))==null?void 0:G.filter(Se=>{var de;return(de=me.value)==null?void 0:de.find(Ee=>(Ee==null?void 0:Ee.value)===Se)}),Se=>{var de,Ee;return e.openBlock(),e.createElementBlock("div",{key:Se},[e.createVNode(Tt._sfc_main$1,{value:ae==null?void 0:ae[Se],"active-text":(Ee=(de=me.value)==null?void 0:de.find(F=>(F==null?void 0:F.value)===Se))==null?void 0:Ee.label,inactiveText:"",onChange:F=>ce(F,Se,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[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"]),_.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:O.value,onDestroy:Ie},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{"file-urls":h.value,isThreeScene:g.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Po=Rt._export_sfc(ni,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),Dl=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:Dl(l==null?void 0:l.children)},l))},ai=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:Dl(l==null?void 0:l.children)},l))},Cl=(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=Cl(l==null?void 0:l.children,i),l)),a)},El=(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=El(l==null?void 0:l.children,i),l)),a)},_l=(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=_l(l==null?void 0:l.children,i),l)),a)},Sl=(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=Sl(l==null?void 0:l.children,i),l)),a)},St=[{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"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__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=_e.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{l("fixChange",p.cloneDeep(w))},O=w=>{l("deleteChange",p.cloneDeep(w))},W=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},De=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},q=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="id"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Le=>(Le==null?void 0:Le.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},K=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},ie=w=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(A.label),1),e.createElementVNode("div",ui,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>W(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>ie(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Tl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:O,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:q},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Rt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__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=_e.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{l("fixChange",p.cloneDeep(w))},V=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},O=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},W=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},De=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="idChild"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Le=>(Le==null?void 0:Le.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},q=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},K=w=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,le)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(T.label),1),e.createElementVNode("div",bi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>O(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>V(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>K(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:ie,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(A,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Rt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},zi={class:"fix-button"},Pi={class:"operate-title"},Ri={class:"operate-content"},Fi={class:"fix-content"},Li={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ki={class:"operate-content"},Ui={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Qi={class:"dialog-footer"},Zi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__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),g=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),V=e.ref(""),O=e.ref(""),W=e.ref([]),De=e.ref([]),q=e.ref([]),K=e.ref([]),ie=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),le=e.ref([]),Le=()=>{ie.value=!0;let m=[];Pn==null||Pn.forEach(C=>{k.value++,m.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})}),w.value=m,z.value=m},ot=()=>{var C,U,Y;x.value=!0;let m=[];(Y=(U=(C=_e.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:U.value)==null||Y.forEach(v=>{k.value++,m.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=m,T.value=m},Be=m=>{m||(A.value=T.value)},Ke=async m=>{var C,U,Y,v,L,Z,P,ue,R,X,se,ve;if((m==null?void 0:m.类型)!==((U=(C=T.value)==null?void 0:C.find($=>($==null?void 0:$.label)==="类型"))==null?void 0:U.value)){let $=[],ae=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:v.value)==null?void 0:L.value)?await((X=(R=(ue=_e.FormContent)==null?void 0:ue.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=_e.FormContent)==null?void 0:Z.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:P.value;if(ae==null||ae.forEach(G=>{k.value++,$.push({label:G==null?void 0:G.label,name:(G==null?void 0:G.name)||(G==null?void 0:G.label),type:G.type,value:G!=null&&G.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[G.label])??"",id:k.value,contents:G==null?void 0:G.options,prop:(G==null?void 0:G.prop)||(G==null?void 0:G.name)||(G==null?void 0:G.label)})}),m!=null&&m.菜单选项&&((se=m==null?void 0:m.菜单选项)==null?void 0:se.length)>0){const G=await _e.menuToContentType(m==null?void 0:m.菜单选项);$=$==null?void 0:$.map(Se=>((Se==null?void 0:Se.name)==="组信息选项"&&(Se.contents=G),Se))}T.value=await _e.selectToBase(p.cloneDeep($)),A.value=await _e.selectToBase(p.cloneDeep($))}else{let $=p.cloneDeep(A.value);if($=$==null?void 0:$.map(ae=>(ae.value=m==null?void 0:m[ae.name],ae)),m!=null&&m.菜单选项&&((ve=m==null?void 0:m.菜单选项)==null?void 0:ve.length)>0){const ae=await _e.menuToContentType(m==null?void 0:m.菜单选项);$=$==null?void 0:$.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ae),G))}$=_e.formToOptionsContents($),T.value=await _e.selectToBase(p.cloneDeep($))}},xe=async m=>{await Ke(m),A.value=T.value},I=(m,C)=>{if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.selectRelateType)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.menuSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.groupSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(C==null?void 0:C.value)||C[m.key];if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const U=C[m.key];return xl(U)?U:m.default}return(m==null?void 0:m.label)==="类型"&&C[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!C[m.key]?!1:C[m.key]},te=async m=>{var Y,v,L,Z,P,ue,R,X,se;x.value=!0;let C=[];const U=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:v.value)==null?void 0:L.value)?await((X=(R=(ue=_e.FormContent)==null?void 0:ue.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=_e.FormContent)==null?void 0:Z.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:P.value;if(U==null||U.forEach(ve=>{k.value++,C.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):I(ve,m),id:k.value,contents:ve==null?void 0:ve.options})}),m!=null&&m.menuSelect&&((se=m==null?void 0:m.menuSelect)==null?void 0:se.length)>0){const ve=await _e.menuToContentType(m==null?void 0:m.menuSelect);C=C==null?void 0:C.map($=>(($==null?void 0:$.name)==="组信息选项"&&($.contents=ve),$))}V.value=m==null?void 0:m.id,A.value=await _e.selectToBase(_e.formToOptionsContents(C)),T.value=await _e.selectToBase(_e.formToOptionsContents(C))},ee=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;le.value=(C=p.cloneDeep(le.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=le.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{x.value=!1,A.value=[],V.value=""},Ue=async()=>{var Y,v,L,Z,P,ue,R,X,se,ve;A.value=T.value;let m={};V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value);let C=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find($=>{var ae,G;return($==null?void 0:$.key)===(((G=(ae=A.value)==null?void 0:ae.find(Se=>(Se==null?void 0:Se.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:v.value)==null?void 0:L.value)??((P=(Z=_e.FormContent)==null?void 0:Z.find($=>{var ae,G;return($==null?void 0:$.key)===(((G=(ae=A.value)==null?void 0:ae.find(Se=>(Se==null?void 0:Se.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:P.value);if((ue=A.value)==null||ue.forEach($=>{const ae=C==null?void 0:C.find(G=>(G==null?void 0:G.label)===($==null?void 0:$.label));ae&&(m[ae.key]=$.value)}),m.name=m.label,(R=le.value)!=null&&R.find($=>$.id===m.id))le.value=(X=le.value)==null?void 0:X.map($=>($.id===m.id&&($=m),$));else{let $=p.cloneDeep(le.value);le.value||(le.value=[]),$.push(m),le.value=$}le.value=le.value.map(({id:$,...ae})=>ae),x.value=!1,V.value="";let U=p.cloneDeep(s.originalItemContents);(se=p.cloneDeep(s.originalItemContents))!=null&&se.find($=>($==null?void 0:$.key)==="tableToForm")?U=(ve=p.cloneDeep(s.originalItemContents))==null?void 0:ve.map($=>(($==null?void 0:$.key)==="tableToForm"&&($.contents=le.value),$)):U.push({key:"tableToForm",contents:le.value}),l("change",U)},st=m=>{ie.value=!0;let C=[];Pn==null||Pn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:k.value,contents:U==null?void 0:U.options})}),V.value=m==null?void 0:m.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,U;let m=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?m=(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):m.push({key:"page",contents:E.value}),l("change",m)},{deep:!0});const H=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;De.value=(C=p.cloneDeep(De.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=De.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var U,Y,v,L,Z;w.value=z.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=w.value)==null||U.forEach(P=>{const ue=Pn==null?void 0:Pn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=De.value)!=null&&Y.find(P=>P.id===m.id))De.value=(v=De.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(De.value)??[];P.push(m),De.value=P}ie.value=!1,V.value="";let C=p.cloneDeep(s.originalItemContents);(L=p.cloneDeep(s.originalItemContents))!=null&&L.find(P=>(P==null?void 0:P.key)==="extraButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="extraButton"&&(P.contents=De.value),P)):C.push({key:"extraButton",contents:De.value}),l("change",C)},me=m=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),z.value=C},be=()=>{ie.value=!1,w.value=[],V.value=""},ze=m=>{h.value=!0;let C=[];Rn==null||Rn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:k.value,contents:U==null?void 0:U.options})}),V.value=m==null?void 0:m.id,q.value=C,K.value=C},Oe=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;W.value=(C=p.cloneDeep(W.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=W.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let m=[];St==null||St.forEach(C=>{k.value++,m.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=m,_.value=m},qe=()=>{h.value=!0;let m=[];Rn==null||Rn.forEach(C=>{k.value++,m.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})}),q.value=m,K.value=m},lt=m=>{let C=p.cloneDeep(K.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),K.value=C},Q=()=>{var U,Y,v,L,Z;q.value=K.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=q.value)==null||U.forEach(P=>{const ue=Rn==null?void 0:Rn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=W.value)!=null&&Y.find(P=>P.id===m.id))W.value=(v=W.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(W.value);P.push(m),W.value=P}h.value=!1,V.value="";let C=p.cloneDeep(s.originalItemContents);(L=p.cloneDeep(s.originalItemContents))!=null&&L.find(P=>(P==null?void 0:P.key)==="rowButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="rowButton"&&(P.contents=W.value),P)):C.push({key:"rowButton",contents:W.value}),l("change",C)},tt=()=>{h.value=!1,V.value="",K.value=[],q.value=[]},nt=m=>{d.value=!0;let C=[];St==null||St.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:k.value,contents:U==null?void 0:U.options})}),D.value=C,O.value=m==null?void 0:m.id,_.value=C},Pe=m=>{var C;g.value=Cl(p.cloneDeep(g.value),m==null?void 0:m.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(U=>{var Y;return(U==null?void 0:U.key)==="header"&&(U.contents=(Y=g.value)!=null&&Y.some(v=>v==null?void 0:v.children)?[g.value]:g.value),U}))},ce=m=>{var U,Y,v;m.type==="fix"?m.id!==""?g.value=_l(g.value,m):g.value=El(g.value,m==null?void 0:m.contents):g.value=Sl(g.value,m),g.value=(U=g.value)!=null&&U.some(L=>L==null?void 0:L.children)?[g.value]:g.value,V.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(L=>(L==null?void 0:L.key)==="header")?C=(v=p.cloneDeep(s.originalItemContents))==null?void 0:v.map(L=>((L==null?void 0:L.key)==="header"&&(L.contents=g.value),L)):C.push({key:"header",contents:g.value}),l("change",C)},oe=m=>{var U;d.value=!0;let C=[];St==null||St.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:m[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),m!=null&&m.children&&((U=m==null?void 0:m.children)==null?void 0:U.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),V.value=m==null?void 0:m.id,O.value="",D.value=C,_.value=C},re=m=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),_.value=C},Ie=()=>{d.value=!1,V.value="",O.value="",_.value=[]},Xe=()=>{var U,Y,v,L,Z,P;D.value=_.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=D.value)==null||U.forEach(ue=>{const R=St==null?void 0:St.find(X=>(X==null?void 0:X.label)===(ue==null?void 0:ue.label));R?m[R.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(m.children=ue.children)}),(Y=g.value)!=null&&Y.find(ue=>ue.id===m.id))g.value=(v=g.value)==null?void 0:v.map(ue=>(ue.id===m.id&&(ue=m),ue));else{let ue=p.cloneDeep(g.value)??[];O.value===""?ue.push(m):ue=ue==null?void 0:ue.map(R=>(R.id===O.value&&(R.children||(R.children=[]),R.children.push(m)),R)),g.value=ue}g.value=(L=g.value)!=null&&L.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,d.value=!1,V.value="",O.value="";let C=p.cloneDeep(s.originalItemContents);(Z=p.cloneDeep(s.originalItemContents))!=null&&Z.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(P=p.cloneDeep(s.originalItemContents))==null?void 0:P.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),l("change",C)},dt=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;g.value=(C=p.cloneDeep(g.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>{var v;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(v=g.value)!=null&&v.some(L=>L==null?void 0:L.children)?[g.value]:g.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),g.value=(C=(m=c.value)==null?void 0:m.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:C.contents,W.value=(Y=(U=c.value)==null?void 0:U.find(F=>(F==null?void 0:F.key)==="rowButton"))==null?void 0:Y.contents,De.value=(L=(v=c.value)==null?void 0:v.find(F=>(F==null?void 0:F.key)==="extraButton"))==null?void 0:L.contents,E.value=(P=(Z=c.value)==null?void 0:Z.find(F=>(F==null?void 0:F.key)==="page"))!=null&&P.contents?!!((R=(ue=c.value)==null?void 0:ue.find(F=>(F==null?void 0:F.key)==="page"))!=null&&R.contents):!1,le.value=(se=(X=c.value)==null?void 0:X.find(F=>(F==null?void 0:F.key)==="tableToForm"))==null?void 0:se.contents,g.value=(ve=g.value)==null?void 0:ve.map((F,fe)=>(Array.isArray(F)?F=ai(F):F={label:(F==null?void 0:F.label)??"",prop:(F==null?void 0:F.label)==="操作"?"operate":F==null?void 0:F.prop,width:F!=null&&F.width?parseInt(F.width):"",fixed:(F==null?void 0:F.fixed)??void 0,sortable:(F==null?void 0:F.sortable)??!1,align:(F==null?void 0:F.align)??"left",showOverflowTooltip:(F==null?void 0:F.showOverflowTooltip)??!0,isNotDrag:(F==null?void 0:F.isNotDrag)??!1,isEditCol:(F==null?void 0:F.isEditCol)??!1,isOperate:(F==null?void 0:F.isOperate)??!1,id:(F==null?void 0:F.id)??fe,formMenuSelect:(F==null?void 0:F.formMenuSelect)??void 0,groupSelect:(F==null?void 0:F.groupSelect)??void 0},F)),g.value=($=g.value)!=null&&$.every(F=>Array.isArray(F))?(ae=g.value)==null?void 0:ae[0]:g.value,W.value=(G=W.value)==null?void 0:G.map((F,fe)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",textColor:(F==null?void 0:F.textColor)??"#000000",id:(F==null?void 0:F.id)??fe}),De.value=(Se=De.value)==null?void 0:Se.map((F,fe)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",background:(F==null?void 0:F.background)??"var(--ssComponent-primary-color)",id:(F==null?void 0:F.id)??fe}),le.value)le.value=(Ee=le.value)==null?void 0:Ee.map(F=>{k.value++;let fe=F;return fe.id=k.value,fe});else{let F=[];const fe=(de=_e.getColumnChild(p.cloneDeep(g.value)))==null?void 0:de.filter(ne=>(ne==null?void 0:ne.prop)!=="operate");fe==null||fe.forEach(ne=>{var Ae;k.value++,F.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.label),type:ne!=null&&ne.groupSelect?"Select":"Input",value:"",id:k.value,contents:ne==null?void 0:ne.options,menuSelect:ne==null?void 0:ne.formMenuSelect,groupSelect:(Ae=ne==null?void 0:ne.groupSelect)==null?void 0:Ae.split(":"),selectRelateType:"关联绑定列"})}),le.value=F}},{deep:!0,immediate:!0}),(m,C)=>{const U=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>nt(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>oe(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Tl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:Pe,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",zi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>ze(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>Oe(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Fi,[e.createElementVNode("div",Li,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",$i,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>st(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>H(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ot},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Wi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Hi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>te(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>ee(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(Y,{onClick:Ie,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:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(Y,{onClick:tt,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:Q,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:ie.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(Y,{onClick:be,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:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:x.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Ke,onChangeVisible:Be,onBlurChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(Y,{onClick:he,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:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Rt._export_sfc(as,[["__scopeId","data-v-7a6b87b5"]]),ls=_e.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=_e.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((g=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:g.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||cs.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:((O=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:O.minW)||us.value,minH:((De=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:De.minH)||ds.value,maxH:((K=(q=a==null?void 0:a.value)==null?void 0:q.tableData)==null?void 0:K.maxH)||fs.value,i:((w=(ie=a==null?void 0:a.value)==null?void 0:ie.tableData)==null?void 0:w.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,x,g,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(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((g=a==null?void 0:a.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(V=>(V==null?void 0:V.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Il=(a,i,s)=>{var x,g;const l=(g=(x=rs.value)==null?void 0:x[ss.value])==null?void 0:g.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=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Il(h,D))),{...hs(c,i,d,a)}},gs=(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)=>Il(l,c)):[]},ms=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}]}]}}),ys=(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}),bs=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,g=>{var E;const h=ms(s==null?void 0:s.optionItems),D=g?(E=h[g==null?void 0:g.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[V,O]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===V)return{..._,value:O};return _})},{immediate:!0});const d=g=>Tt.getComponent(g),x=g=>{var h,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.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(V=>({...V,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(V=>({...V,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:g==null?void 0:g.prop})};return(g,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":V=>_.value=V,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:V=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Rt._export_sfc(bs,[["__scopeId","data-v-a99af9a7"]]),xs=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=K=>K==null?void 0:K.reduce((ie,w)=>(ie[w==null?void 0:w.prop]=w==null?void 0:w.rule,ie),{}),g=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=(K,ie,w)=>{var A;let z=[];(s==null?void 0:s.activeTabName)==="任务配置"?(z=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:ie}]},{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)==="任务关联"&&(z=[{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 w&&(w==null?void 0:w.length)>0?k=[...z,..._(K,ie,w)]:k=z,k},_=(K,ie,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},V=(K,ie)=>{var T,le,Le,ot,Be,Ke,xe,I,te;const w=((Be=(ot=(Le=(le=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Le.contents)==null?void 0:ot.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:Be.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],z=/button/i,k=((te=(I=(xe=(Ke=s==null?void 0:s.comp)==null?void 0:Ke.compData)==null?void 0:xe.filter(ee=>z.test(ee==null?void 0:ee.key)))==null?void 0:I.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:te.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],A=E(w,k,K);h.value=ie?ys(A,ie):A,K&&(K==null?void 0:K.length)>0&&d.value.push(...K==null?void 0:K.map(ee=>({prop:ee,rule:c})))};e.onMounted(()=>{V(null,s==null?void 0:s.extendItem)});const O=K=>{const ie=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const w=ie==null?void 0:ie.join("/");V(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},W=K=>{l("change",{target:s==null?void 0:s.target,extendConfigs:K})},De=(K,ie)=>{D.value=ie==null?void 0:ie.changeProp,O(K)},q=K=>{l("onButtonClick",K)};return(K,ie)=>(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:W,onBlurChange:De,onOnButtonClick:q},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Rt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Rt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},zs={style:{display:"flex","justify-content":"space-between"}},Ps={class:"form-content"},Rs={class:"dialog-footer"},Fs={class:"form-content"},Ls={__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([]),g=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),V=e.ref(0),O=e.ref([]),W=e.ref([]),De=(I,te)=>{if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.selectRelateType)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.menuSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.groupSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(te==null?void 0:te.value)||te[I.key];if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const ee=te[I.key];return xl(ee)?ee:I.default}return(I==null?void 0:I.label)==="类型"&&te[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!te[I.key]?!1:te[I.key]},q=async I=>{var he,Ue,st,H,M,me;c.value=!0;let te=[];const ee=await((st=(Ue=(he=_e.FormContent)==null?void 0:he.find(be=>(be==null?void 0:be.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(H=_e.FormContent)==null?void 0:H.find(be=>(be==null?void 0:be.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:M.value);if(ee==null||ee.forEach(be=>{V.value++,te.push({label:be==null?void 0:be.label,name:be==null?void 0:be.label,type:be.type,prop:be==null?void 0:be.prop,value:De(be,I),id:V.value,contents:be==null?void 0:be.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((me=I==null?void 0:I.menuSelect)==null?void 0:me.length)>0){const be=await _e.menuToContentType(I==null?void 0:I.menuSelect);te=te==null?void 0:te.map(ze=>((ze==null?void 0:ze.name)==="组信息选项"&&(ze.contents=be),ze))}E.value=I==null?void 0:I.id,d.value=await _e.selectToBase(_e.formToOptionsContents(te)),x.value=await _e.selectToBase(_e.formToOptionsContents(te))},K=I=>{var ee;g.value=!0;let te=[];(ee=_e.FormButton)==null||ee.forEach(he=>{V.value++,te.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&I[he.key]===""?"normal":I[he.key],id:V.value,contents:he==null?void 0:he.options})}),O.value=te,W.value=te,E.value=I==null?void 0:I.id};e.watch(()=>_.value,()=>{var te,ee;let I=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(he=>(he==null?void 0:he.key)==="enableWrap")?I=(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!_.value),he)):I.push({key:"enableWrap",contents:!_.value}),l("change",I)},{deep:!0});const ie=()=>{var ee,he,Ue,st,H;O.value=W.value;let I={};if(E.value!==""?I.id=E.value:(V.value++,I.id="id"+V.value),(ee=O.value)==null||ee.forEach(M=>{var be;const me=(be=_e.FormButton)==null?void 0:be.find(ze=>(ze==null?void 0:ze.label)===(M==null?void 0:M.label));me&&(I[me.key]=M.value)}),(he=h.value)!=null&&he.find(M=>M.id===I.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===I.id&&(M=I),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(I),h.value=M}g.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(st=p.cloneDeep(s.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?te=(H=p.cloneDeep(s.originalItemContents))==null?void 0:H.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):te.push({key:"formButton",contents:h.value}),l("change",te)},w=I=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=I=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=h.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;g.value=!0;let I=[];(te=_e.FormButton)==null||te.forEach(ee=>{V.value++,I.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"?"normal":"",id:V.value,contents:ee==null?void 0:ee.options})}),O.value=I,W.value=I},A=()=>{var te,ee,he;c.value=!0;let I=[];(he=(ee=(te=_e.FormContent)==null?void 0:te.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:ee.value)==null||he.forEach(Ue=>{V.value++,I.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:V.value,contents:Ue==null?void 0:Ue.options})}),d.value=I,x.value=I},T=I=>{let te=p.cloneDeep(W.value);te=te==null?void 0:te.map(ee=>(ee.value=I==null?void 0:I[ee.name],ee)),W.value=te},le=I=>{const te=I.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ee=I.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),he=I.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");ee!=null&&ee.value&&Vo.isString(he.value)&&(he.value=[he.value]),!(ee!=null&&ee.value)&&!Vo.isString(he.value)&&(he.value="")},Le=async I=>{var te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye;if((I==null?void 0:I.类型)!==((ee=(te=x.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ee.value)){let qe=[];const lt=await((st=(Ue=(he=_e.FormContent)==null?void 0:he.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((ze=(be=(me=_e.FormContent)==null?void 0:me.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:be.value)==null?void 0:ze.value):(M=(H=_e.FormContent)==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Q=>{var nt,Pe;V.value++;const tt=wl(Q==null?void 0:Q.default)?(I==null?void 0:I[Q.label])??Q.value??"":Q==null?void 0:Q.default;qe.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:tt,prop:Q==null?void 0:Q.prop,id:V.value,contents:Q==null?void 0:Q.options,width:((Pe=(nt=x.value)==null?void 0:nt[0])==null?void 0:Pe.width)??1})}),I!=null&&I.菜单选项&&((Oe=I==null?void 0:I.菜单选项)==null?void 0:Oe.length)>0){const Q=await _e.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Q),tt))}le(qe),x.value=await _e.selectToBase(p.cloneDeep(qe)),d.value=await _e.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=I==null?void 0:I[lt.name],lt)),I!=null&&I.菜单选项&&((Ye=I==null?void 0:I.菜单选项)==null?void 0:Ye.length)>0){const lt=await _e.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(Q=>((Q==null?void 0:Q.name)==="组信息选项"&&(Q.contents=lt),Q))}qe=_e.formToOptionsContents(qe),le(qe),x.value=await _e.selectToBase(p.cloneDeep(qe))}},ot=I=>{I||(d.value=x.value)},Be=async I=>{await Le(I),d.value=x.value},Ke=ho(async()=>{var he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt;d.value=x.value;let I={};I.width=((Ue=(he=d.value)==null?void 0:he[0])==null?void 0:Ue.width)??1,E.value!==""?I.id=E.value:(V.value++,I.id="id"+V.value);let te=await((M=(H=(st=_e.FormContent)==null?void 0:st.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(Pe=>(Pe==null?void 0:Pe.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:H.value)==null?void 0:M.value)??((be=(me=_e.FormContent)==null?void 0:me.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(Pe=>(Pe==null?void 0:Pe.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:be.value);if((ze=d.value)==null||ze.forEach(Q=>{const tt=te==null?void 0:te.find(nt=>(nt==null?void 0:nt.label)===(Q==null?void 0:Q.label));tt&&(I[tt.key]=Q.value)}),I.width=I.width?I.width:1,I.key=I==null?void 0:I.label,I.isFormColHidden=I==null?void 0:I.isFormColHidden,(Oe=D.value)!=null&&Oe.find(Q=>Q.id===I.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Q=>(Q.id===I.id&&(Q=I),Q));else{let Q=p.cloneDeep(D.value);Q.push(I),D.value=Q}D.value=D.value.map(({id:Q,...tt})=>tt),c.value=!1,E.value="";let ee=p.cloneDeep(s.originalItemContents);(qe=p.cloneDeep(s.originalItemContents))!=null&&qe.find(Q=>(Q==null?void 0:Q.key)==="formContent")?ee=(lt=p.cloneDeep(s.originalItemContents))==null?void 0:lt.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=D.value),Q)):ee.push({key:"formContent",contents:D.value}),l("change",ee)},300),xe=()=>{c.value=!1,g.value=!1,E.value="",x.value=[],W.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ee,he,Ue,st,H;if(!s.originalItemContents||s.originalItemContents.length===0)return;const I=p.cloneDeep(s.originalItemContents);D.value=((te=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ee=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:ee.contents)??[],_.value=(he=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ue=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,me)=>{var ze;let be=M;return be.id=(M==null?void 0:M.id)??me,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((ze=M==null?void 0:M.options)==null?void 0:ze.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,be}),D.value=_e.formToOptionsContents(D.value),h.value=(H=h.value)==null?void 0:H.map((M,me)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:me})},{deep:!0,immediate:!0}),(I,te)=>{const ee=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",As,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>q(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",Ms,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>K(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>z(Ue)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",zs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Ue=>_.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Le,onChangeVisible:ot,onBlurChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(he,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(Ke),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fs,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:xe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ro=Rt._export_sfc(Ls,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Ks={class:"step-module layout"},Us={class:"form-content"},Ws=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"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=q=>{var K;D.value=q,l("change",(K=W())==null?void 0:K.compData)},V=(q,K)=>{var ie,w;switch(q){case"create":(ie=d.value)==null||ie.forEach(z=>{z.value=""}),h.value="create",g.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),h.value="update",g.visible=!0;break;case"delete":E.value.splice(K,1),h.value="delete";break}},O=q=>{var K,ie,w;if((q==null?void 0:q.buttonName)==="确认"){const z=p.cloneDeep(q==null?void 0:q.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((K=E.value)==null?void 0:K.length)+1});break;case"update":E.value=(ie=E.value)==null?void 0:ie.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=W())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},W=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),De=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},E.value=((ie=q==null?void 0:q.find(w=>w.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ks,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:De,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Rt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=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([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),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:"时间线"}),_=q=>{var K;d.value=q,l("change",(K=W())==null?void 0:K.compData)},V=(q,K)=>{var ie,w;switch(q){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(K,1),c.value="delete";break}},O=q=>{var K,ie,w,z;if((q==null?void 0:q.buttonName)==="确认"){const k=p.cloneDeep(q==null?void 0:q.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(ie=x.value)==null||ie.push({...k,index:((K=x.value)==null?void 0:K.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.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",(z=W())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},W=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),De=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(d.value=((K=q==null?void 0:q.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},x.value=((ie=q==null?void 0:q.find(w=>w.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:De,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Qs=Rt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Zs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Rt._export_sfc(Zs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__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,g=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var z;const w=p.cloneDeep(s.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(le=>{var Le;T.push((Le=Object.values(le))==null?void 0:Le[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(w,z,k,A)=>{var le;let T={};((le=w==null?void 0:w[0])==null?void 0:le.contents)==="详情"&&(g.value=!0,T[z]=w,d.value=w==null?void 0:w.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},V=w=>{var Le,ot,Be,Ke;const z=(ot=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:ot.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),k=(Ke=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Ke.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),A=k==null?void 0:k.map((xe,I)=>{var te;return I===w.index&&(xe==null?void 0:xe.comp)==="Table"&&(xe.compData=(te=xe.compData)==null?void 0:te.map(ee=>{var he,Ue;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ue=(he=w.content)==null?void 0:he.map(st=>{let H={};for(let M in st)M!=="id"&&(H[M]=st[M]);return H}))==null?void 0:Ue.map(st=>Object.values(st))),ee})),xe});A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let xe in T)le[xe]=A;h.value=le},O=()=>{g.value=!1,h.value={},D.value={},E.value=void 0,l.value++},W=w=>{var Le,ot,Be,Ke;const z=(ot=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:ot.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),k=(Ke=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Ke.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),A=k==null?void 0:k.map((xe,I)=>(I===w.index&&(xe.compData=w.contents),xe));A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let xe in T)le[xe]=A;h.value=le},De=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),g.value=!1,h.value={},D.value={},E.value=void 0},q=()=>{g.value=!1,h.value={},D.value={},E.value=void 0},K=w=>{x("change",w,"methodData")},ie=w=>ga(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(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",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(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:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:q},{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(ie(A.comp)),{itemData:A==null?void 0:A.compData,onChange:V,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:W,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Rt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Ct="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=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(":",Ct))==null?void 0:s.split(Ct))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},uc=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},pc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),dc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),fc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),xa=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},Ca=(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},hc=(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},Fo=(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&&Fo(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&&Fo(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},vc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),gc=a=>{var i,s,l,c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct;if(fc(a)){let je={},ye=(l=(s=(i=a==null?void 0:a.replace(":",Ct))==null?void 0:i.split(Ct))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),we="",Qe="",pe=(d=(c=a==null?void 0:a.replace(":",Ct))==null?void 0:c.split(Ct))==null?void 0:d[1];if((pe==null?void 0:pe[0])==="("&&(Qe=(h=(g=(x=pe==null?void 0:pe.split("("))==null?void 0:x[1])==null?void 0:g.split(")"))==null?void 0:h[0],pe=(E=(D=pe==null?void 0:pe.replace(")",Ct))==null?void 0:D.split(Ct))==null?void 0:E[1]),((_=Ga(pe,"/"))==null?void 0:_.length)>1)we=(V=Ga(pe,"/"))==null?void 0:V.map(Ne=>Ne==null?void 0:Ne.replaceAll("/","").replaceAll("'",""));else if(pe.includes("{")||pe.includes("("))if(pe.includes("{")?we=we+((ie=(K=(q=(De=(W=(O=pe==null?void 0:pe.split("{"))==null?void 0:O[1])==null?void 0:W.split("}"))==null?void 0:De[0])==null?void 0:q.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:ie.replaceAll("]","])"))+"[":we=we+((le=(T=(A=(k=(z=(w=pe==null?void 0:pe.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:le.replaceAll("]","])"))+"[",!((Le=pe==null?void 0:pe.split(")"))!=null&&Le[1]))we=we+((Ke=(Be=(ot=pe==null?void 0:pe.split("["))==null?void 0:ot[1])==null?void 0:Be.split("]"))==null?void 0:Ke[0])+"]";else{const Ne=(ee=(te=(I=(xe=pe==null?void 0:pe.split(")"))==null?void 0:xe[1])==null?void 0:I.replace("[",Ct))==null?void 0:te.split(Ct))==null?void 0:ee[1];if(pe!=null&&pe.includes("?"))we=((he=pe==null?void 0:pe.split("?"))==null?void 0:he[1])+"&&"+((st=(Ue=pe==null?void 0:pe.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ne){const Fe=Ne.lastIndexOf("]"),We=Ne.substring(0,Fe)+Ct+Ne.substring(Fe+1);we=we+((H=We==null?void 0:We.split(Ct))==null?void 0:H[0])+"]"}else we=(be=(me=(M=a==null?void 0:a.replace(":",Ct))==null?void 0:M.split(Ct))==null?void 0:me[1])==null?void 0:be.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))we=(Ye=(Oe=(ze=a==null?void 0:a.replace(":",Ct))==null?void 0:ze.split(Ct))==null?void 0:Oe[1])==null?void 0:Ye.replaceAll("'","");else{let Ne=(Q=(lt=(qe=a==null?void 0:a.replace(":",Ct))==null?void 0:qe.split(Ct))==null?void 0:lt[1])==null?void 0:Q.replaceAll("'","");we=((Pe=(nt=(tt=Ne==null?void 0:Ne.split("?"))==null?void 0:tt[1])==null?void 0:nt.split(":"))==null?void 0:Pe[0])+"&&"+((ce=Ne==null?void 0:Ne.split("?"))==null?void 0:ce[0])}return je[ye]=Qe!==""?Qe+"$##"+we:we,{groupName:"",formContents:[[je]]}}else{let je={},ye="",we="";if(a.includes("#")){ye=(re=(oe=a==null?void 0:a.split("#"))==null?void 0:oe[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Ie=a==null?void 0:a.split("#"))==null?void 0:Ie[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?we=we+((U=(C=(m=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:m.split("}"))==null?void 0:C[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":we=we+((Z=(L=(v=(Y=Qe==null?void 0:Qe.split("("))==null?void 0:Y[1])==null?void 0:v.split(")"))==null?void 0:L[0])==null?void 0:Z.replaceAll(":","/").replaceAll("'",""))+"[",we=we+((ve=(ue=(P=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:P.split(Ct))==null?void 0:ue[1])==null?void 0:ve.slice(0,((se=(X=(R=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:R.split(Ct))==null?void 0:X[1])==null?void 0:se.length)-1))}else{let Qe=(G=(ae=($=a==null?void 0:a.split("]"))==null?void 0:$[0])==null?void 0:ae.split("["))==null?void 0:G[1];if((Se=Qe==null?void 0:Qe.split(":"))==null||Se.forEach((pe,Ne)=>{var Fe;((Fe=Qe==null?void 0:Qe.split(":"))==null?void 0:Fe.length)-1===Ne&&(ye=pe==null?void 0:pe.replaceAll("'",""))}),!(a!=null&&a.includes("[")))we=((fe=(F=(Ee=(de=a==null?void 0:a.split("]"))==null?void 0:de[1])==null?void 0:Ee.replace(":",Ct).split(Ct))==null?void 0:F[1])==null?void 0:fe.replaceAll("'",""))??"";else{let pe=(ge=(Ve=(Me=(Je=(Ae=(ne=p.cloneDeep(a))==null?void 0:ne.split("("))==null?void 0:Ae[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll("{","").replaceAll("}",""))==null?void 0:ge.replaceAll("'","").replaceAll(":","/"),Ne="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Fe=>{Ne=Ne===""?Ne+(Fe==null?void 0:Fe.replaceAll("'","")):Ne+":"+(Fe==null?void 0:Fe.replaceAll("'",""))}),we=pe+"["+Ne+"]"}}return je[ye]=we,{groupName:"",formContents:[[je]]}}},mc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),yc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},bc=a=>{var d,x,g,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=xa(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=(g=xa(p.cloneDeep(i)))==null?void 0:g.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 _,V;return E=(V=(_=E.replace(")",Ct))==null?void 0:_.split(Ct))==null?void 0:V[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L;let _=(W=(O=p.cloneDeep(E))==null?void 0:O.slice(1,p.cloneDeep(E).length-1))==null?void 0:W.replace(":",Ct).split(Ct);if(((q=(De=p.cloneDeep(_))==null?void 0:De[0])==null?void 0:q.replaceAll("'",""))==="输入"){if(!((ie=(K=p.cloneDeep(_))==null?void 0:K[1])!=null&&ie.includes("["))&&!((z=(w=p.cloneDeep(_))==null?void 0:w[1])!=null&&z.includes("("))){_e.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(((le=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:le[0])==="["){let Z=(Ke=(Le=p.cloneDeep(_))==null?void 0:Le[1])==null?void 0:Ke.slice(1,((Be=(ot=p.cloneDeep(_))==null?void 0:ot[1])==null?void 0:Be.length)-1);(I=(xe=xa(Z))==null?void 0:xe.filter(P=>P!==","))==null||I.forEach(P=>{var ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne;let ue={},R=(ae=($=p.cloneDeep(P))==null?void 0:$.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;(Se=R==null?void 0:R[1])!=null&&Se.includes("(")?(se=(Ve=(Me=(Je=(Ae=(ne=(fe=(F=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:F.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.split("("))==null?void 0:Ae[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll(":","/").replaceAll("'",""),(ct=(ge=p.cloneDeep(R))==null?void 0:ge[1])!=null&&ct.includes("[")&&(se=p.cloneDeep(se)+"["+((Ne=(pe=(Qe=(we=(ye=(je=p.cloneDeep(R))==null?void 0:je[1])==null?void 0:ye.split("["))==null?void 0:we[1])==null?void 0:Qe.split("]"))==null?void 0:pe[0])==null?void 0:Ne.replaceAll("'",""))+"]")):se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'",""),ue[X]=se,c.push(ue)})}}else{if(!((ee=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ee.includes("["))&&!((Ue=(he=p.cloneDeep(_))==null?void 0:he[1])!=null&&Ue.includes("("))){_e.IsJson((st=p.cloneDeep(_))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((H=p.cloneDeep(_))==null?void 0:H[1].replaceAll("'",'"')));return}if(((me=(M=p.cloneDeep(_))==null?void 0:M[1])==null?void 0:me[0])==="["){let Z=(Ye=(be=p.cloneDeep(_))==null?void 0:be[1])==null?void 0:Ye.slice(1,((Oe=(ze=p.cloneDeep(_))==null?void 0:ze[1])==null?void 0:Oe.length)-1);(lt=(qe=xa(Z))==null?void 0:qe.filter(P=>P!==","))==null||lt.forEach(P=>{var ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It;let ue={},R=(ae=($=p.cloneDeep(P))==null?void 0:$.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;if(!((Se=R==null?void 0:R[1])!=null&&Se.includes("(")))se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'","");else if(se=(Je=(Ae=(ne=(fe=(F=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:F.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.replace("(",Ct))==null?void 0:Ae.split(Ct))==null?void 0:Je[1],se=(Ve=(Me=yc(p.cloneDeep(se),Ct))==null?void 0:Me.split(Ct))==null?void 0:Ve[0],!(se!=null&&se.includes("(")))se=(ge=p.cloneDeep(se))==null?void 0:ge.replaceAll(":","/").replaceAll("'",""),(je=(ct=p.cloneDeep(R))==null?void 0:ct[1])!=null&&je.includes("[")&&(se=p.cloneDeep(se)+"["+((Ce=(N=(We=(Fe=(we=(ye=p.cloneDeep(R))==null?void 0:ye[1])==null?void 0:we.split("["))==null?void 0:Fe[((Ne=(pe=(Qe=p.cloneDeep(R))==null?void 0:Qe[1])==null?void 0:pe.split("["))==null?void 0:Ne.length)-1])==null?void 0:We.split("]"))==null?void 0:N[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let Bt="";(ut=Ca(se,":"))==null||ut.forEach(xt=>{var wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn;if(!(xt!=null&&xt.includes("(")))Bt=Bt===""?Bt+((wt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:wt.replaceAll("'","")):Bt+"/"+((Ot=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let vn=(wn=(dn=(xn=(Ht=(Vt=(Ft=(Kt=(At=p.cloneDeep(xt))==null?void 0:At.replaceAll("{",""))==null?void 0:Kt.replaceAll("}",""))==null?void 0:Ft.replace("(",Ct))==null?void 0:Vt.split(Ct))==null?void 0:Ht[1])==null?void 0:xn.split(")"))==null?void 0:dn[0])==null?void 0:wn.replaceAll(":","/").replaceAll("'","");vn=vn+"["+((Tn=(hn=(Sn=(fn=(_n=p.cloneDeep(xt))==null?void 0:_n.split("["))==null?void 0:fn[1])==null?void 0:Sn.split("]"))==null?void 0:hn[0])==null?void 0:Tn.replaceAll("'",""))+"]",Bt=Bt===""?Bt+"["+vn+"]":Bt+"/["+vn+"]"}}),se=Bt+"["+((It=(vt=(pt=(He=(ft=(et=p.cloneDeep(R))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Te=(rt=p.cloneDeep(R))==null?void 0:rt[1])==null?void 0:Te.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:It.replaceAll("'",""))+"]"}ue[X]=se,l.push(ue)})}else{let Z=(Pe=(Q=p.cloneDeep(_))==null?void 0:Q[1])==null?void 0:Pe.slice(1,((nt=(tt=p.cloneDeep(_))==null?void 0:tt[1])==null?void 0:nt.length)-1),P={},ue=(U=(C=(re=(oe=(ce=p.cloneDeep(Z))==null?void 0:ce.split("]"))==null?void 0:oe[0])==null?void 0:re.split(":"))==null?void 0:C[((m=(dt=(Xe=(Ie=p.cloneDeep(Z))==null?void 0:Ie.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:m.length)-1])==null?void 0:U.replaceAll("'",""),R=((L=(v=(Y=p.cloneDeep(Z))==null?void 0:Y.split("]"))==null?void 0:v[0])==null?void 0:L.replaceAll("'",""))+"]";P[ue]=R,l.push(P)}}}),{output:l,input:c}},kc=_e.useModelComp(p.pinia),{routeToChildPath:En}=p.storeToRefs(kc),On=_e.useMenuState(p.pinia),{activeMenuPath:na}=p.storeToRefs(On),wa=p.useLoginState(),{loginUserInfo:Gt}=p.storeToRefs(wa),xc=_e.useOriginalState(p.pinia),{originalPath:wc}=p.storeToRefs(xc),Jt=wc.value,Dc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const g=x.match(i);g&&d.push({idx:Number(g[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,g)=>x.idx-g.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],g=[];c.forEach(_=>{var V;return(((V=_.names)==null?void 0:V.length)>d?x:g).push(_)});const h=g.map(_=>_.item),D=new Map;for(const _ of x){const V=_.names[_.names.length-d-1].value;D.has(V)||D.set(V,[]),D.get(V).push(_)}return[...Array.from(D.entries()).map(([_,V])=>{var O;return V[0].names.length===1&&((O=V[0].names[0])==null?void 0:O.idx)===-1?V[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(V,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:Dc(a),Bl=async()=>{var d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se;On.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(En).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 de=(O=(V=(_=(E=(D=(h=(g=i==null?void 0:i.data)==null?void 0:g.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:V.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:O.contents;a=(De=(W=p.cloneDeep(de))==null?void 0:W[0])==null?void 0:De.label}let s=na.value;(ie=na.value)!=null&&ie.includes(`updateLoading${((q=Gt.value)==null?void 0:q.account)||((K=Gt.value)==null?void 0:K.账号)}`)?s=p.cloneDeep(na).value:(k=na.value)!=null&&k.includes(`loading${((w=Gt.value)==null?void 0:w.account)||((z=Gt.value)==null?void 0:z.账号)}`)&&(s=p.cloneDeep(En).value+Jt+`loading${((A=Gt.value)==null?void 0:A.account)||((T=Gt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Le=(le=l==null?void 0:l.data)==null?void 0:le.result)==null?void 0:Le.length)>0){let de="",Ee=[];(Be=(ot=l==null?void 0:l.data)==null?void 0:ot.result)==null||Be.forEach(fe=>{var ne,Ae,Je,Me,Ve;((Ae=(ne=fe==null?void 0:fe.value)==null?void 0:ne.pageData)==null?void 0:Ae.comp)==="Form"&&((Ve=(Me=(Je=fe==null?void 0:fe.value)==null?void 0:Je.pageData)==null?void 0:Me.compData)==null||Ve.forEach(ge=>{(ge==null?void 0:ge.key)==="formContent"&&(Ee=[...Ee,...ge==null?void 0:ge.contents])}))});let F=Ee==null?void 0:Ee.find(fe=>(fe==null?void 0:fe.isMain)===!0);if(F?(de=F==null?void 0:F.value,a=F==null?void 0:F.key):de=(H=(st=(Ue=(he=(ee=(te=(I=(xe=(Ke=l==null?void 0:l.data)==null?void 0:Ke.result)==null?void 0:xe[0])==null?void 0:I.value)==null?void 0:te.pageData)==null?void 0:ee.compData)==null?void 0:he.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(fe=>{var ne,Ae;return(fe==null?void 0:fe.key)===a||((Ae=(ne=fe==null?void 0:fe.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:Ae[1])===a}))==null?void 0:H.value,(be=na.value)!=null&&be.includes(`updateLoading${((M=Gt.value)==null?void 0:M.account)||((me=Gt.value)==null?void 0:me.账号)}`)){let fe=[],ne=[];const Ae=await p.getInsofDataApi({key:{pageKey:(oe=na.value.split(Jt+`updateLoading${((Pe=Gt.value)==null?void 0:Pe.account)||((ce=Gt.value)==null?void 0:ce.账号)}`))==null?void 0:oe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ie=(re=Ae==null?void 0:Ae.data)==null?void 0:re.result)==null?void 0:Ie.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Me=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ve=>{var ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et;if(((ge=Ve==null?void 0:Ve.key)==null?void 0:ge.type)==="structure"){let ft=(we=(ye=(je=(ct=Ve==null?void 0:Ve.value)==null?void 0:ct.pageData)==null?void 0:je.compData)==null?void 0:ye.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:we.contents;if(ft){let rt=await _e.getItemData(ft,sessionStorage.getItem("systemKey"),""),Te=(Fe=(Ne=(pe=(Qe=Ve==null?void 0:Ve.value)==null?void 0:Qe.pageData)==null?void 0:pe.compData)==null?void 0:Ne.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Fe.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var It,Bt;if((vt==null?void 0:vt.key)==="formContent"&&((It=vt==null?void 0:vt.contents)==null?void 0:It.some(wt=>Te==null?void 0:Te.find(Ot=>(Ot==null?void 0:Ot.prop)===(wt==null?void 0:wt.prop))))){let wt=He;wt.compData=(Bt=wt.compData)==null?void 0:Bt.map(At=>{var Kt;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(Kt=At.contents)==null?void 0:Kt.map(Ft=>{var Vt;return Te!=null&&Te.find(Ht=>(Ht==null?void 0:Ht.prop)===(Ft==null?void 0:Ft.prop))&&(Ft.value=(Vt=Te==null?void 0:Te.find(Ht=>(Ht==null?void 0:Ht.prop)===(Ft==null?void 0:Ft.prop)))==null?void 0:Vt.value),Ft})),At});let Ot={};for(let At in wt)At!=="id"&&(Ot[At]=wt[At]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((N=(We=Ae==null?void 0:Ae.data)==null?void 0:We.result)!=null&&N.find(rt=>{var Te,Ze,He,pt;return((Ze=(Te=rt==null?void 0:rt.value)==null?void 0:Te.pageData)==null?void 0:Ze.name)===((pt=(He=Ve==null?void 0:Ve.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(En).value+Jt+de,c.push({id:(et=(ut=(Ce=Ae==null?void 0:Ae.data)==null?void 0:Ce.result)==null?void 0:ut.find(Te=>{var Ze,He,pt,vt;return((He=(Ze=Te==null?void 0:Te.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ve==null?void 0:Ve.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ve==null?void 0:Ve.value})}else{let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(En).value+Jt+de,fe.push({key:rt,value:Ve==null?void 0:Ve.value})}}});await Promise.all(Me),(C=(m=l==null?void 0:l.data)==null?void 0:m.result)==null||C.forEach(Ve=>{var ct,je,ye;let ge=(ct=p.cloneDeep(Ve))==null?void 0:ct.key;ge.pageKey=p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((je=Gt.value)==null?void 0:je.account)||((ye=Gt.value)==null?void 0:ye.账号)}`,On.setChildMenu(ge.pageKey),c.push({id:Ve==null?void 0:Ve.id,key:ge})})}if(de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),On.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await wa.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(fe==null?void 0:fe.length)>0&&(await p.batchAddInsofDataApi({dataList:fe}),(v=fe==null?void 0:fe[0])!=null&&v.key&&await wa.setLogRecordAsync({type:"保存",data:fe},(L=fe==null?void 0:fe[0])==null?void 0:L.key));const Je=await p.getInsofDataApi({key:{pageKey:(ue=na.value.split(Jt+`updateLoading${((Z=Gt.value)==null?void 0:Z.account)||((P=Gt.value)==null?void 0:P.账号)}`))==null?void 0:ue[0],systemKey:sessionStorage.getItem("systemKey")}});if(((X=(R=Je==null?void 0:Je.data)==null?void 0:R.result)==null?void 0:X.length)>0){let Me=[],Ve=(se=l==null?void 0:l.data)==null?void 0:se.result;(ve=p.cloneDeep(Ve))==null||ve.forEach(ge=>{var ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut;if(((ct=ge==null?void 0:ge.key)==null?void 0:ct.type)!=="structure"){let et=(we=(ye=(je=Je==null?void 0:Je.data)==null?void 0:je.result)==null?void 0:ye.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:we.map(Ze=>Ze==null?void 0:Ze.id);Me=[...Me,...et];let ft=(Fe=(Ne=(pe=(Qe=p.cloneDeep(Ve))==null?void 0:Qe.find(Ze=>{var He;return((He=ge==null?void 0:ge.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:pe.value)==null?void 0:Ne.pageData)==null?void 0:Fe.name,rt=(Ce=(N=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:N.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Te=(ut=p.cloneDeep(ge))==null?void 0:ut.key;Te.tableId=rt,Te.pageKey=p.cloneDeep(En).value+Jt+de,ne.push({key:Te,value:ge==null?void 0:ge.value})}}),(Me==null?void 0:Me.length)>0&&(Me=[...new Set(Me)],await p.batchDeleteInsofDataApi({ids:Me})),(ae=($=l==null?void 0:l.data)==null?void 0:$.result)==null||ae.forEach(ge=>{var je,ye,we;let ct=(je=p.cloneDeep(ge))==null?void 0:je.key;ct.pageKey=p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((ye=Gt.value)==null?void 0:ye.account)||((we=Gt.value)==null?void 0:we.账号)}`,On.setChildMenu(ct.pageKey),c.push({id:ge==null?void 0:ge.id,key:ct})})}(ne==null?void 0:ne.length)>0&&(await p.batchAddInsofDataApi({dataList:ne}),(G=fe==null?void 0:fe[0])!=null&&G.key&&await wa.setLogRecordAsync({type:"保存",data:ne},(Se=ne==null?void 0:ne[0])==null?void 0:Se.key)),p.ElMessage.success("保存成功")}}else{if((Oe=(ze=l==null?void 0:l.data)==null?void 0:ze.result)==null||Oe.forEach(fe=>{var Ae;let ne=(Ae=p.cloneDeep(fe))==null?void 0:Ae.key;ne.pageKey=p.cloneDeep(En).value+Jt+de,On.setChildMenu(ne.pageKey),c.push({id:fe==null?void 0:fe.id,key:ne})}),de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),On.setImportLoading(!1),On.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await wa.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await _e.loadingConstruct(p.cloneDeep(En).value+Jt+de,p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((lt=Gt.value)==null?void 0:lt.account)||((Q=Gt.value)==null?void 0:Q.账号)}`),On.setActiveMenuPath(p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((tt=Gt.value)==null?void 0:tt.account)||((nt=Gt.value)==null?void 0:nt.账号)}`),p.ElMessage.success("保存成功")}}On.setImportLoading(!1)},Cc={key:0,class:"method-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=_e.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),g=_e.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(g),D=_e.useModelComp(p.pinia),E=e.ref(!1),_=_e.useMenuState(p.pinia),V=p.useLoginState(p.pinia),{itemData:O,isEdit:W,routeToChildPath:De,tableViewContents:q,lockingPage:K,payloadTypes:ie}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(V),T=e.ref(!1),le=async()=>{var H,M;(H=i.value)!=null&&H.find(me=>(me==null?void 0:me.buttonName)==="保存")&&await ee((M=i.value)==null?void 0:M.find(me=>(me==null?void 0:me.buttonName)==="保存")),await Bl()};e.watch(()=>O.value,async()=>{W.value==="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Le=()=>{d.value=!1,x.value=void 0},ot=H=>H.map(M=>{const me={};for(const be in M){const ze=M[be];if(be.includes(h.value)){const Oe=be.split(h.value);let Ye=me;Oe.forEach((qe,lt)=>{lt===Oe.length-1?Ye[qe]=ze:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else me[be]=ze}return me}),Be=async(H,M,me=[])=>{var ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt;let be=(ze=p.cloneDeep(M))==null?void 0:ze.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(H!=null&&H.includes("[")){let m=(Q=(lt=(qe=(Ye=(Oe=p.cloneDeep(H))==null?void 0:Oe.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Q.split(":"),C="";if(m!=null&&m[0]){let U=(tt=be==null?void 0:be.find(Y=>(Y==null?void 0:Y.name)===(m==null?void 0:m[0])))==null?void 0:tt.compData;if(!U){let Y=(nt=H==null?void 0:H.split("["))==null?void 0:nt[0],v=await _e.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",me);U=(Pe=v==null?void 0:v.find(L=>(L==null?void 0:L.name)===(m==null?void 0:m[0])))==null?void 0:Pe.compData}U==null||U.forEach(Y=>{var v,L,Z,P,ue,R;if((Y==null?void 0:Y.key)==="formContent")(v=Y==null?void 0:Y.contents)==null||v.forEach(X=>{var se;(X==null?void 0:X.key)===(m==null?void 0:m[1])&&(Array.isArray(X==null?void 0:X.value)?C=X==null?void 0:X.value:C=(se=X==null?void 0:X.value)==null?void 0:se.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let X=[],se=(L=U==null?void 0:U.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents,ve=(m==null?void 0:m[1])??"";if(se!=null&&se.every($=>Array.isArray($))){let $=_e.getColumnChild((ue=se==null?void 0:se[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(R=Y.contents)==null||R.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(Se=>!(Se!=null&&Se.id)),$==null||$.forEach((Se,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===Se.prop)&&(G[Se.prop]=Ee)}),X.push(G)}),X=ot(X)}else{let $=(Z=se==null?void 0:se.map(ae=>ae==null?void 0:ae.label))==null?void 0:Z.filter(ae=>ae!=="操作");(P=Y.contents)==null||P.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(Se=>!(Se!=null&&Se.id)),$==null||$.forEach((Se,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===Se)&&(G[Se]=Ee)}),X.push(G)})}C=X}})}return C}else if(H!=null&&H.includes("/")){let m={};return(ce=p.cloneDeep(be))==null||ce.forEach((C,U)=>{var Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne;if((C==null?void 0:C.comp)==="Table"){let Ae=Array.isArray((L=(v=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:v.contents)==null?void 0:L[0])?(R=(ue=(P=(Z=C==null?void 0:C.compData)==null?void 0:Z.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:P.contents)==null?void 0:ue[0])==null?void 0:R.some(ge=>ge==null?void 0:ge.children):[],Je=(ve=(se=(X=C==null?void 0:C.compData)==null?void 0:X.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(ge=>(ge!=null&&ge.find(ct=>ct==null?void 0:ct.id)&&(ge=ge.slice(1)),ge)),Me=(de=(Se=(G=(ae=($=C==null?void 0:C.compData)==null?void 0:$.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:ae.contents)==null?void 0:G[0])==null?void 0:Se[0])==null?void 0:de.label,Ve=(F=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:F.contents;if(Ae)(Ae==null?void 0:Ae.length)===0?m[C.name]=m!=null&&m[C.name]?m[C.name]:_e.tableToForm(Je,Ve):m[Me]=_e.tableToForm(Je,Ve);else{const ge=[];Ve=Ve.slice(1,Ve.length-1),Ve==null||Ve.forEach((ct,je)=>{Je==null||Je.forEach(ye=>{ge.push({key:ct.label+ye[0],value:ye[je+1]})})}),m["form"+U]=ge}}else{const Ae=(ne=(fe=C.compData)==null?void 0:fe.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:ne.contents;m!=null&&m.form||(m.form=[]);const Je=[];Ae==null||Ae.forEach(Me=>{Me.key!==""&&(Me={key:(Me==null?void 0:Me.key)??(Me==null?void 0:Me.label),value:Me==null?void 0:Me.value},Je.push(Me))}),m.form=[...Je,...p.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(H==="createInsofDataApi"){let m=(oe=p.cloneDeep(M))==null?void 0:oe[0];return m={comp:(re=p.cloneDeep(m))==null?void 0:re.comp,compData:(Ie=p.cloneDeep(m))==null?void 0:Ie.compData,name:(Xe=p.cloneDeep(m))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:m}}}return H}},Ke=async(H,M,me)=>{var Oe,Ye,qe;let be=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),ze=be==null?void 0:be.find(lt=>(lt==null?void 0:lt.name)===(me==null?void 0:me[0]));if(ze){if((ze==null?void 0:ze.comp)==="Table"){let lt={};for(let re in p.cloneDeep(H))p.cloneDeep(H)[re]!=="loginUser"?lt[re]=p.cloneDeep(H)[re]:lt[re]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);let Q=[],tt=lt;Array.isArray(H)||(tt=[lt]),tt==null||tt.forEach(re=>{Q.push({[re[me[1]]]:re})});let nt=[],Pe=Q==null?void 0:Q.map(re=>{var Ie;return(Ie=Object.keys(re))==null?void 0:Ie[0]});be==null||be.forEach(re=>{var Ie;(re==null?void 0:re.name)===(me==null?void 0:me[0])&&((Ie=re==null?void 0:re.compData)==null||Ie.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(m=>{m!=null&&m.some(C=>Pe.includes(C))&&nt.push({[m.find(C=>C.id).id]:m.find(C=>Pe.includes(C))})}))}))});let ce=nt==null?void 0:nt.map(re=>{var Ie;return(Ie=Object.keys(re))==null?void 0:Ie[0]}),oe=[];if(ce==null||ce.forEach(re=>{var dt;let Ie=(dt=nt==null?void 0:nt.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Q==null?void 0:Q.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0])===Ie});oe.push({id:parseInt(re),value:{tableData:Xe[Ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((ze==null?void 0:ze.comp)==="Form"){let lt=p.cloneDeep(ze);lt.compData=(qe=lt.compData)==null?void 0:qe.map(nt=>{var Pe;return(nt==null?void 0:nt.key)==="formContent"&&(nt.contents=(Pe=nt.contents)==null?void 0:Pe.map(ce=>((ce==null?void 0:ce.key)===(me==null?void 0:me[1])&&(ce.value=(H==null?void 0:H[ce==null?void 0:ce.prop])||H),ce))),nt});let Q={};for(let nt in lt)nt!=="id"&&(Q[nt]=lt[nt]);let tt=[];if(tt.push({id:ze==null?void 0:ze.id,keyType:me==null?void 0:me[1],value:{pageData:Q}}),(tt==null?void 0:tt.length)>0)return tt}}},xe=async(H,M,me)=>{var Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe;let be=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),ze=be==null?void 0:be.find(re=>(re==null?void 0:re.name)===(me==null?void 0:me[0]));if(ze){if((ze==null?void 0:ze.comp)==="Table"){let re={};for(let Ie in p.cloneDeep(H))p.cloneDeep(H)[Ie]!=="loginUser"?re[Ie]=p.cloneDeep(H)[Ie]:re[Ie]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:ze==null?void 0:ze.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((ze==null?void 0:ze.comp)==="Form"){let re=p.cloneDeep(ze),Ie=Object.keys(H),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var L,Z;(v==null?void 0:v.key)==="formContent"&&((Z=(L=p.cloneDeep(v))==null?void 0:L.contents)==null||Z.forEach(P=>{var ue;Ie.includes(P==null?void 0:P.key)&&(P==null?void 0:P.value)===((ue=A.value)==null?void 0:ue.姓名)&&(Xe=P==null?void 0:P.key)}))});let dt=[];(Q=Object.values(H[Xe]))==null||Q.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async v=>{var R,X,se,ve,$,ae,G,Se,de,Ee,F,fe;let L="";(ae=($=(ve=(se=(X=(R=p.cloneDeep(v))==null?void 0:R.split("("))==null?void 0:X[1])==null?void 0:se.split(")"))==null?void 0:ve[0])==null?void 0:$.split(":"))==null||ae.forEach(ne=>{L=L===""?L+ne.replaceAll("'",""):L+"/"+ne.replaceAll("'","")});let Z=[];(fe=(F=(Ee=(de=(Se=(G=p.cloneDeep(v))==null?void 0:G.split("<"))==null?void 0:Se[1])==null?void 0:de.split(">"))==null?void 0:Ee[0])==null?void 0:F.split(":"))==null||fe.forEach(ne=>{Z.push(ne.replaceAll("'",""))});const P=await _e.getItemData(L,sessionStorage.getItem("systemKey"),"");let ue="";return P==null||P.forEach(ne=>{var Ae;ne.name===(Z==null?void 0:Z[0])&&((Ae=ne==null?void 0:ne.compData)==null||Ae.forEach(Je=>{var Me;(Je==null?void 0:Je.key)==="formContent"&&((Me=Je.contents)==null||Me.forEach(Ve=>{(Ve==null?void 0:Ve.key)===(Z==null?void 0:Z[1])&&(ue=Ve==null?void 0:Ve.value)}))}))}),{[v]:ue}}),C=await Promise.all(m);re.compData=(nt=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:nt.map(v=>{var L,Z;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(Z=(L=p.cloneDeep(v))==null?void 0:L.contents)==null?void 0:Z.map(P=>{var ue,R,X,se;return(ue=H[Xe])!=null&&ue[P==null?void 0:P.key]&&(H[Xe][P==null?void 0:P.key].includes("(")?P.value=(R=C==null?void 0:C.find(ve=>{var $;return(($=Object.keys(ve))==null?void 0:$[0])===H[Xe][P==null?void 0:P.key]}))==null?void 0:R[H[Xe][P==null?void 0:P.key]]:P.value=(se=(X=p.cloneDeep(H))==null?void 0:X[Xe])==null?void 0:se[P==null?void 0:P.key]),P})),v});const U=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Pe=U==null?void 0:U.data)==null?void 0:Pe.type)==="success"&&((oe=(ce=U==null?void 0:U.data)==null?void 0:ce.result)==null||oe.forEach(v=>{var L,Z;((Z=(L=v==null?void 0:v.value)==null?void 0:L.pageData)==null?void 0:Z.name)===(me==null?void 0:me[0])&&(Y=v.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:re}}))}}},I=(H,M="",me={})=>{for(const[be,ze]of Object.entries(H)){const Oe=M?`${M}.${be}`:be;ze!==null&&typeof ze=="object"&&!Array.isArray(ze)&&Object.prototype.toString.call(ze)!=="[object Date]"?I(ze,Oe,me):me[Oe]=ze}return me},te=async(H,M,me,be)=>{var Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se;let ze=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),Oe=ze==null?void 0:ze.find(ve=>(ve==null?void 0:ve.name)===(me==null?void 0:me[0]));if(Oe){if(!(me!=null&&me[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let ve={},$=[],ae=(qe=(Ye=Oe==null?void 0:Oe.compData)==null?void 0:Ye.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(de=>Array.isArray(de))?$=(Q=_e.getColumnChild((lt=ae==null?void 0:ae[0])==null?void 0:lt.filter(de=>(de==null?void 0:de.label)!=="操作")))==null?void 0:Q.map(de=>de==null?void 0:de.prop):$=ae==null?void 0:ae.map(de=>de==null?void 0:de.label);for(let de in p.cloneDeep(H))if(p.cloneDeep(H)[de]!=="loginUser"){let Ee=I(p.cloneDeep(H)[de]),F={};for(let fe in Ee)if($!=null&&$.find(ne=>ne===fe))F[fe]=Ee[fe];else if($!=null&&$.find(ne=>(ne==null?void 0:ne.toUpperCase())===(fe==null?void 0:fe.toUpperCase()))){let ne=$==null?void 0:$.find(Ae=>(Ae==null?void 0:Ae.toUpperCase())===(fe==null?void 0:fe.toUpperCase()));F[ne]=Ee[fe]}ve[de]=F}else ve[de]=((tt=A.value)==null?void 0:tt.account)||((nt=A.value)==null?void 0:nt.账号);let G=await p.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((ce=(Pe=G==null?void 0:G.data)==null?void 0:Pe.result)==null?void 0:ce.length)>0){let de=(re=(oe=G==null?void 0:G.data)==null?void 0:oe.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(de==null?void 0:de.length)>0&&await p.batchDeleteInsofDataApi({ids:de})}let Se=[];if((Ie=Oe==null?void 0:Oe.compData)!=null&&Ie.find(de=>(de==null?void 0:de.key)==="pageColumn")&&((m=(dt=(Xe=Oe==null?void 0:Oe.compData)==null?void 0:Xe.find(de=>(de==null?void 0:de.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const de=await p.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let Ee=((v=(Y=(U=(C=de==null?void 0:de.data)==null?void 0:C.result)==null?void 0:U[0])==null?void 0:Y.key)==null?void 0:v.pageKey)??"";(L=Object.values(ve))==null||L.forEach(F=>{Se.push({key:{type:"data",pageKey:Ee,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:F}})})}else(Z=Object.values(ve))==null||Z.forEach(de=>{Se.push({key:{type:"data",pageKey:M,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(me!=null&&me[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let ve=p.cloneDeep(Oe);ve.compData=(ue=(P=p.cloneDeep(ve))==null?void 0:P.compData)==null?void 0:ue.map(G=>{var Se,de;return(G==null?void 0:G.key)==="formContent"&&(G.contents=(de=(Se=p.cloneDeep(G))==null?void 0:Se.contents)==null?void 0:de.map(Ee=>{var F,fe;return(F=p.cloneDeep(H))!=null&&F[Ee==null?void 0:Ee.key]&&(Ee.value=(fe=p.cloneDeep(H))==null?void 0:fe[Ee==null?void 0:Ee.key]),Ee})),G});const $=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((R=$==null?void 0:$.data)==null?void 0:R.type)==="success"&&((se=(X=$==null?void 0:$.data)==null?void 0:X.result)==null||se.forEach(G=>{var Se,de;((de=(Se=G==null?void 0:G.value)==null?void 0:Se.pageData)==null?void 0:de.name)===(me==null?void 0:me[0])&&(ae=G.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:ve}}))}}},ee=async H=>{var M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie;_.setImportLoading(!0);try{if(H.api){let Xe=new WeakMap;(me=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:M.filter(R=>{var X,se;return((X=R==null?void 0:R.key)==null?void 0:X.pageKey)!=="menu"&&((se=R==null?void 0:R.key)==null?void 0:se.pageKey)!=="secret"}))==null||me.forEach(R=>{Xe[R.key.pageKey]?Xe[R.key.pageKey]=[...Xe[R.key.pageKey],R]:Xe[R.key.pageKey]=[R]});let m=await _e.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(m=m==null?void 0:m.map(R=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne;if((R==null?void 0:R.comp)==="Form")R.compData=(X=R.compData)==null?void 0:X.map(Ae=>{var Je;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Je=Ae.contents)==null?void 0:Je.map(Me=>{var Ve;if((Me==null?void 0:Me.value)===""&&(Me==null?void 0:Me.type)==="Select"){let ge=_e.judgeContents((Ve=p.cloneDeep(Me))==null?void 0:Ve.optionUrl,Xe);Me.value=Me.value||ge}return Me})),Ae});else if((R==null?void 0:R.comp)==="Table"&&(se=R.compData)!=null&&se.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=($=(ve=R.compData)==null?void 0:ve.find(ge=>(ge==null?void 0:ge.key)==="pageColumn"))==null?void 0:$.contents,Je=((G=(ae=R.compData)==null?void 0:ae.find(ge=>(ge==null?void 0:ge.key)==="pageGroup"))==null?void 0:G.contents)??"",Me=(Ee=(de=(Se=Ae==null?void 0:Ae.split("["))==null?void 0:Se[1])==null?void 0:de.split("]"))==null?void 0:Ee[0];C=((F=Ae==null?void 0:Ae.split("["))==null?void 0:F[0])+((ne=(fe=q.value)==null?void 0:fe.find(ge=>(ge==null?void 0:ge.key)===Me))==null?void 0:ne.value)}return R}),!(C===""||C==="")){const R=await _e.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);m=m==null?void 0:m.map(X=>{var se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je;if((X==null?void 0:X.comp)==="Table"&&(se=X.compData)!=null&&se.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=($=(ve=X.compData)==null?void 0:ve.find(ye=>(ye==null?void 0:ye.key)==="pageColumn"))==null?void 0:$.contents,Ve=((G=(ae=X.compData)==null?void 0:ae.find(ye=>(ye==null?void 0:ye.key)==="pageGroup"))==null?void 0:G.contents)??"",ge=(Ee=(de=(Se=Me==null?void 0:Me.split("["))==null?void 0:Se[1])==null?void 0:de.split("]"))==null?void 0:Ee[0],ct=((F=Me==null?void 0:Me.split("["))==null?void 0:F[0])+((ne=(fe=q.value)==null?void 0:fe.find(ye=>(ye==null?void 0:ye.key)===ge))==null?void 0:ne.value),je=(Ae=R==null?void 0:R.find(ye=>(ye==null?void 0:ye.name)===(Ve===""?c==null?void 0:c.compName:Ve)))==null?void 0:Ae.compData;X.compData=(Je=X.compData)==null?void 0:Je.map(ye=>{var we;return(ye==null?void 0:ye.key)==="tableContents"&&(ye.contents=(we=je==null?void 0:je.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:we.contents),ye})}return X})}let U={};if(((ze=(be=H==null?void 0:H.extraValues)==null?void 0:be.input)==null?void 0:ze.length)>0){const R=(Ye=(Oe=H==null?void 0:H.extraValues)==null?void 0:Oe.input)==null?void 0:Ye.map(async X=>{var se;he!=null&&he.find(ve=>ve===X)?U=await Be(X,m):U[Object.keys(X)[0]]=await Be((se=Object.values(X))==null?void 0:se[0],m,Xe)});await Promise.all(R)}else U=await Be("/",m);let Y=!1;(lt=(qe=H==null?void 0:H.extraValues)==null?void 0:qe.output)==null||lt.forEach(R=>{var X,se;(se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc")&&(Y=!0)});let v;if(Y){const R=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(H.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{R.close()})}else v=await p.axios.post(H.api,U,{headers:{"Content-Type":"application/json"}});let L=(Pe=(nt=(tt=(Q=p.cloneDeep(H))==null?void 0:Q.extraValues)==null?void 0:tt.output)==null?void 0:nt.map(R=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve;if(!((se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc"))){let ge=(F=(Ee=(de=($=p.cloneDeep((ve=Object.values(R))==null?void 0:ve[0]))==null?void 0:$.split("["))==null?void 0:de[((Se=(G=p.cloneDeep((ae=Object.values(R))==null?void 0:ae[0]))==null?void 0:G.split("["))==null?void 0:Se.length)-1])==null?void 0:Ee.split("]"))==null?void 0:F[0],ct=ge==null?void 0:ge.split(":"),je=(Ae=p.cloneDeep((fe=Object.values(R))==null?void 0:fe[0]))==null?void 0:Ae.substring(0,p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]).lastIndexOf("["));if(je=(Me=p.cloneDeep(je))==null?void 0:Me.slice(0,((Je=p.cloneDeep(je))==null?void 0:Je.length)-1),je!=null&&je.includes("[")){let ye="";if((Ve=Ca(je,"/"))==null||Ve.forEach(we=>{var Qe,pe,Ne,Fe,We,N,Ce;if(!(we!=null&&we.includes("[")))ye=ye===""?ye+we.replaceAll("/",""):ye+"/"+we.replaceAll("/","");else{let ut=p.cloneDeep(we).slice(1,((Qe=p.cloneDeep(we))==null?void 0:Qe.length)-1),et=(N=(We=(Fe=(Ne=(pe=p.cloneDeep(ut))==null?void 0:pe.split("["))==null?void 0:Ne[1])==null?void 0:Fe.split("]"))==null?void 0:We[0])==null?void 0:N.split(":"),ft="",rt=(Ce=m==null?void 0:m.find(Te=>(Te==null?void 0:Te.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Te=>{var Ze;(Te==null?void 0:Te.key)==="formContent"&&((Ze=Te==null?void 0:Te.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),ye=ye===""?ye+ft.replaceAll("/",""):ye+"/"+ft.replaceAll("/","")}}),je=ye,je[(je==null?void 0:je.length)-1]!=="/")return je}}}))==null?void 0:Pe.filter(R=>R);L=[...new Set(p.cloneDeep(L))];let Z=L==null?void 0:L.map(async R=>{let X=await _e.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((X==null?void 0:X.length)===0)return await _e.getParentContents(R)});await Promise.all(Z);let P=[],ue=(re=(oe=(ce=p.cloneDeep(H))==null?void 0:ce.extraValues)==null?void 0:oe.output)==null?void 0:re.map(async R=>{var de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn,vn,Gn,Xn,Yn,$n,In,gn,Mn,Bn,nn,Dn,bt,Yt,gt,Jn,Mt,mn,An,an,Nn,Qt,jn;if((Ee=(de=Object.values(R))==null?void 0:de[0])!=null&&Ee.includes(".doc")){var X=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),se=v.headers["content-disposition"],ve=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),$=ve.exec(se),ae=$==null?void 0:$[1],G=document.createElement("a"),Se=window.URL.createObjectURL(X);x.value=[{name:ae,blobUrl:Se}],d.value=!0}else{let yn=(ge=(Ve=(Me=(fe=p.cloneDeep((F=Object.values(R))==null?void 0:F[0]))==null?void 0:fe.split("["))==null?void 0:Me[((Je=(Ae=p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]))==null?void 0:Ae.split("["))==null?void 0:Je.length)-1])==null?void 0:Ve.split("]"))==null?void 0:ge[0],zt=yn==null?void 0:yn.split(":"),qt=(ye=p.cloneDeep((ct=Object.values(R))==null?void 0:ct[0]))==null?void 0:ye.substring(0,p.cloneDeep((je=Object.values(R))==null?void 0:je[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Qe=p.cloneDeep(qt))==null?void 0:Qe.slice(0,((we=p.cloneDeep(qt))==null?void 0:we.length)-1):qt===""&&(qt=w.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Dt="";(pe=Ca(qt,"/"))==null||pe.forEach((Nt,Ut)=>{var Wt,$t,sn,ln,Kn,Qn,Un,Zn,Na,sa,ma;if(!(Nt!=null&&Nt.includes("[")))Dt=Dt===""?Dt+Nt.replaceAll("/",""):Dt+"/"+Nt.replaceAll("/","");else{let ca="",bn="";(Wt=p.cloneDeep(Nt))!=null&&Wt.includes("]")?(ca=p.cloneDeep(Nt).slice(1,(($t=p.cloneDeep(Nt))==null?void 0:$t.length)-1),bn=(Un=(Qn=(Kn=(ln=(sn=p.cloneDeep(ca))==null?void 0:sn.split("["))==null?void 0:ln[1])==null?void 0:Kn.split("]"))==null?void 0:Qn[0])==null?void 0:Un.split(":")):(ca=p.cloneDeep(Nt).slice(1,(Zn=p.cloneDeep(Nt))==null?void 0:Zn.length),bn=(Na=p.cloneDeep(ca))==null?void 0:Na.split("/"));let ea="",ua=(sa=m==null?void 0:m.find(rn=>(rn==null?void 0:rn.name)===(bn==null?void 0:bn[0])))==null?void 0:sa.compData;ua==null||ua.forEach(rn=>{var Va;(rn==null?void 0:rn.key)==="formContent"&&((Va=rn==null?void 0:rn.contents)==null||Va.forEach(Wn=>{(Wn==null?void 0:Wn.key)===(bn==null?void 0:bn[1])&&(ea=Wn==null?void 0:Wn.value)}))}),((ma=Ca(qt,"/"))==null?void 0:ma.length)-1!==Ut?Dt=Dt===""?Dt+ea.replaceAll("/",""):Dt+"/"+ea.replaceAll("/",""):Dt=Dt+l.value+ea.replaceAll("/","")}}),(Ne=w.value)!=null&&Ne.includes(Dt)?qt=w.value:qt=Dt}let on=p.cloneDeep((Fe=Object.keys(R))==null?void 0:Fe[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((N=v==null?void 0:v.data)==null?void 0:N.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[on]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[on])&&(zt==null?void 0:zt.length)===1)return await te(((Te=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Te[on])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[on]),p.cloneDeep(qt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[on]||(Bt=(It=v==null?void 0:v.data)==null?void 0:It.result)!=null&&Bt[on]){let Dt=await Ke(((wt=(xt=v==null?void 0:v.data)==null?void 0:xt.data)==null?void 0:wt[on])||((At=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:At[on]),p.cloneDeep(qt),zt);return Dt&&(P=[...P,...Dt]),Dt}else{if(!((Kt=v==null?void 0:v.data)!=null&&Kt.data)){let Dt=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Dt=Dt==null?void 0:Dt.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(zt==null?void 0:zt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map($t=>{var sn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(sn=$t.contents)==null?void 0:sn.map(ln=>{var Kn,Qn;return(ln==null?void 0:ln.key)===(zt==null?void 0:zt[1])&&(ln.value=(Qn=(Kn=v==null?void 0:v.data)==null?void 0:Kn.result)==null?void 0:Qn[on==null?void 0:on.replaceAll(":","")]),ln})),$t})),Ut});let Nt=[];(Ft=Dt==null?void 0:Dt.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ft.forEach(async Ut=>{let Wt={};for(let $t in Ut)$t!=="id"&&(Wt[$t]=Ut[$t]);Nt.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(Nt==null?void 0:Nt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Nt});return}if((zt==null?void 0:zt.length)===1){const Dt=(xn=(Ht=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:Ht.path)==null?void 0:xn.path;let Nt="";(Sn=(fn=(_n=(wn=(dn=Dt==null?void 0:Dt.split("("))==null?void 0:dn[1])==null?void 0:wn.split(")"))==null?void 0:_n[0])==null?void 0:fn.split(":"))==null||Sn.forEach($t=>{var sn,ln;Nt=Nt===""?Nt+((sn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:sn.trim()):Nt+"/"+((ln=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:ln.trim())});let Ut=[(Xn=(Gn=(vn=(Tn=(hn=Dt==null?void 0:Dt.split("<"))==null?void 0:hn[1])==null?void 0:Tn.split(">"))==null?void 0:vn[0])==null?void 0:Gn.replaceAll("'",""))==null?void 0:Xn.trim()],Wt;return(In=($n=(Yn=v==null?void 0:v.data)==null?void 0:Yn.data)==null?void 0:$n.data)!=null&&In[zt==null?void 0:zt[0]]?Wt=await te((Bn=(Mn=(gn=v==null?void 0:v.data)==null?void 0:gn.data)==null?void 0:Mn.data)==null?void 0:Bn[zt==null?void 0:zt[0]],Nt,zt,C):Wt=await xe((Dn=(nn=v==null?void 0:v.data)==null?void 0:nn.data)==null?void 0:Dn.data,Nt,Ut,Xe),Wt}else{const Dt=(gt=(Yt=(bt=v==null?void 0:v.data)==null?void 0:bt.data)==null?void 0:Yt.path)==null?void 0:gt.path;let Nt="";return(an=(An=(mn=(Mt=(Jn=Dt==null?void 0:Dt.split("("))==null?void 0:Jn[1])==null?void 0:Mt.split(")"))==null?void 0:mn[0])==null?void 0:An.split(":"))==null||an.forEach(Wt=>{var $t,sn;Nt=Nt===""?Nt+(($t=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:$t.trim()):Nt+"/"+((sn=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:sn.trim())}),await Ke((jn=(Qt=(Nn=v==null?void 0:v.data)==null?void 0:Nn.data)==null?void 0:Qt.data)==null?void 0:jn[zt==null?void 0:zt[0]],Nt,zt)}}}}});if(await Promise.all(ue),(P==null?void 0:P.length)>0){let R=[];P==null||P.forEach(ve=>{R!=null&&R.find($=>{var ae,G,Se,de;return((G=(ae=$==null?void 0:$.value)==null?void 0:ae.pageData)==null?void 0:G.name)===((de=(Se=ve==null?void 0:ve.value)==null?void 0:Se.pageData)==null?void 0:de.name)})||R.push(ve)});let X=[];R==null||R.forEach(ve=>{var G,Se,de,Ee;let $=p.cloneDeep(ve);$.value.pageData.compData=(G=$.value.pageData.compData)==null?void 0:G.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"&&(F.contents=(fe=F.contents)==null?void 0:fe.map(ne=>{var Je,Me,Ve,ge;let Ae=(Je=p.cloneDeep(P))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ne==null?void 0:ne.key));if(Ae){let ct=(ge=(Ve=(Me=Ae.value.pageData.compData)==null?void 0:Me.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:Ve.contents)==null?void 0:ge.find(je=>(je==null?void 0:je.key)===(ne==null?void 0:ne.key));ne.value=ct==null?void 0:ct.value}return ne})),F}),X.push({id:$==null?void 0:$.id,value:$==null?void 0:$.value});let ae=[];(Ee=(de=(Se=$==null?void 0:$.value)==null?void 0:Se.pageData)==null?void 0:de.compData)==null||Ee.forEach(F=>{var fe;(F==null?void 0:F.key)==="formContent"&&((fe=F==null?void 0:F.contents)==null||fe.forEach(ne=>{var Ae,Je,Me,Ve,ge,ct;if((Je=(Ae=ne==null?void 0:ne.optionUrl)==null?void 0:Ae.menuSelect)!=null&&Je.find(je=>je==null?void 0:je.includes("[")))if(ae!=null&&ae.find(je=>{var ye,we,Qe;return((ye=je==null?void 0:je.key)==null?void 0:ye.join(","))===((Qe=(we=ne==null?void 0:ne.optionUrl)==null?void 0:we.menuSelect)==null?void 0:Qe.join(","))})){let je=(Me=ae==null?void 0:ae.find(ye=>{var we,Qe,pe;return((we=ye==null?void 0:ye.key)==null?void 0:we.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))}))==null?void 0:Me.value;je.push({key:ne==null?void 0:ne.prop,groups:(Ve=ne==null?void 0:ne.optionUrl)==null?void 0:Ve.groupSelect,value:ne==null?void 0:ne.value}),ae=ae==null?void 0:ae.map(ye=>{var we,Qe,pe;return((we=ye==null?void 0:ye.key)==null?void 0:we.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))&&(ye.value=je),ye})}else ae.push({key:(ge=ne==null?void 0:ne.optionUrl)==null?void 0:ge.menuSelect,value:[{key:ne==null?void 0:ne.prop,groups:(ct=ne==null?void 0:ne.optionUrl)==null?void 0:ct.groupSelect,value:ne==null?void 0:ne.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(F=>{var ne;let fe="";return(ne=F==null?void 0:F.key)==null||ne.forEach(Ae=>{var Je;if(!(Ae!=null&&Ae.includes("[")))fe=fe===""?fe+Ae:fe+"/"+Ae;else{let Me="",Ve=(Je=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");m==null||m.forEach(ge=>{var ct;(ge==null?void 0:ge.name)===(Ve==null?void 0:Ve[0])&&((ct=ge==null?void 0:ge.compData)==null||ct.forEach(je=>{var ye;(je==null?void 0:je.key)==="formContent"&&((ye=je==null?void 0:je.contents)==null||ye.forEach(we=>{(we==null?void 0:we.prop)===(Ve==null?void 0:Ve[1])&&(Me=we==null?void 0:we.value)}))}))}),fe=fe+l.value+Me}}),F.key=fe,F})),ae==null||ae.forEach(F=>{var Je,Me,Ve;let fe=(Je=Xe[F.key])==null?void 0:Je.find(ge=>{var ct,je,ye,we,Qe,pe,Ne;return((je=(ct=ge==null?void 0:ge.value)==null?void 0:ct.pageData)==null?void 0:je.name)===((Qe=(we=(ye=F==null?void 0:F.value)==null?void 0:ye[0])==null?void 0:we.groups)==null?void 0:Qe[0])&&((Ne=(pe=ge==null?void 0:ge.value)==null?void 0:pe.pageData)==null?void 0:Ne.name)!==void 0}),ne=fe==null?void 0:fe.id,Ae=(Me=fe==null?void 0:fe.value)==null?void 0:Me.pageData;Ae.compData=(Ve=Ae.compData)==null?void 0:Ve.map(ge=>{var ct;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(ct=ge.contents)==null?void 0:ct.map(je=>{var we;let ye=(we=F.value)==null?void 0:we.find(Qe=>(Qe==null?void 0:Qe.key)===(je==null?void 0:je.prop));return ye&&(je.value=ye.value),je})),ge}),X.push({id:ne,value:{pageData:Ae}})})});let se=(Ie=p.cloneDeep(P))==null?void 0:Ie[0];(X==null?void 0:X.length)>0&&await p.batchUpdateInsofDataApi({dataList:X})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},he=["createInsofDataApi"],Ue=ho(async H=>{ee(H)},100),st=async H=>{var qe,lt,Q,tt,nt;const M=p.cloneDeep(H);let me,be=new WeakMap,ze=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(lt=(qe=ze.data.result)==null?void 0:qe.filter(Pe=>{var ce,oe;return((ce=Pe==null?void 0:Pe.key)==null?void 0:ce.pageKey)!=="menu"&&((oe=Pe==null?void 0:Pe.key)==null?void 0:oe.pageKey)!=="secret"}))==null||lt.forEach(Pe=>{be[Pe.key.pageKey]?be[Pe.key.pageKey]=[...be[Pe.key.pageKey],Pe]:be[Pe.key.pageKey]=[Pe]}),H!=null&&H[0].path&&(me=await(M==null?void 0:M.map(async(Pe,ce)=>{var U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de;const re=(U=be[Pe==null?void 0:Pe.path])==null?void 0:U.filter(Ee=>{var F;return((F=Ee==null?void 0:Ee.key)==null?void 0:F.type)==="data"});let Ie="";const Xe=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);re==null||re.forEach(Ee=>{var F,fe,ne,Ae,Je;((fe=(F=Ee==null?void 0:Ee.value)==null?void 0:F.tableData)==null?void 0:fe.算法名称)===((ne=M==null?void 0:M[ce])==null?void 0:ne.method)&&(Ie=(Je=(Ae=Ee==null?void 0:Ee.value)==null?void 0:Ae.tableData)==null?void 0:Je.算法体)});const dt=await _e.getItemData(Pe==null?void 0:Pe.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);let m="",C=(Z=(L=(v=(Y=dt==null?void 0:dt[0])==null?void 0:Y.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:L.contents)==null?void 0:Z.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(ue=(P=dt==null?void 0:dt[0])==null?void 0:P.compData)==null||ue.forEach(Ee=>{var F;(Ee==null?void 0:Ee.key)==="tableContents"&&((F=Ee==null?void 0:Ee.contents)==null||F.forEach(fe=>{fe!=null&&fe.find(ne=>ne===(Pe==null?void 0:Pe.method))&&(m=fe[C])}))}),{buttonName:((R=M==null?void 0:M[ce])==null?void 0:R.method)||((ve=(se=(X=re==null?void 0:re[0])==null?void 0:X.value)==null?void 0:se.tableData)==null?void 0:ve.算法名称),api:(Ie===""?(G=(ae=($=re==null?void 0:re[0])==null?void 0:$.value)==null?void 0:ae.tableData)==null?void 0:G.算法体:Ie)||m,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(Pe.value))==null?void 0:Se.slice(1),methodName:(Pe==null?void 0:Pe.path)??"",extraValues:(de=M==null?void 0:M[ce])==null?void 0:de.data}})));const Oe=M==null?void 0:M.map(async Pe=>{var dt,m,C,U,Y,v;const ce=(dt=ze.data.result)==null?void 0:dt.filter(L=>{var Z,P,ue;return((Z=L==null?void 0:L.key)==null?void 0:Z.parentTable)===""&&((P=L==null?void 0:L.key)==null?void 0:P.type)==="method"&&((ue=L==null?void 0:L.key)==null?void 0:ue.methodName)===L.method}),oe=ce==null?void 0:ce[0],re=(m=ze.data.result)==null?void 0:m.filter(L=>{var Z,P;return((Z=L==null?void 0:L.key)==null?void 0:Z.type)==="methodData"&&((P=L==null?void 0:L.key)==null?void 0:P.tableId)===(oe==null?void 0:oe.id)}),Ie=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be),Xe=re==null?void 0:re[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(Y=(U=Xe==null?void 0:Xe.value)==null?void 0:U.tableData)==null?void 0:Y[0],content:Ie==null?void 0:Ie.filter(L=>L.comp!=="methodButton"),extraContent:(v=p.cloneDeep(Pe.value))==null?void 0:v.slice(1),methodName:(Pe==null?void 0:Pe.method)??""}}),Ye=(Q=H==null?void 0:H[0])!=null&&Q.path&&((tt=H==null?void 0:H[0])==null?void 0:tt.path)!==""?await Promise.all(me):await Promise.all(Oe);i.value=Ye==null?void 0:Ye.filter(Pe=>Pe==null?void 0:Pe.extraContent),(nt=i.value)==null||nt.forEach(Pe=>{var ce;Pe.api===""&&((ce=Pe.content)==null||ce.forEach(oe=>{var re;oe.comp=="Table"&&D.setExtraContents(_e.methodTableToContent(oe.compData,(re=Pe.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{W.value=="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(H,M)=>{var me,be,ze;return e.unref(W)!=="edit"?(e.openBlock(),e.createElementBlock("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=i.value)==null?void 0:me.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((Ye=Oe==null?void 0:Oe.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ue)(Oe),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(De)!==""&&((ze=e.unref(w))==null?void 0:ze[((be=e.unref(w))==null?void 0:be.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:le,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Le},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},_c=Rt._export_sfc(Ec,[["__scopeId","data-v-11fca7e0"]]),Sc={};function Tc(a,i){return" 567 "}const Ic=Rt._export_sfc(Sc,[["render",Tc]]),Bc={class:"module content"},Ac={class:"module data"},Nc={class:"module layout"},Vc={class:"form-content"},Oc=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"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),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}]}),V=q=>{var K;D.value=p.cloneDeep(q),l("change",(K=_())==null?void 0:K.compData)},O=q=>{var K,ie;if((q==null?void 0:q.buttonName)==="确认"){const w=p.cloneDeep(q==null?void 0:q.content);switch(d.value){case"create":E.value.push({...w,index:((K=E.value)==null?void 0:K.length)+1});break}l("change",(ie=_())==null?void 0:ie.compData),c.visible=!1}else c.visible=!1},W=(q,K)=>{var ie,w;switch(q){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(K,1),d.value="delete";break}},De=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},E.value=((ie=q==null?void 0:q.find(w=>w.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>W("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>W("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>W("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:De,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Vc,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Mc=Rt._export_sfc(Oc,[["__scopeId","data-v-487e0536"]]),zc=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 _,V;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(V=s==null?void 0:s.stepConfig)==null?void 0:V.active}),x=(_,V)=>{c.value=V,l("clickStep",_,V)},g=_=>Tt.getComponent(_),h=()=>{var V;const _=(V=s==null?void 0:s.stepList)==null?void 0:V.find((O,W)=>W+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,V)=>{var De,q,K,ie,w;const O=e.resolveComponent("el-step"),W=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(W,{direction:(De=a.stepConfig)==null?void 0:De.direction,active:d.value,"finish-status":"success",simple:(q=a.stepConfig)==null?void 0:q.simple,"align-center":((K=a.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock(O,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=a.stepConfig)!=null&&ie.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(le=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},le||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Pc=Rt._export_sfc(zc,[["__scopeId","data-v-d7c99969"]]),Rc=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=(g,h)=>{l("clickStep",g,h)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var h,D;d.value=(h=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Pc,{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"])}}}),Fc=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})}}}),Lc=Rt._export_sfc(Fc,[["__scopeId","data-v-4172a886"]]),$c={class:"line-content"},jc={class:"line-time"},Kc=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(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Lc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:g})=>[e.createElementVNode("span",$c,e.toDisplayString(x),1),e.createElementVNode("span",jc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Rt._export_sfc(Kc,[["__scopeId","data-v-b4d9deed"]]),Wc={class:"tabs-content"},Hc={__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",Wc,[e.createVNode(Tt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},qc=Rt._export_sfc(Hc,[["__scopeId","data-v-40865f68"]]),eo=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}}}),Gc={class:"type-select"},Xc=["onClick"],Yc={class:"list-icon"},Jc={__name:"modelSelect",setup(a){const i=eo(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",Gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(lr),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(g)},[e.createElementVNode("div",Yc,[e.createVNode(x,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Xc)]))),128))])}}},Qc=Rt._export_sfc(Jc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},eu={class:"operate-content"},tu={class:"collapse-title-content"},nu={class:"collapse-title-item"},au={key:1},ou=["onClick"],lu={class:"icon-content"},ru={key:0,class:"edit-content"},iu=["onClick"],su={class:"comp-child"},cu={__name:"modelFill",setup(a){const i=eo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),g=O=>{var De;let W=(De=p.cloneDeep(x.value))==null?void 0:De.map((q,K)=>(O===K&&(q.content=!0),q));x.value=W},h=O=>{var De;let W=(De=p.cloneDeep(x.value))==null?void 0:De.map((q,K)=>(O===K&&(q.content=!1),q));x.value=W,c.value=p.cloneDeep(s.value)},D=(O,W)=>{var ie;let De=(ie=p.cloneDeep(x.value))==null?void 0:ie.map((w,z)=>(O===z&&(w.content=!1),w));x.value=De;const q=p.cloneDeep(s.value),K=q==null?void 0:q.filter((w,z)=>(z===O&&(w.name=W),w));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var O,W,De;!s.value||((O=s.value)==null?void 0:O.length)===0?c.value=[]:c.value=(W=p.cloneDeep(s.value))==null?void 0:W.filter(q=>(q==null?void 0:q.comp)!=="methodButton"),d.value=c.value,x.value=(De=p.cloneDeep(d.value))==null?void 0:De.map((q,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const E=O=>ga(O),_=(O,W,De)=>{var K,ie;if(!O)return;let q=p.cloneDeep(s.value);q=(K=q==null?void 0:q.map((w,z)=>(z===De&&(w.compData=O),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(ie=p.cloneDeep(q))==null?void 0:ie.map((w,z)=>({id:z,content:!1})),i.setOriginalData(q),i.setItemData(q)},V=O=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const W=p.cloneDeep(s.value),De=W==null?void 0:W.filter((q,K)=>K!==O);i.setOriginalData(De),i.setItemData(De),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(O,W)=>{const De=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[W[1]||(W[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",eu,[e.createVNode(kl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:q,index:K})=>{var ie,w,z,k,A,T,le,Le,ot,Be;return[e.createElementVNode("div",tu,[e.createElementVNode("div",nu,[(w=(ie=x.value)==null?void 0:ie.find(Ke=>Ke.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:q.name&&q.name!==""?"8px":"0px"})},e.toDisplayString(q.name),5)),(k=(z=x.value)==null?void 0:z.find(Ke=>Ke.id===K))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Tt._sfc_main$2,{modelValue:q.name,"onUpdate:modelValue":Ke=>q.name=Ke,onClick:W[0]||(W[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(Ke=>Ke.id===K))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ke=>g(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ou))]),e.createElementVNode("div",lu,[(Le=(le=x.value)==null?void 0:le.find(Ke=>Ke.id===K))!=null&&Le.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(De,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ke=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(De,{name:"Save",onClick:e.withModifiers(Ke=>D(K,q.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Be=(ot=x.value)==null?void 0:ot.find(Ke=>Ke.id===K))!=null&&Be.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ke=>V(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Delete",style:{width:"16px",height:"16px"}})],8,iu))])])]}),content:e.withCtx(({item:q,index:K})=>{var ie,w;return[e.createElementVNode("div",su,[e.createTextVNode(e.toDisplayString(E(q.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(q.comp+"Operate")),{itemContents:q==null?void 0:q.compData,originalItemContents:(w=(ie=d.value)==null?void 0:ie.find((z,k)=>k===K))==null?void 0:w.compData,onChange:z=>_(z,q,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},uu=Rt._export_sfc(cu,[["__scopeId","data-v-a46a44b9"]]),pu={key:0,class:"show-content"},du={style:{display:"flex"}},fu={__name:"modelShow",setup(a){const i=eo(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=>ga(d);return(d,x)=>{var g;return((g=l.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",pu,[(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",du,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)}}},hu=Rt._export_sfc(fu,[["__scopeId","data-v-3f3e863e"]]),vu={class:"tabs-header"},gu={class:"tabs-list"},mu={class:"tab-name"},yu={class:"tab-actions"},bu=["onClick"],ku=["onClick"],xu=["onClick"],wu={class:"model-operate"},Du={class:"model-select",style:{display:"unset"}},Cu={class:"existing-components"},Eu={class:"component-list"},_u=["onClick"],Su={class:"component-info"},Tu={class:"component-type"},Iu={class:"component-name"},Bu={class:"model-fill"},Au={__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(""),g=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),V=e.ref(null),O=eo(p.pinia),{itemData:W}=p.storeToRefs(O),De=()=>{x.value="新增标签页",g.value.title="",h.value=-1,d.value=!0},q=H=>{x.value="修改标签页",g.value.title=c.value[H].title,h.value=H,d.value=!0},K=H=>{const M=z(H);_.value.delete(M),c.value.splice(H,1),st()},ie=()=>{if(g.value.title.trim()){if(h.value===-1){const H={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};c.value.push(H)}else c.value[h.value].title=g.value.title,c.value[h.value].value=g.value.title,c.value[h.value].label=g.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=H=>{const M=c.value[H];return M.id||(M.id=w()),M.id},k=H=>{var be;E.value=H;const M=z(H);V.value=p.cloneDeep(W.value);let me=_.value.get(M);!me&&((be=c.value[H].children)==null?void 0:be.length)>0&&(me=Le(c.value[H].children)),me?O.setItemData(p.cloneDeep(me)):O.setItemData([]),D.value=!0},A=e.computed(()=>{const H=_e.useModelComp(p.pinia),M=p.storeToRefs(H).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(me=>{var be;if(me.comp==="Tabs"&&E.value>=0){const ze=z(E.value);if((be=me.compData)==null?void 0:be.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===ze))}))return!1}return!0})}),T=H=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[H]||H,le=H=>{var M;try{const me=p.cloneDeep(H);me.id=Date.now()+Math.random(),me.comp==="Tabs"&&((M=me.compData)==null||M.forEach(ze=>{ze.key==="stepList"&&ze.contents&&ze.contents.forEach(Oe=>{Oe.id=w()})}));const be=p.cloneDeep(W.value);be.push(me),O.setItemData(be)}catch(me){console.error("添加组件失败:",me)}},Le=H=>H.map(M=>{var me;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:ot(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Be(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((me=M.content)==null?void 0:me.originalData)||[]}}}),ot=H=>{if(!H)return[];const M=[];return H.rowContents&&M.push({key:"formContent",contents:H.rowContents}),H.buttonValue&&M.push({key:"formButton",contents:H.buttonValue}),typeof H.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:H.isEnableWrap}),M},Be=H=>[],Ke=()=>{if(E.value>=0&&E.value<c.value.length){const H=z(E.value);_.value.set(H,p.cloneDeep(W.value)),c.value[E.value].children=te(W.value),console.log("保存后的数据",te(W.value))}D.value=!1,E.value=-1,V.value=null,st()},xe=()=>{V.value&&O.setItemData(p.cloneDeep(V.value)),D.value=!1,E.value=-1,V.value=null},I=()=>{D.value&&xe()},te=H=>{if(!Array.isArray(H))throw new Error("sourceData must be an array");return H.map((M,me)=>{if(!M||typeof M!="object")return M;const{comp:be,name:ze,compData:Oe}=M;switch(be){case"Form":return{type:"form",content:ee(Oe||[]),value:"表单"};case"Table":return{type:"table",content:he(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ue(Oe||[]),value:""}}})},ee=H=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},me={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return H.forEach((be,ze)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ze}:`,be);return}const{key:Oe,contents:Ye}=be,qe=me[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},he=H=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},me={header:"columns",tableContents:"tableData"};return H.forEach((be,ze)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ze}:`,be);return}const{key:Oe,contents:Ye}=be,qe=me[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=H=>(console.log("Default conversion logic - to be implemented"),{originalData:H,processed:!1,componentType:"unknown"}),st=()=>{const H=[{key:"stepList",contents:c.value}];l("change",H)};return e.watch(()=>s.itemContents,H=>{if(H&&H.length>0){const M=H.find(me=>me.key==="stepList");M&&M.contents&&(c.value=M.contents.map(me=>({title:me.title||"",value:me.value||me.title||"",label:me.label||me.title||"",children:me.children||[],id:me.id||w()})))}},{immediate:!0,deep:!0}),(H,M)=>{const me=e.resolveComponent("svg-icon"),be=e.resolveComponent("el-input"),ze=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:De},[e.createVNode(me,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",mu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",yu,[e.createElementVNode("button",{onClick:lt=>q(qe)},"修改标题",8,bu),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ku),e.createElementVNode("button",{onClick:lt=>K(qe)},"删除",8,xu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ze,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(be,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>g.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:xe},"取消"),e.createElementVNode("button",{onClick:Ke},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",wu,[e.createElementVNode("div",Du,[e.createVNode(Qc),e.createElementVNode("div",Cu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>le(Ye)},[e.createElementVNode("div",Su,[e.createElementVNode("span",Tu,e.toDisplayString(T(Ye.comp)),1),e.createElementVNode("span",Iu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,_u))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:H.innerWidth},[e.createVNode(hu)])),e.createElementVNode("div",Bu,[e.createVNode(uu)])])]),_:1},8,["modelValue"])])}}},Nu=Rt._export_sfc(Au,[["__scopeId","data-v-9096ed0d"]]);function Vu(){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 Ou(a){return{type:"line",...a}}function Mu(){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 zu(a){return{type:"bar",barWidth:"60%",...a}}function Pu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Ln={line:{initBaseoptions:Vu,initSeries:Ou},bar:{initBaseoptions:Mu,initSeries:zu},pie:{initBaseoptions:Pu,initSeries:Ru}},Lo=_e.useMenuState(p.pinia),Al=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},g=a==null?void 0:a.find(_=>{const{name:V}=_;return V===c});if(!g)return{names:s,values:l};const h=(E=g==null?void 0:g.compData)==null?void 0:E.find(_=>{const{key:V}=_;return V==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const V=_==null?void 0:_[0];let O=!1;p.isObject(V)&&(V!=null&&V.id)&&(O=!0);let W=d,De=x;O&&(W=W+1,De=De+1);const q=_==null?void 0:_[W],K=_==null?void 0:_[De];s.push(q),l.push(K)}),{names:s,values:l}},Fu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let g=null;const h=sessionStorage.getItem("systemKey");if(x&&Lo.activeMenuPath&&(g=await _e.getItemData(`${Lo.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");g=await _e.getItemData(`${D}^${s}`,h,"")}return Al(g,{group:l,nameCol:c,valueCol:d})},Lu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),g=await _e.getItemData(d,x,"");return Al(g,{group:s,nameCol:l,valueCol:c})},vo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:g,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return g&&h&&Tt.isNumber(D)&&Tt.isNumber(E)?await Fu({menu:l,mainKey:g,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Tt.isNumber(d)&&Tt.isNumber(x)?await Lu({menu:l,group:c,nameCol:d,valueCol:x}):s},$u=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},ju=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;const _=[];for(let O=0;O<D.length;O++){const W=D[O],De=E[O];_.push({name:W,value:De})}const V=g({data:_});return h.series.push(V),h},Uu=async(a=[])=>{var x,g,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((g=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:g.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 $u({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await ju({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},Wu=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 Uu(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(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Hu=Rt._export_sfc(Wu,[["__scopeId","data-v-d4c081e8"]]),qu={class:"chart-module layout"},Gu={class:"chart-module content"},Xu={class:"chart-module content"},Yu={class:"form-content"},Ju={class:"dialog-footer"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np=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:""}],g=e.ref({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(oe=>{var Ie;const re=oe==null?void 0:oe.prop;oe.value=(Ie=g==null?void 0:g.value)==null?void 0:Ie[re]}),c.visible=!0},D=ce=>{g.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=nt())==null?void 0:ce.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),V=e.ref([]),O=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],W=e.ref({}),De=()=>{const ce=V.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=W.value)==null?void 0:Xe[Ie]}),oe},q=ce=>{var re;W.value=ce;const oe=De();V.value=oe,l("change",(re=nt())==null?void 0:re.compData)},K=async()=>{const ce=await _e.getMenusContent(),oe=De();oe==null||oe.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),V.value=oe,_.visible=!0,await Ye(W.value.menu),await Q(W.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{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 ce=w.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Ie]}),oe},T=ce=>{var re;k.value=ce;const oe=A();w.value=oe,l("change",(re=nt())==null?void 0:re.compData)},le=async()=>{await I();const ce=p.cloneDeep(Le.value),oe=A();oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Ie],Ie==="mainKey"&&(re.contents=ce)}),w.value=oe,ie.visible=!0},Le=e.ref([]),ot=e.ref([]),Be=e.ref({}),Ke=e.ref({}),xe=()=>{const{compData:ce}=be.value||{},oe=ce==null?void 0:ce.find(U=>{const{key:Y}=U;return Y==="header"}),re=(oe==null?void 0:oe.contents)||[],Ie=re==null?void 0:re.filter((U,Y)=>{const{label:v}=U;return v!=="操作"}),Xe=Ie==null?void 0:Ie.findIndex((U,Y)=>{const{isMainKey:v}=U;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(U=>{const{key:Y}=U;return Y==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(U=>{const Y=U==null?void 0:U[0];let v=Xe;p.isObject(Y)&&(Y!=null&&Y.id)&&(v=v+1);const L=U==null?void 0:U[v];return{label:L,value:L}})},I=async()=>{const ce=await xe();Le.value=ce},te=async ce=>{const oe=sessionStorage.getItem("systemKey");return await _e.getItemData(ce,oe,"")},ee=async ce=>{const oe=ce;ot.value=oe==null?void 0:oe.map(re=>{const{name:Ie}=re;return Be.value[Ie]=re,{label:Ie,value:Ie}})},he=ce=>{const{comp:oe,compData:re}=Ke.value||{};if(oe==="Table"){let Ie=A();Ie=Ie.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Ie,re),w.value=Ie}},Ue=async()=>{var re,Ie;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,oe=(Ie=W==null?void 0:W.value)==null?void 0:Ie.menu;if(ce){const dt=`${oe==null?void 0:oe.join("/")}^${ce}`,m=await te(dt);await ee(m);const C=A();C==null||C.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=ot.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,oe)=>{ce!=oe&&ce&&await Ue()});const st=async ce=>{const oe=Be.value[ce];Ke.value=oe,await he()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&ce&&st(ce)});const H=async()=>{var oe;await Ue();const ce=(oe=k.value)==null?void 0:oe.group;await st(ce)},M=e.ref([]),me=e.ref({}),be=e.ref({}),ze=async ce=>{const oe=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await _e.getItemData(oe,re,"")},Oe=async ce=>{const oe=await ze(ce);M.value=oe==null?void 0:oe.map(re=>{const{name:Ie}=re;return me.value[Ie]=re,{label:Ie,value:Ie}})},Ye=async(ce,oe)=>{await Oe(ce);const re=De();re==null||re.forEach(Ie=>{(Ie==null?void 0:Ie.prop)==="group"&&(Ie.contents=M.value)}),V.value=re};e.watch(()=>{var ce;return(ce=W==null?void 0:W.value)==null?void 0:ce.menu},async(ce,oe)=>{const re=ce==null?void 0:ce.join("/"),Ie=oe==null?void 0:oe.join("/");re!=Ie&&await Ye(ce)});const qe=(ce,oe)=>{const re=oe==null?void 0:oe.find(m=>{const{key:C}=m;return C==="header"}),Ie=(re==null?void 0:re.contents)||[],Xe=Ie==null?void 0:Ie.filter((m,C)=>{const{label:U}=m;return U!=="操作"}),dt=Xe==null?void 0:Xe.map((m,C)=>{const{label:U}=m;return{label:U,value:C}});ce==null||ce.forEach(m=>{const C=m==null?void 0:m.prop;(C==="nameCol"||C==="valueCol")&&(m.contents=dt)})},lt=ce=>{const{comp:oe,compData:re}=be.value||{};if(oe==="Table"){W.value.formItems=[];let Ie=De();Ie=Ie.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Ie,re),V.value=Ie}},Q=async ce=>{const oe=me.value[ce];be.value=oe,await lt()};e.watch(()=>{var ce;return(ce=W==null?void 0:W.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&Q(ce)});const tt=async()=>{var re,Ie;const ce=(re=W.value)==null?void 0:re.menu;await Ye(ce);const oe=(Ie=W.value)==null?void 0:Ie.group;await Q(oe)},nt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:W.value},{key:"chartDetailConfig",contents:k.value}]}),Pe=()=>{c.visible=!1,_.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var oe,re,Ie;V.value=O(),w.value=z();const ce=s==null?void 0:s.itemContents;g.value=((oe=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},W.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Ie=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Ie.contents)??{},await H()}),(ce,oe)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[0]||(oe[0]=Ie=>h())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Gu,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[1]||(oe[1]=Ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[2]||(oe[2]=Ie=>le())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Pe,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ju,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:Pe,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:Pe,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ap=Rt._export_sfc(np,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},op=Ka.exports,$o;function lp(){return $o||($o=1,function(a,i){(function(s,l){l()})(op,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 V=new XMLHttpRequest;V.open("GET",D),V.responseType="blob",V.onload=function(){h(V.response,E,_)},V.onerror=function(){console.error("could not download file")},V.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 fa.commonjsGlobal=="object"&&fa.commonjsGlobal.global===fa.commonjsGlobal?fa.commonjsGlobal:void 0,g=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&&!g?function(D,E,_){var V=x.URL||x.webkitURL,O=document.createElement("a");E=E||D.name||"download",O.download=E,O.rel="noopener",typeof D=="string"?(O.href=D,O.origin===location.origin?d(O):c(O.href)?l(D,E,_):d(O,O.target="_blank")):(O.href=V.createObjectURL(D),setTimeout(function(){V.revokeObjectURL(O.href)},4e4),setTimeout(function(){d(O)},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 V=document.createElement("a");V.href=D,V.target="_blank",setTimeout(function(){d(V)})}}:function(D,E,_,V){if(V=V||open("","_blank"),V&&(V.document.title=V.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var O=D.type==="application/octet-stream",W=/constructor/i.test(x.HTMLElement)||x.safari,De=/CriOS\/[\d]+/.test(navigator.userAgent);if((De||O&&W||g)&&typeof FileReader<"u"){var q=new FileReader;q.onloadend=function(){var w=q.result;w=De?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),V?V.location.href=w:location=w,V=null},q.readAsDataURL(D)}else{var K=x.URL||x.webkitURL,ie=K.createObjectURL(D);V?V.location=ie:location.href=ie,V=null,setTimeout(function(){K.revokeObjectURL(ie)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}lp();const ra=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(ra),Lt=_e.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:rp,itemGridData:aa,curStructureCompIds:jo,isSubmitCurStructure:ip,isRefreshCurStructure:sp,freshContent:Ko,routeToChildPath:cp,payloadTypes:up,pageMapState:Xa,itemExtendData:Fa}=p.storeToRefs(Lt),pn=_e.useMenuState(p.pinia),{activeTopMenuPath:pp,activeMenuPath:Pt,platform:tf,activeAsideMenu:dp,buttonTriggerType:fp}=p.storeToRefs(pn),kn=da.useUnit(p.pinia),{selectTitle:Uo}=p.storeToRefs(kn),hp=_e.useOriginalState(p.pinia),{originalPath:to}=p.storeToRefs(hp),Wo=_e.useAuthorityState(p.pinia),Ya=e.ref(!0),Ta=e.ref(0),go=e.ref([]),Ia=e.computed(async()=>{var i,s;const a=(i=Pt.value)!=null&&i.startsWith("/")?(s=Pt.value)==null?void 0:s.substring(1):Pt.value;return(a==null?void 0:a.includes(to.value))||await Cp(a)}),vp=()=>{Lt.setItemGridData([]),Lt.setIsEdit("edit"),Lt.setSubmitCurStructure(Pt.value!=="/平台管理/菜单管理")},gp=()=>{Lt.setIsEdit("view"),Lt.setRefreshCurStructure(!0)},mp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Uo.value.length===1)Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.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);Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),l,!1,[],await Ia.value);let c=-1;(i=Uo.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(""))}Et.value=Aa(Et.value),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value)},ro=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 g=await x(d);if(((c=g==null?void 0:g.data)==null?void 0:c.code)===200)return g.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Ho=async(a,i,s,l)=>{var c,d,x,g,h,D,E,_,V,O,W;try{const De=(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}})),q=(g=(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:g.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),K=JSON.parse(p.cloneDeep(JSON.stringify(a))),ie=(h=K==null?void 0:K.results)==null?void 0:h.map(k=>k.id);let w;s?w=(_=(E=(D=Xa.value)==null?void 0:D[Pt.value])==null?void 0:E.filter(k=>{var A,T,le;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((le=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:le.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):w=(W=(O=(V=Xa.value)==null?void 0:V[Pt.value])==null?void 0:O.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:W.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(ie!=null&&ie.includes(k))&&typeof k=="number");(De==null?void 0:De.length)>0&&await p.batchAddInsofDataApi({dataList:De}),(q==null?void 0:q.length)>0&&await p.batchUpdateInsofDataApi({dataList:q}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(De){throw new Error(De)}},yp=async a=>{var D,E,_,V,O,W,De,q,K,ie;pn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(rp.value)));if(!ip.value)return pn.setCacheStructures({key:fp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),l=s.filter(w=>{var z;return!((z=jo.value)!=null&&z.includes(w))}),c=(D=jo.value)==null?void 0:D.filter(w=>!s.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(ro(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(ro(x,"create",a)),g&&(g==null?void 0:g.length)>0&&h.push(ro(g,"update",a)),aa.value&&((E=aa.value)!=null&&E.isDelete&&((V=(_=aa.value)==null?void 0:_.results)==null?void 0:V.length)>0&&((W=(O=aa.value)==null?void 0:O.results)!=null&&W.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(De=aa.value)==null?void 0:De.results}):(console.log("itemGridData.value",aa.value),h.push(await Ho(aa.value,"gridLayout")))),Fa.value)for(const w in Fa.value)h.push(await Ho((q=Fa.value)==null?void 0:q[w],"extend",{target:w,compId:(ie=(K=Fa.value)==null?void 0:K[w])==null?void 0:ie.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Lt.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),pn.setContentLoading(!1)},mo=a=>ga(a),Et=e.ref([]),bp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nl=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),kp=async a=>{var l,c,d,x,g,h;let i=p.cloneDeep(Pt).value;i=i+to.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=(g=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:g.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("删除响应失败"),Lt.setTableLoading(!1)}},qo=async a=>{var i,s;try{let l=p.cloneDeep(Pt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var g;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+to.value+((g=Object.values(x==null?void 0:x.singleContent))==null?void 0:g[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var g;return((g=x==null?void 0:x.data)==null?void 0:g.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))),g=await p.batchDeleteInsofDataApi({ids:x});((s=g==null?void 0:g.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 kp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Lt.setTableLoading(!1)}},xp=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:Pt.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)}},Vl=e.ref(0),Ja=e.ref(null),yo=async(a,i="data",s)=>{var l,c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T;if(Ja.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await qo(a):await _e.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ra.setLogRecordAsync({type:"删除",data:a},Pt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(le=>typeof(le==null?void 0:le.id)=="string")){const le=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Le=>({content:a==null?void 0:a.content,singleContent:Le,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 qo(le)}else{const le=(g=a==null?void 0:a.selectItems)==null?void 0:g.map(Le=>Le==null?void 0:Le.id);await p.batchDeleteInsofDataApi({ids:le}),await ra.setLogRecordAsync({type:"删除",data:le},Pt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let le={};for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);const Le=await _e.addTableContents(i,Pt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a,{param:s});Ja.value={resId:Le,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Lt.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let le=[],Le=[],ot=((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,Ke="",xe="";if(ot!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((V=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:V.id)!="string"){const I=await p.getInsofDataApi({id:ot});Ke=((q=(De=(W=(O=I==null?void 0:I.data)==null?void 0:O.result)==null?void 0:W[0])==null?void 0:De.key)==null?void 0:q.tableId)??"",xe=((z=(w=(ie=(K=I==null?void 0:I.data)==null?void 0:K.result)==null?void 0:ie[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(I=>{let te={};for(let ee in I)ee!=="id"&&ee!=="index"&&(te[ee]=I[ee]);typeof(I==null?void 0:I.id)=="number"?le.push({id:I==null?void 0:I.id,value:{tableData:te}}):Le.push({key:{type:i,pageKey:Be||xe||Pt.value,tableId:Ke||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Le==null?void 0:Le.length)>0&&await p.batchAddInsofDataApi({dataList:Le}),(le==null?void 0:le.length)>0&&await p.batchUpdateInsofDataApi({dataList:le})}else{let le={},Le=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);await _e.fixTableContents(i,Pt.value,a==null?void 0:a.index,Le,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a)}Lt.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await xp(a==null?void 0:a.value);Lt.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(le=>le==null?void 0:le.isMainKey)||(Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value)),Et.value=Aa(Et.value),wo.value&&(a==null?void 0:a.buttonName)!=="删除"&&Lt.setRefreshCurStructure(!0)},wp=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},bo=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await wp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await _e.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(g=>g.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(pn.setActiveMenuPath(null),pn.setActiveMenuPath(i))},ko=a=>{Et.value=Aa(a),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value)},Dp=async a=>{var i;await e.nextTick(),(i=dp.value)!=null&&i.isRouter?Wo.setRouterPageStructure(a):Wo.setRouterPageStructure([])},Cp=async a=>{var d,x,g,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,V)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-2>V&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,V)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-1>V&&(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=(g=l==null?void 0:l.data)==null?void 0:g.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},Ep=e.ref(),Fn=e.ref(null),_p=a=>{var D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(xe=>{var I;return((I=xe==null?void 0:xe.key)==null?void 0:I.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Ep.value=i;const s=(V=(_=i==null?void 0:i.find(xe=>{var I,te,ee;return(ee=(te=(I=xe==null?void 0:xe.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:_.value)==null?void 0:V.tableData;if(!s)return Fn.value=null;const l=(De=(W=(O=i==null?void 0:i.find(xe=>{var I,te,ee;return(ee=(te=(I=xe==null?void 0:xe.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:O.key)==null?void 0:W.relatedInfo)==null?void 0:De.compId,c=(q=Et.value)==null?void 0:q.find(xe=>(xe==null?void 0:xe.id)===l);if(!c)return Fn.value=null;const d=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(xe=>(xe==null?void 0:xe.prop)===d),g=(Le=(le=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:T.contents)==null?void 0:le.find(xe=>xe==null?void 0:xe.isMainKey))==null?void 0:Le.prop,h=(Ke=(Be=(ot=c==null?void 0:c.compData)==null?void 0:ot.find(xe=>(xe==null?void 0:xe.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:Ke[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:g},console.log("getPageExtendData:",s,i)},Sp=()=>{var a,i;console.log("倒计时结束时"),_e.ElMessageBox.alert(`超时未提交,【${(i=(a=Pt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ol=()=>{var a,i,s,l;try{if(pp.value!=="报告中心"||!((a=Pt.value)!=null&&a.includes(to.value)))return;const c=(i=Et.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,g=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(d==null?void 0:d.value)&&Lt.setLockingPage(Pt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},xo=e.ref([]),Tp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Pt.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(()=>[Pt.value,sp.value],async a=>{var d,x,g,h,D,E,_,V;if(!Pt.value)return;Lt.setLockingPage(""),Et.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("/")?(g=a==null?void 0:a[0])==null?void 0:g.substring(1):a==null?void 0:a[0];let l=new WeakMap;(D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:up.value})).data.result)==null?void 0:h.filter(O=>{var W,De;return((W=O==null?void 0:O.key)==null?void 0:W.pageKey)!=="menu"&&((De=O==null?void 0:O.key)==null?void 0:De.pageKey)!=="secret"}))==null||D.forEach(O=>{l[O.key.pageKey]?l[O.key.pageKey]=[...l[O.key.pageKey],O]:l[O.key.pageKey]=[O]}),go.value=l,s?(pn.setContentLoading(!0),sessionStorage.setItem("pageKey",Pt.value),Et.value=await _e.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,l),await ra.setLogRecordAsync({type:"查询",data:Et.value},Pt.value),Et.value=Aa(Et.value),await Dp(Et.value),Ol(),_p(s),xo.value=(E=Et.value)==null?void 0:E.map(O=>({label:O==null?void 0:O.name,value:O==null?void 0:O.id})),Lt.setExtraContents([]),kn.setSelectTitle([]),kn.setSelectIndex(""),kn.setSelectMenu(""),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value),Lt.setCurStructureCompIds((_=Et.value)==null?void 0:_.map(O=>O==null?void 0:O.id)),Lt.setRefreshCurStructure(!1),kn.setSelectTitle((V=Pt.value)==null?void 0:V.split("/").map(O=>({value:O.trim()}))),pn.setChildMenu(""),pn.setContentLoading(!1),Lt.setTableLoading(!1),Ua.value=!1):(Et.value=[],Ua.value=!1),e.nextTick(()=>{Ta.value=Ta.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Ko.value,async()=>{if(Ko.value){let a=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value);Et.value=Aa(a),Lt.setFreshContent(!1),Ol()}},{deep:!0});const Ip=async()=>{var c,d,x,g,h,D,E,_;pn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ra.value)==null?void 0:c.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=Ra.value)==null?void 0:x.account)||((g=Ra.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(V=>V==null?void 0:V.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(V=>V==null?void 0:V.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(V=>V!==null&&V))&&(await p.batchDeleteInsofDataApi({ids:s}),await ra.setLogRecordAsync({type:"删除",data:s},Pt.value)),pn.setActiveMenuPath(cp.value),Et.value=null,Lt.setRouteToChildPath(""),pn.setChildMenu("")},Bp=a=>new RegExp("button","i").test(a),Ap=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ml=a=>{if(Ap(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&pn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Np=a=>{Vl.value=a},ha=e.reactive({index:0,comp:null}),Vp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Op(i,s)}))}),Pl=(a,i)=>{var h,D,E,_,V;const s=i?a:a-2,l=(h=Et.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(O=>(O==null?void 0:O.isMainKey)&&(O==null?void 0:O.label)!=="操作"),x=d===-1?0:d,g=(V=(_=l==null?void 0:l.compData)==null?void 0:_.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:V.contents;return{valid:g==null?void 0:g.every(O=>O==null?void 0:O[x+1]),length:(g==null?void 0:g.length)||0}},Op=(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}=Pl(i,!0);ha.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Rl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=Et.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:g}=Pl(i);g?(ha.index=i,ha.comp=(d=Et.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=i,ha.comp=(x=Et.value)==null?void 0:x[a]},wo=e.computed(()=>{var a,i;return(i=(a=Nl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>wo.value,a=>{a&&Rl(0)},{immediate:!0});const Mp={class:"layout"},zp=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:V}=_;return V==="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:V}=_;return V==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const V=[];if(D=D.map(O=>{const W=O.span;return W?(O.span=Number(W),_=_+O.span):V.push(O),O}),_<24){const O=Math.floor((24-_)/E);V.forEach(W=>{W.span=O})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var O;const _=e.resolveComponent("el-col"),V=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Mp,[e.createVNode(V,{style:e.normalizeStyle({height:(O=d.value)==null?void 0:O.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(W,De)=>(e.openBlock(),e.createBlock(_,{span:W==null?void 0:W.span},{default:e.withCtx(()=>{var q;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(mo)(W.comp)),{key:e.unref(Ta),compName:W.name,index:(W==null?void 0:W.id)??De,height:(q=d.value)==null?void 0:q.height,itemData:W==null?void 0:W.compData,childItemData:W==null?void 0:W.itemChildData,onChange:e.unref(yo),onContentChange:e.unref(bo),onPageChange:e.unref(ko),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Pp=Rt._export_sfc(zp,[["__scopeId","data-v-ab9a36ed"]]),Rp={class:"layout-operate"},Fp={class:"layout-module"},Lp={class:"collapse-title-item"},$p={class:"collapse-title"},jp={class:"icon-content"},Kp=["onClick"],Up={class:"comp-child"},Wp=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(()=>{De()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),g=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],V=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),O=e.computed(()=>{const k=V==null?void 0:V.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="baseConfig"});return A==null?void 0:A.contents}),W=e.computed(()=>{const k=V==null?void 0:V.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="children"});return A==null?void 0:A.contents}),De=()=>{var k;c.value=V.value||{},D.value=(W==null?void 0:W.value)||[],x.value=g(),x.value=(k=x.value)==null?void 0:k.map(A=>{var le;const{prop:T}=A;return A.value=(le=O.value)==null?void 0:le[T],A})};e.watch(()=>{var k;return(k=W==null?void 0:W.value)==null?void 0:k.length},()=>{var k;D.value=(W==null?void 0:W.value)||[],E.value=(k=W.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const q=(k,A)=>{const T=p.cloneDeep(W==null?void 0:W.value);T[A].span=k.span,D.value=T,l("change",z(),!0)},K=k=>ga(k),ie=(k,A,T)=>{if(!k)return;const le=p.cloneDeep(W==null?void 0:W.value);le[T]&&(le[T].compData=k,D.value=le,l("change",z(),!0))},w=k=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(W==null?void 0:W.value);A=A==null?void 0:A.filter((T,le)=>k!==le),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({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",Rp,[e.createElementVNode("div",Fp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Tt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=le=>h(le))},null,8,["rowContents"])])]),e.createVNode(kl.default,{class:"collapse-content",collapseContents:W.value},{title:e.withCtx(({item:le,index:Le})=>[e.createElementVNode("div",Lp,[e.createElementVNode("div",$p,e.toDisplayString(le.name),1),e.createElementVNode("div",jp,[e.createElementVNode("div",{onClick:e.withModifiers(ot=>w(Le),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Kp)])])]),content:e.withCtx(({item:le,index:Le})=>[e.createElementVNode("div",Up,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:E.value[Le],key:Le,isEnableWrap:!0,onChange:ot=>q(ot,Le)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(le.comp+"Operate")),{itemContents:le==null?void 0:le.compData,originalItemContents:le.compData,onChange:ot=>ie(ot,le,Le)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Hp=Rt._export_sfc(Wp,[["__scopeId","data-v-ba05456e"]]),qp=typeof window<"u";var Go;qp&&((Go=window==null?void 0:window.navigator)!=null&&Go.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(a){return a==null}function Fl(){}const Gp=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(Gp)));function Xp(){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 Xo(a,i=16){if(typeof a!="function")return Fl;const s=(...d)=>{a(...d)};if(i<=0)return Ll(s);let l=0,c;return function(...d){const x=Date.now(),g=x-l;clearTimeout(c),g>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-g))}}function Yp(a,i=100){if(typeof a!="function")return Fl;const s=(...c)=>{a(...c)};if(i<=0)return Ll(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Ll(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 Ea=new Set,$l=new WeakMap;function Jp(){Ea.forEach(a=>{a(...$l.get(a))}),Ea.clear()}function tn(a,...i){if(typeof a!="function")return a;$l.set(a,i),!Ea.has(a)&&(Ea.add(a),Ea.size===1&&Promise.resolve().then(Jp))}const jl=Symbol("LAYOUT_KEY"),Kl=Symbol("EMITTER_KEY");function Qp(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 uo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Zp(a[s]);return i}function Zp(a){return{...a}}function Ul(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=Hl(a),c=ql(a),d=Array(a.length);for(let x=0,g=c.length;x<g;x++){let h=c[x];h.static||(h=ed(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function ed(a,i,s,l){if(s)for(;i.y>0&&!_a(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!_a(a,i);)i.y--}let c;for(;c=_a(a,i);)i.y=c.y+c.h;return i}function td(a,i){const s=Hl(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(;_a(s,d);)d.y++}return a}function Yo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function _a(a,i){for(let s=0,l=a.length;s<l;s++)if(Ul(a[s],i))return a[s]}function Wl(a,i){return a.filter(s=>Ul(s,i))}function Hl(a){return a.filter(i=>i.static)}function po(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,g=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=ql(a);h&&(D=D.reverse());const E=Wl(D,i);if(d&&E.length)return i.x=x,i.y=g,i.moved=!1,a;for(let _=0,V=E.length;_<V;_++){const O=E[_];O.moved||i.y>O.y&&i.y-O.y>O.h/4||(O.static?a=Jo(a,O,i,c):a=Jo(a,i,O,c))}return a}function Jo(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),!_a(a,c))return po(a,s,void 0,c.y,!1)}return po(a,s,void 0,s.y+1,!1)}function nd(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 ad(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 od(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ql(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 rd(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 g=0;g<s.length;g++)if(typeof x[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[g]+" 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 id(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 Qo(a){return sd(a)}function sd(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 Zo(a,i,s,l){return cd(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 cd(a){return typeof a=="number"&&!Number.isNaN(a)}function ud(a,i){const s=Xl(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 Gl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function pd(a,i,s,l,c,d,x){if(i[l])return uo(i[l]);let g=a;const h=Xl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const V=D[E];if(i[V]){g=i[V];break}}return g=uo(g||[]),pa(td(g,{cols:d}),x)}function Xl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let dd="auto";function fd(){return typeof document<"u"}function el(){return fd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):dd}var Da={exports:{}},hd=Da.exports,tl;function vd(){return tl||(tl=1,function(a,i){(function(s,l){a.exports=l()})(hd,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,De(r.key),r)}}function g(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=De(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 V(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function O(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,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(f)}(this,o)}}function W(){return W=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(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}},W.apply(this,arguments)}function De(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 q=function(n){return!(!n||!n.Window)&&n instanceof n.Window},K=void 0,ie=void 0;function w(n){K=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),ie=n}function z(n){return q(n)?n:(n.ownerDocument||n).defaultView||ie.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===ie||q(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=z(n)||ie;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 le(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 Le(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 ot={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=ot.draggable,t.map.drag=ot,t.methodDict.drag="draggable",r.actions.drag=ot.defaults},listeners:{"interactions:before-action-move":le,"interactions:action-resume":le,"interactions:action-move":Le,"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:le,move:Le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Be=ot,Ke={init:function(n){var t=n;Ke.document=t.document,Ke.DocumentFragment=t.DocumentFragment||xe,Ke.SVGElement=t.SVGElement||xe,Ke.SVGSVGElement=t.SVGSVGElement||xe,Ke.SVGElementInstance=t.SVGElementInstance||xe,Ke.Element=t.Element||xe,Ke.HTMLElement=t.HTMLElement||Ke.Element,Ke.Event=t.Event,Ke.Touch=t.Touch||xe,Ke.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 xe(){}var I=Ke,te={init:function(n){var t=I.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&I.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.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?I.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=I.document&&"onmousewheel"in I.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=te;function he(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;T.element(n);){if(H(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function H(n,t){return ie!==K&&(t=t.replace(/\/deep\//g," ")),n[ee.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function me(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function be(n,t,o){for(;T.element(n);){if(H(n,t))return!0;if((n=st(n))===o)return H(n,t)}return!1}function ze(n){return n.correspondingUseElement||n}function Oe(n){var t=n instanceof I.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 Ye(n){var t,o=Oe(n);if(!ee.isIOS7&&o){var r={x:(t=(t=z(n))||ie).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 qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!T.string(n)&&(I.document.querySelector(n),!0)}function Q(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function nt(n,t,o,r){var u=n;return T.string(u)?u=tt(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Ye(u)),u}function Pe(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Q({},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 oe(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 re(n,t,o){var r=o&&n.options[o];return Pe(nt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ie(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=Xe(n)),T.array(n))return n.forEach(function(S){return Ie(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 y=f[u];Ie(n,y,o,r)}else if(T.object(t))for(var b in t)Ie(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(m.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 U(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 v(n){return n instanceof I.Event||n instanceof I.Touch}function L(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Z(n,t){return t=t||{x:0,y:0},ee.isOperaMobile&&v(n)?(L("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):L("page",n,t),t}function P(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function ue(n,t,o){var r=t.length>1?X(t):t[0];Z(r,n.page),function(u,f){f=f||{},ee.isOperaMobile&&v(u)?L("screen",u,f):L("client",u,f)}(r,n.client),n.timeStamp=o}function R(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 X(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 se(n){if(!n.length)return null;var t=R(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 ve(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function $(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function ae(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 I.Touch?"touch":"mouse"}function G(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[ze(t?t[0]:n.target),ze(n.currentTarget)]}var Se=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Se.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var de=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return de([],n)},F=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},fe=function(n,t){return n[F(n,t)]},ne=function(n){D(o,n);var t=O(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=j,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return g(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,y=F(f,function(S){var j=S.dropzone,B=S.element;return j===r.dropzone&&B===r.target});u.activeDrops.splice(y,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}(Se);function Ae(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var B=j[S];if(B.options.drop.enabled){var J=B.options.drop.accept;if(!(T.element(J)&&J!==y||T.string(J)&&!H(y,J)||T.func(J)&&!J({dropzone:B,draggableElement:y})))for(var ke=0,$e=B.getAllElements();ke<$e.length;ke++){var Re=$e[ke];Re!==y&&b.push({dropzone:B,element:Re,rect:B.getRect(Re)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Me(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],B=j.dropzone,J=j.element,ke=j.rect,$e=B.dropCheck(t,o,u,f,J,ke);y.push($e?J:null)}var Re=function(Ge){for(var it,at,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],kt=Ge[it];if(mt&&_t!==it)if(kt){var en=M(mt),jt=M(kt);if(en!==mt.ownerDocument)if(jt!==mt.ownerDocument)if(en!==jt){yt=yt.length?yt:me(kt);var cn=void 0;if(kt instanceof I.HTMLElement&&mt instanceof I.SVGElement&&!(mt instanceof I.SVGSVGElement)){if(mt===jt)continue;cn=mt.ownerSVGElement}else cn=mt;for(var Cn=me(cn,kt.ownerDocument),zn=0;Cn[zn]&&Cn[zn]===yt[zn];)zn++;var Pa=[Cn[zn-1],Cn[zn],yt[zn]];if(Pa[0])for(var ka=Pa[0].lastChild;ka;){if(ka===Pa[1]){it=_t,yt=Cn;break}if(ka===Pa[2])break;ka=ka.previousSibling}}else ht=kt,(parseInt(z(at=mt).getComputedStyle(at).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Re]||null}function Ve(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 ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ne(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 ne(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 ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function ge(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&&Ae(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(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=Je(t,o.element));var y=r,b=Me(o,y,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=Ve(o,0,y)}}var je={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(y,b){if(T.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Ie(b.listeners),j=Object.keys(S).reduce(function(J,ke){return J[/^(enter|leave)/.test(ke)?"drag".concat(ke):/^(activate|deactivate|move)/.test(ke)?"drop".concat(ke):ke]=S[ke],J},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(j),y.options.drop.listeners=j}return T.func(b.ondrop)&&y.on("drop",b.ondrop),T.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:T.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return T.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,j,B){return function(J,ke,$e,Re,Ge,it,at){var ht=!1;if(!(at=at||J.getRect(it)))return!!J.options.drop.checker&&J.options.drop.checker(ke,$e,ht,J,it,Re,Ge);var yt=J.options.drop.overlap;if(yt==="pointer"){var _t=re(Re,Ge,"drag"),mt=Z(ke);mt.x+=_t.x,mt.y+=_t.y;var kt=mt.x>at.left&&mt.x<at.right,en=mt.y>at.top&&mt.y<at.bottom;ht=kt&&en}var jt=Re.getRect(Ge);if(jt&&yt==="center"){var cn=jt.left+jt.width/2,Cn=jt.top+jt.height/2;ht=cn>=at.left&&cn<=at.right&&Cn>=at.top&&Cn<=at.bottom}return jt&&T.number(yt)&&(ht=Math.max(0,Math.min(at.right,jt.right)-Math.max(at.left,jt.left))*Math.max(0,Math.min(at.bottom,jt.bottom)-Math.max(at.top,jt.top))/(jt.width*jt.height)>=yt),J.options.drop.checker&&(ht=J.options.drop.checker(ke,$e,ht,J,it,Re,Ge)),ht}(this,f,y,b,S,j,B)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Q(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=je.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=Je(t,o.element),u.events=Ve(o,0,r),u.events.activate&&(Ae(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;ge(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;ct(n,t),ge(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:Je,getDrop:Me,getDropEvents:Ve,fireDropEvents:ge,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ye=je;function we(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",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ve(u,b),o.box=se(u),o.scale=1,o.ds=0,o.angle=$(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||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=ve(u,b),o.box=se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=$(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 Qe={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=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":we,"interactions:action-move":we,"interactions:action-end":we,"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}},pe=Qe;function Ne(n,t,o,r,u,f,y){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(y=Math.min(y,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+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!T.element(r)&&(T.element(t)?t===r:be(r,t,u))}function Fe(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 We,N,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.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),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return T.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(y.options.resize.square=b.square),y):T.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.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:Q({},f),corrected:Q({},f),previous:Q({},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),Fe(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,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,B=S.corrected,J=S.delta,ke=S.previous;if(Q(ke,B),y){if(Q(B,b),f==="reposition"){if(B.top>B.bottom){var $e=B.top;B.top=B.bottom,B.bottom=$e}if(B.left>B.right){var Re=B.left;B.left=B.right,B.right=Re}}}else B.top=Math.min(b.top,j.bottom),B.bottom=Math.max(b.bottom,j.top),B.left=Math.min(b.left,j.right),B.right=Math.max(b.right,j.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)J[Ge]=B[Ge]-ke[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=J}})(n),Fe(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 y=Q({},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]=Ne(j,b.edges[j],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.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 B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,J=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||J)&&(n.action={name:"resize",axes:(B?"x":"")+(J?"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=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(y+=j)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(pe),n.usePlugin(ut),n.usePlugin(Be),n.usePlugin(ye)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return N(n)},init:function(n){if(We=n.requestAnimationFrame,N=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],N=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),N=N&&N.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},N=function(u){return clearTimeout(u)})}},Te={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){Te.isScrolling=!0,rt.cancel(Te.i),n.autoScroll=Te,Te.interaction=n,Te.prevTime=Te.now(),Te.i=rt.request(Te.scroll)},stop:function(){Te.isScrolling=!1,Te.interaction&&(Te.interaction.autoScroll=null),rt.cancel(Te.i)},scroll:function(){var n=Te.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Te.now(),b=(y-Te.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Te.x*S,y:Te.y*S};if(j.x||j.y){var B=He(f);T.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var J=He(f),ke={x:J.x-B.x,y:J.y-B.y};(ke.x||ke.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:ke,interaction:n,container:f})}Te.prevTime=y}Te.isScrolling&&(rt.cancel(Te.i),Te.i=rt.request(Te.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()&&Te.check(t.interactable,t.prepared.name))if(t.simulation)Te.x=Te.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,j=t.prepared.name,B=b.options[j].autoScroll,J=Ze(B.container,b,S);if(T.window(J))y=o.clientX<Te.margin,r=o.clientY<Te.margin,u=o.clientX>J.innerWidth-Te.margin,f=o.clientY>J.innerHeight-Te.margin;else{var ke=Oe(J);y=o.clientX<ke.left+Te.margin,r=o.clientY<ke.top+Te.margin,u=o.clientX>ke.right-Te.margin,f=o.clientY>ke.bottom-Te.margin}Te.x=u?1:y?-1:0,Te.y=f?1:r?-1:0,Te.isScrolling||(Te.margin=B.margin,Te.speed=B.speed,Te.start(t))}}};function Ze(n,t,o){return(T.string(n)?tt(n,t,o):n)||z(o)}function He(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Te,Te.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Te.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Te.stop(),Te.interaction&&(Te.interaction=null)},"interactions:stop":Te.stop,"interactions:action-move":function(n){return Te.onInteractionMove(n)}}},vt=pt;function It(n,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),n.apply(this,arguments)}}function Bt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wt(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,j,B,J){var ke=b.getRect(B),$e=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Re={action:null,interactable:b,interaction:j,element:B,rect:ke,buttons:$e};return J.fire("auto-start:check",Re),Re.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=It(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=It(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wt,t.prototype.styleCursor=xt}};function At(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Ht(t,o,n,u)?n:null}function Kt(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var j=r[b],B=u[b],J=j.getAction(t,o,n,B);if(J){var ke=At(J,j,B,f,y);if(ke)return{action:ke,interactable:j,element:B}}}return{action:null,interactable:null,element:null}}function Ft(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;T.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var j=Kt(n,t,o,f,y,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Bt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,wn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ht(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,B=0;if(!(f&&y&&b))return!1;for(var J=0,ke=r.interactions.list;J<ke.length;J++){var $e=ke[J],Re=$e.prepared.name;if($e.interacting()&&(++S>=b||$e.interactable===n&&((j+=Re===o.name?1:0)>=f||$e.element===t&&(B++,Re===o.name&&B>=y))))return!1}return b>0}function xn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function dn(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 y=o.options[u.name].cursorChecker;f=T.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}dn(n.element,f||"",t)}else t.autoStart.cursorElement&&dn(t.autoStart.cursorElement,"",t)}var _n={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Q(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:Ht,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Ft(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Ft(u,f,y,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,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!Ht(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&&dn(o.element,"",t)}},maxInteractions:xn,withinInteractionLimit:Ht,validateAction:At},fn=_n,Sn={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 y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&j!=="xy"&&j!==B){o.prepared.name=null;for(var J=r,ke=function(Re){if(Re!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Re.testIgnoreAllow(Ge,J,r)){var it=Re.getAction(o.downPointer,o.downEvent,o,J);if(it&&it.name==="drag"&&function(at,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return at==="xy"||yt==="xy"||yt===at}(B,Re)&&fn.validateAction(it,Re,J,r,t))return Re}}};T.element(J);){var $e=t.interactables.forEachMatch(J,ke);if($e){o.prepared.name="drag",o.interactable=$e,o.element=J;break}J=st(J)}}}}}};function hn(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 Tn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(fn),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=hn(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;hn(t)>0&&(t.prepared.name=null)}},getHoldDuration:hn},vn=Tn,Gn={id:"auto-start",install:function(n){n.usePlugin(fn),n.usePlugin(vn),n.usePlugin(Sn)}},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 y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(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)&&H(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||he(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 In(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 gn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=gn(r):T.array(r)?t[o]=Ee(r):t[o]=r}return t}var Mn=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=Bn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(j){var B=j.interactable.options[j.prepared.name],J=B.modifiers;return J&&J.length?J:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ke){var $e=B[ke];return $e&&$e.enabled&&{options:$e,methods:$e._methods}}).filter(function(ke){return!!ke})}(y);this.prepareStates(b),this.startEdges=Q({},y.edges),this.edges=Q({},this.startEdges),this.startOffset=(r=y.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=Bn(),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,y=t.edges;t.coords=Q({},t.pageCoords),t.rect=Q({},f),t.edges=Q({},y);for(var b=u?this.states.slice(u):this.states,S=Bn(t.coords,t.rect),j=0;j<b.length;j++){var B,J=b[j],ke=J.options,$e=Q({},t.coords),Re=null;(B=J.methods)!=null&&B.set&&this.shouldDo(ke,r,o)&&(t.state=J,Re=J.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-$e.x,y:t.coords.y-$e.y})),S.eventProps.push(Re)}Q(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 Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var at=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=at||Ge.x!==S.coords.x||Ge.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,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Q(this.startDelta,y.delta);for(var j=0,B=[[f,b],[u,S]];j<B.length;j++){var J=B[j],ke=J[0],$e=J[1];ke.page.x+=$e.x,ke.page.y+=$e.y,ke.client.x+=$e.x,ke.client.y+=$e.y}var Re=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Re.left,Ge.right+=Re.right,Ge.top+=Re.top,Ge.bottom+=Re.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.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};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.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,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,j=b.methods,B=j.beforeEnd&&j.beforeEnd(t);if(B)return this.endResult=B,!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=Q({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 y=f[u];r.state=y,y.methods.stop&&y.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,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}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 y=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,B=0,J=[[r.start,y],[r.cur,S]];B<J.length;B++){var ke=J[B],$e=ke[0],Re=ke[1];$e.page.x-=Re.x,$e.page.y-=Re.y,$e.client.x-=Re.x,$e.client.y-=Re.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 gn(o)}),this.result=Bn(Q({},t.result.coords),Q({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Bn(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 nn(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.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 bt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new Mn(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)}}},Yt=bt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Jn=function(n){D(o,n);var t=O(o);function o(r,u,f,y,b,S,j){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var J=r.interactable,ke=(J&&J.options||gt).deltaSource,$e=re(J,b,f),Re=y==="start",Ge=y==="end",it=Re?V(B):r.prevEvent,at=Re?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Q({},at.page),B.client=Q({},at.client),B.rect=Q({},r.rect),B.timeStamp=at.timeStamp,Ge||(B.page.x-=$e.x,B.page.y-=$e.y,B.client.x-=$e.x,B.client.y-=$e.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=j||f+(y||""),B.interactable=J,B.t0=Re?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-$e.x,B.y0=r.coords.start.page.y-$e.y,B.clientX0=r.coords.start.client.x-$e.x,B.clientY0=r.coords.start.client.y-$e.y,B.delta=Re||Ge?{x:0,y:0}:{x:B[ke].x-it[ke].x,y:B[ke].y-it[ke].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Q({},r.coords.velocity[ke]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return g(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,y=202.5<=u&&u<337.5;return{up:y,down:!y&&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}(Se);Object.defineProperties(Jn.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 Mt=g(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}),mn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),An=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),an=0,Nn=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=It(function(B){this.move(B)},"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=an++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in mn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var j in An)S(j);this._scopeFire("interactions:new",{interaction:this})}return g(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)&&(Bt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Q({},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,y=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=dt(u,f)>this.pointerMoveTolerance);var b,S,j,B=this.getPointerIndex(t),J={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(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",J),y||this.simulation||(this.interacting()&&(J.type=null,this.move(J)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=Q({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 y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,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=P(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:F(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,y,b,S=P(t),j=this.getPointerIndex(t),B=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),j=this.pointers.length,this.pointers.push(B)),ue(this.coords.cur,this.pointers.map(function(J){return J.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(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:B,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 Jn(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,y=this.rect;if(y&&r==="move"&&(oe(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.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 Qt(n){jn(n.interaction)}function jn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),oe(n.edges,n.rect,t),t.x=0,t.y=0,!0}function yn(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 zt(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}An.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=yn},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&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Qt,"interactions:before-action-move":Qt,"interactions:before-action-end":function(n){var t=n.interaction;if(jn(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}}},on=qt,Dt=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 g(n,[{key:"start",value:function(t){var o=this.interaction,r=Nt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new Mn(o));if(y.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=y.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(y.result=y.setAll(this.modifierArg),!y.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=Nt(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 y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,j=this.interaction,B=Nt(j).resistance,J=(j._now()-this.t0)/1e3;if(J<this.te){var ke,$e=1-(Math.exp(-B*J)-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,y=this.modifiedOffset.y,ke={x:Wt(b=$e,t,r,f),y:Wt(b,o,u,y)}):ke={x:this.targetOffset.x*$e,y:this.targetOffset.y*$e};var Re={x:ke.x-this.currentOffset.x,y:ke.y-this.currentOffset.y};this.currentOffset.x+=Re.x,this.currentOffset.y+=Re.y,j.offsetBy(Re),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=Nt(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),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"}),U(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,rt.cancel(this.timeout)}}]),n}();function Nt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(on),n.usePlugin(Yt),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 Dt(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=st(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 Wt(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 sn=Ut;function ln(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=Q({},t||{})}return g(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&ln(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&ln(t,o)}},{key:"on",value:function(t,o){var r=Ie(t,o);for(t in r)this.types[t]=de(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Ie(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[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 g(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:y,remove:b,addDelegate:function(B,J,ke,$e,Re){var Ge=Un(Re);if(!r[ke]){r[ke]=[];for(var it=0;it<u.length;it++){var at=u[it];y(at,ke,S),y(at,ke,j,!0)}}var ht=r[ke],yt=fe(ht,function(_t){return _t.selector===B&&_t.context===J});yt||(yt={selector:B,context:J,listeners:[]},ht.push(yt)),yt.listeners.push({func:$e,options:Ge})},removeDelegate:function(B,J,ke,$e,Re){var Ge,it=Un(Re),at=r[ke],ht=!1;if(at)for(Ge=at.length-1;Ge>=0;Ge--){var yt=at[Ge];if(yt.selector===B&&yt.context===J){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var kt=_t[mt];if(kt.func===$e&&Zn(kt.options,it)){_t.splice(mt,1),_t.length||(at.splice(Ge,1),b(J,ke,S),b(J,ke,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,J,ke,$e){if(B.addEventListener){var Re=Un($e),Ge=fe(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[J]||(Ge.events[J]=[]),fe(Ge.events[J],function(it){return it.func===ke&&Zn(it.options,Re)})||(B.addEventListener(J,ke,f.supportsOptions?Re:Re.capture),Ge.events[J].push({func:ke,options:Re}))}}function b(B,J,ke,$e){if(B.addEventListener&&B.removeEventListener){var Re=F(o,function(en){return en.eventTarget===B}),Ge=o[Re];if(Ge&&Ge.events)if(J!=="all"){var it=!1,at=Ge.events[J];if(at){if(ke==="all"){for(var ht=at.length-1;ht>=0;ht--){var yt=at[ht];b(B,J,yt.func,yt.options)}return}for(var _t=Un($e),mt=0;mt<at.length;mt++){var kt=at[mt];if(kt.func===ke&&Zn(kt.options,_t)){B.removeEventListener(J,ke,f.supportsOptions?_t:_t.capture),at.splice(mt,1),at.length===0&&(delete Ge.events[J],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Re,1)}else for(J in Ge.events)Ge.events.hasOwnProperty(J)&&b(B,J,"all")}}function S(B,J){for(var ke=Un(J),$e=new Qn(B),Re=r[B.type],Ge=G(B)[0],it=Ge;T.element(it);){for(var at=0;at<Re.length;at++){var ht=Re[at],yt=ht.selector,_t=ht.context;if(H(it,yt)&&he(_t,Ge)&&he(_t,it)){var mt=ht.listeners;$e.currentTarget=it;for(var kt=0;kt<mt.length;kt++){var en=mt[kt];Zn(en.options,ke)&&en.func($e)}}}it=st(it)}}function j(B){return S(B,!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,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(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 y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ma(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,B=f.interactions.list;j<B.length;j++){var J=B[j];if(!(J.pointerType!==r||/down/i.test(u)&&J.simulation))return J}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(ma(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 ma(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=ae(o),f=G(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,B=o.changedTouches;j<B.length;j++){var J=B[j],ke={pointer:J,pointerId:P(J),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},$e=ua(ke);S.push([ke.pointer,ke.eventTarget,ke.curEventTarget,$e])}}else{var Re=!1;if(!ee.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Re;Ge++)Re=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Re=Re||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Re){var it={pointer:o,pointerId:P(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},at=ua(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,at])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],kt=yt[2];yt[3][n](_t,o,mt,kt)}}}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 rn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var j=u&&u.events,B=0;B<f.length;B++){var J=f[B];b(o,J.type,J.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=ee.pEventTypes;function y(){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 B=function(){var $e=ke[J];n.documents.some(function(Re){return he(Re.doc,$e.downTarget)})||j.removePointer($e.pointer,$e.event)},J=0,ke=j.pointers;J<ke.length;J++)B()}}(u=I.PointerEvent?[{type:f.down,listener:y},{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:y},{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=O(j);function j(){return d(this,j),S.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),j}(Nn),n.interactions={list:[],new:function(b){b.scopeFire=function(j,B){return n.fire(j,B)};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 rn(n,"add")},"scope:remove-document":function(n){return rn(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:rn,doOnInteractions:ea,methodNames:bn},Wn=Va,Hn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Hn||{}),rr=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=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return g(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,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&In(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,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),T.array(b)?y[f]=Ee(b):T.plainObject(b)?(y[f]=Q(y[f]||{},gn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?y[f].enabled=b:y[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)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=Q({},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(lt(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||he(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)?be(r,t,o):!!T.element(t)&&he(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?be(r,t,o):!!T.element(t)&&he(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 y=Ie(o,r,f);for(var b in y){b==="wheel"&&(b=ee.wheelEvent);for(var S=0,j=y[b];S<j.length;S++){var B=j[S];In(b,this._actions)?this.events[t===Hn.On?"on":"off"](b,B):T.string(this.target)?this._scopeEvents[t===Hn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===Hn.On?"add":"remove"](this.target,b,B,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=gn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Q(Q({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?T.func(this[y])&&this[y](t[y]):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,y=u.context,b=u.listeners;f===this.target&&y===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}(),ir=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,y=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=F(y,function(S){return S===u});y.splice(b,1)}})}return g(n,[{key:"new",value:function(t,o){o=Q(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 fe(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((T.string(f.target)?T.element(t)&&H(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),sr=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=ee,this.defaults=gn(gt),this.Eventable=Kn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=X,u.getTouchBBox=se,u.getTouchDistance=ve,u.getTouchAngle=$,u.getElementRect=Ye,u.getElementClientRect=Oe,u.matchesSelector=H,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=It(function(f,y,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 B=j[S];this.on(B,y,b)}return this}if(T.object(f)){for(var J in f)this.on(J,f[J],y);return this}return In(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=It(function(f,y,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 B=j[S];this.off(B,y,b)}return this}if(T.object(f)){for(var J in f)this.off(J,f[J],y);return this}var ke;return In(f,this.scope.actions)?f in this.globalEvents&&(ke=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(ke,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ee.supportsTouch},u.supportsPointerEvent=function(){return ee.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[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,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Jn,this.Interactable=void 0,this.interactables=new ir(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=O(f);function f(){return d(this,f),u.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return W(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){W(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(rr)}return g(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)&&w(r),I.init(r),ee.init(r),rt.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[Co(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[Co(y)]))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=z(t);o=o?Q({},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=z(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 Co(n){return n&&n.replace(/\/.*$/,"")}var Eo=new sr,Zt=Eo.interactStatic,cr=typeof globalThis<"u"?globalThis:window;Eo.init(cr);var ur=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,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,j=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},J=0;J<t.length;J++){var ke=t[J],$e=ke[0],Re=ke[1],Ge=Math.round((r-j.x)/n[$e]),it=Math.round((u-j.y)/n[Re]);B[$e]=Math.max(b.left,Math.min(b.right,Ge*n[$e]+j.x)),B[Re]=Math.max(b.top,Math.min(b.bottom,it*n[Re]+j.y))}return B};return o.grid=n,o.coordFields=t,o}}),pr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Q(t.snappers||{},ur),t.createSnapGrid=t.snappers.grid}},dr=pr,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Q({},u),t.startRect=Q({},o),t.ratio=y,t.equalDelta=j;var J=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 ke=(J.left?1:-1)*(J.top?1:-1);t.edgeSign={x:ke,y:ke}}else t.edgeSign={x:J.left?-1:1,y:J.top?-1:1};if(b!==!1&&Q(r,J),B!=null&&B.length){var $e=new Mn(n.interaction);$e.copyFrom(n.interaction.modification),$e.prepareStates(B),t.subModification=$e,$e.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Q({},r),y=t.equalDelta?hr:vr;if(Q(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Q({},o);oe(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&&(y(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),Q(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(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 vr(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*y;o.x=f.x+(j-u.width)*b.x}}var gr=nn(fr,"aspectRatio"),_o=function(){};_o._defaults={};var Oa=_o;function ta(n,t,o){return T.func(n)?nt(n,t.interactable,t.element,[o.x,o.y,t]):nt(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,y=r.options,b=y.elementRect,S=Q({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var j=ta(y.restriction,u,f);if(j){var B=j.right-j.left-t.width,J=j.bottom-j.top-t.height;B<0&&(S.left+=B,S.right+=B),J<0&&(S.top+=J,S.bottom+=J)}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,y=ta(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Q({},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}(y);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}},mr=nn(Ma,"restrict"),So={top:1/0,left:1/0,bottom:-1/0,right:-1/0},To={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Io(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 ya={noInner:So,noOuter:To,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Pe(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,y=u.options;if(o){var b=Q({},t),S=ta(y.inner,r,b)||{},j=ta(y.outer,r,b)||{};Io(S,So),Io(j,To),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}},yr=nn(ya,"restrictEdges"),br=Q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),kr=nn({start:Ma.start,set:Ma.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=nn({start:function(n){return ya.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(ta(f.min,t,n.coords))||xr,b=ce(ta(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:Q({},ya.noInner),outer:Q({},ya.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ya.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),no={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,j=S.offsetWithOrigin?function(ke){var $e=ke.interaction.element,Re=Pe(nt(ke.state.options.origin,null,null,[$e])),Ge=Re||re(ke.interactable,$e,ke.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=nt(S.offset,r,u,[o]);(t=Pe(B)||{x:0,y:0}).x+=j.x,t.y+=j.y}var J=S.relativePoints;y.offsets=f&&J&&J.length?J.map(function(ke,$e){return{index:$e,relativePoint:ke,x:b.left-f.width*ke.x+t.x,y:b.top-f.height*ke.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,y=re(t.interactable,t.element,t.prepared.name),b=Q({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var j=0,B=f;j<B.length;j++)for(var J=B[j],ke=b.x-J.x,$e=b.y-J.y,Re=0,Ge=u.targets.length;Re<Ge;Re++){var it=u.targets[Re],at=void 0;(at=T.func(it)?it(ke,$e,t._proxy,J,Re):it)&&S.push({x:(T.number(at.x)?at.x:ke)+J.x,y:(T.number(at.y)?at.y:$e)+J.y,range:T.number(at.range)?at.range:u.range,source:it,index:Re,offset:J})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,kt=_t.x-b.x,en=_t.y-b.y,jt=dt(kt,en),cn=jt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(cn=!1),ht.target&&!(cn?ht.inRange&&mt!==1/0?jt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=_t,ht.distance=jt,ht.range=mt,ht.inRange=cn,ht.delta.x=kt,ht.delta.y=en)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=nn(no,"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"]],no.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,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Q({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],B=void 0;if(B=T.func(j)?j(y.x,y.y,t):j){for(var J=0,ke=o.targetFields;J<ke.length;J++){var $e=ke[J],Re=$e[0],Ge=$e[1];if(Re in B||Ge in B){B.x=B[Re],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=no.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=nn(za,"snapSize"),ao={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:nn({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:Q(gn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Yt),n.usePlugin(dr),t.modifiers=ao,ao){var r=ao[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,Bo=function(n){D(o,n);var t=O(o);function o(r,u,f,y,b,S){var j;if(d(this,o),C(V(j=t.call(this,b)),f),f!==u&&C(V(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=P(u),j.pointerType=ae(u),j.target=y,j.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[B].downTime;var J=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&J<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return g(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}(Se),ba={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ba,n.defaults.actions.pointerEvents=ba.defaults,Q(n.actions.phaselessTypes,ba.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&&oo(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,y=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,B=qe(b),J={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},ke=0;ke<B.length;ke++){var $e=B[ke];J.node=$e,r.fire("pointerEvents:collect-targets",J)}if(J.targets.length){for(var Re=1/0,Ge=0,it=J.targets;Ge<it.length;Ge++){var at=it[Ge].eventable.options.holdDuration;at<Re&&(Re=at)}j.duration=Re,j.timeout=setTimeout(function(){qn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Re)}})(n,t),qn(n,t)},"interactions:up":function(n,t){oo(n),qn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||qn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){oo(n),qn(n,t)}},PointerEvent:Bo,fire:qn,collectEventTargets:Ao,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,y=n.type,b=n.targets,S=b===void 0?Ao(n,t):b,j=new Bo(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:j},J=0;J<S.length;J++){var ke=S[J];for(var $e in ke.props||{})j[$e]=ke.props[$e];var Re=re(ke.eventable,ke.node);if(j._subtractOrigin(Re),j.eventable=ke.eventable,j.currentTarget=ke.node,ke.eventable.fire(j),j._addOrigin(Re),j.immediatePropagationStopped||j.propagationStopped&&J+1<S.length&&S[J+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=j.double?qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return j}function Ao(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:j,targets:[],node:null},J=0;J<j.length;J++){var ke=j[J];B.node=ke,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function($e){var Re,Ge;return $e.eventable.options.holdDuration===((Re=o.pointers[b])==null||(Ge=Re.hold)==null?void 0:Ge.duration)})),B.targets}function oo(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ba});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ba);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)]=Ir,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 y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Q(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(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"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;Q(o.events.options,t.pointerEvents.defaults),Q(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,zr={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 y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var J=y[B],ke=r.getRect(J);if(!ke)return 1;var $e,Re=fe(f.interactions.list,function(at){return at.interacting()&&at.interactable===r&&at.element===J&&at.prepared.name===u.name});if(Re)Re.move(),S&&($e=Re._reflowPromise||new b(function(at){Re._reflowResolve=at}));else{var Ge=ce(ke),it=function(at){return{coords:at,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:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});$e=function(at,ht,yt,_t,mt){var kt=at.interactions.new({pointerType:"reflow"}),en={interaction:kt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};kt.interactable=ht,kt.element=yt,kt.prevEvent=mt,kt.updatePointer(mt,mt,yt,!0),Y(kt.coords.delta),Bt(kt.prepared,_t),kt._doPhase(en);var jt=at.window,cn=jt.Promise,Cn=cn?new cn(function(zn){kt._reflowResolve=zn}):void 0;return kt._reflowPromise=Cn,kt.start(_t,ht,yt),kt._interacting?(kt.move(en),kt.end(mt)):(kt.stop(),kt._reflowResolve()),kt.removePointer(mt,mt),Cn}(f,r,J,u,it)}S&&S.push($e)},B=0;B<y.length&&!j();B++);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))}}},Pr=zr;if(Zt.use($n),Zt.use(on),Zt.use(Mr),Zt.use(sn),Zt.use(Sr),Zt.use(Gn),Zt.use(et),Zt.use(vt),Zt.use(Pr),Zt.default=Zt,c(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(Da,Da.exports)),Da.exports}var gd=vd();const nl=fa.getDefaultExportFromCjs(gd),Qa=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(jl),x=e.inject(Kl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=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,V=NaN,O=NaN,W=NaN,De=-1,q=-1,K=-1,ie=-1,w=l.x,z=l.y,k=l.w,A=l.h;const T=e.ref(),le=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:nt});function Le(v){Ie(v)}function ot(){Xe()}function Be(v){un(l.isDraggable)&&(h.draggable=v)}function Ke(v){un(l.isResizable)&&(h.resizable=v)}function xe(v){un(l.isBounded)&&(h.bounded=v)}function I(v){h.transformScale=v}function te(v){h.rowHeight=v}function ee(v){h.maxRows=v}function he(){h.rtl=el()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(le),e.onBeforeMount(()=>{h.rtl=el()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Gl(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,un(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,un(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,un(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,tn(Ye)}),x.on("updateWidth",Le),x.on("compact",ot),x.on("setDraggable",Be),x.on("setResizable",Ke),x.on("setBounded",xe),x.on("setTransformScale",I),x.on("setRowHeight",te),x.on("setMaxRows",ee),x.on("directionchange",he),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Le),x.off("compact",ot),x.off("setDraggable",Be),x.off("setResizable",Ke),x.off("setBounded",xe),x.off("setTransformScale",I),x.off("setRowHeight",te),x.off("setMaxRows",ee),x.off("directionchange",he),x.off("setColNum",Ue),g.value&&(g.value.unset(),g.value=null),d.decreaseItem(le)}),i({state:h,wrapper:T});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,H=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),me=e.computed(()=>(h.draggable||h.resizable)&&!l.static),be=id("item"),ze=e.computed(()=>({[be.b()]:!0,[be.bm("resizable")]:H.value,[be.bm("static")]:l.static,[be.bm("resizing")]:h.isResizing,[be.bm("dragging")]:h.isDragging,[be.bm("transform")]:h.useCssTransforms,[be.bm("rtl")]:M.value,[be.bm("no-touch")]:st&&me.value})),Oe=e.computed(()=>[be.be("resizer"),M.value&&be.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{tn(C),tn(Y)}),e.watch(()=>h.draggable,()=>{tn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{tn(Y)}),e.watch(()=>h.rowHeight,()=>{tn(Ye),tn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{tn(Y),tn(Ye),tn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{tn(Y)}),e.watch(M,()=>{tn(Y),tn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),tn(Ye),tn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let L;h.useCssTransforms?M.value?L=ad(v.top,v.right,v.width,v.height):L=nd(v.top,v.left,v.width,v.height):M.value?L=ld(v.top,v.right,v.width,v.height):L=od(v.top,v.left,v.width,v.height),h.style=L}function qe(){const v={};for(const L of["width","height"]){const Z=h.style[L].match(/^(\d+)px$/);if(!Z)return;v[L]=Z[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const L=v.type;if(L==="resizestart"&&h.isResizing||L!=="resizestart"&&!h.isResizing)return;const Z=Qo(v);if(un(Z))return;const{x:P,y:ue}=Z,R={width:0,height:0};let X;switch(L){case"resizestart":{Y(),De=k,q=A,X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing=R,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&(O=P),!v.edges.top&&!v.edges.bottom&&(W=ue);const se=Zo(O,W,P,ue);M.value?R.width=h.resizing.width-se.deltaX/h.transformScale:R.width=h.resizing.width+se.deltaX/h.transformScale,R.height=h.resizing.height+se.deltaY/h.transformScale,h.resizing=R;break}case"resizeend":{X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}X=re(R.height,R.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),O=P,W=ue,(k!==X.w||A!==X.h)&&c("resize",l.i,X.h,X.w,R.height,R.width),v.type==="resizeend"&&(De!==k||q!==A)&&c("resized",l.i,X.h,X.w,R.height,R.width),x.emit("resizeEvent",v.type,l.i,w,z,X.h,X.w)}function Q(v){if(l.static||h.isResizing)return;const L=v.type;if(L==="dragstart"&&h.isDragging||L!=="dragstart"&&!h.isDragging)return;const Z=Qo(v);if(un(Z))return;const{x:P,y:ue}=Z,R=v.target;if(!R.offsetParent)return;const X={top:0,left:0};switch(L){case"dragstart":{K=w,ie=z;const ve=R.offsetParent.getBoundingClientRect(),$=R.getBoundingClientRect(),ae=$.left/h.transformScale,G=ve.left/h.transformScale,Se=$.right/h.transformScale,de=ve.right/h.transformScale,Ee=$.top/h.transformScale,F=ve.top/h.transformScale;M.value?X.left=(Se-de)*-1:X.left=ae-G,X.top=Ee-F,h.dragging=X,h.isDragging=!0;break}case"dragmove":{const ve=Zo(_,V,P,ue);if(M.value?X.left=h.dragging.left-ve.deltaX/h.transformScale:X.left=h.dragging.left+ve.deltaX/h.transformScale,X.top=h.dragging.top+ve.deltaY/h.transformScale,h.bounded){const $=R.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);X.top=oe(X.top,0,$);const ae=Pe(),G=h.containerWidth-ce(l.w,ae,h.margin[0]);X.left=oe(X.left,0,G)}h.dragging=X;break}case"dragend":{const ve=R.offsetParent.getBoundingClientRect(),$=R.getBoundingClientRect(),ae=$.left/h.transformScale,G=ve.left/h.transformScale,Se=$.right/h.transformScale,de=ve.right/h.transformScale,Ee=$.top/h.transformScale,F=ve.top/h.transformScale;M.value?X.left=(Se-de)*-1:X.left=ae-G,X.top=Ee-F,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let se;M.value,se=nt(X.top,X.left),_=P,V=ue,(w!==se.x||z!==se.y)&&c("move",l.i,se.x,se.y),v.type==="dragend"&&(K!==w||ie!==z)&&c("moved",l.i,se.x,se.y),x.emit("dragEvent",v.type,l.i,se.x,se.y,A,k)}function tt(v,L,Z,P){const ue=Pe();let R;return M.value?R={right:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*L+(L+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])}:R={left:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*L+(L+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])},R}function nt(v,L){const Z=Pe();let P=Math.round((L-h.margin[0])/(Z+h.margin[0])),ue=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return P=Math.max(Math.min(P,h.cols-k),0),ue=Math.max(Math.min(ue,h.maxRows-A),0),{x:P,y:ue}}function Pe(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,L,Z){return Number.isFinite(v)?Math.round(L*v+Math.max(0,v-1)*Z):v}function oe(v,L,Z){return Math.max(Math.min(v,Z),L)}function re(v,L,Z=!1){const P=Pe();let ue=Math.round((L+h.margin[0])/(P+h.margin[0])),R=0;return Z?R=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):R=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),ue=Math.max(Math.min(ue,h.cols-w),0),R=Math.max(Math.min(R,h.maxRows-z),0),{w:ue,h:R}}function Ie(v,L){h.containerWidth=v}function Xe(){Ye()}function dt(){!g.value&&T.value&&(g.value=nl(T.value),h.useStyleCursor||g.value.styleCursor(!1))}const m=Xo(Q);function C(){if(dt(),!!g.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};g.value.draggable(v),D||(D=!0,g.value.on("dragstart dragmove dragend",L=>{L.type==="dragmove"?m(L):Q(L)}))}else g.value.draggable({enabled:!1})}const U=Xo(lt);function Y(){if(dt(),!!g.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),L=tt(0,0,l.minW,l.minH),Z={edges:{left:M.value?`.${Oe.value[0]}`:!1,right:M.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:L.height*h.transformScale,width:L.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Z.modifiers=[nl.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(Z),E||(E=!0,g.value.on("resizestart resizemove resizeend",P=>{P.type==="resizemove"?U(P):lt(P)}))}else g.value.resizable({enabled:!1})}return(v,L)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(ze.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),H.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ia=typeof window<"u";var al;ia&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ol(a){return a!=null}function ll(){}const md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(md)));const yd=ia&&("ontouchstart"in window||kd()>0),bd=yd?"pointerdown":"click";function kd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function xd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ol(l)||l==="")return!1;let g;return ol(s)?g=new s(l,{bubbles:c,cancelable:d}):(g=document.createEvent("HTMLEvents"),g.initEvent(l,c,d)),Object.assign(g,x),a.dispatchEvent(g)}const wd="clickoutside",Dd=new Set;ia&&document.addEventListener(bd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Dd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&xd(l,{type:wd})})},!0);const Cd=[["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 Cd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Ed=new Set,_d=new WeakMap;if(ia&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Ed.forEach(s=>{s.value=!1}),document[a]){const s=_d.get(document[a]);s&&(s.value=!0)}},!1)}const Yl=new Map;Yl.set("x",0);Yl.set("y",0);var oa=[],Sd=function(){return oa.some(function(a){return a.activeTargets.length>0})},Td=function(){return oa.some(function(a){return a.skippedTargets.length>0})},rl="ResizeObserver loop completed with undelivered notifications.",Id=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:rl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=rl),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)},Bd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,la(this)}return a}(),Jl=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,g=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:g,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Do=function(a){return a instanceof SVGElement&&"getBBox"in a},Ql=function(a){if(Do(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)},il=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)},Ad=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},Sa=typeof window<"u"?window:{},La=new WeakMap,sl=/auto|scroll/,Nd=/^tb|vertical/,Vd=/msie|trident/i.test(Sa.navigator&&Sa.navigator.userAgent),Vn=function(a){return parseFloat(a||"0")},va=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Bd((s?i:a)||0,(s?a:i)||0)},cl=la({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Jl(0,0,0,0)}),Zl=function(a,i){if(i===void 0&&(i=!1),La.has(a)&&!i)return La.get(a);if(Ql(a))return La.set(a,cl),cl;var s=getComputedStyle(a),l=Do(a)&&a.ownerSVGElement&&a.getBBox(),c=!Vd&&s.boxSizing==="border-box",d=Nd.test(s.writingMode||""),x=!l&&sl.test(s.overflowY||""),g=!l&&sl.test(s.overflowX||""),h=l?0:Vn(s.paddingTop),D=l?0:Vn(s.paddingRight),E=l?0:Vn(s.paddingBottom),_=l?0:Vn(s.paddingLeft),V=l?0:Vn(s.borderTopWidth),O=l?0:Vn(s.borderRightWidth),W=l?0:Vn(s.borderBottomWidth),De=l?0:Vn(s.borderLeftWidth),q=_+D,K=h+E,ie=De+O,w=V+W,z=g?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-ie-a.clientWidth:0,A=c?q+ie:0,T=c?K+w:0,le=l?l.width:Vn(s.width)-A-k,Le=l?l.height:Vn(s.height)-T-z,ot=le+q+k+ie,Be=Le+K+z+w,Ke=la({devicePixelContentBoxSize:va(Math.round(le*devicePixelRatio),Math.round(Le*devicePixelRatio),d),borderBoxSize:va(ot,Be,d),contentBoxSize:va(le,Le,d),contentRect:new Jl(_,h,le,Le)});return La.set(a,Ke),Ke},er=function(a,i,s){var l=Zl(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}},Od=function(){function a(i){var s=Zl(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}(),tr=function(a){if(Ql(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Md=function(){var a=1/0,i=[];oa.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(g){var h=new Od(g.target),D=tr(g.target);x.push(h),g.lastReportedSize=er(g.target,g.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},ul=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()&&(tr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},zd=function(){var a=0;for(ul(a);Sd();)a=Md(),ul(a);return Td()&&Id(),a>0},io,nr=[],Pd=function(){return nr.splice(0).forEach(function(a){return a()})},Rd=function(a){if(!io){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Pd()}).observe(s,l),io=function(){s.textContent="".concat(i?i--:i++)}}nr.push(a),io()},Fd=function(a){Rd(function(){requestAnimationFrame(a)})},Ha=0,Ld=function(){return!!Ha},$d=250,jd={attributes:!0,characterData:!0,childList:!0,subtree:!0},pl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},so=!1,Kd=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=$d),!so){so=!0;var l=dl(i);Fd(function(){var c=!1;try{c=zd()}finally{if(so=!1,i=l-dl(),!Ld())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,jd)};document.body?s():Sa.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),pl.forEach(function(s){return Sa.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),pl.forEach(function(s){return Sa.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),fo=new Kd,fl=function(a){!Ha&&a>0&&fo.start(),Ha+=a,!Ha&&fo.stop()},Ud=function(a){return!Do(a)&&!Ad(a)&&getComputedStyle(a).display==="inline"},Wd=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=er(this.target,this.observedBox,!0);return Ud(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Hd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,hl=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 Hd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;hl(c.observationTargets,s)<0&&(d&&oa.push(c),c.observationTargets.push(new Wd(s,l&&l.box)),fl(1),fo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=hl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&oa.splice(oa.indexOf(l),1),l.observationTargets.splice(c,1),fl(-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}(),qd=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(!il(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(!il(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 Za=new WeakMap;function Gd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=Za.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:g}=((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:g??D}))}}}const ar=new(ia&&window.ResizeObserver||qd)(Gd);function vl(a,i){Za.set(a,i),ar.observe(a)}function gl(a){Za.has(a)&&(ar.unobserve(a),Za.delete(a))}function Xd(a={}){let i=ll;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(vl(c,a.onResize),i=()=>{gl(c),i=ll})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:vl,unobserveResize:gl,unobserve:l}}const Yd=e.ref(!1);e.computed(()=>Yd.value);const ml="__theme_style__",co="__theme_observer__",yl=e.reactive(new Map),bl=new Map;e.watch(yl,()=>{if(!ia)return;bl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${co} { width: 1px }`,l=1;for(const[c,[d,x]]of yl.entries())s+=` html.${d} .${co}, .${x} .${co} { width: ${++l}px }`,bl.set(l,c);i.textContent=s,i.id=ml,document.head.appendChild(i)});const or=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,g=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Xd(),_=Xp();_.on("resizeEvent",V),_.on("dragEvent",O),e.onBeforeMount(()=>{c("layout-before-mount",g.value)}),e.onMounted(()=>{c("layout-mounted",g.value),e.nextTick(()=>{rd(g.value),d.originalLayout=g.value,e.nextTick(()=>{Le(),h.value&&D(h.value,Yp(w,16)),pa(g.value,l.verticalCompact),c("layout-updated",g.value),ie(),w()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function V(Be,Ke,xe,I,te,ee){T(Be,Ke,xe,I,te,ee)}function O(Be,Ke,xe,I,te,ee){A(Be,Ke,xe,I,te,ee)}e.watch(()=>d.width,(Be,Ke)=>{e.nextTick(()=>{_.emit("updateWidth",Be),Ke===-1&&e.nextTick(()=>{c("layout-ready",g.value)}),ie()})}),e.watch(()=>[l.layout,l.layout.length],()=>{g.value=l.layout,K()}),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)),w()}),e.watch(()=>l.maxRows,Be=>{_.emit("setMaxRows",Be)}),e.watch([()=>l.margin,()=>l.margin[1]],ie),e.provide(jl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:W,decreaseItem:De})),e.provide(Kl,_),i({state:d,getItem:q,resizeEvent:T,dragEvent:A,layoutUpdate:K});function W(Be){x.set(Be.i,Be)}function De(Be){x.delete(Be.i)}function q(Be){return x.get(Be)}function K(){if(!un(g.value)&&!un(d.originalLayout)){if(g.value.length!==d.originalLayout.length){const Be=ot(g.value,d.originalLayout);if(Be.length>0)if(g.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Be);else{const Ke=new Set(Be.map(xe=>xe.i));d.originalLayout=d.originalLayout.filter(xe=>!Ke.has(xe.i))}d.lastLayoutLength=g.value.length,Le()}pa(g.value,l.verticalCompact),_.emit("updateWidth",d.width),ie(),c("layout-updated",g.value)}}function ie(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Be=parseFloat(l.margin[1]);return Qp(g.value)*(l.rowHeight+Be)+Be+"px"}let k;function A(Be,Ke,xe,I,te,ee){let he=Yo(g.value,Ke);un(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Be==="dragstart"&&!l.verticalCompact&&(k=g.value.reduce((Ue,{i:st,x:H,y:M})=>({...Ue,[st]:{x:H,y:M}}),{})),Be==="dragmove"||Be==="dragstart"?(d.placeholder.i=Ke,d.placeholder.x=he.x,d.placeholder.y=he.y,d.placeholder.w=ee,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),g.value=po(g.value,he,xe,I,!0,l.preventCollision),l.restoreOnDrag?(he.static=!0,pa(g.value,l.verticalCompact,k),he.static=!1):pa(g.value,l.verticalCompact),_.emit("compact"),ie(),Be==="dragend"&&(k=void 0,c("layout-updated",g.value))}function T(Be,Ke,xe,I,te,ee){let he=Yo(g.value,Ke);un(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Wl(g.value,{...he,w:ee,h:te}).filter(H=>H.i!==he.i);if(Ue=st.length>0,Ue){let H=1/0,M=1/0;st.forEach(me=>{me.x>he.x&&(H=Math.min(H,me.x)),me.y>he.y&&(M=Math.min(M,me.y))}),Number.isFinite(H)&&(he.w=H-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ue||(he.w=ee,he.h=te),Be==="resizestart"||Be==="resizemove"?(d.placeholder.i=Ke,d.placeholder.x=xe,d.placeholder.y=I,d.placeholder.w=he.w,d.placeholder.h=he.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Be&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&le(),pa(g.value,l.verticalCompact),_.emit("compact"),ie(),Be==="resizeend"&&c("layout-updated",g.value)}function le(){const Be=ud(l.breakpoints,d.width);if(Be===d.lastBreakpoint)return;const Ke=Gl(Be,l.cols);!un(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=uo(g.value));const xe=pd(d.originalLayout,d.layouts,l.breakpoints,Be,d.lastBreakpoint,Ke,l.verticalCompact);d.layouts[Be]=xe,d.lastBreakpoint!==Be&&c("breakpoint-changed",Be,xe),g.value=xe,c("update:layout",xe),d.lastBreakpoint=Be,_.emit("setColNum",Ke)}function Le(){d.layouts=Object.assign({},l.responsiveLayouts)}function ot(Be,Ke){const xe=new Set(Ke.map(he=>he.i)),I=new Set(Be.map(he=>he.i)),te=Be.filter(he=>!xe.has(he.i)),ee=Ke.filter(he=>!I.has(he.i));return te.concat(ee)}return(Be,Ke)=>(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(g.value,xe=>(e.openBlock(),e.createBlock(Qa,e.mergeProps({key:xe.i,ref_for:!0},xe),{default:e.withCtx(()=>[e.renderSlot(Be.$slots,"item",{item:xe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Qa,{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 Jd={key:0,class:"item-view-group"},Qd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=_e.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),g=e.computed(()=>{var _,V,O,W;return((_=d==null?void 0:d.children)==null?void 0:_.length)>0&&((V=d==null?void 0:d.children)!=null&&V.every(De=>De==null?void 0:De.layout))?(W=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:W.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),D=_=>{c("rowClick",_)},E=(_,V)=>{c("routeUrl",_,V)};return(_,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(or),{layout:x.value,"onUpdate:layout":V[0]||(V[0]=O=>x.value=O),"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,(O,W)=>(e.openBlock(),e.createBlock(e.unref(Qa),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var De,q,K,ie,w,z,k,A,T,le,Le,ot,Be;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:W===((De=d==null?void 0:d.children)==null?void 0:De.length)-1?"0px":"24px"})},[((K=(q=O==null?void 0:O.component)==null?void 0:q.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&((ie=O==null?void 0:O.component)!=null&&ie.name)?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(h.value.toString())-1)*12+"px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((w=O==null?void 0:O.component)==null?void 0:w.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(mo)((z=O==null?void 0:O.component)==null?void 0:z.comp)),{pageLayout:g.value,config:{showIndex:(k=e.unref(Et)[W])==null?void 0:k.showIndex,allowMove:(A=e.unref(Et)[W])==null?void 0:A.allowMove,viewport:(T=e.unref(Et)[W])==null?void 0:T.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(xo),itemData:(le=O==null?void 0:O.component)==null?void 0:le.compData,childItemData:(Le=O==null?void 0:O.component)==null?void 0:Le.itemChildData,key:e.unref(Ta),cacheNewData:e.unref(Ja),onChange:e.unref(yo),index:(O==null?void 0:O.id)??W,onContentChange:e.unref(bo),onPageChange:e.unref(ko),parentTableId:(ot=O==null?void 0:O.component)==null?void 0:ot.tableId,allMapContents:e.unref(go),children:(Be=O==null?void 0:O.component)==null?void 0:Be.children,level:h.value,onRowClick:D,onRouteUrl:E,onClickTrigger:e.unref(Ml),onClickMainKey:e.unref(zl)},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"])]))}}),Zd=Rt._export_sfc(Qd,[["__scopeId","data-v-da659b0f"]]),lr=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"}]),ef={TABLE:da.ssTable,FORM:Po,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ro,FOLD:tc,CALCULATOR:ic,METHODBUTTON:_c,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Po,STEP:Rc,STEPOPERATE:Hs,TIMELINE:Uc,TIMELINEOPERATE:Qs,FORMTOPOPERATE:Ro,SIGNATUREOPERATE:Mc,AVATARUPLOADOPERATE:Ic,TABS:qc,TABSOPERATE:Nu,CHART:Hu,CHARTOPERATE:ap,LAYOUT:Pp,LAYOUTOPERATE:Hp,PARENTITEM:Zd};function ga(a){return ef[a==null?void 0:a.toUpperCase()]||null}exports.De=or;exports.activeStepInfo=ha;exports.affixItems=bp;exports.allMapContents=go;exports.cacheNewData=Ja;exports.checkForTableContents=mc;exports.checkIsQuote=dc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=pc;exports.checkIsShowTable=vc;exports.checkIsTableCheck=uc;exports.checkIsUsingGroup=cc;exports.clickMainKey=zl;exports.clickSavePage=yp;exports.clickStep=Rl;exports.clickTrigger=Ml;exports.compId=Ta;exports.compNames=xo;exports.compShow=Ya;exports.contentTransArray=xa;exports.contentTransArrayToAll=Ca;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ho;exports.existLayouts=Tp;exports.formToExtraContent=gc;exports.generateLayouts=gs;exports.getComponent=ga;exports.getComponents=mo;exports.getExtraContents=bc;exports.getSliceContLength=Np;exports.gridRowHeight=ps;exports.isStepLayout=wo;exports.isUndefined=wl;exports.newContentTransArrayToAllNoExtra=hc;exports.onBack=gp;exports.onChange=yo;exports.onClick=mp;exports.onContentChange=bo;exports.onExtendTaskEnd=Sp;exports.onPageBack=Ip;exports.onPageChange=ko;exports.onSaveBack=Bl;exports.onSelectFixContent=vp;exports.renderShowItems=Nl;exports.showItems=Et;exports.sliceTableLength=Vl;exports.slotContent=lr;exports.st=Qa;exports.stepItems=Vp;exports.toolBar=Fn;exports.verifyButton=Bp;
1
+ "use strict";const da=require("./index-CvrlW6Kj.cjs"),e=require("vue"),p=require("./index-DEBf-IBT.cjs"),Tt=require("./index-vDXPLbzt.cjs"),_e=require("./index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs"),Xt=require("./index-Ci05kJVO.cjs"),No=require("./threeViewerHost-B2ROtL1I.cjs"),fa=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs"),Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Vo=require("./isString-D6Z6SOrb.cjs"),Oo=require("./index-CfKLvZ17.cjs"),kl=require("./index-BVaHwt5f.cjs"),Rr=require("./index-LcSS6r-3.cjs");var Fr=/\s/;function Lr(a){for(var i=a.length;i--&&Fr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Lr(a)+1).replace($r,"")}var Mo=NaN,Kr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function zo(a){if(typeof a=="number")return a;if(p.isSymbol(a))return Mo;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=jr(a);var s=Ur.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Kr.test(a)?Mo:+a}var lo=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function ho(a,i,s){var l,c,d,x,g,h,D=0,E=!1,_=!1,V=!0;if(typeof a!="function")throw new TypeError(qr);i=zo(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Gr(zo(s.maxWait)||0,i):d,V="trailing"in s?!!s.trailing:V);function O(A){var T=l,le=c;return l=c=void 0,D=A,x=a.apply(le,T),x}function W(A){return D=A,g=setTimeout(K,i),E?O(A):x}function De(A){var T=A-h,le=A-D,Le=i-T;return _?Xr(Le,d-le):Le}function q(A){var T=A-h,le=A-D;return h===void 0||T>=i||T<0||_&&le>=d}function K(){var A=lo();if(q(A))return ie(A);g=setTimeout(K,De(A))}function ie(A){return g=void 0,V&&l?O(A):(l=c=void 0,x)}function w(){g!==void 0&&clearTimeout(g),D=0,l=h=c=g=void 0}function z(){return g===void 0?x:ie(lo())}function k(){var A=lo(),T=q(A);if(l=arguments,c=this,h=A,T){if(g===void 0)return W(h);if(_)return clearTimeout(g),g=setTimeout(K,i),O(h)}return g===void 0&&(g=setTimeout(K,i)),x}return k.cancel=w,k.flush=z,k}var Yr="[object Boolean]";function xl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function wl(a){return a===void 0}const Jr={class:"form-content"},Qr={title:"选择标签"},Zr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__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,g.value=!1,h.value=[]},l=a;e.computed(()=>{var Z;const v=(Z=Ue.value)==null?void 0:Z.split("/");return(v==null?void 0:v.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:Be.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),g=e.ref(!1),h=e.ref([]);No.useThreeSystem();const D=e.ref(),E=e.ref(!1),_=e.ref(!1),V=e.ref([]),O=e.ref(),W=e.ref(!1),De=e.ref([]),q=da.useFormToTableComp(p.pinia),K=da.useFormComp(p.pinia),ie=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),T=e.ref(!0),le=_e.useModelComp(p.pinia),{tableViewContents:Le,itemData:ot,isEdit:Be,routeToChildPath:Ke,lockingPage:xe}=p.storeToRefs(le),I=e.ref(null),te=e.ref(!1),ee=e.ref(!1),he=_e.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(he),st=_e.useOriginalState(p.pinia),{originalPath:H}=p.storeToRefs(st),M=e.ref([]),me=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),be=async v=>{ee.value=v,await tt("disabled",null,v,!0)},ze=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Oe=()=>{e.nextTick(()=>{Q()})},Ye=v=>{var L;d.value=(L=d.value)==null?void 0:L.map(Z=>({...Z,isFormColHidden:!(v!=null&&v.includes(Z.label))}))};e.onUnmounted(()=>{I.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var L,Z,P,ue,R,X;if(v===""){let se="";(L=d.value)==null||L.forEach(G=>{G!=null&&G.isMain&&(se=G==null?void 0:G.value)});let ve=await _e.getItemData(Ke.value,sessionStorage.getItem("systemKey"),"");se=((X=(R=(ue=(P=(Z=ve==null?void 0:ve[0])==null?void 0:Z.compData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="mainRouters"))==null?void 0:ue.contents)==null?void 0:R[0])==null?void 0:X.routerContent)+H.value+se;let ae=await _e.getItemData(se,sessionStorage.getItem("systemKey"),"");W.value=!0,De.value=ae==null?void 0:ae.filter(G=>(G==null?void 0:G.comp)!=="methodButton"),c("routeUrl",De.value)}},Q=()=>{var L;const v=(L=I.value)==null?void 0:L.$el;v&&fa.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Z=>{const{oldIndex:P,newIndex:ue}=Z;if(P===ue)return;const R=d.value.splice(P,1)[0];d.value.splice(ue,0,R)}})},tt=async(v,L,Z,P=!1)=>{var ue,R,X,se,ve,$,ae,G;try{le.setRefreshCurStructure(!1);const Se=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((ue=Se==null?void 0:Se.data)==null?void 0:ue.code)===200){let de=(ve=(se=(X=(R=Se==null?void 0:Se.data)==null?void 0:R.result)==null?void 0:X[0])==null?void 0:se.value)==null?void 0:ve.pageData;P?de={...de,compData:(ae=de==null?void 0:de.compData)==null?void 0:ae.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"?{...F,contents:(fe=F==null?void 0:F.contents)==null?void 0:fe.map(ne=>({...ne,[v]:Z}))}:F})}:de={...de,compData:($=de==null?void 0:de.compData)==null?void 0:$.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"?{...F,contents:(fe=F==null?void 0:F.contents)==null?void 0:fe.map(ne=>(ne==null?void 0:ne.prop)===(L==null?void 0:L.prop)?{...ne,[v]:Z}:ne)}:F})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:de}});((G=Ee==null?void 0:Ee.data)==null?void 0:G.code)===200?(p.ElMessage.success("编辑成功"),le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},nt=async(v,L)=>{await tt("label",L,v)},Pe=async(v,L)=>{v&&await tt("type",L,v)},ce=async(v,L,Z)=>{await tt(L,Z,v,!1)},oe=(v,L)=>{A.value===L?T.value=!1:T.value=!0,A.value=L==null?void 0:L.changeProp},re=async v=>{var Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe;let L=[];if((Z=v==null?void 0:v.toString())!=null&&Z.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],g.value=!0,x.value=!0;return}if((P=v==null?void 0:v.toString())!=null&&P.includes(".stl")||(ue=v==null?void 0:v.toString())!=null&&ue.includes(".STL")||(R=v==null?void 0:v.toString())!=null&&R.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){h.value=(se=v==null?void 0:v.toString())==null?void 0:se.split(","),g.value=!1,x.value=!0;return}if((ve=v==null?void 0:v.toString())!=null&&ve.includes(".stl")||($=v==null?void 0:v.toString())!=null&&$.includes(".STL")||(ae=v==null?void 0:v.toString())!=null&&ae.includes(".obj")||(G=v==null?void 0:v.toString())!=null&&G.includes(".mtl")){let ne,Ae=[],Je={};if(Array.isArray(v)?ne=v:ne=v==null?void 0:v.split(","),ne==null||ne.forEach(Me=>{Me.includes(".mtl")?Ae.push(Me):Je.blob=Je.blob?Je.blob+","+Me:Me}),(Ae==null?void 0:Ae.length)>0&&(Je.mtlBlobs=Ae),(de=(Se=Object.values(Je))==null?void 0:Se[0])!=null&&de.includes("http:"))L.push(Je);else{const Me=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ve=URL.createObjectURL(Me),ge="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,je)=>{var ye;je===((ye=v==null?void 0:v.split("/"))==null?void 0:ye.length)-1&&(ge=ct)}),(F=Je.blob)!=null&&F.includes(".stl")&&(ge=(ge==null?void 0:ge.replaceAll(">",""))+".urdf"),O.value=[{name:ge,blobUrl:Ve}],_.value=!0}}else{const ne=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ae=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ne.close()}),Je=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(Je),Ve="";(fe=v==null?void 0:v.split("/"))==null||fe.forEach((ge,ct)=>{var je;ct===((je=v==null?void 0:v.split("/"))==null?void 0:je.length)-1&&(Ve=ge)}),O.value=[{name:Ve,blobUrl:Me}],_.value=!0}(L==null?void 0:L.length)>0&&K.setBlobUrls(L)},Ie=()=>{_.value=!1},Xe=v=>{var R,X,se,ve;const L=(X=(R=p.cloneDeep(l.itemData))==null?void 0:R.find($=>($==null?void 0:$.key)==="formContent"))==null?void 0:X.contents,Z=p.cloneDeep(v.content);let P={};Z&&((se=Object.values(Z))==null?void 0:se.length)>0&&((ve=Object.values(Z))==null||ve.forEach(($,ae)=>{P[L[ae].key]=$}));const ue={content:P,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",ue)},dt=e.computed(()=>"http://222.92.178.198:62001"),m=async v=>{var Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe;if(!v)return;(de=(Se=l==null?void 0:l.itemData)==null?void 0:Se.find(pe=>(pe==null?void 0:pe.key)==="parentFormPath"))==null||de.contents;let L=Le.value;(L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(pe=>{var Fe,We,N,Ce;let Ne=(Fe=pe==null?void 0:pe.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Ne==null?void 0:Ne[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ne==null?void 0:Ne[1]))&&(pe.value=(Ce=(N=d.value)==null?void 0:N.find(ut=>(ut==null?void 0:ut.prop)===(Ne==null?void 0:Ne[1])))==null?void 0:Ce.value),pe}),le.setTableViewContents(L));const Z=p.cloneDeep(l.itemData);let P=Z==null?void 0:Z.map(pe=>{var Ne;return(pe==null?void 0:pe.key)==="formContent"&&((Ne=pe.contents)==null||Ne.map((Fe,We)=>{var N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Kt,Ft;return Fe.type=(Ce=(N=d.value)==null?void 0:N.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ce.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ft=(et=(ut=Fe==null?void 0:Fe.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=da.formGetOptions((Te=(rt=Fe==null?void 0:Fe.key)==null?void 0:rt.split("$"))==null?void 0:Te[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Fe==null?void 0:Fe.key)!=null&&pt.includes("$")&&(Fe.key=(It=(vt=Fe==null?void 0:Fe.key)==null?void 0:vt.split("$"))==null?void 0:It[0]),Fe.signature=(xt=(Bt=d.value)==null?void 0:Bt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:xt.signature,Fe.isLoginUser=(Ot=(wt=d.value)==null?void 0:wt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ot.isLoginUser,Fe.value=(At=Object.values(v))==null?void 0:At[We],Fe.isFormColHidden=(Ft=(Kt=d.value)==null?void 0:Kt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ft.isFormColHidden,Fe})),pe}),ue=d.value,R=(F=(Ee=p.cloneDeep(P))==null?void 0:Ee.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:F.contents;if(ue=ue==null?void 0:ue.map(pe=>{var Ne;return pe.value=(Ne=R==null?void 0:R.find((Fe,We)=>((Fe==null?void 0:Fe.id)??We)===(pe==null?void 0:pe.id)))==null?void 0:Ne.value,pe}),!T.value){c("contentChange",{contents:P,index:l.index});return}let X="",se=(Ae=(ne=(fe=p.cloneDeep(P))==null?void 0:fe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ne.contents)==null?void 0:Ae.find((pe,Ne)=>{var Fe,We,N;return(pe==null?void 0:pe.label)===A.value||Ne.toString()===((N=(We=(Fe=A.value)==null?void 0:Fe.split("t"))==null?void 0:We[1])==null?void 0:N.toString())}),ve=(Je=se==null?void 0:se.optionUrl)==null?void 0:Je.menuSelect,$=!0;if((ge=(Ve=(Me=p.cloneDeep(P))==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:Ve.contents)==null||ge.forEach(pe=>{var Ne,Fe,We,N,Ce,ut;$&&((We=(Fe=(Ne=pe==null?void 0:pe.optionUrl)==null?void 0:Ne.groupSelect)==null?void 0:Fe[1])!=null&&We.includes("["))&&(X=(Ce=(N=pe==null?void 0:pe.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1],JSON.stringify(ve)===JSON.stringify((ut=pe==null?void 0:pe.optionUrl)==null?void 0:ut.menuSelect)&&($=!1))}),(ct=se==null?void 0:se.optionUrl)!=null&&ct.menuSelect&&T.value){let pe=await da.getSelectRow(se),Ne,Fe=(je=se==null?void 0:se.optionUrl)==null?void 0:je.menuSelect;if(pe==null||pe.forEach(We=>{var N,Ce,ut,et,ft,rt,Te,Ze,He,pt;X===((Ce=(N=se==null?void 0:se.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=se==null?void 0:se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Te=(rt=se==null?void 0:se.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Te[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(se==null?void 0:se.value)&&(Ne=We)}),Ne){let We=p.cloneDeep(ue);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt;return(Ne!=null&&Ne[Ce==null?void 0:Ce.label]||Ne!=null&&Ne[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Te=Ce==null?void 0:Ce.optionUrl)==null?void 0:Te.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Fe!=null&&Fe.every(xt=>{var wt,Ot;return(Ot=(wt=Ce==null?void 0:Ce.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:Ot.includes(xt)})&&(Ce.value=(Ne==null?void 0:Ne[Ce==null?void 0:Ce.label])||(Ne==null?void 0:Ne[(Bt=(It=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(xt=>(xt==null?void 0:xt.url)&&(xt==null?void 0:xt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let N=p.cloneDeep(We);N=N==null?void 0:N.map(Ce=>{var ut,et,ft,rt,Te,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Te=Ce==null?void 0:Ce.optionUrl)==null?void 0:Te.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,It,Bt;if(He!=null&&He.includes("[")){let xt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(Bt=(It=p.cloneDeep(We))==null?void 0:It.find(wt=>(wt==null?void 0:wt.label)===xt))==null?void 0:Bt.value}return He})),Ce}),d.value=N}else d.value=ue;P=P==null?void 0:P.map(We=>{var N;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(N=We.contents)==null?void 0:N.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Te=>(Te==null?void 0:Te.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Te=>(Te==null?void 0:Te.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}T.value=!1,c("contentChange",{contents:P,index:l.index});let ae=[],G=[];if((we=p.cloneDeep((ye=P==null?void 0:P.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ye.contents))==null||we.forEach(pe=>{var Ne;Array.isArray(pe==null?void 0:pe.value)&&((Ne=pe==null?void 0:pe.value)!=null&&Ne.find(Fe=>{var We;return(We=Fe==null?void 0:Fe.url)==null?void 0:We.includes(".obj")}))&&(G=pe==null?void 0:pe.value)}),(G==null?void 0:G.length)>0){const pe=(Qe=p.cloneDeep(G))==null?void 0:Qe.filter(Ne=>{var Fe;return(Fe=Ne==null?void 0:Ne.url)==null?void 0:Fe.includes(".obj")});pe==null||pe.forEach(Ne=>{var We,N,Ce,ut;const Fe=(We=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);ae.push({objUrl:Ne==null?void 0:Ne.url,mtlUrls:((N=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:N.length)===1?(ut=(Ce=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ne==null?void 0:Ne.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Fe})}),K.setObjUrl(ae)}},C=v=>{if(!v)return;const L=[];let Z="";for(let P of v)(P.includes("[")||Z.includes("["))&&(Z+=P.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&&(L.push(Z.replace(/\/\*[\s\S]*?\*\//g,"")),Z=""));return L},U=(v,L,Z)=>{let P="";const ue=L==null?void 0:L.map(R=>{var X;return(X=R==null?void 0:R.value)==null?void 0:X.pageData});return ue==null||ue.forEach(R=>{var X;(R==null?void 0:R.name)===(v==null?void 0:v[0])&&((X=R==null?void 0:R.compData)==null||X.forEach(se=>{var ve;(se==null?void 0:se.key)==="formContent"&&((ve=se==null?void 0:se.contents)==null||ve.forEach($=>{var ae;($==null?void 0:$.prop)===(v==null?void 0:v[1])&&(P=($==null?void 0:$.value)===""?_e.judgeContents((ae=p.cloneDeep($))==null?void 0:ae.optionUrl,Z):$==null?void 0:$.value)}))}))}),P},Y=(v,L,Z,P)=>{var se,ve;let ue="",R="";(se=p.cloneDeep(L))==null||se.forEach(($,ae)=>{$!=null&&$.includes("[")?R=R+H.value+v[ae]:R=R===""?R+$:R+"/"+$});let X=(ve=P[R])==null?void 0:ve.map($=>{var ae;return(ae=$==null?void 0:$.value)==null?void 0:ae.pageData});return X==null||X.forEach($=>{var ae;($==null?void 0:$.name)===(Z==null?void 0:Z[0])&&((ae=$==null?void 0:$.compData)==null||ae.forEach(G=>{var Se;(G==null?void 0:G.key)==="formContent"&&((Se=G==null?void 0:G.contents)==null||Se.forEach(de=>{(de==null?void 0:de.prop)===(Z==null?void 0:Z[1])&&(ue=de==null?void 0:de.value)}))}))}),ue};return e.watch(()=>l.itemData,async()=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je;const v=(X=l.itemData)==null?void 0:X.find(ye=>(ye==null?void 0:ye.key)==="formContent"),L=(se=p.cloneDeep(l.itemData))==null?void 0:se.find(ye=>(ye==null?void 0:ye.key)==="formButton"),Z=(ve=p.cloneDeep(l.itemData))==null?void 0:ve.find(ye=>(ye==null?void 0:ye.key)==="formFlex"),P=($=p.cloneDeep(l.itemData))==null?void 0:$.find(ye=>(ye==null?void 0:ye.key)==="formWrap"),ue=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(ye=>(ye==null?void 0:ye.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?E.value=!1:E.value=!0,ie.value=(ue==null?void 0:ue.contents)===void 0?!1:ue==null?void 0:ue.contents,w.value=typeof(Z==null?void 0:Z.contents)!="boolean"?!(!(Z!=null&&Z.contents)===""||((G=Z==null?void 0:Z.contents)==null?void 0:G.toUpperCase())==="VERTICAL"):Z==null?void 0:Z.contents,((Se=v==null?void 0:v.contents)==null?void 0:Se.length)>0&&Array.isArray(v==null?void 0:v.contents)){let ye=l.allMapContents;const we=(Ee=(de=p.cloneDeep(v))==null?void 0:de.contents)==null?void 0:Ee.map((N,Ce)=>{var xt,wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn,vn,Gn,Xn,Yn,$n,In,gn,Mn,Bn,nn,Dn;let ut=(N==null?void 0:N.label)??(N==null?void 0:N.key)??"",et=(N==null?void 0:N.type)??"",ft=(N==null?void 0:N.options)??[];if((xt=N==null?void 0:N.key)!=null&&xt.includes("$")&&(ut=(wt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:wt[0],((At=(Ot=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ot[1])==null?void 0:At.length)>0)){const[bt,Yt]=(Ft=(Kt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Kt[1])==null?void 0:Ft.split(/[()]/);et=((Vt=_e.FormType.find(gt=>(gt==null?void 0:gt.key)===bt))==null?void 0:Vt.value)??"",((Ht=Yt==null?void 0:Yt.split(","))==null?void 0:Ht.length)>0&&(ft=(xn=Yt==null?void 0:Yt.split(","))==null?void 0:xn.map(gt=>({label:gt,value:gt})))}let rt=[];N!=null&&N.contents&&!Array.isArray(N==null?void 0:N.contents)&&(rt=(wn=(dn=N==null?void 0:N.contents)==null?void 0:dn.split(","))==null?void 0:wn.map(bt=>({label:bt,value:bt}))),((_n=N==null?void 0:N.optionUrl)==null?void 0:_n.selectRelateType)==="自定义绑定"&&(rt=(Sn=(fn=N==null?void 0:N.optionUrl)==null?void 0:fn.defaultSelect)==null?void 0:Sn.map(bt=>({label:bt,value:bt})));let Te=!1,Ze=(N==null?void 0:N.isFormColHidden)??!1,He=_e.judgeContents((hn=p.cloneDeep(N))==null?void 0:hn.optionUrl,ye),pt=He!==void 0&&He!==""?He:N!=null&&N.originalContent&&(N==null?void 0:N.originalContent)!==""?N.originalContent:N!=null&&N.value?N.value:(ft==null?void 0:ft.length)>0?(Tn=ft==null?void 0:ft[0])==null?void 0:Tn.value:(N==null?void 0:N.value)??"",vt=!1,It=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url))))&&(It="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.isLoginUser)Te=!0,pt=((vn=k.value)==null?void 0:vn.姓名)||((Gn=k.value)==null?void 0:Gn.account)||((Xn=k.value)==null?void 0:Xn.账号)||((Yn=k.value)==null?void 0:Yn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.signature||N!=null&&N.isShow)if(vt=!0,(N==null?void 0:N.isShow)==="originalSignature")It="image",pt=dt.value+"/"+(($n=k.value)==null?void 0:$n.signature);else{let bt=[...new Set(C(N.isShow))].map(Mt=>{var An,an,Nn,Qt;return{key:(Qt=(Nn=(an=(An=Mt==null?void 0:Mt.split("["))==null?void 0:An[1])==null?void 0:an.split("]"))==null?void 0:Nn[0])==null?void 0:Qt.split(":"),value:""}});(In=ot.value)==null||In.forEach(Mt=>{bt==null||bt.forEach((mn,An)=>{var Nn;let an=mn==null?void 0:mn.key;(Mt==null?void 0:Mt.name)===(an==null?void 0:an[0].replaceAll("'",""))&&((Nn=Mt==null?void 0:Mt.compData)==null||Nn.forEach(Qt=>{var jn;(Qt==null?void 0:Qt.key)==="formContent"&&((jn=Qt==null?void 0:Qt.contents)==null||jn.forEach(yn=>{(yn==null?void 0:yn.prop)===(an==null?void 0:an[1].replaceAll("'",""))&&(bt[An].value=yn==null?void 0:yn.value)}))}))})});let Yt=bt==null?void 0:bt.map(Mt=>{var mn;return Mt.key="["+((mn=Mt.key)==null?void 0:mn.join(":"))+"]",Mt}),gt=N==null?void 0:N.isShow;Yt==null||Yt.forEach(Mt=>{Mt!=null&&Mt.value?gt=gt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):gt=gt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((gn=gt==null?void 0:gt.split("==="))==null?void 0:gn[0])+"==='"+((Mn=gt==null?void 0:gt.split("==="))==null?void 0:Mn[1])+"'":gt=((Bn=gt==null?void 0:gt.split("="))==null?void 0:Bn[0])+"='"+((nn=gt==null?void 0:gt.split("="))==null?void 0:nn[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 }`)()?(Ze=!1,It="image",pt=dt.value+"/"+((Dn=k.value)==null?void 0:Dn.signature)):pt=""}return Array.isArray(pt)&&pt.every(bt=>(bt==null?void 0:bt.url)&&(bt==null?void 0:bt.name))&&(N.type="Upload"),N!=null&&N.isMainUrl&&(It="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(N==null?void 0:N.key),type:It,value:N!=null&&N.isNewDate&&pt===""?new Date:pt,id:(N==null?void 0:N.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(N==null?void 0:N.width)??1,isLoginUser:Te,config:N==null?void 0:N.config,optionUrl:(N==null?void 0:N.optionUrl)??N,isFormColHidden:Ze,signature:vt,isMain:N==null?void 0:N.isMain,isMainUrl:N==null?void 0:N.isMainUrl,operable:(N==null?void 0:N.operable)??!1,disabled:(N==null?void 0:N.disabled)??!1}}),Qe=we==null?void 0:we.map(N=>N==null?void 0:N.value);let pe="";Qe==null||Qe.forEach(N=>{N!==""&&N!==void 0&&(pe=pe===""?N:pe+"/"+N)}),q.setSelectArray(Qe),q.setSelectString(pe);let Ne=(F=p.cloneDeep(we))==null?void 0:F.map(N=>(N!=null&&N.value&&_e.IsJson(N==null?void 0:N.value)&&Array.isArray(JSON.parse(N==null?void 0:N.value))&&(N.value=JSON.parse(N.value)),N));Ne=Ne==null?void 0:Ne.map(N=>{var Ce,ut,et,ft,rt,Te,Ze,He;if((ut=(Ce=N==null?void 0:N.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";N.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(N))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,N.optionUrl.menuSelect=(Te=(rt=N==null?void 0:N.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Te.map(vt=>{var It,Bt,xt,wt,Ot,At;if(vt!=null&&vt.includes("[")){let Kt=(Bt=(It=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Bt[1];pt=U((xt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),ye==null?void 0:ye[Ue.value],ye),vt=((Ot=(wt=p.cloneDeep(Ne))==null?void 0:wt.find(Ft=>(Ft==null?void 0:Ft.label)===Kt))==null?void 0:Ot.value)||U((At=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),ye==null?void 0:ye[Ue.value],ye)}return vt}),pt!==""&&N.value===""&&(N.value=Y(N.optionUrl.menuSelect,N.optionUrl.oldMenuSelect,(Ze=N==null?void 0:N.optionUrl)==null?void 0:Ze.groupSelect,ye),Array.isArray(N.value)&&((He=N.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(N.type="UPLOAD"))}return N}),d.value=Ne,ee.value=((fe=d.value)==null?void 0:fe.every(N=>N==null?void 0:N.disabled))||xe.value===Ue.value,te.value=(ne=d.value)==null?void 0:ne.every(N=>N==null?void 0:N.operable),M.value=(Ae=d.value)==null?void 0:Ae.map(N=>N==null?void 0:N.label);let Fe=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(N=>{var Ce;Array.isArray(N==null?void 0:N.value)&&((Ce=N==null?void 0:N.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=N==null?void 0:N.value)}),(We==null?void 0:We.length)>0){const N=(Me=p.cloneDeep(We))==null?void 0:Me.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});N==null||N.forEach(Ce=>{var et,ft,rt,Te;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Fe.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Te=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Te.url:ut})}),K.setObjUrl(Fe)}(Ve=p.cloneDeep(d.value))==null||Ve.forEach(N=>{var Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt;if((ut=(Ce=N==null?void 0:N.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=N==null?void 0:N.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Te=(rt=N==null?void 0:N.value)==null?void 0:rt.toString())!=null&&Te.includes(".obj")||(He=(Ze=N==null?void 0:N.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=N==null?void 0:N.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let wt={},Ot=[],At;Array.isArray(N==null?void 0:N.value)?At=N==null?void 0:N.value:At=(It=N==null?void 0:N.value)==null?void 0:It.split(","),At==null||At.forEach(Kt=>{Kt.includes(".mtl")?Ot.push(Kt):wt.blob=wt.blob==="undefined"?Kt:wt.blob+","+Kt}),(Ot==null?void 0:Ot.length)>0&&(wt.mtlBlobs=Ot),(xt=(Bt=Object.values(wt))==null?void 0:Bt[0])!=null&&xt.includes("http:")}})}else d.value=[];let R=Le.value;if((R==null?void 0:R.length)>0&&(R=R==null?void 0:R.map(ye=>{var Qe,pe,Ne,Fe;let we=(Qe=ye==null?void 0:ye.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(we==null?void 0:we[0])&&(pe=d.value)!=null&&pe.find(We=>(We==null?void 0:We.prop)===(we==null?void 0:we[1]))&&(ye.value=(Fe=(Ne=d.value)==null?void 0:Ne.find(We=>(We==null?void 0:We.prop)===(we==null?void 0:we[1])))==null?void 0:Fe.value),ye}),le.setTableViewContents(R)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let ye={};(ge=p.cloneDeep(d).value)==null||ge.forEach(we=>{(we==null?void 0:we.isMain)===!0&&(ye[(we==null?void 0:we.prop)??(we==null?void 0:we.name)]=[{required:!0,message:`${(we==null?void 0:we.prop)||(we==null?void 0:we.name)}不能为空`}])}),D.value=ye}if(((ct=L==null?void 0:L.contents)==null?void 0:ct.length)>0){const ye=[];(je=L==null?void 0:L.contents)==null||je.forEach((we,Qe)=>{(we==null?void 0:we.label)!==""&&ye.push({label:(we==null?void 0:we.label)??"",id:(we==null?void 0:we.id)??Qe,type:(we==null?void 0:we.type)??"",background:we==null?void 0:we.background})}),V.value=ye}else V.value=[]},{deep:!0,immediate:!0}),e.watch(()=>xe.value,v=>{ee.value=v===Ue.value},{immediate:!0}),(v,L)=>{const Z=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),ue=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-popover"),X=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Tt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:V.value,isRowFlex:!1,isEnableWrap:ie.value,onOnButtonClick:Xe,onChange:m,formDisabled:ee.value,formLabelsOperable:te.value,isButtonRow:E.value,onPreview:re,onBlurChange:oe,onHandleColEditChange:nt,onHandleColTypeChange:Pe,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:se,formDisabled:ve,formLabelsOperable:$})=>[e.createVNode(R,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Oe},{reference:e.withCtx(()=>[e.createElementVNode("span",Qr,[e.createVNode(Z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Zr,[L[1]||(L[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":ve,"active-text":"禁用","inactive-text":"",onChange:be,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:ze},null,8,["model-value"]),L[2]||(L[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(X,{modelValue:M.value,"onUpdate:modelValue":L[0]||(L[0]=ae=>M.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:I,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(ue,{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(R,{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 G;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=Object.keys(ae))==null?void 0:G.filter(Se=>{var de;return(de=me.value)==null?void 0:de.find(Ee=>(Ee==null?void 0:Ee.value)===Se)}),Se=>{var de,Ee;return e.openBlock(),e.createElementBlock("div",{key:Se},[e.createVNode(Tt._sfc_main$1,{value:ae==null?void 0:ae[Se],"active-text":(Ee=(de=me.value)==null?void 0:de.find(F=>(F==null?void 0:F.value)===Se))==null?void 0:Ee.label,inactiveText:"",onChange:F=>ce(F,Se,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[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"]),_.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:O.value,onDestroy:Ie},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{"file-urls":h.value,isThreeScene:g.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Po=Rt._export_sfc(ni,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),Dl=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:Dl(l==null?void 0:l.children)},l))},ai=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:Dl(l==null?void 0:l.children)},l))},Cl=(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=Cl(l==null?void 0:l.children,i),l)),a)},El=(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=El(l==null?void 0:l.children,i),l)),a)},_l=(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=_l(l==null?void 0:l.children,i),l)),a)},Sl=(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=Sl(l==null?void 0:l.children,i),l)),a)},St=[{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"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__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=_e.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{l("fixChange",p.cloneDeep(w))},O=w=>{l("deleteChange",p.cloneDeep(w))},W=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},De=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},q=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="id"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Le=>(Le==null?void 0:Le.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},K=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},ie=w=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(A.label),1),e.createElementVNode("div",ui,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>W(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>ie(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Tl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:O,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:q},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Rt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__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=_e.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{l("fixChange",p.cloneDeep(w))},V=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},O=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},W=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},De=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="idChild"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Le=>(Le==null?void 0:Le.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},q=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},K=w=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,le)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(T.label),1),e.createElementVNode("div",bi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>O(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>V(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>K(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:ie,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(A,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Rt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},zi={class:"fix-button"},Pi={class:"operate-title"},Ri={class:"operate-content"},Fi={class:"fix-content"},Li={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ki={class:"operate-content"},Ui={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Qi={class:"dialog-footer"},Zi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__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),g=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),V=e.ref(""),O=e.ref(""),W=e.ref([]),De=e.ref([]),q=e.ref([]),K=e.ref([]),ie=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),le=e.ref([]),Le=()=>{ie.value=!0;let m=[];Pn==null||Pn.forEach(C=>{k.value++,m.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})}),w.value=m,z.value=m},ot=()=>{var C,U,Y;x.value=!0;let m=[];(Y=(U=(C=_e.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:U.value)==null||Y.forEach(v=>{k.value++,m.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=m,T.value=m},Be=m=>{m||(A.value=T.value)},Ke=async m=>{var C,U,Y,v,L,Z,P,ue,R,X,se,ve;if((m==null?void 0:m.类型)!==((U=(C=T.value)==null?void 0:C.find($=>($==null?void 0:$.label)==="类型"))==null?void 0:U.value)){let $=[],ae=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:v.value)==null?void 0:L.value)?await((X=(R=(ue=_e.FormContent)==null?void 0:ue.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=_e.FormContent)==null?void 0:Z.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:P.value;if(ae==null||ae.forEach(G=>{k.value++,$.push({label:G==null?void 0:G.label,name:(G==null?void 0:G.name)||(G==null?void 0:G.label),type:G.type,value:G!=null&&G.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[G.label])??"",id:k.value,contents:G==null?void 0:G.options,prop:(G==null?void 0:G.prop)||(G==null?void 0:G.name)||(G==null?void 0:G.label)})}),m!=null&&m.菜单选项&&((se=m==null?void 0:m.菜单选项)==null?void 0:se.length)>0){const G=await _e.menuToContentType(m==null?void 0:m.菜单选项);$=$==null?void 0:$.map(Se=>((Se==null?void 0:Se.name)==="组信息选项"&&(Se.contents=G),Se))}T.value=await _e.selectToBase(p.cloneDeep($)),A.value=await _e.selectToBase(p.cloneDeep($))}else{let $=p.cloneDeep(A.value);if($=$==null?void 0:$.map(ae=>(ae.value=m==null?void 0:m[ae.name],ae)),m!=null&&m.菜单选项&&((ve=m==null?void 0:m.菜单选项)==null?void 0:ve.length)>0){const ae=await _e.menuToContentType(m==null?void 0:m.菜单选项);$=$==null?void 0:$.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ae),G))}$=_e.formToOptionsContents($),T.value=await _e.selectToBase(p.cloneDeep($))}},xe=async m=>{await Ke(m),A.value=T.value},I=(m,C)=>{if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.selectRelateType)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.menuSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.groupSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(C==null?void 0:C.value)||C[m.key];if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const U=C[m.key];return xl(U)?U:m.default}return(m==null?void 0:m.label)==="类型"&&C[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!C[m.key]?!1:C[m.key]},te=async m=>{var Y,v,L,Z,P,ue,R,X,se;x.value=!0;let C=[];const U=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:v.value)==null?void 0:L.value)?await((X=(R=(ue=_e.FormContent)==null?void 0:ue.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=_e.FormContent)==null?void 0:Z.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:P.value;if(U==null||U.forEach(ve=>{k.value++,C.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):I(ve,m),id:k.value,contents:ve==null?void 0:ve.options})}),m!=null&&m.menuSelect&&((se=m==null?void 0:m.menuSelect)==null?void 0:se.length)>0){const ve=await _e.menuToContentType(m==null?void 0:m.menuSelect);C=C==null?void 0:C.map($=>(($==null?void 0:$.name)==="组信息选项"&&($.contents=ve),$))}V.value=m==null?void 0:m.id,A.value=await _e.selectToBase(_e.formToOptionsContents(C)),T.value=await _e.selectToBase(_e.formToOptionsContents(C))},ee=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;le.value=(C=p.cloneDeep(le.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=le.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{x.value=!1,A.value=[],V.value=""},Ue=async()=>{var Y,v,L,Z,P,ue,R,X,se,ve;A.value=T.value;let m={};V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value);let C=await((L=(v=(Y=_e.FormContent)==null?void 0:Y.find($=>{var ae,G;return($==null?void 0:$.key)===(((G=(ae=A.value)==null?void 0:ae.find(Se=>(Se==null?void 0:Se.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:v.value)==null?void 0:L.value)??((P=(Z=_e.FormContent)==null?void 0:Z.find($=>{var ae,G;return($==null?void 0:$.key)===(((G=(ae=A.value)==null?void 0:ae.find(Se=>(Se==null?void 0:Se.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:P.value);if((ue=A.value)==null||ue.forEach($=>{const ae=C==null?void 0:C.find(G=>(G==null?void 0:G.label)===($==null?void 0:$.label));ae&&(m[ae.key]=$.value)}),m.name=m.label,(R=le.value)!=null&&R.find($=>$.id===m.id))le.value=(X=le.value)==null?void 0:X.map($=>($.id===m.id&&($=m),$));else{let $=p.cloneDeep(le.value);le.value||(le.value=[]),$.push(m),le.value=$}le.value=le.value.map(({id:$,...ae})=>ae),x.value=!1,V.value="";let U=p.cloneDeep(s.originalItemContents);(se=p.cloneDeep(s.originalItemContents))!=null&&se.find($=>($==null?void 0:$.key)==="tableToForm")?U=(ve=p.cloneDeep(s.originalItemContents))==null?void 0:ve.map($=>(($==null?void 0:$.key)==="tableToForm"&&($.contents=le.value),$)):U.push({key:"tableToForm",contents:le.value}),l("change",U)},st=m=>{ie.value=!0;let C=[];Pn==null||Pn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:k.value,contents:U==null?void 0:U.options})}),V.value=m==null?void 0:m.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,U;let m=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?m=(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):m.push({key:"page",contents:E.value}),l("change",m)},{deep:!0});const H=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;De.value=(C=p.cloneDeep(De.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=De.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var U,Y,v,L,Z;w.value=z.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=w.value)==null||U.forEach(P=>{const ue=Pn==null?void 0:Pn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=De.value)!=null&&Y.find(P=>P.id===m.id))De.value=(v=De.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(De.value)??[];P.push(m),De.value=P}ie.value=!1,V.value="";let C=p.cloneDeep(s.originalItemContents);(L=p.cloneDeep(s.originalItemContents))!=null&&L.find(P=>(P==null?void 0:P.key)==="extraButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="extraButton"&&(P.contents=De.value),P)):C.push({key:"extraButton",contents:De.value}),l("change",C)},me=m=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),z.value=C},be=()=>{ie.value=!1,w.value=[],V.value=""},ze=m=>{h.value=!0;let C=[];Rn==null||Rn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:k.value,contents:U==null?void 0:U.options})}),V.value=m==null?void 0:m.id,q.value=C,K.value=C},Oe=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;W.value=(C=p.cloneDeep(W.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=W.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let m=[];St==null||St.forEach(C=>{k.value++,m.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=m,_.value=m},qe=()=>{h.value=!0;let m=[];Rn==null||Rn.forEach(C=>{k.value++,m.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})}),q.value=m,K.value=m},lt=m=>{let C=p.cloneDeep(K.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),K.value=C},Q=()=>{var U,Y,v,L,Z;q.value=K.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=q.value)==null||U.forEach(P=>{const ue=Rn==null?void 0:Rn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=W.value)!=null&&Y.find(P=>P.id===m.id))W.value=(v=W.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(W.value);P.push(m),W.value=P}h.value=!1,V.value="";let C=p.cloneDeep(s.originalItemContents);(L=p.cloneDeep(s.originalItemContents))!=null&&L.find(P=>(P==null?void 0:P.key)==="rowButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="rowButton"&&(P.contents=W.value),P)):C.push({key:"rowButton",contents:W.value}),l("change",C)},tt=()=>{h.value=!1,V.value="",K.value=[],q.value=[]},nt=m=>{d.value=!0;let C=[];St==null||St.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:k.value,contents:U==null?void 0:U.options})}),D.value=C,O.value=m==null?void 0:m.id,_.value=C},Pe=m=>{var C;g.value=Cl(p.cloneDeep(g.value),m==null?void 0:m.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(U=>{var Y;return(U==null?void 0:U.key)==="header"&&(U.contents=(Y=g.value)!=null&&Y.some(v=>v==null?void 0:v.children)?[g.value]:g.value),U}))},ce=m=>{var U,Y,v;m.type==="fix"?m.id!==""?g.value=_l(g.value,m):g.value=El(g.value,m==null?void 0:m.contents):g.value=Sl(g.value,m),g.value=(U=g.value)!=null&&U.some(L=>L==null?void 0:L.children)?[g.value]:g.value,V.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(L=>(L==null?void 0:L.key)==="header")?C=(v=p.cloneDeep(s.originalItemContents))==null?void 0:v.map(L=>((L==null?void 0:L.key)==="header"&&(L.contents=g.value),L)):C.push({key:"header",contents:g.value}),l("change",C)},oe=m=>{var U;d.value=!0;let C=[];St==null||St.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:m[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),m!=null&&m.children&&((U=m==null?void 0:m.children)==null?void 0:U.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),V.value=m==null?void 0:m.id,O.value="",D.value=C,_.value=C},re=m=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),_.value=C},Ie=()=>{d.value=!1,V.value="",O.value="",_.value=[]},Xe=()=>{var U,Y,v,L,Z,P;D.value=_.value;let m={};if(V.value!==""?m.id=V.value:(k.value++,m.id="id"+k.value),(U=D.value)==null||U.forEach(ue=>{const R=St==null?void 0:St.find(X=>(X==null?void 0:X.label)===(ue==null?void 0:ue.label));R?m[R.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(m.children=ue.children)}),(Y=g.value)!=null&&Y.find(ue=>ue.id===m.id))g.value=(v=g.value)==null?void 0:v.map(ue=>(ue.id===m.id&&(ue=m),ue));else{let ue=p.cloneDeep(g.value)??[];O.value===""?ue.push(m):ue=ue==null?void 0:ue.map(R=>(R.id===O.value&&(R.children||(R.children=[]),R.children.push(m)),R)),g.value=ue}g.value=(L=g.value)!=null&&L.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,d.value=!1,V.value="",O.value="";let C=p.cloneDeep(s.originalItemContents);(Z=p.cloneDeep(s.originalItemContents))!=null&&Z.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(P=p.cloneDeep(s.originalItemContents))==null?void 0:P.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),l("change",C)},dt=m=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;g.value=(C=p.cloneDeep(g.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>{var v;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(v=g.value)!=null&&v.some(L=>L==null?void 0:L.children)?[g.value]:g.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),g.value=(C=(m=c.value)==null?void 0:m.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:C.contents,W.value=(Y=(U=c.value)==null?void 0:U.find(F=>(F==null?void 0:F.key)==="rowButton"))==null?void 0:Y.contents,De.value=(L=(v=c.value)==null?void 0:v.find(F=>(F==null?void 0:F.key)==="extraButton"))==null?void 0:L.contents,E.value=(P=(Z=c.value)==null?void 0:Z.find(F=>(F==null?void 0:F.key)==="page"))!=null&&P.contents?!!((R=(ue=c.value)==null?void 0:ue.find(F=>(F==null?void 0:F.key)==="page"))!=null&&R.contents):!1,le.value=(se=(X=c.value)==null?void 0:X.find(F=>(F==null?void 0:F.key)==="tableToForm"))==null?void 0:se.contents,g.value=(ve=g.value)==null?void 0:ve.map((F,fe)=>(Array.isArray(F)?F=ai(F):F={label:(F==null?void 0:F.label)??"",prop:(F==null?void 0:F.label)==="操作"?"operate":F==null?void 0:F.prop,width:F!=null&&F.width?parseInt(F.width):"",fixed:(F==null?void 0:F.fixed)??void 0,sortable:(F==null?void 0:F.sortable)??!1,align:(F==null?void 0:F.align)??"left",showOverflowTooltip:(F==null?void 0:F.showOverflowTooltip)??!0,isNotDrag:(F==null?void 0:F.isNotDrag)??!1,isEditCol:(F==null?void 0:F.isEditCol)??!1,isOperate:(F==null?void 0:F.isOperate)??!1,id:(F==null?void 0:F.id)??fe,formMenuSelect:(F==null?void 0:F.formMenuSelect)??void 0,groupSelect:(F==null?void 0:F.groupSelect)??void 0},F)),g.value=($=g.value)!=null&&$.every(F=>Array.isArray(F))?(ae=g.value)==null?void 0:ae[0]:g.value,W.value=(G=W.value)==null?void 0:G.map((F,fe)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",textColor:(F==null?void 0:F.textColor)??"#000000",id:(F==null?void 0:F.id)??fe}),De.value=(Se=De.value)==null?void 0:Se.map((F,fe)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",background:(F==null?void 0:F.background)??"var(--ssComponent-primary-color)",id:(F==null?void 0:F.id)??fe}),le.value)le.value=(Ee=le.value)==null?void 0:Ee.map(F=>{k.value++;let fe=F;return fe.id=k.value,fe});else{let F=[];const fe=(de=_e.getColumnChild(p.cloneDeep(g.value)))==null?void 0:de.filter(ne=>(ne==null?void 0:ne.prop)!=="operate");fe==null||fe.forEach(ne=>{var Ae;k.value++,F.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.label),type:ne!=null&&ne.groupSelect?"Select":"Input",value:"",id:k.value,contents:ne==null?void 0:ne.options,menuSelect:ne==null?void 0:ne.formMenuSelect,groupSelect:(Ae=ne==null?void 0:ne.groupSelect)==null?void 0:Ae.split(":"),selectRelateType:"关联绑定列"})}),le.value=F}},{deep:!0,immediate:!0}),(m,C)=>{const U=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>nt(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>oe(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Tl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:Pe,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",zi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>ze(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>Oe(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Fi,[e.createElementVNode("div",Li,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",$i,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>st(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>H(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ot},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(v,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Wi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Hi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>te(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>ee(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(Y,{onClick:Ie,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:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(Y,{onClick:tt,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:Q,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:ie.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(Y,{onClick:be,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:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:x.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Ke,onChangeVisible:Be,onBlurChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(Y,{onClick:he,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:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Rt._export_sfc(as,[["__scopeId","data-v-7a6b87b5"]]),ls=_e.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=_e.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((g=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:g.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||cs.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:((O=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:O.minW)||us.value,minH:((De=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:De.minH)||ds.value,maxH:((K=(q=a==null?void 0:a.value)==null?void 0:q.tableData)==null?void 0:K.maxH)||fs.value,i:((w=(ie=a==null?void 0:a.value)==null?void 0:ie.tableData)==null?void 0:w.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,x,g,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(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((g=a==null?void 0:a.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(V=>(V==null?void 0:V.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Il=(a,i,s)=>{var x,g;const l=(g=(x=rs.value)==null?void 0:x[ss.value])==null?void 0:g.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=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Il(h,D))),{...hs(c,i,d,a)}},gs=(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)=>Il(l,c)):[]},ms=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}]}]}}),ys=(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}),bs=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,g=>{var E;const h=ms(s==null?void 0:s.optionItems),D=g?(E=h[g==null?void 0:g.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[V,O]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===V)return{..._,value:O};return _})},{immediate:!0});const d=g=>Tt.getComponent(g),x=g=>{var h,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.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(V=>({...V,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(V=>({...V,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:g==null?void 0:g.prop})};return(g,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":V=>_.value=V,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:V=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Rt._export_sfc(bs,[["__scopeId","data-v-a99af9a7"]]),xs=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=K=>K==null?void 0:K.reduce((ie,w)=>(ie[w==null?void 0:w.prop]=w==null?void 0:w.rule,ie),{}),g=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=(K,ie,w)=>{var A;let z=[];(s==null?void 0:s.activeTabName)==="任务配置"?(z=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:ie}]},{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)==="任务关联"&&(z=[{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 w&&(w==null?void 0:w.length)>0?k=[...z,..._(K,ie,w)]:k=z,k},_=(K,ie,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},V=(K,ie)=>{var T,le,Le,ot,Be,Ke,xe,I,te;const w=((Be=(ot=(Le=(le=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Le.contents)==null?void 0:ot.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:Be.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],z=/button/i,k=((te=(I=(xe=(Ke=s==null?void 0:s.comp)==null?void 0:Ke.compData)==null?void 0:xe.filter(ee=>z.test(ee==null?void 0:ee.key)))==null?void 0:I.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:te.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],A=E(w,k,K);h.value=ie?ys(A,ie):A,K&&(K==null?void 0:K.length)>0&&d.value.push(...K==null?void 0:K.map(ee=>({prop:ee,rule:c})))};e.onMounted(()=>{V(null,s==null?void 0:s.extendItem)});const O=K=>{const ie=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const w=ie==null?void 0:ie.join("/");V(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},W=K=>{l("change",{target:s==null?void 0:s.target,extendConfigs:K})},De=(K,ie)=>{D.value=ie==null?void 0:ie.changeProp,O(K)},q=K=>{l("onButtonClick",K)};return(K,ie)=>(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:W,onBlurChange:De,onOnButtonClick:q},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Rt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Rt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},zs={style:{display:"flex","justify-content":"space-between"}},Ps={class:"form-content"},Rs={class:"dialog-footer"},Fs={class:"form-content"},Ls={__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([]),g=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),V=e.ref(0),O=e.ref([]),W=e.ref([]),De=(I,te)=>{if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.selectRelateType)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.menuSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.groupSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(te==null?void 0:te.value)||te[I.key];if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const ee=te[I.key];return xl(ee)?ee:I.default}return(I==null?void 0:I.label)==="类型"&&te[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!te[I.key]?!1:te[I.key]},q=async I=>{var he,Ue,st,H,M,me;c.value=!0;let te=[];const ee=await((st=(Ue=(he=_e.FormContent)==null?void 0:he.find(be=>(be==null?void 0:be.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(H=_e.FormContent)==null?void 0:H.find(be=>(be==null?void 0:be.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:M.value);if(ee==null||ee.forEach(be=>{V.value++,te.push({label:be==null?void 0:be.label,name:be==null?void 0:be.label,type:be.type,prop:be==null?void 0:be.prop,value:De(be,I),id:V.value,contents:be==null?void 0:be.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((me=I==null?void 0:I.menuSelect)==null?void 0:me.length)>0){const be=await _e.menuToContentType(I==null?void 0:I.menuSelect);te=te==null?void 0:te.map(ze=>((ze==null?void 0:ze.name)==="组信息选项"&&(ze.contents=be),ze))}E.value=I==null?void 0:I.id,d.value=await _e.selectToBase(_e.formToOptionsContents(te)),x.value=await _e.selectToBase(_e.formToOptionsContents(te))},K=I=>{var ee;g.value=!0;let te=[];(ee=_e.FormButton)==null||ee.forEach(he=>{V.value++,te.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&I[he.key]===""?"normal":I[he.key],id:V.value,contents:he==null?void 0:he.options})}),O.value=te,W.value=te,E.value=I==null?void 0:I.id};e.watch(()=>_.value,()=>{var te,ee;let I=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(he=>(he==null?void 0:he.key)==="enableWrap")?I=(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!_.value),he)):I.push({key:"enableWrap",contents:!_.value}),l("change",I)},{deep:!0});const ie=()=>{var ee,he,Ue,st,H;O.value=W.value;let I={};if(E.value!==""?I.id=E.value:(V.value++,I.id="id"+V.value),(ee=O.value)==null||ee.forEach(M=>{var be;const me=(be=_e.FormButton)==null?void 0:be.find(ze=>(ze==null?void 0:ze.label)===(M==null?void 0:M.label));me&&(I[me.key]=M.value)}),(he=h.value)!=null&&he.find(M=>M.id===I.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===I.id&&(M=I),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(I),h.value=M}g.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(st=p.cloneDeep(s.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?te=(H=p.cloneDeep(s.originalItemContents))==null?void 0:H.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):te.push({key:"formButton",contents:h.value}),l("change",te)},w=I=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=I=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=h.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;g.value=!0;let I=[];(te=_e.FormButton)==null||te.forEach(ee=>{V.value++,I.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"?"normal":"",id:V.value,contents:ee==null?void 0:ee.options})}),O.value=I,W.value=I},A=()=>{var te,ee,he;c.value=!0;let I=[];(he=(ee=(te=_e.FormContent)==null?void 0:te.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:ee.value)==null||he.forEach(Ue=>{V.value++,I.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:V.value,contents:Ue==null?void 0:Ue.options})}),d.value=I,x.value=I},T=I=>{let te=p.cloneDeep(W.value);te=te==null?void 0:te.map(ee=>(ee.value=I==null?void 0:I[ee.name],ee)),W.value=te},le=I=>{const te=I.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ee=I.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),he=I.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");ee!=null&&ee.value&&Vo.isString(he.value)&&(he.value=[he.value]),!(ee!=null&&ee.value)&&!Vo.isString(he.value)&&(he.value="")},Le=async I=>{var te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye;if((I==null?void 0:I.类型)!==((ee=(te=x.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ee.value)){let qe=[];const lt=await((st=(Ue=(he=_e.FormContent)==null?void 0:he.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((ze=(be=(me=_e.FormContent)==null?void 0:me.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:be.value)==null?void 0:ze.value):(M=(H=_e.FormContent)==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Q=>{var nt,Pe;V.value++;const tt=wl(Q==null?void 0:Q.default)?(I==null?void 0:I[Q.label])??Q.value??"":Q==null?void 0:Q.default;qe.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:tt,prop:Q==null?void 0:Q.prop,id:V.value,contents:Q==null?void 0:Q.options,width:((Pe=(nt=x.value)==null?void 0:nt[0])==null?void 0:Pe.width)??1})}),I!=null&&I.菜单选项&&((Oe=I==null?void 0:I.菜单选项)==null?void 0:Oe.length)>0){const Q=await _e.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Q),tt))}le(qe),x.value=await _e.selectToBase(p.cloneDeep(qe)),d.value=await _e.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=I==null?void 0:I[lt.name],lt)),I!=null&&I.菜单选项&&((Ye=I==null?void 0:I.菜单选项)==null?void 0:Ye.length)>0){const lt=await _e.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(Q=>((Q==null?void 0:Q.name)==="组信息选项"&&(Q.contents=lt),Q))}qe=_e.formToOptionsContents(qe),le(qe),x.value=await _e.selectToBase(p.cloneDeep(qe))}},ot=I=>{I||(d.value=x.value)},Be=async I=>{await Le(I),d.value=x.value},Ke=ho(async()=>{var he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt;d.value=x.value;let I={};I.width=((Ue=(he=d.value)==null?void 0:he[0])==null?void 0:Ue.width)??1,E.value!==""?I.id=E.value:(V.value++,I.id="id"+V.value);let te=await((M=(H=(st=_e.FormContent)==null?void 0:st.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(Pe=>(Pe==null?void 0:Pe.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:H.value)==null?void 0:M.value)??((be=(me=_e.FormContent)==null?void 0:me.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(Pe=>(Pe==null?void 0:Pe.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:be.value);if((ze=d.value)==null||ze.forEach(Q=>{const tt=te==null?void 0:te.find(nt=>(nt==null?void 0:nt.label)===(Q==null?void 0:Q.label));tt&&(I[tt.key]=Q.value)}),I.width=I.width?I.width:1,I.key=I==null?void 0:I.label,I.isFormColHidden=I==null?void 0:I.isFormColHidden,(Oe=D.value)!=null&&Oe.find(Q=>Q.id===I.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Q=>(Q.id===I.id&&(Q=I),Q));else{let Q=p.cloneDeep(D.value);Q.push(I),D.value=Q}D.value=D.value.map(({id:Q,...tt})=>tt),c.value=!1,E.value="";let ee=p.cloneDeep(s.originalItemContents);(qe=p.cloneDeep(s.originalItemContents))!=null&&qe.find(Q=>(Q==null?void 0:Q.key)==="formContent")?ee=(lt=p.cloneDeep(s.originalItemContents))==null?void 0:lt.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=D.value),Q)):ee.push({key:"formContent",contents:D.value}),l("change",ee)},300),xe=()=>{c.value=!1,g.value=!1,E.value="",x.value=[],W.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ee,he,Ue,st,H;if(!s.originalItemContents||s.originalItemContents.length===0)return;const I=p.cloneDeep(s.originalItemContents);D.value=((te=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ee=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:ee.contents)??[],_.value=(he=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ue=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,me)=>{var ze;let be=M;return be.id=(M==null?void 0:M.id)??me,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((ze=M==null?void 0:M.options)==null?void 0:ze.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,be}),D.value=_e.formToOptionsContents(D.value),h.value=(H=h.value)==null?void 0:H.map((M,me)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:me})},{deep:!0,immediate:!0}),(I,te)=>{const ee=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",As,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>q(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",Ms,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>K(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>z(Ue)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",zs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Ue=>_.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Le,onChangeVisible:ot,onBlurChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(he,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(Ke),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fs,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:xe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ro=Rt._export_sfc(Ls,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Ks={class:"step-module layout"},Us={class:"form-content"},Ws=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"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=q=>{var K;D.value=q,l("change",(K=W())==null?void 0:K.compData)},V=(q,K)=>{var ie,w;switch(q){case"create":(ie=d.value)==null||ie.forEach(z=>{z.value=""}),h.value="create",g.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),h.value="update",g.visible=!0;break;case"delete":E.value.splice(K,1),h.value="delete";break}},O=q=>{var K,ie,w;if((q==null?void 0:q.buttonName)==="确认"){const z=p.cloneDeep(q==null?void 0:q.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((K=E.value)==null?void 0:K.length)+1});break;case"update":E.value=(ie=E.value)==null?void 0:ie.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=W())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},W=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),De=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},E.value=((ie=q==null?void 0:q.find(w=>w.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ks,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:De,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Rt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=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([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),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:"时间线"}),_=q=>{var K;d.value=q,l("change",(K=W())==null?void 0:K.compData)},V=(q,K)=>{var ie,w;switch(q){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(K,1),c.value="delete";break}},O=q=>{var K,ie,w,z;if((q==null?void 0:q.buttonName)==="确认"){const k=p.cloneDeep(q==null?void 0:q.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(ie=x.value)==null||ie.push({...k,index:((K=x.value)==null?void 0:K.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.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",(z=W())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},W=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),De=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(d.value=((K=q==null?void 0:q.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},x.value=((ie=q==null?void 0:q.find(w=>w.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:De,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Qs=Rt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Zs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Rt._export_sfc(Zs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__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,g=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var z;const w=p.cloneDeep(s.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(le=>{var Le;T.push((Le=Object.values(le))==null?void 0:Le[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(w,z,k,A)=>{var le;let T={};((le=w==null?void 0:w[0])==null?void 0:le.contents)==="详情"&&(g.value=!0,T[z]=w,d.value=w==null?void 0:w.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},V=w=>{var Le,ot,Be,Ke;const z=(ot=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:ot.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),k=(Ke=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Ke.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),A=k==null?void 0:k.map((xe,I)=>{var te;return I===w.index&&(xe==null?void 0:xe.comp)==="Table"&&(xe.compData=(te=xe.compData)==null?void 0:te.map(ee=>{var he,Ue;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ue=(he=w.content)==null?void 0:he.map(st=>{let H={};for(let M in st)M!=="id"&&(H[M]=st[M]);return H}))==null?void 0:Ue.map(st=>Object.values(st))),ee})),xe});A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let xe in T)le[xe]=A;h.value=le},O=()=>{g.value=!1,h.value={},D.value={},E.value=void 0,l.value++},W=w=>{var Le,ot,Be,Ke;const z=(ot=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:ot.filter(xe=>(xe==null?void 0:xe.key)==="tableContentName"),k=(Ke=(Be=Object.values(p.cloneDeep(h.value)))==null?void 0:Be[0])==null?void 0:Ke.filter(xe=>(xe==null?void 0:xe.key)!=="tableContentName"),A=k==null?void 0:k.map((xe,I)=>(I===w.index&&(xe.compData=w.contents),xe));A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let xe in T)le[xe]=A;h.value=le},De=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),g.value=!1,h.value={},D.value={},E.value=void 0},q=()=>{g.value=!1,h.value={},D.value={},E.value=void 0},K=w=>{x("change",w,"methodData")},ie=w=>ga(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(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",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(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:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:q},{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(ie(A.comp)),{itemData:A==null?void 0:A.compData,onChange:V,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:W,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Rt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Ct="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=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(":",Ct))==null?void 0:s.split(Ct))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},uc=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},pc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),dc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),fc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),xa=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},Ca=(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},hc=(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},Fo=(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&&Fo(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&&Fo(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},vc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),gc=a=>{var i,s,l,c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct;if(fc(a)){let je={},ye=(l=(s=(i=a==null?void 0:a.replace(":",Ct))==null?void 0:i.split(Ct))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),we="",Qe="",pe=(d=(c=a==null?void 0:a.replace(":",Ct))==null?void 0:c.split(Ct))==null?void 0:d[1];if((pe==null?void 0:pe[0])==="("&&(Qe=(h=(g=(x=pe==null?void 0:pe.split("("))==null?void 0:x[1])==null?void 0:g.split(")"))==null?void 0:h[0],pe=(E=(D=pe==null?void 0:pe.replace(")",Ct))==null?void 0:D.split(Ct))==null?void 0:E[1]),((_=Ga(pe,"/"))==null?void 0:_.length)>1)we=(V=Ga(pe,"/"))==null?void 0:V.map(Ne=>Ne==null?void 0:Ne.replaceAll("/","").replaceAll("'",""));else if(pe.includes("{")||pe.includes("("))if(pe.includes("{")?we=we+((ie=(K=(q=(De=(W=(O=pe==null?void 0:pe.split("{"))==null?void 0:O[1])==null?void 0:W.split("}"))==null?void 0:De[0])==null?void 0:q.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:ie.replaceAll("]","])"))+"[":we=we+((le=(T=(A=(k=(z=(w=pe==null?void 0:pe.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:le.replaceAll("]","])"))+"[",!((Le=pe==null?void 0:pe.split(")"))!=null&&Le[1]))we=we+((Ke=(Be=(ot=pe==null?void 0:pe.split("["))==null?void 0:ot[1])==null?void 0:Be.split("]"))==null?void 0:Ke[0])+"]";else{const Ne=(ee=(te=(I=(xe=pe==null?void 0:pe.split(")"))==null?void 0:xe[1])==null?void 0:I.replace("[",Ct))==null?void 0:te.split(Ct))==null?void 0:ee[1];if(pe!=null&&pe.includes("?"))we=((he=pe==null?void 0:pe.split("?"))==null?void 0:he[1])+"&&"+((st=(Ue=pe==null?void 0:pe.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ne){const Fe=Ne.lastIndexOf("]"),We=Ne.substring(0,Fe)+Ct+Ne.substring(Fe+1);we=we+((H=We==null?void 0:We.split(Ct))==null?void 0:H[0])+"]"}else we=(be=(me=(M=a==null?void 0:a.replace(":",Ct))==null?void 0:M.split(Ct))==null?void 0:me[1])==null?void 0:be.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))we=(Ye=(Oe=(ze=a==null?void 0:a.replace(":",Ct))==null?void 0:ze.split(Ct))==null?void 0:Oe[1])==null?void 0:Ye.replaceAll("'","");else{let Ne=(Q=(lt=(qe=a==null?void 0:a.replace(":",Ct))==null?void 0:qe.split(Ct))==null?void 0:lt[1])==null?void 0:Q.replaceAll("'","");we=((Pe=(nt=(tt=Ne==null?void 0:Ne.split("?"))==null?void 0:tt[1])==null?void 0:nt.split(":"))==null?void 0:Pe[0])+"&&"+((ce=Ne==null?void 0:Ne.split("?"))==null?void 0:ce[0])}return je[ye]=Qe!==""?Qe+"$##"+we:we,{groupName:"",formContents:[[je]]}}else{let je={},ye="",we="";if(a.includes("#")){ye=(re=(oe=a==null?void 0:a.split("#"))==null?void 0:oe[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Ie=a==null?void 0:a.split("#"))==null?void 0:Ie[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?we=we+((U=(C=(m=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:m.split("}"))==null?void 0:C[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":we=we+((Z=(L=(v=(Y=Qe==null?void 0:Qe.split("("))==null?void 0:Y[1])==null?void 0:v.split(")"))==null?void 0:L[0])==null?void 0:Z.replaceAll(":","/").replaceAll("'",""))+"[",we=we+((ve=(ue=(P=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:P.split(Ct))==null?void 0:ue[1])==null?void 0:ve.slice(0,((se=(X=(R=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:R.split(Ct))==null?void 0:X[1])==null?void 0:se.length)-1))}else{let Qe=(G=(ae=($=a==null?void 0:a.split("]"))==null?void 0:$[0])==null?void 0:ae.split("["))==null?void 0:G[1];if((Se=Qe==null?void 0:Qe.split(":"))==null||Se.forEach((pe,Ne)=>{var Fe;((Fe=Qe==null?void 0:Qe.split(":"))==null?void 0:Fe.length)-1===Ne&&(ye=pe==null?void 0:pe.replaceAll("'",""))}),!(a!=null&&a.includes("[")))we=((fe=(F=(Ee=(de=a==null?void 0:a.split("]"))==null?void 0:de[1])==null?void 0:Ee.replace(":",Ct).split(Ct))==null?void 0:F[1])==null?void 0:fe.replaceAll("'",""))??"";else{let pe=(ge=(Ve=(Me=(Je=(Ae=(ne=p.cloneDeep(a))==null?void 0:ne.split("("))==null?void 0:Ae[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll("{","").replaceAll("}",""))==null?void 0:ge.replaceAll("'","").replaceAll(":","/"),Ne="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Fe=>{Ne=Ne===""?Ne+(Fe==null?void 0:Fe.replaceAll("'","")):Ne+":"+(Fe==null?void 0:Fe.replaceAll("'",""))}),we=pe+"["+Ne+"]"}}return je[ye]=we,{groupName:"",formContents:[[je]]}}},mc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),yc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},bc=a=>{var d,x,g,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=xa(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=(g=xa(p.cloneDeep(i)))==null?void 0:g.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 _,V;return E=(V=(_=E.replace(")",Ct))==null?void 0:_.split(Ct))==null?void 0:V[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L;let _=(W=(O=p.cloneDeep(E))==null?void 0:O.slice(1,p.cloneDeep(E).length-1))==null?void 0:W.replace(":",Ct).split(Ct);if(((q=(De=p.cloneDeep(_))==null?void 0:De[0])==null?void 0:q.replaceAll("'",""))==="输入"){if(!((ie=(K=p.cloneDeep(_))==null?void 0:K[1])!=null&&ie.includes("["))&&!((z=(w=p.cloneDeep(_))==null?void 0:w[1])!=null&&z.includes("("))){_e.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(((le=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:le[0])==="["){let Z=(Ke=(Le=p.cloneDeep(_))==null?void 0:Le[1])==null?void 0:Ke.slice(1,((Be=(ot=p.cloneDeep(_))==null?void 0:ot[1])==null?void 0:Be.length)-1);(I=(xe=xa(Z))==null?void 0:xe.filter(P=>P!==","))==null||I.forEach(P=>{var ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne;let ue={},R=(ae=($=p.cloneDeep(P))==null?void 0:$.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;(Se=R==null?void 0:R[1])!=null&&Se.includes("(")?(se=(Ve=(Me=(Je=(Ae=(ne=(fe=(F=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:F.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.split("("))==null?void 0:Ae[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll(":","/").replaceAll("'",""),(ct=(ge=p.cloneDeep(R))==null?void 0:ge[1])!=null&&ct.includes("[")&&(se=p.cloneDeep(se)+"["+((Ne=(pe=(Qe=(we=(ye=(je=p.cloneDeep(R))==null?void 0:je[1])==null?void 0:ye.split("["))==null?void 0:we[1])==null?void 0:Qe.split("]"))==null?void 0:pe[0])==null?void 0:Ne.replaceAll("'",""))+"]")):se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'",""),ue[X]=se,c.push(ue)})}}else{if(!((ee=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ee.includes("["))&&!((Ue=(he=p.cloneDeep(_))==null?void 0:he[1])!=null&&Ue.includes("("))){_e.IsJson((st=p.cloneDeep(_))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((H=p.cloneDeep(_))==null?void 0:H[1].replaceAll("'",'"')));return}if(((me=(M=p.cloneDeep(_))==null?void 0:M[1])==null?void 0:me[0])==="["){let Z=(Ye=(be=p.cloneDeep(_))==null?void 0:be[1])==null?void 0:Ye.slice(1,((Oe=(ze=p.cloneDeep(_))==null?void 0:ze[1])==null?void 0:Oe.length)-1);(lt=(qe=xa(Z))==null?void 0:qe.filter(P=>P!==","))==null||lt.forEach(P=>{var ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It;let ue={},R=(ae=($=p.cloneDeep(P))==null?void 0:$.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;if(!((Se=R==null?void 0:R[1])!=null&&Se.includes("(")))se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'","");else if(se=(Je=(Ae=(ne=(fe=(F=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:F.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.replace("(",Ct))==null?void 0:Ae.split(Ct))==null?void 0:Je[1],se=(Ve=(Me=yc(p.cloneDeep(se),Ct))==null?void 0:Me.split(Ct))==null?void 0:Ve[0],!(se!=null&&se.includes("(")))se=(ge=p.cloneDeep(se))==null?void 0:ge.replaceAll(":","/").replaceAll("'",""),(je=(ct=p.cloneDeep(R))==null?void 0:ct[1])!=null&&je.includes("[")&&(se=p.cloneDeep(se)+"["+((Ce=(N=(We=(Fe=(we=(ye=p.cloneDeep(R))==null?void 0:ye[1])==null?void 0:we.split("["))==null?void 0:Fe[((Ne=(pe=(Qe=p.cloneDeep(R))==null?void 0:Qe[1])==null?void 0:pe.split("["))==null?void 0:Ne.length)-1])==null?void 0:We.split("]"))==null?void 0:N[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let Bt="";(ut=Ca(se,":"))==null||ut.forEach(xt=>{var wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn;if(!(xt!=null&&xt.includes("(")))Bt=Bt===""?Bt+((wt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:wt.replaceAll("'","")):Bt+"/"+((Ot=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let vn=(wn=(dn=(xn=(Ht=(Vt=(Ft=(Kt=(At=p.cloneDeep(xt))==null?void 0:At.replaceAll("{",""))==null?void 0:Kt.replaceAll("}",""))==null?void 0:Ft.replace("(",Ct))==null?void 0:Vt.split(Ct))==null?void 0:Ht[1])==null?void 0:xn.split(")"))==null?void 0:dn[0])==null?void 0:wn.replaceAll(":","/").replaceAll("'","");vn=vn+"["+((Tn=(hn=(Sn=(fn=(_n=p.cloneDeep(xt))==null?void 0:_n.split("["))==null?void 0:fn[1])==null?void 0:Sn.split("]"))==null?void 0:hn[0])==null?void 0:Tn.replaceAll("'",""))+"]",Bt=Bt===""?Bt+"["+vn+"]":Bt+"/["+vn+"]"}}),se=Bt+"["+((It=(vt=(pt=(He=(ft=(et=p.cloneDeep(R))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Te=(rt=p.cloneDeep(R))==null?void 0:rt[1])==null?void 0:Te.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:It.replaceAll("'",""))+"]"}ue[X]=se,l.push(ue)})}else{let Z=(Pe=(Q=p.cloneDeep(_))==null?void 0:Q[1])==null?void 0:Pe.slice(1,((nt=(tt=p.cloneDeep(_))==null?void 0:tt[1])==null?void 0:nt.length)-1),P={},ue=(U=(C=(re=(oe=(ce=p.cloneDeep(Z))==null?void 0:ce.split("]"))==null?void 0:oe[0])==null?void 0:re.split(":"))==null?void 0:C[((m=(dt=(Xe=(Ie=p.cloneDeep(Z))==null?void 0:Ie.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:m.length)-1])==null?void 0:U.replaceAll("'",""),R=((L=(v=(Y=p.cloneDeep(Z))==null?void 0:Y.split("]"))==null?void 0:v[0])==null?void 0:L.replaceAll("'",""))+"]";P[ue]=R,l.push(P)}}}),{output:l,input:c}},kc=_e.useModelComp(p.pinia),{routeToChildPath:En}=p.storeToRefs(kc),On=_e.useMenuState(p.pinia),{activeMenuPath:na}=p.storeToRefs(On),wa=p.useLoginState(),{loginUserInfo:Gt}=p.storeToRefs(wa),xc=_e.useOriginalState(p.pinia),{originalPath:wc}=p.storeToRefs(xc),Jt=wc.value,Dc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const g=x.match(i);g&&d.push({idx:Number(g[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,g)=>x.idx-g.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],g=[];c.forEach(_=>{var V;return(((V=_.names)==null?void 0:V.length)>d?x:g).push(_)});const h=g.map(_=>_.item),D=new Map;for(const _ of x){const V=_.names[_.names.length-d-1].value;D.has(V)||D.set(V,[]),D.get(V).push(_)}return[...Array.from(D.entries()).map(([_,V])=>{var O;return V[0].names.length===1&&((O=V[0].names[0])==null?void 0:O.idx)===-1?V[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(V,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:Dc(a),Bl=async()=>{var d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke,xe,I,te,ee,he,Ue,st,H,M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se;On.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(En).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 de=(O=(V=(_=(E=(D=(h=(g=i==null?void 0:i.data)==null?void 0:g.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:V.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:O.contents;a=(De=(W=p.cloneDeep(de))==null?void 0:W[0])==null?void 0:De.label}let s=na.value;(ie=na.value)!=null&&ie.includes(`updateLoading${((q=Gt.value)==null?void 0:q.account)||((K=Gt.value)==null?void 0:K.账号)}`)?s=p.cloneDeep(na).value:(k=na.value)!=null&&k.includes(`loading${((w=Gt.value)==null?void 0:w.account)||((z=Gt.value)==null?void 0:z.账号)}`)&&(s=p.cloneDeep(En).value+Jt+`loading${((A=Gt.value)==null?void 0:A.account)||((T=Gt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Le=(le=l==null?void 0:l.data)==null?void 0:le.result)==null?void 0:Le.length)>0){let de="",Ee=[];(Be=(ot=l==null?void 0:l.data)==null?void 0:ot.result)==null||Be.forEach(fe=>{var ne,Ae,Je,Me,Ve;((Ae=(ne=fe==null?void 0:fe.value)==null?void 0:ne.pageData)==null?void 0:Ae.comp)==="Form"&&((Ve=(Me=(Je=fe==null?void 0:fe.value)==null?void 0:Je.pageData)==null?void 0:Me.compData)==null||Ve.forEach(ge=>{(ge==null?void 0:ge.key)==="formContent"&&(Ee=[...Ee,...ge==null?void 0:ge.contents])}))});let F=Ee==null?void 0:Ee.find(fe=>(fe==null?void 0:fe.isMain)===!0);if(F?(de=F==null?void 0:F.value,a=F==null?void 0:F.key):de=(H=(st=(Ue=(he=(ee=(te=(I=(xe=(Ke=l==null?void 0:l.data)==null?void 0:Ke.result)==null?void 0:xe[0])==null?void 0:I.value)==null?void 0:te.pageData)==null?void 0:ee.compData)==null?void 0:he.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(fe=>{var ne,Ae;return(fe==null?void 0:fe.key)===a||((Ae=(ne=fe==null?void 0:fe.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:Ae[1])===a}))==null?void 0:H.value,(be=na.value)!=null&&be.includes(`updateLoading${((M=Gt.value)==null?void 0:M.account)||((me=Gt.value)==null?void 0:me.账号)}`)){let fe=[],ne=[];const Ae=await p.getInsofDataApi({key:{pageKey:(oe=na.value.split(Jt+`updateLoading${((Pe=Gt.value)==null?void 0:Pe.account)||((ce=Gt.value)==null?void 0:ce.账号)}`))==null?void 0:oe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ie=(re=Ae==null?void 0:Ae.data)==null?void 0:re.result)==null?void 0:Ie.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Me=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ve=>{var ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et;if(((ge=Ve==null?void 0:Ve.key)==null?void 0:ge.type)==="structure"){let ft=(we=(ye=(je=(ct=Ve==null?void 0:Ve.value)==null?void 0:ct.pageData)==null?void 0:je.compData)==null?void 0:ye.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:we.contents;if(ft){let rt=await _e.getItemData(ft,sessionStorage.getItem("systemKey"),""),Te=(Fe=(Ne=(pe=(Qe=Ve==null?void 0:Ve.value)==null?void 0:Qe.pageData)==null?void 0:pe.compData)==null?void 0:Ne.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Fe.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var It,Bt;if((vt==null?void 0:vt.key)==="formContent"&&((It=vt==null?void 0:vt.contents)==null?void 0:It.some(wt=>Te==null?void 0:Te.find(Ot=>(Ot==null?void 0:Ot.prop)===(wt==null?void 0:wt.prop))))){let wt=He;wt.compData=(Bt=wt.compData)==null?void 0:Bt.map(At=>{var Kt;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(Kt=At.contents)==null?void 0:Kt.map(Ft=>{var Vt;return Te!=null&&Te.find(Ht=>(Ht==null?void 0:Ht.prop)===(Ft==null?void 0:Ft.prop))&&(Ft.value=(Vt=Te==null?void 0:Te.find(Ht=>(Ht==null?void 0:Ht.prop)===(Ft==null?void 0:Ft.prop)))==null?void 0:Vt.value),Ft})),At});let Ot={};for(let At in wt)At!=="id"&&(Ot[At]=wt[At]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((N=(We=Ae==null?void 0:Ae.data)==null?void 0:We.result)!=null&&N.find(rt=>{var Te,Ze,He,pt;return((Ze=(Te=rt==null?void 0:rt.value)==null?void 0:Te.pageData)==null?void 0:Ze.name)===((pt=(He=Ve==null?void 0:Ve.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(En).value+Jt+de,c.push({id:(et=(ut=(Ce=Ae==null?void 0:Ae.data)==null?void 0:Ce.result)==null?void 0:ut.find(Te=>{var Ze,He,pt,vt;return((He=(Ze=Te==null?void 0:Te.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ve==null?void 0:Ve.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ve==null?void 0:Ve.value})}else{let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(En).value+Jt+de,fe.push({key:rt,value:Ve==null?void 0:Ve.value})}}});await Promise.all(Me),(C=(m=l==null?void 0:l.data)==null?void 0:m.result)==null||C.forEach(Ve=>{var ct,je,ye;let ge=(ct=p.cloneDeep(Ve))==null?void 0:ct.key;ge.pageKey=p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((je=Gt.value)==null?void 0:je.account)||((ye=Gt.value)==null?void 0:ye.账号)}`,On.setChildMenu(ge.pageKey),c.push({id:Ve==null?void 0:Ve.id,key:ge})})}if(de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),On.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await wa.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(fe==null?void 0:fe.length)>0&&(await p.batchAddInsofDataApi({dataList:fe}),(v=fe==null?void 0:fe[0])!=null&&v.key&&await wa.setLogRecordAsync({type:"保存",data:fe},(L=fe==null?void 0:fe[0])==null?void 0:L.key));const Je=await p.getInsofDataApi({key:{pageKey:(ue=na.value.split(Jt+`updateLoading${((Z=Gt.value)==null?void 0:Z.account)||((P=Gt.value)==null?void 0:P.账号)}`))==null?void 0:ue[0],systemKey:sessionStorage.getItem("systemKey")}});if(((X=(R=Je==null?void 0:Je.data)==null?void 0:R.result)==null?void 0:X.length)>0){let Me=[],Ve=(se=l==null?void 0:l.data)==null?void 0:se.result;(ve=p.cloneDeep(Ve))==null||ve.forEach(ge=>{var ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut;if(((ct=ge==null?void 0:ge.key)==null?void 0:ct.type)!=="structure"){let et=(we=(ye=(je=Je==null?void 0:Je.data)==null?void 0:je.result)==null?void 0:ye.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:we.map(Ze=>Ze==null?void 0:Ze.id);Me=[...Me,...et];let ft=(Fe=(Ne=(pe=(Qe=p.cloneDeep(Ve))==null?void 0:Qe.find(Ze=>{var He;return((He=ge==null?void 0:ge.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:pe.value)==null?void 0:Ne.pageData)==null?void 0:Fe.name,rt=(Ce=(N=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:N.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Te=(ut=p.cloneDeep(ge))==null?void 0:ut.key;Te.tableId=rt,Te.pageKey=p.cloneDeep(En).value+Jt+de,ne.push({key:Te,value:ge==null?void 0:ge.value})}}),(Me==null?void 0:Me.length)>0&&(Me=[...new Set(Me)],await p.batchDeleteInsofDataApi({ids:Me})),(ae=($=l==null?void 0:l.data)==null?void 0:$.result)==null||ae.forEach(ge=>{var je,ye,we;let ct=(je=p.cloneDeep(ge))==null?void 0:je.key;ct.pageKey=p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((ye=Gt.value)==null?void 0:ye.account)||((we=Gt.value)==null?void 0:we.账号)}`,On.setChildMenu(ct.pageKey),c.push({id:ge==null?void 0:ge.id,key:ct})})}(ne==null?void 0:ne.length)>0&&(await p.batchAddInsofDataApi({dataList:ne}),(G=fe==null?void 0:fe[0])!=null&&G.key&&await wa.setLogRecordAsync({type:"保存",data:ne},(Se=ne==null?void 0:ne[0])==null?void 0:Se.key)),p.ElMessage.success("保存成功")}}else{if((Oe=(ze=l==null?void 0:l.data)==null?void 0:ze.result)==null||Oe.forEach(fe=>{var Ae;let ne=(Ae=p.cloneDeep(fe))==null?void 0:Ae.key;ne.pageKey=p.cloneDeep(En).value+Jt+de,On.setChildMenu(ne.pageKey),c.push({id:fe==null?void 0:fe.id,key:ne})}),de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),On.setImportLoading(!1),On.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await wa.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await _e.loadingConstruct(p.cloneDeep(En).value+Jt+de,p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((lt=Gt.value)==null?void 0:lt.account)||((Q=Gt.value)==null?void 0:Q.账号)}`),On.setActiveMenuPath(p.cloneDeep(En).value+Jt+de+Jt+`updateLoading${((tt=Gt.value)==null?void 0:tt.account)||((nt=Gt.value)==null?void 0:nt.账号)}`),p.ElMessage.success("保存成功")}}On.setImportLoading(!1)},Cc={key:0,class:"method-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=_e.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),g=_e.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(g),D=_e.useModelComp(p.pinia),E=e.ref(!1),_=_e.useMenuState(p.pinia),V=p.useLoginState(p.pinia),{itemData:O,isEdit:W,routeToChildPath:De,tableViewContents:q,lockingPage:K,payloadTypes:ie}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(V),T=e.ref(!1),le=async()=>{var H,M;(H=i.value)!=null&&H.find(me=>(me==null?void 0:me.buttonName)==="保存")&&await ee((M=i.value)==null?void 0:M.find(me=>(me==null?void 0:me.buttonName)==="保存")),await Bl()};e.watch(()=>O.value,async()=>{W.value==="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Le=()=>{d.value=!1,x.value=void 0},ot=H=>H.map(M=>{const me={};for(const be in M){const ze=M[be];if(be.includes(h.value)){const Oe=be.split(h.value);let Ye=me;Oe.forEach((qe,lt)=>{lt===Oe.length-1?Ye[qe]=ze:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else me[be]=ze}return me}),Be=async(H,M,me=[])=>{var ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt;let be=(ze=p.cloneDeep(M))==null?void 0:ze.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(H!=null&&H.includes("[")){let m=(Q=(lt=(qe=(Ye=(Oe=p.cloneDeep(H))==null?void 0:Oe.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Q.split(":"),C="";if(m!=null&&m[0]){let U=(tt=be==null?void 0:be.find(Y=>(Y==null?void 0:Y.name)===(m==null?void 0:m[0])))==null?void 0:tt.compData;if(!U){let Y=(nt=H==null?void 0:H.split("["))==null?void 0:nt[0],v=await _e.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",me);U=(Pe=v==null?void 0:v.find(L=>(L==null?void 0:L.name)===(m==null?void 0:m[0])))==null?void 0:Pe.compData}U==null||U.forEach(Y=>{var v,L,Z,P,ue,R;if((Y==null?void 0:Y.key)==="formContent")(v=Y==null?void 0:Y.contents)==null||v.forEach(X=>{var se;(X==null?void 0:X.key)===(m==null?void 0:m[1])&&(Array.isArray(X==null?void 0:X.value)?C=X==null?void 0:X.value:C=(se=X==null?void 0:X.value)==null?void 0:se.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let X=[],se=(L=U==null?void 0:U.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents,ve=(m==null?void 0:m[1])??"";if(se!=null&&se.every($=>Array.isArray($))){let $=_e.getColumnChild((ue=se==null?void 0:se[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(R=Y.contents)==null||R.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(Se=>!(Se!=null&&Se.id)),$==null||$.forEach((Se,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===Se.prop)&&(G[Se.prop]=Ee)}),X.push(G)}),X=ot(X)}else{let $=(Z=se==null?void 0:se.map(ae=>ae==null?void 0:ae.label))==null?void 0:Z.filter(ae=>ae!=="操作");(P=Y.contents)==null||P.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(Se=>!(Se!=null&&Se.id)),$==null||$.forEach((Se,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===Se)&&(G[Se]=Ee)}),X.push(G)})}C=X}})}return C}else if(H!=null&&H.includes("/")){let m={};return(ce=p.cloneDeep(be))==null||ce.forEach((C,U)=>{var Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne;if((C==null?void 0:C.comp)==="Table"){let Ae=Array.isArray((L=(v=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:v.contents)==null?void 0:L[0])?(R=(ue=(P=(Z=C==null?void 0:C.compData)==null?void 0:Z.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:P.contents)==null?void 0:ue[0])==null?void 0:R.some(ge=>ge==null?void 0:ge.children):[],Je=(ve=(se=(X=C==null?void 0:C.compData)==null?void 0:X.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(ge=>(ge!=null&&ge.find(ct=>ct==null?void 0:ct.id)&&(ge=ge.slice(1)),ge)),Me=(de=(Se=(G=(ae=($=C==null?void 0:C.compData)==null?void 0:$.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:ae.contents)==null?void 0:G[0])==null?void 0:Se[0])==null?void 0:de.label,Ve=(F=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:F.contents;if(Ae)(Ae==null?void 0:Ae.length)===0?m[C.name]=m!=null&&m[C.name]?m[C.name]:_e.tableToForm(Je,Ve):m[Me]=_e.tableToForm(Je,Ve);else{const ge=[];Ve=Ve.slice(1,Ve.length-1),Ve==null||Ve.forEach((ct,je)=>{Je==null||Je.forEach(ye=>{ge.push({key:ct.label+ye[0],value:ye[je+1]})})}),m["form"+U]=ge}}else{const Ae=(ne=(fe=C.compData)==null?void 0:fe.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:ne.contents;m!=null&&m.form||(m.form=[]);const Je=[];Ae==null||Ae.forEach(Me=>{Me.key!==""&&(Me={key:(Me==null?void 0:Me.key)??(Me==null?void 0:Me.label),value:Me==null?void 0:Me.value},Je.push(Me))}),m.form=[...Je,...p.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(H==="createInsofDataApi"){let m=(oe=p.cloneDeep(M))==null?void 0:oe[0];return m={comp:(re=p.cloneDeep(m))==null?void 0:re.comp,compData:(Ie=p.cloneDeep(m))==null?void 0:Ie.compData,name:(Xe=p.cloneDeep(m))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:m}}}return H}},Ke=async(H,M,me)=>{var Oe,Ye,qe;let be=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),ze=be==null?void 0:be.find(lt=>(lt==null?void 0:lt.name)===(me==null?void 0:me[0]));if(ze){if((ze==null?void 0:ze.comp)==="Table"){let lt={};for(let re in p.cloneDeep(H))p.cloneDeep(H)[re]!=="loginUser"?lt[re]=p.cloneDeep(H)[re]:lt[re]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);let Q=[],tt=lt;Array.isArray(H)||(tt=[lt]),tt==null||tt.forEach(re=>{Q.push({[re[me[1]]]:re})});let nt=[],Pe=Q==null?void 0:Q.map(re=>{var Ie;return(Ie=Object.keys(re))==null?void 0:Ie[0]});be==null||be.forEach(re=>{var Ie;(re==null?void 0:re.name)===(me==null?void 0:me[0])&&((Ie=re==null?void 0:re.compData)==null||Ie.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(m=>{m!=null&&m.some(C=>Pe.includes(C))&&nt.push({[m.find(C=>C.id).id]:m.find(C=>Pe.includes(C))})}))}))});let ce=nt==null?void 0:nt.map(re=>{var Ie;return(Ie=Object.keys(re))==null?void 0:Ie[0]}),oe=[];if(ce==null||ce.forEach(re=>{var dt;let Ie=(dt=nt==null?void 0:nt.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Q==null?void 0:Q.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0])===Ie});oe.push({id:parseInt(re),value:{tableData:Xe[Ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((ze==null?void 0:ze.comp)==="Form"){let lt=p.cloneDeep(ze);lt.compData=(qe=lt.compData)==null?void 0:qe.map(nt=>{var Pe;return(nt==null?void 0:nt.key)==="formContent"&&(nt.contents=(Pe=nt.contents)==null?void 0:Pe.map(ce=>((ce==null?void 0:ce.key)===(me==null?void 0:me[1])&&(ce.value=(H==null?void 0:H[ce==null?void 0:ce.prop])||H),ce))),nt});let Q={};for(let nt in lt)nt!=="id"&&(Q[nt]=lt[nt]);let tt=[];if(tt.push({id:ze==null?void 0:ze.id,keyType:me==null?void 0:me[1],value:{pageData:Q}}),(tt==null?void 0:tt.length)>0)return tt}}},xe=async(H,M,me)=>{var Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe;let be=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),ze=be==null?void 0:be.find(re=>(re==null?void 0:re.name)===(me==null?void 0:me[0]));if(ze){if((ze==null?void 0:ze.comp)==="Table"){let re={};for(let Ie in p.cloneDeep(H))p.cloneDeep(H)[Ie]!=="loginUser"?re[Ie]=p.cloneDeep(H)[Ie]:re[Ie]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:ze==null?void 0:ze.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((ze==null?void 0:ze.comp)==="Form"){let re=p.cloneDeep(ze),Ie=Object.keys(H),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var L,Z;(v==null?void 0:v.key)==="formContent"&&((Z=(L=p.cloneDeep(v))==null?void 0:L.contents)==null||Z.forEach(P=>{var ue;Ie.includes(P==null?void 0:P.key)&&(P==null?void 0:P.value)===((ue=A.value)==null?void 0:ue.姓名)&&(Xe=P==null?void 0:P.key)}))});let dt=[];(Q=Object.values(H[Xe]))==null||Q.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async v=>{var R,X,se,ve,$,ae,G,Se,de,Ee,F,fe;let L="";(ae=($=(ve=(se=(X=(R=p.cloneDeep(v))==null?void 0:R.split("("))==null?void 0:X[1])==null?void 0:se.split(")"))==null?void 0:ve[0])==null?void 0:$.split(":"))==null||ae.forEach(ne=>{L=L===""?L+ne.replaceAll("'",""):L+"/"+ne.replaceAll("'","")});let Z=[];(fe=(F=(Ee=(de=(Se=(G=p.cloneDeep(v))==null?void 0:G.split("<"))==null?void 0:Se[1])==null?void 0:de.split(">"))==null?void 0:Ee[0])==null?void 0:F.split(":"))==null||fe.forEach(ne=>{Z.push(ne.replaceAll("'",""))});const P=await _e.getItemData(L,sessionStorage.getItem("systemKey"),"");let ue="";return P==null||P.forEach(ne=>{var Ae;ne.name===(Z==null?void 0:Z[0])&&((Ae=ne==null?void 0:ne.compData)==null||Ae.forEach(Je=>{var Me;(Je==null?void 0:Je.key)==="formContent"&&((Me=Je.contents)==null||Me.forEach(Ve=>{(Ve==null?void 0:Ve.key)===(Z==null?void 0:Z[1])&&(ue=Ve==null?void 0:Ve.value)}))}))}),{[v]:ue}}),C=await Promise.all(m);re.compData=(nt=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:nt.map(v=>{var L,Z;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(Z=(L=p.cloneDeep(v))==null?void 0:L.contents)==null?void 0:Z.map(P=>{var ue,R,X,se;return(ue=H[Xe])!=null&&ue[P==null?void 0:P.key]&&(H[Xe][P==null?void 0:P.key].includes("(")?P.value=(R=C==null?void 0:C.find(ve=>{var $;return(($=Object.keys(ve))==null?void 0:$[0])===H[Xe][P==null?void 0:P.key]}))==null?void 0:R[H[Xe][P==null?void 0:P.key]]:P.value=(se=(X=p.cloneDeep(H))==null?void 0:X[Xe])==null?void 0:se[P==null?void 0:P.key]),P})),v});const U=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Pe=U==null?void 0:U.data)==null?void 0:Pe.type)==="success"&&((oe=(ce=U==null?void 0:U.data)==null?void 0:ce.result)==null||oe.forEach(v=>{var L,Z;((Z=(L=v==null?void 0:v.value)==null?void 0:L.pageData)==null?void 0:Z.name)===(me==null?void 0:me[0])&&(Y=v.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:re}}))}}},I=(H,M="",me={})=>{for(const[be,ze]of Object.entries(H)){const Oe=M?`${M}.${be}`:be;ze!==null&&typeof ze=="object"&&!Array.isArray(ze)&&Object.prototype.toString.call(ze)!=="[object Date]"?I(ze,Oe,me):me[Oe]=ze}return me},te=async(H,M,me,be)=>{var Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie,Xe,dt,m,C,U,Y,v,L,Z,P,ue,R,X,se;let ze=await _e.getItemData(M,sessionStorage.getItem("systemKey"),""),Oe=ze==null?void 0:ze.find(ve=>(ve==null?void 0:ve.name)===(me==null?void 0:me[0]));if(Oe){if(!(me!=null&&me[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let ve={},$=[],ae=(qe=(Ye=Oe==null?void 0:Oe.compData)==null?void 0:Ye.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(de=>Array.isArray(de))?$=(Q=_e.getColumnChild((lt=ae==null?void 0:ae[0])==null?void 0:lt.filter(de=>(de==null?void 0:de.label)!=="操作")))==null?void 0:Q.map(de=>de==null?void 0:de.prop):$=ae==null?void 0:ae.map(de=>de==null?void 0:de.label);for(let de in p.cloneDeep(H))if(p.cloneDeep(H)[de]!=="loginUser"){let Ee=I(p.cloneDeep(H)[de]),F={};for(let fe in Ee)if($!=null&&$.find(ne=>ne===fe))F[fe]=Ee[fe];else if($!=null&&$.find(ne=>(ne==null?void 0:ne.toUpperCase())===(fe==null?void 0:fe.toUpperCase()))){let ne=$==null?void 0:$.find(Ae=>(Ae==null?void 0:Ae.toUpperCase())===(fe==null?void 0:fe.toUpperCase()));F[ne]=Ee[fe]}ve[de]=F}else ve[de]=((tt=A.value)==null?void 0:tt.account)||((nt=A.value)==null?void 0:nt.账号);let G=await p.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((ce=(Pe=G==null?void 0:G.data)==null?void 0:Pe.result)==null?void 0:ce.length)>0){let de=(re=(oe=G==null?void 0:G.data)==null?void 0:oe.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(de==null?void 0:de.length)>0&&await p.batchDeleteInsofDataApi({ids:de})}let Se=[];if((Ie=Oe==null?void 0:Oe.compData)!=null&&Ie.find(de=>(de==null?void 0:de.key)==="pageColumn")&&((m=(dt=(Xe=Oe==null?void 0:Oe.compData)==null?void 0:Xe.find(de=>(de==null?void 0:de.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const de=await p.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let Ee=((v=(Y=(U=(C=de==null?void 0:de.data)==null?void 0:C.result)==null?void 0:U[0])==null?void 0:Y.key)==null?void 0:v.pageKey)??"";(L=Object.values(ve))==null||L.forEach(F=>{Se.push({key:{type:"data",pageKey:Ee,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:F}})})}else(Z=Object.values(ve))==null||Z.forEach(de=>{Se.push({key:{type:"data",pageKey:M,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(me!=null&&me[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let ve=p.cloneDeep(Oe);ve.compData=(ue=(P=p.cloneDeep(ve))==null?void 0:P.compData)==null?void 0:ue.map(G=>{var Se,de;return(G==null?void 0:G.key)==="formContent"&&(G.contents=(de=(Se=p.cloneDeep(G))==null?void 0:Se.contents)==null?void 0:de.map(Ee=>{var F,fe;return(F=p.cloneDeep(H))!=null&&F[Ee==null?void 0:Ee.key]&&(Ee.value=(fe=p.cloneDeep(H))==null?void 0:fe[Ee==null?void 0:Ee.key]),Ee})),G});const $=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((R=$==null?void 0:$.data)==null?void 0:R.type)==="success"&&((se=(X=$==null?void 0:$.data)==null?void 0:X.result)==null||se.forEach(G=>{var Se,de;((de=(Se=G==null?void 0:G.value)==null?void 0:Se.pageData)==null?void 0:de.name)===(me==null?void 0:me[0])&&(ae=G.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:ve}}))}}},ee=async H=>{var M,me,be,ze,Oe,Ye,qe,lt,Q,tt,nt,Pe,ce,oe,re,Ie;_.setImportLoading(!0);try{if(H.api){let Xe=new WeakMap;(me=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:M.filter(R=>{var X,se;return((X=R==null?void 0:R.key)==null?void 0:X.pageKey)!=="menu"&&((se=R==null?void 0:R.key)==null?void 0:se.pageKey)!=="secret"}))==null||me.forEach(R=>{Xe[R.key.pageKey]?Xe[R.key.pageKey]=[...Xe[R.key.pageKey],R]:Xe[R.key.pageKey]=[R]});let m=await _e.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(m=m==null?void 0:m.map(R=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne;if((R==null?void 0:R.comp)==="Form")R.compData=(X=R.compData)==null?void 0:X.map(Ae=>{var Je;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Je=Ae.contents)==null?void 0:Je.map(Me=>{var Ve;if((Me==null?void 0:Me.value)===""&&(Me==null?void 0:Me.type)==="Select"){let ge=_e.judgeContents((Ve=p.cloneDeep(Me))==null?void 0:Ve.optionUrl,Xe);Me.value=Me.value||ge}return Me})),Ae});else if((R==null?void 0:R.comp)==="Table"&&(se=R.compData)!=null&&se.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=($=(ve=R.compData)==null?void 0:ve.find(ge=>(ge==null?void 0:ge.key)==="pageColumn"))==null?void 0:$.contents,Je=((G=(ae=R.compData)==null?void 0:ae.find(ge=>(ge==null?void 0:ge.key)==="pageGroup"))==null?void 0:G.contents)??"",Me=(Ee=(de=(Se=Ae==null?void 0:Ae.split("["))==null?void 0:Se[1])==null?void 0:de.split("]"))==null?void 0:Ee[0];C=((F=Ae==null?void 0:Ae.split("["))==null?void 0:F[0])+((ne=(fe=q.value)==null?void 0:fe.find(ge=>(ge==null?void 0:ge.key)===Me))==null?void 0:ne.value)}return R}),!(C===""||C==="")){const R=await _e.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);m=m==null?void 0:m.map(X=>{var se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je;if((X==null?void 0:X.comp)==="Table"&&(se=X.compData)!=null&&se.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=($=(ve=X.compData)==null?void 0:ve.find(ye=>(ye==null?void 0:ye.key)==="pageColumn"))==null?void 0:$.contents,Ve=((G=(ae=X.compData)==null?void 0:ae.find(ye=>(ye==null?void 0:ye.key)==="pageGroup"))==null?void 0:G.contents)??"",ge=(Ee=(de=(Se=Me==null?void 0:Me.split("["))==null?void 0:Se[1])==null?void 0:de.split("]"))==null?void 0:Ee[0],ct=((F=Me==null?void 0:Me.split("["))==null?void 0:F[0])+((ne=(fe=q.value)==null?void 0:fe.find(ye=>(ye==null?void 0:ye.key)===ge))==null?void 0:ne.value),je=(Ae=R==null?void 0:R.find(ye=>(ye==null?void 0:ye.name)===(Ve===""?c==null?void 0:c.compName:Ve)))==null?void 0:Ae.compData;X.compData=(Je=X.compData)==null?void 0:Je.map(ye=>{var we;return(ye==null?void 0:ye.key)==="tableContents"&&(ye.contents=(we=je==null?void 0:je.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:we.contents),ye})}return X})}let U={};if(((ze=(be=H==null?void 0:H.extraValues)==null?void 0:be.input)==null?void 0:ze.length)>0){const R=(Ye=(Oe=H==null?void 0:H.extraValues)==null?void 0:Oe.input)==null?void 0:Ye.map(async X=>{var se;he!=null&&he.find(ve=>ve===X)?U=await Be(X,m):U[Object.keys(X)[0]]=await Be((se=Object.values(X))==null?void 0:se[0],m,Xe)});await Promise.all(R)}else U=await Be("/",m);let Y=!1;(lt=(qe=H==null?void 0:H.extraValues)==null?void 0:qe.output)==null||lt.forEach(R=>{var X,se;(se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc")&&(Y=!0)});let v;if(Y){const R=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(H.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{R.close()})}else v=await p.axios.post(H.api,U,{headers:{"Content-Type":"application/json"}});let L=(Pe=(nt=(tt=(Q=p.cloneDeep(H))==null?void 0:Q.extraValues)==null?void 0:tt.output)==null?void 0:nt.map(R=>{var X,se,ve,$,ae,G,Se,de,Ee,F,fe,ne,Ae,Je,Me,Ve;if(!((se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc"))){let ge=(F=(Ee=(de=($=p.cloneDeep((ve=Object.values(R))==null?void 0:ve[0]))==null?void 0:$.split("["))==null?void 0:de[((Se=(G=p.cloneDeep((ae=Object.values(R))==null?void 0:ae[0]))==null?void 0:G.split("["))==null?void 0:Se.length)-1])==null?void 0:Ee.split("]"))==null?void 0:F[0],ct=ge==null?void 0:ge.split(":"),je=(Ae=p.cloneDeep((fe=Object.values(R))==null?void 0:fe[0]))==null?void 0:Ae.substring(0,p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]).lastIndexOf("["));if(je=(Me=p.cloneDeep(je))==null?void 0:Me.slice(0,((Je=p.cloneDeep(je))==null?void 0:Je.length)-1),je!=null&&je.includes("[")){let ye="";if((Ve=Ca(je,"/"))==null||Ve.forEach(we=>{var Qe,pe,Ne,Fe,We,N,Ce;if(!(we!=null&&we.includes("[")))ye=ye===""?ye+we.replaceAll("/",""):ye+"/"+we.replaceAll("/","");else{let ut=p.cloneDeep(we).slice(1,((Qe=p.cloneDeep(we))==null?void 0:Qe.length)-1),et=(N=(We=(Fe=(Ne=(pe=p.cloneDeep(ut))==null?void 0:pe.split("["))==null?void 0:Ne[1])==null?void 0:Fe.split("]"))==null?void 0:We[0])==null?void 0:N.split(":"),ft="",rt=(Ce=m==null?void 0:m.find(Te=>(Te==null?void 0:Te.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Te=>{var Ze;(Te==null?void 0:Te.key)==="formContent"&&((Ze=Te==null?void 0:Te.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),ye=ye===""?ye+ft.replaceAll("/",""):ye+"/"+ft.replaceAll("/","")}}),je=ye,je[(je==null?void 0:je.length)-1]!=="/")return je}}}))==null?void 0:Pe.filter(R=>R);L=[...new Set(p.cloneDeep(L))];let Z=L==null?void 0:L.map(async R=>{let X=await _e.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((X==null?void 0:X.length)===0)return await _e.getParentContents(R)});await Promise.all(Z);let P=[],ue=(re=(oe=(ce=p.cloneDeep(H))==null?void 0:ce.extraValues)==null?void 0:oe.output)==null?void 0:re.map(async R=>{var de,Ee,F,fe,ne,Ae,Je,Me,Ve,ge,ct,je,ye,we,Qe,pe,Ne,Fe,We,N,Ce,ut,et,ft,rt,Te,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Kt,Ft,Vt,Ht,xn,dn,wn,_n,fn,Sn,hn,Tn,vn,Gn,Xn,Yn,$n,In,gn,Mn,Bn,nn,Dn,bt,Yt,gt,Jn,Mt,mn,An,an,Nn,Qt,jn;if((Ee=(de=Object.values(R))==null?void 0:de[0])!=null&&Ee.includes(".doc")){var X=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),se=v.headers["content-disposition"],ve=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),$=ve.exec(se),ae=$==null?void 0:$[1],G=document.createElement("a"),Se=window.URL.createObjectURL(X);x.value=[{name:ae,blobUrl:Se}],d.value=!0}else{let yn=(ge=(Ve=(Me=(fe=p.cloneDeep((F=Object.values(R))==null?void 0:F[0]))==null?void 0:fe.split("["))==null?void 0:Me[((Je=(Ae=p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]))==null?void 0:Ae.split("["))==null?void 0:Je.length)-1])==null?void 0:Ve.split("]"))==null?void 0:ge[0],zt=yn==null?void 0:yn.split(":"),qt=(ye=p.cloneDeep((ct=Object.values(R))==null?void 0:ct[0]))==null?void 0:ye.substring(0,p.cloneDeep((je=Object.values(R))==null?void 0:je[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Qe=p.cloneDeep(qt))==null?void 0:Qe.slice(0,((we=p.cloneDeep(qt))==null?void 0:we.length)-1):qt===""&&(qt=w.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Dt="";(pe=Ca(qt,"/"))==null||pe.forEach((Nt,Ut)=>{var Wt,$t,sn,ln,Kn,Qn,Un,Zn,Na,sa,ma;if(!(Nt!=null&&Nt.includes("[")))Dt=Dt===""?Dt+Nt.replaceAll("/",""):Dt+"/"+Nt.replaceAll("/","");else{let ca="",bn="";(Wt=p.cloneDeep(Nt))!=null&&Wt.includes("]")?(ca=p.cloneDeep(Nt).slice(1,(($t=p.cloneDeep(Nt))==null?void 0:$t.length)-1),bn=(Un=(Qn=(Kn=(ln=(sn=p.cloneDeep(ca))==null?void 0:sn.split("["))==null?void 0:ln[1])==null?void 0:Kn.split("]"))==null?void 0:Qn[0])==null?void 0:Un.split(":")):(ca=p.cloneDeep(Nt).slice(1,(Zn=p.cloneDeep(Nt))==null?void 0:Zn.length),bn=(Na=p.cloneDeep(ca))==null?void 0:Na.split("/"));let ea="",ua=(sa=m==null?void 0:m.find(rn=>(rn==null?void 0:rn.name)===(bn==null?void 0:bn[0])))==null?void 0:sa.compData;ua==null||ua.forEach(rn=>{var Va;(rn==null?void 0:rn.key)==="formContent"&&((Va=rn==null?void 0:rn.contents)==null||Va.forEach(Wn=>{(Wn==null?void 0:Wn.key)===(bn==null?void 0:bn[1])&&(ea=Wn==null?void 0:Wn.value)}))}),((ma=Ca(qt,"/"))==null?void 0:ma.length)-1!==Ut?Dt=Dt===""?Dt+ea.replaceAll("/",""):Dt+"/"+ea.replaceAll("/",""):Dt=Dt+l.value+ea.replaceAll("/","")}}),(Ne=w.value)!=null&&Ne.includes(Dt)?qt=w.value:qt=Dt}let on=p.cloneDeep((Fe=Object.keys(R))==null?void 0:Fe[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((N=v==null?void 0:v.data)==null?void 0:N.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[on]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[on])&&(zt==null?void 0:zt.length)===1)return await te(((Te=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Te[on])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[on]),p.cloneDeep(qt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[on]||(Bt=(It=v==null?void 0:v.data)==null?void 0:It.result)!=null&&Bt[on]){let Dt=await Ke(((wt=(xt=v==null?void 0:v.data)==null?void 0:xt.data)==null?void 0:wt[on])||((At=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:At[on]),p.cloneDeep(qt),zt);return Dt&&(P=[...P,...Dt]),Dt}else{if(!((Kt=v==null?void 0:v.data)!=null&&Kt.data)){let Dt=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Dt=Dt==null?void 0:Dt.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(zt==null?void 0:zt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map($t=>{var sn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(sn=$t.contents)==null?void 0:sn.map(ln=>{var Kn,Qn;return(ln==null?void 0:ln.key)===(zt==null?void 0:zt[1])&&(ln.value=(Qn=(Kn=v==null?void 0:v.data)==null?void 0:Kn.result)==null?void 0:Qn[on==null?void 0:on.replaceAll(":","")]),ln})),$t})),Ut});let Nt=[];(Ft=Dt==null?void 0:Dt.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ft.forEach(async Ut=>{let Wt={};for(let $t in Ut)$t!=="id"&&(Wt[$t]=Ut[$t]);Nt.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(Nt==null?void 0:Nt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Nt});return}if((zt==null?void 0:zt.length)===1){const Dt=(xn=(Ht=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:Ht.path)==null?void 0:xn.path;let Nt="";(Sn=(fn=(_n=(wn=(dn=Dt==null?void 0:Dt.split("("))==null?void 0:dn[1])==null?void 0:wn.split(")"))==null?void 0:_n[0])==null?void 0:fn.split(":"))==null||Sn.forEach($t=>{var sn,ln;Nt=Nt===""?Nt+((sn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:sn.trim()):Nt+"/"+((ln=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:ln.trim())});let Ut=[(Xn=(Gn=(vn=(Tn=(hn=Dt==null?void 0:Dt.split("<"))==null?void 0:hn[1])==null?void 0:Tn.split(">"))==null?void 0:vn[0])==null?void 0:Gn.replaceAll("'",""))==null?void 0:Xn.trim()],Wt;return(In=($n=(Yn=v==null?void 0:v.data)==null?void 0:Yn.data)==null?void 0:$n.data)!=null&&In[zt==null?void 0:zt[0]]?Wt=await te((Bn=(Mn=(gn=v==null?void 0:v.data)==null?void 0:gn.data)==null?void 0:Mn.data)==null?void 0:Bn[zt==null?void 0:zt[0]],Nt,zt,C):Wt=await xe((Dn=(nn=v==null?void 0:v.data)==null?void 0:nn.data)==null?void 0:Dn.data,Nt,Ut,Xe),Wt}else{const Dt=(gt=(Yt=(bt=v==null?void 0:v.data)==null?void 0:bt.data)==null?void 0:Yt.path)==null?void 0:gt.path;let Nt="";return(an=(An=(mn=(Mt=(Jn=Dt==null?void 0:Dt.split("("))==null?void 0:Jn[1])==null?void 0:Mt.split(")"))==null?void 0:mn[0])==null?void 0:An.split(":"))==null||an.forEach(Wt=>{var $t,sn;Nt=Nt===""?Nt+(($t=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:$t.trim()):Nt+"/"+((sn=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:sn.trim())}),await Ke((jn=(Qt=(Nn=v==null?void 0:v.data)==null?void 0:Nn.data)==null?void 0:Qt.data)==null?void 0:jn[zt==null?void 0:zt[0]],Nt,zt)}}}}});if(await Promise.all(ue),(P==null?void 0:P.length)>0){let R=[];P==null||P.forEach(ve=>{R!=null&&R.find($=>{var ae,G,Se,de;return((G=(ae=$==null?void 0:$.value)==null?void 0:ae.pageData)==null?void 0:G.name)===((de=(Se=ve==null?void 0:ve.value)==null?void 0:Se.pageData)==null?void 0:de.name)})||R.push(ve)});let X=[];R==null||R.forEach(ve=>{var G,Se,de,Ee;let $=p.cloneDeep(ve);$.value.pageData.compData=(G=$.value.pageData.compData)==null?void 0:G.map(F=>{var fe;return(F==null?void 0:F.key)==="formContent"&&(F.contents=(fe=F.contents)==null?void 0:fe.map(ne=>{var Je,Me,Ve,ge;let Ae=(Je=p.cloneDeep(P))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ne==null?void 0:ne.key));if(Ae){let ct=(ge=(Ve=(Me=Ae.value.pageData.compData)==null?void 0:Me.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:Ve.contents)==null?void 0:ge.find(je=>(je==null?void 0:je.key)===(ne==null?void 0:ne.key));ne.value=ct==null?void 0:ct.value}return ne})),F}),X.push({id:$==null?void 0:$.id,value:$==null?void 0:$.value});let ae=[];(Ee=(de=(Se=$==null?void 0:$.value)==null?void 0:Se.pageData)==null?void 0:de.compData)==null||Ee.forEach(F=>{var fe;(F==null?void 0:F.key)==="formContent"&&((fe=F==null?void 0:F.contents)==null||fe.forEach(ne=>{var Ae,Je,Me,Ve,ge,ct;if((Je=(Ae=ne==null?void 0:ne.optionUrl)==null?void 0:Ae.menuSelect)!=null&&Je.find(je=>je==null?void 0:je.includes("[")))if(ae!=null&&ae.find(je=>{var ye,we,Qe;return((ye=je==null?void 0:je.key)==null?void 0:ye.join(","))===((Qe=(we=ne==null?void 0:ne.optionUrl)==null?void 0:we.menuSelect)==null?void 0:Qe.join(","))})){let je=(Me=ae==null?void 0:ae.find(ye=>{var we,Qe,pe;return((we=ye==null?void 0:ye.key)==null?void 0:we.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))}))==null?void 0:Me.value;je.push({key:ne==null?void 0:ne.prop,groups:(Ve=ne==null?void 0:ne.optionUrl)==null?void 0:Ve.groupSelect,value:ne==null?void 0:ne.value}),ae=ae==null?void 0:ae.map(ye=>{var we,Qe,pe;return((we=ye==null?void 0:ye.key)==null?void 0:we.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))&&(ye.value=je),ye})}else ae.push({key:(ge=ne==null?void 0:ne.optionUrl)==null?void 0:ge.menuSelect,value:[{key:ne==null?void 0:ne.prop,groups:(ct=ne==null?void 0:ne.optionUrl)==null?void 0:ct.groupSelect,value:ne==null?void 0:ne.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(F=>{var ne;let fe="";return(ne=F==null?void 0:F.key)==null||ne.forEach(Ae=>{var Je;if(!(Ae!=null&&Ae.includes("[")))fe=fe===""?fe+Ae:fe+"/"+Ae;else{let Me="",Ve=(Je=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");m==null||m.forEach(ge=>{var ct;(ge==null?void 0:ge.name)===(Ve==null?void 0:Ve[0])&&((ct=ge==null?void 0:ge.compData)==null||ct.forEach(je=>{var ye;(je==null?void 0:je.key)==="formContent"&&((ye=je==null?void 0:je.contents)==null||ye.forEach(we=>{(we==null?void 0:we.prop)===(Ve==null?void 0:Ve[1])&&(Me=we==null?void 0:we.value)}))}))}),fe=fe+l.value+Me}}),F.key=fe,F})),ae==null||ae.forEach(F=>{var Je,Me,Ve;let fe=(Je=Xe[F.key])==null?void 0:Je.find(ge=>{var ct,je,ye,we,Qe,pe,Ne;return((je=(ct=ge==null?void 0:ge.value)==null?void 0:ct.pageData)==null?void 0:je.name)===((Qe=(we=(ye=F==null?void 0:F.value)==null?void 0:ye[0])==null?void 0:we.groups)==null?void 0:Qe[0])&&((Ne=(pe=ge==null?void 0:ge.value)==null?void 0:pe.pageData)==null?void 0:Ne.name)!==void 0}),ne=fe==null?void 0:fe.id,Ae=(Me=fe==null?void 0:fe.value)==null?void 0:Me.pageData;Ae.compData=(Ve=Ae.compData)==null?void 0:Ve.map(ge=>{var ct;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(ct=ge.contents)==null?void 0:ct.map(je=>{var we;let ye=(we=F.value)==null?void 0:we.find(Qe=>(Qe==null?void 0:Qe.key)===(je==null?void 0:je.prop));return ye&&(je.value=ye.value),je})),ge}),X.push({id:ne,value:{pageData:Ae}})})});let se=(Ie=p.cloneDeep(P))==null?void 0:Ie[0];(X==null?void 0:X.length)>0&&await p.batchUpdateInsofDataApi({dataList:X})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},he=["createInsofDataApi"],Ue=ho(async H=>{ee(H)},100),st=async H=>{var qe,lt,Q,tt,nt;const M=p.cloneDeep(H);let me,be=new WeakMap,ze=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(lt=(qe=ze.data.result)==null?void 0:qe.filter(Pe=>{var ce,oe;return((ce=Pe==null?void 0:Pe.key)==null?void 0:ce.pageKey)!=="menu"&&((oe=Pe==null?void 0:Pe.key)==null?void 0:oe.pageKey)!=="secret"}))==null||lt.forEach(Pe=>{be[Pe.key.pageKey]?be[Pe.key.pageKey]=[...be[Pe.key.pageKey],Pe]:be[Pe.key.pageKey]=[Pe]}),H!=null&&H[0].path&&(me=await(M==null?void 0:M.map(async(Pe,ce)=>{var U,Y,v,L,Z,P,ue,R,X,se,ve,$,ae,G,Se,de;const re=(U=be[Pe==null?void 0:Pe.path])==null?void 0:U.filter(Ee=>{var F;return((F=Ee==null?void 0:Ee.key)==null?void 0:F.type)==="data"});let Ie="";const Xe=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);re==null||re.forEach(Ee=>{var F,fe,ne,Ae,Je;((fe=(F=Ee==null?void 0:Ee.value)==null?void 0:F.tableData)==null?void 0:fe.算法名称)===((ne=M==null?void 0:M[ce])==null?void 0:ne.method)&&(Ie=(Je=(Ae=Ee==null?void 0:Ee.value)==null?void 0:Ae.tableData)==null?void 0:Je.算法体)});const dt=await _e.getItemData(Pe==null?void 0:Pe.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,be);let m="",C=(Z=(L=(v=(Y=dt==null?void 0:dt[0])==null?void 0:Y.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:L.contents)==null?void 0:Z.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(ue=(P=dt==null?void 0:dt[0])==null?void 0:P.compData)==null||ue.forEach(Ee=>{var F;(Ee==null?void 0:Ee.key)==="tableContents"&&((F=Ee==null?void 0:Ee.contents)==null||F.forEach(fe=>{fe!=null&&fe.find(ne=>ne===(Pe==null?void 0:Pe.method))&&(m=fe[C])}))}),{buttonName:((R=M==null?void 0:M[ce])==null?void 0:R.method)||((ve=(se=(X=re==null?void 0:re[0])==null?void 0:X.value)==null?void 0:se.tableData)==null?void 0:ve.算法名称),api:(Ie===""?(G=(ae=($=re==null?void 0:re[0])==null?void 0:$.value)==null?void 0:ae.tableData)==null?void 0:G.算法体:Ie)||m,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(Pe.value))==null?void 0:Se.slice(1),methodName:(Pe==null?void 0:Pe.path)??"",extraValues:(de=M==null?void 0:M[ce])==null?void 0:de.data}})));const Oe=M==null?void 0:M.map(async Pe=>{var dt,m,C,U,Y,v;const ce=(dt=ze.data.result)==null?void 0:dt.filter(L=>{var Z,P,ue;return((Z=L==null?void 0:L.key)==null?void 0:Z.parentTable)===""&&((P=L==null?void 0:L.key)==null?void 0:P.type)==="method"&&((ue=L==null?void 0:L.key)==null?void 0:ue.methodName)===L.method}),oe=ce==null?void 0:ce[0],re=(m=ze.data.result)==null?void 0:m.filter(L=>{var Z,P;return((Z=L==null?void 0:L.key)==null?void 0:Z.type)==="methodData"&&((P=L==null?void 0:L.key)==null?void 0:P.tableId)===(oe==null?void 0:oe.id)}),Ie=await _e.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,be),Xe=re==null?void 0:re[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(Y=(U=Xe==null?void 0:Xe.value)==null?void 0:U.tableData)==null?void 0:Y[0],content:Ie==null?void 0:Ie.filter(L=>L.comp!=="methodButton"),extraContent:(v=p.cloneDeep(Pe.value))==null?void 0:v.slice(1),methodName:(Pe==null?void 0:Pe.method)??""}}),Ye=(Q=H==null?void 0:H[0])!=null&&Q.path&&((tt=H==null?void 0:H[0])==null?void 0:tt.path)!==""?await Promise.all(me):await Promise.all(Oe);i.value=Ye==null?void 0:Ye.filter(Pe=>Pe==null?void 0:Pe.extraContent),(nt=i.value)==null||nt.forEach(Pe=>{var ce;Pe.api===""&&((ce=Pe.content)==null||ce.forEach(oe=>{var re;oe.comp=="Table"&&D.setExtraContents(_e.methodTableToContent(oe.compData,(re=Pe.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{W.value=="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(H,M)=>{var me,be,ze;return e.unref(W)!=="edit"?(e.openBlock(),e.createElementBlock("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=i.value)==null?void 0:me.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((Ye=Oe==null?void 0:Oe.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ue)(Oe),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(De)!==""&&((ze=e.unref(w))==null?void 0:ze[((be=e.unref(w))==null?void 0:be.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:le,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Le},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},_c=Rt._export_sfc(Ec,[["__scopeId","data-v-11fca7e0"]]),Sc={};function Tc(a,i){return" 567 "}const Ic=Rt._export_sfc(Sc,[["render",Tc]]),Bc={class:"module content"},Ac={class:"module data"},Nc={class:"module layout"},Vc={class:"form-content"},Oc=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"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),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}]}),V=q=>{var K;D.value=p.cloneDeep(q),l("change",(K=_())==null?void 0:K.compData)},O=q=>{var K,ie;if((q==null?void 0:q.buttonName)==="确认"){const w=p.cloneDeep(q==null?void 0:q.content);switch(d.value){case"create":E.value.push({...w,index:((K=E.value)==null?void 0:K.length)+1});break}l("change",(ie=_())==null?void 0:ie.compData),c.visible=!1}else c.visible=!1},W=(q,K)=>{var ie,w;switch(q){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(K,1),d.value="delete";break}},De=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,ie;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},E.value=((ie=q==null?void 0:q.find(w=>w.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(q,K)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>W("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>W("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>W("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:De,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Vc,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Mc=Rt._export_sfc(Oc,[["__scopeId","data-v-487e0536"]]),zc=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 _,V;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(V=s==null?void 0:s.stepConfig)==null?void 0:V.active}),x=(_,V)=>{c.value=V,l("clickStep",_,V)},g=_=>Tt.getComponent(_),h=()=>{var V;const _=(V=s==null?void 0:s.stepList)==null?void 0:V.find((O,W)=>W+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,V)=>{var De,q,K,ie,w;const O=e.resolveComponent("el-step"),W=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(W,{direction:(De=a.stepConfig)==null?void 0:De.direction,active:d.value,"finish-status":"success",simple:(q=a.stepConfig)==null?void 0:q.simple,"align-center":((K=a.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock(O,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=a.stepConfig)!=null&&ie.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(le=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},le||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Pc=Rt._export_sfc(zc,[["__scopeId","data-v-d7c99969"]]),Rc=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=(g,h)=>{l("clickStep",g,h)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var h,D;d.value=(h=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Pc,{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"])}}}),Fc=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})}}}),Lc=Rt._export_sfc(Fc,[["__scopeId","data-v-4172a886"]]),$c={class:"line-content"},jc={class:"line-time"},Kc=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(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Lc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:g})=>[e.createElementVNode("span",$c,e.toDisplayString(x),1),e.createElementVNode("span",jc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Rt._export_sfc(Kc,[["__scopeId","data-v-b4d9deed"]]),Wc={class:"tabs-content"},Hc={__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",Wc,[e.createVNode(Tt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},qc=Rt._export_sfc(Hc,[["__scopeId","data-v-40865f68"]]),eo=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}}}),Gc={class:"type-select"},Xc=["onClick"],Yc={class:"list-icon"},Jc={__name:"modelSelect",setup(a){const i=eo(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",Gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(lr),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(g)},[e.createElementVNode("div",Yc,[e.createVNode(x,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Xc)]))),128))])}}},Qc=Rt._export_sfc(Jc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},eu={class:"operate-content"},tu={class:"collapse-title-content"},nu={class:"collapse-title-item"},au={key:1},ou=["onClick"],lu={class:"icon-content"},ru={key:0,class:"edit-content"},iu=["onClick"],su={class:"comp-child"},cu={__name:"modelFill",setup(a){const i=eo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),g=O=>{var De;let W=(De=p.cloneDeep(x.value))==null?void 0:De.map((q,K)=>(O===K&&(q.content=!0),q));x.value=W},h=O=>{var De;let W=(De=p.cloneDeep(x.value))==null?void 0:De.map((q,K)=>(O===K&&(q.content=!1),q));x.value=W,c.value=p.cloneDeep(s.value)},D=(O,W)=>{var ie;let De=(ie=p.cloneDeep(x.value))==null?void 0:ie.map((w,z)=>(O===z&&(w.content=!1),w));x.value=De;const q=p.cloneDeep(s.value),K=q==null?void 0:q.filter((w,z)=>(z===O&&(w.name=W),w));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var O,W,De;!s.value||((O=s.value)==null?void 0:O.length)===0?c.value=[]:c.value=(W=p.cloneDeep(s.value))==null?void 0:W.filter(q=>(q==null?void 0:q.comp)!=="methodButton"),d.value=c.value,x.value=(De=p.cloneDeep(d.value))==null?void 0:De.map((q,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const E=O=>ga(O),_=(O,W,De)=>{var K,ie;if(!O)return;let q=p.cloneDeep(s.value);q=(K=q==null?void 0:q.map((w,z)=>(z===De&&(w.compData=O),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(ie=p.cloneDeep(q))==null?void 0:ie.map((w,z)=>({id:z,content:!1})),i.setOriginalData(q),i.setItemData(q)},V=O=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const W=p.cloneDeep(s.value),De=W==null?void 0:W.filter((q,K)=>K!==O);i.setOriginalData(De),i.setItemData(De),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(O,W)=>{const De=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[W[1]||(W[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",eu,[e.createVNode(kl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:q,index:K})=>{var ie,w,z,k,A,T,le,Le,ot,Be;return[e.createElementVNode("div",tu,[e.createElementVNode("div",nu,[(w=(ie=x.value)==null?void 0:ie.find(Ke=>Ke.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:q.name&&q.name!==""?"8px":"0px"})},e.toDisplayString(q.name),5)),(k=(z=x.value)==null?void 0:z.find(Ke=>Ke.id===K))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Tt._sfc_main$2,{modelValue:q.name,"onUpdate:modelValue":Ke=>q.name=Ke,onClick:W[0]||(W[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(Ke=>Ke.id===K))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ke=>g(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ou))]),e.createElementVNode("div",lu,[(Le=(le=x.value)==null?void 0:le.find(Ke=>Ke.id===K))!=null&&Le.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(De,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ke=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(De,{name:"Save",onClick:e.withModifiers(Ke=>D(K,q.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Be=(ot=x.value)==null?void 0:ot.find(Ke=>Ke.id===K))!=null&&Be.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ke=>V(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Delete",style:{width:"16px",height:"16px"}})],8,iu))])])]}),content:e.withCtx(({item:q,index:K})=>{var ie,w;return[e.createElementVNode("div",su,[e.createTextVNode(e.toDisplayString(E(q.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(q.comp+"Operate")),{itemContents:q==null?void 0:q.compData,originalItemContents:(w=(ie=d.value)==null?void 0:ie.find((z,k)=>k===K))==null?void 0:w.compData,onChange:z=>_(z,q,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},uu=Rt._export_sfc(cu,[["__scopeId","data-v-a46a44b9"]]),pu={key:0,class:"show-content"},du={style:{display:"flex"}},fu={__name:"modelShow",setup(a){const i=eo(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=>ga(d);return(d,x)=>{var g;return((g=l.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",pu,[(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",du,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)}}},hu=Rt._export_sfc(fu,[["__scopeId","data-v-3f3e863e"]]),vu={class:"tabs-header"},gu={class:"tabs-list"},mu={class:"tab-name"},yu={class:"tab-actions"},bu=["onClick"],ku=["onClick"],xu=["onClick"],wu={class:"model-operate"},Du={class:"model-select",style:{display:"unset"}},Cu={class:"existing-components"},Eu={class:"component-list"},_u=["onClick"],Su={class:"component-info"},Tu={class:"component-type"},Iu={class:"component-name"},Bu={class:"model-fill"},Au={__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(""),g=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),V=e.ref(null),O=eo(p.pinia),{itemData:W}=p.storeToRefs(O),De=()=>{x.value="新增标签页",g.value.title="",h.value=-1,d.value=!0},q=H=>{x.value="修改标签页",g.value.title=c.value[H].title,h.value=H,d.value=!0},K=H=>{const M=z(H);_.value.delete(M),c.value.splice(H,1),st()},ie=()=>{if(g.value.title.trim()){if(h.value===-1){const H={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};c.value.push(H)}else c.value[h.value].title=g.value.title,c.value[h.value].value=g.value.title,c.value[h.value].label=g.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=H=>{const M=c.value[H];return M.id||(M.id=w()),M.id},k=H=>{var be;E.value=H;const M=z(H);V.value=p.cloneDeep(W.value);let me=_.value.get(M);!me&&((be=c.value[H].children)==null?void 0:be.length)>0&&(me=Le(c.value[H].children)),me?O.setItemData(p.cloneDeep(me)):O.setItemData([]),D.value=!0},A=e.computed(()=>{const H=_e.useModelComp(p.pinia),M=p.storeToRefs(H).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(me=>{var be;if(me.comp==="Tabs"&&E.value>=0){const ze=z(E.value);if((be=me.compData)==null?void 0:be.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===ze))}))return!1}return!0})}),T=H=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[H]||H,le=H=>{var M;try{const me=p.cloneDeep(H);me.id=Date.now()+Math.random(),me.comp==="Tabs"&&((M=me.compData)==null||M.forEach(ze=>{ze.key==="stepList"&&ze.contents&&ze.contents.forEach(Oe=>{Oe.id=w()})}));const be=p.cloneDeep(W.value);be.push(me),O.setItemData(be)}catch(me){console.error("添加组件失败:",me)}},Le=H=>H.map(M=>{var me;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:ot(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Be(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((me=M.content)==null?void 0:me.originalData)||[]}}}),ot=H=>{if(!H)return[];const M=[];return H.rowContents&&M.push({key:"formContent",contents:H.rowContents}),H.buttonValue&&M.push({key:"formButton",contents:H.buttonValue}),typeof H.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:H.isEnableWrap}),M},Be=H=>[],Ke=()=>{if(E.value>=0&&E.value<c.value.length){const H=z(E.value);_.value.set(H,p.cloneDeep(W.value)),c.value[E.value].children=te(W.value),console.log("保存后的数据",te(W.value))}D.value=!1,E.value=-1,V.value=null,st()},xe=()=>{V.value&&O.setItemData(p.cloneDeep(V.value)),D.value=!1,E.value=-1,V.value=null},I=()=>{D.value&&xe()},te=H=>{if(!Array.isArray(H))throw new Error("sourceData must be an array");return H.map((M,me)=>{if(!M||typeof M!="object")return M;const{comp:be,name:ze,compData:Oe}=M;switch(be){case"Form":return{type:"form",content:ee(Oe||[]),value:"表单"};case"Table":return{type:"table",content:he(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ue(Oe||[]),value:""}}})},ee=H=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},me={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return H.forEach((be,ze)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ze}:`,be);return}const{key:Oe,contents:Ye}=be,qe=me[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},he=H=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},me={header:"columns",tableContents:"tableData"};return H.forEach((be,ze)=>{if(!be||typeof be!="object"){console.warn(`Invalid config at index ${ze}:`,be);return}const{key:Oe,contents:Ye}=be,qe=me[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=H=>(console.log("Default conversion logic - to be implemented"),{originalData:H,processed:!1,componentType:"unknown"}),st=()=>{const H=[{key:"stepList",contents:c.value}];l("change",H)};return e.watch(()=>s.itemContents,H=>{if(H&&H.length>0){const M=H.find(me=>me.key==="stepList");M&&M.contents&&(c.value=M.contents.map(me=>({title:me.title||"",value:me.value||me.title||"",label:me.label||me.title||"",children:me.children||[],id:me.id||w()})))}},{immediate:!0,deep:!0}),(H,M)=>{const me=e.resolveComponent("svg-icon"),be=e.resolveComponent("el-input"),ze=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:De},[e.createVNode(me,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",mu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",yu,[e.createElementVNode("button",{onClick:lt=>q(qe)},"修改标题",8,bu),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ku),e.createElementVNode("button",{onClick:lt=>K(qe)},"删除",8,xu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ze,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(be,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>g.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:xe},"取消"),e.createElementVNode("button",{onClick:Ke},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",wu,[e.createElementVNode("div",Du,[e.createVNode(Qc),e.createElementVNode("div",Cu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>le(Ye)},[e.createElementVNode("div",Su,[e.createElementVNode("span",Tu,e.toDisplayString(T(Ye.comp)),1),e.createElementVNode("span",Iu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,_u))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:H.innerWidth},[e.createVNode(hu)])),e.createElementVNode("div",Bu,[e.createVNode(uu)])])]),_:1},8,["modelValue"])])}}},Nu=Rt._export_sfc(Au,[["__scopeId","data-v-9096ed0d"]]);function Vu(){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 Ou(a){return{type:"line",...a}}function Mu(){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 zu(a){return{type:"bar",barWidth:"60%",...a}}function Pu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Ln={line:{initBaseoptions:Vu,initSeries:Ou},bar:{initBaseoptions:Mu,initSeries:zu},pie:{initBaseoptions:Pu,initSeries:Ru}},Lo=_e.useMenuState(p.pinia),Al=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},g=a==null?void 0:a.find(_=>{const{name:V}=_;return V===c});if(!g)return{names:s,values:l};const h=(E=g==null?void 0:g.compData)==null?void 0:E.find(_=>{const{key:V}=_;return V==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const V=_==null?void 0:_[0];let O=!1;p.isObject(V)&&(V!=null&&V.id)&&(O=!0);let W=d,De=x;O&&(W=W+1,De=De+1);const q=_==null?void 0:_[W],K=_==null?void 0:_[De];s.push(q),l.push(K)}),{names:s,values:l}},Fu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let g=null;const h=sessionStorage.getItem("systemKey");if(x&&Lo.activeMenuPath&&(g=await _e.getItemData(`${Lo.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");g=await _e.getItemData(`${D}^${s}`,h,"")}return Al(g,{group:l,nameCol:c,valueCol:d})},Lu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),g=await _e.getItemData(d,x,"");return Al(g,{group:s,nameCol:l,valueCol:c})},vo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:g,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return g&&h&&Tt.isNumber(D)&&Tt.isNumber(E)?await Fu({menu:l,mainKey:g,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Tt.isNumber(d)&&Tt.isNumber(x)?await Lu({menu:l,group:c,nameCol:d,valueCol:x}):s},$u=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},ju=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Ln==null?void 0:Ln[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await vo(i,s);if(!D||!E)return h;const _=[];for(let O=0;O<D.length;O++){const W=D[O],De=E[O];_.push({name:W,value:De})}const V=g({data:_});return h.series.push(V),h},Uu=async(a=[])=>{var x,g,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((g=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:g.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 $u({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await ju({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},Wu=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 Uu(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(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Hu=Rt._export_sfc(Wu,[["__scopeId","data-v-d4c081e8"]]),qu={class:"chart-module layout"},Gu={class:"chart-module content"},Xu={class:"chart-module content"},Yu={class:"form-content"},Ju={class:"dialog-footer"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np=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:""}],g=e.ref({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(oe=>{var Ie;const re=oe==null?void 0:oe.prop;oe.value=(Ie=g==null?void 0:g.value)==null?void 0:Ie[re]}),c.visible=!0},D=ce=>{g.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=nt())==null?void 0:ce.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),V=e.ref([]),O=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],W=e.ref({}),De=()=>{const ce=V.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=W.value)==null?void 0:Xe[Ie]}),oe},q=ce=>{var re;W.value=ce;const oe=De();V.value=oe,l("change",(re=nt())==null?void 0:re.compData)},K=async()=>{const ce=await _e.getMenusContent(),oe=De();oe==null||oe.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),V.value=oe,_.visible=!0,await Ye(W.value.menu),await Q(W.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{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 ce=w.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Ie]}),oe},T=ce=>{var re;k.value=ce;const oe=A();w.value=oe,l("change",(re=nt())==null?void 0:re.compData)},le=async()=>{await I();const ce=p.cloneDeep(Le.value),oe=A();oe==null||oe.forEach(re=>{var Xe;const Ie=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Ie],Ie==="mainKey"&&(re.contents=ce)}),w.value=oe,ie.visible=!0},Le=e.ref([]),ot=e.ref([]),Be=e.ref({}),Ke=e.ref({}),xe=()=>{const{compData:ce}=be.value||{},oe=ce==null?void 0:ce.find(U=>{const{key:Y}=U;return Y==="header"}),re=(oe==null?void 0:oe.contents)||[],Ie=re==null?void 0:re.filter((U,Y)=>{const{label:v}=U;return v!=="操作"}),Xe=Ie==null?void 0:Ie.findIndex((U,Y)=>{const{isMainKey:v}=U;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(U=>{const{key:Y}=U;return Y==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(U=>{const Y=U==null?void 0:U[0];let v=Xe;p.isObject(Y)&&(Y!=null&&Y.id)&&(v=v+1);const L=U==null?void 0:U[v];return{label:L,value:L}})},I=async()=>{const ce=await xe();Le.value=ce},te=async ce=>{const oe=sessionStorage.getItem("systemKey");return await _e.getItemData(ce,oe,"")},ee=async ce=>{const oe=ce;ot.value=oe==null?void 0:oe.map(re=>{const{name:Ie}=re;return Be.value[Ie]=re,{label:Ie,value:Ie}})},he=ce=>{const{comp:oe,compData:re}=Ke.value||{};if(oe==="Table"){let Ie=A();Ie=Ie.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Ie,re),w.value=Ie}},Ue=async()=>{var re,Ie;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,oe=(Ie=W==null?void 0:W.value)==null?void 0:Ie.menu;if(ce){const dt=`${oe==null?void 0:oe.join("/")}^${ce}`,m=await te(dt);await ee(m);const C=A();C==null||C.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=ot.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,oe)=>{ce!=oe&&ce&&await Ue()});const st=async ce=>{const oe=Be.value[ce];Ke.value=oe,await he()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&ce&&st(ce)});const H=async()=>{var oe;await Ue();const ce=(oe=k.value)==null?void 0:oe.group;await st(ce)},M=e.ref([]),me=e.ref({}),be=e.ref({}),ze=async ce=>{const oe=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await _e.getItemData(oe,re,"")},Oe=async ce=>{const oe=await ze(ce);M.value=oe==null?void 0:oe.map(re=>{const{name:Ie}=re;return me.value[Ie]=re,{label:Ie,value:Ie}})},Ye=async(ce,oe)=>{await Oe(ce);const re=De();re==null||re.forEach(Ie=>{(Ie==null?void 0:Ie.prop)==="group"&&(Ie.contents=M.value)}),V.value=re};e.watch(()=>{var ce;return(ce=W==null?void 0:W.value)==null?void 0:ce.menu},async(ce,oe)=>{const re=ce==null?void 0:ce.join("/"),Ie=oe==null?void 0:oe.join("/");re!=Ie&&await Ye(ce)});const qe=(ce,oe)=>{const re=oe==null?void 0:oe.find(m=>{const{key:C}=m;return C==="header"}),Ie=(re==null?void 0:re.contents)||[],Xe=Ie==null?void 0:Ie.filter((m,C)=>{const{label:U}=m;return U!=="操作"}),dt=Xe==null?void 0:Xe.map((m,C)=>{const{label:U}=m;return{label:U,value:C}});ce==null||ce.forEach(m=>{const C=m==null?void 0:m.prop;(C==="nameCol"||C==="valueCol")&&(m.contents=dt)})},lt=ce=>{const{comp:oe,compData:re}=be.value||{};if(oe==="Table"){W.value.formItems=[];let Ie=De();Ie=Ie.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Ie,re),V.value=Ie}},Q=async ce=>{const oe=me.value[ce];be.value=oe,await lt()};e.watch(()=>{var ce;return(ce=W==null?void 0:W.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&Q(ce)});const tt=async()=>{var re,Ie;const ce=(re=W.value)==null?void 0:re.menu;await Ye(ce);const oe=(Ie=W.value)==null?void 0:Ie.group;await Q(oe)},nt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:W.value},{key:"chartDetailConfig",contents:k.value}]}),Pe=()=>{c.visible=!1,_.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var oe,re,Ie;V.value=O(),w.value=z();const ce=s==null?void 0:s.itemContents;g.value=((oe=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},W.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Ie=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Ie.contents)??{},await H()}),(ce,oe)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[0]||(oe[0]=Ie=>h())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Gu,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[1]||(oe[1]=Ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[2]||(oe[2]=Ie=>le())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Pe,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ju,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:Pe,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:Pe,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(re,{class:"cancel-button button",onClick:Pe,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ap=Rt._export_sfc(np,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},op=Ka.exports,$o;function lp(){return $o||($o=1,function(a,i){(function(s,l){l()})(op,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 V=new XMLHttpRequest;V.open("GET",D),V.responseType="blob",V.onload=function(){h(V.response,E,_)},V.onerror=function(){console.error("could not download file")},V.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 fa.commonjsGlobal=="object"&&fa.commonjsGlobal.global===fa.commonjsGlobal?fa.commonjsGlobal:void 0,g=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&&!g?function(D,E,_){var V=x.URL||x.webkitURL,O=document.createElement("a");E=E||D.name||"download",O.download=E,O.rel="noopener",typeof D=="string"?(O.href=D,O.origin===location.origin?d(O):c(O.href)?l(D,E,_):d(O,O.target="_blank")):(O.href=V.createObjectURL(D),setTimeout(function(){V.revokeObjectURL(O.href)},4e4),setTimeout(function(){d(O)},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 V=document.createElement("a");V.href=D,V.target="_blank",setTimeout(function(){d(V)})}}:function(D,E,_,V){if(V=V||open("","_blank"),V&&(V.document.title=V.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var O=D.type==="application/octet-stream",W=/constructor/i.test(x.HTMLElement)||x.safari,De=/CriOS\/[\d]+/.test(navigator.userAgent);if((De||O&&W||g)&&typeof FileReader<"u"){var q=new FileReader;q.onloadend=function(){var w=q.result;w=De?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),V?V.location.href=w:location=w,V=null},q.readAsDataURL(D)}else{var K=x.URL||x.webkitURL,ie=K.createObjectURL(D);V?V.location=ie:location.href=ie,V=null,setTimeout(function(){K.revokeObjectURL(ie)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}lp();const ra=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(ra),Lt=_e.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:rp,itemGridData:aa,curStructureCompIds:jo,isSubmitCurStructure:ip,isRefreshCurStructure:sp,freshContent:Ko,routeToChildPath:cp,payloadTypes:up,pageMapState:Xa,itemExtendData:Fa}=p.storeToRefs(Lt),pn=_e.useMenuState(p.pinia),{activeTopMenuPath:pp,activeMenuPath:Pt,platform:tf,activeAsideMenu:dp,buttonTriggerType:fp}=p.storeToRefs(pn),kn=da.useUnit(p.pinia),{selectTitle:Uo}=p.storeToRefs(kn),hp=_e.useOriginalState(p.pinia),{originalPath:to}=p.storeToRefs(hp),Wo=_e.useAuthorityState(p.pinia),Ya=e.ref(!0),Ta=e.ref(0),go=e.ref([]),Ia=e.computed(async()=>{var i,s;const a=(i=Pt.value)!=null&&i.startsWith("/")?(s=Pt.value)==null?void 0:s.substring(1):Pt.value;return(a==null?void 0:a.includes(to.value))||await Cp(a)}),vp=()=>{Lt.setItemGridData([]),Lt.setIsEdit("edit"),Lt.setSubmitCurStructure(Pt.value!=="/平台管理/菜单管理")},gp=()=>{Lt.setIsEdit("view"),Lt.setRefreshCurStructure(!0)},mp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Uo.value.length===1)Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.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);Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),l,!1,[],await Ia.value);let c=-1;(i=Uo.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(""))}Et.value=Aa(Et.value),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value)},ro=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 g=await x(d);if(((c=g==null?void 0:g.data)==null?void 0:c.code)===200)return g.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Ho=async(a,i,s,l)=>{var c,d,x,g,h,D,E,_,V,O,W;try{const De=(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}})),q=(g=(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:g.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),K=JSON.parse(p.cloneDeep(JSON.stringify(a))),ie=(h=K==null?void 0:K.results)==null?void 0:h.map(k=>k.id);let w;s?w=(_=(E=(D=Xa.value)==null?void 0:D[Pt.value])==null?void 0:E.filter(k=>{var A,T,le;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((le=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:le.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):w=(W=(O=(V=Xa.value)==null?void 0:V[Pt.value])==null?void 0:O.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:W.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(ie!=null&&ie.includes(k))&&typeof k=="number");(De==null?void 0:De.length)>0&&await p.batchAddInsofDataApi({dataList:De}),(q==null?void 0:q.length)>0&&await p.batchUpdateInsofDataApi({dataList:q}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(De){throw new Error(De)}},yp=async a=>{var D,E,_,V,O,W,De,q,K,ie;pn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(rp.value)));if(!ip.value)return pn.setCacheStructures({key:fp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),l=s.filter(w=>{var z;return!((z=jo.value)!=null&&z.includes(w))}),c=(D=jo.value)==null?void 0:D.filter(w=>!s.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(ro(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(ro(x,"create",a)),g&&(g==null?void 0:g.length)>0&&h.push(ro(g,"update",a)),aa.value&&((E=aa.value)!=null&&E.isDelete&&((V=(_=aa.value)==null?void 0:_.results)==null?void 0:V.length)>0&&((W=(O=aa.value)==null?void 0:O.results)!=null&&W.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(De=aa.value)==null?void 0:De.results}):(console.log("itemGridData.value",aa.value),h.push(await Ho(aa.value,"gridLayout")))),Fa.value)for(const w in Fa.value)h.push(await Ho((q=Fa.value)==null?void 0:q[w],"extend",{target:w,compId:(ie=(K=Fa.value)==null?void 0:K[w])==null?void 0:ie.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Lt.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),pn.setContentLoading(!1)},mo=a=>ga(a),Et=e.ref([]),bp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nl=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),kp=async a=>{var l,c,d,x,g,h;let i=p.cloneDeep(Pt).value;i=i+to.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=(g=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:g.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("删除响应失败"),Lt.setTableLoading(!1)}},qo=async a=>{var i,s;try{let l=p.cloneDeep(Pt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var g;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+to.value+((g=Object.values(x==null?void 0:x.singleContent))==null?void 0:g[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var g;return((g=x==null?void 0:x.data)==null?void 0:g.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))),g=await p.batchDeleteInsofDataApi({ids:x});((s=g==null?void 0:g.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 kp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Lt.setTableLoading(!1)}},xp=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:Pt.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)}},Vl=e.ref(0),Ja=e.ref(null),yo=async(a,i="data",s)=>{var l,c,d,x,g,h,D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T;if(Ja.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await qo(a):await _e.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ra.setLogRecordAsync({type:"删除",data:a},Pt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(le=>typeof(le==null?void 0:le.id)=="string")){const le=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Le=>({content:a==null?void 0:a.content,singleContent:Le,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 qo(le)}else{const le=(g=a==null?void 0:a.selectItems)==null?void 0:g.map(Le=>Le==null?void 0:Le.id);await p.batchDeleteInsofDataApi({ids:le}),await ra.setLogRecordAsync({type:"删除",data:le},Pt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let le={};for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);const Le=await _e.addTableContents(i,Pt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a,{param:s});Ja.value={resId:Le,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Lt.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let le=[],Le=[],ot=((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,Ke="",xe="";if(ot!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((V=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:V.id)!="string"){const I=await p.getInsofDataApi({id:ot});Ke=((q=(De=(W=(O=I==null?void 0:I.data)==null?void 0:O.result)==null?void 0:W[0])==null?void 0:De.key)==null?void 0:q.tableId)??"",xe=((z=(w=(ie=(K=I==null?void 0:I.data)==null?void 0:K.result)==null?void 0:ie[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(I=>{let te={};for(let ee in I)ee!=="id"&&ee!=="index"&&(te[ee]=I[ee]);typeof(I==null?void 0:I.id)=="number"?le.push({id:I==null?void 0:I.id,value:{tableData:te}}):Le.push({key:{type:i,pageKey:Be||xe||Pt.value,tableId:Ke||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Le==null?void 0:Le.length)>0&&await p.batchAddInsofDataApi({dataList:Le}),(le==null?void 0:le.length)>0&&await p.batchUpdateInsofDataApi({dataList:le})}else{let le={},Le=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);await _e.fixTableContents(i,Pt.value,a==null?void 0:a.index,Le,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a)}Lt.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await xp(a==null?void 0:a.value);Lt.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(le=>le==null?void 0:le.isMainKey)||(Et.value=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value)),Et.value=Aa(Et.value),wo.value&&(a==null?void 0:a.buttonName)!=="删除"&&Lt.setRefreshCurStructure(!0)},wp=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},bo=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await wp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await _e.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(g=>g.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(pn.setActiveMenuPath(null),pn.setActiveMenuPath(i))},ko=a=>{Et.value=Aa(a),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value)},Dp=async a=>{var i;await e.nextTick(),(i=dp.value)!=null&&i.isRouter?Wo.setRouterPageStructure(a):Wo.setRouterPageStructure([])},Cp=async a=>{var d,x,g,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,V)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-2>V&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,V)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-1>V&&(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=(g=l==null?void 0:l.data)==null?void 0:g.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},Ep=e.ref(),Fn=e.ref(null),_p=a=>{var D,E,_,V,O,W,De,q,K,ie,w,z,k,A,T,le,Le,ot,Be,Ke;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(xe=>{var I;return((I=xe==null?void 0:xe.key)==null?void 0:I.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Ep.value=i;const s=(V=(_=i==null?void 0:i.find(xe=>{var I,te,ee;return(ee=(te=(I=xe==null?void 0:xe.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:_.value)==null?void 0:V.tableData;if(!s)return Fn.value=null;const l=(De=(W=(O=i==null?void 0:i.find(xe=>{var I,te,ee;return(ee=(te=(I=xe==null?void 0:xe.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:O.key)==null?void 0:W.relatedInfo)==null?void 0:De.compId,c=(q=Et.value)==null?void 0:q.find(xe=>(xe==null?void 0:xe.id)===l);if(!c)return Fn.value=null;const d=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(xe=>(xe==null?void 0:xe.prop)===d),g=(Le=(le=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:T.contents)==null?void 0:le.find(xe=>xe==null?void 0:xe.isMainKey))==null?void 0:Le.prop,h=(Ke=(Be=(ot=c==null?void 0:c.compData)==null?void 0:ot.find(xe=>(xe==null?void 0:xe.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:Ke[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:g},console.log("getPageExtendData:",s,i)},Sp=()=>{var a,i;console.log("倒计时结束时"),_e.ElMessageBox.alert(`超时未提交,【${(i=(a=Pt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ol=()=>{var a,i,s,l;try{if(pp.value!=="报告中心"||!((a=Pt.value)!=null&&a.includes(to.value)))return;const c=(i=Et.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,g=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(d==null?void 0:d.value)&&Lt.setLockingPage(Pt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},xo=e.ref([]),Tp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Pt.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(()=>[Pt.value,sp.value],async a=>{var d,x,g,h,D,E,_,V;if(!Pt.value)return;Lt.setLockingPage(""),Et.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("/")?(g=a==null?void 0:a[0])==null?void 0:g.substring(1):a==null?void 0:a[0];let l=new WeakMap;(D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:up.value})).data.result)==null?void 0:h.filter(O=>{var W,De;return((W=O==null?void 0:O.key)==null?void 0:W.pageKey)!=="menu"&&((De=O==null?void 0:O.key)==null?void 0:De.pageKey)!=="secret"}))==null||D.forEach(O=>{l[O.key.pageKey]?l[O.key.pageKey]=[...l[O.key.pageKey],O]:l[O.key.pageKey]=[O]}),go.value=l,s?(pn.setContentLoading(!0),sessionStorage.setItem("pageKey",Pt.value),Et.value=await _e.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,l),await ra.setLogRecordAsync({type:"查询",data:Et.value},Pt.value),Et.value=Aa(Et.value),await Dp(Et.value),Ol(),_p(s),xo.value=(E=Et.value)==null?void 0:E.map(O=>({label:O==null?void 0:O.name,value:O==null?void 0:O.id})),Lt.setExtraContents([]),kn.setSelectTitle([]),kn.setSelectIndex(""),kn.setSelectMenu(""),Lt.setItemData(Et.value),Lt.setOriginalData(Et.value),Lt.setCurStructureCompIds((_=Et.value)==null?void 0:_.map(O=>O==null?void 0:O.id)),Lt.setRefreshCurStructure(!1),kn.setSelectTitle((V=Pt.value)==null?void 0:V.split("/").map(O=>({value:O.trim()}))),pn.setChildMenu(""),pn.setContentLoading(!1),Lt.setTableLoading(!1),Ua.value=!1):(Et.value=[],Ua.value=!1),e.nextTick(()=>{Ta.value=Ta.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Ko.value,async()=>{if(Ko.value){let a=await _e.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value);Et.value=Aa(a),Lt.setFreshContent(!1),Ol()}},{deep:!0});const Ip=async()=>{var c,d,x,g,h,D,E,_;pn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ra.value)==null?void 0:c.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=Ra.value)==null?void 0:x.account)||((g=Ra.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(V=>V==null?void 0:V.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(V=>V==null?void 0:V.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(V=>V!==null&&V))&&(await p.batchDeleteInsofDataApi({ids:s}),await ra.setLogRecordAsync({type:"删除",data:s},Pt.value)),pn.setActiveMenuPath(cp.value),Et.value=null,Lt.setRouteToChildPath(""),pn.setChildMenu("")},Bp=a=>new RegExp("button","i").test(a),Ap=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ml=a=>{if(Ap(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&pn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Np=a=>{Vl.value=a},ha=e.reactive({index:0,comp:null}),Vp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Op(i,s)}))}),Pl=(a,i)=>{var h,D,E,_,V;const s=i?a:a-2,l=(h=Et.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(O=>(O==null?void 0:O.isMainKey)&&(O==null?void 0:O.label)!=="操作"),x=d===-1?0:d,g=(V=(_=l==null?void 0:l.compData)==null?void 0:_.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:V.contents;return{valid:g==null?void 0:g.every(O=>O==null?void 0:O[x+1]),length:(g==null?void 0:g.length)||0}},Op=(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}=Pl(i,!0);ha.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Rl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=Et.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:g}=Pl(i);g?(ha.index=i,ha.comp=(d=Et.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=i,ha.comp=(x=Et.value)==null?void 0:x[a]},wo=e.computed(()=>{var a,i;return(i=(a=Nl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>wo.value,a=>{a&&Rl(0)},{immediate:!0});const Mp={class:"layout"},zp=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:V}=_;return V==="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:V}=_;return V==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const V=[];if(D=D.map(O=>{const W=O.span;return W?(O.span=Number(W),_=_+O.span):V.push(O),O}),_<24){const O=Math.floor((24-_)/E);V.forEach(W=>{W.span=O})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var O;const _=e.resolveComponent("el-col"),V=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Mp,[e.createVNode(V,{style:e.normalizeStyle({height:(O=d.value)==null?void 0:O.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(W,De)=>(e.openBlock(),e.createBlock(_,{span:W==null?void 0:W.span},{default:e.withCtx(()=>{var q;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(mo)(W.comp)),{key:e.unref(Ta),compName:W.name,index:(W==null?void 0:W.id)??De,height:(q=d.value)==null?void 0:q.height,itemData:W==null?void 0:W.compData,childItemData:W==null?void 0:W.itemChildData,onChange:e.unref(yo),onContentChange:e.unref(bo),onPageChange:e.unref(ko),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Pp=Rt._export_sfc(zp,[["__scopeId","data-v-ab9a36ed"]]),Rp={class:"layout-operate"},Fp={class:"layout-module"},Lp={class:"collapse-title-item"},$p={class:"collapse-title"},jp={class:"icon-content"},Kp=["onClick"],Up={class:"comp-child"},Wp=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(()=>{De()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),g=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],V=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),O=e.computed(()=>{const k=V==null?void 0:V.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="baseConfig"});return A==null?void 0:A.contents}),W=e.computed(()=>{const k=V==null?void 0:V.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="children"});return A==null?void 0:A.contents}),De=()=>{var k;c.value=V.value||{},D.value=(W==null?void 0:W.value)||[],x.value=g(),x.value=(k=x.value)==null?void 0:k.map(A=>{var le;const{prop:T}=A;return A.value=(le=O.value)==null?void 0:le[T],A})};e.watch(()=>{var k;return(k=W==null?void 0:W.value)==null?void 0:k.length},()=>{var k;D.value=(W==null?void 0:W.value)||[],E.value=(k=W.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const q=(k,A)=>{const T=p.cloneDeep(W==null?void 0:W.value);T[A].span=k.span,D.value=T,l("change",z(),!0)},K=k=>ga(k),ie=(k,A,T)=>{if(!k)return;const le=p.cloneDeep(W==null?void 0:W.value);le[T]&&(le[T].compData=k,D.value=le,l("change",z(),!0))},w=k=>{_e.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(W==null?void 0:W.value);A=A==null?void 0:A.filter((T,le)=>k!==le),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({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",Rp,[e.createElementVNode("div",Fp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Tt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=le=>h(le))},null,8,["rowContents"])])]),e.createVNode(kl.default,{class:"collapse-content",collapseContents:W.value},{title:e.withCtx(({item:le,index:Le})=>[e.createElementVNode("div",Lp,[e.createElementVNode("div",$p,e.toDisplayString(le.name),1),e.createElementVNode("div",jp,[e.createElementVNode("div",{onClick:e.withModifiers(ot=>w(Le),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Kp)])])]),content:e.withCtx(({item:le,index:Le})=>[e.createElementVNode("div",Up,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:E.value[Le],key:Le,isEnableWrap:!0,onChange:ot=>q(ot,Le)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(le.comp+"Operate")),{itemContents:le==null?void 0:le.compData,originalItemContents:le.compData,onChange:ot=>ie(ot,le,Le)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Hp=Rt._export_sfc(Wp,[["__scopeId","data-v-ba05456e"]]),qp=typeof window<"u";var Go;qp&&((Go=window==null?void 0:window.navigator)!=null&&Go.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(a){return a==null}function Fl(){}const Gp=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(Gp)));function Xp(){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 Xo(a,i=16){if(typeof a!="function")return Fl;const s=(...d)=>{a(...d)};if(i<=0)return Ll(s);let l=0,c;return function(...d){const x=Date.now(),g=x-l;clearTimeout(c),g>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-g))}}function Yp(a,i=100){if(typeof a!="function")return Fl;const s=(...c)=>{a(...c)};if(i<=0)return Ll(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Ll(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 Ea=new Set,$l=new WeakMap;function Jp(){Ea.forEach(a=>{a(...$l.get(a))}),Ea.clear()}function tn(a,...i){if(typeof a!="function")return a;$l.set(a,i),!Ea.has(a)&&(Ea.add(a),Ea.size===1&&Promise.resolve().then(Jp))}const jl=Symbol("LAYOUT_KEY"),Kl=Symbol("EMITTER_KEY");function Qp(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 uo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Zp(a[s]);return i}function Zp(a){return{...a}}function Ul(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=Hl(a),c=ql(a),d=Array(a.length);for(let x=0,g=c.length;x<g;x++){let h=c[x];h.static||(h=ed(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function ed(a,i,s,l){if(s)for(;i.y>0&&!_a(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!_a(a,i);)i.y--}let c;for(;c=_a(a,i);)i.y=c.y+c.h;return i}function td(a,i){const s=Hl(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(;_a(s,d);)d.y++}return a}function Yo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function _a(a,i){for(let s=0,l=a.length;s<l;s++)if(Ul(a[s],i))return a[s]}function Wl(a,i){return a.filter(s=>Ul(s,i))}function Hl(a){return a.filter(i=>i.static)}function po(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,g=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=ql(a);h&&(D=D.reverse());const E=Wl(D,i);if(d&&E.length)return i.x=x,i.y=g,i.moved=!1,a;for(let _=0,V=E.length;_<V;_++){const O=E[_];O.moved||i.y>O.y&&i.y-O.y>O.h/4||(O.static?a=Jo(a,O,i,c):a=Jo(a,i,O,c))}return a}function Jo(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),!_a(a,c))return po(a,s,void 0,c.y,!1)}return po(a,s,void 0,s.y+1,!1)}function nd(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 ad(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 od(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ql(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 rd(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 g=0;g<s.length;g++)if(typeof x[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[g]+" 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 id(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 Qo(a){return sd(a)}function sd(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 Zo(a,i,s,l){return cd(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 cd(a){return typeof a=="number"&&!Number.isNaN(a)}function ud(a,i){const s=Xl(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 Gl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function pd(a,i,s,l,c,d,x){if(i[l])return uo(i[l]);let g=a;const h=Xl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const V=D[E];if(i[V]){g=i[V];break}}return g=uo(g||[]),pa(td(g,{cols:d}),x)}function Xl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let dd="auto";function fd(){return typeof document<"u"}function el(){return fd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):dd}var Da={exports:{}},hd=Da.exports,tl;function vd(){return tl||(tl=1,function(a,i){(function(s,l){a.exports=l()})(hd,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,De(r.key),r)}}function g(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=De(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 V(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function O(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,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(f)}(this,o)}}function W(){return W=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(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}},W.apply(this,arguments)}function De(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 q=function(n){return!(!n||!n.Window)&&n instanceof n.Window},K=void 0,ie=void 0;function w(n){K=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),ie=n}function z(n){return q(n)?n:(n.ownerDocument||n).defaultView||ie.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===ie||q(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=z(n)||ie;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 le(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 Le(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 ot={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=ot.draggable,t.map.drag=ot,t.methodDict.drag="draggable",r.actions.drag=ot.defaults},listeners:{"interactions:before-action-move":le,"interactions:action-resume":le,"interactions:action-move":Le,"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:le,move:Le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Be=ot,Ke={init:function(n){var t=n;Ke.document=t.document,Ke.DocumentFragment=t.DocumentFragment||xe,Ke.SVGElement=t.SVGElement||xe,Ke.SVGSVGElement=t.SVGSVGElement||xe,Ke.SVGElementInstance=t.SVGElementInstance||xe,Ke.Element=t.Element||xe,Ke.HTMLElement=t.HTMLElement||Ke.Element,Ke.Event=t.Event,Ke.Touch=t.Touch||xe,Ke.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 xe(){}var I=Ke,te={init:function(n){var t=I.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&I.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.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?I.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=I.document&&"onmousewheel"in I.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=te;function he(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;T.element(n);){if(H(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function H(n,t){return ie!==K&&(t=t.replace(/\/deep\//g," ")),n[ee.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function me(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function be(n,t,o){for(;T.element(n);){if(H(n,t))return!0;if((n=st(n))===o)return H(n,t)}return!1}function ze(n){return n.correspondingUseElement||n}function Oe(n){var t=n instanceof I.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 Ye(n){var t,o=Oe(n);if(!ee.isIOS7&&o){var r={x:(t=(t=z(n))||ie).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 qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!T.string(n)&&(I.document.querySelector(n),!0)}function Q(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function nt(n,t,o,r){var u=n;return T.string(u)?u=tt(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Ye(u)),u}function Pe(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Q({},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 oe(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 re(n,t,o){var r=o&&n.options[o];return Pe(nt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ie(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=Xe(n)),T.array(n))return n.forEach(function(S){return Ie(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 y=f[u];Ie(n,y,o,r)}else if(T.object(t))for(var b in t)Ie(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(m.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 U(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 v(n){return n instanceof I.Event||n instanceof I.Touch}function L(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Z(n,t){return t=t||{x:0,y:0},ee.isOperaMobile&&v(n)?(L("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):L("page",n,t),t}function P(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function ue(n,t,o){var r=t.length>1?X(t):t[0];Z(r,n.page),function(u,f){f=f||{},ee.isOperaMobile&&v(u)?L("screen",u,f):L("client",u,f)}(r,n.client),n.timeStamp=o}function R(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 X(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 se(n){if(!n.length)return null;var t=R(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 ve(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function $(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function ae(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 I.Touch?"touch":"mouse"}function G(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[ze(t?t[0]:n.target),ze(n.currentTarget)]}var Se=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Se.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var de=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return de([],n)},F=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},fe=function(n,t){return n[F(n,t)]},ne=function(n){D(o,n);var t=O(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=j,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return g(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,y=F(f,function(S){var j=S.dropzone,B=S.element;return j===r.dropzone&&B===r.target});u.activeDrops.splice(y,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}(Se);function Ae(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var B=j[S];if(B.options.drop.enabled){var J=B.options.drop.accept;if(!(T.element(J)&&J!==y||T.string(J)&&!H(y,J)||T.func(J)&&!J({dropzone:B,draggableElement:y})))for(var ke=0,$e=B.getAllElements();ke<$e.length;ke++){var Re=$e[ke];Re!==y&&b.push({dropzone:B,element:Re,rect:B.getRect(Re)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Me(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],B=j.dropzone,J=j.element,ke=j.rect,$e=B.dropCheck(t,o,u,f,J,ke);y.push($e?J:null)}var Re=function(Ge){for(var it,at,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],kt=Ge[it];if(mt&&_t!==it)if(kt){var en=M(mt),jt=M(kt);if(en!==mt.ownerDocument)if(jt!==mt.ownerDocument)if(en!==jt){yt=yt.length?yt:me(kt);var cn=void 0;if(kt instanceof I.HTMLElement&&mt instanceof I.SVGElement&&!(mt instanceof I.SVGSVGElement)){if(mt===jt)continue;cn=mt.ownerSVGElement}else cn=mt;for(var Cn=me(cn,kt.ownerDocument),zn=0;Cn[zn]&&Cn[zn]===yt[zn];)zn++;var Pa=[Cn[zn-1],Cn[zn],yt[zn]];if(Pa[0])for(var ka=Pa[0].lastChild;ka;){if(ka===Pa[1]){it=_t,yt=Cn;break}if(ka===Pa[2])break;ka=ka.previousSibling}}else ht=kt,(parseInt(z(at=mt).getComputedStyle(at).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Re]||null}function Ve(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 ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ne(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 ne(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 ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function ge(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&&Ae(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(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=Je(t,o.element));var y=r,b=Me(o,y,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=Ve(o,0,y)}}var je={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(y,b){if(T.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Ie(b.listeners),j=Object.keys(S).reduce(function(J,ke){return J[/^(enter|leave)/.test(ke)?"drag".concat(ke):/^(activate|deactivate|move)/.test(ke)?"drop".concat(ke):ke]=S[ke],J},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(j),y.options.drop.listeners=j}return T.func(b.ondrop)&&y.on("drop",b.ondrop),T.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:T.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return T.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,j,B){return function(J,ke,$e,Re,Ge,it,at){var ht=!1;if(!(at=at||J.getRect(it)))return!!J.options.drop.checker&&J.options.drop.checker(ke,$e,ht,J,it,Re,Ge);var yt=J.options.drop.overlap;if(yt==="pointer"){var _t=re(Re,Ge,"drag"),mt=Z(ke);mt.x+=_t.x,mt.y+=_t.y;var kt=mt.x>at.left&&mt.x<at.right,en=mt.y>at.top&&mt.y<at.bottom;ht=kt&&en}var jt=Re.getRect(Ge);if(jt&&yt==="center"){var cn=jt.left+jt.width/2,Cn=jt.top+jt.height/2;ht=cn>=at.left&&cn<=at.right&&Cn>=at.top&&Cn<=at.bottom}return jt&&T.number(yt)&&(ht=Math.max(0,Math.min(at.right,jt.right)-Math.max(at.left,jt.left))*Math.max(0,Math.min(at.bottom,jt.bottom)-Math.max(at.top,jt.top))/(jt.width*jt.height)>=yt),J.options.drop.checker&&(ht=J.options.drop.checker(ke,$e,ht,J,it,Re,Ge)),ht}(this,f,y,b,S,j,B)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Q(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=je.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=Je(t,o.element),u.events=Ve(o,0,r),u.events.activate&&(Ae(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;ge(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;ct(n,t),ge(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:Je,getDrop:Me,getDropEvents:Ve,fireDropEvents:ge,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ye=je;function we(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",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ve(u,b),o.box=se(u),o.scale=1,o.ds=0,o.angle=$(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||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=ve(u,b),o.box=se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=$(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 Qe={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=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":we,"interactions:action-move":we,"interactions:action-end":we,"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}},pe=Qe;function Ne(n,t,o,r,u,f,y){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(y=Math.min(y,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+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!T.element(r)&&(T.element(t)?t===r:be(r,t,u))}function Fe(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 We,N,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.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),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return T.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(y.options.resize.square=b.square),y):T.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.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:Q({},f),corrected:Q({},f),previous:Q({},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),Fe(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,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,B=S.corrected,J=S.delta,ke=S.previous;if(Q(ke,B),y){if(Q(B,b),f==="reposition"){if(B.top>B.bottom){var $e=B.top;B.top=B.bottom,B.bottom=$e}if(B.left>B.right){var Re=B.left;B.left=B.right,B.right=Re}}}else B.top=Math.min(b.top,j.bottom),B.bottom=Math.max(b.bottom,j.top),B.left=Math.min(b.left,j.right),B.right=Math.max(b.right,j.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)J[Ge]=B[Ge]-ke[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=J}})(n),Fe(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 y=Q({},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]=Ne(j,b.edges[j],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.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 B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,J=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||J)&&(n.action={name:"resize",axes:(B?"x":"")+(J?"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=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(y+=j)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(pe),n.usePlugin(ut),n.usePlugin(Be),n.usePlugin(ye)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return N(n)},init:function(n){if(We=n.requestAnimationFrame,N=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],N=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),N=N&&N.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},N=function(u){return clearTimeout(u)})}},Te={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){Te.isScrolling=!0,rt.cancel(Te.i),n.autoScroll=Te,Te.interaction=n,Te.prevTime=Te.now(),Te.i=rt.request(Te.scroll)},stop:function(){Te.isScrolling=!1,Te.interaction&&(Te.interaction.autoScroll=null),rt.cancel(Te.i)},scroll:function(){var n=Te.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Te.now(),b=(y-Te.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Te.x*S,y:Te.y*S};if(j.x||j.y){var B=He(f);T.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var J=He(f),ke={x:J.x-B.x,y:J.y-B.y};(ke.x||ke.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:ke,interaction:n,container:f})}Te.prevTime=y}Te.isScrolling&&(rt.cancel(Te.i),Te.i=rt.request(Te.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()&&Te.check(t.interactable,t.prepared.name))if(t.simulation)Te.x=Te.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,j=t.prepared.name,B=b.options[j].autoScroll,J=Ze(B.container,b,S);if(T.window(J))y=o.clientX<Te.margin,r=o.clientY<Te.margin,u=o.clientX>J.innerWidth-Te.margin,f=o.clientY>J.innerHeight-Te.margin;else{var ke=Oe(J);y=o.clientX<ke.left+Te.margin,r=o.clientY<ke.top+Te.margin,u=o.clientX>ke.right-Te.margin,f=o.clientY>ke.bottom-Te.margin}Te.x=u?1:y?-1:0,Te.y=f?1:r?-1:0,Te.isScrolling||(Te.margin=B.margin,Te.speed=B.speed,Te.start(t))}}};function Ze(n,t,o){return(T.string(n)?tt(n,t,o):n)||z(o)}function He(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Te,Te.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Te.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Te.stop(),Te.interaction&&(Te.interaction=null)},"interactions:stop":Te.stop,"interactions:action-move":function(n){return Te.onInteractionMove(n)}}},vt=pt;function It(n,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),n.apply(this,arguments)}}function Bt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wt(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,j,B,J){var ke=b.getRect(B),$e=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Re={action:null,interactable:b,interaction:j,element:B,rect:ke,buttons:$e};return J.fire("auto-start:check",Re),Re.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=It(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=It(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wt,t.prototype.styleCursor=xt}};function At(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Ht(t,o,n,u)?n:null}function Kt(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var j=r[b],B=u[b],J=j.getAction(t,o,n,B);if(J){var ke=At(J,j,B,f,y);if(ke)return{action:ke,interactable:j,element:B}}}return{action:null,interactable:null,element:null}}function Ft(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;T.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var j=Kt(n,t,o,f,y,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Bt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,wn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ht(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,B=0;if(!(f&&y&&b))return!1;for(var J=0,ke=r.interactions.list;J<ke.length;J++){var $e=ke[J],Re=$e.prepared.name;if($e.interacting()&&(++S>=b||$e.interactable===n&&((j+=Re===o.name?1:0)>=f||$e.element===t&&(B++,Re===o.name&&B>=y))))return!1}return b>0}function xn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function dn(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 y=o.options[u.name].cursorChecker;f=T.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}dn(n.element,f||"",t)}else t.autoStart.cursorElement&&dn(t.autoStart.cursorElement,"",t)}var _n={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Q(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:Ht,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Ft(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Ft(u,f,y,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,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!Ht(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&&dn(o.element,"",t)}},maxInteractions:xn,withinInteractionLimit:Ht,validateAction:At},fn=_n,Sn={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 y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&j!=="xy"&&j!==B){o.prepared.name=null;for(var J=r,ke=function(Re){if(Re!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Re.testIgnoreAllow(Ge,J,r)){var it=Re.getAction(o.downPointer,o.downEvent,o,J);if(it&&it.name==="drag"&&function(at,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return at==="xy"||yt==="xy"||yt===at}(B,Re)&&fn.validateAction(it,Re,J,r,t))return Re}}};T.element(J);){var $e=t.interactables.forEachMatch(J,ke);if($e){o.prepared.name="drag",o.interactable=$e,o.element=J;break}J=st(J)}}}}}};function hn(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 Tn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(fn),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=hn(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;hn(t)>0&&(t.prepared.name=null)}},getHoldDuration:hn},vn=Tn,Gn={id:"auto-start",install:function(n){n.usePlugin(fn),n.usePlugin(vn),n.usePlugin(Sn)}},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 y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(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)&&H(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||he(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 In(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 gn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=gn(r):T.array(r)?t[o]=Ee(r):t[o]=r}return t}var Mn=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=Bn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(j){var B=j.interactable.options[j.prepared.name],J=B.modifiers;return J&&J.length?J:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ke){var $e=B[ke];return $e&&$e.enabled&&{options:$e,methods:$e._methods}}).filter(function(ke){return!!ke})}(y);this.prepareStates(b),this.startEdges=Q({},y.edges),this.edges=Q({},this.startEdges),this.startOffset=(r=y.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=Bn(),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,y=t.edges;t.coords=Q({},t.pageCoords),t.rect=Q({},f),t.edges=Q({},y);for(var b=u?this.states.slice(u):this.states,S=Bn(t.coords,t.rect),j=0;j<b.length;j++){var B,J=b[j],ke=J.options,$e=Q({},t.coords),Re=null;(B=J.methods)!=null&&B.set&&this.shouldDo(ke,r,o)&&(t.state=J,Re=J.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-$e.x,y:t.coords.y-$e.y})),S.eventProps.push(Re)}Q(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 Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var at=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=at||Ge.x!==S.coords.x||Ge.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,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Q(this.startDelta,y.delta);for(var j=0,B=[[f,b],[u,S]];j<B.length;j++){var J=B[j],ke=J[0],$e=J[1];ke.page.x+=$e.x,ke.page.y+=$e.y,ke.client.x+=$e.x,ke.client.y+=$e.y}var Re=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Re.left,Ge.right+=Re.right,Ge.top+=Re.top,Ge.bottom+=Re.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.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};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.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,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,j=b.methods,B=j.beforeEnd&&j.beforeEnd(t);if(B)return this.endResult=B,!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=Q({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 y=f[u];r.state=y,y.methods.stop&&y.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,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}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 y=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,B=0,J=[[r.start,y],[r.cur,S]];B<J.length;B++){var ke=J[B],$e=ke[0],Re=ke[1];$e.page.x-=Re.x,$e.page.y-=Re.y,$e.client.x-=Re.x,$e.client.y-=Re.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 gn(o)}),this.result=Bn(Q({},t.result.coords),Q({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Bn(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 nn(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.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 bt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new Mn(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)}}},Yt=bt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Jn=function(n){D(o,n);var t=O(o);function o(r,u,f,y,b,S,j){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var J=r.interactable,ke=(J&&J.options||gt).deltaSource,$e=re(J,b,f),Re=y==="start",Ge=y==="end",it=Re?V(B):r.prevEvent,at=Re?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Q({},at.page),B.client=Q({},at.client),B.rect=Q({},r.rect),B.timeStamp=at.timeStamp,Ge||(B.page.x-=$e.x,B.page.y-=$e.y,B.client.x-=$e.x,B.client.y-=$e.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=j||f+(y||""),B.interactable=J,B.t0=Re?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-$e.x,B.y0=r.coords.start.page.y-$e.y,B.clientX0=r.coords.start.client.x-$e.x,B.clientY0=r.coords.start.client.y-$e.y,B.delta=Re||Ge?{x:0,y:0}:{x:B[ke].x-it[ke].x,y:B[ke].y-it[ke].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Q({},r.coords.velocity[ke]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return g(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,y=202.5<=u&&u<337.5;return{up:y,down:!y&&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}(Se);Object.defineProperties(Jn.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 Mt=g(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}),mn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),An=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),an=0,Nn=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=It(function(B){this.move(B)},"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=an++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in mn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var j in An)S(j);this._scopeFire("interactions:new",{interaction:this})}return g(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)&&(Bt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Q({},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,y=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=dt(u,f)>this.pointerMoveTolerance);var b,S,j,B=this.getPointerIndex(t),J={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(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",J),y||this.simulation||(this.interacting()&&(J.type=null,this.move(J)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=Q({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 y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,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=P(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:F(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,y,b,S=P(t),j=this.getPointerIndex(t),B=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),j=this.pointers.length,this.pointers.push(B)),ue(this.coords.cur,this.pointers.map(function(J){return J.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(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:B,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 Jn(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,y=this.rect;if(y&&r==="move"&&(oe(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.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 Qt(n){jn(n.interaction)}function jn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),oe(n.edges,n.rect,t),t.x=0,t.y=0,!0}function yn(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 zt(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}An.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=yn},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&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Qt,"interactions:before-action-move":Qt,"interactions:before-action-end":function(n){var t=n.interaction;if(jn(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}}},on=qt,Dt=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 g(n,[{key:"start",value:function(t){var o=this.interaction,r=Nt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new Mn(o));if(y.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=y.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(y.result=y.setAll(this.modifierArg),!y.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=Nt(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 y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,j=this.interaction,B=Nt(j).resistance,J=(j._now()-this.t0)/1e3;if(J<this.te){var ke,$e=1-(Math.exp(-B*J)-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,y=this.modifiedOffset.y,ke={x:Wt(b=$e,t,r,f),y:Wt(b,o,u,y)}):ke={x:this.targetOffset.x*$e,y:this.targetOffset.y*$e};var Re={x:ke.x-this.currentOffset.x,y:ke.y-this.currentOffset.y};this.currentOffset.x+=Re.x,this.currentOffset.y+=Re.y,j.offsetBy(Re),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=Nt(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),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"}),U(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,rt.cancel(this.timeout)}}]),n}();function Nt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(on),n.usePlugin(Yt),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 Dt(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=st(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 Wt(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 sn=Ut;function ln(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=Q({},t||{})}return g(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&ln(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&ln(t,o)}},{key:"on",value:function(t,o){var r=Ie(t,o);for(t in r)this.types[t]=de(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Ie(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[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 g(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:y,remove:b,addDelegate:function(B,J,ke,$e,Re){var Ge=Un(Re);if(!r[ke]){r[ke]=[];for(var it=0;it<u.length;it++){var at=u[it];y(at,ke,S),y(at,ke,j,!0)}}var ht=r[ke],yt=fe(ht,function(_t){return _t.selector===B&&_t.context===J});yt||(yt={selector:B,context:J,listeners:[]},ht.push(yt)),yt.listeners.push({func:$e,options:Ge})},removeDelegate:function(B,J,ke,$e,Re){var Ge,it=Un(Re),at=r[ke],ht=!1;if(at)for(Ge=at.length-1;Ge>=0;Ge--){var yt=at[Ge];if(yt.selector===B&&yt.context===J){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var kt=_t[mt];if(kt.func===$e&&Zn(kt.options,it)){_t.splice(mt,1),_t.length||(at.splice(Ge,1),b(J,ke,S),b(J,ke,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,J,ke,$e){if(B.addEventListener){var Re=Un($e),Ge=fe(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[J]||(Ge.events[J]=[]),fe(Ge.events[J],function(it){return it.func===ke&&Zn(it.options,Re)})||(B.addEventListener(J,ke,f.supportsOptions?Re:Re.capture),Ge.events[J].push({func:ke,options:Re}))}}function b(B,J,ke,$e){if(B.addEventListener&&B.removeEventListener){var Re=F(o,function(en){return en.eventTarget===B}),Ge=o[Re];if(Ge&&Ge.events)if(J!=="all"){var it=!1,at=Ge.events[J];if(at){if(ke==="all"){for(var ht=at.length-1;ht>=0;ht--){var yt=at[ht];b(B,J,yt.func,yt.options)}return}for(var _t=Un($e),mt=0;mt<at.length;mt++){var kt=at[mt];if(kt.func===ke&&Zn(kt.options,_t)){B.removeEventListener(J,ke,f.supportsOptions?_t:_t.capture),at.splice(mt,1),at.length===0&&(delete Ge.events[J],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Re,1)}else for(J in Ge.events)Ge.events.hasOwnProperty(J)&&b(B,J,"all")}}function S(B,J){for(var ke=Un(J),$e=new Qn(B),Re=r[B.type],Ge=G(B)[0],it=Ge;T.element(it);){for(var at=0;at<Re.length;at++){var ht=Re[at],yt=ht.selector,_t=ht.context;if(H(it,yt)&&he(_t,Ge)&&he(_t,it)){var mt=ht.listeners;$e.currentTarget=it;for(var kt=0;kt<mt.length;kt++){var en=mt[kt];Zn(en.options,ke)&&en.func($e)}}}it=st(it)}}function j(B){return S(B,!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,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(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 y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ma(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,B=f.interactions.list;j<B.length;j++){var J=B[j];if(!(J.pointerType!==r||/down/i.test(u)&&J.simulation))return J}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(ma(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 ma(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=ae(o),f=G(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,B=o.changedTouches;j<B.length;j++){var J=B[j],ke={pointer:J,pointerId:P(J),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},$e=ua(ke);S.push([ke.pointer,ke.eventTarget,ke.curEventTarget,$e])}}else{var Re=!1;if(!ee.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Re;Ge++)Re=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Re=Re||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Re){var it={pointer:o,pointerId:P(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},at=ua(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,at])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],kt=yt[2];yt[3][n](_t,o,mt,kt)}}}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 rn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var j=u&&u.events,B=0;B<f.length;B++){var J=f[B];b(o,J.type,J.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=ee.pEventTypes;function y(){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 B=function(){var $e=ke[J];n.documents.some(function(Re){return he(Re.doc,$e.downTarget)})||j.removePointer($e.pointer,$e.event)},J=0,ke=j.pointers;J<ke.length;J++)B()}}(u=I.PointerEvent?[{type:f.down,listener:y},{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:y},{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=O(j);function j(){return d(this,j),S.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),j}(Nn),n.interactions={list:[],new:function(b){b.scopeFire=function(j,B){return n.fire(j,B)};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 rn(n,"add")},"scope:remove-document":function(n){return rn(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:rn,doOnInteractions:ea,methodNames:bn},Wn=Va,Hn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Hn||{}),rr=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=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return g(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,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&In(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,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),T.array(b)?y[f]=Ee(b):T.plainObject(b)?(y[f]=Q(y[f]||{},gn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?y[f].enabled=b:y[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)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=Q({},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(lt(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||he(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)?be(r,t,o):!!T.element(t)&&he(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?be(r,t,o):!!T.element(t)&&he(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 y=Ie(o,r,f);for(var b in y){b==="wheel"&&(b=ee.wheelEvent);for(var S=0,j=y[b];S<j.length;S++){var B=j[S];In(b,this._actions)?this.events[t===Hn.On?"on":"off"](b,B):T.string(this.target)?this._scopeEvents[t===Hn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===Hn.On?"add":"remove"](this.target,b,B,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=gn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Q(Q({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?T.func(this[y])&&this[y](t[y]):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,y=u.context,b=u.listeners;f===this.target&&y===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}(),ir=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,y=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=F(y,function(S){return S===u});y.splice(b,1)}})}return g(n,[{key:"new",value:function(t,o){o=Q(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 fe(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((T.string(f.target)?T.element(t)&&H(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),sr=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=ee,this.defaults=gn(gt),this.Eventable=Kn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=X,u.getTouchBBox=se,u.getTouchDistance=ve,u.getTouchAngle=$,u.getElementRect=Ye,u.getElementClientRect=Oe,u.matchesSelector=H,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=It(function(f,y,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 B=j[S];this.on(B,y,b)}return this}if(T.object(f)){for(var J in f)this.on(J,f[J],y);return this}return In(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=It(function(f,y,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 B=j[S];this.off(B,y,b)}return this}if(T.object(f)){for(var J in f)this.off(J,f[J],y);return this}var ke;return In(f,this.scope.actions)?f in this.globalEvents&&(ke=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(ke,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ee.supportsTouch},u.supportsPointerEvent=function(){return ee.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[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,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Jn,this.Interactable=void 0,this.interactables=new ir(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=O(f);function f(){return d(this,f),u.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return W(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){W(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(rr)}return g(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)&&w(r),I.init(r),ee.init(r),rt.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[Co(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[Co(y)]))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=z(t);o=o?Q({},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=z(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 Co(n){return n&&n.replace(/\/.*$/,"")}var Eo=new sr,Zt=Eo.interactStatic,cr=typeof globalThis<"u"?globalThis:window;Eo.init(cr);var ur=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,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,j=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},J=0;J<t.length;J++){var ke=t[J],$e=ke[0],Re=ke[1],Ge=Math.round((r-j.x)/n[$e]),it=Math.round((u-j.y)/n[Re]);B[$e]=Math.max(b.left,Math.min(b.right,Ge*n[$e]+j.x)),B[Re]=Math.max(b.top,Math.min(b.bottom,it*n[Re]+j.y))}return B};return o.grid=n,o.coordFields=t,o}}),pr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Q(t.snappers||{},ur),t.createSnapGrid=t.snappers.grid}},dr=pr,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Q({},u),t.startRect=Q({},o),t.ratio=y,t.equalDelta=j;var J=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 ke=(J.left?1:-1)*(J.top?1:-1);t.edgeSign={x:ke,y:ke}}else t.edgeSign={x:J.left?-1:1,y:J.top?-1:1};if(b!==!1&&Q(r,J),B!=null&&B.length){var $e=new Mn(n.interaction);$e.copyFrom(n.interaction.modification),$e.prepareStates(B),t.subModification=$e,$e.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Q({},r),y=t.equalDelta?hr:vr;if(Q(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Q({},o);oe(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&&(y(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),Q(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(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 vr(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*y;o.x=f.x+(j-u.width)*b.x}}var gr=nn(fr,"aspectRatio"),_o=function(){};_o._defaults={};var Oa=_o;function ta(n,t,o){return T.func(n)?nt(n,t.interactable,t.element,[o.x,o.y,t]):nt(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,y=r.options,b=y.elementRect,S=Q({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var j=ta(y.restriction,u,f);if(j){var B=j.right-j.left-t.width,J=j.bottom-j.top-t.height;B<0&&(S.left+=B,S.right+=B),J<0&&(S.top+=J,S.bottom+=J)}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,y=ta(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Q({},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}(y);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}},mr=nn(Ma,"restrict"),So={top:1/0,left:1/0,bottom:-1/0,right:-1/0},To={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Io(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 ya={noInner:So,noOuter:To,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Pe(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,y=u.options;if(o){var b=Q({},t),S=ta(y.inner,r,b)||{},j=ta(y.outer,r,b)||{};Io(S,So),Io(j,To),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}},yr=nn(ya,"restrictEdges"),br=Q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),kr=nn({start:Ma.start,set:Ma.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=nn({start:function(n){return ya.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(ta(f.min,t,n.coords))||xr,b=ce(ta(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:Q({},ya.noInner),outer:Q({},ya.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ya.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),no={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,j=S.offsetWithOrigin?function(ke){var $e=ke.interaction.element,Re=Pe(nt(ke.state.options.origin,null,null,[$e])),Ge=Re||re(ke.interactable,$e,ke.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=nt(S.offset,r,u,[o]);(t=Pe(B)||{x:0,y:0}).x+=j.x,t.y+=j.y}var J=S.relativePoints;y.offsets=f&&J&&J.length?J.map(function(ke,$e){return{index:$e,relativePoint:ke,x:b.left-f.width*ke.x+t.x,y:b.top-f.height*ke.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,y=re(t.interactable,t.element,t.prepared.name),b=Q({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var j=0,B=f;j<B.length;j++)for(var J=B[j],ke=b.x-J.x,$e=b.y-J.y,Re=0,Ge=u.targets.length;Re<Ge;Re++){var it=u.targets[Re],at=void 0;(at=T.func(it)?it(ke,$e,t._proxy,J,Re):it)&&S.push({x:(T.number(at.x)?at.x:ke)+J.x,y:(T.number(at.y)?at.y:$e)+J.y,range:T.number(at.range)?at.range:u.range,source:it,index:Re,offset:J})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,kt=_t.x-b.x,en=_t.y-b.y,jt=dt(kt,en),cn=jt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(cn=!1),ht.target&&!(cn?ht.inRange&&mt!==1/0?jt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=_t,ht.distance=jt,ht.range=mt,ht.inRange=cn,ht.delta.x=kt,ht.delta.y=en)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=nn(no,"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"]],no.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,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Q({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],B=void 0;if(B=T.func(j)?j(y.x,y.y,t):j){for(var J=0,ke=o.targetFields;J<ke.length;J++){var $e=ke[J],Re=$e[0],Ge=$e[1];if(Re in B||Ge in B){B.x=B[Re],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=no.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=nn(za,"snapSize"),ao={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:nn({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:Q(gn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Yt),n.usePlugin(dr),t.modifiers=ao,ao){var r=ao[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,Bo=function(n){D(o,n);var t=O(o);function o(r,u,f,y,b,S){var j;if(d(this,o),C(V(j=t.call(this,b)),f),f!==u&&C(V(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=P(u),j.pointerType=ae(u),j.target=y,j.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[B].downTime;var J=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&J<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return g(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}(Se),ba={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ba,n.defaults.actions.pointerEvents=ba.defaults,Q(n.actions.phaselessTypes,ba.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&&oo(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,y=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,B=qe(b),J={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},ke=0;ke<B.length;ke++){var $e=B[ke];J.node=$e,r.fire("pointerEvents:collect-targets",J)}if(J.targets.length){for(var Re=1/0,Ge=0,it=J.targets;Ge<it.length;Ge++){var at=it[Ge].eventable.options.holdDuration;at<Re&&(Re=at)}j.duration=Re,j.timeout=setTimeout(function(){qn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Re)}})(n,t),qn(n,t)},"interactions:up":function(n,t){oo(n),qn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||qn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){oo(n),qn(n,t)}},PointerEvent:Bo,fire:qn,collectEventTargets:Ao,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,y=n.type,b=n.targets,S=b===void 0?Ao(n,t):b,j=new Bo(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:j},J=0;J<S.length;J++){var ke=S[J];for(var $e in ke.props||{})j[$e]=ke.props[$e];var Re=re(ke.eventable,ke.node);if(j._subtractOrigin(Re),j.eventable=ke.eventable,j.currentTarget=ke.node,ke.eventable.fire(j),j._addOrigin(Re),j.immediatePropagationStopped||j.propagationStopped&&J+1<S.length&&S[J+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=j.double?qn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return j}function Ao(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:j,targets:[],node:null},J=0;J<j.length;J++){var ke=j[J];B.node=ke,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function($e){var Re,Ge;return $e.eventable.options.holdDuration===((Re=o.pointers[b])==null||(Ge=Re.hold)==null?void 0:Ge.duration)})),B.targets}function oo(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ba});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ba);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)]=Ir,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 y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Q(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(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"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;Q(o.events.options,t.pointerEvents.defaults),Q(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,zr={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 y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var J=y[B],ke=r.getRect(J);if(!ke)return 1;var $e,Re=fe(f.interactions.list,function(at){return at.interacting()&&at.interactable===r&&at.element===J&&at.prepared.name===u.name});if(Re)Re.move(),S&&($e=Re._reflowPromise||new b(function(at){Re._reflowResolve=at}));else{var Ge=ce(ke),it=function(at){return{coords:at,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:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});$e=function(at,ht,yt,_t,mt){var kt=at.interactions.new({pointerType:"reflow"}),en={interaction:kt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};kt.interactable=ht,kt.element=yt,kt.prevEvent=mt,kt.updatePointer(mt,mt,yt,!0),Y(kt.coords.delta),Bt(kt.prepared,_t),kt._doPhase(en);var jt=at.window,cn=jt.Promise,Cn=cn?new cn(function(zn){kt._reflowResolve=zn}):void 0;return kt._reflowPromise=Cn,kt.start(_t,ht,yt),kt._interacting?(kt.move(en),kt.end(mt)):(kt.stop(),kt._reflowResolve()),kt.removePointer(mt,mt),Cn}(f,r,J,u,it)}S&&S.push($e)},B=0;B<y.length&&!j();B++);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))}}},Pr=zr;if(Zt.use($n),Zt.use(on),Zt.use(Mr),Zt.use(sn),Zt.use(Sr),Zt.use(Gn),Zt.use(et),Zt.use(vt),Zt.use(Pr),Zt.default=Zt,c(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(Da,Da.exports)),Da.exports}var gd=vd();const nl=fa.getDefaultExportFromCjs(gd),Qa=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(jl),x=e.inject(Kl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=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,V=NaN,O=NaN,W=NaN,De=-1,q=-1,K=-1,ie=-1,w=l.x,z=l.y,k=l.w,A=l.h;const T=e.ref(),le=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:nt});function Le(v){Ie(v)}function ot(){Xe()}function Be(v){un(l.isDraggable)&&(h.draggable=v)}function Ke(v){un(l.isResizable)&&(h.resizable=v)}function xe(v){un(l.isBounded)&&(h.bounded=v)}function I(v){h.transformScale=v}function te(v){h.rowHeight=v}function ee(v){h.maxRows=v}function he(){h.rtl=el()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(le),e.onBeforeMount(()=>{h.rtl=el()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Gl(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,un(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,un(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,un(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,tn(Ye)}),x.on("updateWidth",Le),x.on("compact",ot),x.on("setDraggable",Be),x.on("setResizable",Ke),x.on("setBounded",xe),x.on("setTransformScale",I),x.on("setRowHeight",te),x.on("setMaxRows",ee),x.on("directionchange",he),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Le),x.off("compact",ot),x.off("setDraggable",Be),x.off("setResizable",Ke),x.off("setBounded",xe),x.off("setTransformScale",I),x.off("setRowHeight",te),x.off("setMaxRows",ee),x.off("directionchange",he),x.off("setColNum",Ue),g.value&&(g.value.unset(),g.value=null),d.decreaseItem(le)}),i({state:h,wrapper:T});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,H=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),me=e.computed(()=>(h.draggable||h.resizable)&&!l.static),be=id("item"),ze=e.computed(()=>({[be.b()]:!0,[be.bm("resizable")]:H.value,[be.bm("static")]:l.static,[be.bm("resizing")]:h.isResizing,[be.bm("dragging")]:h.isDragging,[be.bm("transform")]:h.useCssTransforms,[be.bm("rtl")]:M.value,[be.bm("no-touch")]:st&&me.value})),Oe=e.computed(()=>[be.be("resizer"),M.value&&be.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{tn(C),tn(Y)}),e.watch(()=>h.draggable,()=>{tn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{tn(Y)}),e.watch(()=>h.rowHeight,()=>{tn(Ye),tn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{tn(Y),tn(Ye),tn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{tn(Y)}),e.watch(M,()=>{tn(Y),tn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),tn(Ye),tn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let L;h.useCssTransforms?M.value?L=ad(v.top,v.right,v.width,v.height):L=nd(v.top,v.left,v.width,v.height):M.value?L=ld(v.top,v.right,v.width,v.height):L=od(v.top,v.left,v.width,v.height),h.style=L}function qe(){const v={};for(const L of["width","height"]){const Z=h.style[L].match(/^(\d+)px$/);if(!Z)return;v[L]=Z[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const L=v.type;if(L==="resizestart"&&h.isResizing||L!=="resizestart"&&!h.isResizing)return;const Z=Qo(v);if(un(Z))return;const{x:P,y:ue}=Z,R={width:0,height:0};let X;switch(L){case"resizestart":{Y(),De=k,q=A,X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing=R,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&(O=P),!v.edges.top&&!v.edges.bottom&&(W=ue);const se=Zo(O,W,P,ue);M.value?R.width=h.resizing.width-se.deltaX/h.transformScale:R.width=h.resizing.width+se.deltaX/h.transformScale,R.height=h.resizing.height+se.deltaY/h.transformScale,h.resizing=R;break}case"resizeend":{X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}X=re(R.height,R.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),O=P,W=ue,(k!==X.w||A!==X.h)&&c("resize",l.i,X.h,X.w,R.height,R.width),v.type==="resizeend"&&(De!==k||q!==A)&&c("resized",l.i,X.h,X.w,R.height,R.width),x.emit("resizeEvent",v.type,l.i,w,z,X.h,X.w)}function Q(v){if(l.static||h.isResizing)return;const L=v.type;if(L==="dragstart"&&h.isDragging||L!=="dragstart"&&!h.isDragging)return;const Z=Qo(v);if(un(Z))return;const{x:P,y:ue}=Z,R=v.target;if(!R.offsetParent)return;const X={top:0,left:0};switch(L){case"dragstart":{K=w,ie=z;const ve=R.offsetParent.getBoundingClientRect(),$=R.getBoundingClientRect(),ae=$.left/h.transformScale,G=ve.left/h.transformScale,Se=$.right/h.transformScale,de=ve.right/h.transformScale,Ee=$.top/h.transformScale,F=ve.top/h.transformScale;M.value?X.left=(Se-de)*-1:X.left=ae-G,X.top=Ee-F,h.dragging=X,h.isDragging=!0;break}case"dragmove":{const ve=Zo(_,V,P,ue);if(M.value?X.left=h.dragging.left-ve.deltaX/h.transformScale:X.left=h.dragging.left+ve.deltaX/h.transformScale,X.top=h.dragging.top+ve.deltaY/h.transformScale,h.bounded){const $=R.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);X.top=oe(X.top,0,$);const ae=Pe(),G=h.containerWidth-ce(l.w,ae,h.margin[0]);X.left=oe(X.left,0,G)}h.dragging=X;break}case"dragend":{const ve=R.offsetParent.getBoundingClientRect(),$=R.getBoundingClientRect(),ae=$.left/h.transformScale,G=ve.left/h.transformScale,Se=$.right/h.transformScale,de=ve.right/h.transformScale,Ee=$.top/h.transformScale,F=ve.top/h.transformScale;M.value?X.left=(Se-de)*-1:X.left=ae-G,X.top=Ee-F,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let se;M.value,se=nt(X.top,X.left),_=P,V=ue,(w!==se.x||z!==se.y)&&c("move",l.i,se.x,se.y),v.type==="dragend"&&(K!==w||ie!==z)&&c("moved",l.i,se.x,se.y),x.emit("dragEvent",v.type,l.i,se.x,se.y,A,k)}function tt(v,L,Z,P){const ue=Pe();let R;return M.value?R={right:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*L+(L+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])}:R={left:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*L+(L+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])},R}function nt(v,L){const Z=Pe();let P=Math.round((L-h.margin[0])/(Z+h.margin[0])),ue=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return P=Math.max(Math.min(P,h.cols-k),0),ue=Math.max(Math.min(ue,h.maxRows-A),0),{x:P,y:ue}}function Pe(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,L,Z){return Number.isFinite(v)?Math.round(L*v+Math.max(0,v-1)*Z):v}function oe(v,L,Z){return Math.max(Math.min(v,Z),L)}function re(v,L,Z=!1){const P=Pe();let ue=Math.round((L+h.margin[0])/(P+h.margin[0])),R=0;return Z?R=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):R=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),ue=Math.max(Math.min(ue,h.cols-w),0),R=Math.max(Math.min(R,h.maxRows-z),0),{w:ue,h:R}}function Ie(v,L){h.containerWidth=v}function Xe(){Ye()}function dt(){!g.value&&T.value&&(g.value=nl(T.value),h.useStyleCursor||g.value.styleCursor(!1))}const m=Xo(Q);function C(){if(dt(),!!g.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};g.value.draggable(v),D||(D=!0,g.value.on("dragstart dragmove dragend",L=>{L.type==="dragmove"?m(L):Q(L)}))}else g.value.draggable({enabled:!1})}const U=Xo(lt);function Y(){if(dt(),!!g.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),L=tt(0,0,l.minW,l.minH),Z={edges:{left:M.value?`.${Oe.value[0]}`:!1,right:M.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:L.height*h.transformScale,width:L.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Z.modifiers=[nl.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(Z),E||(E=!0,g.value.on("resizestart resizemove resizeend",P=>{P.type==="resizemove"?U(P):lt(P)}))}else g.value.resizable({enabled:!1})}return(v,L)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(ze.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),H.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ia=typeof window<"u";var al;ia&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ol(a){return a!=null}function ll(){}const md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(md)));const yd=ia&&("ontouchstart"in window||kd()>0),bd=yd?"pointerdown":"click";function kd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function xd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ol(l)||l==="")return!1;let g;return ol(s)?g=new s(l,{bubbles:c,cancelable:d}):(g=document.createEvent("HTMLEvents"),g.initEvent(l,c,d)),Object.assign(g,x),a.dispatchEvent(g)}const wd="clickoutside",Dd=new Set;ia&&document.addEventListener(bd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Dd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&xd(l,{type:wd})})},!0);const Cd=[["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 Cd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Ed=new Set,_d=new WeakMap;if(ia&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Ed.forEach(s=>{s.value=!1}),document[a]){const s=_d.get(document[a]);s&&(s.value=!0)}},!1)}const Yl=new Map;Yl.set("x",0);Yl.set("y",0);var oa=[],Sd=function(){return oa.some(function(a){return a.activeTargets.length>0})},Td=function(){return oa.some(function(a){return a.skippedTargets.length>0})},rl="ResizeObserver loop completed with undelivered notifications.",Id=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:rl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=rl),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)},Bd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,la(this)}return a}(),Jl=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,g=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:g,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Do=function(a){return a instanceof SVGElement&&"getBBox"in a},Ql=function(a){if(Do(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)},il=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)},Ad=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},Sa=typeof window<"u"?window:{},La=new WeakMap,sl=/auto|scroll/,Nd=/^tb|vertical/,Vd=/msie|trident/i.test(Sa.navigator&&Sa.navigator.userAgent),Vn=function(a){return parseFloat(a||"0")},va=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Bd((s?i:a)||0,(s?a:i)||0)},cl=la({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Jl(0,0,0,0)}),Zl=function(a,i){if(i===void 0&&(i=!1),La.has(a)&&!i)return La.get(a);if(Ql(a))return La.set(a,cl),cl;var s=getComputedStyle(a),l=Do(a)&&a.ownerSVGElement&&a.getBBox(),c=!Vd&&s.boxSizing==="border-box",d=Nd.test(s.writingMode||""),x=!l&&sl.test(s.overflowY||""),g=!l&&sl.test(s.overflowX||""),h=l?0:Vn(s.paddingTop),D=l?0:Vn(s.paddingRight),E=l?0:Vn(s.paddingBottom),_=l?0:Vn(s.paddingLeft),V=l?0:Vn(s.borderTopWidth),O=l?0:Vn(s.borderRightWidth),W=l?0:Vn(s.borderBottomWidth),De=l?0:Vn(s.borderLeftWidth),q=_+D,K=h+E,ie=De+O,w=V+W,z=g?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-ie-a.clientWidth:0,A=c?q+ie:0,T=c?K+w:0,le=l?l.width:Vn(s.width)-A-k,Le=l?l.height:Vn(s.height)-T-z,ot=le+q+k+ie,Be=Le+K+z+w,Ke=la({devicePixelContentBoxSize:va(Math.round(le*devicePixelRatio),Math.round(Le*devicePixelRatio),d),borderBoxSize:va(ot,Be,d),contentBoxSize:va(le,Le,d),contentRect:new Jl(_,h,le,Le)});return La.set(a,Ke),Ke},er=function(a,i,s){var l=Zl(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}},Od=function(){function a(i){var s=Zl(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}(),tr=function(a){if(Ql(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Md=function(){var a=1/0,i=[];oa.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(g){var h=new Od(g.target),D=tr(g.target);x.push(h),g.lastReportedSize=er(g.target,g.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},ul=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()&&(tr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},zd=function(){var a=0;for(ul(a);Sd();)a=Md(),ul(a);return Td()&&Id(),a>0},io,nr=[],Pd=function(){return nr.splice(0).forEach(function(a){return a()})},Rd=function(a){if(!io){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Pd()}).observe(s,l),io=function(){s.textContent="".concat(i?i--:i++)}}nr.push(a),io()},Fd=function(a){Rd(function(){requestAnimationFrame(a)})},Ha=0,Ld=function(){return!!Ha},$d=250,jd={attributes:!0,characterData:!0,childList:!0,subtree:!0},pl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},so=!1,Kd=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=$d),!so){so=!0;var l=dl(i);Fd(function(){var c=!1;try{c=zd()}finally{if(so=!1,i=l-dl(),!Ld())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,jd)};document.body?s():Sa.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),pl.forEach(function(s){return Sa.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),pl.forEach(function(s){return Sa.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),fo=new Kd,fl=function(a){!Ha&&a>0&&fo.start(),Ha+=a,!Ha&&fo.stop()},Ud=function(a){return!Do(a)&&!Ad(a)&&getComputedStyle(a).display==="inline"},Wd=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=er(this.target,this.observedBox,!0);return Ud(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Hd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,hl=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 Hd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;hl(c.observationTargets,s)<0&&(d&&oa.push(c),c.observationTargets.push(new Wd(s,l&&l.box)),fl(1),fo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=hl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&oa.splice(oa.indexOf(l),1),l.observationTargets.splice(c,1),fl(-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}(),qd=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(!il(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(!il(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 Za=new WeakMap;function Gd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=Za.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:g}=((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:g??D}))}}}const ar=new(ia&&window.ResizeObserver||qd)(Gd);function vl(a,i){Za.set(a,i),ar.observe(a)}function gl(a){Za.has(a)&&(ar.unobserve(a),Za.delete(a))}function Xd(a={}){let i=ll;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(vl(c,a.onResize),i=()=>{gl(c),i=ll})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:vl,unobserveResize:gl,unobserve:l}}const Yd=e.ref(!1);e.computed(()=>Yd.value);const ml="__theme_style__",co="__theme_observer__",yl=e.reactive(new Map),bl=new Map;e.watch(yl,()=>{if(!ia)return;bl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${co} { width: 1px }`,l=1;for(const[c,[d,x]]of yl.entries())s+=` html.${d} .${co}, .${x} .${co} { width: ${++l}px }`,bl.set(l,c);i.textContent=s,i.id=ml,document.head.appendChild(i)});const or=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,g=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Xd(),_=Xp();_.on("resizeEvent",V),_.on("dragEvent",O),e.onBeforeMount(()=>{c("layout-before-mount",g.value)}),e.onMounted(()=>{c("layout-mounted",g.value),e.nextTick(()=>{rd(g.value),d.originalLayout=g.value,e.nextTick(()=>{Le(),h.value&&D(h.value,Yp(w,16)),pa(g.value,l.verticalCompact),c("layout-updated",g.value),ie(),w()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function V(Be,Ke,xe,I,te,ee){T(Be,Ke,xe,I,te,ee)}function O(Be,Ke,xe,I,te,ee){A(Be,Ke,xe,I,te,ee)}e.watch(()=>d.width,(Be,Ke)=>{e.nextTick(()=>{_.emit("updateWidth",Be),Ke===-1&&e.nextTick(()=>{c("layout-ready",g.value)}),ie()})}),e.watch(()=>[l.layout,l.layout.length],()=>{g.value=l.layout,K()}),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)),w()}),e.watch(()=>l.maxRows,Be=>{_.emit("setMaxRows",Be)}),e.watch([()=>l.margin,()=>l.margin[1]],ie),e.provide(jl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:W,decreaseItem:De})),e.provide(Kl,_),i({state:d,getItem:q,resizeEvent:T,dragEvent:A,layoutUpdate:K});function W(Be){x.set(Be.i,Be)}function De(Be){x.delete(Be.i)}function q(Be){return x.get(Be)}function K(){if(!un(g.value)&&!un(d.originalLayout)){if(g.value.length!==d.originalLayout.length){const Be=ot(g.value,d.originalLayout);if(Be.length>0)if(g.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Be);else{const Ke=new Set(Be.map(xe=>xe.i));d.originalLayout=d.originalLayout.filter(xe=>!Ke.has(xe.i))}d.lastLayoutLength=g.value.length,Le()}pa(g.value,l.verticalCompact),_.emit("updateWidth",d.width),ie(),c("layout-updated",g.value)}}function ie(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Be=parseFloat(l.margin[1]);return Qp(g.value)*(l.rowHeight+Be)+Be+"px"}let k;function A(Be,Ke,xe,I,te,ee){let he=Yo(g.value,Ke);un(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Be==="dragstart"&&!l.verticalCompact&&(k=g.value.reduce((Ue,{i:st,x:H,y:M})=>({...Ue,[st]:{x:H,y:M}}),{})),Be==="dragmove"||Be==="dragstart"?(d.placeholder.i=Ke,d.placeholder.x=he.x,d.placeholder.y=he.y,d.placeholder.w=ee,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),g.value=po(g.value,he,xe,I,!0,l.preventCollision),l.restoreOnDrag?(he.static=!0,pa(g.value,l.verticalCompact,k),he.static=!1):pa(g.value,l.verticalCompact),_.emit("compact"),ie(),Be==="dragend"&&(k=void 0,c("layout-updated",g.value))}function T(Be,Ke,xe,I,te,ee){let he=Yo(g.value,Ke);un(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Wl(g.value,{...he,w:ee,h:te}).filter(H=>H.i!==he.i);if(Ue=st.length>0,Ue){let H=1/0,M=1/0;st.forEach(me=>{me.x>he.x&&(H=Math.min(H,me.x)),me.y>he.y&&(M=Math.min(M,me.y))}),Number.isFinite(H)&&(he.w=H-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ue||(he.w=ee,he.h=te),Be==="resizestart"||Be==="resizemove"?(d.placeholder.i=Ke,d.placeholder.x=xe,d.placeholder.y=I,d.placeholder.w=he.w,d.placeholder.h=he.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Be&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&le(),pa(g.value,l.verticalCompact),_.emit("compact"),ie(),Be==="resizeend"&&c("layout-updated",g.value)}function le(){const Be=ud(l.breakpoints,d.width);if(Be===d.lastBreakpoint)return;const Ke=Gl(Be,l.cols);!un(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=uo(g.value));const xe=pd(d.originalLayout,d.layouts,l.breakpoints,Be,d.lastBreakpoint,Ke,l.verticalCompact);d.layouts[Be]=xe,d.lastBreakpoint!==Be&&c("breakpoint-changed",Be,xe),g.value=xe,c("update:layout",xe),d.lastBreakpoint=Be,_.emit("setColNum",Ke)}function Le(){d.layouts=Object.assign({},l.responsiveLayouts)}function ot(Be,Ke){const xe=new Set(Ke.map(he=>he.i)),I=new Set(Be.map(he=>he.i)),te=Be.filter(he=>!xe.has(he.i)),ee=Ke.filter(he=>!I.has(he.i));return te.concat(ee)}return(Be,Ke)=>(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(g.value,xe=>(e.openBlock(),e.createBlock(Qa,e.mergeProps({key:xe.i,ref_for:!0},xe),{default:e.withCtx(()=>[e.renderSlot(Be.$slots,"item",{item:xe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Qa,{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 Jd={key:0,class:"item-view-group"},Qd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=_e.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),g=e.computed(()=>{var _,V,O,W;return((_=d==null?void 0:d.children)==null?void 0:_.length)>0&&((V=d==null?void 0:d.children)!=null&&V.every(De=>De==null?void 0:De.layout))?(W=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:W.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),D=_=>{c("rowClick",_)},E=(_,V)=>{c("routeUrl",_,V)};return(_,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(or),{layout:x.value,"onUpdate:layout":V[0]||(V[0]=O=>x.value=O),"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,(O,W)=>(e.openBlock(),e.createBlock(e.unref(Qa),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var De,q,K,ie,w,z,k,A,T,le,Le,ot,Be;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:W===((De=d==null?void 0:d.children)==null?void 0:De.length)-1?"0px":"24px"})},[((K=(q=O==null?void 0:O.component)==null?void 0:q.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&((ie=O==null?void 0:O.component)!=null&&ie.name)?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(h.value.toString())-1)*12+"px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((w=O==null?void 0:O.component)==null?void 0:w.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(mo)((z=O==null?void 0:O.component)==null?void 0:z.comp)),{pageLayout:g.value,config:{showIndex:(k=e.unref(Et)[W])==null?void 0:k.showIndex,allowMove:(A=e.unref(Et)[W])==null?void 0:A.allowMove,viewport:(T=e.unref(Et)[W])==null?void 0:T.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(xo),itemData:(le=O==null?void 0:O.component)==null?void 0:le.compData,childItemData:(Le=O==null?void 0:O.component)==null?void 0:Le.itemChildData,key:e.unref(Ta),cacheNewData:e.unref(Ja),onChange:e.unref(yo),index:(O==null?void 0:O.id)??W,onContentChange:e.unref(bo),onPageChange:e.unref(ko),parentTableId:(ot=O==null?void 0:O.component)==null?void 0:ot.tableId,allMapContents:e.unref(go),children:(Be=O==null?void 0:O.component)==null?void 0:Be.children,level:h.value,onRowClick:D,onRouteUrl:E,onClickTrigger:e.unref(Ml),onClickMainKey:e.unref(zl)},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"])]))}}),Zd=Rt._export_sfc(Qd,[["__scopeId","data-v-da659b0f"]]),lr=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"}]),ef={TABLE:da.ssTable,FORM:Po,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ro,FOLD:tc,CALCULATOR:ic,METHODBUTTON:_c,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Po,STEP:Rc,STEPOPERATE:Hs,TIMELINE:Uc,TIMELINEOPERATE:Qs,FORMTOPOPERATE:Ro,SIGNATUREOPERATE:Mc,AVATARUPLOADOPERATE:Ic,TABS:qc,TABSOPERATE:Nu,CHART:Hu,CHARTOPERATE:ap,LAYOUT:Pp,LAYOUTOPERATE:Hp,PARENTITEM:Zd};function ga(a){return ef[a==null?void 0:a.toUpperCase()]||null}exports.De=or;exports.activeStepInfo=ha;exports.affixItems=bp;exports.allMapContents=go;exports.cacheNewData=Ja;exports.checkForTableContents=mc;exports.checkIsQuote=dc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=pc;exports.checkIsShowTable=vc;exports.checkIsTableCheck=uc;exports.checkIsUsingGroup=cc;exports.clickMainKey=zl;exports.clickSavePage=yp;exports.clickStep=Rl;exports.clickTrigger=Ml;exports.compId=Ta;exports.compNames=xo;exports.compShow=Ya;exports.contentTransArray=xa;exports.contentTransArrayToAll=Ca;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ho;exports.existLayouts=Tp;exports.formToExtraContent=gc;exports.generateLayouts=gs;exports.getComponent=ga;exports.getComponents=mo;exports.getExtraContents=bc;exports.getSliceContLength=Np;exports.gridRowHeight=ps;exports.isStepLayout=wo;exports.isUndefined=wl;exports.newContentTransArrayToAllNoExtra=hc;exports.onBack=gp;exports.onChange=yo;exports.onClick=mp;exports.onContentChange=bo;exports.onExtendTaskEnd=Sp;exports.onPageBack=Ip;exports.onPageChange=ko;exports.onSaveBack=Bl;exports.onSelectFixContent=vp;exports.renderShowItems=Nl;exports.showItems=Et;exports.sliceTableLength=Vl;exports.slotContent=lr;exports.st=Qa;exports.stepItems=Vp;exports.toolBar=Fn;exports.verifyButton=Bp;