ss-component-new 1.2.320 → 1.2.321

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 (82) hide show
  1. package/dist/{MTLLoader-CDSTkv2r.js → MTLLoader-DPOghquc.js} +44 -44
  2. package/dist/{MTLLoader-CzQIVnkW.cjs → MTLLoader-WtlM9u4_.cjs} +1 -1
  3. package/dist/{OrbitControls-D-H9X2Xc.cjs → OrbitControls-B4WKzU1G.cjs} +1 -1
  4. package/dist/{OrbitControls-DcmX9nvA.js → OrbitControls-D-nkCRIf.js} +1 -1
  5. package/dist/{URDFLoader-B_kf63rV.cjs → URDFLoader-BCALUmPB.cjs} +1 -1
  6. package/dist/{URDFLoader-CdN4_DgF.js → URDFLoader-CWlOHauP.js} +95 -95
  7. package/dist/{animationData-Clpy-I6C.cjs → animationData-C0UguIKQ.cjs} +1 -1
  8. package/dist/{animationData-CEhF6uNe.js → animationData-Dzdp9nas.js} +22 -22
  9. package/dist/{array-hFAdDlKV.cjs → array-CK9adN1S.cjs} +1 -1
  10. package/dist/{array-BnbdEheX.js → array-DsXvI7kM.js} +36 -36
  11. package/dist/{iconfont-D0jIkQMM.js → iconfont-BnHV6N2N.js} +21 -21
  12. package/dist/{iconfont-CdKkdWWU.cjs → iconfont-lNXhZpFp.cjs} +1 -1
  13. package/dist/{index-acHXwlR5.cjs → index--86Gn2ru.cjs} +1 -1
  14. package/dist/{index-DMzQ5VfV.cjs → index-0mdQIssU.cjs} +1 -1
  15. package/dist/index-1Owg_Mf-.cjs +1 -0
  16. package/dist/{index-BN6O_Eek.js → index-9UoNKztf.js} +1 -1
  17. package/dist/{index-DGWdVqDd.cjs → index-A_jMsoyr.cjs} +1 -1
  18. package/dist/{index-Hsb03y-r.js → index-B1H0LkPE.js} +1 -1
  19. package/dist/{index-Dtm1Qjht.js → index-BBclOeFM.js} +1 -1
  20. package/dist/{index-B63s-JlF.js → index-BGMypXCK.js} +4 -4
  21. package/dist/{index-ChY5FLQd.js → index-BSgP28TB.js} +2 -2
  22. package/dist/{index-CsYuwsiy.cjs → index-B_ocki10.cjs} +1 -1
  23. package/dist/{index-CZmHTDer.cjs → index-BcDHAiO3.cjs} +1 -1
  24. package/dist/{index-B9biCv6N.js → index-BsIOE41E.js} +1 -1
  25. package/dist/{index-BUgBjm_0.cjs → index-BykHr1Eg.cjs} +1 -1
  26. package/dist/{index-BULVh0UT.js → index-C7bPptTr.js} +1 -1
  27. package/dist/{index-BbLk-2Gd.js → index-CZ6fkXHY.js} +5 -5
  28. package/dist/index-CZXiiKiM.cjs +11 -0
  29. package/dist/index-CigkH2AZ.js +12465 -0
  30. package/dist/{index-CuaMF-D0.js → index-Cxsfl10z.js} +3 -3
  31. package/dist/{index-BMobTVwt.cjs → index-D0xh6m7C.cjs} +1 -1
  32. package/dist/{index-CKJP2psW.cjs → index-D2lip588.cjs} +1 -1
  33. package/dist/{index-BBYRL3BD.js → index-D7Gyeuk1.js} +4 -4
  34. package/dist/{index-CmYzo1h5.cjs → index-DCYH5zL4.cjs} +1 -1
  35. package/dist/{index-CIWoZH8M.cjs → index-DN4tn4Q1.cjs} +1 -1
  36. package/dist/{index-DhORf5Ca.cjs → index-DRTEyrqM.cjs} +1 -1
  37. package/dist/{index-C_mznIEq.js → index-DTAyw_rT.js} +5 -5
  38. package/dist/{index-ChkaCKRr.js → index-DWpSqmnH.js} +2150 -2152
  39. package/dist/{index-WhfGtq5k.js → index-DeINnO1a.js} +1 -1
  40. package/dist/{index-CDxSv4Fm.cjs → index-DlRKKRIJ.cjs} +1 -1
  41. package/dist/{index-2pT_YeoR.cjs → index-DmUZr5rN.cjs} +1 -1
  42. package/dist/{index-Dcvmiima.js → index-DuAd7WnG.js} +1 -1
  43. package/dist/{index-gII2yOS-.js → index-Dz0Yy_aU.js} +3 -3
  44. package/dist/{index-DsWNgreC.js → index-EEdSZ0XK.js} +1 -1
  45. package/dist/{index-D-EuGZq6.cjs → index-HIz3WqB6.cjs} +1 -1
  46. package/dist/{index-an4li1M5.cjs → index-HZa2fjvR.cjs} +1 -1
  47. package/dist/{index-auR6PIXZ.js → index-McjYxFmy.js} +4 -4
  48. package/dist/{index-B2NXMUwG.cjs → index-NT3-shBq.cjs} +1 -1
  49. package/dist/{index-BkR1ZyW0.cjs → index-Y-aMAtUz.cjs} +1 -1
  50. package/dist/{index-q3TzHC9c.cjs → index-ZDxZcfNU.cjs} +1 -1
  51. package/dist/{index-B--dkiC3.js → index-r0hSh3Ho.js} +1 -1
  52. package/dist/{index-Cz3X-nTr.js → index-seLSz6FS.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bo3GWmfl.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-jMTZLT.cjs} +107 -107
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C7EqnG9z.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-gYZo9wwL.js} +152 -151
  55. package/dist/{index.vue_vue_type_style_index_1_lang-CCAvftWy.js → index.vue_vue_type_style_index_1_lang-BlEiaBVX.js} +182 -182
  56. package/dist/{index.vue_vue_type_style_index_1_lang-C82aG_1o.cjs → index.vue_vue_type_style_index_1_lang-Dl0UrVqn.cjs} +1 -1
  57. package/dist/{main-TVcRSKDf.cjs → main-D9dcB2l7.cjs} +1 -1
  58. package/dist/{main-CGEK-Lu3.js → main-DrHv50I2.js} +3 -3
  59. package/dist/ss-component.cjs +1 -1
  60. package/dist/ss-component.js +8 -8
  61. package/dist/ss-component2.cjs +1 -1
  62. package/dist/ss-component2.js +10 -10
  63. package/dist/{threeModel-BWNBsSte.cjs → threeModel-CU32ZPcV.cjs} +1 -1
  64. package/dist/{threeModel-DiqA6QHp.js → threeModel-D99aHX_f.js} +24 -24
  65. package/dist/{threePreview-_Y77vG5u.js → threePreview-Br0EE4Ud.js} +114 -114
  66. package/dist/{threePreview-Ceu1jsHj.cjs → threePreview-DVU8LB-6.cjs} +1 -1
  67. package/dist/{threeSceneView-KzaY14zK.js → threeSceneView-COmqJFJG.js} +8 -8
  68. package/dist/{threeSceneView-CQIft8NI.cjs → threeSceneView-DqdT1Ddr.cjs} +1 -1
  69. package/dist/{threeSceneViewForCPMPIP-Cb79-tDO.js → threeSceneViewForCPMPIP-B51x6Ync.js} +7 -7
  70. package/dist/{threeSceneViewForCPMPIP-B77HstZi.cjs → threeSceneViewForCPMPIP-ra01ZlH4.cjs} +1 -1
  71. package/dist/{threeTrackPathView-CmZ0-vAj.js → threeTrackPathView-C22dVYEt.js} +88 -88
  72. package/dist/{threeTrackPathView-Bb5aCZ93.cjs → threeTrackPathView-DAoYI7KH.cjs} +1 -1
  73. package/dist/{threeViewerHost-C7xRsvtB.js → threeViewerHost-CxfATzg5.js} +15 -15
  74. package/dist/{threeViewerHost-9ZQ5PlEH.cjs → threeViewerHost-dB3mMvbG.cjs} +1 -1
  75. package/dist/{urdfTree-BIfrcTrZ.js → urdfTree-B7vFAieq.js} +4 -4
  76. package/dist/{urdfTree-Cf82F-ZA.cjs → urdfTree-Un6KDIVy.cjs} +1 -1
  77. package/dist/{workpieceTreePanel-CoG2RuKE.js → workpieceTreePanel-CgNiyUrm.js} +27 -27
  78. package/dist/{workpieceTreePanel-BjrztNlC.cjs → workpieceTreePanel-D6QEaOh8.cjs} +1 -1
  79. package/package.json +1 -1
  80. package/dist/index-CbJ7Fc-s.js +0 -12271
  81. package/dist/index-GVffFAZv.cjs +0 -1
  82. package/dist/index-J-1vJ4iC.cjs +0 -11
@@ -0,0 +1,11 @@
1
+ "use strict";const mn=require("./index-BykHr1Eg.cjs"),e=require("vue"),te=require("./index-B5Iw9Udy.cjs"),Bt=require("./index-DmUZr5rN.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-jMTZLT.cjs"),Jt=require("./index-DRTEyrqM.cjs"),Eo=require("./threeViewerHost-dB3mMvbG.cjs"),N=require("./index-BJR7UdIU.cjs"),Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),So=require("./isString-C9Flprgd.cjs"),To=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Io=require("./index-HZa2fjvR.cjs"),dr=require("./index-BVaHwt5f.cjs"),Ol=require("./index-DN4tn4Q1.cjs"),cn=require("./index-DjozbkuL.cjs"),Vl=require("./index-BpPyaNFa.cjs"),Ml=require("vue-router"),gn=require("./index-9hspBVrQ.cjs"),zl=require("./menuIndex-Ca9TKlgf.cjs");var Rl=/\s/;function Fl(n){for(var l=n.length;l--&&Rl.test(n.charAt(l)););return l}var Ll=/^\s+/;function Pl(n){return n&&n.slice(0,Fl(n)+1).replace(Ll,"")}var Bo=NaN,$l=/^[-+]0x[0-9a-f]+$/i,jl=/^0b[01]+$/i,Ul=/^0o[0-7]+$/i,Kl=parseInt;function No(n){if(typeof n=="number")return n;if(te.isSymbol(n))return Bo;if(te.isObject(n)){var l=typeof n.valueOf=="function"?n.valueOf():n;n=te.isObject(l)?l+"":l}if(typeof n!="string")return n===0?n:+n;n=Pl(n);var s=jl.test(n);return s||Ul.test(n)?Kl(n.slice(2),s?2:8):$l.test(n)?Bo:+n}var Zn=function(){return te.root.Date.now()},Wl="Expected a function",Hl=Math.max,ql=Math.min;function pr(n,l,s){var r,d,u,b,h,f,w=0,k=!1,O=!1,F=!0;if(typeof n!="function")throw new TypeError(Wl);l=No(l)||0,te.isObject(s)&&(k=!!s.leading,O="maxWait"in s,u=O?Hl(No(s.maxWait)||0,l):u,F="trailing"in s?!!s.trailing:F);function G(I){var x=r,fe=d;return r=d=void 0,w=I,b=n.apply(fe,x),b}function M(I){return w=I,h=setTimeout(L,l),k?G(I):b}function Ce(I){var x=I-f,fe=I-w,Fe=l-x;return O?ql(Fe,u-fe):Fe}function K(I){var x=I-f,fe=I-w;return f===void 0||x>=l||x<0||O&&fe>=u}function L(){var I=Zn();if(K(I))return ee(I);h=setTimeout(L,Ce(I))}function ee(I){return h=void 0,F&&r?G(I):(r=d=void 0,b)}function C(){h!==void 0&&clearTimeout(h),w=0,r=f=d=h=void 0}function R(){return h===void 0?b:ee(Zn())}function y(){var I=Zn(),x=K(I);if(r=arguments,d=this,f=I,x){if(h===void 0)return M(f);if(O)return clearTimeout(h),h=setTimeout(L,l),G(f)}return h===void 0&&(h=setTimeout(L,l)),b}return y.cancel=C,y.flush=R,y}var Gl="[object Boolean]";function fr(n){return n===!0||n===!1||te.isObjectLike(n)&&te.baseGetTag(n)==Gl}function Xl(n){return n===void 0}const Yl={class:"form-content"},Jl={title:"选择标签"},Zl={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Ql={class:"col-operate-wrap"},ei={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ti={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:l}){const s=()=>{b.value=!1,h.value=!1,f.value=[]},r=n;e.computed(()=>{var P;const S=(P=V.value)==null?void 0:P.split("/");return(S==null?void 0:S.some(W=>(W==null?void 0:W.includes("updateLoading"))||(W==null?void 0:W.includes("loading"))))?!1:z.value==="view"});const d=l,u=e.ref([]),b=e.ref(!1),h=e.ref(!1),f=e.ref([]),{getFileExtension:w}=Eo.useThreeSystem(),k=e.ref(),O=e.ref(!1),F=e.ref(!1),G=Ve.useUnit(te.pinia),{chooseTitle:M}=te.storeToRefs(G),Ce=e.ref([]),K=e.ref(),L=e.ref(!1),ee=e.ref([]),C=mn.useFormToTableComp(te.pinia),R=mn.useFormComp(te.pinia),y=e.ref(!1),I=e.ref(),x=N.useLoginState(te.pinia),{loginUserInfo:fe}=te.storeToRefs(x),Fe=e.ref(),st=e.ref(!0),_e=N.useModelComp(te.pinia),{tableViewContents:Ke,itemData:We,isEdit:z,routeToChildPath:ce,lockingPage:re}=te.storeToRefs(_e),he=e.ref(null),Xe=e.ref(!1),at=e.ref(!1),H=N.useMenuState(),{activeMenuPath:V}=te.storeToRefs(H),ie=Ve.useOriginalState(te.pinia),{originalPath:ve}=te.storeToRefs(ie),Pe=e.ref([]),Re=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),tt=async S=>{at.value=S,await le("disabled",null,S,!0)},ne=async S=>{await le("operable",null,S,!0)};e.watch(()=>V.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Se=()=>{e.nextTick(()=>{Oe()})},T=S=>{var J;u.value=(J=u.value)==null?void 0:J.map(P=>({...P,isFormColHidden:!(S!=null&&S.includes(P.label))}))};e.onUnmounted(()=>{he.value=null});const Ze=S=>{d("clickTrigger",S)},Qe=async S=>{var J,P,W,De,ae,q;if(S===""){let X="";(J=u.value)==null||J.forEach(ke=>{ke!=null&&ke.isMain&&(X=ke==null?void 0:ke.value)});let de=await Ve.getItemData(ce.value,sessionStorage.getItem("systemKey"),"");X=((q=(ae=(De=(W=(P=de==null?void 0:de[0])==null?void 0:P.compData)==null?void 0:W.find(ke=>(ke==null?void 0:ke.key)==="mainRouters"))==null?void 0:De.contents)==null?void 0:ae[0])==null?void 0:q.routerContent)+ve.value+X;let be=await Ve.getItemData(X,sessionStorage.getItem("systemKey"),"");L.value=!0,ee.value=be==null?void 0:be.filter(ke=>(ke==null?void 0:ke.comp)!=="methodButton"),d("routeUrl",ee.value)}},Oe=()=>{var J;const S=(J=he.value)==null?void 0:J.$el;S&&Ve.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:P=>{const{oldIndex:W,newIndex:De}=P;if(W===De)return;const ae=u.value.splice(W,1)[0];u.value.splice(De,0,ae)}})},le=async(S,J,P,W=!1)=>{var De,ae,q,X,de,xe,be,ke;try{_e.setRefreshCurStructure(!1);const $=await te.getInsofDataApi({id:r==null?void 0:r.index});if(((De=$==null?void 0:$.data)==null?void 0:De.code)===200){let Ie=(de=(X=(q=(ae=$==null?void 0:$.data)==null?void 0:ae.result)==null?void 0:q[0])==null?void 0:X.value)==null?void 0:de.pageData;W?Ie={...Ie,compData:(be=Ie==null?void 0:Ie.compData)==null?void 0:be.map(Me=>{var lt;return(Me==null?void 0:Me.key)==="formContent"?{...Me,contents:(lt=Me==null?void 0:Me.contents)==null?void 0:lt.map($e=>({...$e,[S]:P}))}:Me})}:Ie={...Ie,compData:(xe=Ie==null?void 0:Ie.compData)==null?void 0:xe.map(Me=>{var lt;return(Me==null?void 0:Me.key)==="formContent"?{...Me,contents:(lt=Me==null?void 0:Me.contents)==null?void 0:lt.map($e=>($e==null?void 0:$e.prop)===(J==null?void 0:J.prop)?{...$e,[S]:P}:$e)}:Me})};const pe=await te.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Ie}});((ke=pe==null?void 0:pe.data)==null?void 0:ke.code)===200?(te.ElMessage.success("编辑成功"),_e.setRefreshCurStructure(!0)):te.ElMessage.error("编辑响应失败")}}catch{te.ElMessage.error("编辑处理失败")}},Q=async(S,J)=>{await le("label",J,S)},se=async(S,J)=>{S&&await le("type",J,S)},Te=async(S,J,P)=>{await le(J,P,S,!1)},Ge=(S,J)=>{Fe.value===J?st.value=!1:st.value=!0,Fe.value=J==null?void 0:J.changeProp},ct=async S=>{var P,W,De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt;let J=[];if((P=S==null?void 0:S.toString())!=null&&P.includes(".urdf")){if(S.includes(",")){te.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:w(S)}],h.value=!0,b.value=!0;return}if((W=S==null?void 0:S.toString())!=null&&W.includes(".stl")||(De=S==null?void 0:S.toString())!=null&&De.includes(".STL")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".obj")||(q=S==null?void 0:S.toString())!=null&&q.includes(".mtl")){const ot=((X=S==null?void 0:S.toString())==null?void 0:X.split(",")).map(Ae=>({url:Ae,extension:w(Ae)}));f.value=ot,h.value=!1,b.value=!0;return}if((de=S==null?void 0:S.toString())!=null&&de.includes(".stl")||(xe=S==null?void 0:S.toString())!=null&&xe.includes(".STL")||(be=S==null?void 0:S.toString())!=null&&be.includes(".obj")||(ke=S==null?void 0:S.toString())!=null&&ke.includes(".mtl")){let $e,ot=[],Ae={};if(Array.isArray(S)?$e=S:$e=S==null?void 0:S.split(","),$e==null||$e.forEach(vt=>{vt.includes(".mtl")?ot.push(vt):Ae.blob=Ae.blob?Ae.blob+","+vt:vt}),(ot==null?void 0:ot.length)>0&&(Ae.mtlBlobs=ot),(Ie=($=Object.values(Ae))==null?void 0:$[0])!=null&&Ie.includes("http:"))J.push(Ae);else{const vt=new Blob([Ae.blob],{type:"application/octet-stream;charset=UTF-8"});let nt=URL.createObjectURL(vt),me="";(pe=S==null?void 0:S.split("/"))==null||pe.forEach((Ye,et)=>{var je;et===((je=S==null?void 0:S.split("/"))==null?void 0:je.length)-1&&(me=Ye)}),(Me=Ae.blob)!=null&&Me.includes(".stl")&&(me=(me==null?void 0:me.replaceAll(">",""))+".urdf"),K.value=[{name:me,blobUrl:nt}],F.value=!0}}else{const $e=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ot=await te.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$e.close()}),Ae=new Blob([ot.data],{type:"application/octet-stream;charset=UTF-8"});let vt=URL.createObjectURL(Ae),nt="";(lt=S==null?void 0:S.split("/"))==null||lt.forEach((me,Ye)=>{var et;Ye===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(nt=me)}),K.value=[{name:nt,blobUrl:vt}],F.value=!0}(J==null?void 0:J.length)>0&&R.setBlobUrls(J)},v=()=>{F.value=!1},E=S=>{var ae,q,X,de;const J=(q=(ae=N.cloneDeep(r.itemData))==null?void 0:ae.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:q.contents,P=N.cloneDeep(S.content);let W={};P&&((X=Object.values(P))==null?void 0:X.length)>0&&((de=Object.values(P))==null||de.forEach((xe,be)=>{W[J[be].key]=xe}));const De={content:W,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",De)},U=e.computed(()=>"http://222.92.178.198:62001"),Y=async S=>{var $,Ie,pe,Me,lt,$e,ot,Ae,vt,nt,me,Ye,et,je,Ee,ft;if(!S)return;(Ie=($=r==null?void 0:r.itemData)==null?void 0:$.find(ue=>(ue==null?void 0:ue.key)==="parentFormPath"))==null||Ie.contents;let J=Ke.value;(J==null?void 0:J.length)>0&&(J=J==null?void 0:J.map(ue=>{var Be,Je,_,ge;let Ne=(Be=ue==null?void 0:ue.key)==null?void 0:Be.split("/");return(r==null?void 0:r.compName)===(Ne==null?void 0:Ne[0])&&(Je=u.value)!=null&&Je.find(He=>(He==null?void 0:He.prop)===(Ne==null?void 0:Ne[1]))&&(ue.value=(ge=(_=u.value)==null?void 0:_.find(He=>(He==null?void 0:He.prop)===(Ne==null?void 0:Ne[1])))==null?void 0:ge.value),ue}),_e.setTableViewContents(J));const P=N.cloneDeep(r.itemData);let W=P==null?void 0:P.map(ue=>{var Ne;return(ue==null?void 0:ue.key)==="formContent"&&((Ne=ue.contents)==null||Ne.map((Be,Je)=>{var _,ge,He,ye,pt,ut,wt,ht,dt,gt,Ct,It,Wt,yt,Mt,$t,Ht,Gt,Qt;return Be.type=(ge=(_=u.value)==null?void 0:_.find(Ft=>(Ft==null?void 0:Ft.prop)===(Be==null?void 0:Be.prop)))==null?void 0:ge.type,Be.options=Be!=null&&Be.options?Be.options:((pt=(ye=(He=Be==null?void 0:Be.key)==null?void 0:He.split("$"))==null?void 0:ye[1])==null?void 0:pt.length)>0?(dt=(ht=mn.formGetOptions((wt=(ut=Be==null?void 0:Be.key)==null?void 0:ut.split("$"))==null?void 0:wt[1]))==null?void 0:ht.split(","))==null?void 0:dt.map(Ft=>({label:Ft,value:Ft})):[],(gt=Be==null?void 0:Be.key)!=null&&gt.includes("$")&&(Be.key=(It=(Ct=Be==null?void 0:Be.key)==null?void 0:Ct.split("$"))==null?void 0:It[0]),Be.signature=(yt=(Wt=u.value)==null?void 0:Wt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Be==null?void 0:Be.prop)))==null?void 0:yt.signature,Be.isLoginUser=($t=(Mt=u.value)==null?void 0:Mt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Be==null?void 0:Be.prop)))==null?void 0:$t.isLoginUser,Be.value=(Ht=Object.values(S))==null?void 0:Ht[Je],Be.isFormColHidden=(Qt=(Gt=u.value)==null?void 0:Gt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Be==null?void 0:Be.prop)))==null?void 0:Qt.isFormColHidden,Be})),ue}),De=u.value,ae=(Me=(pe=N.cloneDeep(W))==null?void 0:pe.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:Me.contents;if(De=De==null?void 0:De.map(ue=>{var Ne;return ue.value=(Ne=ae==null?void 0:ae.find((Be,Je)=>((Be==null?void 0:Be.id)??Je)===(ue==null?void 0:ue.id)))==null?void 0:Ne.value,ue}),!st.value){d("contentChange",{contents:W,index:r.index});return}let q="",X=(ot=($e=(lt=N.cloneDeep(W))==null?void 0:lt.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:$e.contents)==null?void 0:ot.find((ue,Ne)=>{var Be,Je,_;return(ue==null?void 0:ue.label)===Fe.value||Ne.toString()===((_=(Je=(Be=Fe.value)==null?void 0:Be.split("t"))==null?void 0:Je[1])==null?void 0:_.toString())}),de=(Ae=X==null?void 0:X.optionUrl)==null?void 0:Ae.menuSelect,xe=!0;if((me=(nt=(vt=N.cloneDeep(W))==null?void 0:vt.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:nt.contents)==null||me.forEach(ue=>{var Ne,Be,Je,_,ge,He;xe&&((Je=(Be=(Ne=ue==null?void 0:ue.optionUrl)==null?void 0:Ne.groupSelect)==null?void 0:Be[1])!=null&&Je.includes("["))&&(q=(ge=(_=ue==null?void 0:ue.optionUrl)==null?void 0:_.groupSelect)==null?void 0:ge[1],JSON.stringify(de)===JSON.stringify((He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)&&(xe=!1))}),(Ye=X==null?void 0:X.optionUrl)!=null&&Ye.menuSelect&&st.value){let ue=await mn.getSelectRow(X),Ne,Be=(et=X==null?void 0:X.optionUrl)==null?void 0:et.menuSelect;if(ue==null||ue.forEach(Je=>{var _,ge,He,ye,pt,ut,wt,ht,dt,gt;q===((ge=(_=X==null?void 0:X.optionUrl)==null?void 0:_.groupSelect)==null?void 0:ge[1])&&((pt=(ye=(He=X==null?void 0:X.optionUrl)==null?void 0:He.groupSelect)==null?void 0:ye[1])!=null&&pt.includes("["))&&((gt=N.cloneDeep(Je))==null?void 0:gt[(dt=(ht=(wt=(ut=X==null?void 0:X.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:wt[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:dt.replaceAll("]","")])===(X==null?void 0:X.value)&&(Ne=Je)}),Ne){let Je=N.cloneDeep(De);Je=Je==null?void 0:Je.map(ge=>{var He,ye,pt,ut,wt,ht,dt,gt,Ct,It,Wt;return(Ne!=null&&Ne[ge==null?void 0:ge.label]||Ne!=null&&Ne[(ut=(pt=(ye=(He=ge==null?void 0:ge.optionUrl)==null?void 0:He.groupSelect)==null?void 0:ye[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ut.replaceAll("]","")])&&((dt=(ht=(wt=ge==null?void 0:ge.optionUrl)==null?void 0:wt.groupSelect)==null?void 0:ht[1])!=null&&dt.includes("["))&&Be!=null&&Be.every(yt=>{var Mt,$t;return($t=(Mt=ge==null?void 0:ge.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:$t.includes(yt)})&&(ge.value=(Ne==null?void 0:Ne[ge==null?void 0:ge.label])||(Ne==null?void 0:Ne[(Wt=(It=(Ct=(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.groupSelect)==null?void 0:Ct[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Wt.replaceAll("]","")]),Array.isArray(ge.value)&&ge.value.every(yt=>(yt==null?void 0:yt.url)&&(yt==null?void 0:yt.name))&&(ge.type="Upload")),ge}),Je=Je==null?void 0:Je.map(ge=>{var He,ye,pt;return(He=ge==null?void 0:ge.optionUrl)!=null&&He.oldMenuSelect&&(ge.optionUrl.menuSelect=(pt=(ye=N.cloneDeep(ge))==null?void 0:ye.optionUrl)==null?void 0:pt.oldMenuSelect),ge}),u.value=N.cloneDeep(Je);let _=N.cloneDeep(Je);_=_==null?void 0:_.map(ge=>{var He,ye,pt,ut,wt,ht;return(ye=(He=ge==null?void 0:ge.optionUrl)==null?void 0:He.menuSelect)!=null&&ye.some(dt=>dt==null?void 0:dt.includes("["))&&(ge.optionUrl.oldMenuSelect=(ut=(pt=N.cloneDeep(ge))==null?void 0:pt.optionUrl)==null?void 0:ut.menuSelect,ge.optionUrl.menuSelect=(ht=(wt=ge==null?void 0:ge.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:ht.map(dt=>{var gt,Ct,It,Wt;if(dt!=null&&dt.includes("[")){let yt=(Ct=(gt=dt==null?void 0:dt.replaceAll("[","").replaceAll("]",""))==null?void 0:gt.split(":"))==null?void 0:Ct[1];dt=(Wt=(It=N.cloneDeep(Je))==null?void 0:It.find(Mt=>(Mt==null?void 0:Mt.label)===yt))==null?void 0:Wt.value}return dt})),ge}),u.value=_}else u.value=De;W=W==null?void 0:W.map(Je=>{var _;return(Je==null?void 0:Je.key)==="formContent"&&(Je.contents=(_=Je.contents)==null?void 0:_.map(ge=>{var He,ye,pt,ut;return ge.value=((ye=(He=u.value)==null?void 0:He.find(wt=>(wt==null?void 0:wt.label)===(ge==null?void 0:ge.key)))==null?void 0:ye.value)??(ge==null?void 0:ge.value),ge.type=((ut=(pt=u.value)==null?void 0:pt.find(wt=>(wt==null?void 0:wt.prop)===(ge==null?void 0:ge.key)))==null?void 0:ut.type)??(ge==null?void 0:ge.type),ge})),Je})}st.value=!1,d("contentChange",{contents:W,index:r.index});let be=[],ke=[];if((Ee=N.cloneDeep((je=W==null?void 0:W.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:je.contents))==null||Ee.forEach(ue=>{var Ne;Array.isArray(ue==null?void 0:ue.value)&&((Ne=ue==null?void 0:ue.value)!=null&&Ne.find(Be=>{var Je;return(Je=Be==null?void 0:Be.url)==null?void 0:Je.includes(".obj")}))&&(ke=ue==null?void 0:ue.value)}),(ke==null?void 0:ke.length)>0){const ue=(ft=N.cloneDeep(ke))==null?void 0:ft.filter(Ne=>{var Be;return(Be=Ne==null?void 0:Ne.url)==null?void 0:Be.includes(".obj")});ue==null||ue.forEach(Ne=>{var Je,_,ge,He;const Be=(Je=ke==null?void 0:ke.filter(ye=>{var pt;return(ye==null?void 0:ye.name)===(Ne==null?void 0:Ne.name)&&((pt=ye==null?void 0:ye.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:Je.map(ye=>ye==null?void 0:ye.url);be.push({objUrl:Ne==null?void 0:Ne.url,mtlUrls:((_=ke==null?void 0:ke.filter(ye=>{var pt;return(ye==null?void 0:ye.name)===(Ne==null?void 0:Ne.name)&&((pt=ye==null?void 0:ye.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:_.length)===1?(He=(ge=ke==null?void 0:ke.filter(ye=>{var pt;return(ye==null?void 0:ye.name)===(Ne==null?void 0:Ne.name)&&((pt=ye==null?void 0:ye.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:ge[0])==null?void 0:He.url:Be})}),R.setObjUrl(be)}},D=S=>{if(!S)return;const J=[];let P="";for(let W of S)(W.includes("[")||P.includes("["))&&(P+=W.trim(),N.cloneDeep(P).split("【").length-1===N.cloneDeep(P).split("】").length-1&&N.cloneDeep(P).split("[").length-1===N.cloneDeep(P).split("]").length-1&&(J.push(P.replace(/\/\*[\s\S]*?\*\//g,"")),P=""));return J},oe=(S,J,P)=>{let W="";const De=J==null?void 0:J.map(ae=>{var q;return(q=ae==null?void 0:ae.value)==null?void 0:q.pageData});return De==null||De.forEach(ae=>{var q;(ae==null?void 0:ae.name)===(S==null?void 0:S[0])&&((q=ae==null?void 0:ae.compData)==null||q.forEach(X=>{var de;(X==null?void 0:X.key)==="formContent"&&((de=X==null?void 0:X.contents)==null||de.forEach(xe=>{var be;(xe==null?void 0:xe.prop)===(S==null?void 0:S[1])&&(W=(xe==null?void 0:xe.value)===""?Ve.judgeContents((be=N.cloneDeep(xe))==null?void 0:be.optionUrl,P):xe==null?void 0:xe.value)}))}))}),W},ze=(S,J,P,W)=>{var X,de;let De="",ae="";(X=N.cloneDeep(J))==null||X.forEach((xe,be)=>{xe!=null&&xe.includes("[")?ae=ae+ve.value+S[be]:ae=ae===""?ae+xe:ae+"/"+xe});let q=(de=W[ae])==null?void 0:de.map(xe=>{var be;return(be=xe==null?void 0:xe.value)==null?void 0:be.pageData});return q==null||q.forEach(xe=>{var be;(xe==null?void 0:xe.name)===(P==null?void 0:P[0])&&((be=xe==null?void 0:xe.compData)==null||be.forEach(ke=>{var $;(ke==null?void 0:ke.key)==="formContent"&&(($=ke==null?void 0:ke.contents)==null||$.forEach(Ie=>{(Ie==null?void 0:Ie.prop)===(P==null?void 0:P[1])&&(De=Ie==null?void 0:Ie.value)}))}))}),De};return e.watch(()=>r.itemData,async()=>{var q,X,de,xe,be,ke,$,Ie,pe,Me,lt,$e,ot,Ae,vt,nt,me,Ye,et;const S=(q=r.itemData)==null?void 0:q.find(je=>(je==null?void 0:je.key)==="formContent"),J=(X=N.cloneDeep(r.itemData))==null?void 0:X.find(je=>(je==null?void 0:je.key)==="formButton"),P=(de=N.cloneDeep(r.itemData))==null?void 0:de.find(je=>(je==null?void 0:je.key)==="formFlex"),W=(xe=N.cloneDeep(r.itemData))==null?void 0:xe.find(je=>(je==null?void 0:je.key)==="formWrap"),De=(be=N.cloneDeep(r.itemData))==null?void 0:be.find(je=>(je==null?void 0:je.key)==="enableWrap");if((W==null?void 0:W.contents)==="纵向"?O.value=!1:O.value=!0,y.value=(De==null?void 0:De.contents)===void 0?!1:De==null?void 0:De.contents,I.value=typeof(P==null?void 0:P.contents)!="boolean"?!(!(P!=null&&P.contents)===""||((ke=P==null?void 0:P.contents)==null?void 0:ke.toUpperCase())==="VERTICAL"):P==null?void 0:P.contents,(($=S==null?void 0:S.contents)==null?void 0:$.length)>0&&Array.isArray(S==null?void 0:S.contents)){let je=r.allMapContents;const Ee=(pe=(Ie=N.cloneDeep(S))==null?void 0:Ie.contents)==null?void 0:pe.map((_,ge)=>{var yt,Mt,$t,Ht,Gt,Qt,Ft,Da,Va,ga,Ma,ma,za,Ra,Fa,La,Pa,_a,pa,sa,ya,fa,na,ua,$a,Ea,Sa,ba,ja,Ua,Ta,Ka,Wa;let He=(_==null?void 0:_.label)??(_==null?void 0:_.key)??"",ye=(_==null?void 0:_.type)??"",pt=(_==null?void 0:_.options)??[];if((yt=_==null?void 0:_.key)!=null&&yt.includes("$")&&(He=(Mt=N.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:Mt[0],((Ht=($t=N.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:$t[1])==null?void 0:Ht.length)>0)){const[Et,Zt]=(Qt=(Gt=N.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:Gt[1])==null?void 0:Qt.split(/[()]/);ye=((Ft=Ve.FormType.find(bt=>(bt==null?void 0:bt.key)===Et))==null?void 0:Ft.value)??"",((Da=Zt==null?void 0:Zt.split(","))==null?void 0:Da.length)>0&&(pt=(Va=Zt==null?void 0:Zt.split(","))==null?void 0:Va.map(bt=>({label:bt,value:bt})))}let ut=[];_!=null&&_.contents&&!Array.isArray(_==null?void 0:_.contents)&&(ut=(Ma=(ga=_==null?void 0:_.contents)==null?void 0:ga.split(","))==null?void 0:Ma.map(Et=>({label:Et,value:Et}))),((ma=_==null?void 0:_.optionUrl)==null?void 0:ma.selectRelateType)==="自定义绑定"&&(ut=(Ra=(za=_==null?void 0:_.optionUrl)==null?void 0:za.defaultSelect)==null?void 0:Ra.map(Et=>({label:Et,value:Et})));let wt=!1,ht=(_==null?void 0:_.isFormColHidden)??!1,dt=Ve.judgeContents((Fa=N.cloneDeep(_))==null?void 0:Fa.optionUrl,je),gt=dt!==void 0&&dt!==""?dt:_!=null&&_.originalContent&&(_==null?void 0:_.originalContent)!==""?_.originalContent:_!=null&&_.value?_.value:(pt==null?void 0:pt.length)>0?(La=pt==null?void 0:pt[0])==null?void 0:La.value:(_==null?void 0:_.value)??"",Ct=!1,It=dt!==void 0||ye===""?"Input":ye;if((Array.isArray(dt)&&(dt!=null&&dt.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url)))||Array.isArray(gt)&&(gt!=null&&gt.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url))))&&(It="upload"),typeof gt=="string"&&(gt!=null&&gt.includes("loginUser"))&&!(gt!=null&&gt.includes("loginUserSign"))||_!=null&&_.isLoginUser)wt=!0,gt=((Pa=fe.value)==null?void 0:Pa.姓名)||((_a=fe.value)==null?void 0:_a.account)||((pa=fe.value)==null?void 0:pa.账号)||((sa=fe.value)==null?void 0:sa.userName);else if(typeof gt=="string"&&(gt!=null&&gt.includes("loginUserSign"))||_!=null&&_.signature||_!=null&&_.isShow)if(Ct=!0,(_==null?void 0:_.isShow)==="originalSignature")It="image",gt=U.value+"/"+((ya=fe.value)==null?void 0:ya.signature);else{let Et=[...new Set(D(_.isShow))].map(kt=>{var _t,Dt,zt,Ot;return{key:(Ot=(zt=(Dt=(_t=kt==null?void 0:kt.split("["))==null?void 0:_t[1])==null?void 0:Dt.split("]"))==null?void 0:zt[0])==null?void 0:Ot.split(":"),value:""}});(fa=We.value)==null||fa.forEach(kt=>{Et==null||Et.forEach((qt,_t)=>{var zt;let Dt=qt==null?void 0:qt.key;(kt==null?void 0:kt.name)===(Dt==null?void 0:Dt[0].replaceAll("'",""))&&((zt=kt==null?void 0:kt.compData)==null||zt.forEach(Ot=>{var Rt;(Ot==null?void 0:Ot.key)==="formContent"&&((Rt=Ot==null?void 0:Ot.contents)==null||Rt.forEach(Xt=>{(Xt==null?void 0:Xt.prop)===(Dt==null?void 0:Dt[1].replaceAll("'",""))&&(Et[_t].value=Xt==null?void 0:Xt.value)}))}))})});let Zt=Et==null?void 0:Et.map(kt=>{var qt;return kt.key="["+((qt=kt.key)==null?void 0:qt.join(":"))+"]",kt}),bt=_==null?void 0:_.isShow;Zt==null||Zt.forEach(kt=>{kt!=null&&kt.value?bt=bt.replaceAll(kt==null?void 0:kt.key,"'"+(kt==null?void 0:kt.value)+"'"):bt=bt.replaceAll(kt==null?void 0:kt.key,"undefined")}),bt!=null&&bt.includes("(")||(bt!=null&&bt.includes("==")?bt=((na=bt==null?void 0:bt.split("==="))==null?void 0:na[0])+"==='"+((ua=bt==null?void 0:bt.split("==="))==null?void 0:ua[1])+"'":bt=(($a=bt==null?void 0:bt.split("="))==null?void 0:$a[0])+"='"+((Ea=bt==null?void 0:bt.split("="))==null?void 0:Ea[1])+"'"),bt!=null&&bt.includes("=")&&!(bt!=null&&bt.includes("=="))&&!(bt!=null&&bt.includes("==="))&&(bt=bt==null?void 0:bt.replaceAll("=","==")),new Function(`if (${bt}) { return true } else { return false }`)()?(ht=!1,It="image",gt=U.value+"/"+((Sa=fe.value)==null?void 0:Sa.signature)):gt=""}return Array.isArray(gt)&&gt.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(_.type="Upload"),_!=null&&_.isMainUrl&&(It="Url"),{label:He??"",name:"t"+ge,prop:N.cloneDeep(_==null?void 0:_.key),type:It,value:_!=null&&_.isSync?((ja=(ba=M.value)==null?void 0:ba[0])==null?void 0:ja.value)??((Wa=(Ua=V==null?void 0:V.value)==null?void 0:Ua.split("/"))==null?void 0:Wa[((Ka=(Ta=V==null?void 0:V.value)==null?void 0:Ta.split("/"))==null?void 0:Ka.length)-1]):_!=null&&_.isNewDate&&gt===""?new Date:gt,id:(_==null?void 0:_.id)??ge,contents:(ut==null?void 0:ut.length)>0?ut:pt??[],width:(_==null?void 0:_.width)??1,isLoginUser:wt,config:_==null?void 0:_.config,optionUrl:(_==null?void 0:_.optionUrl)??_,isFormColHidden:ht,signature:Ct,isMain:_==null?void 0:_.isMain,isMainUrl:_==null?void 0:_.isMainUrl,operable:(_==null?void 0:_.operable)??!1,disabled:(_==null?void 0:_.disabled)??!1,isSync:_==null?void 0:_.isSync}}),ft=Ee==null?void 0:Ee.map(_=>_==null?void 0:_.value);let ue="";ft==null||ft.forEach(_=>{_!==""&&_!==void 0&&(ue=ue===""?_:ue+"/"+_)}),C.setSelectArray(ft),C.setSelectString(ue);let Ne=(Me=N.cloneDeep(Ee))==null?void 0:Me.map(_=>(_!=null&&_.value&&Ve.IsJson(_==null?void 0:_.value)&&Array.isArray(JSON.parse(_==null?void 0:_.value))&&(_.value=JSON.parse(_.value)),_));Ne=Ne==null?void 0:Ne.map(_=>{var ge,He,ye,pt,ut,wt,ht,dt;if((He=(ge=_==null?void 0:_.optionUrl)==null?void 0:ge.menuSelect)!=null&&He.some(gt=>gt==null?void 0:gt.includes("["))){let gt="";_.optionUrl.oldMenuSelect=(pt=(ye=N.cloneDeep(_))==null?void 0:ye.optionUrl)==null?void 0:pt.menuSelect,_.optionUrl.menuSelect=(wt=(ut=_==null?void 0:_.optionUrl)==null?void 0:ut.menuSelect)==null?void 0:wt.map(Ct=>{var It,Wt,yt,Mt,$t,Ht;if(Ct!=null&&Ct.includes("[")){let Gt=(Wt=(It=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Wt[1];gt=oe((yt=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:yt.split(":"),je==null?void 0:je[V.value],je),Ct=(($t=(Mt=N.cloneDeep(Ne))==null?void 0:Mt.find(Qt=>(Qt==null?void 0:Qt.label)===Gt))==null?void 0:$t.value)||oe((Ht=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),je==null?void 0:je[V.value],je)}return Ct}),gt!==""&&_.value===""&&(_.value=ze(_.optionUrl.menuSelect,_.optionUrl.oldMenuSelect,(ht=_==null?void 0:_.optionUrl)==null?void 0:ht.groupSelect,je),Array.isArray(_.value)&&((dt=_.value)!=null&&dt.every(Ct=>Ct==null?void 0:Ct.url))&&(_.type="UPLOAD"))}return _}),u.value=Ne,at.value=((lt=u.value)==null?void 0:lt.every(_=>_==null?void 0:_.disabled))||re.value===V.value,Xe.value=($e=u.value)==null?void 0:$e.every(_=>_==null?void 0:_.operable),Pe.value=(ot=u.value)==null?void 0:ot.map(_=>_==null?void 0:_.label);let Be=[],Je=[];if((Ae=N.cloneDeep(u.value))==null||Ae.forEach(_=>{var ge;Array.isArray(_==null?void 0:_.value)&&((ge=_==null?void 0:_.value)!=null&&ge.find(He=>{var ye;return(ye=He==null?void 0:He.url)==null?void 0:ye.includes(".obj")}))&&(Je=_==null?void 0:_.value)}),(Je==null?void 0:Je.length)>0){const _=(vt=N.cloneDeep(Je))==null?void 0:vt.filter(ge=>{var He;return(He=ge==null?void 0:ge.url)==null?void 0:He.includes(".obj")});_==null||_.forEach(ge=>{var ye,pt,ut,wt;const He=(ye=Je==null?void 0:Je.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ge==null?void 0:ge.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:ye.map(ht=>ht==null?void 0:ht.url);Be.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((pt=Je==null?void 0:Je.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ge==null?void 0:ge.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:pt.length)===1?(wt=(ut=Je==null?void 0:Je.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ge==null?void 0:ge.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:ut[0])==null?void 0:wt.url:He})}),R.setObjUrl(Be)}(nt=N.cloneDeep(u.value))==null||nt.forEach(_=>{var ge,He,ye,pt,ut,wt,ht,dt,gt,Ct,It,Wt,yt;if((He=(ge=_==null?void 0:_.value)==null?void 0:ge.toString())!=null&&He.includes(".stl")||(pt=(ye=_==null?void 0:_.value)==null?void 0:ye.toString())!=null&&pt.includes(".STL")||(wt=(ut=_==null?void 0:_.value)==null?void 0:ut.toString())!=null&&wt.includes(".obj")||(dt=(ht=_==null?void 0:_.value)==null?void 0:ht.toString())!=null&&dt.includes(".mtl")||(Ct=(gt=_==null?void 0:_.value)==null?void 0:gt.toString())!=null&&Ct.includes(".urdf")){let Mt={},$t=[],Ht;Array.isArray(_==null?void 0:_.value)?Ht=_==null?void 0:_.value:Ht=(It=_==null?void 0:_.value)==null?void 0:It.split(","),Ht==null||Ht.forEach(Gt=>{Gt.includes(".mtl")?$t.push(Gt):Mt.blob=Mt.blob==="undefined"?Gt:Mt.blob+","+Gt}),($t==null?void 0:$t.length)>0&&(Mt.mtlBlobs=$t),(yt=(Wt=Object.values(Mt))==null?void 0:Wt[0])!=null&&yt.includes("http:")}})}else u.value=[];let ae=Ke.value;if((ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(je=>{var ft,ue,Ne,Be;let Ee=(ft=je==null?void 0:je.key)==null?void 0:ft.split("/");return(r==null?void 0:r.compName)===(Ee==null?void 0:Ee[0])&&(ue=u.value)!=null&&ue.find(Je=>(Je==null?void 0:Je.prop)===(Ee==null?void 0:Ee[1]))&&(je.value=(Be=(Ne=u.value)==null?void 0:Ne.find(Je=>(Je==null?void 0:Je.prop)===(Ee==null?void 0:Ee[1])))==null?void 0:Be.value),je}),_e.setTableViewContents(ae)),r!=null&&r.formRules)k.value=r==null?void 0:r.formRules;else{let je={};(me=N.cloneDeep(u).value)==null||me.forEach(Ee=>{(Ee==null?void 0:Ee.isMain)===!0&&(je[(Ee==null?void 0:Ee.prop)??(Ee==null?void 0:Ee.name)]=[{required:!0,message:`${(Ee==null?void 0:Ee.prop)||(Ee==null?void 0:Ee.name)}不能为空`}])}),k.value=je}if(((Ye=J==null?void 0:J.contents)==null?void 0:Ye.length)>0){const je=[];(et=J==null?void 0:J.contents)==null||et.forEach((Ee,ft)=>{(Ee==null?void 0:Ee.label)!==""&&je.push({label:(Ee==null?void 0:Ee.label)??"",id:(Ee==null?void 0:Ee.id)??ft,type:(Ee==null?void 0:Ee.type)??"",background:Ee==null?void 0:Ee.background})}),Ce.value=je}else Ce.value=[]},{deep:!0,immediate:!0}),e.watch(()=>re.value,S=>{at.value=S===V.value},{immediate:!0}),(S,J)=>{const P=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-switch"),De=e.resolveComponent("el-checkbox"),ae=e.resolveComponent("el-popover"),q=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(Bt.ssForm,{rowContents:u.value,formRules:k.value,buttonValue:Ce.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:E,onChange:Y,formDisabled:at.value,formLabelsOperable:Xe.value,isButtonRow:O.value,onPreview:ct,onBlurChange:Ge,onHandleColEditChange:Q,onHandleColTypeChange:se,onRouteUrl:Qe,onClickTrigger:Ze},{operateCol:e.withCtx(({renderColumns:X,formDisabled:de,formLabelsOperable:xe})=>[e.createVNode(ae,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Se},{reference:e.withCtx(()=>[e.createElementVNode("span",Jl,[e.createVNode(P,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Zl,[J[1]||(J[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(W,{"model-value":de,"active-text":"禁用","inactive-text":"",onChange:tt,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(W,{"model-value":xe,"active-text":"编辑所有标签","inactive-text":"",onChange:ne},null,8,["model-value"]),J[2]||(J[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(q,{modelValue:Pe.value,"onUpdate:modelValue":J[0]||(J[0]=be=>Pe.value=be),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:he,onChange:T},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(De,{value:be.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(be.label),1)]),_:2},1032,["value"]),e.createVNode(ae,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(P,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ke;return[e.createElementVNode("div",Ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ke=Object.keys(be))==null?void 0:ke.filter($=>{var Ie;return(Ie=Re.value)==null?void 0:Ie.find(pe=>(pe==null?void 0:pe.value)===$)}),$=>{var Ie,pe;return e.openBlock(),e.createElementBlock("div",{key:$},[e.createVNode(Bt._sfc_main$1,{value:be==null?void 0:be[$],"active-text":(pe=(Ie=Re.value)==null?void 0:Ie.find(Me=>(Me==null?void 0:Me.value)===$))==null?void 0:pe.label,inactiveText:"",onChange:Me=>Te(Me,$,be)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ei,[e.createVNode(P,{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"]),F.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:K.value,onDestroy:v},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Jt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Eo.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ao=Pt._export_sfc(ti,[["__scopeId","data-v-3d8dbd5b"]]),Ln=e.ref(0),hr=n=>{var l;return!n||(n==null?void 0:n.length)===0?[]:(l=N.cloneDeep(n))==null?void 0:l.map(r=>(Ln.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ln.value,children:hr(r==null?void 0:r.children)},r))},ai=n=>{var s;return(s=N.cloneDeep(n))==null?void 0:s.map(r=>(Ln.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Ln.value,children:hr(r==null?void 0:r.children)},r))},vr=(n,l)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===l)?(s=N.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==l):(n=n==null?void 0:n.map(r=>(r.children=vr(r==null?void 0:r.children,l),r)),n)},gr=(n,l)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=N.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d=l),d)):(n=n==null?void 0:n.map(r=>(r.children=gr(r==null?void 0:r.children,l),r)),n)},mr=(n,l)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=l==null?void 0:l.contents)==null?void 0:d.id)})?(s=N.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=l==null?void 0:l.contents)==null?void 0:u.id)&&(d=l==null?void 0:l.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=mr(r==null?void 0:r.children,l),r)),n)},yr=(n,l)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=N.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(l.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=yr(r==null?void 0:r.children,l),r)),n)},At=[{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"}],ni=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],oi=[{label:"新增",value:"add"}],xa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"background",label:"按钮背景色",type:"Color"}],wa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ni},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},li={class:"table-header-child-main"},ii={class:"table-header-child-content"},si={class:"table-header-child-content-item"},ci={class:"fix-button"},ui={key:0},di={class:"form-content"},pi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:l}){const s=n,r=l,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(te.pinia),{tableIndex:h}=te.storeToRefs(b);e.ref(0);const f=e.ref(""),w=e.ref([]),k=e.ref([]),O=C=>{var y;d.value=!0;let R=[];At==null||At.forEach(I=>{let x=N.cloneDeep(h.value)+1;b.setTableIndex(x),R.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:C[I.key],id:h.value,contents:I==null?void 0:I.options})}),C!=null&&C.children&&((y=C==null?void 0:C.children)==null?void 0:y.length)>0&&R.push({children:C==null?void 0:C.children,isFormColHidden:!0}),f.value=C==null?void 0:C.id,w.value=R,k.value=R},F=C=>{r("fixChange",N.cloneDeep(C))},G=C=>{r("deleteChange",N.cloneDeep(C))},M=C=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let I=N.cloneDeep(h.value)+1;b.setTableIndex(I),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:h.value,contents:y==null?void 0:y.options})}),u.value=C==null?void 0:C.id,w.value=R,k.value=R},Ce=C=>{let R=N.cloneDeep(k.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=C==null?void 0:C[y.name]),y)),k.value=R},K=()=>{var R,y;w.value=k.value;let C={};if(f.value!=="")C.id=f.value,(R=w.value)==null||R.forEach(I=>{const x=At==null?void 0:At.find(fe=>(fe==null?void 0:fe.label)===(I==null?void 0:I.label));x?C[x.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),d.value=!1,r("fixChange",{contents:N.cloneDeep(C),id:u.value,type:"fix"});else{let I=N.cloneDeep(h.value)+1;b.setTableIndex(I),C.id="id"+h.value,(y=w.value)==null||y.forEach(x=>{const fe=At==null?void 0:At.find(Fe=>(Fe==null?void 0:Fe.label)===(x==null?void 0:x.label));fe?C[fe.key]=x.value:x!=null&&x.children&&x.children.length>0&&(C.children=x.children)}),d.value=!1,r("fixChange",{contents:N.cloneDeep(C),id:u.value,type:"add"})}f.value="",w.value=[],k.value=[]},L=()=>{d.value=!1,f.value="",u.value="",w.value=[],k.value=[]},ee=C=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",C),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,R)=>{const y=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,(I,x)=>(e.openBlock(),e.createElementBlock("div",li,[e.createElementVNode("div",ii,[e.createElementVNode("div",si,e.toDisplayString(I.label),1),e.createElementVNode("div",ci,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>M(I)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>O(I)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>ee(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",ui,[e.createVNode(br,{tableChildContents:I==null?void 0:I.children,onDeleteChange:G,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:d.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:L,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:K},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},fi=Pt._export_sfc(pi,[["__scopeId","data-v-e0fef72d"]]),hi={class:"table-header-child"},vi={class:"table-header-child-main"},gi={class:"table-header-child-content"},mi={class:"table-header-child-content-item"},yi={class:"fix-button"},bi={key:0},ki={class:"form-content"},xi={class:"dialog-footer"},wi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:l}){const s=n,r=l,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(te.pinia),{tableIndex:h}=te.storeToRefs(b),f=e.ref(""),w=e.ref([]),k=e.ref([]),O=C=>{r("fixChange",N.cloneDeep(C))},F=C=>{var y;d.value=!0;let R=[];At==null||At.forEach(I=>{let x=N.cloneDeep(h.value)+1;b.setTableIndex(x),R.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:C[I.key],id:h.value,contents:I==null?void 0:I.options})}),C!=null&&C.children&&((y=C==null?void 0:C.children)==null?void 0:y.length)>0&&R.push({children:C==null?void 0:C.children,isFormColHidden:!0}),f.value=C==null?void 0:C.id,w.value=R,k.value=R},G=C=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let I=N.cloneDeep(h.value)+1;b.setTableIndex(I),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:h.value,contents:y==null?void 0:y.options})}),u.value=C==null?void 0:C.id,w.value=R,k.value=R},M=C=>{let R=N.cloneDeep(k.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=C==null?void 0:C[y.name]),y)),k.value=R},Ce=()=>{var R,y;w.value=k.value;let C={};if(f.value!=="")C.id=f.value,(R=w.value)==null||R.forEach(I=>{const x=At==null?void 0:At.find(fe=>(fe==null?void 0:fe.label)===(I==null?void 0:I.label));x?C[x.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),d.value=!1,r("fixChange",{contents:N.cloneDeep(C),id:u.value,type:"fix"});else{let I=N.cloneDeep(h.value)+1;b.setTableIndex(I),C.id="idChild"+h.value,(y=w.value)==null||y.forEach(x=>{const fe=At==null?void 0:At.find(Fe=>(Fe==null?void 0:Fe.label)===(x==null?void 0:x.label));fe?C[fe.key]=x.value:x!=null&&x.children&&x.children.length>0&&(C.children=x.children)}),d.value=!1,r("fixChange",{contents:N.cloneDeep(C),id:u.value,type:"add"})}f.value="",w.value=[],k.value=[]},K=()=>{d.value=!1,f.value="",u.value="",w.value=[],k.value=[]},L=C=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",C),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ee=C=>{r("deleteChange",C)};return(C,R)=>{const y=e.resolveComponent("svg-icon"),I=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(x,fe)=>(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("div",gi,[e.createElementVNode("div",mi,e.toDisplayString(x.label),1),e.createElementVNode("div",yi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>G(x)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>F(x)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>L(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(fi,{tableChildContents:x==null?void 0:x.children,onDeleteChange:ee,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ki,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",xi,[e.createVNode(I,{onClick:K,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(I,{class:"ok-button button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},br=Pt._export_sfc(wi,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Di={class:"table-operate-item"},_i={class:"operate-title"},Ei={class:"operate-content"},Si={class:"fix-content"},Ti={class:"fix-content-label"},Ii={class:"fix-button"},Bi={key:0},Ni={class:"operate-title"},Ai={class:"operate-content"},Oi={class:"fix-content"},Vi={class:"fix-content-label"},Mi={class:"fix-button"},zi={class:"operate-title"},Ri={class:"operate-content"},Fi={class:"fix-content"},Li={class:"fix-content-label"},Pi={class:"fix-button"},$i={class:"operate-title"},ji={class:"operate-content"},Ui={class:"fix-content"},Ki={class:"fix-content-label"},Wi={class:"fix-button"},Hi={class:"operate-content"},qi={style:{display:"flex","justify-content":"space-between"}},Gi={class:"form-content"},Xi={class:"dialog-footer"},Yi={class:"form-content"},Ji={class:"dialog-footer"},Zi={class:"form-content"},Qi={class:"dialog-footer"},es={class:"form-content"},ts={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),h=e.ref([]),f=e.ref(!1),w=e.ref([]),k=e.ref(!1),O=e.ref([]),F=e.ref(""),G=e.ref(""),M=e.ref([]),Ce=e.ref([]),K=e.ref([]),L=e.ref([]),ee=e.ref(!1),C=e.ref([]),R=e.ref([]),y=e.ref(0),I=e.ref([]),x=e.ref([]),fe=e.ref([]),Fe=()=>{ee.value=!0;let v=[];xa==null||xa.forEach(E=>{y.value++,v.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:(E==null?void 0:E.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:E==null?void 0:E.options})}),C.value=v,R.value=v},st=()=>{var E,U,Y;b.value=!0;let v=[];(Y=(U=(E=Ve.FormContent)==null?void 0:E.find(D=>(D==null?void 0:D.key)==="Input"))==null?void 0:U.value)==null||Y.forEach(D=>{y.value++,v.push({label:D==null?void 0:D.label,name:(D==null?void 0:D.name)||(D==null?void 0:D.label),type:D.type,value:(D==null?void 0:D.label)==="类型"?"Input":"",id:y.value,contents:D==null?void 0:D.options})}),I.value=v,x.value=v},_e=v=>{v||(I.value=x.value)},Ke=async v=>{var E,U,Y,D,oe,ze,S,J,P,W,De,ae;if((v==null?void 0:v.类型)!==((U=(E=x.value)==null?void 0:E.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:U.value)){let q=[],X=await((oe=(D=(Y=Ve.FormContent)==null?void 0:Y.find(de=>(de==null?void 0:de.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=(P=(J=Ve.FormContent)==null?void 0:J.find(de=>(de==null?void 0:de.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:P.value)==null?void 0:W.value):(S=(ze=Ve.FormContent)==null?void 0:ze.find(de=>(de==null?void 0:de.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:S.value;if(X==null||X.forEach(de=>{y.value++,q.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:de!=null&&de.属性名?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):(v==null?void 0:v[de.label])??"",id:y.value,contents:de==null?void 0:de.options,prop:(de==null?void 0:de.prop)||(de==null?void 0:de.name)||(de==null?void 0:de.label)})}),v!=null&&v.菜单选项&&((De=v==null?void 0:v.菜单选项)==null?void 0:De.length)>0){const de=await Ve.menuToContentType(v==null?void 0:v.菜单选项);q=q==null?void 0:q.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=de),xe))}x.value=await Ve.selectToBase(N.cloneDeep(q)),I.value=await Ve.selectToBase(N.cloneDeep(q))}else{let q=N.cloneDeep(I.value);if(q=q==null?void 0:q.map(X=>(X.value=v==null?void 0:v[X.name],X)),v!=null&&v.菜单选项&&((ae=v==null?void 0:v.菜单选项)==null?void 0:ae.length)>0){const X=await Ve.menuToContentType(v==null?void 0:v.菜单选项);q=q==null?void 0:q.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=X),de))}q=Ve.formToOptionsContents(q),x.value=await Ve.selectToBase(N.cloneDeep(q))}},We=async v=>{await Ke(v),I.value=x.value},z=(v,E)=>{if((E==null?void 0:E.type)=="Select"&&(v==null?void 0:v.key)==="selectRelateType"){const U=E==null?void 0:E.optionUrl;return(U==null?void 0:U.selectRelateType)||E[v.key]}if((E==null?void 0:E.type)=="Select"&&(v==null?void 0:v.key)==="menuSelect"){const U=E==null?void 0:E.optionUrl;return(U==null?void 0:U.menuSelect)||E[v.key]}if((E==null?void 0:E.type)=="Select"&&(v==null?void 0:v.key)==="groupSelect"){const U=E==null?void 0:E.optionUrl;return(U==null?void 0:U.groupSelect)||E[v.key]}if((E==null?void 0:E.type)=="Select"&&(v==null?void 0:v.key)==="originalContent")return(E==null?void 0:E.value)||E[v.key];if((E==null?void 0:E.type)=="Select"&&(v==null?void 0:v.key)==="multiple"){const U=E[v.key];return fr(U)?U:v.default}return(v==null?void 0:v.label)==="类型"&&E[v.key]===""?"Input":(v==null?void 0:v.key)==="isFormColHidden"&&!E[v.key]?!1:E[v.key]},ce=async v=>{var Y,D,oe,ze,S,J,P,W,De;b.value=!0;let E=[];const U=await((oe=(D=(Y=Ve.FormContent)==null?void 0:Y.find(ae=>(ae==null?void 0:ae.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=(P=(J=Ve.FormContent)==null?void 0:J.find(ae=>(ae==null?void 0:ae.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:P.value)==null?void 0:W.value):(S=(ze=Ve.FormContent)==null?void 0:ze.find(ae=>(ae==null?void 0:ae.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:S.value;if(U==null||U.forEach(ae=>{y.value++,E.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label),type:ae.type,value:(ae==null?void 0:ae.label)==="属性名"?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):z(ae,v),id:y.value,contents:ae==null?void 0:ae.options})}),v!=null&&v.menuSelect&&((De=v==null?void 0:v.menuSelect)==null?void 0:De.length)>0){const ae=await Ve.menuToContentType(v==null?void 0:v.menuSelect);E=E==null?void 0:E.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=ae),q))}F.value=v==null?void 0:v.id,I.value=await Ve.selectToBase(Ve.formToOptionsContents(E)),x.value=await Ve.selectToBase(Ve.formToOptionsContents(E))},re=v=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,U;fe.value=(E=N.cloneDeep(fe.value))==null?void 0:E.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(U=N.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=fe.value),Y))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{b.value=!1,I.value=[],F.value=""},Xe=async()=>{var Y,D,oe,ze,S,J,P,W,De,ae;I.value=x.value;let v={};F.value!==""?v.id=F.value:(y.value++,v.id="id"+y.value);let E=await((oe=(D=(Y=Ve.FormContent)==null?void 0:Y.find(q=>{var X,de;return(q==null?void 0:q.key)===(((de=(X=I.value)==null?void 0:X.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:D.value)==null?void 0:oe.value)??((S=(ze=Ve.FormContent)==null?void 0:ze.find(q=>{var X,de;return(q==null?void 0:q.key)===(((de=(X=I.value)==null?void 0:X.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:S.value);if((J=I.value)==null||J.forEach(q=>{const X=E==null?void 0:E.find(de=>(de==null?void 0:de.label)===(q==null?void 0:q.label));X&&(v[X.key]=q.value)}),v.name=v.label,(P=fe.value)!=null&&P.find(q=>q.id===v.id))fe.value=(W=fe.value)==null?void 0:W.map(q=>(q.id===v.id&&(q=v),q));else{let q=N.cloneDeep(fe.value);fe.value||(fe.value=[]),q.push(v),fe.value=q}fe.value=fe.value.map(({id:q,...X})=>X),b.value=!1,F.value="";let U=N.cloneDeep(s.originalItemContents);(De=N.cloneDeep(s.originalItemContents))!=null&&De.find(q=>(q==null?void 0:q.key)==="tableToForm")?U=(ae=N.cloneDeep(s.originalItemContents))==null?void 0:ae.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=fe.value),q)):U.push({key:"tableToForm",contents:fe.value}),r("change",U)},at=v=>{ee.value=!0;let E=[];xa==null||xa.forEach(U=>{y.value++,E.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:v[U.key],id:y.value,contents:U==null?void 0:U.options})}),F.value=v==null?void 0:v.id,C.value=E,R.value=E};e.watch(()=>k.value,()=>{var E,U;let v=N.cloneDeep(s.originalItemContents);(E=N.cloneDeep(s.originalItemContents))!=null&&E.find(Y=>(Y==null?void 0:Y.key)==="page")?v=(U=N.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=k.value),Y)):v.push({key:"page",contents:k.value}),r("change",v)},{deep:!0});const H=v=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,U;Ce.value=(E=N.cloneDeep(Ce.value))==null?void 0:E.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(U=N.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=Ce.value),Y))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},V=()=>{var U,Y,D,oe,ze;C.value=R.value;let v={};if(F.value!==""?v.id=F.value:(y.value++,v.id="id"+y.value),(U=C.value)==null||U.forEach(S=>{const J=xa==null?void 0:xa.find(P=>(P==null?void 0:P.label)===(S==null?void 0:S.label));J?v[J.key]=S.value:S!=null&&S.children&&S.children.length>0&&(v.children=S.children)}),(Y=Ce.value)!=null&&Y.find(S=>S.id===v.id))Ce.value=(D=Ce.value)==null?void 0:D.map(S=>(S.id===v.id&&(S=v),S));else{let S=N.cloneDeep(Ce.value)??[];S.push(v),Ce.value=S}ee.value=!1,F.value="";let E=N.cloneDeep(s.originalItemContents);(oe=N.cloneDeep(s.originalItemContents))!=null&&oe.find(S=>(S==null?void 0:S.key)==="extraButton")?E=(ze=N.cloneDeep(s.originalItemContents))==null?void 0:ze.map(S=>((S==null?void 0:S.key)==="extraButton"&&(S.contents=Ce.value),S)):E.push({key:"extraButton",contents:Ce.value}),r("change",E)},ie=v=>{let E=N.cloneDeep(R.value);E=E==null?void 0:E.map(U=>(U.children||(U.value=v==null?void 0:v[U.name]),U)),R.value=E},ve=()=>{ee.value=!1,C.value=[],F.value=""},Pe=v=>{f.value=!0;let E=[];wa==null||wa.forEach(U=>{y.value++,E.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:v[U.key],id:y.value,contents:U==null?void 0:U.options})}),F.value=v==null?void 0:v.id,K.value=E,L.value=E},Re=v=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,U;M.value=(E=N.cloneDeep(M.value))==null?void 0:E.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(U=N.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=M.value),Y))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},tt=()=>{u.value=!0;let v=[];At==null||At.forEach(E=>{y.value++,v.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:y.value,contents:E==null?void 0:E.options})}),w.value=v,O.value=v},ne=()=>{f.value=!0;let v=[];wa==null||wa.forEach(E=>{y.value++,v.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:y.value,contents:E==null?void 0:E.options})}),K.value=v,L.value=v},Se=v=>{let E=N.cloneDeep(L.value);E=E==null?void 0:E.map(U=>(U.children||(U.value=v==null?void 0:v[U.name]),U)),L.value=E},T=()=>{var U,Y,D,oe,ze;K.value=L.value;let v={};if(F.value!==""?v.id=F.value:(y.value++,v.id="id"+y.value),(U=K.value)==null||U.forEach(S=>{const J=wa==null?void 0:wa.find(P=>(P==null?void 0:P.label)===(S==null?void 0:S.label));J?v[J.key]=S.value:S!=null&&S.children&&S.children.length>0&&(v.children=S.children)}),(Y=M.value)!=null&&Y.find(S=>S.id===v.id))M.value=(D=M.value)==null?void 0:D.map(S=>(S.id===v.id&&(S=v),S));else{let S=N.cloneDeep(M.value);S.push(v),M.value=S}f.value=!1,F.value="";let E=N.cloneDeep(s.originalItemContents);(oe=N.cloneDeep(s.originalItemContents))!=null&&oe.find(S=>(S==null?void 0:S.key)==="rowButton")?E=(ze=N.cloneDeep(s.originalItemContents))==null?void 0:ze.map(S=>((S==null?void 0:S.key)==="rowButton"&&(S.contents=M.value),S)):E.push({key:"rowButton",contents:M.value}),r("change",E)},Ze=()=>{f.value=!1,F.value="",L.value=[],K.value=[]},Qe=v=>{u.value=!0;let E=[];At==null||At.forEach(U=>{y.value++,E.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:y.value,contents:U==null?void 0:U.options})}),w.value=E,G.value=v==null?void 0:v.id,O.value=E},Oe=v=>{var E;h.value=vr(N.cloneDeep(h.value),v==null?void 0:v.id),r("change",(E=N.cloneDeep(s.originalItemContents))==null?void 0:E.map(U=>{var Y;return(U==null?void 0:U.key)==="header"&&(U.contents=(Y=h.value)!=null&&Y.some(D=>D==null?void 0:D.children)?[h.value]:h.value),U}))},le=v=>{var U,Y,D;v.type==="fix"?v.id!==""?h.value=mr(h.value,v):h.value=gr(h.value,v==null?void 0:v.contents):h.value=yr(h.value,v),h.value=(U=h.value)!=null&&U.some(oe=>oe==null?void 0:oe.children)?[h.value]:h.value,F.value="";let E=N.cloneDeep(s.originalItemContents);(Y=N.cloneDeep(s.originalItemContents))!=null&&Y.find(oe=>(oe==null?void 0:oe.key)==="header")?E=(D=N.cloneDeep(s.originalItemContents))==null?void 0:D.map(oe=>((oe==null?void 0:oe.key)==="header"&&(oe.contents=h.value),oe)):E.push({key:"header",contents:h.value}),r("change",E)},Q=v=>{var U;u.value=!0;let E=[];At==null||At.forEach(Y=>{y.value++,E.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:v[Y.key],id:y.value,contents:Y==null?void 0:Y.options})}),v!=null&&v.children&&((U=v==null?void 0:v.children)==null?void 0:U.length)>0&&E.push({children:v==null?void 0:v.children,isFormColHidden:!0}),F.value=v==null?void 0:v.id,G.value="",w.value=E,O.value=E},se=v=>{let E=N.cloneDeep(O.value);E=E==null?void 0:E.map(U=>(U.children||(U.value=v==null?void 0:v[U.name]),U)),O.value=E},Te=()=>{u.value=!1,F.value="",G.value="",O.value=[]},Ge=()=>{var U,Y,D,oe,ze,S;w.value=O.value;let v={};if(F.value!==""?v.id=F.value:(y.value++,v.id="id"+y.value),(U=w.value)==null||U.forEach(J=>{const P=At==null?void 0:At.find(W=>(W==null?void 0:W.label)===(J==null?void 0:J.label));P?v[P.key]=J.value:J!=null&&J.children&&J.children.length>0&&(v.children=J.children)}),(Y=h.value)!=null&&Y.find(J=>J.id===v.id))h.value=(D=h.value)==null?void 0:D.map(J=>(J.id===v.id&&(J=v),J));else{let J=N.cloneDeep(h.value)??[];G.value===""?J.push(v):J=J==null?void 0:J.map(P=>(P.id===G.value&&(P.children||(P.children=[]),P.children.push(v)),P)),h.value=J}h.value=(oe=h.value)!=null&&oe.some(J=>J==null?void 0:J.children)?[h.value]:h.value,u.value=!1,F.value="",G.value="";let E=N.cloneDeep(s.originalItemContents);(ze=N.cloneDeep(s.originalItemContents))!=null&&ze.find(J=>(J==null?void 0:J.key)==="header")?E=(S=N.cloneDeep(s.originalItemContents))==null?void 0:S.map(J=>((J==null?void 0:J.key)==="header"&&(J.contents=h.value),J)):E.push({key:"header",contents:h.value}),r("change",E)},ct=v=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,U;h.value=(E=N.cloneDeep(h.value))==null?void 0:E.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(U=N.cloneDeep(s.originalItemContents))==null?void 0:U.map(Y=>{var D;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(D=h.value)!=null&&D.some(oe=>oe==null?void 0:oe.children)?[h.value]:h.value),Y})),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var v,E,U,Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be,ke;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=N.cloneDeep(s.originalItemContents),h.value=(E=(v=d.value)==null?void 0:v.find($=>($==null?void 0:$.key)==="header"))==null?void 0:E.contents,M.value=(Y=(U=d.value)==null?void 0:U.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:Y.contents,Ce.value=(oe=(D=d.value)==null?void 0:D.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:oe.contents,k.value=(S=(ze=d.value)==null?void 0:ze.find($=>($==null?void 0:$.key)==="page"))!=null&&S.contents?!!((P=(J=d.value)==null?void 0:J.find($=>($==null?void 0:$.key)==="page"))!=null&&P.contents):!1,fe.value=(De=(W=d.value)==null?void 0:W.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:De.contents,h.value=(ae=h.value)==null?void 0:ae.map(($,Ie)=>(Array.isArray($)?$=ai($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??Ie,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),h.value=(q=h.value)!=null&&q.every($=>Array.isArray($))?(X=h.value)==null?void 0:X[0]:h.value,M.value=(de=M.value)==null?void 0:de.map(($,Ie)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??Ie}),Ce.value=(xe=Ce.value)==null?void 0:xe.map(($,Ie)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??Ie}),fe.value)fe.value=(ke=fe.value)==null?void 0:ke.map($=>{y.value++;let Ie=$;return Ie.id=y.value,Ie});else{let $=[];const Ie=(be=Ve.getColumnChild(N.cloneDeep(h.value)))==null?void 0:be.filter(pe=>(pe==null?void 0:pe.prop)!=="operate");Ie==null||Ie.forEach(pe=>{var Me;y.value++,$.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.label),type:pe!=null&&pe.groupSelect?"Select":"Input",value:"",id:y.value,contents:pe==null?void 0:pe.options,menuSelect:pe==null?void 0:pe.formMenuSelect,groupSelect:(Me=pe==null?void 0:pe.groupSelect)==null?void 0:Me.split(":"),selectRelateType:"关联绑定列"})}),fe.value=$}},{deep:!0,immediate:!0}),(v,E)=>{const U=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Di,[e.createElementVNode("div",_i,[E[2]||(E[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:tt,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[E[1]||(E[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Ii,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Qe(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Q(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>ct(D)},null,8,["onClick"])])]),D!=null&&D.children&&D.children.length>0?(e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(br,{tableChildContents:D==null?void 0:D.children,onDeleteChange:Oe,onFixChange:le},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[E[4]||(E[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ne},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[E[3]||(E[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Vi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Mi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>Pe(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Re(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",zi,[E[6]||(E[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Fe},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[E[5]||(E[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Fi,[e.createElementVNode("div",Li,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Pi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>at(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>H(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",$i,[E[8]||(E[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:st},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[E[7]||(E[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fe.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Ki,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Wi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>ce(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>re(D)},null,8,["onClick"])])])]))),128))]),E[10]||(E[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,[E[9]||(E[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:k.value,"onUpdate:modelValue":E[0]||(E[0]=D=>k.value=D)},null,8,["modelValue"])])])]),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Gi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xi,[e.createVNode(Y,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>E[11]||(E[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>E[12]||(E[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:f.value,onBeforeDestroy:Ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:K.value,key:K.value,isEnableWrap:!0,onChange:Se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(Y,{onClick:Ze,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>E[13]||(E[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:T,id:"themeButton"},{default:e.withCtx(()=>E[14]||(E[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:ee.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(Y,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>E[15]||(E[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:V,id:"themeButton"},{default:e.withCtx(()=>E[16]||(E[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:b.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",es,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ke,onChangeVisible:_e,onBlurChange:We},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ts,[e.createVNode(Y,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>E[17]||(E[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>E[18]||(E[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ns=Pt._export_sfc(as,[["__scopeId","data-v-7a6b87b5"]]),os=N.useModelComp(te.pinia),{pageMapState:rs}=te.storeToRefs(os),ls=N.useMenuState(te.pinia),{activeMenuPath:is}=te.storeToRefs(ls),ss=e.ref(24),cs=e.ref(6),us=e.ref(70),ds=e.ref(.18),ps=e.ref(45),fs=(n,l,s,r)=>{var d,u,b,h,f,w,k,O,F,G,M,Ce,K,L,ee,C;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||l%2*12,y:((h=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:h.y)||l,w:((w=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:w.w)||ss.value,h:((O=(k=n==null?void 0:n.value)==null?void 0:k.tableData)==null?void 0:O.h)||s,minW:((G=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:G.minW)||cs.value,minH:((Ce=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:Ce.minH)||ds.value,maxH:((L=(K=n==null?void 0:n.value)==null?void 0:K.tableData)==null?void 0:L.maxH)||ps.value,i:((C=(ee=n==null?void 0:n.value)==null?void 0:ee.tableData)==null?void 0:C.i)||l,id:(n==null?void 0:n.id)||l+"",component:r}},hs=(n,l)=>{var r,d,u,b,h,f,w,k;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((h=n==null?void 0:n.comp)==null?void 0:h.toUpperCase())==="FORM"&&(s=((k=(w=(f=n==null?void 0:n.compData)==null?void 0:f.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:w.contents)==null?void 0:k.length)/5);return s*2},kr=(n,l,s)=>{var b,h;const r=(h=(b=rs.value)==null?void 0:b[is.value])==null?void 0:h.filter(f=>{var w;return((w=f==null?void 0:f.key)==null?void 0:w.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var w,k,O;return((O=(k=(w=f==null?void 0:f.value)==null?void 0:w.tableData)==null?void 0:k.component)==null?void 0:O.id)===n.id}),u=hs(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,w)=>kr(f,w))),{...fs(d,l,u,n)}},vs=(n,l)=>{if((n==null?void 0:n.length)===0)return[];const s=N.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>kr(r,d)):[]},gs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ms=(n,l)=>n==null?void 0:n.map(s=>{for(const r in l)if(r===(s==null?void 0:s.prop))return{...s,value:l[r]};return s}),ys=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.ref([]);e.watch(()=>s.compType,h=>{var k;const f=gs(s==null?void 0:s.optionItems),w=h?(k=f[h==null?void 0:h.toUpperCase()])==null?void 0:k[s==null?void 0:s.target]:[];d.value=w==null?void 0:w.map(O=>{for(const[F,G]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===F)return{...O,value:G};return O})},{immediate:!0});const u=h=>Bt.getComponent(h),b=h=>{var f,w;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(k=>{var O;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(O=k==null?void 0:k.options)==null?void 0:O.map(F=>({...F,disabled:!0}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!0}:k}):d.value=(w=d.value)==null?void 0:w.map(k=>{var O;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(O=k==null?void 0:k.options)==null?void 0:O.map(F=>({...F,disabled:!1}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!1}:k}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:h==null?void 0:h.prop})};return(h,f)=>{const w=e.resolveComponent("el-col"),k=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,O=>(e.openBlock(),e.createBlock(k,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(w,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(w,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(O.type)),{modelValue:O.value,"onUpdate:modelValue":F=>O.value=F,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:F=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),bs=Pt._export_sfc(ys,[["__scopeId","data-v-6c233914"]]),ks=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:l}){const s=n,r=l,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=L=>L==null?void 0:L.reduce((ee,C)=>(ee[C==null?void 0:C.prop]=C==null?void 0:C.rule,ee),{}),h=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),w=e.ref(""),k=(L,ee,C)=>{var I;let R=[];(s==null?void 0:s.activeTabName)==="任务配置"?(R=[{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:L},{label:"按钮名称",value:"按钮名称",children:ee}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(R=[{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:(I=s==null?void 0:s.relatedData)==null?void 0:I.map(x=>({label:x==null?void 0:x.任务名称,value:x==null?void 0:x.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return C&&(C==null?void 0:C.length)>0?y=[...R,...O(L,ee,C)]:y=R,y},O=(L,ee,C)=>{const R=[{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 C?R==null?void 0:R.filter(y=>C==null?void 0:C.includes(y==null?void 0:y.prop)):R},F=(L,ee)=>{var x,fe,Fe,st,_e,Ke,We,z,ce;const C=((_e=(st=(Fe=(fe=(x=s==null?void 0:s.comp)==null?void 0:x.compData)==null?void 0:fe.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:Fe.contents)==null?void 0:st.filter(re=>(re==null?void 0:re.label)!=="操作"))==null?void 0:_e.map(re=>({value:re==null?void 0:re.prop,label:re.label})))||[],R=/button/i,y=((ce=(z=(We=(Ke=s==null?void 0:s.comp)==null?void 0:Ke.compData)==null?void 0:We.filter(re=>R.test(re==null?void 0:re.key)))==null?void 0:z.flatMap(re=>re==null?void 0:re.contents))==null?void 0:ce.map(re=>({value:re==null?void 0:re.label,label:re.label})))||[],I=k(C,y,L);f.value=ee?ms(I,ee):I,L&&(L==null?void 0:L.length)>0&&u.value.push(...L==null?void 0:L.map(re=>({prop:re,rule:d})))};e.onMounted(()=>{F(null,s==null?void 0:s.extendItem)});const G=L=>{const ee=L==null?void 0:L[w.value];if(w.value==="执行任务"){if(!(ee!=null&&ee.join("/")))return;const C=ee==null?void 0:ee.join("/");F(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,L)}},M=L=>{r("change",{target:s==null?void 0:s.target,extendConfigs:L})},Ce=(L,ee)=>{w.value=ee==null?void 0:ee.changeProp,G(L)},K=L=>{r("onButtonClick",L)};return(L,ee)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:M,onBlurChange:Ce,onOnButtonClick:K},null,8,["rowContents","formRules","buttonValue"]))}}),xs=Pt._export_sfc(ks,[["__scopeId","data-v-7c660c1f"]]),ws={};function Cs(n,l){return null}const Ds=Pt._export_sfc(ws,[["render",Cs]]),_s={class:"form-operate-content"},Es={class:"form-operate-item"},Ss={class:"operate-title"},Ts={class:"operate-content"},Is={class:"fix-content"},Bs={class:"fix-button"},Ns={class:"operate-title"},As={class:"operate-content"},Os={class:"fix-content"},Vs={class:"fix-button"},Ms={style:{display:"flex","justify-content":"space-between"}},zs={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(n,{emit:l}){const s=n,r=l,d=e.ref(!1),u=e.ref([]),b=e.ref([]),h=e.ref(!1),f=e.ref([]),w=e.ref([]),k=e.ref(""),O=e.ref(!1),F=e.ref(0),G=e.ref([]),M=e.ref([]),Ce=(z,ce)=>{if((ce==null?void 0:ce.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const re=ce==null?void 0:ce.optionUrl;return(re==null?void 0:re.selectRelateType)||ce[z.key]}if((ce==null?void 0:ce.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const re=ce==null?void 0:ce.optionUrl;return(re==null?void 0:re.menuSelect)||ce[z.key]}if((ce==null?void 0:ce.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const re=ce==null?void 0:ce.optionUrl;return(re==null?void 0:re.groupSelect)||ce[z.key]}if((ce==null?void 0:ce.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(ce==null?void 0:ce.value)||ce[z.key];if((ce==null?void 0:ce.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const re=ce[z.key];return fr(re)?re:z.default}return(z==null?void 0:z.label)==="类型"&&ce[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!ce[z.key]?!1:ce[z.key]},K=async z=>{var he,Xe,at,H,V,ie;d.value=!0;let ce=[];const re=await((at=(Xe=(he=Ve.FormContent)==null?void 0:he.find(ve=>(ve==null?void 0:ve.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:Xe.value)==null?void 0:at.value)??((V=(H=Ve.FormContent)==null?void 0:H.find(ve=>(ve==null?void 0:ve.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:V.value);if(re==null||re.forEach(ve=>{F.value++,ce.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,prop:ve==null?void 0:ve.prop,value:Ce(ve,z),id:F.value,contents:ve==null?void 0:ve.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((ie=z==null?void 0:z.menuSelect)==null?void 0:ie.length)>0){const ve=await Ve.menuToContentType(z==null?void 0:z.menuSelect);ce=ce==null?void 0:ce.map(Pe=>((Pe==null?void 0:Pe.name)==="组信息选项"&&(Pe.contents=ve),Pe))}k.value=z==null?void 0:z.id,u.value=await Ve.selectToBase(Ve.formToOptionsContents(ce)),b.value=await Ve.selectToBase(Ve.formToOptionsContents(ce))},L=z=>{var re;h.value=!0;let ce=[];(re=Ve.FormButton)==null||re.forEach(he=>{F.value++,ce.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)==="类型"&&z[he.key]===""?"normal":z[he.key],id:F.value,contents:he==null?void 0:he.options})}),G.value=ce,M.value=ce,k.value=z==null?void 0:z.id};e.watch(()=>O.value,()=>{var ce,re;let z=N.cloneDeep(s.originalItemContents);(ce=N.cloneDeep(s.originalItemContents))!=null&&ce.find(he=>(he==null?void 0:he.key)==="enableWrap")?z=(re=N.cloneDeep(s.originalItemContents))==null?void 0:re.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!O.value),he)):z.push({key:"enableWrap",contents:!O.value}),r("change",z)},{deep:!0});const ee=()=>{var re,he,Xe,at,H;G.value=M.value;let z={};if(k.value!==""?z.id=k.value:(F.value++,z.id="id"+F.value),(re=G.value)==null||re.forEach(V=>{var ve;const ie=(ve=Ve.FormButton)==null?void 0:ve.find(Pe=>(Pe==null?void 0:Pe.label)===(V==null?void 0:V.label));ie&&(z[ie.key]=V.value)}),(he=f.value)!=null&&he.find(V=>V.id===z.id))f.value=(Xe=f.value)==null?void 0:Xe.map(V=>(V.id===z.id&&(V=z),V));else{let V=N.cloneDeep(f.value);f.value||(f.value=[]),V.push(z),f.value=V}h.value=!1,k.value="";let ce=N.cloneDeep(s.originalItemContents);(at=N.cloneDeep(s.originalItemContents))!=null&&at.find(V=>(V==null?void 0:V.key)==="formButton")?ce=(H=N.cloneDeep(s.originalItemContents))==null?void 0:H.map(V=>((V==null?void 0:V.key)==="formButton"&&(V.contents=f.value),V)):ce.push({key:"formButton",contents:f.value}),r("change",ce)},C=z=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ce,re;w.value=(ce=N.cloneDeep(w.value))==null?void 0:ce.filter(he=>(he==null?void 0:he.id)!==(z==null?void 0:z.id)),r("change",(re=N.cloneDeep(s.originalItemContents))==null?void 0:re.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=w.value),he))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=z=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ce,re;f.value=(ce=N.cloneDeep(f.value))==null?void 0:ce.filter(he=>(he==null?void 0:he.id)!==(z==null?void 0:z.id)),r("change",(re=N.cloneDeep(s.originalItemContents))==null?void 0:re.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=f.value),he))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ce;h.value=!0;let z=[];(ce=Ve.FormButton)==null||ce.forEach(re=>{F.value++,z.push({label:re==null?void 0:re.label,name:re==null?void 0:re.label,type:re.type,value:(re==null?void 0:re.label)==="类型"?"normal":"",id:F.value,contents:re==null?void 0:re.options})}),G.value=z,M.value=z},I=()=>{var ce,re,he;d.value=!0;let z=[];(he=(re=(ce=Ve.FormContent)==null?void 0:ce.find(Xe=>(Xe==null?void 0:Xe.key)==="Input"))==null?void 0:re.value)==null||he.forEach(Xe=>{F.value++,z.push({label:Xe==null?void 0:Xe.label,name:Xe==null?void 0:Xe.label,type:Xe.type,value:(Xe==null?void 0:Xe.label)==="类型"?"Input":"",id:F.value,contents:Xe==null?void 0:Xe.options})}),u.value=z,b.value=z},x=z=>{let ce=N.cloneDeep(M.value);ce=ce==null?void 0:ce.map(re=>(re.value=z==null?void 0:z[re.name],re)),M.value=ce},fe=z=>{const ce=z.find(Xe=>(Xe==null?void 0:Xe.name)==="类型");if((ce==null?void 0:ce.value)!="Select")return;const re=z.find(Xe=>(Xe==null?void 0:Xe.name)==="多选"),he=z.find(Xe=>(Xe==null?void 0:Xe.name)==="初始值");re!=null&&re.value&&So.isString(he.value)&&(he.value=[he.value]),!(re!=null&&re.value)&&!So.isString(he.value)&&(he.value="")},Fe=async z=>{var ce,re,he,Xe,at,H,V,ie,ve,Pe,Re,tt;if((z==null?void 0:z.类型)!==((re=(ce=b.value)==null?void 0:ce.find(ne=>(ne==null?void 0:ne.label)==="类型"))==null?void 0:re.value)){let ne=[];const Se=await((at=(Xe=(he=Ve.FormContent)==null?void 0:he.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:Xe.value)==null?void 0:at.value)?await((Pe=(ve=(ie=Ve.FormContent)==null?void 0:ie.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:ve.value)==null?void 0:Pe.value):(V=(H=Ve.FormContent)==null?void 0:H.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:V.value;if(Se==null||Se.forEach(T=>{var Qe,Oe;F.value++;const Ze=Xl(T==null?void 0:T.default)?(z==null?void 0:z[T.label])??T.value??"":T==null?void 0:T.default;ne.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:Ze,prop:T==null?void 0:T.prop,id:F.value,contents:T==null?void 0:T.options,width:((Oe=(Qe=b.value)==null?void 0:Qe[0])==null?void 0:Oe.width)??1})}),z!=null&&z.菜单选项&&((Re=z==null?void 0:z.菜单选项)==null?void 0:Re.length)>0){const T=await Ve.menuToContentType(z==null?void 0:z.菜单选项);ne=ne==null?void 0:ne.map(Ze=>((Ze==null?void 0:Ze.name)==="组信息选项"&&(Ze.contents=T),Ze))}fe(ne),b.value=await Ve.selectToBase(N.cloneDeep(ne)),u.value=await Ve.selectToBase(N.cloneDeep(ne))}else{let ne=N.cloneDeep(b.value);if(ne=ne==null?void 0:ne.map(Se=>(Se.value=z==null?void 0:z[Se.name],Se)),z!=null&&z.菜单选项&&((tt=z==null?void 0:z.菜单选项)==null?void 0:tt.length)>0){const Se=await Ve.menuToContentType(z==null?void 0:z.菜单选项);ne=ne==null?void 0:ne.map(T=>((T==null?void 0:T.name)==="组信息选项"&&(T.contents=Se),T))}ne=Ve.formToOptionsContents(ne),fe(ne),b.value=await Ve.selectToBase(N.cloneDeep(ne))}},st=z=>{z||(u.value=b.value)},_e=async z=>{await Fe(z),u.value=b.value},Ke=pr(async()=>{var he,Xe,at,H,V,ie,ve,Pe,Re,tt,ne,Se;u.value=b.value;let z={};z.width=((Xe=(he=u.value)==null?void 0:he[0])==null?void 0:Xe.width)??1,k.value!==""?z.id=k.value:(F.value++,z.id="id"+F.value);let ce=await((V=(H=(at=Ve.FormContent)==null?void 0:at.find(T=>{var Ze,Qe;return(T==null?void 0:T.key)===(((Qe=(Ze=u.value)==null?void 0:Ze.find(Oe=>(Oe==null?void 0:Oe.label)==="类型"))==null?void 0:Qe.value)??"label")}))==null?void 0:H.value)==null?void 0:V.value)??((ve=(ie=Ve.FormContent)==null?void 0:ie.find(T=>{var Ze,Qe;return(T==null?void 0:T.key)===(((Qe=(Ze=u.value)==null?void 0:Ze.find(Oe=>(Oe==null?void 0:Oe.label)==="类型"))==null?void 0:Qe.value)??"label")}))==null?void 0:ve.value);if((Pe=u.value)==null||Pe.forEach(T=>{const Ze=ce==null?void 0:ce.find(Qe=>(Qe==null?void 0:Qe.label)===(T==null?void 0:T.label));Ze&&(z[Ze.key]=T.value)}),z.width=z.width?z.width:1,z.key=z==null?void 0:z.label,z.isFormColHidden=z==null?void 0:z.isFormColHidden,(Re=w.value)!=null&&Re.find(T=>T.id===z.id))w.value=(tt=w.value)==null?void 0:tt.map(T=>(T.id===z.id&&(T=z),T));else{let T=N.cloneDeep(w.value);T.push(z),w.value=T}w.value=w.value.map(({id:T,...Ze})=>Ze),d.value=!1,k.value="";let re=N.cloneDeep(s.originalItemContents);(ne=N.cloneDeep(s.originalItemContents))!=null&&ne.find(T=>(T==null?void 0:T.key)==="formContent")?re=(Se=N.cloneDeep(s.originalItemContents))==null?void 0:Se.map(T=>((T==null?void 0:T.key)==="formContent"&&(T.contents=w.value),T)):re.push({key:"formContent",contents:w.value}),r("change",re)},300),We=()=>{d.value=!1,h.value=!1,k.value="",b.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ce,re,he,Xe,at,H;if(!s.originalItemContents||s.originalItemContents.length===0)return;const z=N.cloneDeep(s.originalItemContents);w.value=((ce=z==null?void 0:z.find(V=>(V==null?void 0:V.key)==="formContent"))==null?void 0:ce.contents)??[],f.value=((re=z==null?void 0:z.find(V=>(V==null?void 0:V.key)==="formButton"))==null?void 0:re.contents)??[],O.value=(he=z==null?void 0:z.find(V=>(V==null?void 0:V.key)==="enableWrap"))!=null&&he.contents?!((Xe=z==null?void 0:z.find(V=>(V==null?void 0:V.key)==="enableWrap"))!=null&&Xe.contents):!0,w.value=(at=N.cloneDeep(w.value))==null?void 0:at.map((V,ie)=>{var Pe;let ve=V;return ve.id=(V==null?void 0:V.id)??ie,V!=null&&V.label||(V.label=(V==null?void 0:V.key)??(V==null?void 0:V.label)??""),V!=null&&V.type||(V.type=(V==null?void 0:V.type)??""),V.contents=((Pe=V==null?void 0:V.options)==null?void 0:Pe.length)===0?(V==null?void 0:V.contents)??"":V==null?void 0:V.options,ve}),w.value=Ve.formToOptionsContents(w.value),f.value=(H=f.value)==null?void 0:H.map((V,ie)=>V={label:(V==null?void 0:V.label)??"",type:(V==null?void 0:V.type)??"",background:(V==null?void 0:V.background)??"var(--ssComponent-primary-color)",id:ie})},{deep:!0,immediate:!0}),(z,ce)=>{const re=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Es,[e.createElementVNode("div",Ss,[ce[2]||(ce[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:I},{icon:e.withCtx(()=>[e.createVNode(re,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ce[1]||(ce[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ts,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(Xe,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",Is,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Bs,[e.createVNode(re,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>K(Xe)},null,8,["onClick"]),e.createVNode(re,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>C(Xe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[ce[4]||(ce[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(re,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ce[3]||(ce[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",As,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Xe,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Vs,[e.createVNode(re,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>L(Xe)},null,8,["onClick"]),e.createVNode(re,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>R(Xe)},null,8,["onClick"])])])]))),128))]),ce[6]||(ce[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ms,[ce[5]||(ce[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:O.value,"onUpdate:modelValue":ce[0]||(ce[0]=Xe=>O.value=Xe)},null,8,["modelValue"])])]),e.createVNode(Jt.ssDialog,{visible:d.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Fe,onChangeVisible:st,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(he,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ce[7]||(ce[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(Ke),id:"themeButton"},{default:e.withCtx(()=>ce[8]||(ce[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:G.value,key:G.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:We,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ee},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Oo=Pt._export_sfc(Ls,[["__scopeId","data-v-20850524"]]),Ps={class:"step-module content"},$s={class:"module-data"},js={class:"step-module layout"},Us={class:"form-content"},Ks=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),w=e.ref({}),k=e.ref([]),O=K=>{var L;w.value=K,r("change",(L=M())==null?void 0:L.compData)},F=(K,L)=>{var ee,C;switch(K){case"create":(ee=u.value)==null||ee.forEach(R=>{R.value=""}),f.value="create",h.visible=!0;break;case"update":(C=u.value)==null||C.forEach(R=>{R.value=L[R==null?void 0:R.prop]}),f.value="update",h.visible=!0;break;case"delete":k.value.splice(L,1),f.value="delete";break}},G=K=>{var L,ee,C;if((K==null?void 0:K.buttonName)==="确认"){const R=N.cloneDeep(K==null?void 0:K.content);switch(Object.keys(R).forEach(y=>{R[y]===""&&delete R[y]}),f.value){case"create":k.value.push({...R,index:((L=k.value)==null?void 0:L.length)+1});break;case"update":k.value=(ee=k.value)==null?void 0:ee.map(y=>y.index===(R==null?void 0:R.index)?{...y,title:R==null?void 0:R.title,description:R==null?void 0:R.description}:y);break}r("change",(C=M())==null?void 0:C.compData),h.visible=!1}else h.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:k.value},{key:"stepConfig",contents:w.value}]}),Ce=()=>{h.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var L,ee;K&&(w.value=((L=K==null?void 0:K.find(C=>C.key==="stepConfig"))==null?void 0:L.contents)??{},k.value=((ee=K==null?void 0:K.find(C=>C.key==="stepList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(K,L)=>{const ee=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ps,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",$s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.title),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:I=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:I=>F("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",js,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Ce,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Ws=Pt._export_sfc(Ks,[["__scopeId","data-v-7dbd17f2"]]),Hs={class:"step-module content"},qs={class:"module-data"},Gs={class:"step-module layout"},Xs={class:"form-content"},Ys=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.ref("create"),u=e.ref({}),b=e.ref([]),h=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),k=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=K=>{var L;u.value=K,r("change",(L=M())==null?void 0:L.compData)},F=(K,L)=>{var ee,C;switch(K){case"create":(ee=f.value)==null||ee.forEach(R=>{R.value=""}),d.value="create",k.visible=!0;break;case"update":(C=f.value)==null||C.forEach(R=>{R.value=L[R==null?void 0:R.prop]}),d.value="update",k.visible=!0;break;case"delete":b.value.splice(L,1),d.value="delete";break}},G=K=>{var L,ee,C,R;if((K==null?void 0:K.buttonName)==="确认"){const y=N.cloneDeep(K==null?void 0:K.content);switch(Object.keys(y).forEach(I=>{y[I]===""&&delete y[I]}),d.value){case"create":(ee=b.value)==null||ee.push({...y,index:((L=b.value)==null?void 0:L.length)+1});break;case"update":b.value=(C=b.value)==null?void 0:C.map(I=>I.index===(y==null?void 0:y.index)?{...I,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:I);break}r("change",(R=M())==null?void 0:R.compData),k.visible=!1}else k.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),Ce=()=>{k.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var L,ee;K&&(u.value=((L=K==null?void 0:K.find(C=>C.key==="timeLineConfig"))==null?void 0:L.contents)??{},b.value=((ee=K==null?void 0:K.find(C=>C.key==="timeLineList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(K,L)=>{const ee=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Hs,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.content),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:I=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:I=>F("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Gs,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:h.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:k.visible,title:k.title,onBeforeDestroy:Ce,width:k.width},{default:e.withCtx(()=>[e.createElementVNode("div",Xs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Js=Pt._export_sfc(Ys,[["__scopeId","data-v-39ffc861"]]),Zs={};function Qs(n,l){return e.openBlock(),e.createElementBlock("div")}const ec=Pt._export_sfc(Zs,[["render",Qs]]),tc={class:"extra-content"},ac={key:0},nc={key:1},oc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:l}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=l,h=e.ref(!1),f=e.ref({}),w=e.ref({}),k=e.ref();e.watch(()=>[s.itemData],()=>{var R;const C=N.cloneDeep(s.itemData);d.value=(R=N.cloneDeep(C))==null?void 0:R.map(y=>{var I;if(y.key==="extra"){let x=[];(I=y.value)==null||I.forEach(fe=>{var Fe;x.push((Fe=Object.values(fe))==null?void 0:Fe[0])}),y.value=x}return y})},{deep:!0,immediate:!0});const O=(C,R,y,I)=>{var fe;let x={};((fe=C==null?void 0:C[0])==null?void 0:fe.contents)==="详情"&&(h.value=!0,x[R]=C,u.value=C==null?void 0:C.filter(Fe=>(Fe==null?void 0:Fe.key)!=="tableContentName"),f.value=x,w.value=y,k.value=I.id)},F=C=>{var Fe,st,_e,Ke;const R=(st=(Fe=Object.values(N.cloneDeep(f.value)))==null?void 0:Fe[0])==null?void 0:st.filter(We=>(We==null?void 0:We.key)==="tableContentName"),y=(Ke=(_e=Object.values(N.cloneDeep(f.value)))==null?void 0:_e[0])==null?void 0:Ke.filter(We=>(We==null?void 0:We.key)!=="tableContentName"),I=y==null?void 0:y.map((We,z)=>{var ce;return z===C.index&&(We==null?void 0:We.comp)==="Table"&&(We.compData=(ce=We.compData)==null?void 0:ce.map(re=>{var he,Xe;return(re==null?void 0:re.key)==="tableContents"&&(re.contents=(Xe=(he=C.content)==null?void 0:he.map(at=>{let H={};for(let V in at)V!=="id"&&(H[V]=at[V]);return H}))==null?void 0:Xe.map(at=>Object.values(at))),re})),We});I.unshift(R==null?void 0:R[0]);let x=N.cloneDeep(f.value),fe={};for(let We in x)fe[We]=I;f.value=fe},G=()=>{h.value=!1,f.value={},w.value={},k.value=void 0,r.value++},M=C=>{var Fe,st,_e,Ke;const R=(st=(Fe=Object.values(N.cloneDeep(f.value)))==null?void 0:Fe[0])==null?void 0:st.filter(We=>(We==null?void 0:We.key)==="tableContentName"),y=(Ke=(_e=Object.values(N.cloneDeep(f.value)))==null?void 0:_e[0])==null?void 0:Ke.filter(We=>(We==null?void 0:We.key)!=="tableContentName"),I=y==null?void 0:y.map((We,z)=>(z===C.index&&(We.compData=C.contents),We));I.unshift(R==null?void 0:R[0]);let x=N.cloneDeep(f.value),fe={};for(let We in x)fe[We]=I;f.value=fe},Ce=()=>{var R,y;let C={};for(let I in w.value)I===((R=Object.keys(f.value))==null?void 0:R[0])?C[I]=(y=Object.values(f.value))==null?void 0:y[0]:C[I]=w.value[I];b("change",{buttonName:"编辑",index:k.value,singleContent:C},"methodData"),h.value=!1,f.value={},w.value={},k.value=void 0},K=()=>{h.value=!1,f.value={},w.value={},k.value=void 0},L=C=>{b("change",C,"methodData")},ee=C=>an(C);return(C,R)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(I,x)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(I==null?void 0:I.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee(I.comp)),{itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,key:x,index:(I==null?void 0:I.id)??x,onContentClick:O,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:K},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(I,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ee(I.comp)),{itemData:I==null?void 0:I.compData,onChange:F,childItemData:I==null?void 0:I.itemChildData,key:x,onContentChange:M,index:(I==null?void 0:I.id)??x,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createVNode(y,{class:"cancel-button footer-button",onClick:G,id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},lc=Pt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]),ic={key:0,class:"method-content"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const l=e.ref([]),s=Ve.useOriginalState(te.pinia),{originalPath:r}=te.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),h=Ve.useTableComp(te.pinia),{multipleTableConst:f}=te.storeToRefs(h),w=N.useModelComp(te.pinia),k=e.ref(!1),O=N.useMenuState(te.pinia),F=N.useLoginState(te.pinia),{itemData:G,isEdit:M,routeToChildPath:Ce,tableViewContents:K,lockingPage:L,payloadTypes:ee}=te.storeToRefs(w),{activeMenuPath:C,platform:R,childMenu:y}=te.storeToRefs(O),{loginUserInfo:I}=te.storeToRefs(F),x=e.ref(!1),fe=async()=>{var H,V;(H=l.value)!=null&&H.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")&&await re((V=l.value)==null?void 0:V.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>G.value,async()=>{M.value==="view"&&!x.value&&await at(N.cloneDeep(d.itemData)),x.value=!1},{deep:!0});const Fe=()=>{u.value=!1,b.value=void 0},st=H=>H.map(V=>{const ie={};for(const ve in V){const Pe=V[ve];if(ve.includes(f.value)){const Re=ve.split(f.value);let tt=ie;Re.forEach((ne,Se)=>{Se===Re.length-1?tt[ne]=Pe:(tt[ne]||(tt[ne]={}),tt=tt[ne])})}else ie[ve]=Pe}return ie}),_e=async(H,V,ie=[])=>{var Pe,Re,tt,ne,Se,T,Ze,Qe,Oe,le,Q,se,Te,Ge,ct;let ve=(Pe=N.cloneDeep(V))==null?void 0:Pe.filter(v=>(v==null?void 0:v.comp)!=="methodButton");if(H!=null&&H.includes("[")){let v=(T=(Se=(ne=(tt=(Re=N.cloneDeep(H))==null?void 0:Re.split("["))==null?void 0:tt[1])==null?void 0:ne.split("]"))==null?void 0:Se[0])==null?void 0:T.split(":"),E="";if(v!=null&&v[0]){let U=(Ze=ve==null?void 0:ve.find(Y=>(Y==null?void 0:Y.name)===(v==null?void 0:v[0])))==null?void 0:Ze.compData;if(!U){let Y=(Qe=H==null?void 0:H.split("["))==null?void 0:Qe[0],D=await Ve.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",ie);U=(Oe=D==null?void 0:D.find(oe=>(oe==null?void 0:oe.name)===(v==null?void 0:v[0])))==null?void 0:Oe.compData}U==null||U.forEach(Y=>{var D,oe,ze,S,J,P;if((Y==null?void 0:Y.key)==="formContent")(D=Y==null?void 0:Y.contents)==null||D.forEach(W=>{var De;(W==null?void 0:W.key)===(v==null?void 0:v[1])&&(Array.isArray(W==null?void 0:W.value)?E=W==null?void 0:W.value:E=(De=W==null?void 0:W.value)==null?void 0:De.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let W=[],De=(oe=U==null?void 0:U.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:oe.contents,ae=(v==null?void 0:v[1])??"";if(De!=null&&De.every(q=>Array.isArray(q))){let q=Ve.getColumnChild((J=De==null?void 0:De[0])==null?void 0:J.filter(X=>(X==null?void 0:X.label)!=="操作"));(P=Y.contents)==null||P.forEach(X=>{let de={};X=X==null?void 0:X.filter(xe=>!(xe!=null&&xe.id)),q==null||q.forEach((xe,be)=>{let ke=X[be];typeof X[be]=="number"&&(ke=X[be].toString()),(ae===""||ae===xe.prop)&&(de[xe.prop]=ke)}),W.push(de)}),W=st(W)}else{let q=(ze=De==null?void 0:De.map(X=>X==null?void 0:X.label))==null?void 0:ze.filter(X=>X!=="操作");(S=Y.contents)==null||S.forEach(X=>{let de={};X=X==null?void 0:X.filter(xe=>!(xe!=null&&xe.id)),q==null||q.forEach((xe,be)=>{let ke=X[be];typeof X[be]=="number"&&(ke=X[be].toString()),(ae===""||ae===xe)&&(de[xe]=ke)}),W.push(de)})}E=W}})}return E}else if(H!=null&&H.includes("/")){let v={};return(le=N.cloneDeep(ve))==null||le.forEach((E,U)=>{var Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be,ke,$,Ie,pe;if((E==null?void 0:E.comp)==="Table"){let Me=Array.isArray((oe=(D=(Y=E==null?void 0:E.compData)==null?void 0:Y.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:D.contents)==null?void 0:oe[0])?(P=(J=(S=(ze=E==null?void 0:E.compData)==null?void 0:ze.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:S.contents)==null?void 0:J[0])==null?void 0:P.some(Ae=>Ae==null?void 0:Ae.children):[],lt=(ae=(De=(W=E==null?void 0:E.compData)==null?void 0:W.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:De.contents)==null?void 0:ae.map(Ae=>(Ae!=null&&Ae.find(vt=>vt==null?void 0:vt.id)&&(Ae=Ae.slice(1)),Ae)),$e=(be=(xe=(de=(X=(q=E==null?void 0:E.compData)==null?void 0:q.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:X.contents)==null?void 0:de[0])==null?void 0:xe[0])==null?void 0:be.label,ot=($=(ke=E==null?void 0:E.compData)==null?void 0:ke.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:$.contents;if(Me)(Me==null?void 0:Me.length)===0?v[E.name]=v!=null&&v[E.name]?v[E.name]:Ve.tableToForm(lt,ot):v[$e]=Ve.tableToForm(lt,ot);else{const Ae=[];ot=ot.slice(1,ot.length-1),ot==null||ot.forEach((vt,nt)=>{lt==null||lt.forEach(me=>{Ae.push({key:vt.label+me[0],value:me[nt+1]})})}),v["form"+U]=Ae}}else{const Me=(pe=(Ie=E.compData)==null?void 0:Ie.find($e=>($e==null?void 0:$e.key)==="formContent"))==null?void 0:pe.contents;v!=null&&v.form||(v.form=[]);const lt=[];Me==null||Me.forEach($e=>{$e.key!==""&&($e={key:($e==null?void 0:$e.key)??($e==null?void 0:$e.label),value:$e==null?void 0:$e.value},lt.push($e))}),v.form=[...lt,...N.cloneDeep(v==null?void 0:v.form)]}}),v}else{if(H==="createInsofDataApi"){let v=(Q=N.cloneDeep(V))==null?void 0:Q[0];return v={comp:(se=N.cloneDeep(v))==null?void 0:se.comp,compData:(Te=N.cloneDeep(v))==null?void 0:Te.compData,name:(Ge=N.cloneDeep(v))==null?void 0:Ge.name,isShow:(ct=N.cloneDeep(v))==null?void 0:ct.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:C.value},value:{pageData:v}}}return H}},Ke=async(H,V,ie)=>{var Re,tt,ne;let ve=await Ve.getItemData(V,sessionStorage.getItem("systemKey"),""),Pe=ve==null?void 0:ve.find(Se=>(Se==null?void 0:Se.name)===(ie==null?void 0:ie[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let Se={};for(let se in N.cloneDeep(H))N.cloneDeep(H)[se]!=="loginUser"?Se[se]=N.cloneDeep(H)[se]:Se[se]=((Re=I.value)==null?void 0:Re.account)||((tt=I.value)==null?void 0:tt.账号);let T=[],Ze=Se;Array.isArray(H)||(Ze=[Se]),Ze==null||Ze.forEach(se=>{T.push({[se[ie[1]]]:se})});let Qe=[],Oe=T==null?void 0:T.map(se=>{var Te;return(Te=Object.keys(se))==null?void 0:Te[0]});ve==null||ve.forEach(se=>{var Te;(se==null?void 0:se.name)===(ie==null?void 0:ie[0])&&((Te=se==null?void 0:se.compData)==null||Te.forEach(Ge=>{var ct;(Ge==null?void 0:Ge.key)==="tableContents"&&((ct=Ge==null?void 0:Ge.contents)==null||ct.forEach(v=>{v!=null&&v.some(E=>Oe.includes(E))&&Qe.push({[v.find(E=>E.id).id]:v.find(E=>Oe.includes(E))})}))}))});let le=Qe==null?void 0:Qe.map(se=>{var Te;return(Te=Object.keys(se))==null?void 0:Te[0]}),Q=[];if(le==null||le.forEach(se=>{var ct;let Te=(ct=Qe==null?void 0:Qe.find(v=>{var E;return((E=Object.keys(v))==null?void 0:E[0].toString())===se.toString()}))==null?void 0:ct[se],Ge=T==null?void 0:T.find(v=>{var E;return((E=Object.keys(v))==null?void 0:E[0])===Te});Q.push({id:parseInt(se),value:{tableData:Ge[Te]}})}),(Q==null?void 0:Q.length)>0)return Q}else if((Pe==null?void 0:Pe.comp)==="Form"){let Se=N.cloneDeep(Pe);Se.compData=(ne=Se.compData)==null?void 0:ne.map(Qe=>{var Oe;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(Oe=Qe.contents)==null?void 0:Oe.map(le=>((le==null?void 0:le.key)===(ie==null?void 0:ie[1])&&(le.value=(H==null?void 0:H[le==null?void 0:le.prop])||H),le))),Qe});let T={};for(let Qe in Se)Qe!=="id"&&(T[Qe]=Se[Qe]);let Ze=[];if(Ze.push({id:Pe==null?void 0:Pe.id,keyType:ie==null?void 0:ie[1],value:{pageData:T}}),(Ze==null?void 0:Ze.length)>0)return Ze}}},We=async(H,V,ie)=>{var Re,tt,ne,Se,T,Ze,Qe,Oe,le,Q;let ve=await Ve.getItemData(V,sessionStorage.getItem("systemKey"),""),Pe=ve==null?void 0:ve.find(se=>(se==null?void 0:se.name)===(ie==null?void 0:ie[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let se={};for(let Te in N.cloneDeep(H))N.cloneDeep(H)[Te]!=="loginUser"?se[Te]=N.cloneDeep(H)[Te]:se[Te]=((Re=I.value)==null?void 0:Re.account)||((tt=I.value)==null?void 0:tt.账号);await te.createInsofDataApi({key:{type:"data",pageKey:V,tableId:Pe==null?void 0:Pe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:se}})}else if((Pe==null?void 0:Pe.comp)==="Form"){let se=N.cloneDeep(Pe),Te=Object.keys(H),Ge="";(Se=(ne=N.cloneDeep(se))==null?void 0:ne.compData)==null||Se.forEach(D=>{var oe,ze;(D==null?void 0:D.key)==="formContent"&&((ze=(oe=N.cloneDeep(D))==null?void 0:oe.contents)==null||ze.forEach(S=>{var J;Te.includes(S==null?void 0:S.key)&&(S==null?void 0:S.value)===((J=I.value)==null?void 0:J.姓名)&&(Ge=S==null?void 0:S.key)}))});let ct=[];(T=Object.values(H[Ge]))==null||T.forEach(D=>{D!=null&&D.includes("(")&&ct.push(D)}),ct=[...new Set(ct)];const v=ct==null?void 0:ct.map(async D=>{var P,W,De,ae,q,X,de,xe,be,ke,$,Ie;let oe="";(X=(q=(ae=(De=(W=(P=N.cloneDeep(D))==null?void 0:P.split("("))==null?void 0:W[1])==null?void 0:De.split(")"))==null?void 0:ae[0])==null?void 0:q.split(":"))==null||X.forEach(pe=>{oe=oe===""?oe+pe.replaceAll("'",""):oe+"/"+pe.replaceAll("'","")});let ze=[];(Ie=($=(ke=(be=(xe=(de=N.cloneDeep(D))==null?void 0:de.split("<"))==null?void 0:xe[1])==null?void 0:be.split(">"))==null?void 0:ke[0])==null?void 0:$.split(":"))==null||Ie.forEach(pe=>{ze.push(pe.replaceAll("'",""))});const S=await Ve.getItemData(oe,sessionStorage.getItem("systemKey"),"");let J="";return S==null||S.forEach(pe=>{var Me;pe.name===(ze==null?void 0:ze[0])&&((Me=pe==null?void 0:pe.compData)==null||Me.forEach(lt=>{var $e;(lt==null?void 0:lt.key)==="formContent"&&(($e=lt.contents)==null||$e.forEach(ot=>{(ot==null?void 0:ot.key)===(ze==null?void 0:ze[1])&&(J=ot==null?void 0:ot.value)}))}))}),{[D]:J}}),E=await Promise.all(v);se.compData=(Qe=(Ze=N.cloneDeep(se))==null?void 0:Ze.compData)==null?void 0:Qe.map(D=>{var oe,ze;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(ze=(oe=N.cloneDeep(D))==null?void 0:oe.contents)==null?void 0:ze.map(S=>{var J,P,W,De;return(J=H[Ge])!=null&&J[S==null?void 0:S.key]&&(H[Ge][S==null?void 0:S.key].includes("(")?S.value=(P=E==null?void 0:E.find(ae=>{var q;return((q=Object.keys(ae))==null?void 0:q[0])===H[Ge][S==null?void 0:S.key]}))==null?void 0:P[H[Ge][S==null?void 0:S.key]]:S.value=(De=(W=N.cloneDeep(H))==null?void 0:W[Ge])==null?void 0:De[S==null?void 0:S.key]),S})),D});const U=await te.getInsofDataApi({key:{type:"structure",pageKey:V,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Oe=U==null?void 0:U.data)==null?void 0:Oe.type)==="success"&&((Q=(le=U==null?void 0:U.data)==null?void 0:le.result)==null||Q.forEach(D=>{var oe,ze;((ze=(oe=D==null?void 0:D.value)==null?void 0:oe.pageData)==null?void 0:ze.name)===(ie==null?void 0:ie[0])&&(Y=D.id)}),await te.updateInsofDataApi({id:Y,value:{pageData:se}}))}}},z=(H,V="",ie={})=>{for(const[ve,Pe]of Object.entries(H)){const Re=V?`${V}.${ve}`:ve;Pe!==null&&typeof Pe=="object"&&!Array.isArray(Pe)&&Object.prototype.toString.call(Pe)!=="[object Date]"?z(Pe,Re,ie):ie[Re]=Pe}return ie},ce=async(H,V,ie,ve)=>{var tt,ne,Se,T,Ze,Qe,Oe,le,Q,se,Te,Ge,ct,v,E,U,Y,D,oe,ze,S,J,P,W,De;let Pe=await Ve.getItemData(V,sessionStorage.getItem("systemKey"),""),Re=Pe==null?void 0:Pe.find(ae=>(ae==null?void 0:ae.name)===(ie==null?void 0:ie[0]));if(Re){if(!(ie!=null&&ie[1])&&(Re==null?void 0:Re.comp)==="Table"){let ae={},q=[],X=(ne=(tt=Re==null?void 0:Re.compData)==null?void 0:tt.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:ne.contents;X!=null&&X.every(be=>Array.isArray(be))?q=(T=Ve.getColumnChild((Se=X==null?void 0:X[0])==null?void 0:Se.filter(be=>(be==null?void 0:be.label)!=="操作")))==null?void 0:T.map(be=>be==null?void 0:be.prop):q=X==null?void 0:X.map(be=>be==null?void 0:be.label);for(let be in N.cloneDeep(H))if(N.cloneDeep(H)[be]!=="loginUser"){let ke=z(N.cloneDeep(H)[be]),$={};for(let Ie in ke)if(q!=null&&q.find(pe=>pe===Ie))$[Ie]=ke[Ie];else if(q!=null&&q.find(pe=>(pe==null?void 0:pe.toUpperCase())===(Ie==null?void 0:Ie.toUpperCase()))){let pe=q==null?void 0:q.find(Me=>(Me==null?void 0:Me.toUpperCase())===(Ie==null?void 0:Ie.toUpperCase()));$[pe]=ke[Ie]}ae[be]=$}else ae[be]=((Ze=I.value)==null?void 0:Ze.account)||((Qe=I.value)==null?void 0:Qe.账号);let de=await te.getInsofDataApi({keyLikes:{tableId:Re==null?void 0:Re.id}});if(((le=(Oe=de==null?void 0:de.data)==null?void 0:Oe.result)==null?void 0:le.length)>0){let be=(se=(Q=de==null?void 0:de.data)==null?void 0:Q.result)==null?void 0:se.map(ke=>ke==null?void 0:ke.id);(be==null?void 0:be.length)>0&&await te.batchDeleteInsofDataApi({ids:be})}let xe=[];if((Te=Re==null?void 0:Re.compData)!=null&&Te.find(be=>(be==null?void 0:be.key)==="pageColumn")&&((v=(ct=(Ge=Re==null?void 0:Re.compData)==null?void 0:Ge.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:ct.contents)!=null&&v.includes("["))){const be=await te.getInsofDataApi({id:Re==null?void 0:Re.tableId});let ke=((D=(Y=(U=(E=be==null?void 0:be.data)==null?void 0:E.result)==null?void 0:U[0])==null?void 0:Y.key)==null?void 0:D.pageKey)??"";(oe=Object.values(ae))==null||oe.forEach($=>{xe.push({key:{type:"data",pageKey:ke,tableId:Re==null?void 0:Re.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(ze=Object.values(ae))==null||ze.forEach(be=>{xe.push({key:{type:"data",pageKey:V,tableId:Re==null?void 0:Re.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:be}})});(xe==null?void 0:xe.length)>0&&await te.batchAddInsofDataApi({dataList:xe})}else if(!(ie!=null&&ie[1])&&(Re==null?void 0:Re.comp)==="Form"){let ae=N.cloneDeep(Re);ae.compData=(J=(S=N.cloneDeep(ae))==null?void 0:S.compData)==null?void 0:J.map(de=>{var xe,be;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(be=(xe=N.cloneDeep(de))==null?void 0:xe.contents)==null?void 0:be.map(ke=>{var $,Ie;return($=N.cloneDeep(H))!=null&&$[ke==null?void 0:ke.key]&&(ke.value=(Ie=N.cloneDeep(H))==null?void 0:Ie[ke==null?void 0:ke.key]),ke})),de});const q=await te.getInsofDataApi({key:{type:"structure",pageKey:V,systemKey:sessionStorage.getItem("systemKey")}});let X="";((P=q==null?void 0:q.data)==null?void 0:P.type)==="success"&&((De=(W=q==null?void 0:q.data)==null?void 0:W.result)==null||De.forEach(de=>{var xe,be;((be=(xe=de==null?void 0:de.value)==null?void 0:xe.pageData)==null?void 0:be.name)===(ie==null?void 0:ie[0])&&(X=de.id)}),await te.updateInsofDataApi({id:X,value:{pageData:ae}}))}}},re=async H=>{var V,ie,ve,Pe,Re,tt,ne,Se,T,Ze,Qe,Oe,le,Q,se,Te;O.setImportLoading(!0);try{if(H.api){let Ge=new WeakMap;(ie=(V=(await te.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ee.value})).data.result)==null?void 0:V.filter(P=>{var W,De;return((W=P==null?void 0:P.key)==null?void 0:W.pageKey)!=="menu"&&((De=P==null?void 0:P.key)==null?void 0:De.pageKey)!=="secret"}))==null||ie.forEach(P=>{Ge[P.key.pageKey]?Ge[P.key.pageKey]=[...Ge[P.key.pageKey],P]:Ge[P.key.pageKey]=[P]});let v=await Ve.getItemData((y==null?void 0:y.value)===""?C.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),E="";if(v=v==null?void 0:v.map(P=>{var W,De,ae,q,X,de,xe,be,ke,$,Ie,pe;if((P==null?void 0:P.comp)==="Form")P.compData=(W=P.compData)==null?void 0:W.map(Me=>{var lt;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(lt=Me.contents)==null?void 0:lt.map($e=>{var ot;if(($e==null?void 0:$e.value)===""&&($e==null?void 0:$e.type)==="Select"){let Ae=Ve.judgeContents((ot=N.cloneDeep($e))==null?void 0:ot.optionUrl,Ge);$e.value=$e.value||Ae}return $e})),Me});else if((P==null?void 0:P.comp)==="Table"&&(De=P.compData)!=null&&De.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=(q=(ae=P.compData)==null?void 0:ae.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:q.contents,lt=((de=(X=P.compData)==null?void 0:X.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:de.contents)??"",$e=(ke=(be=(xe=Me==null?void 0:Me.split("["))==null?void 0:xe[1])==null?void 0:be.split("]"))==null?void 0:ke[0];E=(($=Me==null?void 0:Me.split("["))==null?void 0:$[0])+((pe=(Ie=K.value)==null?void 0:Ie.find(Ae=>(Ae==null?void 0:Ae.key)===$e))==null?void 0:pe.value)}return P}),!(E===""||E==="")){const P=await Ve.getItemData(E,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);v=v==null?void 0:v.map(W=>{var De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt;if((W==null?void 0:W.comp)==="Table"&&(De=W.compData)!=null&&De.find($e=>($e==null?void 0:$e.key)==="pageColumn")){let $e=(q=(ae=W.compData)==null?void 0:ae.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:q.contents,ot=((de=(X=W.compData)==null?void 0:X.find(me=>(me==null?void 0:me.key)==="pageGroup"))==null?void 0:de.contents)??"",Ae=(ke=(be=(xe=$e==null?void 0:$e.split("["))==null?void 0:xe[1])==null?void 0:be.split("]"))==null?void 0:ke[0],vt=(($=$e==null?void 0:$e.split("["))==null?void 0:$[0])+((pe=(Ie=K.value)==null?void 0:Ie.find(me=>(me==null?void 0:me.key)===Ae))==null?void 0:pe.value),nt=(Me=P==null?void 0:P.find(me=>(me==null?void 0:me.name)===(ot===""?d==null?void 0:d.compName:ot)))==null?void 0:Me.compData;W.compData=(lt=W.compData)==null?void 0:lt.map(me=>{var Ye;return(me==null?void 0:me.key)==="tableContents"&&(me.contents=(Ye=nt==null?void 0:nt.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:Ye.contents),me})}return W})}let U={};if(((Pe=(ve=H==null?void 0:H.extraValues)==null?void 0:ve.input)==null?void 0:Pe.length)>0){const P=(tt=(Re=H==null?void 0:H.extraValues)==null?void 0:Re.input)==null?void 0:tt.map(async W=>{var De;he!=null&&he.find(ae=>ae===W)?U=await _e(W,v):U[Object.keys(W)[0]]=await _e((De=Object.values(W))==null?void 0:De[0],v,Ge)});await Promise.all(P)}else U=await _e("/",v);let Y=!1;(Se=(ne=H==null?void 0:H.extraValues)==null?void 0:ne.output)==null||Se.forEach(P=>{var W,De;(De=(W=Object.values(P))==null?void 0:W[0])!=null&&De.includes(".doc")&&(Y=!0)});let D;if(Y){const P=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});D=await te.axios.post(H.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{P.close()})}else D=await te.axios.post(H.api,U,{headers:{"Content-Type":"application/json"}});let oe=(Oe=(Qe=(Ze=(T=N.cloneDeep(H))==null?void 0:T.extraValues)==null?void 0:Ze.output)==null?void 0:Qe.map(P=>{var W,De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt,$e,ot;if(!((De=(W=Object.values(P))==null?void 0:W[0])!=null&&De.includes(".doc"))){let Ae=($=(ke=(be=(q=N.cloneDeep((ae=Object.values(P))==null?void 0:ae[0]))==null?void 0:q.split("["))==null?void 0:be[((xe=(de=N.cloneDeep((X=Object.values(P))==null?void 0:X[0]))==null?void 0:de.split("["))==null?void 0:xe.length)-1])==null?void 0:ke.split("]"))==null?void 0:$[0],vt=Ae==null?void 0:Ae.split(":"),nt=(Me=N.cloneDeep((Ie=Object.values(P))==null?void 0:Ie[0]))==null?void 0:Me.substring(0,N.cloneDeep((pe=Object.values(P))==null?void 0:pe[0]).lastIndexOf("["));if(nt=($e=N.cloneDeep(nt))==null?void 0:$e.slice(0,((lt=N.cloneDeep(nt))==null?void 0:lt.length)-1),nt!=null&&nt.includes("[")){let me="";if((ot=Ve.contentTransArrayToAll(nt,"/"))==null||ot.forEach(Ye=>{var et,je,Ee,ft,ue,Ne,Be;if(!(Ye!=null&&Ye.includes("[")))me=me===""?me+Ye.replaceAll("/",""):me+"/"+Ye.replaceAll("/","");else{let Je=N.cloneDeep(Ye).slice(1,((et=N.cloneDeep(Ye))==null?void 0:et.length)-1),_=(Ne=(ue=(ft=(Ee=(je=N.cloneDeep(Je))==null?void 0:je.split("["))==null?void 0:Ee[1])==null?void 0:ft.split("]"))==null?void 0:ue[0])==null?void 0:Ne.split(":"),ge="",He=(Be=v==null?void 0:v.find(ye=>(ye==null?void 0:ye.name)===(_==null?void 0:_[0])))==null?void 0:Be.compData;He==null||He.forEach(ye=>{var pt;(ye==null?void 0:ye.key)==="formContent"&&((pt=ye==null?void 0:ye.contents)==null||pt.forEach(ut=>{(ut==null?void 0:ut.key)===(_==null?void 0:_[1])&&(ge=ut==null?void 0:ut.value)}))}),me=me===""?me+ge.replaceAll("/",""):me+"/"+ge.replaceAll("/","")}}),nt=me,nt[(nt==null?void 0:nt.length)-1]!=="/")return nt}}}))==null?void 0:Oe.filter(P=>P);oe=[...new Set(N.cloneDeep(oe))];let ze=oe==null?void 0:oe.map(async P=>{let W=await Ve.getItemData(P,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((W==null?void 0:W.length)===0)return await Ve.getParentContents(P)});await Promise.all(ze);let S=[],J=(se=(Q=(le=N.cloneDeep(H))==null?void 0:le.extraValues)==null?void 0:Q.output)==null?void 0:se.map(async P=>{var be,ke,$,Ie,pe,Me,lt,$e,ot,Ae,vt,nt,me,Ye,et,je,Ee,ft,ue,Ne,Be,Je,_,ge,He,ye,pt,ut,wt,ht,dt,gt,Ct,It,Wt,yt,Mt,$t,Ht,Gt,Qt,Ft,Da,Va,ga,Ma,ma,za,Ra,Fa,La,Pa,_a,pa,sa,ya,fa,na,ua,$a,Ea,Sa,ba,ja,Ua,Ta,Ka,Wa,Et,Zt;if((ke=(be=Object.values(P))==null?void 0:be[0])!=null&&ke.includes(".doc")){var W=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"}),De=D.headers["content-disposition"],ae=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=ae.exec(De),X=q==null?void 0:q[1],de=document.createElement("a"),xe=window.URL.createObjectURL(W);b.value=[{name:X,blobUrl:xe}],u.value=!0}else{let bt=(Ae=(ot=($e=(Ie=N.cloneDeep(($=Object.values(P))==null?void 0:$[0]))==null?void 0:Ie.split("["))==null?void 0:$e[((lt=(Me=N.cloneDeep((pe=Object.values(P))==null?void 0:pe[0]))==null?void 0:Me.split("["))==null?void 0:lt.length)-1])==null?void 0:ot.split("]"))==null?void 0:Ae[0],Vt=bt==null?void 0:bt.split(":"),kt=(me=N.cloneDeep((vt=Object.values(P))==null?void 0:vt[0]))==null?void 0:me.substring(0,N.cloneDeep((nt=Object.values(P))==null?void 0:nt[0]).lastIndexOf("["));if(kt!=null&&kt.includes("[")?kt=(et=N.cloneDeep(kt))==null?void 0:et.slice(0,((Ye=N.cloneDeep(kt))==null?void 0:Ye.length)-1):kt===""&&(kt=C.value),kt=kt.replaceAll("<","[").replaceAll(">","]"),kt!=null&&kt.includes("[")){let _t="";(je=Ve.contentTransArrayToAll(kt,"/"))==null||je.forEach((Dt,zt)=>{var Ot,Rt,Xt,oa,Ia,Ha,Ba,qa,_n,nn,pn;if(!(Dt!=null&&Dt.includes("[")))_t=_t===""?_t+Dt.replaceAll("/",""):_t+"/"+Dt.replaceAll("/","");else{let on="",ca="";(Ot=N.cloneDeep(Dt))!=null&&Ot.includes("]")?(on=N.cloneDeep(Dt).slice(1,((Rt=N.cloneDeep(Dt))==null?void 0:Rt.length)-1),ca=(Ba=(Ha=(Ia=(oa=(Xt=N.cloneDeep(on))==null?void 0:Xt.split("["))==null?void 0:oa[1])==null?void 0:Ia.split("]"))==null?void 0:Ha[0])==null?void 0:Ba.split(":")):(on=N.cloneDeep(Dt).slice(1,(qa=N.cloneDeep(Dt))==null?void 0:qa.length),ca=(_n=N.cloneDeep(on))==null?void 0:_n.split("/"));let Ga="",rn=(nn=v==null?void 0:v.find(ra=>(ra==null?void 0:ra.name)===(ca==null?void 0:ca[0])))==null?void 0:nn.compData;rn==null||rn.forEach(ra=>{var En;(ra==null?void 0:ra.key)==="formContent"&&((En=ra==null?void 0:ra.contents)==null||En.forEach(Na=>{(Na==null?void 0:Na.key)===(ca==null?void 0:ca[1])&&(Ga=Na==null?void 0:Na.value)}))}),((pn=Ve.contentTransArrayToAll(kt,"/"))==null?void 0:pn.length)-1!==zt?_t=_t===""?_t+Ga.replaceAll("/",""):_t+"/"+Ga.replaceAll("/",""):_t=_t+r.value+Ga.replaceAll("/","")}}),(Ee=C.value)!=null&&Ee.includes(_t)?kt=C.value:kt=_t}let qt=N.cloneDeep((ft=Object.keys(P))==null?void 0:ft[0]);if(((ue=D==null?void 0:D.data)==null?void 0:ue.statusCode)===200||((Ne=D==null?void 0:D.data)==null?void 0:Ne.code)===200){if(((Je=(Be=D==null?void 0:D.data)==null?void 0:Be.data)!=null&&Je[qt]||(ge=(_=D==null?void 0:D.data)==null?void 0:_.result)!=null&&ge[qt])&&(Vt==null?void 0:Vt.length)===1)return await ce(((ye=(He=D==null?void 0:D.data)==null?void 0:He.data)==null?void 0:ye[qt])||((ut=(pt=D==null?void 0:D.data)==null?void 0:pt.result)==null?void 0:ut[qt]),N.cloneDeep(kt),Vt,E);if((ht=(wt=D==null?void 0:D.data)==null?void 0:wt.data)!=null&&ht[qt]||(gt=(dt=D==null?void 0:D.data)==null?void 0:dt.result)!=null&&gt[qt]){let _t=await Ke(((It=(Ct=D==null?void 0:D.data)==null?void 0:Ct.data)==null?void 0:It[qt])||((yt=(Wt=D==null?void 0:D.data)==null?void 0:Wt.result)==null?void 0:yt[qt]),N.cloneDeep(kt),Vt);return _t&&(S=[...S,..._t]),_t}else{if(!((Mt=D==null?void 0:D.data)!=null&&Mt.data)){let _t=await Ve.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);_t=_t==null?void 0:_t.map(zt=>{var Ot;return(zt==null?void 0:zt.name)===(Vt==null?void 0:Vt[0])&&(zt.compData=(Ot=zt.compData)==null?void 0:Ot.map(Rt=>{var Xt;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(Xt=Rt.contents)==null?void 0:Xt.map(oa=>{var Ia,Ha;return(oa==null?void 0:oa.key)===(Vt==null?void 0:Vt[1])&&(oa.value=(Ha=(Ia=D==null?void 0:D.data)==null?void 0:Ia.result)==null?void 0:Ha[qt==null?void 0:qt.replaceAll(":","")]),oa})),Rt})),zt});let Dt=[];($t=_t==null?void 0:_t.filter(zt=>(zt==null?void 0:zt.comp)==="Form"))==null||$t.forEach(async zt=>{let Ot={};for(let Rt in zt)Rt!=="id"&&(Ot[Rt]=zt[Rt]);Dt.push({id:zt==null?void 0:zt.id,value:{pageData:Ot}})}),(Dt==null?void 0:Dt.length)>0&&await te.batchUpdateInsofDataApi({dataList:Dt});return}if((Vt==null?void 0:Vt.length)===1){const _t=(Qt=(Gt=(Ht=D==null?void 0:D.data)==null?void 0:Ht.data)==null?void 0:Gt.path)==null?void 0:Qt.path;let Dt="";(Ma=(ga=(Va=(Da=(Ft=_t==null?void 0:_t.split("("))==null?void 0:Ft[1])==null?void 0:Da.split(")"))==null?void 0:Va[0])==null?void 0:ga.split(":"))==null||Ma.forEach(Rt=>{var Xt,oa;Dt=Dt===""?Dt+((Xt=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:Xt.trim()):Dt+"/"+((oa=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:oa.trim())});let zt=[(La=(Fa=(Ra=(za=(ma=_t==null?void 0:_t.split("<"))==null?void 0:ma[1])==null?void 0:za.split(">"))==null?void 0:Ra[0])==null?void 0:Fa.replaceAll("'",""))==null?void 0:La.trim()],Ot;return(pa=(_a=(Pa=D==null?void 0:D.data)==null?void 0:Pa.data)==null?void 0:_a.data)!=null&&pa[Vt==null?void 0:Vt[0]]?Ot=await ce((fa=(ya=(sa=D==null?void 0:D.data)==null?void 0:sa.data)==null?void 0:ya.data)==null?void 0:fa[Vt==null?void 0:Vt[0]],Dt,Vt,E):Ot=await We((ua=(na=D==null?void 0:D.data)==null?void 0:na.data)==null?void 0:ua.data,Dt,zt,Ge),Ot}else{const _t=(Sa=(Ea=($a=D==null?void 0:D.data)==null?void 0:$a.data)==null?void 0:Ea.path)==null?void 0:Sa.path;let Dt="";return(Ka=(Ta=(Ua=(ja=(ba=_t==null?void 0:_t.split("("))==null?void 0:ba[1])==null?void 0:ja.split(")"))==null?void 0:Ua[0])==null?void 0:Ta.split(":"))==null||Ka.forEach(Ot=>{var Rt,Xt;Dt=Dt===""?Dt+((Rt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Rt.trim()):Dt+"/"+((Xt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Xt.trim())}),await Ke((Zt=(Et=(Wa=D==null?void 0:D.data)==null?void 0:Wa.data)==null?void 0:Et.data)==null?void 0:Zt[Vt==null?void 0:Vt[0]],Dt,Vt)}}}}});if(await Promise.all(J),(S==null?void 0:S.length)>0){let P=[];S==null||S.forEach(ae=>{P!=null&&P.find(q=>{var X,de,xe,be;return((de=(X=q==null?void 0:q.value)==null?void 0:X.pageData)==null?void 0:de.name)===((be=(xe=ae==null?void 0:ae.value)==null?void 0:xe.pageData)==null?void 0:be.name)})||P.push(ae)});let W=[];P==null||P.forEach(ae=>{var de,xe,be,ke;let q=N.cloneDeep(ae);q.value.pageData.compData=(de=q.value.pageData.compData)==null?void 0:de.map($=>{var Ie;return($==null?void 0:$.key)==="formContent"&&($.contents=(Ie=$.contents)==null?void 0:Ie.map(pe=>{var lt,$e,ot,Ae;let Me=(lt=N.cloneDeep(S))==null?void 0:lt.find(vt=>(vt==null?void 0:vt.keyType)===(pe==null?void 0:pe.key));if(Me){let vt=(Ae=(ot=($e=Me.value.pageData.compData)==null?void 0:$e.find(nt=>(nt==null?void 0:nt.key)==="formContent"))==null?void 0:ot.contents)==null?void 0:Ae.find(nt=>(nt==null?void 0:nt.key)===(pe==null?void 0:pe.key));pe.value=vt==null?void 0:vt.value}return pe})),$}),W.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let X=[];(ke=(be=(xe=q==null?void 0:q.value)==null?void 0:xe.pageData)==null?void 0:be.compData)==null||ke.forEach($=>{var Ie;($==null?void 0:$.key)==="formContent"&&((Ie=$==null?void 0:$.contents)==null||Ie.forEach(pe=>{var Me,lt,$e,ot,Ae,vt;if((lt=(Me=pe==null?void 0:pe.optionUrl)==null?void 0:Me.menuSelect)!=null&&lt.find(nt=>nt==null?void 0:nt.includes("[")))if(X!=null&&X.find(nt=>{var me,Ye,et;return((me=nt==null?void 0:nt.key)==null?void 0:me.join(","))===((et=(Ye=pe==null?void 0:pe.optionUrl)==null?void 0:Ye.menuSelect)==null?void 0:et.join(","))})){let nt=($e=X==null?void 0:X.find(me=>{var Ye,et,je;return((Ye=me==null?void 0:me.key)==null?void 0:Ye.join(","))===((je=(et=pe==null?void 0:pe.optionUrl)==null?void 0:et.menuSelect)==null?void 0:je.join(","))}))==null?void 0:$e.value;nt.push({key:pe==null?void 0:pe.prop,groups:(ot=pe==null?void 0:pe.optionUrl)==null?void 0:ot.groupSelect,value:pe==null?void 0:pe.value}),X=X==null?void 0:X.map(me=>{var Ye,et,je;return((Ye=me==null?void 0:me.key)==null?void 0:Ye.join(","))===((je=(et=pe==null?void 0:pe.optionUrl)==null?void 0:et.menuSelect)==null?void 0:je.join(","))&&(me.value=nt),me})}else X.push({key:(Ae=pe==null?void 0:pe.optionUrl)==null?void 0:Ae.menuSelect,value:[{key:pe==null?void 0:pe.prop,groups:(vt=pe==null?void 0:pe.optionUrl)==null?void 0:vt.groupSelect,value:pe==null?void 0:pe.value}]})}))}),(X==null?void 0:X.length)>0&&(X=X==null?void 0:X.map($=>{var pe;let Ie="";return(pe=$==null?void 0:$.key)==null||pe.forEach(Me=>{var lt;if(!(Me!=null&&Me.includes("[")))Ie=Ie===""?Ie+Me:Ie+"/"+Me;else{let $e="",ot=(lt=Me==null?void 0:Me.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":");v==null||v.forEach(Ae=>{var vt;(Ae==null?void 0:Ae.name)===(ot==null?void 0:ot[0])&&((vt=Ae==null?void 0:Ae.compData)==null||vt.forEach(nt=>{var me;(nt==null?void 0:nt.key)==="formContent"&&((me=nt==null?void 0:nt.contents)==null||me.forEach(Ye=>{(Ye==null?void 0:Ye.prop)===(ot==null?void 0:ot[1])&&($e=Ye==null?void 0:Ye.value)}))}))}),Ie=Ie+r.value+$e}}),$.key=Ie,$})),X==null||X.forEach($=>{var lt,$e,ot;let Ie=(lt=Ge[$.key])==null?void 0:lt.find(Ae=>{var vt,nt,me,Ye,et,je,Ee;return((nt=(vt=Ae==null?void 0:Ae.value)==null?void 0:vt.pageData)==null?void 0:nt.name)===((et=(Ye=(me=$==null?void 0:$.value)==null?void 0:me[0])==null?void 0:Ye.groups)==null?void 0:et[0])&&((Ee=(je=Ae==null?void 0:Ae.value)==null?void 0:je.pageData)==null?void 0:Ee.name)!==void 0}),pe=Ie==null?void 0:Ie.id,Me=($e=Ie==null?void 0:Ie.value)==null?void 0:$e.pageData;Me.compData=(ot=Me.compData)==null?void 0:ot.map(Ae=>{var vt;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(vt=Ae.contents)==null?void 0:vt.map(nt=>{var Ye;let me=(Ye=$.value)==null?void 0:Ye.find(et=>(et==null?void 0:et.key)===(nt==null?void 0:nt.prop));return me&&(nt.value=me.value),nt})),Ae}),W.push({id:pe,value:{pageData:Me}})})});let De=(Te=N.cloneDeep(S))==null?void 0:Te[0];(W==null?void 0:W.length)>0&&await te.batchUpdateInsofDataApi({dataList:W})}w.setFreshContent(!0)}O.setImportLoading(!1)}catch{te.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}x.value=!0},he=["createInsofDataApi"],Xe=pr(async H=>{re(H)},100),at=async H=>{var ne,Se,T,Ze,Qe;const V=N.cloneDeep(H);let ie,ve=new WeakMap,Pe=await te.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ee.value});(Se=(ne=Pe.data.result)==null?void 0:ne.filter(Oe=>{var le,Q;return((le=Oe==null?void 0:Oe.key)==null?void 0:le.pageKey)!=="menu"&&((Q=Oe==null?void 0:Oe.key)==null?void 0:Q.pageKey)!=="secret"}))==null||Se.forEach(Oe=>{ve[Oe.key.pageKey]?ve[Oe.key.pageKey]=[...ve[Oe.key.pageKey],Oe]:ve[Oe.key.pageKey]=[Oe]}),H!=null&&H[0].path&&(ie=await(V==null?void 0:V.map(async(Oe,le)=>{var U,Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be;const se=(U=ve[Oe==null?void 0:Oe.path])==null?void 0:U.filter(ke=>{var $;return(($=ke==null?void 0:ke.key)==null?void 0:$.type)==="data"});let Te="";const Ge=await Ve.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve);se==null||se.forEach(ke=>{var $,Ie,pe,Me,lt;((Ie=($=ke==null?void 0:ke.value)==null?void 0:$.tableData)==null?void 0:Ie.算法名称)===((pe=V==null?void 0:V[le])==null?void 0:pe.method)&&(Te=(lt=(Me=ke==null?void 0:ke.value)==null?void 0:Me.tableData)==null?void 0:lt.算法体)});const ct=await Ve.getItemData(Oe==null?void 0:Oe.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve);let v="",E=(ze=(oe=(D=(Y=ct==null?void 0:ct[0])==null?void 0:Y.compData)==null?void 0:D.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:oe.contents)==null?void 0:ze.findIndex(ke=>(ke==null?void 0:ke.prop)==="算法体");return(J=(S=ct==null?void 0:ct[0])==null?void 0:S.compData)==null||J.forEach(ke=>{var $;(ke==null?void 0:ke.key)==="tableContents"&&(($=ke==null?void 0:ke.contents)==null||$.forEach(Ie=>{Ie!=null&&Ie.find(pe=>pe===(Oe==null?void 0:Oe.method))&&(v=Ie[E])}))}),{buttonName:((P=V==null?void 0:V[le])==null?void 0:P.method)||((ae=(De=(W=se==null?void 0:se[0])==null?void 0:W.value)==null?void 0:De.tableData)==null?void 0:ae.算法名称),api:(Te===""?(de=(X=(q=se==null?void 0:se[0])==null?void 0:q.value)==null?void 0:X.tableData)==null?void 0:de.算法体:Te)||v,content:Ge==null?void 0:Ge.filter(ke=>ke.comp!=="methodButton"),extraContent:(xe=N.cloneDeep(Oe.value))==null?void 0:xe.slice(1),methodName:(Oe==null?void 0:Oe.path)??"",extraValues:(be=V==null?void 0:V[le])==null?void 0:be.data}})));const Re=V==null?void 0:V.map(async Oe=>{var ct,v,E,U,Y,D;const le=(ct=Pe.data.result)==null?void 0:ct.filter(oe=>{var ze,S,J;return((ze=oe==null?void 0:oe.key)==null?void 0:ze.parentTable)===""&&((S=oe==null?void 0:oe.key)==null?void 0:S.type)==="method"&&((J=oe==null?void 0:oe.key)==null?void 0:J.methodName)===oe.method}),Q=le==null?void 0:le[0],se=(v=Pe.data.result)==null?void 0:v.filter(oe=>{var ze,S;return((ze=oe==null?void 0:oe.key)==null?void 0:ze.type)==="methodData"&&((S=oe==null?void 0:oe.key)==null?void 0:S.tableId)===(Q==null?void 0:Q.id)}),Te=await Ve.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve),Ge=se==null?void 0:se[0];return{buttonName:(E=Q==null?void 0:Q.key)==null?void 0:E.methodKey,api:(Y=(U=Ge==null?void 0:Ge.value)==null?void 0:U.tableData)==null?void 0:Y[0],content:Te==null?void 0:Te.filter(oe=>oe.comp!=="methodButton"),extraContent:(D=N.cloneDeep(Oe.value))==null?void 0:D.slice(1),methodName:(Oe==null?void 0:Oe.method)??""}}),tt=(T=H==null?void 0:H[0])!=null&&T.path&&((Ze=H==null?void 0:H[0])==null?void 0:Ze.path)!==""?await Promise.all(ie):await Promise.all(Re);l.value=tt==null?void 0:tt.filter(Oe=>Oe==null?void 0:Oe.extraContent),(Qe=l.value)==null||Qe.forEach(Oe=>{var le;Oe.api===""&&((le=Oe.content)==null||le.forEach(Q=>{var se;Q.comp=="Table"&&w.setExtraContents(Ve.methodTableToContent(Q.compData,(se=Oe.extraContent)==null?void 0:se[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!x.value&&await at(N.cloneDeep(d.itemData)),x.value=!1},{immediate:!0,deep:!0}),(H,V)=>{var ie,ve,Pe;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ie=l.value)==null?void 0:ie.filter(Re=>(Re==null?void 0:Re.buttonName)!=="保存"),Re=>{var tt;return e.openBlock(),e.createElementBlock("div",null,[Re.api!==""?(e.openBlock(),e.createBlock(e.unref(To._sfc_main),{key:0,disabled:e.unref(L)===e.unref(C)&&!((tt=Re==null?void 0:Re.buttonName)!=null&&tt.includes("预览")),class:"calculator-content",modelValue:Re.buttonName,onClickTrigger:ne=>e.unref(Xe)(Re),loading:k.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Ce)!==""&&((Pe=e.unref(C))==null?void 0:Pe[((ve=e.unref(C))==null?void 0:ve.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(To._sfc_main),{key:0,class:"calculator-content",onClickTrigger:fe,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Fe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},cc=Pt._export_sfc(sc,[["__scopeId","data-v-11fca7e0"]]),uc={};function dc(n,l){return" 567 "}const pc=Pt._export_sfc(uc,[["render",dc]]),fc={class:"module content"},hc={class:"module data"},vc={class:"module layout"},gc={class:"form-content"},mc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),w=e.ref({}),k=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:k.value},{key:"signConfig",contents:w.value}]}),F=K=>{var L;w.value=N.cloneDeep(K),r("change",(L=O())==null?void 0:L.compData)},G=K=>{var L,ee;if((K==null?void 0:K.buttonName)==="确认"){const C=N.cloneDeep(K==null?void 0:K.content);switch(u.value){case"create":k.value.push({...C,index:((L=k.value)==null?void 0:L.length)+1});break}r("change",(ee=O())==null?void 0:ee.compData),d.visible=!1}else d.visible=!1},M=(K,L)=>{var ee,C;switch(K){case"create":(ee=f.value)==null||ee.forEach(R=>{R.value=""}),u.value="create",d.visible=!0;break;case"update":(C=f.value)==null||C.forEach(R=>{R.value=L[R==null?void 0:R.prop]}),u.value="update",d.visible=!0;break;case"delete":k.value.splice(L,1),u.value="delete";break}},Ce=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var L,ee;K&&(w.value=((L=K==null?void 0:K.find(C=>C.key==="signConfig"))==null?void 0:L.contents)??{},k.value=((ee=K==null?void 0:K.find(C=>C.key==="signTypeList"))==null?void 0:ee.contents)??[])},{immediate:!0}),(K,L)=>{const ee=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",fc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=R=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",hc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.label),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:I=>M("update",{...R,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:I=>M("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",vc,[e.createVNode(Bt.ssForm,{rowContents:h.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:Ce,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",gc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),yc=Pt._export_sfc(mc,[["__scopeId","data-v-487e0536"]]),bc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:l}){const s=n,r=l,d=e.ref(1),u=e.computed(()=>{var O,F;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(F=s==null?void 0:s.stepConfig)==null?void 0:F.active}),b=(O,F)=>{d.value=F,r("clickStep",O,F)},h=O=>Bt.getComponent(O),f=()=>{var F;const O=(F=s==null?void 0:s.stepList)==null?void 0:F.find((G,M)=>M+1===u.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},w=O=>{r("clickTrigger",O)},k=O=>{r("changeTrigger",O)};return(O,F)=>{var Ce,K,L,ee,C;const G=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(Ce=n.stepConfig)==null?void 0:Ce.direction,active:u.value,"finish-status":"success",simple:(K=n.stepConfig)==null?void 0:K.simple,"align-center":((L=n.stepConfig)==null?void 0:L.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(R,y)=>(e.openBlock(),e.createBlock(G,{key:y,class:"step-item",onClick:I=>b(R,y+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:R==null?void 0:R.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:R==null?void 0:R.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ee=n.stepConfig)!=null&&ee.allowTrigger&&((C=n.stepConfig)!=null&&C.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(R,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(R==null?void 0:R.type)),{modelValue:R.value,"onUpdate:modelValue":I=>R.value=I,onClickTrigger:w,onChangeTrigger:k,content:R==null?void 0:R.content},e.createSlots({_:2},[e.renderList(O.$slots,(I,x)=>({name:x,fn:e.withCtx(fe=>[e.renderSlot(O.$slots,x,e.mergeProps({ref_for:!0},fe||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),kc=Pt._export_sfc(bc,[["__scopeId","data-v-d7c99969"]]),xc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:l}){const s=n,r=l,d=e.ref({}),u=e.ref([]),b=(h,f)=>{r("clickStep",h,f)};return e.watch(()=>s==null?void 0:s.itemData,h=>{var f,w;u.value=(f=h==null?void 0:h.find(k=>(k==null?void 0:k.key)==="stepList"))==null?void 0:f.contents,d.value=(w=h==null?void 0:h.find(k=>(k==null?void 0:k.key)==="stepConfig"))==null?void 0:w.contents},{immediate:!0,deep:!0}),(h,f)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(kc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(w,{name:"import"})]),title:e.withCtx(({title:k})=>[e.createTextVNode(e.toDisplayString(k),1)]),description:e.withCtx(({description:k})=>[e.createTextVNode(e.toDisplayString(k),1)]),_:1},8,["stepConfig","stepList"])}}}),wc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(l,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Cc=Pt._export_sfc(wc,[["__scopeId","data-v-4172a886"]]),Dc={class:"line-content"},_c={class:"line-time"},Ec=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const l=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Cc,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:h})=>[e.createElementVNode("span",Dc,e.toDisplayString(b),1),e.createElementVNode("span",_c,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Sc=Pt._export_sfc(Ec,[["__scopeId","data-v-b4d9deed"]]),Tc={class:"tabs-content"},Ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const l=n,s=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=l==null?void 0:l.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Tc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Bc=Pt._export_sfc(Ic,[["__scopeId","data-v-40865f68"]]),Gn=te.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Nc={class:"type-select"},Ac=["onClick"],Oc={class:"list-icon"},Vc={__name:"modelSelect",setup(n){const l=Gn(te.pinia),{itemData:s}=te.storeToRefs(l),r=d=>{const u=N.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),l.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(el),(h,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:w=>r(h)},[e.createElementVNode("div",Oc,[e.createVNode(b,{name:h.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(h.name),1)],8,Ac)]))),128))])}}},Mc=Pt._export_sfc(Vc,[["__scopeId","data-v-91799bf8"]]),zc={class:"fill-content"},Rc={class:"operate-content"},Fc={class:"collapse-title-content"},Lc={class:"collapse-title-item"},Pc={key:1},$c=["onClick"],jc={class:"icon-content"},Uc={key:0,class:"edit-content"},Kc=["onClick"],Wc={class:"comp-child"},Hc={__name:"modelFill",setup(n){const l=Gn(te.pinia),{itemData:s,originalData:r}=te.storeToRefs(l),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),h=G=>{var Ce;let M=(Ce=N.cloneDeep(b.value))==null?void 0:Ce.map((K,L)=>(G===L&&(K.content=!0),K));b.value=M},f=G=>{var Ce;let M=(Ce=N.cloneDeep(b.value))==null?void 0:Ce.map((K,L)=>(G===L&&(K.content=!1),K));b.value=M,d.value=N.cloneDeep(s.value)},w=(G,M)=>{var ee;let Ce=(ee=N.cloneDeep(b.value))==null?void 0:ee.map((C,R)=>(G===R&&(C.content=!1),C));b.value=Ce;const K=N.cloneDeep(s.value),L=K==null?void 0:K.filter((C,R)=>(R===G&&(C.name=M),C));l.setOriginalData(L),l.setItemData(L)};e.watch(()=>s.value,()=>{var G,M,Ce;!s.value||((G=s.value)==null?void 0:G.length)===0?d.value=[]:d.value=(M=N.cloneDeep(s.value))==null?void 0:M.filter(K=>(K==null?void 0:K.comp)!=="methodButton"),u.value=d.value,b.value=(Ce=N.cloneDeep(u.value))==null?void 0:Ce.map((K,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const k=G=>an(G),O=(G,M,Ce)=>{var L,ee;if(!G)return;let K=N.cloneDeep(s.value);K=(L=K==null?void 0:K.map((C,R)=>(R===Ce&&(C.compData=G),C)))==null?void 0:L.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),b.value=(ee=N.cloneDeep(K))==null?void 0:ee.map((C,R)=>({id:R,content:!1})),l.setOriginalData(K),l.setItemData(K)},F=G=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=N.cloneDeep(s.value),Ce=M==null?void 0:M.filter((K,L)=>L!==G);l.setOriginalData(Ce),l.setItemData(Ce),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(G,M)=>{const Ce=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",zc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Rc,[e.createVNode(dr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:K,index:L})=>{var ee,C,R,y,I,x,fe,Fe,st,_e;return[e.createElementVNode("div",Fc,[e.createElementVNode("div",Lc,[(C=(ee=b.value)==null?void 0:ee.find(Ke=>Ke.id===L))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:K.name&&K.name!==""?"8px":"0px"})},e.toDisplayString(K.name),5)),(y=(R=b.value)==null?void 0:R.find(Ke=>Ke.id===L))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",Pc,[e.createVNode(Bt._sfc_main$2,{modelValue:K.name,"onUpdate:modelValue":Ke=>K.name=Ke,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(x=(I=b.value)==null?void 0:I.find(Ke=>Ke.id===L))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ke=>h(L),["stop"]),class:"icon-content"},[e.createVNode(Ce,{name:"Edit",style:{width:"16px",height:"16px"}})],8,$c))]),e.createElementVNode("div",jc,[(Fe=(fe=b.value)==null?void 0:fe.find(Ke=>Ke.id===L))!=null&&Fe.content?(e.openBlock(),e.createElementBlock("div",Uc,[e.createVNode(Ce,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ke=>f(L),["stop"])},null,8,["onClick"]),e.createVNode(Ce,{name:"Save",onClick:e.withModifiers(Ke=>w(L,K.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(_e=(st=b.value)==null?void 0:st.find(Ke=>Ke.id===L))!=null&&_e.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ke=>F(L),["stop"]),class:"icon-content"},[e.createVNode(Ce,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Kc))])])]}),content:e.withCtx(({item:K,index:L})=>{var ee,C;return[e.createElementVNode("div",Wc,[e.createTextVNode(e.toDisplayString(k(K.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k(K.comp+"Operate")),{itemContents:K==null?void 0:K.compData,originalItemContents:(C=(ee=u.value)==null?void 0:ee.find((R,y)=>y===L))==null?void 0:C.compData,onChange:R=>O(R,K,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},qc=Pt._export_sfc(Hc,[["__scopeId","data-v-a46a44b9"]]),Gc={key:0,class:"show-content"},Xc={style:{display:"flex"}},Yc={__name:"modelShow",setup(n){const l=Gn(te.pinia),{itemData:s}=te.storeToRefs(l),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=N.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>an(u);return(u,b)=>{var h;return((h=r.value)==null?void 0:h.length)>0?(e.openBlock(),e.createElementBlock("div",Gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:w},[e.createElementVNode("div",Xc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:w},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Jc=Pt._export_sfc(Yc,[["__scopeId","data-v-3f3e863e"]]),Zc={class:"tabs-header"},Qc={class:"tabs-list"},eu={class:"tab-name"},tu={class:"tab-actions"},au=["onClick"],nu=["onClick"],ou=["onClick"],ru={class:"model-operate"},lu={class:"model-select",style:{display:"unset"}},iu={class:"existing-components"},su={class:"component-list"},cu=["onClick"],uu={class:"component-info"},du={class:"component-type"},pu={class:"component-name"},fu={class:"model-fill"},hu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.ref([]),u=e.ref(!1),b=e.ref(""),h=e.ref({title:""}),f=e.ref(-1),w=e.ref(!1),k=e.ref(-1),O=e.ref(new WeakMap),F=e.ref(null),G=Gn(te.pinia),{itemData:M}=te.storeToRefs(G),Ce=()=>{b.value="新增标签页",h.value.title="",f.value=-1,u.value=!0},K=H=>{b.value="修改标签页",h.value.title=d.value[H].title,f.value=H,u.value=!0},L=H=>{const V=R(H);O.value.delete(V),d.value.splice(H,1),at()},ee=()=>{if(h.value.title.trim()){if(f.value===-1){const H={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:C()};d.value.push(H)}else d.value[f.value].title=h.value.title,d.value[f.value].value=h.value.title,d.value[f.value].label=h.value.title;u.value=!1,at()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,R=H=>{const V=d.value[H];return V.id||(V.id=C()),V.id},y=H=>{var ve;k.value=H;const V=R(H);F.value=N.cloneDeep(M.value);let ie=O.value.get(V);!ie&&((ve=d.value[H].children)==null?void 0:ve.length)>0&&(ie=Fe(d.value[H].children)),ie?G.setItemData(N.cloneDeep(ie)):G.setItemData([]),w.value=!0},I=e.computed(()=>{const H=N.useModelComp(te.pinia),V=te.storeToRefs(H).itemData.value;return console.log("可用组件数据",V),!V||!Array.isArray(V)?[]:V.filter(ie=>{var ve;if(ie.comp==="Tabs"&&k.value>=0){const Pe=R(k.value);if((ve=ie.compData)==null?void 0:ve.some(tt=>{var ne;return tt.key==="stepList"&&((ne=tt.contents)==null?void 0:ne.some(Se=>Se.id===Pe))}))return!1}return!0})}),x=H=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[H]||H,fe=H=>{var V;try{const ie=N.cloneDeep(H);ie.id=Date.now()+Math.random(),ie.comp==="Tabs"&&((V=ie.compData)==null||V.forEach(Pe=>{Pe.key==="stepList"&&Pe.contents&&Pe.contents.forEach(Re=>{Re.id=C()})}));const ve=N.cloneDeep(M.value);ve.push(ie),G.setItemData(ve)}catch(ie){console.error("添加组件失败:",ie)}},Fe=H=>H.map(V=>{var ie;switch(V.type){case"form":return{comp:"Form",name:V.value||"表单",compData:st(V.content)};case"table":return{comp:"Table",name:V.value||"表格",compData:_e(V.content)};default:return{comp:"Unknown",name:V.value||"",compData:((ie=V.content)==null?void 0:ie.originalData)||[]}}}),st=H=>{if(!H)return[];const V=[];return H.rowContents&&V.push({key:"formContent",contents:H.rowContents}),H.buttonValue&&V.push({key:"formButton",contents:H.buttonValue}),typeof H.isEnableWrap<"u"&&V.push({key:"enableWrap",contents:H.isEnableWrap}),V},_e=H=>[],Ke=()=>{if(k.value>=0&&k.value<d.value.length){const H=R(k.value);O.value.set(H,N.cloneDeep(M.value)),d.value[k.value].children=ce(M.value),console.log("保存后的数据",ce(M.value))}w.value=!1,k.value=-1,F.value=null,at()},We=()=>{F.value&&G.setItemData(N.cloneDeep(F.value)),w.value=!1,k.value=-1,F.value=null},z=()=>{w.value&&We()},ce=H=>{if(!Array.isArray(H))throw new Error("sourceData must be an array");return H.map((V,ie)=>{if(!V||typeof V!="object")return V;const{comp:ve,name:Pe,compData:Re}=V;switch(ve){case"Form":return{type:"form",content:re(Re||[]),value:"表单"};case"Table":return{type:"table",content:he(Re||[]),value:"表格"};default:return{type:"xxx",content:Xe(Re||[]),value:""}}})},re=H=>{const V={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ie={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return H.forEach((ve,Pe)=>{if(!ve||typeof ve!="object"){console.warn(`Invalid config at index ${Pe}:`,ve);return}const{key:Re,contents:tt}=ve,ne=ie[Re];if(!ne){console.warn(`Unknown Form config key: ${Re}`);return}Re==="enableWrap"?V[ne]=!!tt:V[ne]=Array.isArray(tt)?tt:[]}),V},he=H=>{const V={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ie={header:"columns",tableContents:"tableData"};return H.forEach((ve,Pe)=>{if(!ve||typeof ve!="object"){console.warn(`Invalid config at index ${Pe}:`,ve);return}const{key:Re,contents:tt}=ve,ne=ie[Re];if(!ne){console.warn(`Unknown Table config key: ${Re}`);return}V[ne]=Array.isArray(tt)?tt:[]}),V},Xe=H=>(console.log("Default conversion logic - to be implemented"),{originalData:H,processed:!1,componentType:"unknown"}),at=()=>{const H=[{key:"stepList",contents:d.value}];r("change",H)};return e.watch(()=>s.itemContents,H=>{if(H&&H.length>0){const V=H.find(ie=>ie.key==="stepList");V&&V.contents&&(d.value=V.contents.map(ie=>({title:ie.title||"",value:ie.value||ie.title||"",label:ie.label||ie.title||"",children:ie.children||[],id:ie.id||C()})))}},{immediate:!0,deep:!0}),(H,V)=>{const ie=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-input"),Pe=e.resolveComponent("el-form-item"),Re=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Zc,[V[6]||(V[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ce},[e.createVNode(ie,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),V[5]||(V[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(tt,ne)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ne},[e.createElementVNode("span",eu,e.toDisplayString(tt.title),1),e.createElementVNode("div",tu,[e.createElementVNode("button",{onClick:Se=>K(ne)},"修改标题",8,au),e.createElementVNode("button",{onClick:Se=>y(ne)},"布局调整",8,nu),e.createElementVNode("button",{onClick:Se=>L(ne)},"删除",8,ou)])]))),128))]),e.createVNode(Jt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":V[2]||(V[2]=tt=>u.value=tt),title:b.value,onBeforeDestroy:V[3]||(V[3]=tt=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:V[1]||(V[1]=tt=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ee},"确定")]),default:e.withCtx(()=>[e.createVNode(Re,{model:h.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Pe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ve,{modelValue:h.value.title,"onUpdate:modelValue":V[0]||(V[0]=tt=>h.value.title=tt),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Jt.ssDialog,{modelValue:w.value,"onUpdate:modelValue":V[4]||(V[4]=tt=>w.value=tt),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:We},"取消"),e.createElementVNode("button",{onClick:Ke},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",ru,[e.createElementVNode("div",lu,[e.createVNode(Mc),e.createElementVNode("div",iu,[V[8]||(V[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,tt=>(e.openBlock(),e.createElementBlock("div",{key:tt.id,class:"component-item",onClick:ne=>fe(tt)},[e.createElementVNode("div",uu,[e.createElementVNode("span",du,e.toDisplayString(x(tt.comp)),1),e.createElementVNode("span",pu,e.toDisplayString(tt.name),1)]),V[7]||(V[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,cu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:H.innerWidth},[e.createVNode(Jc)])),e.createElementVNode("div",fu,[e.createVNode(qc)])])]),_:1},8,["modelValue"])])}}},vu=Pt._export_sfc(hu,[["__scopeId","data-v-9096ed0d"]]);function gu(){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 mu(n){return{type:"line",...n}}function yu(){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 bu(n){return{type:"bar",barWidth:"60%",...n}}function ku(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function xu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Ca={line:{initBaseoptions:gu,initSeries:mu},bar:{initBaseoptions:yu,initSeries:bu},pie:{initBaseoptions:ku,initSeries:xu}},Vo=N.useMenuState(te.pinia),xr=(n,l)=>{var k;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=l||{},h=n==null?void 0:n.find(O=>{const{name:F}=O;return F===d});if(!h)return{names:s,values:r};const f=(k=h==null?void 0:h.compData)==null?void 0:k.find(O=>{const{key:F}=O;return F==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const F=O==null?void 0:O[0];let G=!1;te.isObject(F)&&(F!=null&&F.id)&&(G=!0);let M=u,Ce=b;G&&(M=M+1,Ce=Ce+1);const K=O==null?void 0:O[M],L=O==null?void 0:O[Ce];s.push(K),r.push(L)}),{names:s,values:r}},wu=async n=>{const{menu:l,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let h=null;const f=sessionStorage.getItem("systemKey");if(b&&Vo.activeMenuPath&&(h=await Ve.getItemData(`${Vo.activeMenuPath}`,f,"")),!b){const w=l==null?void 0:l.join("/");h=await Ve.getItemData(`${w}^${s}`,f,"")}return xr(h,{group:r,nameCol:d,valueCol:u})},Cu=async n=>{const{menu:l,group:s,nameCol:r,valueCol:d}=n||{},u=l==null?void 0:l.join("/"),b=sessionStorage.getItem("systemKey"),h=await Ve.getItemData(u,b,"");return xr(h,{group:s,nameCol:r,valueCol:d})},po=async(n,l)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:h,group:f,nameCol:w,valueCol:k,isSelfDetail:O}=l||{};return h&&f&&Bt.isNumber(w)&&Bt.isNumber(k)?await wu({menu:r,mainKey:h,detailGroup:f,detailNameCol:w,detailValueCol:k,isSelfDetail:O}):Bt.isNumber(u)&&Bt.isNumber(b)?await Cu({menu:r,group:d,nameCol:u,valueCol:b}):s},Du=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Ca==null?void 0:Ca[r];if(!u)return;const{initBaseoptions:b,initSeries:h}=u,f=b();f.title.text=d??"";const{names:w,values:k}=await po(l,s);if(!w||!k)return f;f.xAxis.data=w;const O=h({data:k});return f.series.push(O),f},_u=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Ca==null?void 0:Ca[r];if(!u)return;const{initBaseoptions:b,initSeries:h}=u,f=b();f.title.text=d??"";const{names:w,values:k}=await po(l,s);if(!w||!k)return f;f.xAxis.data=w;const O=h({data:k});return f.series.push(O),f},Eu=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Ca==null?void 0:Ca[r];if(!u)return;const{initBaseoptions:b,initSeries:h}=u,f=b();f.title.text=d??"";const{names:w,values:k}=await po(l,s);if(!w||!k)return f;const O=[];for(let G=0;G<w.length;G++){const M=w[G],Ce=k[G];O.push({name:M,value:Ce})}const F=h({data:O});return f.series.push(F),f},Su=async(n=[])=>{var b,h,f;const l=((b=n==null?void 0:n.find(w=>w.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((h=n==null?void 0:n.find(w=>w.key==="chartDataConfig"))==null?void 0:h.contents)??{},r=((f=n==null?void 0:n.find(w=>w.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=l;let u={};return d==="line"&&(u=await Du({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await _u({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Eu({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),u},Tu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const l=n,s=e.ref({});e.onMounted(async()=>{const d=l==null?void 0:l.itemData;s.value=await Su(d)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Ol.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Iu=Pt._export_sfc(Tu,[["__scopeId","data-v-d4c081e8"]]),Bu={class:"chart-module layout"},Nu={class:"chart-module content"},Au={class:"chart-module content"},Ou={class:"form-content"},Vu={class:"dialog-footer"},Mu={class:"form-content"},zu={class:"dialog-footer"},Ru={class:"form-content"},Fu={class:"dialog-footer"},Lu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=e.ref({}),f=()=>{var le;u.value=b(),(le=u.value)==null||le.forEach(Q=>{var Te;const se=Q==null?void 0:Q.prop;Q.value=(Te=h==null?void 0:h.value)==null?void 0:Te[se]}),d.visible=!0},w=le=>{h.value=le},k=()=>{var le;d.visible=!1,r("change",(le=Qe())==null?void 0:le.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),G=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],M=e.ref({}),Ce=()=>{const le=F.value,Q=N.cloneDeep(le);return Q==null||Q.forEach(se=>{var Ge;const Te=se==null?void 0:se.prop;se.value=(Ge=M.value)==null?void 0:Ge[Te]}),Q},K=le=>{var se;M.value=le;const Q=Ce();F.value=Q,r("change",(se=Qe())==null?void 0:se.compData)},L=async()=>{const le=await Ve.getMenusContent(),Q=Ce();Q==null||Q.forEach(se=>{(se==null?void 0:se.prop)==="menu"&&(se.contents=le)}),F.value=Q,O.visible=!0,await tt(M.value.menu),await T(M.value.group)},ee=e.reactive({visible:!1,width:"840",title:"详情页配置"}),C=e.ref([]),R=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),I=()=>{const le=C.value,Q=N.cloneDeep(le);return Q==null||Q.forEach(se=>{var Ge;const Te=se==null?void 0:se.prop;se.value=(Ge=y.value)==null?void 0:Ge[Te]}),Q},x=le=>{var se;y.value=le;const Q=I();C.value=Q,r("change",(se=Qe())==null?void 0:se.compData)},fe=async()=>{await z();const le=N.cloneDeep(Fe.value),Q=I();Q==null||Q.forEach(se=>{var Ge;const Te=se==null?void 0:se.prop;se.value=(Ge=y==null?void 0:y.value)==null?void 0:Ge[Te],Te==="mainKey"&&(se.contents=le)}),C.value=Q,ee.visible=!0},Fe=e.ref([]),st=e.ref([]),_e=e.ref({}),Ke=e.ref({}),We=()=>{const{compData:le}=ve.value||{},Q=le==null?void 0:le.find(U=>{const{key:Y}=U;return Y==="header"}),se=(Q==null?void 0:Q.contents)||[],Te=se==null?void 0:se.filter((U,Y)=>{const{label:D}=U;return D!=="操作"}),Ge=Te==null?void 0:Te.findIndex((U,Y)=>{const{isMainKey:D}=U;return D});if(Ge<0)return[];const ct=le==null?void 0:le.find(U=>{const{key:Y}=U;return Y==="tableContents"}),v=(ct==null?void 0:ct.contents)||[];return v==null?void 0:v.map(U=>{const Y=U==null?void 0:U[0];let D=Ge;te.isObject(Y)&&(Y!=null&&Y.id)&&(D=D+1);const oe=U==null?void 0:U[D];return{label:oe,value:oe}})},z=async()=>{const le=await We();Fe.value=le},ce=async le=>{const Q=sessionStorage.getItem("systemKey");return await Ve.getItemData(le,Q,"")},re=async le=>{const Q=le;st.value=Q==null?void 0:Q.map(se=>{const{name:Te}=se;return _e.value[Te]=se,{label:Te,value:Te}})},he=le=>{const{comp:Q,compData:se}=Ke.value||{};if(Q==="Table"){let Te=I();Te=Te.filter(Ge=>{const{prop:ct}=Ge;return ct!=="formItems"}),ne(Te,se),C.value=Te}},Xe=async()=>{var se,Te;const le=(se=y==null?void 0:y.value)==null?void 0:se.mainKey,Q=(Te=M==null?void 0:M.value)==null?void 0:Te.menu;if(le){const ct=`${Q==null?void 0:Q.join("/")}^${le}`,v=await ce(ct);await re(v);const E=I();E==null||E.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=st.value)}),C.value=E}};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.mainKey},async(le,Q)=>{le!=Q&&le&&await Xe()});const at=async le=>{const Q=_e.value[le];Ke.value=Q,await he()};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&le&&at(le)});const H=async()=>{var Q;await Xe();const le=(Q=y.value)==null?void 0:Q.group;await at(le)},V=e.ref([]),ie=e.ref({}),ve=e.ref({}),Pe=async le=>{const Q=le==null?void 0:le.join("/"),se=sessionStorage.getItem("systemKey");return await Ve.getItemData(Q,se,"")},Re=async le=>{const Q=await Pe(le);V.value=Q==null?void 0:Q.map(se=>{const{name:Te}=se;return ie.value[Te]=se,{label:Te,value:Te}})},tt=async(le,Q)=>{await Re(le);const se=Ce();se==null||se.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=V.value)}),F.value=se};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.menu},async(le,Q)=>{const se=le==null?void 0:le.join("/"),Te=Q==null?void 0:Q.join("/");se!=Te&&await tt(le)});const ne=(le,Q)=>{const se=Q==null?void 0:Q.find(v=>{const{key:E}=v;return E==="header"}),Te=(se==null?void 0:se.contents)||[],Ge=Te==null?void 0:Te.filter((v,E)=>{const{label:U}=v;return U!=="操作"}),ct=Ge==null?void 0:Ge.map((v,E)=>{const{label:U}=v;return{label:U,value:E}});le==null||le.forEach(v=>{const E=v==null?void 0:v.prop;(E==="nameCol"||E==="valueCol")&&(v.contents=ct)})},Se=le=>{const{comp:Q,compData:se}=ve.value||{};if(Q==="Table"){M.value.formItems=[];let Te=Ce();Te=Te.filter(Ge=>{const{prop:ct}=Ge;return ct!=="formItems"}),ne(Te,se),F.value=Te}},T=async le=>{const Q=ie.value[le];ve.value=Q,await Se()};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&T(le)});const Ze=async()=>{var se,Te;const le=(se=M.value)==null?void 0:se.menu;await tt(le);const Q=(Te=M.value)==null?void 0:Te.group;await T(Q)},Qe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),Oe=()=>{d.visible=!1,O.visible=!1,ee.visible=!1};return e.onMounted(async()=>{var Q,se,Te;F.value=G(),C.value=R();const le=s==null?void 0:s.itemContents;h.value=((Q=le==null?void 0:le.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:Q.contents)??{},M.value=((se=le==null?void 0:le.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:se.contents)??{},await Ze(),y.value=((Te=le==null?void 0:le.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await H()}),(le,Q)=>{const se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bu,[Q[4]||(Q[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[0]||(Q[0]=Te=>f())},{default:e.withCtx(()=>Q[3]||(Q[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Nu,[Q[6]||(Q[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[1]||(Q[1]=Te=>L())},{default:e.withCtx(()=>Q[5]||(Q[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Au,[Q[8]||(Q[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[2]||(Q[2]=Te=>fe())},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Jt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:Oe,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Vu,[e.createVNode(se,{class:"cancel-button button",onClick:Oe,id:"themeBorderButton"},{default:e.withCtx(()=>Q[9]||(Q[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(se,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>Q[10]||(Q[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:Oe,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Mu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:K},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(se,{class:"cancel-button button",onClick:Oe,id:"themeBorderButton"},{default:e.withCtx(()=>Q[11]||(Q[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(se,{class:"ok-button button",onClick:Oe,id:"themeButton"},{default:e.withCtx(()=>Q[12]||(Q[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:ee.visible,title:ee.title,onBeforeDestroy:Oe,width:ee.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ru,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fu,[e.createVNode(se,{class:"cancel-button button",onClick:Oe,id:"themeBorderButton"},{default:e.withCtx(()=>Q[13]||(Q[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(se,{class:"ok-button button",onClick:Oe,id:"themeButton"},{default:e.withCtx(()=>Q[14]||(Q[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Pu=Pt._export_sfc(Lu,[["__scopeId","data-v-fe119645"]]),$u=(n,l)=>{let s;n.replaceAll(" ",`\r
2
+ `).replaceAll(`
3
+ `,`\r
4
+ `).includes(`\r
5
+ `)?s=n.replaceAll(`
6
+ `,`\r
7
+ `).replaceAll(" ",`\r
8
+ `).split(`\r
9
+ `).filter(u=>u.trim()!==""):s=n.replaceAll(" ",`\r
10
+ `).split(`
11
+ `).filter(u=>u.trim()!==""),s=s==null?void 0:s.map(u=>(u=u==null?void 0:u.replaceAll("\r",""),u));const r=[];let d="";for(const u of s)u.includes("{")||d.includes("{")||u.includes("[")||d.includes("[")||u.includes("【")||d.includes("【")||u.includes("(")||d.includes("(")||u.includes("(")||d.includes("(")||u.includes("/*")||d.includes("/*")?(d+=u.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&!(l!=null&&l.find(b=>b===d[d.length-1]))?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):d!=null&&d.includes("*/")&&(d=d.replace(/\/\*[\s\S]*?\*\//g,""))):l!=null&&l.find(b=>b===u[u.length-1])?d+=u.trim():r.push(u.trim().replace(/\/\*[\s\S]*?\*\//g,""));return r},wr=(n,l)=>{let s=n;const r=[];let d="",u=0;for(const b of s)u++,b.includes("{")||d.includes("{")||b.includes("[")||d.includes("[")||b.includes("【")||d.includes("【")||b.includes("(")||d.includes("(")||b.includes("(")||d.includes("(")||b.includes("/*")||d.includes("/*")?(d+=b.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&d[d.length-1]===l?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):u===(n==null?void 0:n.length)&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d="")):(d+=b.trim(),(d==null?void 0:d[(d==null?void 0:d.length)-1])===l&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""));return(d==null?void 0:d.length)!==0&&r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),r},ju=(n,l)=>n===l||n.length===l.length&&n.every((s,r)=>s===l[r]),Uu=n=>n.reduce((l,s)=>{var d;const r=(((d=l.at(-1))==null?void 0:d.total)??0)+s;return l.push({key:s,total:r}),l},[]),Ku=n=>{for(let l=n.length-1;l>0;l--){const s=Math.floor(Math.random()*(l+1));[n[l],n[s]]=[n[s],n[l]]}return n};let ha="$R";const Qn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1}],Wu=n=>{var s;return(n==null?void 0:n.filter.toUpperCase())==="ALL"||(n==null?void 0:n.filter.toUpperCase())==="NONE"?n==null?void 0:n.contents:(s=n==null?void 0:n.contents)==null?void 0:s.map(r=>{var d;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(d=r.contents)==null?void 0:d.slice(0,parseInt(n==null?void 0:n.filter))),r})},Hu=n=>{var l;return(n==null?void 0:n.filter)==="Random"?(l=n==null?void 0:n.contents)==null?void 0:l.map(r=>((r==null?void 0:r.key)==="tableContents"&&(r.contents=Ku(r.contents)),r)):n==null?void 0:n.contents},qu=n=>{var r,d,u,b,h;let l=(u=(d=(r=n==null?void 0:n.filter)==null?void 0:r.replace("*",""))==null?void 0:d.replaceAll("{",""))==null?void 0:u.replaceAll("}","");if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return n==null?void 0:n.contents;let s=Ve.calculatorAndToOr(l);if((s==null?void 0:s.length)>0){let f=[];return s==null||s.forEach(k=>{let O={};for(let F in k){let G=F;G!=null&&G.includes("[")||(O[G]=k[F])}f.push(O)}),(h=(b=N.cloneDeep(n))==null?void 0:b.contents)==null?void 0:h.map(k=>{var F,G,M,Ce;let O=(M=(G=(F=N.cloneDeep(n))==null?void 0:F.contents)==null?void 0:G.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:M.contents;if(O=(Ce=Ve.getEqualChild(O))==null?void 0:Ce.filter(K=>(K==null?void 0:K.label)!=="操作"),(k==null?void 0:k.key)==="tableContents"){let L=Ve.tableToForm(k==null?void 0:k.contents,O);f==null||f.forEach(ee=>{var C,R;for(let y in ee)!((C=L==null?void 0:L[0])!=null&&C.find(I=>{var x;return(I==null?void 0:I.key)===y||((x=I==null?void 0:I.key)==null?void 0:x.includes(y))}))&&!(L!=null&&L.find(I=>{var x;return(I==null?void 0:I.key)===y||((x=I==null?void 0:I.key)==null?void 0:x.includes(y))}))||(((R=ee[y])==null?void 0:R[0])!=="!"?L=L==null?void 0:L.filter(I=>{var x,fe;return((x=I==null?void 0:I.find(Fe=>{var st;return(Fe==null?void 0:Fe.key)===y||((st=Fe==null?void 0:Fe.key)==null?void 0:st.includes(y))}))==null?void 0:x.value)===ee[y]&&!Array.isArray(ee==null?void 0:ee[y])||Array.isArray(ee==null?void 0:ee[y])&&((fe=ee==null?void 0:ee[y])==null?void 0:fe.find(Fe=>{var st;return((st=I==null?void 0:I.find(_e=>{var Ke;return(_e==null?void 0:_e.key)===y||((Ke=_e==null?void 0:_e.key)==null?void 0:Ke.includes(y))}))==null?void 0:st.value)===Fe}))}):L=L==null?void 0:L.filter(I=>{var x;return((x=I==null?void 0:I.find(fe=>{var Fe;return(fe==null?void 0:fe.key)===y||((Fe=fe==null?void 0:fe.key)==null?void 0:Fe.includes(y))}))==null?void 0:x.value)!==ee[y]}))}),(L==null?void 0:L.length)===0?k.contents=[]:k.contents=L==null?void 0:L.map(ee=>{let C={};return ee==null||ee.forEach(R=>{C[R==null?void 0:R.key]=R==null?void 0:R.value}),C})}return k})}return n==null?void 0:n.contents},Gu=n=>n==null?void 0:n.contents,Xu=n=>n==null?void 0:n.contents,Yu=n=>n==null?void 0:n.contents,Ju=n=>n==null?void 0:n.contents,Zu=n=>n==null?void 0:n.contents,Qu=n=>n==null?void 0:n.contents,ed={onNumSlice:Wu,onRandomContents:Hu,onConditionContents:qu,onFatherPaceContents:Gu,onPaceContents:Xu,onMainTagContents:Yu,onButtonContents:Ju,onPamButtonContents:Zu,onRowButtonContents:Qu},td=async n=>{var d,u,b,h,f,w,k,O,F,G,M,Ce,K,L,ee,C,R,y,I;let l="";if(((d=n==null?void 0:n.find(x=>(x==null?void 0:x.key)==="filter"))==null?void 0:d.contents)!==""&&(l=(u=n==null?void 0:n.find(x=>(x==null?void 0:x.key)==="filter"))==null?void 0:u.contents),l==="")return n;(l==null?void 0:l[0])==="("?l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1):(l=(h=(b=l==null?void 0:l.replace("(",ha))==null?void 0:b.split(ha))==null?void 0:h[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1));let s=(f=wr(l,","))==null?void 0:f.map(x=>((x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),x!=null&&x.includes("(")||(x=x==null?void 0:x.replaceAll(":","=")),x)),r=n;for(let x in s){let fe,Fe="";(w=s==null?void 0:s[x])!=null&&w.includes("(")?(fe=(F=(O=(k=s==null?void 0:s[x])==null?void 0:k.replace("(",ha))==null?void 0:O.split(ha))==null?void 0:F[0],Fe="("+((Ce=(M=(G=s==null?void 0:s[x])==null?void 0:G.replace("(",ha))==null?void 0:M.split(ha))==null?void 0:Ce[1])):(fe=(ee=(L=(K=s==null?void 0:s[x])==null?void 0:K.replace("=",ha))==null?void 0:L.split(ha))==null?void 0:ee[0],Fe=(y=(R=(C=s==null?void 0:s[x])==null?void 0:C.replace("=",ha))==null?void 0:R.split(ha))==null?void 0:y[1]);let st=(I=Qn==null?void 0:Qn.find(_e=>(_e==null?void 0:_e.key)===fe))==null?void 0:I.value;if(st){const _e=ed[st];await new Function("return ")(),r=_e({contents:r,filter:Fe})}}return r},ad=N.useLoginState(te.pinia),{loginUserInfo:eo}=te.storeToRefs(ad),nd=async n=>{var u,b;let l=await cn.getPageDataApi({platId:parseInt((u=eo==null?void 0:eo.value)==null?void 0:u.plat_id),pageName:n}),s=(b=l==null?void 0:l.data)==null?void 0:b.result,r=[],d=s==null?void 0:s.map(async h=>{var O,F,G,M,Ce,K,L,ee,C,R,y,I,x,fe,Fe,st,_e,Ke,We,z,ce,re,he,Xe;let f=(M=(G=(F=(O=h==null?void 0:h.contents)==null?void 0:O.find(at=>{var H;return(H=at==null?void 0:at.key)==null?void 0:H.includes("struct")}))==null?void 0:F.value)==null?void 0:G[0])==null?void 0:M.类型,w=Object.values(h==null?void 0:h.name);w=w==null?void 0:w.reverse();let k={comp:f,isShow:!0,name:w==null?void 0:w[0],id:h==null?void 0:h.page_id};for(let at in w)parseInt(at)>=1&&(k[`name${parseInt(at)-1}`]=w[at]);if(f==="Table"){let at=(Ce=h==null?void 0:h.contents)==null?void 0:Ce.find(ie=>{var ve;return(ve=ie==null?void 0:ie.key)==null?void 0:ve.includes("content")}),H=[];H.push({key:"tableContents",contents:at==null?void 0:at.value});let V=(R=(C=(ee=(L=(K=h==null?void 0:h.contents)==null?void 0:K.find(ie=>{var ve;return(ve=ie==null?void 0:ie.key)==null?void 0:ve.includes("struct")}))==null?void 0:L.value)==null?void 0:ee[0])==null?void 0:C.结构)==null?void 0:R.contents;H.push({key:"header",contents:V}),H.push({key:"filter",contents:(Fe=(fe=(x=(I=(y=h==null?void 0:h.contents)==null?void 0:y.find(ie=>{var ve;return(ve=ie==null?void 0:ie.key)==null?void 0:ve.includes("struct")}))==null?void 0:I.value)==null?void 0:x[0])==null?void 0:fe.引用)==null?void 0:Fe.contents}),k.compData=await td(H)}else if(f==="Form"){let at=[],H=(Ke=(_e=(st=h==null?void 0:h.contents)==null?void 0:st.find(ie=>{var ve;return(ve=ie==null?void 0:ie.key)==null?void 0:ve.includes("content")}))==null?void 0:_e.value)==null?void 0:Ke[0],V=(Xe=(he=(re=(ce=(z=(We=h==null?void 0:h.contents)==null?void 0:We.find(ie=>{var ve;return(ve=ie==null?void 0:ie.key)==null?void 0:ve.includes("struct")}))==null?void 0:z.value)==null?void 0:ce[0])==null?void 0:re.结构)==null?void 0:he.contents)==null?void 0:Xe.map(ie=>(ie.value=H==null?void 0:H[ie==null?void 0:ie.prop],ie));at.push({key:"formContent",contents:V}),k.compData=at}return k});return r=await Promise.all(d),r};var zn={exports:{}},od=zn.exports,Mo;function rd(){return Mo||(Mo=1,function(n,l){(function(s,r){r()})(od,function(){function s(w,k){return typeof k>"u"?k={autoBom:!1}:typeof k!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),k={autoBom:!k}),k.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(w.type)?new Blob(["\uFEFF",w],{type:w.type}):w}function r(w,k,O){var F=new XMLHttpRequest;F.open("GET",w),F.responseType="blob",F.onload=function(){f(F.response,k,O)},F.onerror=function(){console.error("could not download file")},F.send()}function d(w){var k=new XMLHttpRequest;k.open("HEAD",w,!1);try{k.send()}catch{}return 200<=k.status&&299>=k.status}function u(w){try{w.dispatchEvent(new MouseEvent("click"))}catch{var k=document.createEvent("MouseEvents");k.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),w.dispatchEvent(k)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ve.commonjsGlobal=="object"&&Ve.commonjsGlobal.global===Ve.commonjsGlobal?Ve.commonjsGlobal:void 0,h=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(w,k,O){var F=b.URL||b.webkitURL,G=document.createElement("a");k=k||w.name||"download",G.download=k,G.rel="noopener",typeof w=="string"?(G.href=w,G.origin===location.origin?u(G):d(G.href)?r(w,k,O):u(G,G.target="_blank")):(G.href=F.createObjectURL(w),setTimeout(function(){F.revokeObjectURL(G.href)},4e4),setTimeout(function(){u(G)},0))}:"msSaveOrOpenBlob"in navigator?function(w,k,O){if(k=k||w.name||"download",typeof w!="string")navigator.msSaveOrOpenBlob(s(w,O),k);else if(d(w))r(w,k,O);else{var F=document.createElement("a");F.href=w,F.target="_blank",setTimeout(function(){u(F)})}}:function(w,k,O,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof w=="string")return r(w,k,O);var G=w.type==="application/octet-stream",M=/constructor/i.test(b.HTMLElement)||b.safari,Ce=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ce||G&&M||h)&&typeof FileReader<"u"){var K=new FileReader;K.onloadend=function(){var C=K.result;C=Ce?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=C:location=C,F=null},K.readAsDataURL(w)}else{var L=b.URL||b.webkitURL,ee=L.createObjectURL(w);F?F.location=ee:location.href=ee,F=null,setTimeout(function(){L.revokeObjectURL(ee)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(zn)),zn.exports}rd();const Pn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DmUZr5rN.cjs")).then(n=>n.index));Pn.install=n=>{n.component("ssMenu",Pn)};const Cr={__name:"index",props:{name:String},setup(n){const l=n,s=e.computed(()=>te.ElIcons[l.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Dr=(n,l,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(l==null?void 0:l[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(l==null?void 0:l[s]))&&(l==null?void 0:l.length)!==1){let u=N.cloneDeep(l),b=d==null?void 0:d.filter(k=>k!==(u==null?void 0:u[s])),h=s+1,f=Dr(b,u,h),w=[];w.push(d==null?void 0:d[0]),f==null||f.forEach(k=>{w.push(k)}),d=w}return d})),r},fo=(n,l,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(l==null?void 0:l[r]))&&(l==null?void 0:l.length)!==1){let b=N.cloneDeep(l),h=u==null?void 0:u.filter(O=>O!==(b==null?void 0:b[r])),f=r+1,w=fo(h,b,s,f),k=[];k.push(u==null?void 0:u[0]),w==null||w.forEach(O=>{k.push(O)}),u=k}return u})),d},ho=(n,l,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(h=>h===(l==null?void 0:l[d]))&&(l==null?void 0:l.length)!==1){let h=N.cloneDeep(l),f=b==null?void 0:b.filter(F=>F!==(h==null?void 0:h[d])),w=d+1,k=ho(f,h,s,r,w),O=[];O.push(b==null?void 0:b[0]),k==null||k.forEach(F=>{O.push(F)}),b=O}return b})),u};function _r(n="menu"){return{name:n,components:{SvgIcon:Vl.SvgIcon,ssMenu:Pn,DynamicIcon:Cr,ssDialog:Jt.ssDialog,ssInput:Bt._sfc_main$2},setup(l,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=N.useMenuState(),b=N.useModelComp(te.pinia),h=N.useLoginState(te.pinia),{loginUserInfo:f}=te.storeToRefs(h),w=e.ref(0),k=Ml.useRouter(),O=e.ref(),{asideMenus:F,menuTriggerType:G,platform:M}=te.storeToRefs(u),{fixMenuStatus:Ce}=te.storeToRefs(b),K=e.computed(()=>r==null?void 0:r.mode),L=ne=>ne==null?void 0:ne.map(T=>{var Ze,Qe;return!(T!=null&&T.children)||((Ze=T==null?void 0:T.children)==null?void 0:Ze.length)===0?T.config=d.value:T!=null&&T.children&&((Qe=T==null?void 0:T.children)==null?void 0:Qe.length)>0&&(T.children=L(T.children)),T}),ee=e.computed(()=>{let ne=[...F.value];if((ne==null?void 0:ne.length)===0)return k.push("/"),[];const Se=fe(ne,x.value);return Se.isFlag||(ne=Se==null?void 0:Se.data),ne=ne==null?void 0:ne.map(T=>{var Ze,Qe;return!(T!=null&&T.children)||((Ze=T==null?void 0:T.children)==null?void 0:Ze.length)===0?T.config=d.value:T!=null&&T.children&&((Qe=T==null?void 0:T.children)==null?void 0:Qe.length)>0&&(T.children=L(T.children)),T}),ne}),C=async(ne,Se)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ne==null?void 0:ne.path),u.setActiveAsideMenu(ne),ne.isRouter?k.push(ne.path):k.push("/"),s("node-click",ne,Se)},R=async ne=>{const Se=zl.findNodeByPropInTree(ee.value,"path",ne);u.setActiveAsideMenu(Se),b.setRouteToChildPath(""),Ce.value?b.setFixMenuStatus(!1):(Re.value&&(G.value="open"),G.value==="click"?w.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ne):Re.value||(u.setMenuTriggerType("click"),u.setActiveMenuPath(ne))),ne!=null&&ne.startsWith("/")?k.push(ne):k.push("/"),w.value++},y=ne=>{Re.value||u.setActiveMenuPath(ne)},I=ne=>{const Se=document.documentElement;ne==null||ne.forEach(T=>{Se.style.setProperty(T.name,T.value)})};e.onMounted(()=>{w.value=1});const x=e.computed(()=>{const ne=sessionStorage.getItem("authority");return ne?JSON.parse(ne):[]});e.watch(()=>M.value,ne=>{ne==="browser"?I(gn.browserVerticalMenuClasses):ne==="client"?(I(gn.clientHorizontalMenuClasses),I(gn.clientVerticalMenuClasses)):ne==="three"&&(I(gn.threeHorizontalMenuClasses),I(gn.threeVerticalMenuClasses))},{immediate:!0});const fe=(ne,Se)=>({isFlag:!0}),Fe=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),st=ne=>an(ne),_e=e.ref({}),Ke=e.ref([]),We=e.ref({}),z=e.ref({}),ce=ne=>{switch(ne){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},re=e.ref({}),he=ne=>{u.setCacheInputMenu({type:Fe.type,data:ne}),u.setIsRefreshMenus(!0)},Xe=async(ne,Se,T)=>{var Ze,Qe,Oe,le,Q,se,Te,Ge,ct,v,E,U,Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt,$e,ot,Ae,vt,nt,me,Ye,et,je;if(Se==="create"){let Ee=(T==null?void 0:T.title)+"(1)",ft=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ue=(Qe=(Ze=ft==null?void 0:ft.data)==null?void 0:Ze.result)==null?void 0:Qe[0],Ne=(Oe=ue==null?void 0:ue.value)==null?void 0:Oe.pageData;Ne.compData=(le=Ne.compData)==null?void 0:le.map(_=>{var ge;return(_==null?void 0:_.key)==="menuContents"&&(_.contents=fo(_.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"),Ee)),_}),await te.updateInsofDataApi({id:ue==null?void 0:ue.id,value:{pageData:Ne}});let Be=(se=(Q=T==null?void 0:T.path)==null?void 0:Q.split("/"))==null?void 0:se.filter((_,ge)=>{var He,ye;return ge!==((ye=(He=T==null?void 0:T.path)==null?void 0:He.split("/"))==null?void 0:ye.length)-1}),Je=await Ve.getItemData((ct=(Ge=(Te=T==null?void 0:T.path)==null?void 0:Te.split("/"))==null?void 0:Ge.filter((_,ge)=>{var He,ye;return ge!==((ye=(He=T==null?void 0:T.path)==null?void 0:He.split("/"))==null?void 0:ye.length)-1}))==null?void 0:ct.join("/"),sessionStorage.getItem("systemKey"),"");if(Be.push(Ee),Be=Be==null?void 0:Be.join("/"),(Je==null?void 0:Je.length)>0){let _=Je==null?void 0:Je[0],ge=(E=(v=_==null?void 0:_.compData)==null?void 0:v.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:E.contents;if(((U=ge==null?void 0:ge[0])==null?void 0:U.directiveLabel)==="#isMain"){let He=(Y=ge==null?void 0:ge[0])==null?void 0:Y.prop,ye=(oe=(D=_==null?void 0:_.compData)==null?void 0:D.find(ut=>(ut==null?void 0:ut.key)==="tableContents"))==null?void 0:oe.contents,pt;ye==null||ye.forEach(ut=>{var wt,ht;if(ut.length===1)((wt=ut==null?void 0:ut[0])==null?void 0:wt[He])===(T==null?void 0:T.title)&&(pt=ut==null?void 0:ut[0],pt[He]=Ee);else{let dt=(ht=ge==null?void 0:ge.filter(It=>It!=="操作"))==null?void 0:ht.map(It=>It==null?void 0:It.prop),gt=ut==null?void 0:ut.filter(It=>!(It!=null&&It.id)),Ct=Ve.getValueToObjectValue(gt,dt);Ct[He]=Ee,pt=Ct}}),await te.createInsofDataApi({key:{type:"data",pageKey:(J=(S=(ze=T==null?void 0:T.path)==null?void 0:ze.split("/"))==null?void 0:S.filter((ut,wt)=>{var ht,dt;return wt!==((dt=(ht=T==null?void 0:T.path)==null?void 0:ht.split("/"))==null?void 0:dt.length)-1}))==null?void 0:J.join("/"),tableId:_==null?void 0:_.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((W=f.value)==null?void 0:W.dept)||((De=f.value)==null?void 0:De.部门名称)},value:{tableData:pt}})}}await Ve.newLoadingConstruct(T==null?void 0:T.path,Be),u.setUpdateMenuStatus(!1),await cn.verifyStructureDataToStore(),u.setActiveMenuPath((X=(q=(ae=T==null?void 0:T.path)==null?void 0:ae.split("/"))==null?void 0:q.filter((_,ge)=>{var He,ye;return ge!==((ye=(He=T==null?void 0:T.path)==null?void 0:He.split("/"))==null?void 0:ye.length)-1}))==null?void 0:X.join("/")),u.setActiveTopMenuPath((xe=(de=T==null?void 0:T.path)==null?void 0:de.split("/"))==null?void 0:xe[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(Se==="update")O.value=T;else if(Se==="delete"){let Ee=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:T==null?void 0:T.path}}),ft=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ue=(ke=(be=ft==null?void 0:ft.data)==null?void 0:be.result)==null?void 0:ke[0],Ne=($=ue==null?void 0:ue.value)==null?void 0:$.pageData;if(Ne.compData=(Ie=Ne.compData)==null?void 0:Ie.map(_=>{var ge;return(_==null?void 0:_.key)==="menuContents"&&(_.contents=Dr(_.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"))),_}),await te.updateInsofDataApi({id:ue==null?void 0:ue.id,value:{pageData:Ne}}),((Me=(pe=Ee==null?void 0:Ee.data)==null?void 0:pe.result)==null?void 0:Me.length)>0){let _=($e=(lt=Ee==null?void 0:Ee.data)==null?void 0:lt.result)==null?void 0:$e.map(ge=>ge==null?void 0:ge.id);(_==null?void 0:_.length)>0&&await te.batchDeleteInsofDataApi({ids:_})}let Be=await Ve.getItemData((vt=(Ae=(ot=T==null?void 0:T.path)==null?void 0:ot.split("/"))==null?void 0:Ae.filter((_,ge)=>{var He,ye;return ge!==((ye=(He=T==null?void 0:T.path)==null?void 0:He.split("/"))==null?void 0:ye.length)-1}))==null?void 0:vt.join("/"),sessionStorage.getItem("systemKey"),""),Je=[];(Be==null?void 0:Be.length)>0&&(Be==null||Be.forEach(_=>{var He,ye,pt,ut,wt,ht,dt,gt,Ct,It,Wt;let ge=(ut=(pt=(ye=(He=_==null?void 0:_.compData)==null?void 0:He.find(yt=>(yt==null?void 0:yt.key)==="header"))==null?void 0:ye.contents)==null?void 0:pt[0])==null?void 0:ut.prop;((gt=(dt=(ht=(wt=_==null?void 0:_.compData)==null?void 0:wt.find(yt=>(yt==null?void 0:yt.key)==="header"))==null?void 0:ht.contents)==null?void 0:dt[0])==null?void 0:gt.directiveLabel)==="#isMain"&&((Wt=(It=(Ct=_==null?void 0:_.compData)==null?void 0:Ct.find(yt=>(yt==null?void 0:yt.key)==="tableContents"))==null?void 0:It.contents)==null||Wt.forEach(yt=>{var Mt,$t,Ht;(yt==null?void 0:yt.length)>1?(yt==null?void 0:yt[1])===(T==null?void 0:T.title)&&Je.push((Mt=yt==null?void 0:yt[0])==null?void 0:Mt.id):(($t=yt==null?void 0:yt[0])==null?void 0:$t[ge])===(T==null?void 0:T.title)&&Je.push((Ht=yt==null?void 0:yt[0])==null?void 0:Ht.id)}))})),(Je==null?void 0:Je.length)>0&&await te.batchDeleteInsofDataApi({ids:Je}),u.setUpdateMenuStatus(!1),await cn.verifyStructureDataToStore(),u.setActiveMenuPath((Ye=(me=(nt=T==null?void 0:T.path)==null?void 0:nt.split("/"))==null?void 0:me.filter((_,ge)=>{var He,ye;return ge!==((ye=(He=T==null?void 0:T.path)==null?void 0:He.split("/"))==null?void 0:ye.length)-1}))==null?void 0:Ye.join("/")),u.setActiveTopMenuPath((je=(et=T==null?void 0:T.path)==null?void 0:et.split("/"))==null?void 0:je[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},at=async(ne,Se)=>{var Ge,ct,v,E,U,Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt,$e,ot,Ae,vt,nt;let T=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ze=(ct=(Ge=T==null?void 0:T.data)==null?void 0:Ge.result)==null?void 0:ct[0],Qe=(v=Ze==null?void 0:Ze.value)==null?void 0:v.pageData;Qe.compData=(E=Qe.compData)==null?void 0:E.map(me=>{var Ye,et;return(me==null?void 0:me.key)==="menuContents"&&(me.contents=ho(me.contents,(Ye=Se==null?void 0:Se.path)==null?void 0:Ye.split("/"),Se==null?void 0:Se.title,(et=ne==null?void 0:ne.target)==null?void 0:et.value)),me}),Ze!=null&&Ze.id&&await te.updateInsofDataApi({id:Ze==null?void 0:Ze.id,value:{pageData:Qe}});let Oe=(Y=(U=Se==null?void 0:Se.path)==null?void 0:U.split("/"))==null?void 0:Y.filter((me,Ye)=>{var et,je;return Ye!==((je=(et=Se==null?void 0:Se.path)==null?void 0:et.split("/"))==null?void 0:je.length)-1}),le=Oe==null?void 0:Oe.join("/");Oe.push((D=ne==null?void 0:ne.target)==null?void 0:D.value),Oe=Oe==null?void 0:Oe.join("/");let Q=await Ve.getItemData(le,sessionStorage.getItem("systemKey"),"");if(((P=(J=(S=(ze=(oe=Q==null?void 0:Q[0])==null?void 0:oe.compData)==null?void 0:ze.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:S.contents)==null?void 0:J[0])==null?void 0:P.directiveLabel)==="#isMain"){let me=(X=(q=(ae=(De=(W=Q==null?void 0:Q[0])==null?void 0:W.compData)==null?void 0:De.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:ae.contents)==null?void 0:q[0])==null?void 0:X.prop,Ye=(be=(xe=(de=Q==null?void 0:Q[0])==null?void 0:de.compData)==null?void 0:xe.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:be.contents,et=(pe=(Ie=($=(ke=Q==null?void 0:Q[0])==null?void 0:ke.compData)==null?void 0:$.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:Ie.contents)==null?void 0:pe.map(Ee=>Ee==null?void 0:Ee.prop),je;if(Ye==null||Ye.forEach(Ee=>{var ue;let ft=Ve.getValueToObjectValue(Ee,et);(ft==null?void 0:ft[me])===Se.title&&(je=ft,je[me]=(ue=ne==null?void 0:ne.target)==null?void 0:ue.value)}),je){let Ee={};for(let ue in je)ue!=="id"&&(Ee[ue]=je==null?void 0:je[ue]);let ft=[{id:je==null?void 0:je.id,value:{tableData:Ee}}];await te.batchUpdateInsofDataApi({dataList:ft})}}let se=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Se==null?void 0:Se.path}}),Te=(lt=(Me=se==null?void 0:se.data)==null?void 0:Me.result)==null?void 0:lt.map(me=>({id:me==null?void 0:me.id,key:me==null?void 0:me.key}));Te=Te==null?void 0:Te.map(me=>(me.key.pageKey=Oe,me)),(Te==null?void 0:Te.length)>0&&await te.batchUpdateInsofDataApi({dataList:Te}),u.setUpdateMenuStatus(!1),await cn.verifyStructureDataToStore(),u.setActiveMenuPath((Ae=(ot=($e=Se==null?void 0:Se.path)==null?void 0:$e.split("/"))==null?void 0:ot.filter((me,Ye)=>{var et,je;return Ye!==((je=(et=Se==null?void 0:Se.path)==null?void 0:et.split("/"))==null?void 0:je.length)-1}))==null?void 0:Ae.join("/")),u.setActiveTopMenuPath((nt=(vt=Se==null?void 0:Se.path)==null?void 0:vt.split("/"))==null?void 0:nt[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},H=async(ne,Se)=>{Fe.type=ce(Se==null?void 0:Se.operateType),await Xe(Se,Fe.type,ne),z.value=ne,re.value=Se},V=()=>{Fe.show=!1},ie=ne=>ne==null?void 0:ne.filter(Se=>Se.allowInherit),ve=()=>{var T,Ze,Qe,Oe,le;let ne;Fe.type==="create"&&(ne=((T=z.value)==null?void 0:T.path)+"/"+We.value[(Ze=We.value)==null?void 0:Ze.prop]),Fe.type==="update"&&(ne=(Qe=z.value)==null?void 0:Qe.path);const Se={...z.value,config:ie((Oe=z.value)==null?void 0:Oe.config),children:[],childMenus:[],title:We.value[(le=We.value)==null?void 0:le.prop],path:ne};console.log("clickSubmitForm",re.value,z.value,Se),he(Se),Fe.show=!1},Pe=ne=>{var T,Ze;const Se=(T=ne==null?void 0:ne.contents)==null?void 0:T.find(Qe=>Qe.key==="formContent");Se&&(We.value=(Ze=Se==null?void 0:Se.contents)==null?void 0:Ze.reduce((Qe,Oe)=>(Qe[Oe.key]=Oe.value,Qe.prop=Oe.key,Qe),{}))},Re=e.ref(!1);return{isCollapse:Re,handleMenuCollapse:()=>{Re.value=!Re.value},handleCompChange:Pe,dialogForm:_e,dialogRenderComps:Ke,getComponents:st,clickSubmitForm:ve,dialogInfo:Fe,beforeDialogDestroy:V,clickMenuIcon:H,mode:K,renderMenuList:ee,clickMenu:C,openMenu:R,closeMenu:y,changeMenuStyle:I,fixElement:O,onBlur:at}}}}e.defineComponent(_r());const Ja=N.useLoginState(),{loginUserInfo:Nn}=te.storeToRefs(Ja),Kt=N.useModelComp(te.pinia),Er=e.ref(!1),{itemData:ld,itemGridData:Ya,curStructureCompIds:zo,isSubmitCurStructure:id,isRefreshCurStructure:sd,freshContent:tf,routeToChildPath:cd,payloadTypes:af,pageMapState:ro,itemExtendData:An}=te.storeToRefs(Kt),Yt=N.useMenuState(te.pinia),{activeTopMenuPath:ud,activeMenuPath:Lt,platform:nf,activeAsideMenu:of,buttonTriggerType:dd,menus:rf}=te.storeToRefs(Yt),en=Ve.useUnit(te.pinia),{selectTitle:pd,chooseTitle:fd}=te.storeToRefs(en),hd=Ve.useOriginalState(te.pinia),{originalPath:vo}=te.storeToRefs(hd),lo=e.ref();N.useAuthorityState(te.pinia);const $n=e.ref(!0),dn=e.ref(0),io=e.ref([]);e.ref(!1);const vd=e.computed(async()=>{var l,s;const n=(l=Lt.value)!=null&&l.startsWith("/")?(s=Lt.value)==null?void 0:s.substring(1):Lt.value;return(n==null?void 0:n.includes(vo.value))||await _d(n)}),gd=()=>{Kt.setItemGridData([]),Kt.setIsEdit("edit"),Kt.setSubmitCurStructure(Lt.value!=="/平台管理/菜单管理")},md=()=>{Kt.setIsEdit("view"),Kt.setRefreshCurStructure(!0)},yd=async n=>{const l=sessionStorage.getItem("systemKey"),s=await Ve.getItemData(n,l,"");return s&&s.length>0},bd=async n=>{var h,f,w;let l=pd.value,s=l==null?void 0:l.findIndex(k=>(k==null?void 0:k.value)===(n==null?void 0:n.value)),r=(h=l==null?void 0:l.filter(k=>(k==null?void 0:k.condition)==="parent"))==null?void 0:h.map(k=>k==null?void 0:k.value),d=r==null?void 0:r[0],u=(w=(f=l==null?void 0:l.filter((k,O)=>!(k!=null&&k.condition)&&O<=s))==null?void 0:f.map(k=>k.value))==null?void 0:w.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,l=l==null?void 0:l.filter(k=>(k==null?void 0:k.condition)!=="child"),en.setSelectTitle(l),en.setChooseTitle([])),await yd(d)&&Yt.setActiveMenuPath(d)},to=async(n,l,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;l==="create"?(u={dataList:n==null?void 0:n.map(f=>{var w;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(w=f==null?void 0:f.compData)==null?void 0:w.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},b=te.batchAddInsofDataApi):l==="update"?(u={dataList:n==null?void 0:n.map(f=>{var w;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(w=f==null?void 0:f.compData)==null?void 0:w.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},b=te.batchUpdateInsofDataApi):l==="delete"&&(u={ids:n},b=te.batchDeleteInsofDataApi);const h=await b(u);if(((d=h==null?void 0:h.data)==null?void 0:d.code)===200)return h.data.result;throw te.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{te.ElMessage.error("保存响应失败")}},Ro=async(n,l,s,r)=>{var d,u,b,h,f,w,k,O,F,G,M;try{const Ce=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:s},value:{tableData:y}})),K=(h=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:h.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),L=JSON.parse(N.cloneDeep(JSON.stringify(n))),ee=(f=L==null?void 0:L.results)==null?void 0:f.map(y=>y.id);let C;s?C=(O=(k=(w=ro.value)==null?void 0:w[Lt.value])==null?void 0:k.filter(y=>{var I,x,fe;return((I=y==null?void 0:y.key)==null?void 0:I.type)===l&&((fe=(x=y==null?void 0:y.key)==null?void 0:x.relatedInfo)==null?void 0:fe.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):C=(M=(G=(F=ro.value)==null?void 0:F[Lt.value])==null?void 0:G.filter(y=>{var I;return((I=y==null?void 0:y.key)==null?void 0:I.type)===l}))==null?void 0:M.map(y=>y==null?void 0:y.id);const R=C==null?void 0:C.filter(y=>!(ee!=null&&ee.includes(y))&&typeof y=="number");(Ce==null?void 0:Ce.length)>0&&await te.batchAddInsofDataApi({dataList:Ce}),(K==null?void 0:K.length)>0&&await te.batchUpdateInsofDataApi({dataList:K}),(R==null?void 0:R.length)>0&&await te.batchDeleteInsofDataApi({ids:R})}catch(Ce){throw new Error(Ce)}},kd=async n=>{var w,k,O,F,G,M,Ce,K,L,ee;Yt.setContentLoading(!0);const l=JSON.parse(N.cloneDeep(JSON.stringify(ld.value)));if(!id.value)return Yt.setCacheStructures({key:dd.value,data:l}),te.ElMessage.success("已暂存");const s=l==null?void 0:l.map(C=>C.id),r=s.filter(C=>{var R;return!((R=zo.value)!=null&&R.includes(C))}),d=(w=zo.value)==null?void 0:w.filter(C=>!s.includes(C)),u=[...r,...d].filter(C=>typeof C!==null&&typeof C<"u"),b=l==null?void 0:l.filter(C=>!C.id),h=l==null?void 0:l.filter(C=>C.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(to(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(to(b,"create",n)),h&&(h==null?void 0:h.length)>0&&f.push(to(h,"update",n)),Ya.value&&((k=Ya.value)!=null&&k.isDelete&&((F=(O=Ya.value)==null?void 0:O.results)==null?void 0:F.length)>0&&((M=(G=Ya.value)==null?void 0:G.results)!=null&&M.every(C=>typeof C=="number"))?await te.batchDeleteInsofDataApi({ids:(Ce=Ya.value)==null?void 0:Ce.results}):(console.log("itemGridData.value",Ya.value),f.push(await Ro(Ya.value,"gridLayout")))),An.value)for(const C in An.value)f.push(await Ro((K=An.value)==null?void 0:K[C],"extend",{target:C,compId:(ee=(L=An.value)==null?void 0:L[C])==null?void 0:ee.compId},C));await Promise.all(f).then(()=>{te.ElMessage.success("保存成功"),Kt.setRefreshCurStructure(!0)}).catch(C=>{te.ElMessage.success(C)}),Yt.setContentLoading(!1)},jn=n=>an(n),jt=e.ref([]),xd=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Sr=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(l=>!(l!=null&&l.affix)||(l==null?void 0:l.affix)==="default")}),wd=async n=>{var r,d,u,b,h,f;let l=N.cloneDeep(Lt).value;l=l+vo.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await te.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const w=(h=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:h.map(O=>O==null?void 0:O.id),k=await te.batchDeleteInsofDataApi({ids:w});((f=k==null?void 0:k.data)==null?void 0:f.code)===200?(te.ElMessage.success("删除成功"),await Ja.setLogRecordAsync({type:"删除",data:n},l)):te.ElMessage.error("删除响应失败"),Kt.setTableLoading(!1)}},Fo=async n=>{var l,s;try{let r=N.cloneDeep(Lt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var h;d.push(te.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+vo.value+((h=Object.values(b==null?void 0:b.singleContent))==null?void 0:h[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var h;return((h=b==null?void 0:b.data)==null?void 0:h.code)===200}))){const b=Array.from(new Set((l=u==null?void 0:u.flatMap(f=>{var w;return(w=f==null?void 0:f.data)==null?void 0:w.result}))==null?void 0:l.map(f=>f==null?void 0:f.id))),h=await te.batchDeleteInsofDataApi({ids:b});((s=h==null?void 0:h.data)==null?void 0:s.code)===200?(te.ElMessage.success("删除成功"),await Ja.setLogRecordAsync({type:"删除",data:n},r)):te.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await wd(n)}catch{te.ElMessage.error("删除数据时处理失败")}finally{Kt.setTableLoading(!1)}},Cd=async n=>{var l,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=N.cloneDeep(n==null?void 0:n.data),u=await te.createInsofDataApi({key:{type:"data",pageKey:Lt.value,tableId:(l=n==null?void 0:n.to)==null?void 0:l.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var w;return((w=f==null?void 0:f.data)==null?void 0:w.code)===200}))?te.ElMessage.success("迁移成功"):te.ElMessage.error("迁移响应失败")}catch(r){throw te.ElMessage.error(r),new Error(r)}},Tr=e.ref(0),kn=e.ref(null),Un=async(n,l="data",s)=>{var d,u,b,h,f,w,k,O,F,G,M,Ce,K,L,ee,C,R,y,I,x,fe,Fe,st,_e,Ke,We,z,ce,re,he,Xe,at,H,V,ie,ve,Pe,Re,tt,ne,Se,T,Ze,Qe,Oe,le,Q,se,Te,Ge,ct,v,E,U,Y,D,oe,ze,S,J,P,W,De,ae,q,X,de,xe,be,ke,$,Ie,pe,Me,lt,$e,ot,Ae,vt,nt;kn.value=null;let r=Lt.value;if((d=lo.value)!=null&&d.compData&&((u=lo.value)==null?void 0:u.compData)!==Lt.value&&(r=r+"/"+((h=(b=fd.value)==null?void 0:b[0])==null?void 0:h.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Fo(n):await Ve.deleteTableContents((w=n==null?void 0:n.singleContent)==null?void 0:w.id,n),await Ja.setLogRecordAsync({type:"删除",data:n},Lt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((k=n==null?void 0:n.selectItems)!=null&&k.every(me=>typeof(me==null?void 0:me.id)=="string")){const me=(O=n==null?void 0:n.selectItems)==null?void 0:O.map(Ye=>({content:n==null?void 0:n.content,singleContent:Ye,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Fo(me)}else{const me=(F=n==null?void 0:n.selectItems)==null?void 0:F.map(Ye=>Ye==null?void 0:Ye.id);await te.batchDeleteInsofDataApi({ids:me}),await Ja.setLogRecordAsync({type:"删除",data:me},Lt.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((G=n==null?void 0:n.ocrRows)==null?void 0:G.length)>0){Kt.setTableLoading(n==null?void 0:n.index);const me=sessionStorage.getItem("systemKey"),Ye=[],et=[];let je=r,Ee=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const ft=await te.getInsofDataApi({id:n==null?void 0:n.parentTableId}),ue=(Ce=(M=ft==null?void 0:ft.data)==null?void 0:M.result)==null?void 0:Ce[0];(K=ue==null?void 0:ue.key)!=null&&K.pageKey&&(je=ue.key.pageKey),Ee=n==null?void 0:n.parentTableId}for(const ft of n.ocrRows){const ue={};for(const Ne in ft)Ne!=="id"&&Ne!=="index"&&!(typeof Ne=="string"&&Ne.startsWith("_"))&&(ue[Ne]=ft[Ne]);try{const Ne=await te.createInsofDataApi({key:{type:l,pageKey:je,tableId:Ee,systemKey:me},value:{tableData:ue}});if(((L=Ne==null?void 0:Ne.data)==null?void 0:L.code)===200){const Be=(ee=Ne==null?void 0:Ne.data)==null?void 0:ee.result;Ye.push({resId:Be,compId:n==null?void 0:n.index,data:ft}),et.push(Be)}}catch(Ne){console.error("OCR数据保存失败:",Ne)}}kn.value=Ye,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(et)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:je,tableId:Ee,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),et.length>0?te.ElMessage.success(`成功保存 ${et.length} 条OCR识别数据`):te.ElMessage.warning("OCR数据保存失败,请重试"),await Ja.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},Lt.value)}Kt.setCacheUpdatingData(null),Kt.setTableLoading(!1),Kt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let me={};for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(me[et]=n==null?void 0:n.singleContent[et]);const Ye=await Ve.addTableContents(l,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(me),n==null?void 0:n.column,n,{param:s});if(kn.value={resId:Ye,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((R=(C=n==null?void 0:n.column)==null?void 0:C[0])==null?void 0:R.directiveLabel)==="#isMain"&&((I=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:I.directiveColor)!==!0){let et=(Fe=n==null?void 0:n.singleContent)==null?void 0:Fe[(fe=(x=n==null?void 0:n.column)==null?void 0:x[0])==null?void 0:fe.prop],je=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ee=Lt.value+"/"+(et==null?void 0:et.slice(0,(et==null?void 0:et.length)-3)),ft=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Ee}}),ue=(_e=(st=je==null?void 0:je.data)==null?void 0:st.result)==null?void 0:_e[0],Ne=(Ke=ue==null?void 0:ue.value)==null?void 0:Ke.pageData;if(Ne.compData=(We=Ne.compData)==null?void 0:We.map(Be=>((Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=fo(Be.contents,Ee==null?void 0:Ee.split("/"),et)),Be)),await te.updateInsofDataApi({id:ue==null?void 0:ue.id,value:{pageData:Ne}}),((ce=(z=ft==null?void 0:ft.data)==null?void 0:z.result)==null?void 0:ce.length)>0)await Ve.newLoadingConstruct(Ee,Lt.value+"/"+et);else{let Be=await te.getInsofDataApi({key:{pageKey:Lt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((he=(re=Be==null?void 0:Be.data)==null?void 0:re.result)==null?void 0:he.length)>=1?await Ve.newLoadingCutFirstConstruct(Lt.value+"/",Lt.value+"/"+et):await Ve.newLoadingCutFirstConstruct(Lt.value,Lt.value+"/"+et)}Yt.setUpdateMenuStatus(!1),await cn.verifyStructureDataToStore(),Yt.setIsRefreshMenus(!1),Yt.setIsRefreshMenus(!0),Yt.setActiveMenuPath((at=(Xe=Ee==null?void 0:Ee.split("/"))==null?void 0:Xe.filter((Be,Je)=>{var _;return Je!==((_=Ee==null?void 0:Ee.split("/"))==null?void 0:_.length)-1}))==null?void 0:at.join("/"))}Kt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((V=(H=n==null?void 0:n.column)==null?void 0:H[0])==null?void 0:V.directiveLabel)==="#isMain"&&((ve=(ie=n==null?void 0:n.column)==null?void 0:ie[0])==null?void 0:ve.directiveColor)!==!0){let me=(tt=n==null?void 0:n.singleContent)==null?void 0:tt[(Re=(Pe=n==null?void 0:n.column)==null?void 0:Pe[0])==null?void 0:Re.prop];if(Bt.isNumber((ne=n==null?void 0:n.singleContent)==null?void 0:ne.id)){let Ye=await te.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),et=await te.getInsofDataApi({id:(Se=n==null?void 0:n.singleContent)==null?void 0:Se.id}),je=(se=(Oe=(Qe=(Ze=(T=et==null?void 0:et.data)==null?void 0:T.result)==null?void 0:Ze[0])==null?void 0:Qe.value)==null?void 0:Oe.tableData)==null?void 0:se[(Q=(le=n==null?void 0:n.column)==null?void 0:le[0])==null?void 0:Q.prop],Ee=Lt.value+"/"+je,ft=(Ge=(Te=Ye==null?void 0:Ye.data)==null?void 0:Te.result)==null?void 0:Ge[0],ue=(ct=ft==null?void 0:ft.value)==null?void 0:ct.pageData;ue.compData=(v=ue.compData)==null?void 0:v.map(Ne=>((Ne==null?void 0:Ne.key)==="menuContents"&&(Ne.contents=ho(Ne.contents,Ee==null?void 0:Ee.split("/"),je,me)),Ne)),await te.updateInsofDataApi({id:ft==null?void 0:ft.id,value:{pageData:ue}}),Yt.setUpdateMenuStatus(!1),await cn.verifyStructureDataToStore(),Yt.setIsRefreshMenus(!1),Yt.setIsRefreshMenus(!0),Yt.setActiveMenuPath((U=(E=Ee==null?void 0:Ee.split("/"))==null?void 0:E.filter((Ne,Be)=>{var Je;return Be!==((Je=Ee==null?void 0:Ee.split("/"))==null?void 0:Je.length)-1}))==null?void 0:U.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let me=[],Ye=[],et=((D=(Y=n==null?void 0:n.content)==null?void 0:Y[0])==null?void 0:D.id)??"",je=s==null?void 0:s.url,Ee="",ft="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const ue=await te.getInsofDataApi({id:n==null?void 0:n.parentTableId});Ee=((J=(S=(ze=(oe=ue==null?void 0:ue.data)==null?void 0:oe.result)==null?void 0:ze[0])==null?void 0:S.key)==null?void 0:J.tableId)??(n==null?void 0:n.parentTableId),ft=((ae=(De=(W=(P=ue==null?void 0:ue.data)==null?void 0:P.result)==null?void 0:W[0])==null?void 0:De.key)==null?void 0:ae.pageKey)??""}else if(et!==""&&((q=n==null?void 0:n.content)==null?void 0:q.length)>1&&typeof((de=(X=n==null?void 0:n.content)==null?void 0:X[0])==null?void 0:de.id)!="string"){const ue=await te.getInsofDataApi({id:et});Ee=(($=(ke=(be=(xe=ue==null?void 0:ue.data)==null?void 0:xe.result)==null?void 0:be[0])==null?void 0:ke.key)==null?void 0:$.tableId)??"",ft=((lt=(Me=(pe=(Ie=ue==null?void 0:ue.data)==null?void 0:Ie.result)==null?void 0:pe[0])==null?void 0:Me.key)==null?void 0:lt.pageKey)??""}($e=n==null?void 0:n.singleContent)==null||$e.forEach(ue=>{let Ne={};for(let Be in ue)Be!=="id"&&Be!=="index"&&(Ne[Be]=ue[Be]);typeof(ue==null?void 0:ue.id)=="number"?me.push({id:ue==null?void 0:ue.id,value:{tableData:Ne}}):Ye.push({key:{type:l,pageKey:je||ft||Lt.value,tableId:Ee||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ne}})}),(Ye==null?void 0:Ye.length)>0&&await te.batchAddInsofDataApi({dataList:Ye}),(me==null?void 0:me.length)>0&&await te.batchUpdateInsofDataApi({dataList:me})}else{let me={},Ye=(ot=n==null?void 0:n.singleContent)==null?void 0:ot.id;for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(me[et]=n==null?void 0:n.singleContent[et]);await Ve.fixTableContents(l,r,n==null?void 0:n.index,Ye,sessionStorage.getItem("systemKey"),Object.values(me),n==null?void 0:n.column,n)}Kt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await Cd(n==null?void 0:n.value);Kt.setTableLoading(!1),(Ae=n==null?void 0:n.column)!=null&&Ae.some(me=>me==null?void 0:me.isMainKey),jt.value=await Ve.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await vd.value),jt.value=(vt=jt.value)==null?void 0:vt.filter(me=>{var Ye;return((Ye=me==null?void 0:me.compData)==null?void 0:Ye.length)>0}),jt.value=(nt=jt.value)==null?void 0:nt.filter(me=>(me==null?void 0:me.comp)!==""),jt.value=await Ve.getDeepDiffItems(jt.value),go.value&&(n==null?void 0:n.buttonName)!=="删除"&&Kt.setRefreshCurStructure(!0)},Dd=async n=>{var s,r,d;const l=await te.getInsofDataApi({id:n});return(d=(r=(s=l==null?void 0:l.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Kn=async(n,l)=>{var d,u,b;if(Er.value||typeof(n==null?void 0:n.index)=="string")return;const s=await Dd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ve.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=N.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(h=>h.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),l&&(Yt.setActiveMenuPath(null),Yt.setActiveMenuPath(l))},Wn=async n=>{jt.value=await Ve.getDeepDiffItems(n),Kt.setItemData(jt.value),Kt.setOriginalData(jt.value)},_d=async n=>{var u,b,h,f,w,k;let l="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,F)=>{var G;((G=n==null?void 0:n.split("/"))==null?void 0:G.length)-2>F&&(l=l===""?l+O:l+"/"+O)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((O,F)=>{var G;((G=n==null?void 0:n.split("/"))==null?void 0:G.length)-1>F&&(s=s===""?s+O:s+"/"+O)}),l=l+"/",s=s+"/";let r=await te.getInsofDataApi({key:{pageKey:l,systemKey:sessionStorage.getItem("systemKey")}}),d=await te.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(h=r==null?void 0:r.data)==null?void 0:h.result)==null?void 0:f.length)>0||((k=(w=d==null?void 0:d.data)==null?void 0:w.result)==null?void 0:k.length)>0};e.ref();const yn=e.ref(null),Ed=()=>{var n,l;console.log("倒计时结束时"),N.ElMessageBox.alert(`超时未提交,【${(l=(n=Lt.value)==null?void 0:n.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ir=e.ref([]),Sd=e.computed(()=>{var n,l;return(l=(n=ro.value)==null?void 0:n[Lt.value])==null?void 0:l.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[ud.value],()=>{en.setSelectTitle([]),en.setChooseTitle([])},{deep:!0});e.watch(()=>[Lt.value,sd.value],async n=>{var d;if(!Lt.value)return;Kt.setLockingPage(""),jt.value=[];let l=e.getCurrentInstance();(d=l==null?void 0:l.scope)==null||d.stop(),l=null,$n.value=!1,Er.value=!0;let s=n==null?void 0:n[0],r=await nd(s);jt.value=await Ve.getDeepDiffItems(r),Kt.setExtraContents([]),en.setSelectIndex(""),en.setSelectMenu(""),Kt.setItemData(jt.value),Kt.setOriginalData(jt.value),e.nextTick(()=>{dn.value=dn.value++,$n.value=!0})},{immediate:!0});const Td=async()=>{var d,u,b,h,f,w,k,O;Yt.setLinkMenuInfo(null);const n=await te.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Nn.value)==null?void 0:d.account)||((u=Nn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),l=await te.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Nn.value)==null?void 0:b.account)||((h=Nn.value)==null?void 0:h.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(w=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:w.map(F=>F==null?void 0:F.id);const r=(O=(k=l==null?void 0:l.data)==null?void 0:k.result)==null?void 0:O.map(F=>F==null?void 0:F.id);s=[...N.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(F=>F!==null&&F))&&(await te.batchDeleteInsofDataApi({ids:s}),await Ja.setLogRecordAsync({type:"删除",data:s},Lt.value)),Yt.setActiveMenuPath(cd.value),jt.value=null,Kt.setRouteToChildPath(""),Yt.setChildMenu("")},Id=n=>new RegExp("button","i").test(n),Bd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Br=n=>{if(Bd(n)){const l=n==null?void 0:n.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Yt.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Nr=n=>{var l;yn.value&&(yn.value={...yn.value,mainKeyPropValue:n==null?void 0:n[(l=yn.value)==null?void 0:l.mainKeyProp]})},Nd=n=>{Tr.value=n},sn=e.reactive({index:0,comp:null}),Ad=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.map((l,s)=>({id:l.id,name:l.name,status:Od(l,s)}))}),Ar=(n,l)=>{var f,w,k,O,F;const s=l?n:n-2,r=(f=jt.value)==null?void 0:f[s],d=(k=(w=r==null?void 0:r.compData)==null?void 0:w.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:k.contents,u=d==null?void 0:d.findIndex(G=>(G==null?void 0:G.isMainKey)&&(G==null?void 0:G.label)!=="操作"),b=u===-1?0:u,h=(F=(O=r==null?void 0:r.compData)==null?void 0:O.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:F.contents;return{valid:h==null?void 0:h.every(G=>G==null?void 0:G[b+1]),length:(h==null?void 0:h.length)||0}},Od=(n,l)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=Ar(l,!0);sn.index===l?s="process":u===0?s="wait":s=d?"success":"error"}return s},Or=n=>{var s,r,d,u,b;const l=n+1;if(l>1&&((d=(r=(s=jt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:h}=Ar(l);h?(sn.index=l,sn.comp=(u=jt.value)==null?void 0:u[n]):te.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else sn.index=l,sn.comp=(b=jt.value)==null?void 0:b[n]},go=e.computed(()=>{var n,l;return(l=(n=Sr.value)==null?void 0:n[0])==null?void 0:l.isStepLayout});e.watch(()=>go.value,n=>{n&&Or(0)},{immediate:!0});const Vd={class:"layout"},Md=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:l}){const s=l,r=n;e.onMounted(async()=>{});const d=e.computed(()=>N.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var k;const w=(k=d==null?void 0:d.value)==null?void 0:k.find(O=>{const{key:F}=O;return F==="baseConfig"});return w==null?void 0:w.contents}),b=e.computed(()=>{var k;const w=(k=d==null?void 0:d.value)==null?void 0:k.find(O=>{const{key:F}=O;return F==="children"});return w==null?void 0:w.contents}),h=e.computed(()=>{let w=N.cloneDeep(b.value)||[];const k=w.length;let O=0;const F=[];if(w=w.map(G=>{const M=G.span;return M?(G.span=Number(M),O=O+G.span):F.push(G),G}),O<24){const G=Math.floor((24-O)/k);F.forEach(M=>{M.span=G})}return w}),f=w=>{s("rowClick",w)};return(w,k)=>{var G;const O=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Vd,[e.createVNode(F,{style:e.normalizeStyle({height:(G=u.value)==null?void 0:G.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(M,Ce)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var K;return[e.unref($n)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(jn)(M.comp)),{key:e.unref(dn),compName:M.name,index:(M==null?void 0:M.id)??Ce,height:(K=u.value)==null?void 0:K.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Un),onContentChange:e.unref(Kn),onPageChange:e.unref(Wn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),zd=Pt._export_sfc(Md,[["__scopeId","data-v-ab9a36ed"]]),Rd={class:"layout-operate"},Fd={class:"layout-module"},Ld={class:"collapse-title-item"},Pd={class:"collapse-title"},$d={class:"icon-content"},jd=["onClick"],Ud={class:"comp-child"},Kd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const s=n,r=l;e.onMounted(()=>{Ce()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),h=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",R(),!0)},w=e.ref([]),k=e.ref([]),O=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],F=e.computed(()=>{const y=s==null?void 0:s.itemContents;return N.cloneDeep(y)}),G=e.computed(()=>{const y=F==null?void 0:F.value,I=y==null?void 0:y.find(x=>{const{key:fe}=x;return fe==="baseConfig"});return I==null?void 0:I.contents}),M=e.computed(()=>{const y=F==null?void 0:F.value,I=y==null?void 0:y.find(x=>{const{key:fe}=x;return fe==="children"});return I==null?void 0:I.contents}),Ce=()=>{var y;d.value=F.value||{},w.value=(M==null?void 0:M.value)||[],b.value=h(),b.value=(y=b.value)==null?void 0:y.map(I=>{var fe;const{prop:x}=I;return I.value=(fe=G.value)==null?void 0:fe[x],I})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;w.value=(M==null?void 0:M.value)||[],k.value=(y=M.value)==null?void 0:y.map(I=>O(I))},{immediate:!0});const K=(y,I)=>{const x=N.cloneDeep(M==null?void 0:M.value);x[I].span=y.span,w.value=x,r("change",R(),!0)},L=y=>an(y),ee=(y,I,x)=>{if(!y)return;const fe=N.cloneDeep(M==null?void 0:M.value);fe[x]&&(fe[x].compData=y,w.value=fe,r("change",R(),!0))},C=y=>{N.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let I=N.cloneDeep(M==null?void 0:M.value);I=I==null?void 0:I.filter((x,fe)=>y!==fe),w.value=I,r("change",R(),!0),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:w==null?void 0:w.value}]});return(y,I)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rd,[e.createElementVNode("div",Fd,[I[1]||(I[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:I[0]||(I[0]=fe=>f(fe))},null,8,["rowContents"])])]),e.createVNode(dr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:fe,index:Fe})=>[e.createElementVNode("div",Ld,[e.createElementVNode("div",Pd,e.toDisplayString(fe.name),1),e.createElementVNode("div",$d,[e.createElementVNode("div",{onClick:e.withModifiers(st=>C(Fe),["stop"]),class:"icon-content"},[e.createVNode(x,{name:"Delete",style:{width:"16px",height:"16px"}})],8,jd)])])]),content:e.withCtx(({item:fe,index:Fe})=>[e.createElementVNode("div",Ud,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:k.value[Fe],key:Fe,isEnableWrap:!0,onChange:st=>K(st,Fe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(fe.comp+"Operate")),{itemContents:fe==null?void 0:fe.compData,originalItemContents:fe.compData,onChange:st=>ee(st,fe,Fe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Wd=Pt._export_sfc(Kd,[["__scopeId","data-v-ba05456e"]]),Hd=typeof window<"u";var Lo;Hd&&((Lo=window==null?void 0:window.navigator)!=null&&Lo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ia(n){return n==null}function Vr(){}const qd=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(qd)));function Gd(){const n=new Map;return{on(l,s){const r=n.get(l);r!=null&&r.add(s)||n.set(l,new Set([s]))},off(l,s){const r=n.get(l);r&&r.delete(s)},clear(l){const s=n.get(l);s&&s.clear()},clearAll(){n.clear()},emit(l,...s){const r=n.get(l);r&&r.forEach(d=>{d(...s)})}}}function Po(n,l=16){if(typeof n!="function")return Vr;const s=(...u)=>{n(...u)};if(l<=0)return Mr(s);let r=0,d;return function(...u){const b=Date.now(),h=b-r;clearTimeout(d),h>=l?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,l-h))}}function Xd(n,l=100){if(typeof n!="function")return Vr;const s=(...d)=>{n(...d)};if(l<=0)return Mr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},l)}}function Mr(n){if(typeof n!="function")return n;let l=!1,s,r;return function(...d){return s=d,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,n(...s)))),r}}const xn=new Set,zr=new WeakMap;function Yd(){xn.forEach(n=>{n(...zr.get(n))}),xn.clear()}function aa(n,...l){if(typeof n!="function")return n;zr.set(n,l),!xn.has(n)&&(xn.add(n),xn.size===1&&Promise.resolve().then(Yd))}const Rr=Symbol("LAYOUT_KEY"),Fr=Symbol("EMITTER_KEY");function Jd(n){let l=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>l&&(l=s);return l}function so(n){const l=Array(n.length);for(let s=0,r=n.length;s<r;s++)l[s]=Zd(n[s]);return l}function Zd(n){return{...n}}function Lr(n,l){return!(n===l||n.x+n.w<=l.x||n.x>=l.x+l.w||n.y+n.h<=l.y||n.y>=l.y+l.h)}function ln(n,l,s){const r=$r(n),d=jr(n),u=Array(n.length);for(let b=0,h=d.length;b<h;b++){let f=d[b];f.static||(f=Qd(r,f,l,s),r.push(f)),u[n.findIndex(w=>w.i===f.i)]=f,f.moved=!1}return u}function Qd(n,l,s,r){if(s)for(;l.y>0&&!wn(n,l);)l.y--;else if(r){const u=r[l.i].y;for(;l.y>u&&!wn(n,l);)l.y--}let d;for(;d=wn(n,l);)l.y=d.y+d.h;return l}function ep(n,l){const s=$r(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>l.cols&&(u.x=l.cols-u.w),u.x<0&&(u.x=0,u.w=l.cols),!u.static)s.push(u);else for(;wn(s,u);)u.y++}return n}function $o(n,l){for(let s=0,r=n.length;s<r;s++)if(n[s].i===l)return n[s]}function wn(n,l){for(let s=0,r=n.length;s<r;s++)if(Lr(n[s],l))return n[s]}function Pr(n,l){return n.filter(s=>Lr(s,l))}function $r(n){return n.filter(l=>l.static)}function co(n,l,s,r,d=!1,u=!1){if(l.static)return n;const b=l.x,h=l.y,f=r&&l.y>r;typeof s=="number"&&(l.x=s),typeof r=="number"&&(l.y=r),l.moved=!0;let w=jr(n);f&&(w=w.reverse());const k=Pr(w,l);if(u&&k.length)return l.x=b,l.y=h,l.moved=!1,n;for(let O=0,F=k.length;O<F;O++){const G=k[O];G.moved||l.y>G.y&&l.y-G.y>G.h/4||(G.static?n=jo(n,G,l,d):n=jo(n,l,G,d))}return n}function jo(n,l,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(l.y-s.h,0),!wn(n,d))return co(n,s,void 0,d.y,!1)}return co(n,s,void 0,s.y+1,!1)}function tp(n,l,s,r){const d="translate3d("+l+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function ap(n,l,s,r){const d="translate3d("+l*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function np(n,l,s,r){return{top:n+"px",left:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function op(n,l,s,r){return{top:n+"px",right:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function jr(n){return Array.from(n).sort(function(l,s){return l.y===s.y&&l.x===s.x?0:l.y>s.y||l.y===s.y&&l.x>s.x?1:-1})}function rp(n,l){l=l||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(l+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let h=0;h<s.length;h++)if(typeof b[s[h]]!="number")throw new Error("VueGridLayout: "+l+"["+d+"]."+s[h]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+l+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+l+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+l+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+l+"["+d+"].static must be a boolean!")}}function lp(n,l="vgl"){const s=()=>`${l}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Uo(n){return ip(n)}function ip(n){var l;const s=((l=n.target)==null?void 0:l.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Ko(n,l,s,r){return sp(n)?{deltaX:s-n,deltaY:r-l,lastX:n,lastY:l,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function sp(n){return typeof n=="number"&&!Number.isNaN(n)}function cp(n,l){const s=Kr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];l>n[b]&&(r=b)}return r}function Ur(n,l){if(!l[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return l[n]}function up(n,l,s,r,d,u,b){if(l[r])return so(l[r]);let h=n;const f=Kr(s),w=f.slice(f.indexOf(r));for(let k=0,O=w.length;k<O;k++){const F=w[k];if(l[F]){h=l[F];break}}return h=so(h||[]),ln(ep(h,{cols:u}),b)}function Kr(n){return Object.keys(n).sort((l,s)=>n[l]-n[s])}let dp="auto";function pp(){return typeof document<"u"}function Wo(){return pp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):dp}var bn={exports:{}},fp=bn.exports,Ho;function hp(){return Ho||(Ho=1,function(n,l){(function(s,r){n.exports=r()})(fp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,i)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(i){f(a,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(i){Object.defineProperty(a,i,Object.getOwnPropertyDescriptor(o,i))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,Ce(i.key),i)}}function h(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=Ce(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function w(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&O(a,t)}function k(a){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(a)}function O(a,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},O(a,t)}function F(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function G(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,i=k(a);if(t){var c=k(this).constructor;o=Reflect.construct(i,arguments,c)}else o=i.apply(this,arguments);return function(p,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var i=function(p,g){for(;!Object.prototype.hasOwnProperty.call(p,g)&&(p=k(p))!==null;);return p}(a,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},M.apply(this,arguments)}function Ce(a){var t=function(o,i){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,i);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var K=function(a){return!(!a||!a.Window)&&a instanceof a.Window},L=void 0,ee=void 0;function C(a){L=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),ee=a}function R(a){return K(a)?a:(a.ownerDocument||a).defaultView||ee.window}typeof window<"u"&&window&&C(window);var y=function(a){return!!a&&d(a)==="object"},I=function(a){return typeof a=="function"},x={window:function(a){return a===ee||K(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:I,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=R(a)||ee;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&I(a.splice)}};function fe(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Fe(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var i=o.prepared.axis;if(i==="x"||i==="y"){var c=i==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var st={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,i=a.defaults;o.prototype.draggable=st.draggable,t.map.drag=st,t.methodDict.drag="draggable",i.actions.drag=st.defaults},listeners:{"interactions:before-action-move":fe,"interactions:action-resume":fe,"interactions:action-move":Fe,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,i=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return x.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):x.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:fe,move:Fe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},_e=st,Ke={init:function(a){var t=a;Ke.document=t.document,Ke.DocumentFragment=t.DocumentFragment||We,Ke.SVGElement=t.SVGElement||We,Ke.SVGSVGElement=t.SVGSVGElement||We,Ke.SVGElementInstance=t.SVGElementInstance||We,Ke.Element=t.Element||We,Ke.HTMLElement=t.HTMLElement||Ke.Element,Ke.Event=t.Event,Ke.Touch=t.Touch||We,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 We(){}var z=Ke,ce={init:function(a){var t=z.Element,o=a.navigator||{};ce.supportsTouch="ontouchstart"in a||x.func(a.DocumentTouch)&&z.document instanceof a.DocumentTouch,ce.supportsPointerEvent=o.pointerEnabled!==!1&&!!z.PointerEvent,ce.isIOS=/iP(hone|od|ad)/.test(o.platform),ce.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ce.isIe9=/MSIE 9/.test(o.userAgent),ce.isOperaMobile=o.appName==="Opera"&&ce.supportsTouch&&/Presto/.test(o.userAgent),ce.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ce.pEventTypes=ce.supportsPointerEvent?z.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ce.wheelEvent=z.document&&"onmousewheel"in z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},re=ce;function he(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Xe(a,t){for(;x.element(a);){if(H(a,t))return a;a=at(a)}return null}function at(a){var t=a.parentNode;if(x.docFrag(t)){for(;(t=t.host)&&x.docFrag(t););return t}return t}function H(a,t){return ee!==L&&(t=t.replace(/\/deep\//g," ")),a[re.prefixedMatchesSelector](t)}var V=function(a){return a.parentNode||a.host};function ie(a,t){for(var o,i=[],c=a;(o=V(c))&&c!==t&&o!==c.ownerDocument;)i.unshift(c),c=o;return i}function ve(a,t,o){for(;x.element(a);){if(H(a,t))return!0;if((a=at(a))===o)return H(a,t)}return!1}function Pe(a){return a.correspondingUseElement||a}function Re(a){var t=a instanceof z.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function tt(a){var t,o=Re(a);if(!re.isIOS7&&o){var i={x:(t=(t=R(a))||ee).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=i.x,o.right+=i.x,o.top+=i.y,o.bottom+=i.y}return o}function ne(a){for(var t=[];a;)t.push(a),a=at(a);return t}function Se(a){return!!x.string(a)&&(z.document.querySelector(a),!0)}function T(a,t){for(var o in t)a[o]=t[o];return a}function Ze(a,t,o){return a==="parent"?at(o):a==="self"?t.getRect(o):Xe(o,a)}function Qe(a,t,o,i){var c=a;return x.string(c)?c=Ze(c,t,o):x.func(c)&&(c=c.apply(void 0,i)),x.element(c)&&(c=tt(c)),c}function Oe(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function le(a){return!a||"x"in a&&"y"in a||((a=T({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function Q(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function se(a,t,o){var i=o&&a.options[o];return Oe(Qe(i&&i.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Te(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(B){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},x.string(a)&&a.search(" ")!==-1&&(a=Ge(a)),x.array(a))return a.forEach(function(B){return Te(B,t,o,i)}),i;if(x.object(a)&&(t=a,a=""),x.func(t)&&o(a))i[a]=i[a]||[],i[a].push(t);else if(x.array(t))for(var c=0,p=t;c<p.length;c++){var g=p[c];Te(a,g,o,i)}else if(x.object(t))for(var m in t)Te(Ge(m).map(function(B){return"".concat(a).concat(B)}),t[m],o,i);return i}function Ge(a){return a.trim().split(/ +/)}var ct=function(a,t){return Math.sqrt(a*a+t*t)},v=["webkit","moz"];function E(a,t){a.__set||(a.__set={});var o=function(c){if(v.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var i in t)o(i);return a}function U(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function Y(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function D(a){return a instanceof z.Event||a instanceof z.Touch}function oe(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function ze(a,t){return t=t||{x:0,y:0},re.isOperaMobile&&D(a)?(oe("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):oe("page",a,t),t}function S(a){return x.number(a.pointerId)?a.pointerId:a.identifier}function J(a,t,o){var i=t.length>1?W(t):t[0];ze(i,a.page),function(c,p){p=p||{},re.isOperaMobile&&D(c)?oe("screen",c,p):oe("client",c,p)}(i,a.client),a.timeStamp=o}function P(a){var t=[];return x.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function W(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var i=a[o];for(var c in t)t[c]+=i[c]}for(var p in t)t[p]/=a.length;return t}function De(a){if(!a.length)return null;var t=P(a),o=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:i,left:o,top:i,right:c,bottom:p,width:c-o,height:p-i}}function ae(a,t){var o=t+"X",i=t+"Y",c=P(a),p=c[0][o]-c[1][o],g=c[0][i]-c[1][i];return ct(p,g)}function q(a,t){var o=t+"X",i=t+"Y",c=P(a),p=c[1][o]-c[0][o],g=c[1][i]-c[0][i];return 180*Math.atan2(g,p)/Math.PI}function X(a){return x.string(a.pointerType)?a.pointerType:x.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof z.Touch?"touch":"mouse"}function de(a){var t=x.func(a.composedPath)?a.composedPath():a.path;return[Pe(t?t[0]:a.target),Pe(a.currentTarget)]}var xe=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return h(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(xe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var be=function(a,t){for(var o=0;o<t.length;o++){var i=t[o];a.push(i)}return a},ke=function(a){return be([],a)},$=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ie=function(a,t){return a[$(a,t)]},pe=function(a){w(o,a);var t=G(o);function o(i,c,p){var g;u(this,o),(g=t.call(this,c._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var m=p==="dragleave"?i.prev:i.cur,B=m.element,j=m.dropzone;return g.type=p,g.target=B,g.currentTarget=B,g.dropzone=j,g.dragEvent=c,g.relatedTarget=c.target,g.draggable=c.interactable,g.timeStamp=c.timeStamp,g}return h(o,[{key:"reject",value:function(){var i=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,g=$(p,function(B){var j=B.dropzone,A=B.element;return j===i.dropzone&&A===i.target});c.activeDrops.splice(g,1);var m=new o(c,this.dragEvent,"dropdeactivate");m.dropzone=this.dropzone,m.target=this.target,this.dropzone.fire(m)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(xe);function Me(a,t){for(var o=0,i=a.slice();o<i.length;o++){var c=i[o],p=c.dropzone,g=c.element;t.dropzone=p,t.target=g,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function lt(a,t){for(var o=function(p,g){for(var m=[],B=0,j=p.interactables.list;B<j.length;B++){var A=j[B];if(A.options.drop.enabled){var Z=A.options.drop.accept;if(!(x.element(Z)&&Z!==g||x.string(Z)&&!H(g,Z)||x.func(Z)&&!Z({dropzone:A,draggableElement:g})))for(var we=0,Ue=A.getAllElements();we<Ue.length;we++){var Le=Ue[we];Le!==g&&m.push({dropzone:A,element:Le,rect:A.getRect(Le)})}}}return m}(a,t),i=0;i<o.length;i++){var c=o[i];c.rect=c.dropzone.getRect(c.element)}return o}function $e(a,t,o){for(var i=a.dropState,c=a.interactable,p=a.element,g=[],m=0,B=i.activeDrops;m<B.length;m++){var j=B[m],A=j.dropzone,Z=j.element,we=j.rect,Ue=A.dropCheck(t,o,c,p,Z,we);g.push(Ue?Z:null)}var Le=function(qe){for(var it,rt,mt,St=[],Nt=0;Nt<qe.length;Nt++){var xt=qe[Nt],Tt=qe[it];if(xt&&Nt!==it)if(Tt){var ta=V(xt),Ut=V(Tt);if(ta!==xt.ownerDocument)if(Ut!==xt.ownerDocument)if(ta!==Ut){St=St.length?St:ie(Tt);var la=void 0;if(Tt instanceof z.HTMLElement&&xt instanceof z.SVGElement&&!(xt instanceof z.SVGSVGElement)){if(xt===Ut)continue;la=xt.ownerSVGElement}else la=xt;for(var da=ie(la,Tt.ownerDocument),ka=0;da[ka]&&da[ka]===St[ka];)ka++;var Bn=[da[ka-1],da[ka],St[ka]];if(Bn[0])for(var vn=Bn[0].lastChild;vn;){if(vn===Bn[1]){it=Nt,St=da;break}if(vn===Bn[2])break;vn=vn.previousSibling}}else mt=Tt,(parseInt(R(rt=xt).getComputedStyle(rt).zIndex,10)||0)>=(parseInt(R(mt).getComputedStyle(mt).zIndex,10)||0)&&(it=Nt);else it=Nt}else it=Nt}return it}(g);return i.activeDrops[Le]||null}function ot(a,t,o){var i=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new pe(i,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new pe(i,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(c.leave=new pe(i,o,"dragleave"),o.dragLeave=c.leave.target=i.prev.element,o.prevDropzone=c.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(c.enter=new pe(i,o,"dragenter"),o.dragEnter=i.cur.element,o.dropzone=i.cur.dropzone)),o.type==="dragend"&&i.cur.dropzone&&(c.drop=new pe(i,o,"drop"),o.dropzone=i.cur.dropzone,o.relatedTarget=i.cur.element),o.type==="dragmove"&&i.cur.dropzone&&(c.move=new pe(i,o,"dropmove"),o.dropzone=i.cur.dropzone)),c}function Ae(a,t){var o=a.dropState,i=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Me(i,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function vt(a,t){var o=a.interaction,i=a.iEvent,c=a.event;if(i.type==="dragmove"||i.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=lt(t,o.element));var g=i,m=$e(o,g,c);p.rejected=p.rejected&&!!m&&m.dropzone===p.cur.dropzone&&m.element===p.cur.element,p.cur.dropzone=m&&m.dropzone,p.cur.element=m&&m.element,p.events=ot(o,0,g)}}var nt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,i=a.Interactable,c=a.defaults;a.usePlugin(_e),i.prototype.dropzone=function(p){return function(g,m){if(x.object(m)){if(g.options.drop.enabled=m.enabled!==!1,m.listeners){var B=Te(m.listeners),j=Object.keys(B).reduce(function(Z,we){return Z[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=B[we],Z},{}),A=g.options.drop.listeners;A&&g.off(A),g.on(j),g.options.drop.listeners=j}return x.func(m.ondrop)&&g.on("drop",m.ondrop),x.func(m.ondropactivate)&&g.on("dropactivate",m.ondropactivate),x.func(m.ondropdeactivate)&&g.on("dropdeactivate",m.ondropdeactivate),x.func(m.ondragenter)&&g.on("dragenter",m.ondragenter),x.func(m.ondragleave)&&g.on("dragleave",m.ondragleave),x.func(m.ondropmove)&&g.on("dropmove",m.ondropmove),/^(pointer|center)$/.test(m.overlap)?g.options.drop.overlap=m.overlap:x.number(m.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,m.overlap),0)),"accept"in m&&(g.options.drop.accept=m.accept),"checker"in m&&(g.options.drop.checker=m.checker),g}return x.bool(m)?(g.options.drop.enabled=m,g):g.options.drop}(this,p)},i.prototype.dropCheck=function(p,g,m,B,j,A){return function(Z,we,Ue,Le,qe,it,rt){var mt=!1;if(!(rt=rt||Z.getRect(it)))return!!Z.options.drop.checker&&Z.options.drop.checker(we,Ue,mt,Z,it,Le,qe);var St=Z.options.drop.overlap;if(St==="pointer"){var Nt=se(Le,qe,"drag"),xt=ze(we);xt.x+=Nt.x,xt.y+=Nt.y;var Tt=xt.x>rt.left&&xt.x<rt.right,ta=xt.y>rt.top&&xt.y<rt.bottom;mt=Tt&&ta}var Ut=Le.getRect(qe);if(Ut&&St==="center"){var la=Ut.left+Ut.width/2,da=Ut.top+Ut.height/2;mt=la>=rt.left&&la<=rt.right&&da>=rt.top&&da<=rt.bottom}return Ut&&x.number(St)&&(mt=Math.max(0,Math.min(rt.right,Ut.right)-Math.max(rt.left,Ut.left))*Math.max(0,Math.min(rt.bottom,Ut.bottom)-Math.max(rt.top,Ut.top))/(Ut.width*Ut.height)>=St),Z.options.drop.checker&&(mt=Z.options.drop.checker(we,Ue,mt,Z,it,Le,qe)),mt}(this,p,g,m,B,j,A)},o.dynamicDrop=function(p){return x.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},T(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=nt.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,i=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=lt(t,o.element),c.events=ot(o,0,i),c.events.activate&&(Me(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:i}))}},"interactions:action-move":vt,"interactions:after-action-move":function(a,t){var o=a.interaction,i=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Ae(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:i}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,i=a.iEvent;vt(a,t),Ae(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:i})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:lt,getDrop:$e,getDropEvents:ot,fireDropEvents:Ae,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},me=nt;function Ye(a){var t=a.interaction,o=a.iEvent,i=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=i==="start",g=i==="end",m=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ae(c,m),o.box=De(c),o.scale=1,o.ds=0,o.angle=q(c,m),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var B=t.prevEvent;o.distance=B.distance,o.box=B.box,o.scale=B.scale,o.ds=0,o.angle=B.angle,o.da=0}else o.distance=ae(c,m),o.box=De(c),o.scale=o.distance/t.gesture.startDistance,o.angle=q(c,m),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,x.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var et={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,i=a.defaults;o.prototype.gesturable=function(c){return x.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):x.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=et,t.methodDict.gesture="gesturable",i.actions.gesture=et.defaults},listeners:{"interactions:action-start":Ye,"interactions:action-move":Ye,"interactions:action-end":Ye,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},je=et;function Ee(a,t,o,i,c,p,g){if(!t)return!1;if(t===!0){var m=x.number(p.width)?p.width:p.right-p.left,B=x.number(p.height)?p.height:p.bottom-p.top;if(g=Math.min(g,Math.abs((a==="left"||a==="right"?m:B)/2)),m<0&&(a==="left"?a="right":a==="right"&&(a="left")),B<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=m>=0?p.left:p.right;return o.x<j+g}if(a==="top"){var A=B>=0?p.top:p.bottom;return o.y<A+g}if(a==="right")return o.x>(m>=0?p.right:p.left)-g;if(a==="bottom")return o.y>(B>=0?p.bottom:p.top)-g}return!!x.element(i)&&(x.element(t)?t===i:ve(i,t,c))}function ft(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var i=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=o.resizeAxes,o.resizeAxes==="x"?i.delta.y=0:o.resizeAxes==="y"&&(i.delta.x=0))}}var ue,Ne,Be={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,i=a.Interactable,c=a.defaults;Be.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Be.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,i.prototype.resizable=function(p){return function(g,m,B){return x.object(m)?(g.options.resize.enabled=m.enabled!==!1,g.setPerAction("resize",m),g.setOnEvents("resize",m),x.string(m.axis)&&/^x$|^y$|^xy$/.test(m.axis)?g.options.resize.axis=m.axis:m.axis===null&&(g.options.resize.axis=B.defaults.actions.resize.axis),x.bool(m.preserveAspectRatio)?g.options.resize.preserveAspectRatio=m.preserveAspectRatio:x.bool(m.square)&&(g.options.resize.square=m.square),g):x.bool(m)?(g.options.resize.enabled=m,g):g.options.resize}(this,p,a)},t.map.resize=Be,t.methodDict.resize="resizable",c.actions.resize=Be.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var c=o,p=i.rect;i._rects={start:T({},p),corrected:T({},p),previous:T({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=i.prepared.edges,c.rect=i._rects.corrected,c.deltaRect=i._rects.delta}})(a),ft(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var c=o,p=i.interactable.options.resize.invert,g=p==="reposition"||p==="negate",m=i.rect,B=i._rects,j=B.start,A=B.corrected,Z=B.delta,we=B.previous;if(T(we,A),g){if(T(A,m),p==="reposition"){if(A.top>A.bottom){var Ue=A.top;A.top=A.bottom,A.bottom=Ue}if(A.left>A.right){var Le=A.left;A.left=A.right,A.right=Le}}}else A.top=Math.min(m.top,j.bottom),A.bottom=Math.max(m.bottom,j.top),A.left=Math.min(m.left,j.right),A.right=Math.max(m.right,j.left);for(var qe in A.width=A.right-A.left,A.height=A.bottom-A.top,A)Z[qe]=A[qe]-we[qe];c.edges=i.prepared.edges,c.rect=A,c.deltaRect=Z}})(a),ft(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var i=t;i.edges=o.prepared.edges,i.rect=o._rects.corrected,i.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,i=a.element,c=a.rect,p=a.buttons;if(c){var g=T({},t.coords.cur.page),m=o.options.resize;if(m&&m.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&m.mouseButtons)!=0)){if(x.object(m.edges)){var B={left:!1,right:!1,top:!1,bottom:!1};for(var j in B)B[j]=Ee(j,m.edges[j],g,t._latestPointer.eventTarget,i,c,m.margin||Be.defaultMargin);B.left=B.left&&!B.right,B.top=B.top&&!B.bottom,(B.left||B.right||B.top||B.bottom)&&(a.action={name:"resize",edges:B})}else{var A=m.axis!=="y"&&g.x>c.right-Be.defaultMargin,Z=m.axis!=="x"&&g.y>c.bottom-Be.defaultMargin;(A||Z)&&(a.action={name:"resize",axes:(A?"x":"")+(Z?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,i=a.name,c=Be.cursors,p=null;if(o)p=c[i+o];else if(t){for(var g="",m=0,B=["top","bottom","left","right"];m<B.length;m++){var j=B[m];t[j]&&(g+=j)}p=c[g]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Je=Be,_={id:"actions",install:function(a){a.usePlugin(je),a.usePlugin(Je),a.usePlugin(_e),a.usePlugin(me)}},ge=0,He={request:function(a){return ue(a)},cancel:function(a){return Ne(a)},init:function(a){if(ue=a.requestAnimationFrame,Ne=a.cancelAnimationFrame,!ue)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var i=t[o];ue=a["".concat(i,"RequestAnimationFrame")],Ne=a["".concat(i,"CancelAnimationFrame")]||a["".concat(i,"CancelRequestAnimationFrame")]}ue=ue&&ue.bind(a),Ne=Ne&&Ne.bind(a),ue||(ue=function(c){var p=Date.now(),g=Math.max(0,16-(p-ge)),m=a.setTimeout(function(){c(p+g)},g);return ge=p+g,m},Ne=function(c){return clearTimeout(c)})}},ye={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){ye.isScrolling=!0,He.cancel(ye.i),a.autoScroll=ye,ye.interaction=a,ye.prevTime=ye.now(),ye.i=He.request(ye.scroll)},stop:function(){ye.isScrolling=!1,ye.interaction&&(ye.interaction.autoScroll=null),He.cancel(ye.i)},scroll:function(){var a=ye.interaction,t=a.interactable,o=a.element,i=a.prepared.name,c=t.options[i].autoScroll,p=pt(c.container,t,o),g=ye.now(),m=(g-ye.prevTime)/1e3,B=c.speed*m;if(B>=1){var j={x:ye.x*B,y:ye.y*B};if(j.x||j.y){var A=ut(p);x.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var Z=ut(p),we={x:Z.x-A.x,y:Z.y-A.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:a,container:p})}ye.prevTime=g}ye.isScrolling&&(He.cancel(ye.i),ye.i=He.request(ye.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&ye.check(t.interactable,t.prepared.name))if(t.simulation)ye.x=ye.y=0;else{var i,c,p,g,m=t.interactable,B=t.element,j=t.prepared.name,A=m.options[j].autoScroll,Z=pt(A.container,m,B);if(x.window(Z))g=o.clientX<ye.margin,i=o.clientY<ye.margin,c=o.clientX>Z.innerWidth-ye.margin,p=o.clientY>Z.innerHeight-ye.margin;else{var we=Re(Z);g=o.clientX<we.left+ye.margin,i=o.clientY<we.top+ye.margin,c=o.clientX>we.right-ye.margin,p=o.clientY>we.bottom-ye.margin}ye.x=c?1:g?-1:0,ye.y=p?1:i?-1:0,ye.isScrolling||(ye.margin=A.margin,ye.speed=A.speed,ye.start(t))}}};function pt(a,t,o){return(x.string(a)?Ze(a,t,o):a)||R(o)}function ut(a){return x.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var wt={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=ye,ye.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=ye.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,ye.stop(),ye.interaction&&(ye.interaction=null)},"interactions:stop":ye.stop,"interactions:action-move":function(a){return ye.onInteractionMove(a)}}},ht=wt;function dt(a,t){var o=!1;return function(){return o||(ee.console.warn(t),o=!0),a.apply(this,arguments)}}function gt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Ct(a){return x.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function It(a){return x.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Wt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,i,c,p){var g=function(m,B,j,A,Z){var we=m.getRect(A),Ue=B.buttons||{0:1,1:4,3:8,4:16}[B.button],Le={action:null,interactable:m,interaction:j,element:A,rect:we,buttons:Ue};return Z.fire("auto-start:check",Le),Le.action}(this,i,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,i,g,this,p,c):g},t.prototype.ignoreFrom=dt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=dt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=It,t.prototype.styleCursor=Ct}};function yt(a,t,o,i,c){return t.testIgnoreAllow(t.options[a.name],o,i)&&t.options[a.name].enabled&&Gt(t,o,a,c)?a:null}function Mt(a,t,o,i,c,p,g){for(var m=0,B=i.length;m<B;m++){var j=i[m],A=c[m],Z=j.getAction(t,o,a,A);if(Z){var we=yt(Z,j,A,p,g);if(we)return{action:we,interactable:j,element:A}}}return{action:null,interactable:null,element:null}}function $t(a,t,o,i,c){var p=[],g=[],m=i;function B(A){p.push(A),g.push(m)}for(;x.element(m);){p=[],g=[],c.interactables.forEachMatch(m,B);var j=Mt(a,t,o,p,g,i,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;m=at(m)}return{action:null,interactable:null,element:null}}function Ht(a,t,o){var i=t.action,c=t.interactable,p=t.element;i=i||{name:null},a.interactable=c,a.element=p,gt(a.prepared,i),a.rect=c&&i.name?c.getRect(p):null,Da(a,o),o.fire("autoStart:prepared",{interaction:a})}function Gt(a,t,o,i){var c=a.options,p=c[o.name].max,g=c[o.name].maxPerElement,m=i.autoStart.maxInteractions,B=0,j=0,A=0;if(!(p&&g&&m))return!1;for(var Z=0,we=i.interactions.list;Z<we.length;Z++){var Ue=we[Z],Le=Ue.prepared.name;if(Ue.interacting()&&(++B>=m||Ue.interactable===a&&((j+=Le===o.name?1:0)>=p||Ue.element===t&&(A++,Le===o.name&&A>=g))))return!1}return m>0}function Qt(a,t){return x.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function Ft(a,t,o){var i=o.autoStart.cursorElement;i&&i!==a&&(i.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Da(a,t){var o=a.interactable,i=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var g=o.options[c.name].cursorChecker;p=x.func(g)?g(c,o,i,a._interacting):t.actions.map[c.name].getCursor(c)}Ft(a.element,p||"",t)}else t.autoStart.cursorElement&&Ft(t.autoStart.cursorElement,"",t)}var Va={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(Wt),o.base.actionChecker=null,o.base.styleCursor=!0,T(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return Qt(i,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Gt,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,i=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Ht(o,$t(o,i,c,p,t),t)},"interactions:move":function(a,t){(function(o,i){var c=o.interaction,p=o.pointer,g=o.event,m=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Ht(c,$t(c,p,g,m,i),i)})(a,t),function(o,i){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){i.fire("autoStart:before-start",o);var p=c.interactable,g=c.prepared.name;g&&p&&(p.options[g].manualStart||!Gt(p,c.element,c.prepared,i)?c.stop():(c.start(c.prepared,p,c.element),Da(c,i)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,i=o.interactable;i&&i.options.styleCursor&&Ft(o.element,"",t)}},maxInteractions:Qt,withinInteractionLimit:Gt,validateAction:yt},ga=Va,Ma={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,i=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var g=Math.abs(c),m=Math.abs(p),B=o.interactable.options.drag,j=B.startAxis,A=g>m?"x":g<m?"y":"xy";if(o.prepared.axis=B.lockAxis==="start"?A[0]:B.lockAxis,A!=="xy"&&j!=="xy"&&j!==A){o.prepared.name=null;for(var Z=i,we=function(Le){if(Le!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&Le.testIgnoreAllow(qe,Z,i)){var it=Le.getAction(o.downPointer,o.downEvent,o,Z);if(it&&it.name==="drag"&&function(rt,mt){if(!mt)return!1;var St=mt.options.drag.startAxis;return rt==="xy"||St==="xy"||St===rt}(A,Le)&&ga.validateAction(it,Le,Z,i,t))return Le}}};x.element(Z);){var Ue=t.interactables.forEachMatch(Z,we);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=Z;break}Z=at(Z)}}}}}};function ma(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var za={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(ga),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=ma(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;ma(t)>0&&(t.prepared.name=null)}},getHoldDuration:ma},Ra=za,Fa={id:"auto-start",install:function(a){a.usePlugin(ga),a.usePlugin(Ra),a.usePlugin(Ma)}},La=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):x.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Pa(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var _a={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=La,t.prototype.checkAndPreventDefault=function(o){return function(i,c,p){var g=i.options.preventDefault;if(g!=="never")if(g!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var m=R(p.target).document,B=c.getDocOptions(m);if(!B||!B.events||B.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||x.element(p.target)&&H(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var i=0,c=a.interactions.list;i<c.length;i++){var p=c[i];if(p.element&&(p.element===o.target||he(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Pa,a},{})};function pa(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function sa(a){var t={};for(var o in a){var i=a[o];x.plainObject(i)?t[o]=sa(i):x.array(i)?t[o]=ke(i):t[o]=i}return t}var ya=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=fa(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(a,[{key:"start",value:function(t,o){var i,c,p=t.phase,g=this.interaction,m=function(j){var A=j.interactable.options[j.prepared.name],Z=A.modifiers;return Z&&Z.length?Z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var Ue=A[we];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(we){return!!we})}(g);this.prepareStates(m),this.startEdges=T({},g.edges),this.edges=T({},this.startEdges),this.startOffset=(i=g.rect,c=o,i?{left:c.x-i.left,top:c.y-i.top,right:i.right-c.x,bottom:i.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var B=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=fa(),this.startAll(B),this.result=this.setAll(B)}},{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,i=this.states;o<i.length;o++){var c=i[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,i=t.preEnd,c=t.skipModifiers,p=t.rect,g=t.edges;t.coords=T({},t.pageCoords),t.rect=T({},p),t.edges=T({},g);for(var m=c?this.states.slice(c):this.states,B=fa(t.coords,t.rect),j=0;j<m.length;j++){var A,Z=m[j],we=Z.options,Ue=T({},t.coords),Le=null;(A=Z.methods)!=null&&A.set&&this.shouldDo(we,i,o)&&(t.state=Z,Le=Z.methods.set(t),Q(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),B.eventProps.push(Le)}T(this.edges,t.edges),B.delta.x=t.coords.x-t.pageCoords.x,B.delta.y=t.coords.y-t.pageCoords.y,B.rectDelta.left=t.rect.left-p.left,B.rectDelta.right=t.rect.right-p.right,B.rectDelta.top=t.rect.top-p.top,B.rectDelta.bottom=t.rect.bottom-p.bottom;var qe=this.result.coords,it=this.result.rect;if(qe&&it){var rt=B.rect.left!==it.left||B.rect.right!==it.right||B.rect.top!==it.top||B.rect.bottom!==it.bottom;B.changed=rt||qe.x!==B.coords.x||qe.y!==B.coords.y}return B}},{key:"applyToInteraction",value:function(t){var o=this.interaction,i=t.phase,c=o.coords.cur,p=o.coords.start,g=this.result,m=this.startDelta,B=g.delta;i==="start"&&T(this.startDelta,g.delta);for(var j=0,A=[[p,m],[c,B]];j<A.length;j++){var Z=A[j],we=Z[0],Ue=Z[1];we.page.x+=Ue.x,we.page.y+=Ue.y,we.client.x+=Ue.x,we.client.y+=Ue.y}var Le=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=Le.left,qe.right+=Le.right,qe.top+=Le.top,qe.bottom+=Le.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,i=t.phase,c=t.preEnd,p=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:c,phase:i,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var m=o.coords.cur.page,B={x:t.modifiedCoords.x-m.x,y:t.modifiedCoords.y-m.y};g.coords.x+=B.x,g.coords.y+=B.y,g.delta.x+=B.x,g.delta.y+=B.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,i=t.event,c=this.states;if(c&&c.length){for(var p=!1,g=0;g<c.length;g++){var m=c[g];t.state=m;var B=m.options,j=m.methods,A=j.beforeEnd&&j.beforeEnd(t);if(A)return this.endResult=A,!1;p=p||!p&&this.shouldDo(B,!0,t.phase,!0)}p&&o.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var i=T({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(i);for(var c=0,p=this.states;c<p.length;c++){var g=p[c];i.state=g,g.methods.stop&&g.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var i=t[o],c=i.options,p=i.methods,g=i.name;this.states.push({options:c,methods:p,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,i=o.coords,c=o.rect,p=o.modification;if(p.result){for(var g=p.startDelta,m=p.result,B=m.delta,j=m.rectDelta,A=0,Z=[[i.start,g],[i.cur,B]];A<Z.length;A++){var we=Z[A],Ue=we[0],Le=we[1];Ue.page.x-=Le.x,Ue.page.y-=Le.y,Ue.client.x-=Le.x,Ue.client.y-=Le.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,i,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||i==="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 sa(o)}),this.result=fa(T({},t.result.coords),T({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function fa(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,i={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var g=p||{};for(var m in g.enabled=g.enabled!==!1,o)m in g||(g[m]=o[m]);var B={options:g,methods:i,name:t,enable:function(){return g.enabled=!0,B},disable:function(){return g.enabled=!1,B}};return B};return t&&typeof t=="string"&&(c._defaults=o,c._methods=i),c}function ua(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var $a={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new ya(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,i=o.setAndApply(a);return t.edges=o.edges,i},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,i=o.beforeEnd(a);return t.edges=o.startEdges,i},"interactions:action-start":ua,"interactions:action-move":ua,"interactions:action-end":ua,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},Ea=$a,Sa={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},ba=function(a){w(o,a);var t=G(o);function o(i,c,p,g,m,B,j){var A;u(this,o),(A=t.call(this,i)).relatedTarget=null,A.screenX=void 0,A.screenY=void 0,A.button=void 0,A.buttons=void 0,A.ctrlKey=void 0,A.shiftKey=void 0,A.altKey=void 0,A.metaKey=void 0,A.page=void 0,A.client=void 0,A.delta=void 0,A.rect=void 0,A.x0=void 0,A.y0=void 0,A.t0=void 0,A.dt=void 0,A.duration=void 0,A.clientX0=void 0,A.clientY0=void 0,A.velocity=void 0,A.speed=void 0,A.swipe=void 0,A.axes=void 0,A.preEnd=void 0,m=m||i.element;var Z=i.interactable,we=(Z&&Z.options||Sa).deltaSource,Ue=se(Z,m,p),Le=g==="start",qe=g==="end",it=Le?F(A):i.prevEvent,rt=Le?i.coords.start:qe?{page:it.page,client:it.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return A.page=T({},rt.page),A.client=T({},rt.client),A.rect=T({},i.rect),A.timeStamp=rt.timeStamp,qe||(A.page.x-=Ue.x,A.page.y-=Ue.y,A.client.x-=Ue.x,A.client.y-=Ue.y),A.ctrlKey=c.ctrlKey,A.altKey=c.altKey,A.shiftKey=c.shiftKey,A.metaKey=c.metaKey,A.button=c.button,A.buttons=c.buttons,A.target=m,A.currentTarget=m,A.preEnd=B,A.type=j||p+(g||""),A.interactable=Z,A.t0=Le?i.pointers[i.pointers.length-1].downTime:it.t0,A.x0=i.coords.start.page.x-Ue.x,A.y0=i.coords.start.page.y-Ue.y,A.clientX0=i.coords.start.client.x-Ue.x,A.clientY0=i.coords.start.client.y-Ue.y,A.delta=Le||qe?{x:0,y:0}:{x:A[we].x-it[we].x,y:A[we].y-it[we].y},A.dt=i.coords.delta.timeStamp,A.duration=A.timeStamp-A.t0,A.velocity=T({},i.coords.velocity[we]),A.speed=ct(A.velocity.x,A.velocity.y),A.swipe=qe||g==="inertiastart"?A.getSwipe():null,A}return h(o,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,g=202.5<=c&&c<337.5;return{up:g,down:!g&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(xe);Object.defineProperties(ba.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var ja=h(function a(t,o,i,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=i,this.downTime=c,this.downTarget=p}),Ua=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),Ta=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ka=0,Wa=function(){function a(t){var o=this,i=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=dt(function(A){this.move(A)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ka++,this._scopeFire=c,this.pointerType=i;var p=this;this._proxy={};var g=function(A){Object.defineProperty(o._proxy,A,{get:function(){return p[A]}})};for(var m in Ua)g(m);var B=function(A){Object.defineProperty(o._proxy,A,{value:function(){return p[A].apply(p,arguments)}})};for(var j in Ta)B(j);this._scopeFire("interactions:new",{interaction:this})}return h(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,i){var c=this.updatePointer(t,o,i,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:i,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(gt(this.prepared,t),this.interactable=o,this.element=i,this.rect=o.getRect(i),this.edges=this.prepared.edges?T({},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,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,i,!1);var c,p,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ct(c,p)>this.pointerMoveTolerance);var m,B,j,A=this.getPointerIndex(t),Z={pointer:t,pointerIndex:A,pointerInfo:this.pointers[A],event:o,type:"move",eventTarget:i,dx:c,dy:p,duplicate:g,interaction:this};g||(m=this.coords.velocity,B=this.coords.delta,j=Math.max(B.timeStamp/1e3,.001),m.page.x=B.page.x/j,m.page.y=B.page.y/j,m.client.x=B.client.x/j,m.client.y=B.client.y/j,m.timeStamp=j),this._scopeFire("interactions:move",Z),g||this.simulation||(this.interacting()&&(Z.type=null,this.move(Z)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=T({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,i,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,i,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:i,type:g,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=S(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(this.pointers,function(i){return i.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,i,c){var p,g,m,B=S(t),j=this.getPointerIndex(t),A=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),A?A.pointer=t:(A=new ja(B,t,o,null,null),j=this.pointers.length,this.pointers.push(A)),J(this.coords.cur,this.pointers.map(function(Z){return Z.pointer}),this._now()),p=this.coords.delta,g=this.coords.prev,m=this.coords.cur,p.page.x=m.page.x-g.page.x,p.page.y=m.page.y-g.page.y,p.client.x=m.client.x-g.client.x,p.client.y=m.client.y-g.client.y,p.timeStamp=m.timeStamp-g.timeStamp,c&&(this.pointerIsDown=!0,A.downTime=this.coords.cur.timeStamp,A.downTarget=i,E(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,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:i,down:c,pointerInfo:A,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var i=this.getPointerIndex(t);if(i!==-1){var c=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:i,pointerInfo:c,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,i){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,i,c){return new ba(this,t,this.prepared.name,o,this.element,i,c)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,i=t.phase,c=t.preEnd,p=t.type,g=this.rect;if(g&&i==="move"&&(Q(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var m=t.iEvent=this._createPreparedEvent(o,i,c,p);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function Et(a){Zt(a.interaction)}function Zt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Vt(a.coords.cur,t),Vt(a.coords.delta,t),Q(a.edges,a.rect,t),t.x=0,t.y=0,!0}function bt(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Vt(a,t){var o=a.page,i=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,i.x+=c,i.y+=p}Ta.offsetBy="";var kt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=bt},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(Vt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":Et,"interactions:before-action-move":Et,"interactions:before-action-end":function(a){var t=a.interaction;if(Zt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},qt=kt,_t=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return h(a,[{key:"start",value:function(t){var o=this.interaction,i=Dt(o);if(!i||!i.enabled)return!1;var c=o.coords.velocity.client,p=ct(c.x,c.y),g=this.modification||(this.modification=new ya(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=i.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>i.minSpeed&&p>i.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.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,i=Dt(this.interaction),c=i.resistance,p=-Math.log(i.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.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=He.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,i,c,p,g,m,B=this,j=this.interaction,A=Dt(j).resistance,Z=(j._now()-this.t0)/1e3;if(Z<this.te){var we,Ue=1-(Math.exp(-A*Z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,i=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,g=this.modifiedOffset.y,we={x:Ot(m=Ue,t,i,p),y:Ot(m,o,c,g)}):we={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var Le={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Le.x,this.currentOffset.y+=Le.y,j.offsetBy(Le),j.move(),this.onNextFrame(function(){return B.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,i=o._now()-this.t0,c=Dt(o).smoothEndDuration;if(i<c){var p={x:Rt(i,0,this.targetOffset.x,c),y:Rt(i,0,this.targetOffset.y,c)},g={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),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,i=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,i,c,!0),p._doPhase({interaction:p,event:i,phase:"resume"}),U(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,He.cancel(this.timeout)}}]),a}();function Dt(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var zt={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(qt),a.usePlugin(Ea),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new _t(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,i=t.inertia;if(i.active)for(var c=o;x.element(c);){if(c===t.element){i.resume(a);break}c=at(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ua,"interactions:action-inertiastart":ua,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Ot(a,t,o,i){var c=1-a;return c*c*t+2*c*a*o+a*a*i}function Rt(a,t,o,i){return-o*(a/=i)*(a-2)+t}var Xt=zt;function oa(a,t){for(var o=0;o<t.length;o++){var i=t[o];if(a.immediatePropagationStopped)break;i(a)}}var Ia=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=T({},t||{})}return h(a,[{key:"fire",value:function(t){var o,i=this.global;(o=this.types[t.type])&&oa(t,o),!t.propagationStopped&&i&&(o=i[t.type])&&oa(t,o)}},{key:"on",value:function(t,o){var i=Te(t,o);for(t in i)this.types[t]=be(this.types[t]||[],i[t])}},{key:"off",value:function(t,o){var i=Te(t,o);for(t in i){var c=this.types[t];if(c&&c.length)for(var p=0,g=i[t];p<g.length;p++){var m=g[p],B=c.indexOf(m);B!==-1&&c.splice(B,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ha=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,E(this,t)}return h(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Ba(a){return x.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function qa(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var _n={id:"events",install:function(a){var t,o=[],i={},c=[],p={add:g,remove:m,addDelegate:function(A,Z,we,Ue,Le){var qe=Ba(Le);if(!i[we]){i[we]=[];for(var it=0;it<c.length;it++){var rt=c[it];g(rt,we,B),g(rt,we,j,!0)}}var mt=i[we],St=Ie(mt,function(Nt){return Nt.selector===A&&Nt.context===Z});St||(St={selector:A,context:Z,listeners:[]},mt.push(St)),St.listeners.push({func:Ue,options:qe})},removeDelegate:function(A,Z,we,Ue,Le){var qe,it=Ba(Le),rt=i[we],mt=!1;if(rt)for(qe=rt.length-1;qe>=0;qe--){var St=rt[qe];if(St.selector===A&&St.context===Z){for(var Nt=St.listeners,xt=Nt.length-1;xt>=0;xt--){var Tt=Nt[xt];if(Tt.func===Ue&&qa(Tt.options,it)){Nt.splice(xt,1),Nt.length||(rt.splice(qe,1),m(Z,we,B),m(Z,we,j,!0)),mt=!0;break}}if(mt)break}}},delegateListener:B,delegateUseCapture:j,delegatedEvents:i,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function g(A,Z,we,Ue){if(A.addEventListener){var Le=Ba(Ue),qe=Ie(o,function(it){return it.eventTarget===A});qe||(qe={eventTarget:A,events:{}},o.push(qe)),qe.events[Z]||(qe.events[Z]=[]),Ie(qe.events[Z],function(it){return it.func===we&&qa(it.options,Le)})||(A.addEventListener(Z,we,p.supportsOptions?Le:Le.capture),qe.events[Z].push({func:we,options:Le}))}}function m(A,Z,we,Ue){if(A.addEventListener&&A.removeEventListener){var Le=$(o,function(ta){return ta.eventTarget===A}),qe=o[Le];if(qe&&qe.events)if(Z!=="all"){var it=!1,rt=qe.events[Z];if(rt){if(we==="all"){for(var mt=rt.length-1;mt>=0;mt--){var St=rt[mt];m(A,Z,St.func,St.options)}return}for(var Nt=Ba(Ue),xt=0;xt<rt.length;xt++){var Tt=rt[xt];if(Tt.func===we&&qa(Tt.options,Nt)){A.removeEventListener(Z,we,p.supportsOptions?Nt:Nt.capture),rt.splice(xt,1),rt.length===0&&(delete qe.events[Z],it=!0);break}}}it&&!Object.keys(qe.events).length&&o.splice(Le,1)}else for(Z in qe.events)qe.events.hasOwnProperty(Z)&&m(A,Z,"all")}}function B(A,Z){for(var we=Ba(Z),Ue=new Ha(A),Le=i[A.type],qe=de(A)[0],it=qe;x.element(it);){for(var rt=0;rt<Le.length;rt++){var mt=Le[rt],St=mt.selector,Nt=mt.context;if(H(it,St)&&he(Nt,qe)&&he(Nt,it)){var xt=mt.listeners;Ue.currentTarget=it;for(var Tt=0;Tt<xt.length;Tt++){var ta=xt[Tt];qa(ta.options,we)&&ta.func(Ue)}}}it=at(it)}}function j(A){return B(A,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},nn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=nn.methodOrder;t<o.length;t++){var i=o[t],c=nn[i](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,i=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,g=c.interactions.list;p<g.length;p++){var m=g[p],B=i;if(m.simulation&&m.simulation.allowResume&&m.pointerType===t)for(;B;){if(B===m.element)return m;B=at(B)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,i=a.pointerType,c=a.eventType,p=a.scope;if(i!=="mouse"&&i!=="pen")return null;for(var g=0,m=p.interactions.list;g<m.length;g++){var B=m[g];if(B.pointerType===i){if(B.simulation&&!pn(B,o))continue;if(B.interacting())return B;t||(t=B)}}if(t)return t;for(var j=0,A=p.interactions.list;j<A.length;j++){var Z=A[j];if(!(Z.pointerType!==i||/down/i.test(c)&&Z.simulation))return Z}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,i=a.scope.interactions.list;o<i.length;o++){var c=i[o];if(pn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,i=a.scope.interactions.list;o<i.length;o++){var c=i[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function pn(a,t){return a.pointers.some(function(o){return o.id===t})}var on=nn,ca=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Ga(a,t){return function(o){var i=t.interactions.list,c=X(o),p=de(o),g=p[0],m=p[1],B=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,A=o.changedTouches;j<A.length;j++){var Z=A[j],we={pointer:Z,pointerId:S(Z),pointerType:c,eventType:o.type,eventTarget:g,curEventTarget:m,scope:t},Ue=rn(we);B.push([we.pointer,we.eventTarget,we.curEventTarget,Ue])}}else{var Le=!1;if(!re.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<i.length&&!Le;qe++)Le=i[qe].pointerType!=="mouse"&&i[qe].pointerIsDown;Le=Le||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Le){var it={pointer:o,pointerId:S(o),pointerType:c,eventType:o.type,curEventTarget:m,eventTarget:g,scope:t},rt=rn(it);B.push([it.pointer,it.eventTarget,it.curEventTarget,rt])}}for(var mt=0;mt<B.length;mt++){var St=B[mt],Nt=St[0],xt=St[1],Tt=St[2];St[3][a](Nt,o,xt,Tt)}}}function rn(a){var t=a.pointerType,o=a.scope,i={interaction:on.search(a),searchDetails:a};return o.fire("interactions:find",i),i.interaction||o.interactions.new({pointerType:t})}function ra(a,t){var o=a.doc,i=a.scope,c=a.options,p=i.interactions.docEvents,g=i.events,m=g[t];for(var B in i.browser.isIOS&&!c.events&&(c.events={passive:!1}),g.delegatedEvents)m(o,B,g.delegateListener),m(o,B,g.delegateUseCapture,!0);for(var j=c&&c.events,A=0;A<p.length;A++){var Z=p[A];m(o,Z.type,Z.listener,j)}}var En={id:"core/interactions",install:function(a){for(var t={},o=0;o<ca.length;o++){var i=ca[o];t[i]=Ga(i,a)}var c,p=re.pEventTypes;function g(){for(var m=0,B=a.interactions.list;m<B.length;m++){var j=B[m];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var A=function(){var Ue=we[Z];a.documents.some(function(Le){return he(Le.doc,Ue.downTarget)})||j.removePointer(Ue.pointer,Ue.event)},Z=0,we=j.pointers;Z<we.length;Z++)A()}}(c=z.PointerEvent?[{type:p.down,listener:g},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{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(m){for(var B=0,j=a.interactions.list;B<j.length;B++)j[B].documentBlur(m)}}),a.prevTouchTime=0,a.Interaction=function(m){w(j,m);var B=G(j);function j(){return u(this,j),B.apply(this,arguments)}return h(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(A){a.interactions.pointerMoveTolerance=A}},{key:"_now",value:function(){return a.now()}}]),j}(Wa),a.interactions={list:[],new:function(m){m.scopeFire=function(j,A){return a.fire(j,A)};var B=new a.Interaction(m);return a.interactions.list.push(B),B},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(_a)},listeners:{"scope:add-document":function(a){return ra(a,"add")},"scope:remove-document":function(a){return ra(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,i=t.interactions.list.length-1;i>=0;i--){var c=t.interactions.list[i];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:ra,doOnInteractions:Ga,methodNames:ca},Na=En,Aa=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Aa||{}),tl=function(){function a(t,o,i,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ia,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||i,this._win=R(Se(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return h(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return x.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),x.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),x.func(o.onend)&&this.on("".concat(t,"end"),o.onend),x.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,i){var c,p=this,g=(c=this._actions.map[t])==null?void 0:c.filterEventType,m=function(B){return(g==null||g(B))&&pa(B,p._actions)};(x.array(o)||x.object(o))&&this._onOff(Aa.Off,t,o,void 0,m),(x.array(i)||x.object(i))&&this._onOff(Aa.On,t,i,void 0,m)}},{key:"setPerAction",value:function(t,o){var i=this._defaults;for(var c in o){var p=c,g=this.options[t],m=o[p];p==="listeners"&&this.updatePerActionListeners(t,g.listeners,m),x.array(m)?g[p]=ke(m):x.plainObject(m)?(g[p]=T(g[p]||{},sa(m)),x.object(i.perAction[p])&&"enabled"in i.perAction[p]&&(g[p].enabled=m.enabled!==!1)):x.bool(m)&&x.object(i.perAction[p])?g[p].enabled=m:g[p]=m}}},{key:"getRect",value:function(t){return t=t||(x.element(this.target)?this.target:null),x.string(this.target)&&(t=t||this._context.querySelector(this.target)),tt(t)}},{key:"rectChecker",value:function(t){var o=this;return x.func(t)?(this.getRect=function(i){var c=T({},t.apply(o,i));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(Se(o)||x.object(o)){for(var i in this.options[t]=o,this._actions.map)this.options[i][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 x.string(t)?Array.from(this._context.querySelectorAll(t)):x.func(t)&&t.getAllElements?t.getAllElements():x.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,i){return!this.testIgnore(t.ignoreFrom,o,i)&&this.testAllow(t.allowFrom,o,i)}},{key:"testAllow",value:function(t,o,i){return!t||!!x.element(i)&&(x.string(t)?ve(i,t,o):!!x.element(t)&&he(t,i))}},{key:"testIgnore",value:function(t,o,i){return!(!t||!x.element(i))&&(x.string(t)?ve(i,t,o):!!x.element(t)&&he(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,i,c,p){x.object(o)&&!x.array(o)&&(c=i,i=null);var g=Te(o,i,p);for(var m in g){m==="wheel"&&(m=re.wheelEvent);for(var B=0,j=g[m];B<j.length;B++){var A=j[B];pa(m,this._actions)?this.events[t===Aa.On?"on":"off"](m,A):x.string(this.target)?this._scopeEvents[t===Aa.On?"addDelegate":"removeDelegate"](this.target,this._context,m,A,c):this._scopeEvents[t===Aa.On?"add":"remove"](this.target,m,A,c)}}return this}},{key:"on",value:function(t,o,i){return this._onOff(Aa.On,t,o,i)}},{key:"off",value:function(t,o,i){return this._onOff(Aa.Off,t,o,i)}},{key:"set",value:function(t){var o=this._defaults;for(var i in x.object(t)||(t={}),this.options=sa(o.base),this._actions.methodDict){var c=i,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,T(T({},o.perAction),o.actions[c])),this[p](t[c])}for(var g in t)g!=="getRect"?x.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(x.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],i=o.length-1;i>=0;i--){var c=o[i],p=c.selector,g=c.context,m=c.listeners;p===this.target&&g===this._context&&o.splice(i,1);for(var B=m.length-1;B>=0;B--)this._scopeEvents.removeDelegate(this.target,this._context,t,m[B][0],m[B][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),al=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var c=i.interactable,p=c.target,g=x.string(p)?o.selectorMap[p]:p[o.scope.id],m=$(g,function(B){return B===c});g.splice(m,1)}})}return h(a,[{key:"new",value:function(t,o){o=T(o||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),x.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:o,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,o){var i=o&&o.context||this.scope.document,c=x.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ie(p,function(g){return g._context===i&&(c||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var i=0,c=this.list;i<c.length;i++){var p=c[i],g=void 0;if((x.string(p.target)?x.element(t)&&H(t,p.target):t===p.target)&&p.inContext(t)&&(g=o(p)),g!==void 0)return g}}}]),a}(),nl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=re,this.defaults=sa(Sa),this.Eventable=Ia,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var c=function p(g,m){var B=i.interactables.getExisting(g,m);return B||((B=i.interactables.new(g,m)).events.global=p.globalEvents),B};return c.getPointerAverage=W,c.getTouchBBox=De,c.getTouchDistance=ae,c.getTouchAngle=q,c.getElementRect=tt,c.getElementClientRect=Re,c.matchesSelector=H,c.closest=Xe,c.globalEvents={},c.version="1.10.27",c.scope=i,c.use=function(p,g){return this.scope.usePlugin(p,g),this},c.isSet=function(p,g){return!!this.scope.interactables.get(p,g&&g.context)},c.on=dt(function(p,g,m){if(x.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),x.array(p)){for(var B=0,j=p;B<j.length;B++){var A=j[B];this.on(A,g,m)}return this}if(x.object(p)){for(var Z in p)this.on(Z,p[Z],g);return this}return pa(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(g):this.globalEvents[p]=[g]:this.scope.events.add(this.scope.document,p,g,{options:m}),this},"The interact.on() method is being deprecated"),c.off=dt(function(p,g,m){if(x.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),x.array(p)){for(var B=0,j=p;B<j.length;B++){var A=j[B];this.off(A,g,m)}return this}if(x.object(p)){for(var Z in p)this.off(Z,p[Z],g);return this}var we;return pa(p,this.scope.actions)?p in this.globalEvents&&(we=this.globalEvents[p].indexOf(g))!==-1&&this.globalEvents[p].splice(we,1):this.scope.events.remove(this.scope.document,p,g,m),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return re.supportsTouch},c.supportsPointerEvent=function(){return re.supportsPointerEvent},c.stop=function(){for(var p=0,g=this.scope.interactions.list;p<g.length;p++)g[p].stop();return this},c.pointerMoveTolerance=function(p){return x.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,g){this.scope.addDocument(p,g)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=ba,this.Interactable=void 0,this.interactables=new al(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var o=this;this.Interactable=function(i){w(p,i);var c=G(p);function p(){return u(this,p),c.apply(this,arguments)}return h(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return M(k(p.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){M(k(p.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(tl)}return h(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var i=0,c=this.listenerMaps;i<c.length;i++){var p=c[i].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,i){return o.isInitialized=!0,x.window(i)&&C(i),z.init(i),re.init(i),He.init(i),o.window=i,o.document=i.document,o.usePlugin(Na),o.usePlugin(_n),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 i=0,c=this.listenerMaps.length,p=t.before.reduce(function(m,B){return m[B]=!0,m[yo(B)]=!0,m},{});i<c;i++){var g=this.listenerMaps[i].id;if(g&&(p[g]||p[yo(g)]))break}this.listenerMaps.splice(i,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 i=R(t);o=o?T({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),i=R(t),c=this.documents[o].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:i,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function yo(a){return a&&a.replace(/\/.*$/,"")}var bo=new nl,ea=bo.interactStatic,ol=typeof globalThis<"u"?globalThis:window;bo.init(ol);var rl=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var c=i[0],p=i[1];return c in a||p in a}),o=function(i,c){for(var p=a.range,g=a.limits,m=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,B=a.offset,j=B===void 0?{x:0,y:0}:B,A={range:p,grid:a,x:null,y:null},Z=0;Z<t.length;Z++){var we=t[Z],Ue=we[0],Le=we[1],qe=Math.round((i-j.x)/a[Ue]),it=Math.round((c-j.y)/a[Le]);A[Ue]=Math.max(m.left,Math.min(m.right,qe*a[Ue]+j.x)),A[Le]=Math.max(m.top,Math.min(m.bottom,it*a[Le]+j.y))}return A};return o.grid=a,o.coordFields=t,o}}),ll={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=T(t.snappers||{},rl),t.createSnapGrid=t.snappers.grid}},il=ll,sl={start:function(a){var t=a.state,o=a.rect,i=a.edges,c=a.pageCoords,p=t.options,g=p.ratio,m=p.enabled,B=t.options,j=B.equalDelta,A=B.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=T({},c),t.startRect=T({},o),t.ratio=g,t.equalDelta=j;var Z=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var we=(Z.left?1:-1)*(Z.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:Z.left?-1:1,y:Z.top?-1:1};if(m!==!1&&T(i,Z),A!=null&&A.length){var Ue=new ya(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(A),t.subModification=Ue,Ue.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,i=a.coords,c=t.linkedEdges,p=T({},i),g=t.equalDelta?cl:ul;if(T(a.edges,c),g(t,t.xIsPrimaryAxis,i,o),!t.subModification)return null;var m=T({},o);Q(c,m,{x:i.x-p.x,y:i.y-p.y});var B=t.subModification.setAll(r(r({},a),{},{rect:m,edges:c,pageCoords:i,prevCoords:i,prevRect:m})),j=B.delta;return B.changed&&(g(t,Math.abs(j.x)>Math.abs(j.y),B.coords,B.rect),T(i,B.coords)),B.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function cl(a,t,o){var i=a.startCoords,c=a.edgeSign;t?o.y=i.y+(o.x-i.x)*c.y:o.x=i.x+(o.y-i.y)*c.x}function ul(a,t,o,i){var c=a.startRect,p=a.startCoords,g=a.ratio,m=a.edgeSign;if(t){var B=i.width/g;o.y=p.y+(B-c.height)*m.y}else{var j=i.height*g;o.x=p.x+(j-c.width)*m.x}}var dl=na(sl,"aspectRatio"),ko=function(){};ko._defaults={};var Sn=ko;function Xa(a,t,o){return x.func(a)?Qe(a,t.interactable,t.element,[o.x,o.y,t]):Qe(a,t.interactable,t.element)}var Tn={start:function(a){var t=a.rect,o=a.startOffset,i=a.state,c=a.interaction,p=a.pageCoords,g=i.options,m=g.elementRect,B=T({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&m){var j=Xa(g.restriction,c,p);if(j){var A=j.right-j.left-t.width,Z=j.bottom-j.top-t.height;A<0&&(B.left+=A,B.right+=A),Z<0&&(B.top+=Z,B.bottom+=Z)}B.left+=o.left-t.width*m.left,B.top+=o.top-t.height*m.top,B.right+=o.right-t.width*(1-m.right),B.bottom+=o.bottom-t.height*(1-m.bottom)}i.offset=B},set:function(a){var t=a.coords,o=a.interaction,i=a.state,c=i.options,p=i.offset,g=Xa(c.restriction,o,t);if(g){var m=function(B){return!B||"left"in B&&"top"in B||((B=T({},B)).left=B.x||0,B.top=B.y||0,B.right=B.right||B.left+B.width,B.bottom=B.bottom||B.top+B.height),B}(g);t.x=Math.max(Math.min(m.right-p.right,t.x),m.left+p.left),t.y=Math.max(Math.min(m.bottom-p.bottom,t.y),m.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},pl=na(Tn,"restrict"),xo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},wo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Co(a,t){for(var o=0,i=["top","left","bottom","right"];o<i.length;o++){var c=i[o];c in a||(a[c]=t[c])}return a}var fn={noInner:xo,noOuter:wo,start:function(a){var t,o=a.interaction,i=a.startOffset,c=a.state,p=c.options;p&&(t=Oe(Xa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(a){var t=a.coords,o=a.edges,i=a.interaction,c=a.state,p=c.offset,g=c.options;if(o){var m=T({},t),B=Xa(g.inner,i,m)||{},j=Xa(g.outer,i,m)||{};Co(B,xo),Co(j,wo),o.top?t.y=Math.min(Math.max(j.top+p.top,m.y),B.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,m.y),B.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,m.x),B.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,m.x),B.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},fl=na(fn,"restrictEdges"),hl=T({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Tn.defaults),vl=na({start:Tn.start,set:Tn.set,defaults:hl},"restrictRect"),gl={width:-1/0,height:-1/0},ml={width:1/0,height:1/0},yl=na({start:function(a){return fn.start(a)},set:function(a){var t=a.interaction,o=a.state,i=a.rect,c=a.edges,p=o.options;if(c){var g=le(Xa(p.min,t,a.coords))||gl,m=le(Xa(p.max,t,a.coords))||ml;o.options={endOnly:p.endOnly,inner:T({},fn.noInner),outer:T({},fn.noOuter)},c.top?(o.options.inner.top=i.bottom-g.height,o.options.outer.top=i.bottom-m.height):c.bottom&&(o.options.inner.bottom=i.top+g.height,o.options.outer.bottom=i.top+m.height),c.left?(o.options.inner.left=i.right-g.width,o.options.outer.left=i.right-m.width):c.right&&(o.options.inner.right=i.left+g.width,o.options.outer.right=i.left+m.width),fn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Xn={start:function(a){var t,o=a.interaction,i=a.interactable,c=a.element,p=a.rect,g=a.state,m=a.startOffset,B=g.options,j=B.offsetWithOrigin?function(we){var Ue=we.interaction.element,Le=Oe(Qe(we.state.options.origin,null,null,[Ue])),qe=Le||se(we.interactable,Ue,we.interaction.prepared.name);return qe}(a):{x:0,y:0};if(B.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var A=Qe(B.offset,i,c,[o]);(t=Oe(A)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Z=B.relativePoints;g.offsets=p&&Z&&Z.length?Z.map(function(we,Ue){return{index:Ue,relativePoint:we,x:m.left-p.width*we.x+t.x,y:m.top-p.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,i=a.state,c=i.options,p=i.offsets,g=se(t.interactable,t.element,t.prepared.name),m=T({},o),B=[];c.offsetWithOrigin||(m.x-=g.x,m.y-=g.y);for(var j=0,A=p;j<A.length;j++)for(var Z=A[j],we=m.x-Z.x,Ue=m.y-Z.y,Le=0,qe=c.targets.length;Le<qe;Le++){var it=c.targets[Le],rt=void 0;(rt=x.func(it)?it(we,Ue,t._proxy,Z,Le):it)&&B.push({x:(x.number(rt.x)?rt.x:we)+Z.x,y:(x.number(rt.y)?rt.y:Ue)+Z.y,range:x.number(rt.range)?rt.range:c.range,source:it,index:Le,offset:Z})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},St=0;St<B.length;St++){var Nt=B[St],xt=Nt.range,Tt=Nt.x-m.x,ta=Nt.y-m.y,Ut=ct(Tt,ta),la=Ut<=xt;xt===1/0&&mt.inRange&&mt.range!==1/0&&(la=!1),mt.target&&!(la?mt.inRange&&xt!==1/0?Ut/xt<mt.distance/mt.range:xt===1/0&&mt.range!==1/0||Ut<mt.distance:!mt.inRange&&Ut<mt.distance)||(mt.target=Nt,mt.distance=Ut,mt.range=xt,mt.inRange=la,mt.delta.x=Tt,mt.delta.y=ta)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),i.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},bl=na(Xn,"snap"),In={start:function(a){var t=a.state,o=a.edges,i=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Xn.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,i=a.coords,c=o.options,p=o.offsets,g={x:i.x-p[0].x,y:i.y-p[0].y};o.options=T({},c),o.options.targets=[];for(var m=0,B=c.targets||[];m<B.length;m++){var j=B[m],A=void 0;if(A=x.func(j)?j(g.x,g.y,t):j){for(var Z=0,we=o.targetFields;Z<we.length;Z++){var Ue=we[Z],Le=Ue[0],qe=Ue[1];if(Le in A||qe in A){A.x=A[Le],A.y=A[qe];break}}o.options.targets.push(A)}}var it=Xn.set(a);return o.options=c,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},kl=na(In,"snapSize"),Yn={aspectRatio:dl,restrictEdges:fl,restrict:pl,restrictRect:vl,restrictSize:yl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],In.start(a)):null},set:In.set,defaults:T(sa(In.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:bl,snapSize:kl,spring:Sn,avoid:Sn,transform:Sn,rubberband:Sn},xl={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(Ea),a.usePlugin(il),t.modifiers=Yn,Yn){var i=Yn[o],c=i._defaults,p=i._methods;c._methods=p,a.defaults.perAction[o]=c}}},wl=xl,Do=function(a){w(o,a);var t=G(o);function o(i,c,p,g,m,B){var j;if(u(this,o),E(F(j=t.call(this,m)),p),p!==c&&E(F(j),c),j.timeStamp=B,j.originalEvent=p,j.type=i,j.pointerId=S(c),j.pointerType=X(c),j.target=g,j.currentTarget=null,i==="tap"){var A=m.getPointerIndex(c);j.dt=j.timeStamp-m.pointers[A].downTime;var Z=j.timeStamp-m.tapTime;j.double=!!m.prevTap&&m.prevTap.type!=="doubletap"&&m.prevTap.target===j.target&&Z<500}else i==="doubletap"&&(j.dt=c.timeStamp-m.tapTime,j.double=!0);return j}return h(o,[{key:"_subtractOrigin",value:function(i){var c=i.x,p=i.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(i){var c=i.x,p=i.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(xe),hn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=hn,a.defaults.actions.pointerEvents=hn.defaults,T(a.actions.phaselessTypes,hn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,i=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&Jn(a),Oa({interaction:o,pointer:i,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,i){for(var c=o.interaction,p=o.pointer,g=o.event,m=o.eventTarget,B=o.pointerIndex,j=c.pointers[B].hold,A=ne(m),Z={interaction:c,pointer:p,event:g,eventTarget:m,type:"hold",targets:[],path:A,node:null},we=0;we<A.length;we++){var Ue=A[we];Z.node=Ue,i.fire("pointerEvents:collect-targets",Z)}if(Z.targets.length){for(var Le=1/0,qe=0,it=Z.targets;qe<it.length;qe++){var rt=it[qe].eventable.options.holdDuration;rt<Le&&(Le=rt)}j.duration=Le,j.timeout=setTimeout(function(){Oa({interaction:c,eventTarget:m,pointer:p,event:g,type:"hold"},i)},Le)}})(a,t),Oa(a,t)},"interactions:up":function(a,t){Jn(a),Oa(a,t),function(o,i){var c=o.interaction,p=o.pointer,g=o.event,m=o.eventTarget;c.pointerWasMoved||Oa({interaction:c,eventTarget:m,pointer:p,event:g,type:"tap"},i)}(a,t)},"interactions:cancel":function(a,t){Jn(a),Oa(a,t)}},PointerEvent:Do,fire:Oa,collectEventTargets:_o,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 Oa(a,t){var o=a.interaction,i=a.pointer,c=a.event,p=a.eventTarget,g=a.type,m=a.targets,B=m===void 0?_o(a,t):m,j=new Do(g,i,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var A={interaction:o,pointer:i,event:c,eventTarget:p,targets:B,type:g,pointerEvent:j},Z=0;Z<B.length;Z++){var we=B[Z];for(var Ue in we.props||{})j[Ue]=we.props[Ue];var Le=se(we.eventable,we.node);if(j._subtractOrigin(Le),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(Le),j.immediatePropagationStopped||j.propagationStopped&&Z+1<B.length&&B[Z+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",A),g==="tap"){var qe=j.double?Oa({interaction:o,pointer:i,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=qe,o.tapTime=qe.timeStamp}return j}function _o(a,t){var o=a.interaction,i=a.pointer,c=a.event,p=a.eventTarget,g=a.type,m=o.getPointerIndex(i),B=o.pointers[m];if(g==="tap"&&(o.pointerWasMoved||!B||B.downTarget!==p))return[];for(var j=ne(p),A={interaction:o,pointer:i,event:c,eventTarget:p,type:g,path:j,targets:[],node:null},Z=0;Z<j.length;Z++){var we=j[Z];A.node=we,t.fire("pointerEvents:collect-targets",A)}return g==="hold"&&(A.targets=A.targets.filter(function(Ue){var Le,qe;return Ue.eventable.options.holdDuration===((Le=o.pointers[m])==null||(qe=Le.hold)==null?void 0:qe.duration)})),A.targets}function Jn(a){var t=a.interaction,o=a.pointerIndex,i=t.pointers[o].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var Cl=Object.freeze({__proto__:null,default:hn});function Dl(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var _l={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(hn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Dl,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,i=a.pointerEvent,c=a.eventTarget,p=a.targets;if(i.type==="hold"&&p.length){var g=p[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:i,event:i},t)},g))}}})},El=_l,Sl={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(i){return T(this.events.options,i),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,c){var p=o.call(this,i,c);return p===this&&(this.events.options[i]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,i=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(i,function(g){var m=g.events,B=m.options;m.types[c]&&m.types[c].length&&g.testIgnoreAllow(B,i,p)&&o.push({node:i,eventable:m,props:{interactable:g}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,i=a.options;T(o.events.options,t.pointerEvents.defaults),T(o.events.options,i.pointerEvents||{})}}},Tl=Sl,Il={id:"pointer-events",install:function(a){a.usePlugin(Cl),a.usePlugin(El),a.usePlugin(Tl)}},Bl=Il,Nl={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(i,c,p){for(var g=i.getAllElements(),m=p.window.Promise,B=m?[]:null,j=function(){var Z=g[A],we=i.getRect(Z);if(!we)return 1;var Ue,Le=Ie(p.interactions.list,function(rt){return rt.interacting()&&rt.interactable===i&&rt.element===Z&&rt.prepared.name===c.name});if(Le)Le.move(),B&&(Ue=Le._reflowPromise||new m(function(rt){Le._reflowResolve=rt}));else{var qe=le(we),it=function(rt){return{coords:rt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:p.now()});Ue=function(rt,mt,St,Nt,xt){var Tt=rt.interactions.new({pointerType:"reflow"}),ta={interaction:Tt,event:xt,pointer:xt,eventTarget:St,phase:"reflow"};Tt.interactable=mt,Tt.element=St,Tt.prevEvent=xt,Tt.updatePointer(xt,xt,St,!0),Y(Tt.coords.delta),gt(Tt.prepared,Nt),Tt._doPhase(ta);var Ut=rt.window,la=Ut.Promise,da=la?new la(function(ka){Tt._reflowResolve=ka}):void 0;return Tt._reflowPromise=da,Tt.start(Nt,mt,St),Tt._interacting?(Tt.move(ta),Tt.end(xt)):(Tt.stop(),Tt._reflowResolve()),Tt.removePointer(xt,xt),da}(p,i,Z,c,it)}B&&B.push(Ue)},A=0;A<g.length&&!j();A++);return B&&m.all(B).then(function(){return i})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(i,c){i.splice(i.indexOf(c),1)}(t.interactions.list,o))}}},Al=Nl;if(ea.use(_a),ea.use(qt),ea.use(Bl),ea.use(Xt),ea.use(wl),ea.use(Fa),ea.use(_),ea.use(ht),ea.use(Al),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(bn,bn.exports)),bn.exports}var vp=hp();const qo=Ve.getDefaultExportFromCjs(vp),Hn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:l,emit:s}){const r=n,d=s,u=e.inject(Rr),b=e.inject(Fr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let w=!1,k=!1,O=NaN,F=NaN,G=NaN,M=NaN,Ce=-1,K=-1,L=-1,ee=-1,C=r.x,R=r.y,y=r.w,I=r.h;const x=e.ref(),fe=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:x,calcXY:Qe});function Fe(D){Te(D)}function st(){Ge()}function _e(D){ia(r.isDraggable)&&(f.draggable=D)}function Ke(D){ia(r.isResizable)&&(f.resizable=D)}function We(D){ia(r.isBounded)&&(f.bounded=D)}function z(D){f.transformScale=D}function ce(D){f.rowHeight=D}function re(D){f.maxRows=D}function he(){f.rtl=Wo()==="rtl",Ge()}function Xe(D){f.cols=Math.floor(D)}u.increaseItem(fe),e.onBeforeMount(()=>{f.rtl=Wo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Ur(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,ia(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,ia(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,ia(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{C=r.x,R=r.y,I=r.h,y=r.w,aa(tt)}),b.on("updateWidth",Fe),b.on("compact",st),b.on("setDraggable",_e),b.on("setResizable",Ke),b.on("setBounded",We),b.on("setTransformScale",z),b.on("setRowHeight",ce),b.on("setMaxRows",re),b.on("directionchange",he),b.on("setColNum",Xe)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Fe),b.off("compact",st),b.off("setDraggable",_e),b.off("setResizable",Ke),b.off("setBounded",We),b.off("setTransformScale",z),b.off("setRowHeight",ce),b.off("setMaxRows",re),b.off("directionchange",he),b.off("setColNum",Xe),h.value&&(h.value.unset(),h.value=null),u.decreaseItem(fe)}),l({state:f,wrapper:x});const at=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,H=e.computed(()=>f.resizable&&!r.static),V=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ie=e.computed(()=>(f.draggable||f.resizable)&&!r.static),ve=lp("item"),Pe=e.computed(()=>({[ve.b()]:!0,[ve.bm("resizable")]:H.value,[ve.bm("static")]:r.static,[ve.bm("resizing")]:f.isResizing,[ve.bm("dragging")]:f.isDragging,[ve.bm("transform")]:f.useCssTransforms,[ve.bm("rtl")]:V.value,[ve.bm("no-touch")]:at&&ie.value})),Re=e.computed(()=>[ve.be("resizer"),V.value&&ve.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,D=>{f.draggable=D}),e.watch(()=>r.static,()=>{aa(E),aa(Y)}),e.watch(()=>f.draggable,()=>{aa(E)}),e.watch(()=>r.isResizable,D=>{f.resizable=D}),e.watch(()=>r.isBounded,D=>{f.bounded=D}),e.watch(()=>f.resizable,()=>{aa(Y)}),e.watch(()=>f.rowHeight,()=>{aa(tt),aa(ne)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(Y),aa(tt),aa(ne)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(Y)}),e.watch(V,()=>{aa(Y),aa(tt)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const D=u.margin;!D||D[0]===f.margin[0]&&D[1]===f.margin[1]||(f.margin=D.map(Number),aa(tt),aa(ne))});function tt(){r.x+r.w>f.cols?(C=0,y=r.w>f.cols?f.cols:r.w):(C=r.x,y=r.w);const D=Ze(C,R,y,I);f.isDragging&&(D.top=f.dragging.top,V.value?D.right=f.dragging.left:D.left=f.dragging.left),f.isResizing&&(D.width=f.resizing.width,D.height=f.resizing.height);let oe;f.useCssTransforms?V.value?oe=ap(D.top,D.right,D.width,D.height):oe=tp(D.top,D.left,D.width,D.height):V.value?oe=op(D.top,D.right,D.width,D.height):oe=np(D.top,D.left,D.width,D.height),f.style=oe}function ne(){const D={};for(const oe of["width","height"]){const ze=f.style[oe].match(/^(\d+)px$/);if(!ze)return;D[oe]=ze[1]}d("container-resized",r.i,r.h,r.w,D.height,D.width)}function Se(D){if(r.static)return;const oe=D.type;if(oe==="resizestart"&&f.isResizing||oe!=="resizestart"&&!f.isResizing)return;const ze=Uo(D);if(ia(ze))return;const{x:S,y:J}=ze,P={width:0,height:0};let W;switch(oe){case"resizestart":{Y(),Ce=y,K=I,W=Ze(C,R,y,I),P.width=W.width,P.height=W.height,f.resizing=P,f.isResizing=!0;break}case"resizemove":{!D.edges.right&&!D.edges.left&&(G=S),!D.edges.top&&!D.edges.bottom&&(M=J);const De=Ko(G,M,S,J);V.value?P.width=f.resizing.width-De.deltaX/f.transformScale:P.width=f.resizing.width+De.deltaX/f.transformScale,P.height=f.resizing.height+De.deltaY/f.transformScale,f.resizing=P;break}case"resizeend":{W=Ze(C,R,y,I),P.width=W.width,P.height=W.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}W=se(P.height,P.width),W.w<r.minW&&(W.w=r.minW),W.w>r.maxW&&(W.w=r.maxW),W.h<r.minH&&(W.h=r.minH),W.h>r.maxH&&(W.h=r.maxH),W.h<1&&(W.h=1),W.w<1&&(W.w=1),G=S,M=J,(y!==W.w||I!==W.h)&&d("resize",r.i,W.h,W.w,P.height,P.width),D.type==="resizeend"&&(Ce!==y||K!==I)&&d("resized",r.i,W.h,W.w,P.height,P.width),b.emit("resizeEvent",D.type,r.i,C,R,W.h,W.w)}function T(D){if(r.static||f.isResizing)return;const oe=D.type;if(oe==="dragstart"&&f.isDragging||oe!=="dragstart"&&!f.isDragging)return;const ze=Uo(D);if(ia(ze))return;const{x:S,y:J}=ze,P=D.target;if(!P.offsetParent)return;const W={top:0,left:0};switch(oe){case"dragstart":{L=C,ee=R;const ae=P.offsetParent.getBoundingClientRect(),q=P.getBoundingClientRect(),X=q.left/f.transformScale,de=ae.left/f.transformScale,xe=q.right/f.transformScale,be=ae.right/f.transformScale,ke=q.top/f.transformScale,$=ae.top/f.transformScale;V.value?W.left=(xe-be)*-1:W.left=X-de,W.top=ke-$,f.dragging=W,f.isDragging=!0;break}case"dragmove":{const ae=Ko(O,F,S,J);if(V.value?W.left=f.dragging.left-ae.deltaX/f.transformScale:W.left=f.dragging.left+ae.deltaX/f.transformScale,W.top=f.dragging.top+ae.deltaY/f.transformScale,f.bounded){const q=P.offsetParent.clientHeight-le(r.h,f.rowHeight,f.margin[1]);W.top=Q(W.top,0,q);const X=Oe(),de=f.containerWidth-le(r.w,X,f.margin[0]);W.left=Q(W.left,0,de)}f.dragging=W;break}case"dragend":{const ae=P.offsetParent.getBoundingClientRect(),q=P.getBoundingClientRect(),X=q.left/f.transformScale,de=ae.left/f.transformScale,xe=q.right/f.transformScale,be=ae.right/f.transformScale,ke=q.top/f.transformScale,$=ae.top/f.transformScale;V.value?W.left=(xe-be)*-1:W.left=X-de,W.top=ke-$,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let De;V.value,De=Qe(W.top,W.left),O=S,F=J,(C!==De.x||R!==De.y)&&d("move",r.i,De.x,De.y),D.type==="dragend"&&(L!==C||ee!==R)&&d("moved",r.i,De.x,De.y),b.emit("dragEvent",D.type,r.i,De.x,De.y,I,y)}function Ze(D,oe,ze,S){const J=Oe();let P;return V.value?P={right:Math.round(J*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:ze===1/0?ze:Math.round(J*ze+Math.max(0,ze-1)*f.margin[0]),height:S===1/0?S:Math.round(f.rowHeight*S+Math.max(0,S-1)*f.margin[1])}:P={left:Math.round(J*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:ze===1/0?ze:Math.round(J*ze+Math.max(0,ze-1)*f.margin[0]),height:S===1/0?S:Math.round(f.rowHeight*S+Math.max(0,S-1)*f.margin[1])},P}function Qe(D,oe){const ze=Oe();let S=Math.round((oe-f.margin[0])/(ze+f.margin[0])),J=Math.round((D-f.margin[1])/(f.rowHeight+f.margin[1]));return S=Math.max(Math.min(S,f.cols-y),0),J=Math.max(Math.min(J,f.maxRows-I),0),{x:S,y:J}}function Oe(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function le(D,oe,ze){return Number.isFinite(D)?Math.round(oe*D+Math.max(0,D-1)*ze):D}function Q(D,oe,ze){return Math.max(Math.min(D,ze),oe)}function se(D,oe,ze=!1){const S=Oe();let J=Math.round((oe+f.margin[0])/(S+f.margin[0])),P=0;return ze?P=Math.ceil((D+f.margin[1])/(f.rowHeight+f.margin[1])):P=Math.round((D+f.margin[1])/(f.rowHeight+f.margin[1])),J=Math.max(Math.min(J,f.cols-C),0),P=Math.max(Math.min(P,f.maxRows-R),0),{w:J,h:P}}function Te(D,oe){f.containerWidth=D}function Ge(){tt()}function ct(){!h.value&&x.value&&(h.value=qo(x.value),f.useStyleCursor||h.value.styleCursor(!1))}const v=Po(T);function E(){if(ct(),!!h.value)if(f.draggable&&!r.static){const D={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};h.value.draggable(D),w||(w=!0,h.value.on("dragstart dragmove dragend",oe=>{oe.type==="dragmove"?v(oe):T(oe)}))}else h.value.draggable({enabled:!1})}const U=Po(Se);function Y(){if(ct(),!!h.value)if(f.resizable&&!r.static){const D=Ze(0,0,r.maxW,r.maxH),oe=Ze(0,0,r.minW,r.minH),ze={edges:{left:V.value?`.${Re.value[0]}`:!1,right:V.value?!1:`.${Re.value[0]}`,bottom:`.${Re.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:oe.height*f.transformScale,width:oe.width*f.transformScale},max:{height:D.height*f.transformScale,width:D.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(ze.modifiers=[qo.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(ze),k||(k=!0,h.value.on("resizestart resizemove resizeend",S=>{S.type==="resizemove"?U(S):Se(S)}))}else h.value.resizable({enabled:!1})}return(D,oe)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:x,class:e.normalizeClass(Pe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(D.$slots,"default"),H.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Re.value)},null,2)):e.createCommentVNode("",!0)],6))}}),tn=typeof window<"u";var Go;tn&&(Go=window==null?void 0:window.navigator)!=null&&Go.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Xo(n){return n!=null}function Yo(){}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)));const mp=tn&&("ontouchstart"in window||bp()>0),yp=mp?"pointerdown":"click";function bp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function kp(n,l,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=l;if(!Xo(r)||r==="")return!1;let h;return Xo(s)?h=new s(r,{bubbles:d,cancelable:u}):(h=document.createEvent("HTMLEvents"),h.initEvent(r,d,u)),Object.assign(h,b),n.dispatchEvent(h)}const xp="clickoutside",wp=new Set;tn&&document.addEventListener(yp,n=>{const l=n.target,s=n.composedPath&&n.composedPath();wp.forEach(r=>{r!==l&&(s?!s.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&kp(r,{type:xp})})},!0);const Cp=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Rn;if(tn){for(const n of Cp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const Dp=new Set,_p=new WeakMap;if(tn&&Rn){const n=Rn[2],l=Rn[4];document.addEventListener(l,()=>{if(Dp.forEach(s=>{s.value=!1}),document[n]){const s=_p.get(document[n]);s&&(s.value=!0)}},!1)}const Wr=new Map;Wr.set("x",0);Wr.set("y",0);var Za=[],Ep=function(){return Za.some(function(n){return n.activeTargets.length>0})},Sp=function(){return Za.some(function(n){return n.skippedTargets.length>0})},Jo="ResizeObserver loop completed with undelivered notifications.",Tp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:Jo}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=Jo),window.dispatchEvent(n)},Dn;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Dn||(Dn={}));var Qa=function(n){return Object.freeze(n)},Ip=function(){function n(l,s){this.inlineSize=l,this.blockSize=s,Qa(this)}return n}(),Hr=function(){function n(l,s,r,d){return this.x=l,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Qa(this)}return n.prototype.toJSON=function(){var l=this,s=l.x,r=l.y,d=l.top,u=l.right,b=l.bottom,h=l.left,f=l.width,w=l.height;return{x:s,y:r,top:d,right:u,bottom:b,left:h,width:f,height:w}},n.fromRect=function(l){return new n(l.x,l.y,l.width,l.height)},n}(),mo=function(n){return n instanceof SVGElement&&"getBBox"in n},qr=function(n){if(mo(n)){var l=n.getBBox(),s=l.width,r=l.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},Zo=function(n){var l;if(n instanceof Element)return!0;var s=(l=n==null?void 0:n.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(s&&n instanceof s.Element)},Bp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},On=new WeakMap,Qo=/auto|scroll/,Np=/^tb|vertical/,Ap=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),va=function(n){return parseFloat(n||"0")},un=function(n,l,s){return n===void 0&&(n=0),l===void 0&&(l=0),s===void 0&&(s=!1),new Ip((s?l:n)||0,(s?n:l)||0)},er=Qa({devicePixelContentBoxSize:un(),borderBoxSize:un(),contentBoxSize:un(),contentRect:new Hr(0,0,0,0)}),Gr=function(n,l){if(l===void 0&&(l=!1),On.has(n)&&!l)return On.get(n);if(qr(n))return On.set(n,er),er;var s=getComputedStyle(n),r=mo(n)&&n.ownerSVGElement&&n.getBBox(),d=!Ap&&s.boxSizing==="border-box",u=Np.test(s.writingMode||""),b=!r&&Qo.test(s.overflowY||""),h=!r&&Qo.test(s.overflowX||""),f=r?0:va(s.paddingTop),w=r?0:va(s.paddingRight),k=r?0:va(s.paddingBottom),O=r?0:va(s.paddingLeft),F=r?0:va(s.borderTopWidth),G=r?0:va(s.borderRightWidth),M=r?0:va(s.borderBottomWidth),Ce=r?0:va(s.borderLeftWidth),K=O+w,L=f+k,ee=Ce+G,C=F+M,R=h?n.offsetHeight-C-n.clientHeight:0,y=b?n.offsetWidth-ee-n.clientWidth:0,I=d?K+ee:0,x=d?L+C:0,fe=r?r.width:va(s.width)-I-y,Fe=r?r.height:va(s.height)-x-R,st=fe+K+y+ee,_e=Fe+L+R+C,Ke=Qa({devicePixelContentBoxSize:un(Math.round(fe*devicePixelRatio),Math.round(Fe*devicePixelRatio),u),borderBoxSize:un(st,_e,u),contentBoxSize:un(fe,Fe,u),contentRect:new Hr(O,f,fe,Fe)});return On.set(n,Ke),Ke},Xr=function(n,l,s){var r=Gr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(l){case Dn.DEVICE_PIXEL_CONTENT_BOX:return b;case Dn.BORDER_BOX:return d;default:return u}},Op=function(){function n(l){var s=Gr(l);this.target=l,this.contentRect=s.contentRect,this.borderBoxSize=Qa([s.borderBoxSize]),this.contentBoxSize=Qa([s.contentBoxSize]),this.devicePixelContentBoxSize=Qa([s.devicePixelContentBoxSize])}return n}(),Yr=function(n){if(qr(n))return 1/0;for(var l=0,s=n.parentNode;s;)l+=1,s=s.parentNode;return l},Vp=function(){var n=1/0,l=[];Za.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(h){var f=new Op(h.target),w=Yr(h.target);b.push(f),h.lastReportedSize=Xr(h.target,h.observedBox),w<n&&(n=w)}),l.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=l;s<r.length;s++){var d=r[s];d()}return n},tr=function(n){Za.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(s){s.isActive()&&(Yr(s.target)>n?l.activeTargets.push(s):l.skippedTargets.push(s))})})},Mp=function(){var n=0;for(tr(n);Ep();)n=Vp(),tr(n);return Sp()&&Tp(),n>0},ao,Jr=[],zp=function(){return Jr.splice(0).forEach(function(n){return n()})},Rp=function(n){if(!ao){var l=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return zp()}).observe(s,r),ao=function(){s.textContent="".concat(l?l--:l++)}}Jr.push(n),ao()},Fp=function(n){Rp(function(){requestAnimationFrame(n)})},Fn=0,Lp=function(){return!!Fn},Pp=250,$p={attributes:!0,characterData:!0,childList:!0,subtree:!0},ar=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nr=function(n){return n===void 0&&(n=0),Date.now()+n},no=!1,jp=function(){function n(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return n.prototype.run=function(l){var s=this;if(l===void 0&&(l=Pp),!no){no=!0;var r=nr(l);Fp(function(){var d=!1;try{d=Mp()}finally{if(no=!1,l=r-nr(),!Lp())return;d?s.run(1e3):l>0?s.run(l):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var l=this,s=function(){return l.observer&&l.observer.observe(document.body,$p)};document.body?s():Cn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ar.forEach(function(s){return Cn.addEventListener(s,l.listener,!0)}))},n.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),ar.forEach(function(s){return Cn.removeEventListener(s,l.listener,!0)}),this.stopped=!0)},n}(),uo=new jp,or=function(n){!Fn&&n>0&&uo.start(),Fn+=n,!Fn&&uo.stop()},Up=function(n){return!mo(n)&&!Bp(n)&&getComputedStyle(n).display==="inline"},Kp=function(){function n(l,s){this.target=l,this.observedBox=s||Dn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var l=Xr(this.target,this.observedBox,!0);return Up(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},n}(),Wp=function(){function n(l,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=s}return n}(),Vn=new WeakMap,rr=function(n,l){for(var s=0;s<n.length;s+=1)if(n[s].target===l)return s;return-1},Mn=function(){function n(){}return n.connect=function(l,s){var r=new Wp(l,s);Vn.set(l,r)},n.observe=function(l,s,r){var d=Vn.get(l),u=d.observationTargets.length===0;rr(d.observationTargets,s)<0&&(u&&Za.push(d),d.observationTargets.push(new Kp(s,r&&r.box)),or(1),uo.schedule())},n.unobserve=function(l,s){var r=Vn.get(l),d=rr(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&Za.splice(Za.indexOf(r),1),r.observationTargets.splice(d,1),or(-1))},n.disconnect=function(l){var s=this,r=Vn.get(l);r.observationTargets.slice().forEach(function(d){return s.unobserve(l,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Hp=function(){function n(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Mn.connect(this,l)}return n.prototype.observe=function(l,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Zo(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Mn.observe(this,l,s)},n.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Zo(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Mn.unobserve(this,l)},n.prototype.disconnect=function(){Mn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const qn=new WeakMap;function qp(n){var l;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=qn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:h}=((l=d.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:w}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:w,width:b??f,height:h??w}))}}}const Zr=new(tn&&window.ResizeObserver||Hp)(qp);function lr(n,l){qn.set(n,l),Zr.observe(n)}function ir(n){qn.has(n)&&(Zr.unobserve(n),qn.delete(n))}function Gp(n={}){let l=Yo;const s=e.watch(()=>e.unref(n.target),d=>{l(),!(!d||typeof n.onResize!="function")&&(lr(d,n.onResize),l=()=>{ir(d),l=Yo})},{immediate:!0}),r=()=>{s(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:lr,unobserveResize:ir,unobserve:r}}const Xp=e.ref(!1);e.computed(()=>Xp.value);const sr="__theme_style__",oo="__theme_observer__",cr=e.reactive(new Map),ur=new Map;e.watch(cr,()=>{if(!tn)return;ur.clear();const n=document.head.querySelector(`#${sr}`);n&&document.head.removeChild(n);const l=document.createElement("style");let s=`.${oo} { width: 1px }`,r=1;for(const[d,[u,b]]of cr.entries())s+=` html.${u} .${oo}, .${b} .${oo} { width: ${++r}px }`,ur.set(r,d);l.textContent=s,l.id=sr,document.head.appendChild(l)});const Qr=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:l,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,h=e.ref(r.layout),f=e.ref(),{observeResize:w,unobserveResize:k}=Gp(),O=Gd();O.on("resizeEvent",F),O.on("dragEvent",G),e.onBeforeMount(()=>{d("layout-before-mount",h.value)}),e.onMounted(()=>{d("layout-mounted",h.value),e.nextTick(()=>{rp(h.value),u.originalLayout=h.value,e.nextTick(()=>{Fe(),f.value&&w(f.value,Xd(C,16)),ln(h.value,r.verticalCompact),d("layout-updated",h.value),ee(),C()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&k(f.value)});function F(_e,Ke,We,z,ce,re){x(_e,Ke,We,z,ce,re)}function G(_e,Ke,We,z,ce,re){I(_e,Ke,We,z,ce,re)}e.watch(()=>u.width,(_e,Ke)=>{e.nextTick(()=>{O.emit("updateWidth",_e),Ke===-1&&e.nextTick(()=>{d("layout-ready",h.value)}),ee()})}),e.watch(()=>[r.layout,r.layout.length],()=>{h.value=r.layout,L()}),e.watch(()=>r.colNum,_e=>{O.emit("setColNum",_e)}),e.watch(()=>r.rowHeight,_e=>{O.emit("setRowHeight",_e)}),e.watch(()=>r.isDraggable,_e=>{O.emit("setDraggable",_e)}),e.watch(()=>r.isResizable,_e=>{O.emit("setResizable",_e)}),e.watch(()=>r.isBounded,_e=>{O.emit("setBounded",_e)}),e.watch(()=>r.transformScale,_e=>{O.emit("setTransformScale",_e)}),e.watch(()=>r.responsive,_e=>{_e||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),C()}),e.watch(()=>r.maxRows,_e=>{O.emit("setMaxRows",_e)}),e.watch([()=>r.margin,()=>r.margin[1]],ee),e.provide(Rr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:Ce})),e.provide(Fr,O),l({state:u,getItem:K,resizeEvent:x,dragEvent:I,layoutUpdate:L});function M(_e){b.set(_e.i,_e)}function Ce(_e){b.delete(_e.i)}function K(_e){return b.get(_e)}function L(){if(!ia(h.value)&&!ia(u.originalLayout)){if(h.value.length!==u.originalLayout.length){const _e=st(h.value,u.originalLayout);if(_e.length>0)if(h.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(_e);else{const Ke=new Set(_e.map(We=>We.i));u.originalLayout=u.originalLayout.filter(We=>!Ke.has(We.i))}u.lastLayoutLength=h.value.length,Fe()}ln(h.value,r.verticalCompact),O.emit("updateWidth",u.width),ee(),d("layout-updated",h.value)}}function ee(){u.mergedStyle={height:R()}}function C(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function R(){if(!r.autoSize)return;const _e=parseFloat(r.margin[1]);return Jd(h.value)*(r.rowHeight+_e)+_e+"px"}let y;function I(_e,Ke,We,z,ce,re){let he=$o(h.value,Ke);ia(he)&&(he={h:0,w:0,x:0,y:0,i:""}),_e==="dragstart"&&!r.verticalCompact&&(y=h.value.reduce((Xe,{i:at,x:H,y:V})=>({...Xe,[at]:{x:H,y:V}}),{})),_e==="dragmove"||_e==="dragstart"?(u.placeholder.i=Ke,u.placeholder.x=he.x,u.placeholder.y=he.y,u.placeholder.w=re,u.placeholder.h=ce,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),h.value=co(h.value,he,We,z,!0,r.preventCollision),r.restoreOnDrag?(he.static=!0,ln(h.value,r.verticalCompact,y),he.static=!1):ln(h.value,r.verticalCompact),O.emit("compact"),ee(),_e==="dragend"&&(y=void 0,d("layout-updated",h.value))}function x(_e,Ke,We,z,ce,re){let he=$o(h.value,Ke);ia(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Xe;if(r.preventCollision){const at=Pr(h.value,{...he,w:re,h:ce}).filter(H=>H.i!==he.i);if(Xe=at.length>0,Xe){let H=1/0,V=1/0;at.forEach(ie=>{ie.x>he.x&&(H=Math.min(H,ie.x)),ie.y>he.y&&(V=Math.min(V,ie.y))}),Number.isFinite(H)&&(he.w=H-he.x),Number.isFinite(V)&&(he.h=V-he.y)}}Xe||(he.w=re,he.h=ce),_e==="resizestart"||_e==="resizemove"?(u.placeholder.i=Ke,u.placeholder.x=We,u.placeholder.y=z,u.placeholder.w=he.w,u.placeholder.h=he.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):_e&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&fe(),ln(h.value,r.verticalCompact),O.emit("compact"),ee(),_e==="resizeend"&&d("layout-updated",h.value)}function fe(){const _e=cp(r.breakpoints,u.width);if(_e===u.lastBreakpoint)return;const Ke=Ur(_e,r.cols);!ia(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=so(h.value));const We=up(u.originalLayout,u.layouts,r.breakpoints,_e,u.lastBreakpoint,Ke,r.verticalCompact);u.layouts[_e]=We,u.lastBreakpoint!==_e&&d("breakpoint-changed",_e,We),h.value=We,d("update:layout",We),u.lastBreakpoint=_e,O.emit("setColNum",Ke)}function Fe(){u.layouts=Object.assign({},r.responsiveLayouts)}function st(_e,Ke){const We=new Set(Ke.map(he=>he.i)),z=new Set(_e.map(he=>he.i)),ce=_e.filter(he=>!We.has(he.i)),re=Ke.filter(he=>!z.has(he.i));return ce.concat(re)}return(_e,Ke)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[_e.$slots.default?e.renderSlot(_e.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,We=>(e.openBlock(),e.createBlock(Hn,e.mergeProps({key:We.i,ref_for:!0},We),{default:e.withCtx(()=>[e.renderSlot(_e.$slots,"item",{item:We})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Hn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const Yp={key:0,class:"item-view-group"},Jp={key:0,class:"item-view-group"},Zp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:l}){const s=N.useModelComp(te.pinia),{isEdit:r}=te.storeToRefs(s),d=l,u=n,b=e.computed(()=>u==null?void 0:u.children),h=e.computed(()=>{var F,G,M,Ce;return((F=u==null?void 0:u.children)==null?void 0:F.length)>0&&((G=u==null?void 0:u.children)!=null&&G.every(K=>K==null?void 0:K.layout))?(Ce=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:Ce.layout:"vertical"}),f=e.computed(()=>{var F,G;return((G=(F=u==null?void 0:u.children)==null?void 0:F[0])==null?void 0:G.isGridLayout)||!1}),w=e.ref((u==null?void 0:u.level)+1),k=F=>{d("rowClick",F)},O=(F,G)=>{d("routeUrl",F,G)};return(F,G)=>f.value?(e.openBlock(),e.createBlock(e.unref(Qr),{key:0,layout:b.value,"onUpdate:layout":G[0]||(G[0]=M=>b.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(M,Ce)=>(e.openBlock(),e.createBlock(e.unref(Hn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var K,L,ee,C,R,y,I,x,fe,Fe,st,_e,Ke;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Ce===((K=u==null?void 0:u.children)==null?void 0:K.length)-1?"0px":"24px"})},[((ee=(L=M==null?void 0:M.component)==null?void 0:L.comp)==null?void 0:ee.toUpperCase())!=="TABLE"&&((C=M==null?void 0:M.component)!=null&&C.name)?(e.openBlock(),e.createElementBlock("div",Yp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(w.value.toString())-1)*12+"px",fontWeight:600-(w.value-1)*100>=400?600-(w.value-1)*100:400,fontSize:17-w.value>=14?17-w.value+"px":"14px"})},e.toDisplayString((R=M==null?void 0:M.component)==null?void 0:R.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(jn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:h.value,config:{showIndex:(I=e.unref(jt)[Ce])==null?void 0:I.showIndex,allowMove:(x=e.unref(jt)[Ce])==null?void 0:x.allowMove,viewport:(fe=e.unref(jt)[Ce])==null?void 0:fe.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(Ir),itemData:(Fe=M==null?void 0:M.component)==null?void 0:Fe.compData,childItemData:(st=M==null?void 0:M.component)==null?void 0:st.itemChildData,key:e.unref(dn),cacheNewData:e.unref(kn),onChange:e.unref(Un),index:(M==null?void 0:M.id)??Ce,onContentChange:e.unref(Kn),onPageChange:e.unref(Wn),parentTableId:(_e=M==null?void 0:M.component)==null?void 0:_e.tableId,allMapContents:e.unref(io),children:(Ke=M==null?void 0:M.component)==null?void 0:Ke.children,level:w.value,onRowClick:k,onRouteUrl:O,onClickTrigger:e.unref(Br),onClickMainKey:e.unref(Nr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,Ce)=>{var K,L;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(Ce)===((K=u==null?void 0:u.children)==null?void 0:K.length)-1?"0px":"24px"})},[((L=M==null?void 0:M.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Jp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(w.value.toString())>1?"12px":"0px",fontWeight:600-(w.value-1)*100>=400?600-(w.value-1)*100:400,fontSize:17-w.value>=14?17-w.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(jn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(dn),onChange:e.unref(Un),index:(M==null?void 0:M.id)??Ce,onContentChange:e.unref(Kn),onPageChange:e.unref(Wn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(io),children:M==null?void 0:M.children,level:w.value,onRowClick:k,onRouteUrl:O},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Qp=Pt._export_sfc(Zp,[["__scopeId","data-v-e672653d"]]),el=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:mn.ssTable,FORM:Ao,TABLEOPERATE:ns,TABLESTYLE:bs,TABLEEXTEND:xs,TABLEINTERACTION:Ds,FORMOPERATE:Oo,FOLD:ec,CALCULATOR:lc,METHODBUTTON:cc,AVATARUPLOAD:Io.ssAvatar,SIGNATURE:Io.ssSignature,FORMTOP:Ao,STEP:xc,STEPOPERATE:Ws,TIMELINE:Sc,TIMELINEOPERATE:Js,FORMTOPOPERATE:Oo,SIGNATUREOPERATE:yc,AVATARUPLOADOPERATE:pc,TABS:Bc,TABSOPERATE:vu,CHART:Iu,CHARTOPERATE:Pu,LAYOUT:zd,LAYOUTOPERATE:Wd,PARENTITEM:Qp};function an(n){return ef[n==null?void 0:n.toUpperCase()]||null}exports.De=Qr;exports._sfc_main=Cr;exports.activeStepInfo=sn;exports.affixItems=xd;exports.allMapContents=io;exports.analyzeSplitToContent=wr;exports.analyzerStringToArray=$u;exports.cacheNewData=kn;exports.clickMainKey=Nr;exports.clickSavePage=kd;exports.clickStep=Or;exports.clickTrigger=Br;exports.compId=dn;exports.compNames=Ir;exports.compShow=$n;exports.existLayouts=Sd;exports.generateLayouts=vs;exports.getComponent=an;exports.getComponents=jn;exports.getSliceContLength=Nd;exports.gridRowHeight=us;exports.isStepLayout=go;exports.onBack=md;exports.onChange=Un;exports.onClick=bd;exports.onContentChange=Kn;exports.onExtendTaskEnd=Ed;exports.onPageBack=Td;exports.onPageChange=Wn;exports.onSelectFixContent=gd;exports.prefixSum=Uu;exports.renderShowItems=Sr;exports.same=ju;exports.selectFilterItem=lo;exports.setComponent=_r;exports.showItems=jt;exports.sliceTableLength=Tr;exports.slotContent=el;exports.ssMenu=Pn;exports.st=Hn;exports.stepItems=Ad;exports.toolBar=yn;exports.verifyButton=Id;