ss-component-new 1.3.74 → 1.3.76

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 (125) hide show
  1. package/dist/{MTLLoader-BmVWiY_L.cjs → MTLLoader-D1uo8mcW.cjs} +1 -1
  2. package/dist/{MTLLoader-BnW0QbvD.js → MTLLoader-DYLUvPra.js} +43 -43
  3. package/dist/{OrbitControls-DT_fJft5.cjs → OrbitControls-B4mz4dJ8.cjs} +1 -1
  4. package/dist/{OrbitControls-aj7APKeL.js → OrbitControls-Cd9ZVfIV.js} +1 -1
  5. package/dist/{URDFLoader-DwZ7u4OY.js → URDFLoader-BfRhERaC.js} +195 -195
  6. package/dist/{URDFLoader-DJRlNIJX.cjs → URDFLoader-BnH2w4x6.cjs} +1 -1
  7. package/dist/{animationData-CjkMBYd2.js → animationData-CO_7EKV4.js} +12 -12
  8. package/dist/{animationData-G7GPUUPU.cjs → animationData-CjVloDDN.cjs} +1 -1
  9. package/dist/array-DtmeNOPn.cjs +1 -0
  10. package/dist/{array-sJwvZynh.js → array-Xb-5MHCa.js} +19 -18
  11. package/dist/{iconfont-CKL4t_qj.js → iconfont-CD3omIZU.js} +2 -2
  12. package/dist/{iconfont-BQYJXZ0j.cjs → iconfont-CkpU7gNh.cjs} +1 -1
  13. package/dist/{index-BKQu8b42.js → index--D0Thf0J.js} +1 -1
  14. package/dist/{index-DtWkoC81.js → index-0HSo1RHX.js} +5 -5
  15. package/dist/{index-BPPcQ4_M.cjs → index-5dvr_F6Q.cjs} +1 -1
  16. package/dist/index-B-A_4_n_.cjs +1 -0
  17. package/dist/{index-Ceiu-jba.cjs → index-B-nrai8J.cjs} +1 -1
  18. package/dist/{index-Dyhg1YNv.js → index-B5i-XCGU.js} +1 -1
  19. package/dist/{index-Cr4PDNa4.js → index-BFtGkyJf.js} +4729 -4660
  20. package/dist/index-BGuyjj26.cjs +1 -0
  21. package/dist/{index-CYAEfACa.js → index-BLeSUjbB.js} +4 -4
  22. package/dist/{index-oa1r-ylv.js → index-BLqnYCsi.js} +2 -2
  23. package/dist/{index-B_j1sFJ7.cjs → index-BQEvzo4s.cjs} +1 -1
  24. package/dist/{index-DFZOCQ_1.cjs → index-BRyE_Lab.cjs} +1 -1
  25. package/dist/index-BYyFrGfX.js +7962 -0
  26. package/dist/{index-int00xes.cjs → index-B_kCqo4M.cjs} +1 -1
  27. package/dist/{index-CnmkPahV.js → index-B_uWA5AJ.js} +1 -1
  28. package/dist/index-BfOeLrc4.cjs +36 -0
  29. package/dist/{index-CD4F-OmC.js → index-BkipVGFw.js} +4 -4
  30. package/dist/{index-CIqvcKX_.js → index-BrLLsp39.js} +11 -11
  31. package/dist/{index-CjXOUGmo.cjs → index-BulgFj9c.cjs} +1 -1
  32. package/dist/{index-BkEcW47y.js → index-C-iUVY59.js} +1971 -1871
  33. package/dist/{index-BDPv6PGL.js → index-C3gtImRs.js} +2 -2
  34. package/dist/{index-DlhGQC5h.js → index-C55GyDvp.js} +2 -2
  35. package/dist/index-C5WqP8vL.cjs +1 -0
  36. package/dist/{index-5MpPq33s.cjs → index-CAD9KqHl.cjs} +1 -1
  37. package/dist/{index-DolfKJiF.cjs → index-CFCn1Gpd.cjs} +1 -1
  38. package/dist/index-CI_UVQ4Z.js +476 -0
  39. package/dist/index-CLTriF5O.cjs +11 -0
  40. package/dist/{index-Ct1Ul4ea.js → index-CMdeEau9.js} +4 -4
  41. package/dist/{index-BKKLS83Q.js → index-COyNONVE.js} +10 -10
  42. package/dist/{index-DwTVLqfZ.js → index-CSUpvfmH.js} +4745 -4671
  43. package/dist/{index-C036vLtM.cjs → index-CVCJuzlD.cjs} +1 -1
  44. package/dist/{index-Cf0Y4zav.cjs → index-CW-lwsDk.cjs} +1 -1
  45. package/dist/index-CcJb2uXu.js +8191 -0
  46. package/dist/{index-C3qSTp9J.cjs → index-CeXyg5Rl.cjs} +1 -1
  47. package/dist/{index-gHhE4tiq.js → index-Cfzc5_ZK.js} +4 -4
  48. package/dist/{index-COtwZu5v.js → index-ChBgkXqb.js} +17 -17
  49. package/dist/{index-D3QoZ29d.cjs → index-D03MbrNK.cjs} +1 -1
  50. package/dist/{index-9KGs7whM.cjs → index-DJg5d7ei.cjs} +1 -1
  51. package/dist/{index-tEu4f9lM.js → index-DMfz6Qrm.js} +2 -2
  52. package/dist/{index-B_vXxIGd.cjs → index-DPjDv9Ws.cjs} +13 -13
  53. package/dist/{index-SHqJ0cwG.js → index-DYqVJN3W.js} +2 -2
  54. package/dist/index-DbFGGKSI.cjs +1 -0
  55. package/dist/index-Dc6Q0f3F.cjs +11 -0
  56. package/dist/{index-DHdrBDP4.cjs → index-DcqWejmU.cjs} +1 -1
  57. package/dist/{index-D8f_yaYM.cjs → index-DhSdgyHz.cjs} +1 -1
  58. package/dist/{index-iIWkjzE_.cjs → index-DtJC43XK.cjs} +1 -1
  59. package/dist/{index-N83NRi2K.js → index-DxGZaHuy.js} +6 -6
  60. package/dist/{index-CM8QEOIe.js → index-Dysx8GkS.js} +3 -3
  61. package/dist/index-HCKkRTvn.cjs +19 -0
  62. package/dist/{index-Cwb3YO5-.cjs → index-IYg_iR8H.cjs} +1 -1
  63. package/dist/{index-DZAoe0YQ.js → index-X_HnLtRC.js} +1 -1
  64. package/dist/{index-DRIJn74B.cjs → index-j1S7YTh5.cjs} +1 -1
  65. package/dist/{index-CbNN_p1y.js → index-jiFqoYN9.js} +8 -8
  66. package/dist/{index-K1n-pA4G.js → index-jkHlUTog.js} +2616 -2545
  67. package/dist/{index-BHrQS0PO.js → index-lz-ekKYh.js} +1 -1
  68. package/dist/{index-C0ar9TXN.js → index-mdJtPr2-.js} +1 -1
  69. package/dist/{index-V5cMOBtr.cjs → index-nlfIt66y.cjs} +1 -1
  70. package/dist/index-pWdzgg-b.cjs +1 -0
  71. package/dist/{index-Cwmin1ye.js → index-sHmgudEg.js} +1 -1
  72. package/dist/{index-BQu6Fpbk.cjs → index-u7JCx5KX.cjs} +1 -1
  73. package/dist/{index-BbREGM4J.js → index-vURW-4ky.js} +16 -13
  74. package/dist/{index-M1TyGRiF.cjs → index-wv1wwLNX.cjs} +1 -1
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-5bWuAGGO.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CU0erI7U.js} +12433 -12426
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CcGgDB4E.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs} +335 -335
  77. package/dist/{index.vue_vue_type_style_index_1_lang-C9ZWGOE_.js → index.vue_vue_type_style_index_1_lang-CCQPqKHr.js} +17 -17
  78. package/dist/{index.vue_vue_type_style_index_1_lang-DVJ-x-dv.cjs → index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs} +1 -1
  79. package/dist/{isString-D4Yi9bDE.js → isString-Bn5VcA2n.js} +1 -1
  80. package/dist/{isString-Cdf6R00a.cjs → isString-DhPkQDQg.cjs} +1 -1
  81. package/dist/{main-BKdjwR7r.js → main-BLk4Mfi1.js} +4 -4
  82. package/dist/{main-CyV6vjiF.cjs → main-j2YKSWX-.cjs} +1 -1
  83. package/dist/{menuIndex-19Ruf69F.js → menuIndex-BJ1CSzli.js} +1 -1
  84. package/dist/{menuIndex-BtkpgAAq.cjs → menuIndex-D332F0dw.cjs} +1 -1
  85. package/dist/ss-component.cjs +1 -1
  86. package/dist/ss-component.css +2 -2
  87. package/dist/ss-component.js +20 -20
  88. package/dist/ss-component2.cjs +1 -1
  89. package/dist/ss-component2.js +18 -18
  90. package/dist/{threeModel-DJuzBw05.cjs → threeModel-C3N_ghfY.cjs} +1 -1
  91. package/dist/{threeModel-DFNXfXRG.js → threeModel-v33sxEBl.js} +6 -6
  92. package/dist/{threePreview-D_Wos3LS.js → threePreview-DNw547cG.js} +5 -5
  93. package/dist/{threePreview-BrZjF4eC.cjs → threePreview-Dif-1kRY.cjs} +1 -1
  94. package/dist/{threeSceneView-DpTiFJaa.js → threeSceneView-BkGy9bnz.js} +39 -39
  95. package/dist/{threeSceneView-BEYAcypx.cjs → threeSceneView-iXMcW_Z9.cjs} +1 -1
  96. package/dist/{threeSceneViewForCPMPIP-BxeILghC.cjs → threeSceneViewForCPMPIP-Bjimwk9q.cjs} +1 -1
  97. package/dist/{threeSceneViewForCPMPIP-CISy1L0U.js → threeSceneViewForCPMPIP-qP-6IJzE.js} +9 -9
  98. package/dist/{threeTrackPathView-B3Pv2bdS.cjs → threeTrackPathView-Cqrx2pEK.cjs} +1 -1
  99. package/dist/{threeTrackPathView-DMVNt168.js → threeTrackPathView-wK0hwn3B.js} +59 -59
  100. package/dist/{threeViewerHost-ATO1eJ5g.js → threeViewerHost-B2fHt8c2.js} +10 -10
  101. package/dist/{threeViewerHost-DPRAryxf.cjs → threeViewerHost-RuZpxQGN.cjs} +1 -1
  102. package/dist/{urdfTree-BFkOOnWh.cjs → urdfTree-CnVw_qic.cjs} +1 -1
  103. package/dist/{urdfTree-_wSayOr_.js → urdfTree-i-8eGN0m.js} +1 -1
  104. package/dist/{workpieceTreePanel-CFmrXk2r.js → workpieceTreePanel-Cy1eCrLl.js} +58 -58
  105. package/dist/{workpieceTreePanel-D_VSdlXy.cjs → workpieceTreePanel-auNIy7t8.cjs} +1 -1
  106. package/package.json +1 -1
  107. package/dist/array-Dh-A7jle.cjs +0 -1
  108. package/dist/index-BPIqIM_a.cjs +0 -1
  109. package/dist/index-BjRRaKW2.js +0 -5817
  110. package/dist/index-C5pQXH0_.cjs +0 -11
  111. package/dist/index-CEJJB1_A.js +0 -24
  112. package/dist/index-CEyDjpWD.cjs +0 -1
  113. package/dist/index-Cn7cuOeM.js +0 -465
  114. package/dist/index-Cp68Aa8G.cjs +0 -11
  115. package/dist/index-D0hhR7_L.js +0 -10434
  116. package/dist/index-DievuDNj.cjs +0 -1
  117. package/dist/index-Dkb93gli.cjs +0 -13
  118. package/dist/index-DtvBUVyE.cjs +0 -1
  119. package/dist/index-Lx9WVRw6.cjs +0 -42
  120. package/dist/index-VZzCfKCC.cjs +0 -1
  121. package/dist/index-ciCCkZew.cjs +0 -1
  122. package/dist/obj/model.mtl +0 -42
  123. package/dist/obj/model.obj +0 -26110
  124. package/public/obj/model.mtl +0 -42
  125. package/public/obj/model.obj +0 -26110
@@ -1,11 +0,0 @@
1
- "use strict";const wn=require("./index-Dkb93gli.cjs"),e=require("vue"),E=require("./index-Lx9WVRw6.cjs"),It=require("./index-B_vXxIGd.cjs"),rt=require("./index-C5pQXH0_.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CcGgDB4E.cjs"),Jt=require("./index-5MpPq33s.cjs"),No=require("./threeViewerHost-DPRAryxf.cjs");require("./index.vue_vue_type_style_index_1_lang-DVJ-x-dv.cjs");const Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-Cdf6R00a.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-Cwb3YO5-.cjs"),bl=require("./index-BVaHwt5f.cjs"),Wr=require("./index-DRIJn74B.cjs"),Ta=require("./index-DtvBUVyE.cjs"),Hr=require("./index-BpPyaNFa.cjs"),qr=require("vue-router"),xn=require("./index-9hspBVrQ.cjs"),Xr=require("./menuIndex-BtkpgAAq.cjs"),to=require("./index-D8f_yaYM.cjs");var Yr=/\s/;function Gr(n){for(var r=n.length;r--&&Yr.test(n.charAt(r)););return r}var Jr=/^\s+/;function Zr(n){return n&&n.slice(0,Gr(n)+1).replace(Jr,"")}var Mo=NaN,Qr=/^[-+]0x[0-9a-f]+$/i,ei=/^0b[01]+$/i,ti=/^0o[0-7]+$/i,ai=parseInt;function zo(n){if(typeof n=="number")return n;if(rt.isSymbol(n))return Mo;if(rt.isObject(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=rt.isObject(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=Zr(n);var i=ei.test(n);return i||ti.test(n)?ai(n.slice(2),i?2:8):Qr.test(n)?Mo:+n}var ao=function(){return rt.root.Date.now()},ni="Expected a function",oi=Math.max,li=Math.min;function kl(n,r,i){var l,u,s,y,h,p,g=0,D=!1,C=!1,z=!0;if(typeof n!="function")throw new TypeError(ni);r=zo(r)||0,rt.isObject(i)&&(D=!!i.leading,C="maxWait"in i,s=C?oi(zo(i.maxWait)||0,r):s,z="trailing"in i?!!i.trailing:z);function j(T){var b=l,ie=u;return l=u=void 0,g=T,y=n.apply(ie,b),y}function B(T){return g=T,h=setTimeout(L,r),D?j(T):y}function Z(T){var b=T-p,ie=T-g,Be=r-b;return C?li(Be,s-ie):Be}function F(T){var b=T-p,ie=T-g;return p===void 0||b>=r||b<0||C&&ie>=s}function L(){var T=ao();if(F(T))return $(T);h=setTimeout(L,Z(T))}function $(T){return h=void 0,z&&l?j(T):(l=u=void 0,y)}function m(){h!==void 0&&clearTimeout(h),g=0,l=p=u=h=void 0}function S(){return h===void 0?y:$(ao())}function v(){var T=ao(),b=F(T);if(l=arguments,u=this,p=T,b){if(h===void 0)return B(p);if(C)return clearTimeout(h),h=setTimeout(L,r),j(p)}return h===void 0&&(h=setTimeout(L,r)),y}return v.cancel=m,v.flush=S,v}var ri="[object Boolean]";function xl(n){return n===!0||n===!1||rt.isObjectLike(n)&&rt.baseGetTag(n)==ri}function ii(n){return n===void 0}const si={class:"statistics-cards-container"},ci={class:"statistics-label"},ui={class:"statistics-value"},di=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(n){return(r,i)=>(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:u},[e.createElementVNode("div",ci,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",ui,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),pi=Lt._export_sfc(di,[["__scopeId","data-v-d399b1f3"]]),fi={class:"form-content"},hi={title:"选择标签"},vi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},mi={class:"col-operate-wrap"},gi={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},yi={__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:r}){const i=()=>{y.value=!1,h.value=!1,p.value=[]},l=n;e.computed(()=>{var K;const O=(K=R.value)==null?void 0:K.split("/");return(O==null?void 0:O.some(J=>(J==null?void 0:J.includes("updateLoading"))||(J==null?void 0:J.includes("loading"))))?!1:I.value==="view"});const u=r,s=e.ref([]),y=e.ref(!1),h=e.ref(!1),p=e.ref([]),{getFileExtension:g}=No.useThreeSystem(),D=e.ref(),C=e.ref(!1),z=e.ref(!1),j=Ve.useUnit(E.pinia),{chooseTitle:B}=E.storeToRefs(j),Z=e.ref([]),F=e.ref(),L=e.ref(!1),$=e.ref([]),m=wn.useFormToTableComp(E.pinia),S=wn.useFormComp(E.pinia),v=e.ref(!1),T=e.ref(),b=E.useLoginState(E.pinia),{loginUserInfo:ie}=E.storeToRefs(b),Be=e.ref(),et=e.ref(!0),we=E.useModelComp(E.pinia),{tableViewContents:Le,itemData:Me,isEdit:I,routeToChildPath:Q,lockingPage:G}=E.storeToRefs(we),te=e.ref(null),Re=e.ref(!1),Qe=e.ref(!1),X=E.useMenuState(),{activeMenuPath:R}=E.storeToRefs(X),ue=Ve.useOriginalState(E.pinia),{originalPath:ve}=E.storeToRefs(ue),Ce=e.ref([]),ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Fe=async O=>{Qe.value=O,await se("disabled",null,O,!0)},q=async O=>{await se("operable",null,O,!0)};e.watch(()=>R.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const Y=()=>{e.nextTick(()=>{De()})},k=O=>{var re;s.value=(re=s.value)==null?void 0:re.map(K=>({...K,isFormColHidden:!(O!=null&&O.includes(K.label))}))};e.onUnmounted(()=>{te.value=null});const ge=O=>{u("clickTrigger",O)},Ie=async O=>{var re,K,J,Te,de,ee;if(O===""){let oe="";(re=s.value)==null||re.forEach(xe=>{xe!=null&&xe.isMain&&(oe=xe==null?void 0:xe.value)});let fe=await Ve.getItemData(Q.value,sessionStorage.getItem("systemKey"),"");oe=((ee=(de=(Te=(J=(K=fe==null?void 0:fe[0])==null?void 0:K.compData)==null?void 0:J.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:Te.contents)==null?void 0:de[0])==null?void 0:ee.routerContent)+ve.value+oe;let Ee=await Ve.getItemData(oe,sessionStorage.getItem("systemKey"),"");L.value=!0,$.value=Ee==null?void 0:Ee.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),u("routeUrl",$.value)}},De=()=>{var re;const O=(re=te.value)==null?void 0:re.$el;O&&Ve.Sortable.create(O,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:K=>{const{oldIndex:J,newIndex:Te}=K;if(J===Te)return;const de=s.value.splice(J,1)[0];s.value.splice(Te,0,de)}})},se=async(O,re,K,J=!1)=>{try{we.setRefreshCurStructure(!1)}catch{rt.ElMessage.error("编辑处理失败")}},le=async(O,re)=>{await se()},pe=async(O,re)=>{O&&await se()},Se=async(O,re,K)=>{await se(re,K,O,!1)},Ye=(O,re)=>{Be.value===re?et.value=!1:et.value=!0,Be.value=re==null?void 0:re.changeProp},dt=async O=>{var K,J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot;let re=[];if((K=O==null?void 0:O.toString())!=null&&K.includes(".urdf")){if(O.includes(",")){rt.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:O,extension:g(O)}],h.value=!0,y.value=!0;return}if((J=O==null?void 0:O.toString())!=null&&J.includes(".stl")||(Te=O==null?void 0:O.toString())!=null&&Te.includes(".STL")||(de=O==null?void 0:O.toString())!=null&&de.includes(".obj")||(ee=O==null?void 0:O.toString())!=null&&ee.includes(".mtl")){const nt=((oe=O==null?void 0:O.toString())==null?void 0:oe.split(",")).map(Ae=>({url:Ae,extension:g(Ae)}));p.value=nt,h.value=!1,y.value=!0;return}if((fe=O==null?void 0:O.toString())!=null&&fe.includes(".stl")||(ye=O==null?void 0:O.toString())!=null&&ye.includes(".STL")||(Ee=O==null?void 0:O.toString())!=null&&Ee.includes(".obj")||(xe=O==null?void 0:O.toString())!=null&&xe.includes(".mtl")){let Ke,nt=[],Ae={};if(Array.isArray(O)?Ke=O:Ke=O==null?void 0:O.split(","),Ke==null||Ke.forEach(mt=>{mt.includes(".mtl")?nt.push(mt):Ae.blob=Ae.blob?Ae.blob+","+mt:mt}),(nt==null?void 0:nt.length)>0&&(Ae.mtlBlobs=nt),(Pe=(W=Object.values(Ae))==null?void 0:W[0])!=null&&Pe.includes("http:"))re.push(Ae);else{const mt=new Blob([Ae.blob],{type:"application/octet-stream;charset=UTF-8"});let tt=URL.createObjectURL(mt),ze="";(be=O==null?void 0:O.split("/"))==null||be.forEach((it,gt)=>{var Je;gt===((Je=O==null?void 0:O.split("/"))==null?void 0:Je.length)-1&&(ze=it)}),(He=Ae.blob)!=null&&He.includes(".stl")&&(ze=(ze==null?void 0:ze.replaceAll(">",""))+".urdf"),F.value=[{name:ze,blobUrl:tt}],z.value=!0}}else{const Ke=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),nt=await rt.axios.get(O,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ke.close()}),Ae=new Blob([nt.data],{type:"application/octet-stream;charset=UTF-8"});let mt=URL.createObjectURL(Ae),tt="";(ot=O==null?void 0:O.split("/"))==null||ot.forEach((ze,it)=>{var gt;it===((gt=O==null?void 0:O.split("/"))==null?void 0:gt.length)-1&&(tt=ze)}),F.value=[{name:tt,blobUrl:mt}],z.value=!0}(re==null?void 0:re.length)>0&&S.setBlobUrls(re)},x=()=>{z.value=!1},V=O=>{var de,ee,oe,fe;const re=(ee=(de=E.cloneDeep(l.itemData))==null?void 0:de.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:ee.contents,K=E.cloneDeep(O.content);let J={};K&&((oe=Object.values(K))==null?void 0:oe.length)>0&&((fe=Object.values(K))==null||fe.forEach((ye,Ee)=>{J[re[Ee].key]=ye}));const Te={content:J,index:l==null?void 0:l.index,buttonName:O==null?void 0:O.buttonName};u("change",Te)},H=e.computed(()=>"http://222.92.178.198:62001"),ne=async O=>{var W,Pe,be,He,ot,Ke,nt,Ae,mt,tt,ze,it,gt,Je,We,Nt;if(!O)return;(Pe=(W=l==null?void 0:l.itemData)==null?void 0:W.find(Ne=>(Ne==null?void 0:Ne.key)==="parentFormPath"))==null||Pe.contents;let re=Le.value;(re==null?void 0:re.length)>0&&(re=re==null?void 0:re.map(Ne=>{var je,Ze,A,he;let Ge=(je=Ne==null?void 0:Ne.key)==null?void 0:je.split("/");return(l==null?void 0:l.compName)===(Ge==null?void 0:Ge[0])&&(Ze=s.value)!=null&&Ze.find(qe=>(qe==null?void 0:qe.prop)===(Ge==null?void 0:Ge[1]))&&(Ne.value=(he=(A=s.value)==null?void 0:A.find(qe=>(qe==null?void 0:qe.prop)===(Ge==null?void 0:Ge[1])))==null?void 0:he.value),Ne}),we.setTableViewContents(re));const K=E.cloneDeep(l.itemData);let J=K==null?void 0:K.map(Ne=>{var Ge;return(Ne==null?void 0:Ne.key)==="formContent"&&((Ge=Ne.contents)==null||Ge.map((je,Ze)=>{var A,he,qe,me,ut,st,wt,pt,ct,ft,Dt,Bt,Wt,vt,zt,Ut,Ht,Yt,aa;return je.type=(he=(A=s.value)==null?void 0:A.find(Ft=>(Ft==null?void 0:Ft.prop)===(je==null?void 0:je.prop)))==null?void 0:he.type,je.options=je!=null&&je.options?je.options:((ut=(me=(qe=je==null?void 0:je.key)==null?void 0:qe.split("$"))==null?void 0:me[1])==null?void 0:ut.length)>0?(ct=(pt=wn.formGetOptions((wt=(st=je==null?void 0:je.key)==null?void 0:st.split("$"))==null?void 0:wt[1]))==null?void 0:pt.split(","))==null?void 0:ct.map(Ft=>({label:Ft,value:Ft})):[],(ft=je==null?void 0:je.key)!=null&&ft.includes("$")&&(je.key=(Bt=(Dt=je==null?void 0:je.key)==null?void 0:Dt.split("$"))==null?void 0:Bt[0]),je.signature=(vt=(Wt=s.value)==null?void 0:Wt.find(Ft=>(Ft==null?void 0:Ft.prop)===(je==null?void 0:je.prop)))==null?void 0:vt.signature,je.isLoginUser=(Ut=(zt=s.value)==null?void 0:zt.find(Ft=>(Ft==null?void 0:Ft.prop)===(je==null?void 0:je.prop)))==null?void 0:Ut.isLoginUser,je.value=(Ht=Object.values(O))==null?void 0:Ht[Ze],je.isFormColHidden=(aa=(Yt=s.value)==null?void 0:Yt.find(Ft=>(Ft==null?void 0:Ft.prop)===(je==null?void 0:je.prop)))==null?void 0:aa.isFormColHidden,je})),Ne}),Te=s.value,de=(He=(be=E.cloneDeep(J))==null?void 0:be.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:He.contents;if(Te=Te==null?void 0:Te.map(Ne=>{var Ge;return Ne.value=(Ge=de==null?void 0:de.find((je,Ze)=>((je==null?void 0:je.id)??Ze)===(Ne==null?void 0:Ne.id)))==null?void 0:Ge.value,Ne}),!et.value){u("contentChange",{contents:J,index:l.index});return}let ee="",oe=(nt=(Ke=(ot=E.cloneDeep(J))==null?void 0:ot.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:nt.find((Ne,Ge)=>{var je,Ze,A;return(Ne==null?void 0:Ne.label)===Be.value||Ge.toString()===((A=(Ze=(je=Be.value)==null?void 0:je.split("t"))==null?void 0:Ze[1])==null?void 0:A.toString())}),fe=(Ae=oe==null?void 0:oe.optionUrl)==null?void 0:Ae.menuSelect,ye=!0;if((ze=(tt=(mt=E.cloneDeep(J))==null?void 0:mt.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:tt.contents)==null||ze.forEach(Ne=>{var Ge,je,Ze,A,he,qe;ye&&((Ze=(je=(Ge=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:je[1])!=null&&Ze.includes("["))&&(ee=(he=(A=Ne==null?void 0:Ne.optionUrl)==null?void 0:A.groupSelect)==null?void 0:he[1],JSON.stringify(fe)===JSON.stringify((qe=Ne==null?void 0:Ne.optionUrl)==null?void 0:qe.menuSelect)&&(ye=!1))}),(it=oe==null?void 0:oe.optionUrl)!=null&&it.menuSelect&&et.value){let Ne=await wn.getSelectRow(oe),Ge,je=(gt=oe==null?void 0:oe.optionUrl)==null?void 0:gt.menuSelect;if(Ne==null||Ne.forEach(Ze=>{var A,he,qe,me,ut,st,wt,pt,ct,ft;ee===((he=(A=oe==null?void 0:oe.optionUrl)==null?void 0:A.groupSelect)==null?void 0:he[1])&&((ut=(me=(qe=oe==null?void 0:oe.optionUrl)==null?void 0:qe.groupSelect)==null?void 0:me[1])!=null&&ut.includes("["))&&((ft=E.cloneDeep(Ze))==null?void 0:ft[(ct=(pt=(wt=(st=oe==null?void 0:oe.optionUrl)==null?void 0:st.groupSelect)==null?void 0:wt[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(oe==null?void 0:oe.value)&&(Ge=Ze)}),Ge){let Ze=E.cloneDeep(Te);Ze=Ze==null?void 0:Ze.map(he=>{var qe,me,ut,st,wt,pt,ct,ft,Dt,Bt,Wt;return(Ge!=null&&Ge[he==null?void 0:he.label]||Ge!=null&&Ge[(st=(ut=(me=(qe=he==null?void 0:he.optionUrl)==null?void 0:qe.groupSelect)==null?void 0:me[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])&&((ct=(pt=(wt=he==null?void 0:he.optionUrl)==null?void 0:wt.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&je!=null&&je.every(vt=>{var zt,Ut;return(Ut=(zt=he==null?void 0:he.optionUrl)==null?void 0:zt.menuSelect)==null?void 0:Ut.includes(vt)})&&(he.value=(Ge==null?void 0:Ge[he==null?void 0:he.label])||(Ge==null?void 0:Ge[(Wt=(Bt=(Dt=(ft=he==null?void 0:he.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:Dt[1])==null?void 0:Bt.replaceAll("[",""))==null?void 0:Wt.replaceAll("]","")]),Array.isArray(he.value)&&he.value.every(vt=>(vt==null?void 0:vt.url)&&(vt==null?void 0:vt.name))&&(he.type="Upload")),he}),Ze=Ze==null?void 0:Ze.map(he=>{var qe,me,ut;return(qe=he==null?void 0:he.optionUrl)!=null&&qe.oldMenuSelect&&(he.optionUrl.menuSelect=(ut=(me=E.cloneDeep(he))==null?void 0:me.optionUrl)==null?void 0:ut.oldMenuSelect),he}),s.value=E.cloneDeep(Ze);let A=E.cloneDeep(Ze);A=A==null?void 0:A.map(he=>{var qe,me,ut,st,wt,pt;return(me=(qe=he==null?void 0:he.optionUrl)==null?void 0:qe.menuSelect)!=null&&me.some(ct=>ct==null?void 0:ct.includes("["))&&(he.optionUrl.oldMenuSelect=(st=(ut=E.cloneDeep(he))==null?void 0:ut.optionUrl)==null?void 0:st.menuSelect,he.optionUrl.menuSelect=(pt=(wt=he==null?void 0:he.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:pt.map(ct=>{var ft,Dt,Bt,Wt;if(ct!=null&&ct.includes("[")){let vt=(Dt=(ft=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:Dt[1];ct=(Wt=(Bt=E.cloneDeep(Ze))==null?void 0:Bt.find(zt=>(zt==null?void 0:zt.label)===vt))==null?void 0:Wt.value}return ct})),he}),s.value=A}else s.value=Te;J=J==null?void 0:J.map(Ze=>{var A;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(A=Ze.contents)==null?void 0:A.map(he=>{var qe,me,ut,st;return he.value=((me=(qe=s.value)==null?void 0:qe.find(wt=>(wt==null?void 0:wt.label)===(he==null?void 0:he.key)))==null?void 0:me.value)??(he==null?void 0:he.value),he.type=((st=(ut=s.value)==null?void 0:ut.find(wt=>(wt==null?void 0:wt.prop)===(he==null?void 0:he.key)))==null?void 0:st.type)??(he==null?void 0:he.type),he})),Ze})}et.value=!1,u("contentChange",{contents:J,index:l.index});let Ee=[],xe=[];if((We=E.cloneDeep((Je=J==null?void 0:J.find(Ne=>(Ne==null?void 0:Ne.key)==="formContent"))==null?void 0:Je.contents))==null||We.forEach(Ne=>{var Ge;Array.isArray(Ne==null?void 0:Ne.value)&&((Ge=Ne==null?void 0:Ne.value)!=null&&Ge.find(je=>{var Ze;return(Ze=je==null?void 0:je.url)==null?void 0:Ze.includes(".obj")}))&&(xe=Ne==null?void 0:Ne.value)}),(xe==null?void 0:xe.length)>0){const Ne=(Nt=E.cloneDeep(xe))==null?void 0:Nt.filter(Ge=>{var je;return(je=Ge==null?void 0:Ge.url)==null?void 0:je.includes(".obj")});Ne==null||Ne.forEach(Ge=>{var Ze,A,he,qe;const je=(Ze=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Ge==null?void 0:Ge.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:Ze.map(me=>me==null?void 0:me.url);Ee.push({objUrl:Ge==null?void 0:Ge.url,mtlUrls:((A=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Ge==null?void 0:Ge.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:A.length)===1?(qe=(he=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Ge==null?void 0:Ge.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:he[0])==null?void 0:qe.url:je})}),S.setObjUrl(Ee)}},N=O=>{if(!O)return;const re=[];let K="";for(let J of O)(J.includes("[")||K.includes("["))&&(K+=J.trim(),E.cloneDeep(K).split("【").length-1===E.cloneDeep(K).split("】").length-1&&E.cloneDeep(K).split("[").length-1===E.cloneDeep(K).split("]").length-1&&(re.push(K.replace(/\/\*[\s\S]*?\*\//g,"")),K=""));return re},ce=(O,re,K)=>{let J="";const Te=re==null?void 0:re.map(de=>{var ee;return(ee=de==null?void 0:de.value)==null?void 0:ee.pageData});return Te==null||Te.forEach(de=>{var ee;(de==null?void 0:de.name)===(O==null?void 0:O[0])&&((ee=de==null?void 0:de.compData)==null||ee.forEach(oe=>{var fe;(oe==null?void 0:oe.key)==="formContent"&&((fe=oe==null?void 0:oe.contents)==null||fe.forEach(ye=>{var Ee;(ye==null?void 0:ye.prop)===(O==null?void 0:O[1])&&(J=(ye==null?void 0:ye.value)===""?Ve.judgeContents((Ee=E.cloneDeep(ye))==null?void 0:Ee.optionUrl,K):ye==null?void 0:ye.value)}))}))}),J},Oe=(O,re,K,J)=>{var oe,fe;let Te="",de="";(oe=E.cloneDeep(re))==null||oe.forEach((ye,Ee)=>{ye!=null&&ye.includes("[")?de=de+ve.value+O[Ee]:de=de===""?de+ye:de+"/"+ye});let ee=(fe=J[de])==null?void 0:fe.map(ye=>{var Ee;return(Ee=ye==null?void 0:ye.value)==null?void 0:Ee.pageData});return ee==null||ee.forEach(ye=>{var Ee;(ye==null?void 0:ye.name)===(K==null?void 0:K[0])&&((Ee=ye==null?void 0:ye.compData)==null||Ee.forEach(xe=>{var W;(xe==null?void 0:xe.key)==="formContent"&&((W=xe==null?void 0:xe.contents)==null||W.forEach(Pe=>{(Pe==null?void 0:Pe.prop)===(K==null?void 0:K[1])&&(Te=Pe==null?void 0:Pe.value)}))}))}),Te};return e.watch(()=>l.itemData,async()=>{var ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot,Ke,nt,Ae,mt,tt,ze,it,gt;const O=(ee=l.itemData)==null?void 0:ee.find(Je=>(Je==null?void 0:Je.key)==="formContent"),re=(oe=E.cloneDeep(l.itemData))==null?void 0:oe.find(Je=>(Je==null?void 0:Je.key)==="formButton"),K=(fe=E.cloneDeep(l.itemData))==null?void 0:fe.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),J=(ye=E.cloneDeep(l.itemData))==null?void 0:ye.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),Te=(Ee=E.cloneDeep(l.itemData))==null?void 0:Ee.find(Je=>(Je==null?void 0:Je.key)==="enableWrap");if((J==null?void 0:J.contents)==="纵向"?C.value=!1:C.value=!0,v.value=(Te==null?void 0:Te.contents)===void 0?!1:Te==null?void 0:Te.contents,T.value=typeof(K==null?void 0:K.contents)!="boolean"?!(!(K!=null&&K.contents)===""||((xe=K==null?void 0:K.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):K==null?void 0:K.contents,((W=O==null?void 0:O.contents)==null?void 0:W.length)>0&&Array.isArray(O==null?void 0:O.contents)){let Je=l.allMapContents;const We=(be=(Pe=E.cloneDeep(O))==null?void 0:Pe.contents)==null?void 0:be.map((A,he)=>{var vt,zt,Ut,Ht,Yt,aa,Ft,Ia,Fa,xa,$a,wa,ja,Ua,Ka,Wa,Ha,Na,ga,pa,Da,ya,ia,va,qa,Aa,Va,_a,Xa,Ya,Oa,Ga,Ja;let qe=(A==null?void 0:A.label)??(A==null?void 0:A.key)??"",me=(A==null?void 0:A.type)??"",ut=(A==null?void 0:A.options)??[];if((vt=A==null?void 0:A.key)!=null&&vt.includes("$")&&(qe=(zt=E.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:zt[0],((Ht=(Ut=E.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Ut[1])==null?void 0:Ht.length)>0)){const[Ct,ta]=(aa=(Yt=E.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Yt[1])==null?void 0:aa.split(/[()]/);me=((Ft=Ve.FormType.find(yt=>(yt==null?void 0:yt.key)===Ct))==null?void 0:Ft.value)??"",((Ia=ta==null?void 0:ta.split(","))==null?void 0:Ia.length)>0&&(ut=(Fa=ta==null?void 0:ta.split(","))==null?void 0:Fa.map(yt=>({label:yt,value:yt})))}let st=[];A!=null&&A.contents&&!Array.isArray(A==null?void 0:A.contents)&&(st=($a=(xa=A==null?void 0:A.contents)==null?void 0:xa.split(","))==null?void 0:$a.map(Ct=>({label:Ct,value:Ct}))),((wa=A==null?void 0:A.optionUrl)==null?void 0:wa.selectRelateType)==="自定义绑定"&&(st=(Ua=(ja=A==null?void 0:A.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ua.map(Ct=>({label:Ct,value:Ct})));let wt=!1,pt=(A==null?void 0:A.isFormColHidden)??!1,ct=Ve.judgeContents((Ka=E.cloneDeep(A))==null?void 0:Ka.optionUrl,Je),ft=ct!==void 0&&ct!==""?ct:A!=null&&A.originalContent&&(A==null?void 0:A.originalContent)!==""?A.originalContent:A!=null&&A.value?A.value:(ut==null?void 0:ut.length)>0?(Wa=ut==null?void 0:ut[0])==null?void 0:Wa.value:(A==null?void 0:A.value)??"",Dt=!1,Bt=ct!==void 0||me===""?"Input":me;if((Array.isArray(ct)&&(ct!=null&&ct.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&(Bt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.isLoginUser)wt=!0,ft=((Ha=ie.value)==null?void 0:Ha.姓名)||((Na=ie.value)==null?void 0:Na.account)||((ga=ie.value)==null?void 0:ga.账号)||((pa=ie.value)==null?void 0:pa.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.signature||A!=null&&A.isShow)if(Dt=!0,(A==null?void 0:A.isShow)==="originalSignature")Bt="image",ft=H.value+"/"+((Da=ie.value)==null?void 0:Da.signature);else{let Ct=[...new Set(N(A.isShow))].map(bt=>{var Et,_t,Rt,Ot;return{key:(Ot=(Rt=(_t=(Et=bt==null?void 0:bt.split("["))==null?void 0:Et[1])==null?void 0:_t.split("]"))==null?void 0:Rt[0])==null?void 0:Ot.split(":"),value:""}});(ya=Me.value)==null||ya.forEach(bt=>{Ct==null||Ct.forEach((qt,Et)=>{var Rt;let _t=qt==null?void 0:qt.key;(bt==null?void 0:bt.name)===(_t==null?void 0:_t[0].replaceAll("'",""))&&((Rt=bt==null?void 0:bt.compData)==null||Rt.forEach(Ot=>{var Pt;(Ot==null?void 0:Ot.key)==="formContent"&&((Pt=Ot==null?void 0:Ot.contents)==null||Pt.forEach(Gt=>{(Gt==null?void 0:Gt.prop)===(_t==null?void 0:_t[1].replaceAll("'",""))&&(Ct[Et].value=Gt==null?void 0:Gt.value)}))}))})});let ta=Ct==null?void 0:Ct.map(bt=>{var qt;return bt.key="["+((qt=bt.key)==null?void 0:qt.join(":"))+"]",bt}),yt=A==null?void 0:A.isShow;ta==null||ta.forEach(bt=>{bt!=null&&bt.value?yt=yt.replaceAll(bt==null?void 0:bt.key,"'"+(bt==null?void 0:bt.value)+"'"):yt=yt.replaceAll(bt==null?void 0:bt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((ia=yt==null?void 0:yt.split("==="))==null?void 0:ia[0])+"==='"+((va=yt==null?void 0:yt.split("==="))==null?void 0:va[1])+"'":yt=((qa=yt==null?void 0:yt.split("="))==null?void 0:qa[0])+"='"+((Aa=yt==null?void 0:yt.split("="))==null?void 0:Aa[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(pt=!1,Bt="image",ft=H.value+"/"+((Va=ie.value)==null?void 0:Va.signature)):ft=""}return Array.isArray(ft)&&ft.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(A.type="Upload"),A!=null&&A.isMainUrl&&(Bt="Url"),{label:qe??"",name:"t"+he,prop:E.cloneDeep(A==null?void 0:A.key),type:Bt,value:A!=null&&A.isSync?((Xa=(_a=B.value)==null?void 0:_a[0])==null?void 0:Xa.value)??((Ja=(Ya=R==null?void 0:R.value)==null?void 0:Ya.split("/"))==null?void 0:Ja[((Ga=(Oa=R==null?void 0:R.value)==null?void 0:Oa.split("/"))==null?void 0:Ga.length)-1]):A!=null&&A.isNewDate&&ft===""?new Date:ft,id:(A==null?void 0:A.id)??he,contents:(st==null?void 0:st.length)>0?st:ut??[],width:(A==null?void 0:A.width)??1,isLoginUser:wt,config:A==null?void 0:A.config,optionUrl:(A==null?void 0:A.optionUrl)??A,isFormColHidden:pt,signature:Dt,isMain:A==null?void 0:A.isMain,isMainUrl:A==null?void 0:A.isMainUrl,operable:(A==null?void 0:A.operable)??!1,disabled:(A==null?void 0:A.disabled)??!1,isSync:A==null?void 0:A.isSync}}),Nt=We==null?void 0:We.map(A=>A==null?void 0:A.value);let Ne="";Nt==null||Nt.forEach(A=>{A!==""&&A!==void 0&&(Ne=Ne===""?A:Ne+"/"+A)}),m.setSelectArray(Nt),m.setSelectString(Ne);let Ge=(He=E.cloneDeep(We))==null?void 0:He.map(A=>(A!=null&&A.value&&Ve.IsJson(A==null?void 0:A.value)&&Array.isArray(JSON.parse(A==null?void 0:A.value))&&(A.value=JSON.parse(A.value)),A));Ge=Ge==null?void 0:Ge.map(A=>{var he,qe,me,ut,st,wt,pt,ct;if((qe=(he=A==null?void 0:A.optionUrl)==null?void 0:he.menuSelect)!=null&&qe.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";A.optionUrl.oldMenuSelect=(ut=(me=E.cloneDeep(A))==null?void 0:me.optionUrl)==null?void 0:ut.menuSelect,A.optionUrl.menuSelect=(wt=(st=A==null?void 0:A.optionUrl)==null?void 0:st.menuSelect)==null?void 0:wt.map(Dt=>{var Bt,Wt,vt,zt,Ut,Ht;if(Dt!=null&&Dt.includes("[")){let Yt=(Wt=(Bt=Dt==null?void 0:Dt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"))==null?void 0:Wt[1];ft=ce((vt=Dt==null?void 0:Dt.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"),Je==null?void 0:Je[R.value],Je),Dt=((Ut=(zt=E.cloneDeep(Ge))==null?void 0:zt.find(aa=>(aa==null?void 0:aa.label)===Yt))==null?void 0:Ut.value)||ce((Ht=Dt==null?void 0:Dt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),Je==null?void 0:Je[R.value],Je)}return Dt}),ft!==""&&A.value===""&&(A.value=Oe(A.optionUrl.menuSelect,A.optionUrl.oldMenuSelect,(pt=A==null?void 0:A.optionUrl)==null?void 0:pt.groupSelect,Je),Array.isArray(A.value)&&((ct=A.value)!=null&&ct.every(Dt=>Dt==null?void 0:Dt.url))&&(A.type="UPLOAD"))}return A}),s.value=Ge,Qe.value=((ot=s.value)==null?void 0:ot.every(A=>A==null?void 0:A.disabled))||G.value===R.value,Re.value=(Ke=s.value)==null?void 0:Ke.every(A=>A==null?void 0:A.operable),Ce.value=(nt=s.value)==null?void 0:nt.map(A=>A==null?void 0:A.label);let je=[],Ze=[];if((Ae=E.cloneDeep(s.value))==null||Ae.forEach(A=>{var he;Array.isArray(A==null?void 0:A.value)&&((he=A==null?void 0:A.value)!=null&&he.find(qe=>{var me;return(me=qe==null?void 0:qe.url)==null?void 0:me.includes(".obj")}))&&(Ze=A==null?void 0:A.value)}),(Ze==null?void 0:Ze.length)>0){const A=(mt=E.cloneDeep(Ze))==null?void 0:mt.filter(he=>{var qe;return(qe=he==null?void 0:he.url)==null?void 0:qe.includes(".obj")});A==null||A.forEach(he=>{var me,ut,st,wt;const qe=(me=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(he==null?void 0:he.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:me.map(pt=>pt==null?void 0:pt.url);je.push({objUrl:he==null?void 0:he.url,mtlUrls:((ut=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(he==null?void 0:he.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:ut.length)===1?(wt=(st=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(he==null?void 0:he.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:st[0])==null?void 0:wt.url:qe})}),S.setObjUrl(je)}(tt=E.cloneDeep(s.value))==null||tt.forEach(A=>{var he,qe,me,ut,st,wt,pt,ct,ft,Dt,Bt,Wt,vt;if((qe=(he=A==null?void 0:A.value)==null?void 0:he.toString())!=null&&qe.includes(".stl")||(ut=(me=A==null?void 0:A.value)==null?void 0:me.toString())!=null&&ut.includes(".STL")||(wt=(st=A==null?void 0:A.value)==null?void 0:st.toString())!=null&&wt.includes(".obj")||(ct=(pt=A==null?void 0:A.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(Dt=(ft=A==null?void 0:A.value)==null?void 0:ft.toString())!=null&&Dt.includes(".urdf")){let zt={},Ut=[],Ht;Array.isArray(A==null?void 0:A.value)?Ht=A==null?void 0:A.value:Ht=(Bt=A==null?void 0:A.value)==null?void 0:Bt.split(","),Ht==null||Ht.forEach(Yt=>{Yt.includes(".mtl")?Ut.push(Yt):zt.blob=zt.blob==="undefined"?Yt:zt.blob+","+Yt}),(Ut==null?void 0:Ut.length)>0&&(zt.mtlBlobs=Ut),(vt=(Wt=Object.values(zt))==null?void 0:Wt[0])!=null&&vt.includes("http:")}})}else s.value=[];let de=Le.value;if((de==null?void 0:de.length)>0&&(de=de==null?void 0:de.map(Je=>{var Nt,Ne,Ge,je;let We=(Nt=Je==null?void 0:Je.key)==null?void 0:Nt.split("/");return(l==null?void 0:l.compName)===(We==null?void 0:We[0])&&(Ne=s.value)!=null&&Ne.find(Ze=>(Ze==null?void 0:Ze.prop)===(We==null?void 0:We[1]))&&(Je.value=(je=(Ge=s.value)==null?void 0:Ge.find(Ze=>(Ze==null?void 0:Ze.prop)===(We==null?void 0:We[1])))==null?void 0:je.value),Je}),we.setTableViewContents(de)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let Je={};(ze=E.cloneDeep(s).value)==null||ze.forEach(We=>{(We==null?void 0:We.isMain)===!0&&(Je[(We==null?void 0:We.prop)??(We==null?void 0:We.name)]=[{required:!0,message:`${(We==null?void 0:We.prop)||(We==null?void 0:We.name)}不能为空`}])}),D.value=Je}if(((it=re==null?void 0:re.contents)==null?void 0:it.length)>0){const Je=[];(gt=re==null?void 0:re.contents)==null||gt.forEach((We,Nt)=>{(We==null?void 0:We.label)!==""&&Je.push({label:(We==null?void 0:We.label)??"",id:(We==null?void 0:We.id)??Nt,type:(We==null?void 0:We.type)??"",background:We==null?void 0:We.background})}),Z.value=Je}else Z.value=[]},{deep:!0,immediate:!0}),e.watch(()=>G.value,O=>{Qe.value=O===R.value},{immediate:!0}),(O,re)=>{var oe,fe;const K=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-switch"),Te=e.resolveComponent("el-checkbox"),de=e.resolveComponent("el-popover"),ee=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",fi,[v.value===!1?(e.openBlock(),e.createBlock(pi,{key:0,items:(fe=(oe=s.value)==null?void 0:oe.filter(ye=>!(ye!=null&&ye.isFormColHidden)))==null?void 0:fe.map(ye=>({label:ye==null?void 0:ye.label,value:ye==null?void 0:ye.value}))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"form-shadow-box":v.value})},[e.createVNode(It.ssForm,{rowContents:s.value,formRules:D.value,buttonValue:Z.value,isRowFlex:!1,isEnableWrap:v.value,onOnButtonClick:V,onChange:ne,formDisabled:Qe.value,formLabelsOperable:Re.value,isButtonRow:C.value,onPreview:dt,onBlurChange:Ye,onHandleColEditChange:le,onHandleColTypeChange:pe,onRouteUrl:Ie,onClickTrigger:ge},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:Ee,formLabelsOperable:xe})=>[e.createVNode(de,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Y},{reference:e.withCtx(()=>[e.createElementVNode("span",hi,[e.createVNode(K,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",vi,[re[1]||(re[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(J,{"model-value":Ee,"active-text":"禁用","inactive-text":"",onChange:Fe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(J,{"model-value":xe,"active-text":"编辑所有标签","inactive-text":"",onChange:q},null,8,["model-value"]),re[2]||(re[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(ee,{modelValue:Ce.value,"onUpdate:modelValue":re[0]||(re[0]=W=>Ce.value=W),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:k},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,W=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:W.label},[e.createVNode(Te,{value:W.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(W.label),1)]),_:2},1032,["value"]),e.createVNode(de,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(K,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Pe;return[e.createElementVNode("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Pe=Object.keys(W))==null?void 0:Pe.filter(be=>{var He;return(He=ke.value)==null?void 0:He.find(ot=>(ot==null?void 0:ot.value)===be)}),be=>{var He,ot;return e.openBlock(),e.createElementBlock("div",{key:be},[e.createVNode(It._sfc_main$1,{value:W==null?void 0:W[be],"active-text":(ot=(He=ke.value)==null?void 0:He.find(Ke=>(Ke==null?void 0:Ke.value)===be))==null?void 0:ot.label,inactiveText:"",onChange:Ke=>Se(Ke,be,W)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",gi,[e.createVNode(K,{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"])],2)),z.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:2,fileDataList:F.value,onDestroy:x},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Jt.ssDialog,{key:3,visible:y.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:p.value,onGetAnimationData:O.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ro=Lt._export_sfc(yi,[["__scopeId","data-v-f64dd67f"]]),$n=e.ref(0),wl=n=>{var r;return!n||(n==null?void 0:n.length)===0?[]:(r=E.cloneDeep(n))==null?void 0:r.map(l=>($n.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$n.value,children:wl(l==null?void 0:l.children)},l))},bi=n=>{var i;return(i=E.cloneDeep(n))==null?void 0:i.map(l=>($n.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$n.value,children:wl(l==null?void 0:l.children)},l))},Dl=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===r)?(i=E.cloneDeep(n))==null?void 0:i.filter(u=>(u==null?void 0:u.id)!==r):(n=n==null?void 0:n.map(l=>(l.children=Dl(l==null?void 0:l.children,r),l)),n)},_l=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=E.cloneDeep(n))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u=r),u)):(n=n==null?void 0:n.map(l=>(l.children=_l(l==null?void 0:l.children,r),l)),n)},El=(n,r)=>{var i;return n!=null&&n.find(l=>{var u;return(l==null?void 0:l.id)===((u=r==null?void 0:r.contents)==null?void 0:u.id)})?(i=E.cloneDeep(n))==null?void 0:i.map(u=>{var s;return(u==null?void 0:u.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)&&(u=r==null?void 0:r.contents),u}):(n=n==null?void 0:n.map(l=>(l.children=El(l==null?void 0:l.children,r),l)),n)},Cl=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=E.cloneDeep(n))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u!=null&&u.children||(u.children=[]),u.children.push(r.contents)),u)):(n=n==null?void 0:n.map(l=>(l.children=Cl(l==null?void 0:l.children,r),l)),n)},Vt=[{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"}],ki=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],xi=[{label:"新增",value:"add"}],Ca=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:xi},{key:"background",label:"按钮背景色",type:"Color"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ki},{key:"textColor",label:"按钮颜色",type:"Color"}],wi={class:"table-header-child"},Di={class:"table-header-child-main"},_i={class:"table-header-child-content"},Ei={class:"table-header-child-content-item"},Ci={class:"fix-button"},Si={key:0},Ti={class:"form-content"},Bi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(!1),s=e.ref(""),y=Ve.useTableComp(E.pinia),{tableIndex:h}=E.storeToRefs(y);e.ref(0);const p=e.ref(""),g=e.ref([]),D=e.ref([]),C=m=>{var v;u.value=!0;let S=[];Vt==null||Vt.forEach(T=>{let b=E.cloneDeep(h.value)+1;y.setTableIndex(b),S.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:m[T.key],id:h.value,contents:T==null?void 0:T.options})}),m!=null&&m.children&&((v=m==null?void 0:m.children)==null?void 0:v.length)>0&&S.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,g.value=S,D.value=S},z=m=>{l("fixChange",E.cloneDeep(m))},j=m=>{l("deleteChange",E.cloneDeep(m))},B=m=>{u.value=!0;let S=[];Vt==null||Vt.forEach(v=>{let T=E.cloneDeep(h.value)+1;y.setTableIndex(T),S.push({label:v==null?void 0:v.label,name:v==null?void 0:v.label,type:v.type,value:"",id:h.value,contents:v==null?void 0:v.options})}),s.value=m==null?void 0:m.id,g.value=S,D.value=S},Z=m=>{let S=E.cloneDeep(D.value);S=S==null?void 0:S.map(v=>(v.children||(v.value=m==null?void 0:m[v.name]),v)),D.value=S},F=()=>{var S,v;g.value=D.value;let m={};if(p.value!=="")m.id=p.value,(S=g.value)==null||S.forEach(T=>{const b=Vt==null?void 0:Vt.find(ie=>(ie==null?void 0:ie.label)===(T==null?void 0:T.label));b?m[b.key]=T.value:T!=null&&T.children&&T.children.length>0&&(m.children=T.children)}),u.value=!1,l("fixChange",{contents:E.cloneDeep(m),id:s.value,type:"fix"});else{let T=E.cloneDeep(h.value)+1;y.setTableIndex(T),m.id="id"+h.value,(v=g.value)==null||v.forEach(b=>{const ie=Vt==null?void 0:Vt.find(Be=>(Be==null?void 0:Be.label)===(b==null?void 0:b.label));ie?m[ie.key]=b.value:b!=null&&b.children&&b.children.length>0&&(m.children=b.children)}),u.value=!1,l("fixChange",{contents:E.cloneDeep(m),id:s.value,type:"add"})}p.value="",g.value=[],D.value=[]},L=()=>{u.value=!1,p.value="",s.value="",g.value=[],D.value=[]},$=m=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(m,S)=>{const v=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(T,b)=>(e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("div",_i,[e.createElementVNode("div",Ei,e.toDisplayString(T.label),1),e.createElementVNode("div",Ci,[e.createVNode(v,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>B(T)},null,8,["onClick"]),e.createVNode(v,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>C(T)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>$(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",Si,[e.createVNode(Sl,{tableChildContents:T==null?void 0:T.children,onDeleteChange:j,onFixChange:z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ti,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:Z},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:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ii=Lt._export_sfc(Bi,[["__scopeId","data-v-e0fef72d"]]),Ni={class:"table-header-child"},Ai={class:"table-header-child-main"},Vi={class:"table-header-child-content"},Oi={class:"table-header-child-content-item"},Mi={class:"fix-button"},zi={key:0},Ri={class:"form-content"},Pi={class:"dialog-footer"},Li={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(!1),s=e.ref(""),y=Ve.useTableComp(E.pinia),{tableIndex:h}=E.storeToRefs(y),p=e.ref(""),g=e.ref([]),D=e.ref([]),C=m=>{l("fixChange",E.cloneDeep(m))},z=m=>{var v;u.value=!0;let S=[];Vt==null||Vt.forEach(T=>{let b=E.cloneDeep(h.value)+1;y.setTableIndex(b),S.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:m[T.key],id:h.value,contents:T==null?void 0:T.options})}),m!=null&&m.children&&((v=m==null?void 0:m.children)==null?void 0:v.length)>0&&S.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,g.value=S,D.value=S},j=m=>{u.value=!0;let S=[];Vt==null||Vt.forEach(v=>{let T=E.cloneDeep(h.value)+1;y.setTableIndex(T),S.push({label:v==null?void 0:v.label,name:v==null?void 0:v.label,type:v.type,value:"",id:h.value,contents:v==null?void 0:v.options})}),s.value=m==null?void 0:m.id,g.value=S,D.value=S},B=m=>{let S=E.cloneDeep(D.value);S=S==null?void 0:S.map(v=>(v.children||(v.value=m==null?void 0:m[v.name]),v)),D.value=S},Z=()=>{var S,v;g.value=D.value;let m={};if(p.value!=="")m.id=p.value,(S=g.value)==null||S.forEach(T=>{const b=Vt==null?void 0:Vt.find(ie=>(ie==null?void 0:ie.label)===(T==null?void 0:T.label));b?m[b.key]=T.value:T!=null&&T.children&&T.children.length>0&&(m.children=T.children)}),u.value=!1,l("fixChange",{contents:E.cloneDeep(m),id:s.value,type:"fix"});else{let T=E.cloneDeep(h.value)+1;y.setTableIndex(T),m.id="idChild"+h.value,(v=g.value)==null||v.forEach(b=>{const ie=Vt==null?void 0:Vt.find(Be=>(Be==null?void 0:Be.label)===(b==null?void 0:b.label));ie?m[ie.key]=b.value:b!=null&&b.children&&b.children.length>0&&(m.children=b.children)}),u.value=!1,l("fixChange",{contents:E.cloneDeep(m),id:s.value,type:"add"})}p.value="",g.value=[],D.value=[]},F=()=>{u.value=!1,p.value="",s.value="",g.value=[],D.value=[]},L=m=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=m=>{l("deleteChange",m)};return(m,S)=>{const v=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(b,ie)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("div",Vi,[e.createElementVNode("div",Oi,e.toDisplayString(b.label),1),e.createElementVNode("div",Mi,[e.createVNode(v,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>j(b)},null,8,["onClick"]),e.createVNode(v,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>z(b)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>L(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",zi,[e.createVNode(Ii,{tableChildContents:b==null?void 0:b.children,onDeleteChange:$,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Pi,[e.createVNode(T,{onClick:F,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(T,{class:"ok-button button",onClick:Z,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Sl=Lt._export_sfc(Li,[["__scopeId","data-v-ebd68fa1"]]),Fi={class:"table-operate-content"},$i={class:"table-operate-item"},ji={class:"operate-title"},Ui={class:"operate-content"},Ki={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={key:0},Xi={class:"operate-title"},Yi={class:"operate-content"},Gi={class:"fix-content"},Ji={class:"fix-content-label"},Zi={class:"fix-button"},Qi={class:"operate-title"},es={class:"operate-content"},ts={class:"fix-content"},as={class:"fix-content-label"},ns={class:"fix-button"},os={class:"operate-title"},ls={class:"operate-content"},rs={class:"fix-content"},is={class:"fix-content-label"},ss={class:"fix-button"},cs={class:"operate-content"},us={style:{display:"flex","justify-content":"space-between"}},ds={class:"form-content"},ps={class:"dialog-footer"},fs={class:"form-content"},hs={class:"dialog-footer"},vs={class:"form-content"},ms={class:"dialog-footer"},gs={class:"form-content"},ys={class:"dialog-footer"},bs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.ref([]),s=e.ref(!1),y=e.ref(!1),h=e.ref([]),p=e.ref(!1),g=e.ref([]),D=e.ref(!1),C=e.ref([]),z=e.ref(""),j=e.ref(""),B=e.ref([]),Z=e.ref([]),F=e.ref([]),L=e.ref([]),$=e.ref(!1),m=e.ref([]),S=e.ref([]),v=e.ref(0),T=e.ref([]),b=e.ref([]),ie=e.ref([]),Be=()=>{$.value=!0;let x=[];Ca==null||Ca.forEach(V=>{v.value++,x.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:v.value,contents:V==null?void 0:V.options})}),m.value=x,S.value=x},et=()=>{var V,H,ne;y.value=!0;let x=[];(ne=(H=(V=Ve.FormContent)==null?void 0:V.find(N=>(N==null?void 0:N.key)==="Input"))==null?void 0:H.value)==null||ne.forEach(N=>{v.value++,x.push({label:N==null?void 0:N.label,name:(N==null?void 0:N.name)||(N==null?void 0:N.label),type:N.type,value:(N==null?void 0:N.label)==="类型"?"Input":"",id:v.value,contents:N==null?void 0:N.options})}),T.value=x,b.value=x},we=x=>{x||(T.value=b.value)},Le=async x=>{var V,H,ne,N,ce,Oe,O,re,K,J,Te,de;if((x==null?void 0:x.类型)!==((H=(V=b.value)==null?void 0:V.find(ee=>(ee==null?void 0:ee.label)==="类型"))==null?void 0:H.value)){let ee=[],oe=await((ce=(N=(ne=Ve.FormContent)==null?void 0:ne.find(fe=>(fe==null?void 0:fe.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:N.value)==null?void 0:ce.value)?await((J=(K=(re=Ve.FormContent)==null?void 0:re.find(fe=>(fe==null?void 0:fe.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:K.value)==null?void 0:J.value):(O=(Oe=Ve.FormContent)==null?void 0:Oe.find(fe=>(fe==null?void 0:fe.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:O.value;if(oe==null||oe.forEach(fe=>{v.value++,ee.push({label:fe==null?void 0:fe.label,name:(fe==null?void 0:fe.name)||(fe==null?void 0:fe.label),type:fe.type,value:fe!=null&&fe.属性名?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):(x==null?void 0:x[fe.label])??"",id:v.value,contents:fe==null?void 0:fe.options,prop:(fe==null?void 0:fe.prop)||(fe==null?void 0:fe.name)||(fe==null?void 0:fe.label)})}),x!=null&&x.菜单选项&&((Te=x==null?void 0:x.菜单选项)==null?void 0:Te.length)>0){const fe=await Ve.menuToContentType(x==null?void 0:x.菜单选项);ee=ee==null?void 0:ee.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=fe),ye))}b.value=await Ve.selectToBase(E.cloneDeep(ee)),T.value=await Ve.selectToBase(E.cloneDeep(ee))}else{let ee=E.cloneDeep(T.value);if(ee=ee==null?void 0:ee.map(oe=>(oe.value=x==null?void 0:x[oe.name],oe)),x!=null&&x.菜单选项&&((de=x==null?void 0:x.菜单选项)==null?void 0:de.length)>0){const oe=await Ve.menuToContentType(x==null?void 0:x.菜单选项);ee=ee==null?void 0:ee.map(fe=>((fe==null?void 0:fe.name)==="组信息选项"&&(fe.contents=oe),fe))}ee=Ve.formToOptionsContents(ee),b.value=await Ve.selectToBase(E.cloneDeep(ee))}},Me=async x=>{await Le(x),T.value=b.value},I=(x,V)=>{if((V==null?void 0:V.type)=="Select"&&(x==null?void 0:x.key)==="selectRelateType"){const H=V==null?void 0:V.optionUrl;return(H==null?void 0:H.selectRelateType)||V[x.key]}if((V==null?void 0:V.type)=="Select"&&(x==null?void 0:x.key)==="menuSelect"){const H=V==null?void 0:V.optionUrl;return(H==null?void 0:H.menuSelect)||V[x.key]}if((V==null?void 0:V.type)=="Select"&&(x==null?void 0:x.key)==="groupSelect"){const H=V==null?void 0:V.optionUrl;return(H==null?void 0:H.groupSelect)||V[x.key]}if((V==null?void 0:V.type)=="Select"&&(x==null?void 0:x.key)==="originalContent")return(V==null?void 0:V.value)||V[x.key];if((V==null?void 0:V.type)=="Select"&&(x==null?void 0:x.key)==="multiple"){const H=V[x.key];return xl(H)?H:x.default}return(x==null?void 0:x.label)==="类型"&&V[x.key]===""?"Input":(x==null?void 0:x.key)==="isFormColHidden"&&!V[x.key]?!1:V[x.key]},Q=async x=>{var ne,N,ce,Oe,O,re,K,J,Te;y.value=!0;let V=[];const H=await((ce=(N=(ne=Ve.FormContent)==null?void 0:ne.find(de=>(de==null?void 0:de.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:N.value)==null?void 0:ce.value)?await((J=(K=(re=Ve.FormContent)==null?void 0:re.find(de=>(de==null?void 0:de.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:K.value)==null?void 0:J.value):(O=(Oe=Ve.FormContent)==null?void 0:Oe.find(de=>(de==null?void 0:de.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:O.value;if(H==null||H.forEach(de=>{v.value++,V.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?void 0:de.label)==="属性名"?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):I(de,x),id:v.value,contents:de==null?void 0:de.options})}),x!=null&&x.menuSelect&&((Te=x==null?void 0:x.menuSelect)==null?void 0:Te.length)>0){const de=await Ve.menuToContentType(x==null?void 0:x.menuSelect);V=V==null?void 0:V.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=de),ee))}z.value=x==null?void 0:x.id,T.value=await Ve.selectToBase(Ve.formToOptionsContents(V)),b.value=await Ve.selectToBase(Ve.formToOptionsContents(V))},G=x=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,H;ie.value=(V=E.cloneDeep(ie.value))==null?void 0:V.filter(ne=>(ne==null?void 0:ne.id)!==(x==null?void 0:x.id)),l("change",(H=E.cloneDeep(i.originalItemContents))==null?void 0:H.map(ne=>((ne==null?void 0:ne.key)==="tableToForm"&&(ne.contents=ie.value),ne))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},te=()=>{y.value=!1,T.value=[],z.value=""},Re=async()=>{var ne,N,ce,Oe,O,re,K,J,Te,de;T.value=b.value;let x={};z.value!==""?x.id=z.value:(v.value++,x.id="id"+v.value);let V=await((ce=(N=(ne=Ve.FormContent)==null?void 0:ne.find(ee=>{var oe,fe;return(ee==null?void 0:ee.key)===(((fe=(oe=T.value)==null?void 0:oe.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:N.value)==null?void 0:ce.value)??((O=(Oe=Ve.FormContent)==null?void 0:Oe.find(ee=>{var oe,fe;return(ee==null?void 0:ee.key)===(((fe=(oe=T.value)==null?void 0:oe.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:O.value);if((re=T.value)==null||re.forEach(ee=>{const oe=V==null?void 0:V.find(fe=>(fe==null?void 0:fe.label)===(ee==null?void 0:ee.label));oe&&(x[oe.key]=ee.value)}),x.name=x.label,(K=ie.value)!=null&&K.find(ee=>ee.id===x.id))ie.value=(J=ie.value)==null?void 0:J.map(ee=>(ee.id===x.id&&(ee=x),ee));else{let ee=E.cloneDeep(ie.value);ie.value||(ie.value=[]),ee.push(x),ie.value=ee}ie.value=ie.value.map(({id:ee,...oe})=>oe),y.value=!1,z.value="";let H=E.cloneDeep(i.originalItemContents);(Te=E.cloneDeep(i.originalItemContents))!=null&&Te.find(ee=>(ee==null?void 0:ee.key)==="tableToForm")?H=(de=E.cloneDeep(i.originalItemContents))==null?void 0:de.map(ee=>((ee==null?void 0:ee.key)==="tableToForm"&&(ee.contents=ie.value),ee)):H.push({key:"tableToForm",contents:ie.value}),l("change",H)},Qe=x=>{$.value=!0;let V=[];Ca==null||Ca.forEach(H=>{v.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:x[H.key],id:v.value,contents:H==null?void 0:H.options})}),z.value=x==null?void 0:x.id,m.value=V,S.value=V};e.watch(()=>D.value,()=>{var V,H;let x=E.cloneDeep(i.originalItemContents);(V=E.cloneDeep(i.originalItemContents))!=null&&V.find(ne=>(ne==null?void 0:ne.key)==="page")?x=(H=E.cloneDeep(i.originalItemContents))==null?void 0:H.map(ne=>((ne==null?void 0:ne.key)==="page"&&(ne.contents=D.value),ne)):x.push({key:"page",contents:D.value}),l("change",x)},{deep:!0});const X=x=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,H;Z.value=(V=E.cloneDeep(Z.value))==null?void 0:V.filter(ne=>(ne==null?void 0:ne.id)!==(x==null?void 0:x.id)),l("change",(H=E.cloneDeep(i.originalItemContents))==null?void 0:H.map(ne=>((ne==null?void 0:ne.key)==="extraButton"&&(ne.contents=Z.value),ne))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>{var H,ne,N,ce,Oe;m.value=S.value;let x={};if(z.value!==""?x.id=z.value:(v.value++,x.id="id"+v.value),(H=m.value)==null||H.forEach(O=>{const re=Ca==null?void 0:Ca.find(K=>(K==null?void 0:K.label)===(O==null?void 0:O.label));re?x[re.key]=O.value:O!=null&&O.children&&O.children.length>0&&(x.children=O.children)}),(ne=Z.value)!=null&&ne.find(O=>O.id===x.id))Z.value=(N=Z.value)==null?void 0:N.map(O=>(O.id===x.id&&(O=x),O));else{let O=E.cloneDeep(Z.value)??[];O.push(x),Z.value=O}$.value=!1,z.value="";let V=E.cloneDeep(i.originalItemContents);(ce=E.cloneDeep(i.originalItemContents))!=null&&ce.find(O=>(O==null?void 0:O.key)==="extraButton")?V=(Oe=E.cloneDeep(i.originalItemContents))==null?void 0:Oe.map(O=>((O==null?void 0:O.key)==="extraButton"&&(O.contents=Z.value),O)):V.push({key:"extraButton",contents:Z.value}),l("change",V)},ue=x=>{let V=E.cloneDeep(S.value);V=V==null?void 0:V.map(H=>(H.children||(H.value=x==null?void 0:x[H.name]),H)),S.value=V},ve=()=>{$.value=!1,m.value=[],z.value=""},Ce=x=>{p.value=!0;let V=[];Sa==null||Sa.forEach(H=>{v.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:x[H.key],id:v.value,contents:H==null?void 0:H.options})}),z.value=x==null?void 0:x.id,F.value=V,L.value=V},ke=x=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,H;B.value=(V=E.cloneDeep(B.value))==null?void 0:V.filter(ne=>(ne==null?void 0:ne.id)!==(x==null?void 0:x.id)),l("change",(H=E.cloneDeep(i.originalItemContents))==null?void 0:H.map(ne=>((ne==null?void 0:ne.key)==="rowButton"&&(ne.contents=B.value),ne))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Fe=()=>{s.value=!0;let x=[];Vt==null||Vt.forEach(V=>{v.value++,x.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:v.value,contents:V==null?void 0:V.options})}),g.value=x,C.value=x},q=()=>{p.value=!0;let x=[];Sa==null||Sa.forEach(V=>{v.value++,x.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:v.value,contents:V==null?void 0:V.options})}),F.value=x,L.value=x},Y=x=>{let V=E.cloneDeep(L.value);V=V==null?void 0:V.map(H=>(H.children||(H.value=x==null?void 0:x[H.name]),H)),L.value=V},k=()=>{var H,ne,N,ce,Oe;F.value=L.value;let x={};if(z.value!==""?x.id=z.value:(v.value++,x.id="id"+v.value),(H=F.value)==null||H.forEach(O=>{const re=Sa==null?void 0:Sa.find(K=>(K==null?void 0:K.label)===(O==null?void 0:O.label));re?x[re.key]=O.value:O!=null&&O.children&&O.children.length>0&&(x.children=O.children)}),(ne=B.value)!=null&&ne.find(O=>O.id===x.id))B.value=(N=B.value)==null?void 0:N.map(O=>(O.id===x.id&&(O=x),O));else{let O=E.cloneDeep(B.value);O.push(x),B.value=O}p.value=!1,z.value="";let V=E.cloneDeep(i.originalItemContents);(ce=E.cloneDeep(i.originalItemContents))!=null&&ce.find(O=>(O==null?void 0:O.key)==="rowButton")?V=(Oe=E.cloneDeep(i.originalItemContents))==null?void 0:Oe.map(O=>((O==null?void 0:O.key)==="rowButton"&&(O.contents=B.value),O)):V.push({key:"rowButton",contents:B.value}),l("change",V)},ge=()=>{p.value=!1,z.value="",L.value=[],F.value=[]},Ie=x=>{s.value=!0;let V=[];Vt==null||Vt.forEach(H=>{v.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:v.value,contents:H==null?void 0:H.options})}),g.value=V,j.value=x==null?void 0:x.id,C.value=V},De=x=>{var V;h.value=Dl(E.cloneDeep(h.value),x==null?void 0:x.id),l("change",(V=E.cloneDeep(i.originalItemContents))==null?void 0:V.map(H=>{var ne;return(H==null?void 0:H.key)==="header"&&(H.contents=(ne=h.value)!=null&&ne.some(N=>N==null?void 0:N.children)?[h.value]:h.value),H}))},se=x=>{var H,ne,N;x.type==="fix"?x.id!==""?h.value=El(h.value,x):h.value=_l(h.value,x==null?void 0:x.contents):h.value=Cl(h.value,x),h.value=(H=h.value)!=null&&H.some(ce=>ce==null?void 0:ce.children)?[h.value]:h.value,z.value="";let V=E.cloneDeep(i.originalItemContents);(ne=E.cloneDeep(i.originalItemContents))!=null&&ne.find(ce=>(ce==null?void 0:ce.key)==="header")?V=(N=E.cloneDeep(i.originalItemContents))==null?void 0:N.map(ce=>((ce==null?void 0:ce.key)==="header"&&(ce.contents=h.value),ce)):V.push({key:"header",contents:h.value}),l("change",V)},le=x=>{var H;s.value=!0;let V=[];Vt==null||Vt.forEach(ne=>{v.value++,V.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:x[ne.key],id:v.value,contents:ne==null?void 0:ne.options})}),x!=null&&x.children&&((H=x==null?void 0:x.children)==null?void 0:H.length)>0&&V.push({children:x==null?void 0:x.children,isFormColHidden:!0}),z.value=x==null?void 0:x.id,j.value="",g.value=V,C.value=V},pe=x=>{let V=E.cloneDeep(C.value);V=V==null?void 0:V.map(H=>(H.children||(H.value=x==null?void 0:x[H.name]),H)),C.value=V},Se=()=>{s.value=!1,z.value="",j.value="",C.value=[]},Ye=()=>{var H,ne,N,ce,Oe,O;g.value=C.value;let x={};if(z.value!==""?x.id=z.value:(v.value++,x.id="id"+v.value),(H=g.value)==null||H.forEach(re=>{const K=Vt==null?void 0:Vt.find(J=>(J==null?void 0:J.label)===(re==null?void 0:re.label));K?x[K.key]=re.value:re!=null&&re.children&&re.children.length>0&&(x.children=re.children)}),(ne=h.value)!=null&&ne.find(re=>re.id===x.id))h.value=(N=h.value)==null?void 0:N.map(re=>(re.id===x.id&&(re=x),re));else{let re=E.cloneDeep(h.value)??[];j.value===""?re.push(x):re=re==null?void 0:re.map(K=>(K.id===j.value&&(K.children||(K.children=[]),K.children.push(x)),K)),h.value=re}h.value=(ce=h.value)!=null&&ce.some(re=>re==null?void 0:re.children)?[h.value]:h.value,s.value=!1,z.value="",j.value="";let V=E.cloneDeep(i.originalItemContents);(Oe=E.cloneDeep(i.originalItemContents))!=null&&Oe.find(re=>(re==null?void 0:re.key)==="header")?V=(O=E.cloneDeep(i.originalItemContents))==null?void 0:O.map(re=>((re==null?void 0:re.key)==="header"&&(re.contents=h.value),re)):V.push({key:"header",contents:h.value}),l("change",V)},dt=x=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,H;h.value=(V=E.cloneDeep(h.value))==null?void 0:V.filter(ne=>(ne==null?void 0:ne.id)!==(x==null?void 0:x.id)),l("change",(H=E.cloneDeep(i.originalItemContents))==null?void 0:H.map(ne=>{var N;return(ne==null?void 0:ne.key)==="header"&&(ne.contents=(N=h.value)!=null&&N.some(ce=>ce==null?void 0:ce.children)?[h.value]:h.value),ne})),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var x,V,H,ne,N,ce,Oe,O,re,K,J,Te,de,ee,oe,fe,ye,Ee,xe;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(u.value=E.cloneDeep(i.originalItemContents),h.value=(V=(x=u.value)==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:V.contents,B.value=(ne=(H=u.value)==null?void 0:H.find(W=>(W==null?void 0:W.key)==="rowButton"))==null?void 0:ne.contents,Z.value=(ce=(N=u.value)==null?void 0:N.find(W=>(W==null?void 0:W.key)==="extraButton"))==null?void 0:ce.contents,D.value=(O=(Oe=u.value)==null?void 0:Oe.find(W=>(W==null?void 0:W.key)==="page"))!=null&&O.contents?!!((K=(re=u.value)==null?void 0:re.find(W=>(W==null?void 0:W.key)==="page"))!=null&&K.contents):!1,ie.value=(Te=(J=u.value)==null?void 0:J.find(W=>(W==null?void 0:W.key)==="tableToForm"))==null?void 0:Te.contents,h.value=(de=h.value)==null?void 0:de.map((W,Pe)=>(Array.isArray(W)?W=bi(W):W={label:(W==null?void 0:W.label)??"",prop:(W==null?void 0:W.label)==="操作"?"operate":W==null?void 0:W.prop,width:W!=null&&W.width?parseInt(W.width):"",fixed:(W==null?void 0:W.fixed)??void 0,sortable:(W==null?void 0:W.sortable)??!1,align:(W==null?void 0:W.align)??"left",showOverflowTooltip:(W==null?void 0:W.showOverflowTooltip)??!0,isNotDrag:(W==null?void 0:W.isNotDrag)??!1,isEditCol:(W==null?void 0:W.isEditCol)??!1,isOperate:(W==null?void 0:W.isOperate)??!1,id:(W==null?void 0:W.id)??Pe,formMenuSelect:(W==null?void 0:W.formMenuSelect)??void 0,groupSelect:(W==null?void 0:W.groupSelect)??void 0},W)),h.value=(ee=h.value)!=null&&ee.every(W=>Array.isArray(W))?(oe=h.value)==null?void 0:oe[0]:h.value,B.value=(fe=B.value)==null?void 0:fe.map((W,Pe)=>W={label:(W==null?void 0:W.label)??"",type:(W==null?void 0:W.type)??"",textColor:(W==null?void 0:W.textColor)??"#000000",id:(W==null?void 0:W.id)??Pe}),Z.value=(ye=Z.value)==null?void 0:ye.map((W,Pe)=>W={label:(W==null?void 0:W.label)??"",type:(W==null?void 0:W.type)??"",background:(W==null?void 0:W.background)??"var(--ssComponent-primary-color)",id:(W==null?void 0:W.id)??Pe}),ie.value)ie.value=(xe=ie.value)==null?void 0:xe.map(W=>{v.value++;let Pe=W;return Pe.id=v.value,Pe});else{let W=[];const Pe=(Ee=Ve.getColumnChild(E.cloneDeep(h.value)))==null?void 0:Ee.filter(be=>(be==null?void 0:be.prop)!=="operate");Pe==null||Pe.forEach(be=>{var He;v.value++,W.push({label:be==null?void 0:be.label,name:(be==null?void 0:be.prop)||(be==null?void 0:be.label),type:be!=null&&be.groupSelect?"Select":"Input",value:"",id:v.value,contents:be==null?void 0:be.options,menuSelect:be==null?void 0:be.formMenuSelect,groupSelect:(He=be==null?void 0:be.groupSelect)==null?void 0:He.split(":"),selectRelateType:"关联绑定列"})}),ie.value=W}},{deep:!0,immediate:!0}),(x,V)=>{const H=e.resolveComponent("svg-icon"),ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("div",$i,[e.createElementVNode("div",ji,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ne,{class:"icon-content",onClick:Fe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(N,ce)=>(e.openBlock(),e.createElementBlock("div",{key:ce},[e.createElementVNode("div",Ki,[e.createElementVNode("div",Wi,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",Hi,[e.createVNode(H,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>Ie(N)},null,8,["onClick"]),e.createVNode(H,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>le(N)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>dt(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",qi,[e.createVNode(Sl,{tableChildContents:N==null?void 0:N.children,onDeleteChange:De,onFixChange:se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Xi,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:q},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(N,ce)=>(e.openBlock(),e.createElementBlock("div",{key:ce},[e.createElementVNode("div",Gi,[e.createElementVNode("div",Ji,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",Zi,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Oe=>Ce(N)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>ke(N)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Qi,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:Be},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.value,(N,ce)=>(e.openBlock(),e.createElementBlock("div",{key:ce},[e.createElementVNode("div",ts,[e.createElementVNode("div",as,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",ns,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Oe=>Qe(N)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>X(N)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",os,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:et},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(N,ce)=>(e.openBlock(),e.createElementBlock("div",{key:ce},[e.createElementVNode("div",rs,[e.createElementVNode("div",is,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",ss,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Oe=>Q(N)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Oe=>G(N)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",cs,[e.createElementVNode("div",us,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(It._sfc_main$1,{modelValue:D.value,"onUpdate:modelValue":V[0]||(V[0]=N=>D.value=N)},null,8,["modelValue"])])])]),e.createVNode(Jt.ssDialog,{visible:s.value,onBeforeDestroy:Se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ds,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:pe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ps,[e.createVNode(ne,{onClick:Se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ne,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",fs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",hs,[e.createVNode(ne,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ne,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:$.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ms,[e.createVNode(ne,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ne,{class:"ok-button button",onClick:R,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:y.value,onBeforeDestroy:te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",gs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:Le,onChangeVisible:we,onBlurChange:Me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ys,[e.createVNode(ne,{onClick:te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ne,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ks=Lt._export_sfc(bs,[["__scopeId","data-v-7a6b87b5"]]),xs=E.useModelComp(E.pinia),{pageMapState:ws}=E.storeToRefs(xs),Ds=E.useMenuState(E.pinia),{activeMenuPath:_s}=E.storeToRefs(Ds),Es=e.ref(24),Cs=e.ref(6),Ss=e.ref(70),Ts=e.ref(.18),Bs=e.ref(45),Is=(n,r,i,l)=>{var u,s,y,h,p,g,D,C,z,j,B,Z,F,L,$,m;return{x:((s=(u=n==null?void 0:n.value)==null?void 0:u.tableData)==null?void 0:s.x)||r%2*12,y:((h=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:h.y)||r,w:((g=(p=n==null?void 0:n.value)==null?void 0:p.tableData)==null?void 0:g.w)||Es.value,h:((C=(D=n==null?void 0:n.value)==null?void 0:D.tableData)==null?void 0:C.h)||i,minW:((j=(z=n==null?void 0:n.value)==null?void 0:z.tableData)==null?void 0:j.minW)||Cs.value,minH:((Z=(B=n==null?void 0:n.value)==null?void 0:B.tableData)==null?void 0:Z.minH)||Ts.value,maxH:((L=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:L.maxH)||Bs.value,i:((m=($=n==null?void 0:n.value)==null?void 0:$.tableData)==null?void 0:m.i)||r,id:(n==null?void 0:n.id)||r+"",component:l}},Ns=(n,r)=>{var l,u,s,y,h,p,g,D;let i=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((l=n==null?void 0:n.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((y=(s=(u=n==null?void 0:n.compData)==null?void 0:u.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:y.length)===0)return 2}else((h=n==null?void 0:n.comp)==null?void 0:h.toUpperCase())==="FORM"&&(i=((D=(g=(p=n==null?void 0:n.compData)==null?void 0:p.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:g.contents)==null?void 0:D.length)/5);return i*2},Tl=(n,r,i)=>{var y,h;const l=(h=(y=ws.value)==null?void 0:y[_s.value])==null?void 0:h.filter(p=>{var g;return((g=p==null?void 0:p.key)==null?void 0:g.type)==="gridLayout"}),u=l==null?void 0:l.find(p=>{var g,D,C;return((C=(D=(g=p==null?void 0:p.value)==null?void 0:g.tableData)==null?void 0:D.component)==null?void 0:C.id)===n.id}),s=Ns(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((p,g)=>Tl(p,g))),{...Is(u,r,s,n)}},As=(n,r)=>{if((n==null?void 0:n.length)===0)return[];const i=E.cloneDeep(n);return Array.isArray(n)?i==null?void 0:i.map((l,u)=>Tl(l,u)):[]},Vs=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}]}]}}),Os=(n,r)=>n==null?void 0:n.map(i=>{for(const l in r)if(l===(i==null?void 0:i.prop))return{...i,value:r[l]};return i}),Ms=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.ref([]);e.watch(()=>i.compType,h=>{var D;const p=Vs(i==null?void 0:i.optionItems),g=h?(D=p[h==null?void 0:h.toUpperCase()])==null?void 0:D[i==null?void 0:i.target]:[];u.value=g==null?void 0:g.map(C=>{for(const[z,j]of Object.entries((i==null?void 0:i.comp)||{}))if((C==null?void 0:C.prop)===z)return{...C,value:j};return C})},{immediate:!0});const s=h=>It.getComponent(h),y=h=>{var p,g;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?u.value=(p=u.value)==null?void 0:p.map(D=>{var C;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(C=D==null?void 0:D.options)==null?void 0:C.map(z=>({...z,disabled:!0}))}:(D==null?void 0:D.prop)==="isGridLayout"?{...D,disabled:!0}:D}):u.value=(g=u.value)==null?void 0:g.map(D=>{var C;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(C=D==null?void 0:D.options)==null?void 0:C.map(z=>({...z,disabled:!1}))}:(D==null?void 0:D.prop)==="isGridLayout"?{...D,disabled:!1}:D}),l("change",{target:i==null?void 0:i.target,styleConfigs:u.value,prop:h==null?void 0:h.prop})};return(h,p)=>{const g=e.resolveComponent("el-col"),D=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,C=>(e.openBlock(),e.createBlock(D,{class:"style-row",key:C==null?void 0:C.prop},{default:e.withCtx(()=>[e.createVNode(g,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C==null?void 0:C.label)+":",1)]),_:2},1024),e.createVNode(g,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(C.type)),{modelValue:C.value,"onUpdate:modelValue":z=>C.value=z,content:C==null?void 0:C.options,optionUrl:C==null?void 0:C.optionUrl,disabled:C==null?void 0:C.disabled,activeText:C==null?void 0:C.activeText,inactiveText:C==null?void 0:C.inactiveText,onChange:z=>y(C)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),zs=Lt._export_sfc(Ms,[["__scopeId","data-v-6c233914"]]),Rs=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:r}){const i=n,l=r,u=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),y=L=>L==null?void 0:L.reduce(($,m)=>($[m==null?void 0:m.prop]=m==null?void 0:m.rule,$),{}),h=e.computed(()=>({formRules:y(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),p=e.ref([]),g=e.ref(""),D=(L,$,m)=>{var T;let S=[];(i==null?void 0:i.activeTabName)==="任务配置"?(S=[{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:$}]},{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:"暂停"}]}],s.value=[{prop:"任务名称",rule:u},{prop:"任务关键词",rule:u},{prop:"执行任务",rule:u},{prop:"执行动作",rule:u},{prop:"执行交互",rule:u}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(S=[{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:(T=i==null?void 0:i.relatedData)==null?void 0:T.map(b=>({label:b==null?void 0:b.任务名称,value:b==null?void 0:b.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:u},{prop:"关联状态",rule:u},{prop:"关联形式",rule:u},{prop:"关联任务集合",rule:u}]);let v;return m&&(m==null?void 0:m.length)>0?v=[...S,...C(L,$,m)]:v=S,v},C=(L,$,m)=>{const S=[{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 m?S==null?void 0:S.filter(v=>m==null?void 0:m.includes(v==null?void 0:v.prop)):S},z=(L,$)=>{var b,ie,Be,et,we,Le,Me,I,Q;const m=((we=(et=(Be=(ie=(b=i==null?void 0:i.comp)==null?void 0:b.compData)==null?void 0:ie.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:Be.contents)==null?void 0:et.filter(G=>(G==null?void 0:G.label)!=="操作"))==null?void 0:we.map(G=>({value:G==null?void 0:G.prop,label:G.label})))||[],S=/button/i,v=((Q=(I=(Me=(Le=i==null?void 0:i.comp)==null?void 0:Le.compData)==null?void 0:Me.filter(G=>S.test(G==null?void 0:G.key)))==null?void 0:I.flatMap(G=>G==null?void 0:G.contents))==null?void 0:Q.map(G=>({value:G==null?void 0:G.label,label:G.label})))||[],T=D(m,v,L);p.value=$?Os(T,$):T,L&&(L==null?void 0:L.length)>0&&s.value.push(...L==null?void 0:L.map(G=>({prop:G,rule:u})))};e.onMounted(()=>{z(null,i==null?void 0:i.extendItem)});const j=L=>{const $=L==null?void 0:L[g.value];if(g.value==="执行任务"){if(!($!=null&&$.join("/")))return;const m=$==null?void 0:$.join("/");z(m==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:m==="进度设置/进度条"?["进度关键词"]:null,L)}},B=L=>{l("change",{target:i==null?void 0:i.target,extendConfigs:L})},Z=(L,$)=>{g.value=$==null?void 0:$.changeProp,j(L)},F=L=>{l("onButtonClick",L)};return(L,$)=>(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:B,onBlurChange:Z,onOnButtonClick:F},null,8,["rowContents","formRules","buttonValue"]))}}),Ps=Lt._export_sfc(Rs,[["__scopeId","data-v-7c660c1f"]]),Ls={};function Fs(n,r){return null}const $s=Lt._export_sfc(Ls,[["render",Fs]]),js={class:"form-operate-content"},Us={class:"form-operate-item"},Ks={class:"operate-title"},Ws={class:"operate-content"},Hs={class:"fix-content"},qs={class:"fix-button"},Xs={class:"operate-title"},Ys={class:"operate-content"},Gs={class:"fix-content"},Js={class:"fix-button"},Zs={style:{display:"flex","justify-content":"space-between"}},Qs={class:"form-content"},ec={class:"dialog-footer"},tc={class:"form-content"},ac={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(!1),s=e.ref([]),y=e.ref([]),h=e.ref(!1),p=e.ref([]),g=e.ref([]),D=e.ref(""),C=e.ref(!1),z=e.ref(0),j=e.ref([]),B=e.ref([]),Z=(I,Q)=>{if((Q==null?void 0:Q.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const G=Q==null?void 0:Q.optionUrl;return(G==null?void 0:G.selectRelateType)||Q[I.key]}if((Q==null?void 0:Q.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const G=Q==null?void 0:Q.optionUrl;return(G==null?void 0:G.menuSelect)||Q[I.key]}if((Q==null?void 0:Q.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const G=Q==null?void 0:Q.optionUrl;return(G==null?void 0:G.groupSelect)||Q[I.key]}if((Q==null?void 0:Q.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(Q==null?void 0:Q.value)||Q[I.key];if((Q==null?void 0:Q.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const G=Q[I.key];return xl(G)?G:I.default}return(I==null?void 0:I.label)==="类型"&&Q[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!Q[I.key]?!1:Q[I.key]},F=async I=>{var te,Re,Qe,X,R,ue;u.value=!0;let Q=[];const G=await((Qe=(Re=(te=Ve.FormContent)==null?void 0:te.find(ve=>(ve==null?void 0:ve.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Re.value)==null?void 0:Qe.value)??((R=(X=Ve.FormContent)==null?void 0:X.find(ve=>(ve==null?void 0:ve.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:R.value);if(G==null||G.forEach(ve=>{z.value++,Q.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:Z(ve,I),id:z.value,contents:ve==null?void 0:ve.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((ue=I==null?void 0:I.menuSelect)==null?void 0:ue.length)>0){const ve=await Ve.menuToContentType(I==null?void 0:I.menuSelect);Q=Q==null?void 0:Q.map(Ce=>((Ce==null?void 0:Ce.name)==="组信息选项"&&(Ce.contents=ve),Ce))}D.value=I==null?void 0:I.id,s.value=await Ve.selectToBase(Ve.formToOptionsContents(Q)),y.value=await Ve.selectToBase(Ve.formToOptionsContents(Q))},L=I=>{var G;h.value=!0;let Q=[];(G=Ve.FormButton)==null||G.forEach(te=>{z.value++,Q.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"&&I[te.key]===""?"normal":I[te.key],id:z.value,contents:te==null?void 0:te.options})}),j.value=Q,B.value=Q,D.value=I==null?void 0:I.id};e.watch(()=>C.value,()=>{var Q,G;let I=E.cloneDeep(i.originalItemContents);(Q=E.cloneDeep(i.originalItemContents))!=null&&Q.find(te=>(te==null?void 0:te.key)==="enableWrap")?I=(G=E.cloneDeep(i.originalItemContents))==null?void 0:G.map(te=>((te==null?void 0:te.key)==="enableWrap"&&(te.contents=!C.value),te)):I.push({key:"enableWrap",contents:!C.value}),l("change",I)},{deep:!0});const $=()=>{var G,te,Re,Qe,X;j.value=B.value;let I={};if(D.value!==""?I.id=D.value:(z.value++,I.id="id"+z.value),(G=j.value)==null||G.forEach(R=>{var ve;const ue=(ve=Ve.FormButton)==null?void 0:ve.find(Ce=>(Ce==null?void 0:Ce.label)===(R==null?void 0:R.label));ue&&(I[ue.key]=R.value)}),(te=p.value)!=null&&te.find(R=>R.id===I.id))p.value=(Re=p.value)==null?void 0:Re.map(R=>(R.id===I.id&&(R=I),R));else{let R=E.cloneDeep(p.value);p.value||(p.value=[]),R.push(I),p.value=R}h.value=!1,D.value="";let Q=E.cloneDeep(i.originalItemContents);(Qe=E.cloneDeep(i.originalItemContents))!=null&&Qe.find(R=>(R==null?void 0:R.key)==="formButton")?Q=(X=E.cloneDeep(i.originalItemContents))==null?void 0:X.map(R=>((R==null?void 0:R.key)==="formButton"&&(R.contents=p.value),R)):Q.push({key:"formButton",contents:p.value}),l("change",Q)},m=I=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Q,G;g.value=(Q=E.cloneDeep(g.value))==null?void 0:Q.filter(te=>(te==null?void 0:te.id)!==(I==null?void 0:I.id)),l("change",(G=E.cloneDeep(i.originalItemContents))==null?void 0:G.map(te=>((te==null?void 0:te.key)==="formContent"&&(te.contents=g.value),te))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=I=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Q,G;p.value=(Q=E.cloneDeep(p.value))==null?void 0:Q.filter(te=>(te==null?void 0:te.id)!==(I==null?void 0:I.id)),l("change",(G=E.cloneDeep(i.originalItemContents))==null?void 0:G.map(te=>((te==null?void 0:te.key)==="formButton"&&(te.contents=p.value),te))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=()=>{var Q;h.value=!0;let I=[];(Q=Ve.FormButton)==null||Q.forEach(G=>{z.value++,I.push({label:G==null?void 0:G.label,name:G==null?void 0:G.label,type:G.type,value:(G==null?void 0:G.label)==="类型"?"normal":"",id:z.value,contents:G==null?void 0:G.options})}),j.value=I,B.value=I},T=()=>{var Q,G,te;u.value=!0;let I=[];(te=(G=(Q=Ve.FormContent)==null?void 0:Q.find(Re=>(Re==null?void 0:Re.key)==="Input"))==null?void 0:G.value)==null||te.forEach(Re=>{z.value++,I.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)==="类型"?"Input":"",id:z.value,contents:Re==null?void 0:Re.options})}),s.value=I,y.value=I},b=I=>{let Q=E.cloneDeep(B.value);Q=Q==null?void 0:Q.map(G=>(G.value=I==null?void 0:I[G.name],G)),B.value=Q},ie=I=>{const Q=I.find(Re=>(Re==null?void 0:Re.name)==="类型");if((Q==null?void 0:Q.value)!="Select")return;const G=I.find(Re=>(Re==null?void 0:Re.name)==="多选"),te=I.find(Re=>(Re==null?void 0:Re.name)==="初始值");G!=null&&G.value&&Ao.isString(te.value)&&(te.value=[te.value]),!(G!=null&&G.value)&&!Ao.isString(te.value)&&(te.value="")},Be=async I=>{var Q,G,te,Re,Qe,X,R,ue,ve,Ce,ke,Fe;if((I==null?void 0:I.类型)!==((G=(Q=y.value)==null?void 0:Q.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:G.value)){let q=[];const Y=await((Qe=(Re=(te=Ve.FormContent)==null?void 0:te.find(k=>(k==null?void 0:k.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:Re.value)==null?void 0:Qe.value)?await((Ce=(ve=(ue=Ve.FormContent)==null?void 0:ue.find(k=>(k==null?void 0:k.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:ve.value)==null?void 0:Ce.value):(R=(X=Ve.FormContent)==null?void 0:X.find(k=>(k==null?void 0:k.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:R.value;if(Y==null||Y.forEach(k=>{var Ie,De;z.value++;const ge=ii(k==null?void 0:k.default)?(I==null?void 0:I[k.label])??k.value??"":k==null?void 0:k.default;q.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:ge,prop:k==null?void 0:k.prop,id:z.value,contents:k==null?void 0:k.options,width:((De=(Ie=y.value)==null?void 0:Ie[0])==null?void 0:De.width)??1})}),I!=null&&I.菜单选项&&((ke=I==null?void 0:I.菜单选项)==null?void 0:ke.length)>0){const k=await Ve.menuToContentType(I==null?void 0:I.菜单选项);q=q==null?void 0:q.map(ge=>((ge==null?void 0:ge.name)==="组信息选项"&&(ge.contents=k),ge))}ie(q),y.value=await Ve.selectToBase(E.cloneDeep(q)),s.value=await Ve.selectToBase(E.cloneDeep(q))}else{let q=E.cloneDeep(y.value);if(q=q==null?void 0:q.map(Y=>(Y.value=I==null?void 0:I[Y.name],Y)),I!=null&&I.菜单选项&&((Fe=I==null?void 0:I.菜单选项)==null?void 0:Fe.length)>0){const Y=await Ve.menuToContentType(I==null?void 0:I.菜单选项);q=q==null?void 0:q.map(k=>((k==null?void 0:k.name)==="组信息选项"&&(k.contents=Y),k))}q=Ve.formToOptionsContents(q),ie(q),y.value=await Ve.selectToBase(E.cloneDeep(q))}},et=I=>{I||(s.value=y.value)},we=async I=>{await Be(I),s.value=y.value},Le=kl(async()=>{var te,Re,Qe,X,R,ue,ve,Ce,ke,Fe,q,Y;s.value=y.value;let I={};I.width=((Re=(te=s.value)==null?void 0:te[0])==null?void 0:Re.width)??1,D.value!==""?I.id=D.value:(z.value++,I.id="id"+z.value);let Q=await((R=(X=(Qe=Ve.FormContent)==null?void 0:Qe.find(k=>{var ge,Ie;return(k==null?void 0:k.key)===(((Ie=(ge=s.value)==null?void 0:ge.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:X.value)==null?void 0:R.value)??((ve=(ue=Ve.FormContent)==null?void 0:ue.find(k=>{var ge,Ie;return(k==null?void 0:k.key)===(((Ie=(ge=s.value)==null?void 0:ge.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:ve.value);if((Ce=s.value)==null||Ce.forEach(k=>{const ge=Q==null?void 0:Q.find(Ie=>(Ie==null?void 0:Ie.label)===(k==null?void 0:k.label));ge&&(I[ge.key]=k.value)}),I.width=I.width?I.width:1,I.key=I==null?void 0:I.label,I.isFormColHidden=I==null?void 0:I.isFormColHidden,(ke=g.value)!=null&&ke.find(k=>k.id===I.id))g.value=(Fe=g.value)==null?void 0:Fe.map(k=>(k.id===I.id&&(k=I),k));else{let k=E.cloneDeep(g.value);k.push(I),g.value=k}g.value=g.value.map(({id:k,...ge})=>ge),u.value=!1,D.value="";let G=E.cloneDeep(i.originalItemContents);(q=E.cloneDeep(i.originalItemContents))!=null&&q.find(k=>(k==null?void 0:k.key)==="formContent")?G=(Y=E.cloneDeep(i.originalItemContents))==null?void 0:Y.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=g.value),k)):G.push({key:"formContent",contents:g.value}),l("change",G)},300),Me=()=>{u.value=!1,h.value=!1,D.value="",y.value=[],B.value=[]};return e.watch(()=>i.originalItemContents,()=>{var Q,G,te,Re,Qe,X;if(!i.originalItemContents||i.originalItemContents.length===0)return;const I=E.cloneDeep(i.originalItemContents);g.value=((Q=I==null?void 0:I.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:Q.contents)??[],p.value=((G=I==null?void 0:I.find(R=>(R==null?void 0:R.key)==="formButton"))==null?void 0:G.contents)??[],C.value=(te=I==null?void 0:I.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&te.contents?!((Re=I==null?void 0:I.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&Re.contents):!0,g.value=(Qe=E.cloneDeep(g.value))==null?void 0:Qe.map((R,ue)=>{var Ce;let ve=R;return ve.id=(R==null?void 0:R.id)??ue,R!=null&&R.label||(R.label=(R==null?void 0:R.key)??(R==null?void 0:R.label)??""),R!=null&&R.type||(R.type=(R==null?void 0:R.type)??""),R.contents=((Ce=R==null?void 0:R.options)==null?void 0:Ce.length)===0?(R==null?void 0:R.contents)??"":R==null?void 0:R.options,ve}),g.value=Ve.formToOptionsContents(g.value),p.value=(X=p.value)==null?void 0:X.map((R,ue)=>R={label:(R==null?void 0:R.label)??"",type:(R==null?void 0:R.type)??"",background:(R==null?void 0:R.background)??"var(--ssComponent-primary-color)",id:ue})},{deep:!0,immediate:!0}),(I,Q)=>{const G=e.resolveComponent("svg-icon"),te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",js,[e.createElementVNode("div",Us,[e.createElementVNode("div",Ks,[Q[2]||(Q[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[Q[1]||(Q[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(Re,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",Hs,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",qs,[e.createVNode(G,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>F(Re)},null,8,["onClick"]),e.createVNode(G,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>m(Re)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Xs,[Q[4]||(Q[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:v},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[Q[3]||(Q[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(Re,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",Gs,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",Js,[e.createVNode(G,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>L(Re)},null,8,["onClick"]),e.createVNode(G,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>S(Re)},null,8,["onClick"])])])]))),128))]),Q[6]||(Q[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Zs,[Q[5]||(Q[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(It._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":Q[0]||(Q[0]=Re=>C.value=Re)},null,8,["modelValue"])])]),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:Me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Be,onChangeVisible:et,onBlurChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createVNode(te,{onClick:Me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(te,{class:"ok-button button",onClick:e.unref(Le),id:"themeButton"},{default:e.withCtx(()=>Q[8]||(Q[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:Me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",tc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:j.value,key:j.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Me,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:$},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Po=Lt._export_sfc(ac,[["__scopeId","data-v-20850524"]]),nc={class:"step-module content"},oc={class:"module-data"},lc={class:"step-module layout"},rc={class:"form-content"},ic=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=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}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),g=e.ref({}),D=e.ref([]),C=F=>{var L;g.value=F,l("change",(L=B())==null?void 0:L.compData)},z=(F,L)=>{var $,m;switch(F){case"create":($=s.value)==null||$.forEach(S=>{S.value=""}),p.value="create",h.visible=!0;break;case"update":(m=s.value)==null||m.forEach(S=>{S.value=L[S==null?void 0:S.prop]}),p.value="update",h.visible=!0;break;case"delete":D.value.splice(L,1),p.value="delete";break}},j=F=>{var L,$,m;if((F==null?void 0:F.buttonName)==="确认"){const S=E.cloneDeep(F==null?void 0:F.content);switch(Object.keys(S).forEach(v=>{S[v]===""&&delete S[v]}),p.value){case"create":D.value.push({...S,index:((L=D.value)==null?void 0:L.length)+1});break;case"update":D.value=($=D.value)==null?void 0:$.map(v=>v.index===(S==null?void 0:S.index)?{...v,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:v);break}l("change",(m=B())==null?void 0:m.compData),h.visible=!1}else h.visible=!1},B=()=>({comp:"Step",compData:[{key:"stepList",contents:D.value},{key:"stepConfig",contents:g.value}]}),Z=()=>{h.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var L,$;F&&(g.value=((L=F==null?void 0:F.find(m=>m.key==="stepConfig"))==null?void 0:L.contents)??{},D.value=(($=F==null?void 0:F.find(m=>m.key==="stepList"))==null?void 0:$.contents)??[])},{immediate:!0}),(F,L)=>{const $=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",nc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=S=>z("create"))},{icon:e.withCtx(()=>[e.createVNode($,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(S,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.title),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:T=>z("update",{...S,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>z("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",lc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:u.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Z,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",rc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),sc=Lt._export_sfc(ic,[["__scopeId","data-v-7dbd17f2"]]),cc={class:"step-module content"},uc={class:"module-data"},dc={class:"step-module layout"},pc={class:"form-content"},fc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.ref("create"),s=e.ref({}),y=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}]),p=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),g=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),D=e.reactive({visible:!1,width:"40%",title:"时间线"}),C=F=>{var L;s.value=F,l("change",(L=B())==null?void 0:L.compData)},z=(F,L)=>{var $,m;switch(F){case"create":($=p.value)==null||$.forEach(S=>{S.value=""}),u.value="create",D.visible=!0;break;case"update":(m=p.value)==null||m.forEach(S=>{S.value=L[S==null?void 0:S.prop]}),u.value="update",D.visible=!0;break;case"delete":y.value.splice(L,1),u.value="delete";break}},j=F=>{var L,$,m,S;if((F==null?void 0:F.buttonName)==="确认"){const v=E.cloneDeep(F==null?void 0:F.content);switch(Object.keys(v).forEach(T=>{v[T]===""&&delete v[T]}),u.value){case"create":($=y.value)==null||$.push({...v,index:((L=y.value)==null?void 0:L.length)+1});break;case"update":y.value=(m=y.value)==null?void 0:m.map(T=>T.index===(v==null?void 0:v.index)?{...T,content:v==null?void 0:v.content,timestamp:v==null?void 0:v.timestamp}:T);break}l("change",(S=B())==null?void 0:S.compData),D.visible=!1}else D.visible=!1},B=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:s.value}]}),Z=()=>{D.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var L,$;F&&(s.value=((L=F==null?void 0:F.find(m=>m.key==="timeLineConfig"))==null?void 0:L.contents)??{},y.value=(($=F==null?void 0:F.find(m=>m.key==="timeLineList"))==null?void 0:$.contents)??[])},{immediate:!0}),(F,L)=>{const $=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",cc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=S=>z("create"))},{icon:e.withCtx(()=>[e.createVNode($,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(S,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.content),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:T=>z("update",{...S,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>z("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",dc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:h.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:D.visible,title:D.title,onBeforeDestroy:Z,width:D.width},{default:e.withCtx(()=>[e.createElementVNode("div",pc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),hc=Lt._export_sfc(fc,[["__scopeId","data-v-39ffc861"]]),vc={};function mc(n,r){return e.openBlock(),e.createElementBlock("div")}const gc=Lt._export_sfc(vc,[["render",mc]]),yc={class:"extra-content"},bc={key:0},kc={key:1},xc={class:"dialog-footer"},wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:r}){const i=n,l=e.ref(0),u=e.ref(),s=e.ref(),y=r,h=e.ref(!1),p=e.ref({}),g=e.ref({}),D=e.ref();e.watch(()=>[i.itemData],()=>{var S;const m=E.cloneDeep(i.itemData);u.value=(S=E.cloneDeep(m))==null?void 0:S.map(v=>{var T;if(v.key==="extra"){let b=[];(T=v.value)==null||T.forEach(ie=>{var Be;b.push((Be=Object.values(ie))==null?void 0:Be[0])}),v.value=b}return v})},{deep:!0,immediate:!0});const C=(m,S,v,T)=>{var ie;let b={};((ie=m==null?void 0:m[0])==null?void 0:ie.contents)==="详情"&&(h.value=!0,b[S]=m,s.value=m==null?void 0:m.filter(Be=>(Be==null?void 0:Be.key)!=="tableContentName"),p.value=b,g.value=v,D.value=T.id)},z=m=>{var Be,et,we,Le;const S=(et=(Be=Object.values(E.cloneDeep(p.value)))==null?void 0:Be[0])==null?void 0:et.filter(Me=>(Me==null?void 0:Me.key)==="tableContentName"),v=(Le=(we=Object.values(E.cloneDeep(p.value)))==null?void 0:we[0])==null?void 0:Le.filter(Me=>(Me==null?void 0:Me.key)!=="tableContentName"),T=v==null?void 0:v.map((Me,I)=>{var Q;return I===m.index&&(Me==null?void 0:Me.comp)==="Table"&&(Me.compData=(Q=Me.compData)==null?void 0:Q.map(G=>{var te,Re;return(G==null?void 0:G.key)==="tableContents"&&(G.contents=(Re=(te=m.content)==null?void 0:te.map(Qe=>{let X={};for(let R in Qe)R!=="id"&&(X[R]=Qe[R]);return X}))==null?void 0:Re.map(Qe=>Object.values(Qe))),G})),Me});T.unshift(S==null?void 0:S[0]);let b=E.cloneDeep(p.value),ie={};for(let Me in b)ie[Me]=T;p.value=ie},j=()=>{h.value=!1,p.value={},g.value={},D.value=void 0,l.value++},B=m=>{var Be,et,we,Le;const S=(et=(Be=Object.values(E.cloneDeep(p.value)))==null?void 0:Be[0])==null?void 0:et.filter(Me=>(Me==null?void 0:Me.key)==="tableContentName"),v=(Le=(we=Object.values(E.cloneDeep(p.value)))==null?void 0:we[0])==null?void 0:Le.filter(Me=>(Me==null?void 0:Me.key)!=="tableContentName"),T=v==null?void 0:v.map((Me,I)=>(I===m.index&&(Me.compData=m.contents),Me));T.unshift(S==null?void 0:S[0]);let b=E.cloneDeep(p.value),ie={};for(let Me in b)ie[Me]=T;p.value=ie},Z=()=>{var S,v;let m={};for(let T in g.value)T===((S=Object.keys(p.value))==null?void 0:S[0])?m[T]=(v=Object.values(p.value))==null?void 0:v[0]:m[T]=g.value[T];y("change",{buttonName:"编辑",index:D.value,singleContent:m},"methodData"),h.value=!1,p.value={},g.value={},D.value=void 0},F=()=>{h.value=!1,p.value={},g.value={},D.value=void 0},L=m=>{y("change",m,"methodData")},$=m=>rn(m);return(m,S)=>{const v=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(T,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(T==null?void 0:T.key)==="extra"?(e.openBlock(),e.createElementBlock("div",bc)):(e.openBlock(),e.createElementBlock("div",kc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(T.comp)),{itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:b,index:(T==null?void 0:T.id)??b,onContentClick:C,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:F},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(T,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(T.comp)),{itemData:T==null?void 0:T.compData,onChange:z,childItemData:T==null?void 0:T.itemChildData,key:b,onContentChange:B,index:(T==null?void 0:T.id)??b,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",xc,[e.createVNode(v,{class:"cancel-button footer-button",onClick:j,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(v,{class:"confirm-button footer-button",onClick:Z,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Dc=Lt._export_sfc(wc,[["__scopeId","data-v-2d9c5ab2"]]),_c={key:0,class:"method-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const r=e.ref([]),i=Ve.useOriginalState(E.pinia),{originalPath:l}=E.storeToRefs(i),u=n,s=e.ref(!1),y=e.ref(),h=Ve.useTableComp(E.pinia),{multipleTableConst:p}=E.storeToRefs(h),g=E.useModelComp(E.pinia),D=e.ref(!1),C=E.useMenuState(E.pinia),z=E.useLoginState(E.pinia),{itemData:j,isEdit:B,routeToChildPath:Z,tableViewContents:F,lockingPage:L,payloadTypes:$}=E.storeToRefs(g),{activeMenuPath:m,platform:S,childMenu:v}=E.storeToRefs(C),{loginUserInfo:T}=E.storeToRefs(z),b=e.ref(!1),ie=async()=>{var X,R;(X=r.value)!=null&&X.find(ue=>(ue==null?void 0:ue.buttonName)==="保存")&&await G((R=r.value)==null?void 0:R.find(ue=>(ue==null?void 0:ue.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>j.value,async()=>{B.value==="view"&&!b.value&&await Qe(E.cloneDeep(u.itemData)),b.value=!1},{deep:!0});const Be=()=>{s.value=!1,y.value=void 0},et=X=>X.map(R=>{const ue={};for(const ve in R){const Ce=R[ve];if(ve.includes(p.value)){const ke=ve.split(p.value);let Fe=ue;ke.forEach((q,Y)=>{Y===ke.length-1?Fe[q]=Ce:(Fe[q]||(Fe[q]={}),Fe=Fe[q])})}else ue[ve]=Ce}return ue}),we=async(X,R,ue=[])=>{var Ce,ke,Fe,q,Y,k,ge,Ie,De,se,le,pe,Se,Ye,dt;let ve=(Ce=E.cloneDeep(R))==null?void 0:Ce.filter(x=>(x==null?void 0:x.comp)!=="methodButton");if(X!=null&&X.includes("[")){let x=(k=(Y=(q=(Fe=(ke=E.cloneDeep(X))==null?void 0:ke.split("["))==null?void 0:Fe[1])==null?void 0:q.split("]"))==null?void 0:Y[0])==null?void 0:k.split(":"),V="";if(x!=null&&x[0]){let H=(ge=ve==null?void 0:ve.find(ne=>(ne==null?void 0:ne.name)===(x==null?void 0:x[0])))==null?void 0:ge.compData;if(!H){let ne=(Ie=X==null?void 0:X.split("["))==null?void 0:Ie[0],N=await Ve.getItemData(ne,sessionStorage.getItem("systemKey"),"",!1,"","",ue);H=(De=N==null?void 0:N.find(ce=>(ce==null?void 0:ce.name)===(x==null?void 0:x[0])))==null?void 0:De.compData}H==null||H.forEach(ne=>{var N,ce,Oe,O,re,K;if((ne==null?void 0:ne.key)==="formContent")(N=ne==null?void 0:ne.contents)==null||N.forEach(J=>{var Te;(J==null?void 0:J.key)===(x==null?void 0:x[1])&&(Array.isArray(J==null?void 0:J.value)?V=J==null?void 0:J.value:V=(Te=J==null?void 0:J.value)==null?void 0:Te.toString())});else if((ne==null?void 0:ne.key)==="tableContents"){let J=[],Te=(ce=H==null?void 0:H.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:ce.contents,de=(x==null?void 0:x[1])??"";if(Te!=null&&Te.every(ee=>Array.isArray(ee))){let ee=Ve.getColumnChild((re=Te==null?void 0:Te[0])==null?void 0:re.filter(oe=>(oe==null?void 0:oe.label)!=="操作"));(K=ne.contents)==null||K.forEach(oe=>{let fe={};oe=oe==null?void 0:oe.filter(ye=>!(ye!=null&&ye.id)),ee==null||ee.forEach((ye,Ee)=>{let xe=oe[Ee];typeof oe[Ee]=="number"&&(xe=oe[Ee].toString()),(de===""||de===ye.prop)&&(fe[ye.prop]=xe)}),J.push(fe)}),J=et(J)}else{let ee=(Oe=Te==null?void 0:Te.map(oe=>oe==null?void 0:oe.label))==null?void 0:Oe.filter(oe=>oe!=="操作");(O=ne.contents)==null||O.forEach(oe=>{let fe={};oe=oe==null?void 0:oe.filter(ye=>!(ye!=null&&ye.id)),ee==null||ee.forEach((ye,Ee)=>{let xe=oe[Ee];typeof oe[Ee]=="number"&&(xe=oe[Ee].toString()),(de===""||de===ye)&&(fe[ye]=xe)}),J.push(fe)})}V=J}})}return V}else if(X!=null&&X.includes("/")){let x={};return(se=E.cloneDeep(ve))==null||se.forEach((V,H)=>{var ne,N,ce,Oe,O,re,K,J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be;if((V==null?void 0:V.comp)==="Table"){let He=Array.isArray((ce=(N=(ne=V==null?void 0:V.compData)==null?void 0:ne.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:N.contents)==null?void 0:ce[0])?(K=(re=(O=(Oe=V==null?void 0:V.compData)==null?void 0:Oe.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:O.contents)==null?void 0:re[0])==null?void 0:K.some(Ae=>Ae==null?void 0:Ae.children):[],ot=(de=(Te=(J=V==null?void 0:V.compData)==null?void 0:J.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:Te.contents)==null?void 0:de.map(Ae=>(Ae!=null&&Ae.find(mt=>mt==null?void 0:mt.id)&&(Ae=Ae.slice(1)),Ae)),Ke=(Ee=(ye=(fe=(oe=(ee=V==null?void 0:V.compData)==null?void 0:ee.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:oe.contents)==null?void 0:fe[0])==null?void 0:ye[0])==null?void 0:Ee.label,nt=(W=(xe=V==null?void 0:V.compData)==null?void 0:xe.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:W.contents;if(He)(He==null?void 0:He.length)===0?x[V.name]=x!=null&&x[V.name]?x[V.name]:Ve.tableToForm(ot,nt):x[Ke]=Ve.tableToForm(ot,nt);else{const Ae=[];nt=nt.slice(1,nt.length-1),nt==null||nt.forEach((mt,tt)=>{ot==null||ot.forEach(ze=>{Ae.push({key:mt.label+ze[0],value:ze[tt+1]})})}),x["form"+H]=Ae}}else{const He=(be=(Pe=V.compData)==null?void 0:Pe.find(Ke=>(Ke==null?void 0:Ke.key)==="formContent"))==null?void 0:be.contents;x!=null&&x.form||(x.form=[]);const ot=[];He==null||He.forEach(Ke=>{Ke.key!==""&&(Ke={key:(Ke==null?void 0:Ke.key)??(Ke==null?void 0:Ke.label),value:Ke==null?void 0:Ke.value},ot.push(Ke))}),x.form=[...ot,...E.cloneDeep(x==null?void 0:x.form)]}}),x}else{if(X==="createInsofDataApi"){let x=(le=E.cloneDeep(R))==null?void 0:le[0];return x={comp:(pe=E.cloneDeep(x))==null?void 0:pe.comp,compData:(Se=E.cloneDeep(x))==null?void 0:Se.compData,name:(Ye=E.cloneDeep(x))==null?void 0:Ye.name,isShow:(dt=E.cloneDeep(x))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:m.value},value:{pageData:x}}}return X}},Le=async(X,R,ue)=>{var ke,Fe,q;let ve=await Ve.getItemData(R,sessionStorage.getItem("systemKey"),""),Ce=ve==null?void 0:ve.find(Y=>(Y==null?void 0:Y.name)===(ue==null?void 0:ue[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let Y={};for(let pe in E.cloneDeep(X))E.cloneDeep(X)[pe]!=="loginUser"?Y[pe]=E.cloneDeep(X)[pe]:Y[pe]=((ke=T.value)==null?void 0:ke.account)||((Fe=T.value)==null?void 0:Fe.账号);let k=[],ge=Y;Array.isArray(X)||(ge=[Y]),ge==null||ge.forEach(pe=>{k.push({[pe[ue[1]]]:pe})});let Ie=[],De=k==null?void 0:k.map(pe=>{var Se;return(Se=Object.keys(pe))==null?void 0:Se[0]});ve==null||ve.forEach(pe=>{var Se;(pe==null?void 0:pe.name)===(ue==null?void 0:ue[0])&&((Se=pe==null?void 0:pe.compData)==null||Se.forEach(Ye=>{var dt;(Ye==null?void 0:Ye.key)==="tableContents"&&((dt=Ye==null?void 0:Ye.contents)==null||dt.forEach(x=>{x!=null&&x.some(V=>De.includes(V))&&Ie.push({[x.find(V=>V.id).id]:x.find(V=>De.includes(V))})}))}))});let se=Ie==null?void 0:Ie.map(pe=>{var Se;return(Se=Object.keys(pe))==null?void 0:Se[0]}),le=[];if(se==null||se.forEach(pe=>{var dt;let Se=(dt=Ie==null?void 0:Ie.find(x=>{var V;return((V=Object.keys(x))==null?void 0:V[0].toString())===pe.toString()}))==null?void 0:dt[pe],Ye=k==null?void 0:k.find(x=>{var V;return((V=Object.keys(x))==null?void 0:V[0])===Se});le.push({id:parseInt(pe),value:{tableData:Ye[Se]}})}),(le==null?void 0:le.length)>0)return le}else if((Ce==null?void 0:Ce.comp)==="Form"){let Y=E.cloneDeep(Ce);Y.compData=(q=Y.compData)==null?void 0:q.map(Ie=>{var De;return(Ie==null?void 0:Ie.key)==="formContent"&&(Ie.contents=(De=Ie.contents)==null?void 0:De.map(se=>((se==null?void 0:se.key)===(ue==null?void 0:ue[1])&&(se.value=(X==null?void 0:X[se==null?void 0:se.prop])||X),se))),Ie});let k={};for(let Ie in Y)Ie!=="id"&&(k[Ie]=Y[Ie]);let ge=[];if(ge.push({id:Ce==null?void 0:Ce.id,keyType:ue==null?void 0:ue[1],value:{pageData:k}}),(ge==null?void 0:ge.length)>0)return ge}}},Me=async(X,R,ue)=>{var ke,Fe,q,Y,k,ge,Ie,De,se,le;let ve=await Ve.getItemData(R,sessionStorage.getItem("systemKey"),""),Ce=ve==null?void 0:ve.find(pe=>(pe==null?void 0:pe.name)===(ue==null?void 0:ue[0]));if(Ce){if((Ce==null?void 0:Ce.comp)==="Table"){let pe={};for(let Se in E.cloneDeep(X))E.cloneDeep(X)[Se]!=="loginUser"?pe[Se]=E.cloneDeep(X)[Se]:pe[Se]=((ke=T.value)==null?void 0:ke.account)||((Fe=T.value)==null?void 0:Fe.账号);await rt.createInsofDataApi({key:{type:"data",pageKey:R,tableId:Ce==null?void 0:Ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})}else if((Ce==null?void 0:Ce.comp)==="Form"){let pe=E.cloneDeep(Ce),Se=Object.keys(X),Ye="";(Y=(q=E.cloneDeep(pe))==null?void 0:q.compData)==null||Y.forEach(N=>{var ce,Oe;(N==null?void 0:N.key)==="formContent"&&((Oe=(ce=E.cloneDeep(N))==null?void 0:ce.contents)==null||Oe.forEach(O=>{var re;Se.includes(O==null?void 0:O.key)&&(O==null?void 0:O.value)===((re=T.value)==null?void 0:re.姓名)&&(Ye=O==null?void 0:O.key)}))});let dt=[];(k=Object.values(X[Ye]))==null||k.forEach(N=>{N!=null&&N.includes("(")&&dt.push(N)}),dt=[...new Set(dt)];const x=dt==null?void 0:dt.map(async N=>{var K,J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe;let ce="";(oe=(ee=(de=(Te=(J=(K=E.cloneDeep(N))==null?void 0:K.split("("))==null?void 0:J[1])==null?void 0:Te.split(")"))==null?void 0:de[0])==null?void 0:ee.split(":"))==null||oe.forEach(be=>{ce=ce===""?ce+be.replaceAll("'",""):ce+"/"+be.replaceAll("'","")});let Oe=[];(Pe=(W=(xe=(Ee=(ye=(fe=E.cloneDeep(N))==null?void 0:fe.split("<"))==null?void 0:ye[1])==null?void 0:Ee.split(">"))==null?void 0:xe[0])==null?void 0:W.split(":"))==null||Pe.forEach(be=>{Oe.push(be.replaceAll("'",""))});const O=await Ve.getItemData(ce,sessionStorage.getItem("systemKey"),"");let re="";return O==null||O.forEach(be=>{var He;be.name===(Oe==null?void 0:Oe[0])&&((He=be==null?void 0:be.compData)==null||He.forEach(ot=>{var Ke;(ot==null?void 0:ot.key)==="formContent"&&((Ke=ot.contents)==null||Ke.forEach(nt=>{(nt==null?void 0:nt.key)===(Oe==null?void 0:Oe[1])&&(re=nt==null?void 0:nt.value)}))}))}),{[N]:re}}),V=await Promise.all(x);pe.compData=(Ie=(ge=E.cloneDeep(pe))==null?void 0:ge.compData)==null?void 0:Ie.map(N=>{var ce,Oe;return(N==null?void 0:N.key)==="formContent"&&(N.contents=(Oe=(ce=E.cloneDeep(N))==null?void 0:ce.contents)==null?void 0:Oe.map(O=>{var re,K,J,Te;return(re=X[Ye])!=null&&re[O==null?void 0:O.key]&&(X[Ye][O==null?void 0:O.key].includes("(")?O.value=(K=V==null?void 0:V.find(de=>{var ee;return((ee=Object.keys(de))==null?void 0:ee[0])===X[Ye][O==null?void 0:O.key]}))==null?void 0:K[X[Ye][O==null?void 0:O.key]]:O.value=(Te=(J=E.cloneDeep(X))==null?void 0:J[Ye])==null?void 0:Te[O==null?void 0:O.key]),O})),N});const H=await rt.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let ne="";((De=H==null?void 0:H.data)==null?void 0:De.type)==="success"&&((le=(se=H==null?void 0:H.data)==null?void 0:se.result)==null||le.forEach(N=>{var ce,Oe;((Oe=(ce=N==null?void 0:N.value)==null?void 0:ce.pageData)==null?void 0:Oe.name)===(ue==null?void 0:ue[0])&&(ne=N.id)}),await rt.updateInsofDataApi({id:ne,value:{pageData:pe}}))}}},I=(X,R="",ue={})=>{for(const[ve,Ce]of Object.entries(X)){const ke=R?`${R}.${ve}`:ve;Ce!==null&&typeof Ce=="object"&&!Array.isArray(Ce)&&Object.prototype.toString.call(Ce)!=="[object Date]"?I(Ce,ke,ue):ue[ke]=Ce}return ue},Q=async(X,R,ue,ve)=>{var Fe,q,Y,k,ge,Ie,De,se,le,pe,Se,Ye,dt,x,V,H,ne,N,ce,Oe,O,re,K,J,Te;let Ce=await Ve.getItemData(R,sessionStorage.getItem("systemKey"),""),ke=Ce==null?void 0:Ce.find(de=>(de==null?void 0:de.name)===(ue==null?void 0:ue[0]));if(ke){if(!(ue!=null&&ue[1])&&(ke==null?void 0:ke.comp)==="Table"){let de={},ee=[],oe=(q=(Fe=ke==null?void 0:ke.compData)==null?void 0:Fe.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:q.contents;oe!=null&&oe.every(Ee=>Array.isArray(Ee))?ee=(k=Ve.getColumnChild((Y=oe==null?void 0:oe[0])==null?void 0:Y.filter(Ee=>(Ee==null?void 0:Ee.label)!=="操作")))==null?void 0:k.map(Ee=>Ee==null?void 0:Ee.prop):ee=oe==null?void 0:oe.map(Ee=>Ee==null?void 0:Ee.label);for(let Ee in E.cloneDeep(X))if(E.cloneDeep(X)[Ee]!=="loginUser"){let xe=I(E.cloneDeep(X)[Ee]),W={};for(let Pe in xe)if(ee!=null&&ee.find(be=>be===Pe))W[Pe]=xe[Pe];else if(ee!=null&&ee.find(be=>(be==null?void 0:be.toUpperCase())===(Pe==null?void 0:Pe.toUpperCase()))){let be=ee==null?void 0:ee.find(He=>(He==null?void 0:He.toUpperCase())===(Pe==null?void 0:Pe.toUpperCase()));W[be]=xe[Pe]}de[Ee]=W}else de[Ee]=((ge=T.value)==null?void 0:ge.account)||((Ie=T.value)==null?void 0:Ie.账号);let fe=await rt.getInsofDataApi({keyLikes:{tableId:ke==null?void 0:ke.id}});if(((se=(De=fe==null?void 0:fe.data)==null?void 0:De.result)==null?void 0:se.length)>0){let Ee=(pe=(le=fe==null?void 0:fe.data)==null?void 0:le.result)==null?void 0:pe.map(xe=>xe==null?void 0:xe.id);(Ee==null?void 0:Ee.length)>0&&await rt.batchDeleteInsofDataApi({ids:Ee})}let ye=[];if((Se=ke==null?void 0:ke.compData)!=null&&Se.find(Ee=>(Ee==null?void 0:Ee.key)==="pageColumn")&&((x=(dt=(Ye=ke==null?void 0:ke.compData)==null?void 0:Ye.find(Ee=>(Ee==null?void 0:Ee.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&x.includes("["))){const Ee=await rt.getInsofDataApi({id:ke==null?void 0:ke.tableId});let xe=((N=(ne=(H=(V=Ee==null?void 0:Ee.data)==null?void 0:V.result)==null?void 0:H[0])==null?void 0:ne.key)==null?void 0:N.pageKey)??"";(ce=Object.values(de))==null||ce.forEach(W=>{ye.push({key:{type:"data",pageKey:xe,tableId:ke==null?void 0:ke.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:W}})})}else(Oe=Object.values(de))==null||Oe.forEach(Ee=>{ye.push({key:{type:"data",pageKey:R,tableId:ke==null?void 0:ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ee}})});(ye==null?void 0:ye.length)>0&&await rt.batchAddInsofDataApi({dataList:ye})}else if(!(ue!=null&&ue[1])&&(ke==null?void 0:ke.comp)==="Form"){let de=E.cloneDeep(ke);de.compData=(re=(O=E.cloneDeep(de))==null?void 0:O.compData)==null?void 0:re.map(fe=>{var ye,Ee;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(Ee=(ye=E.cloneDeep(fe))==null?void 0:ye.contents)==null?void 0:Ee.map(xe=>{var W,Pe;return(W=E.cloneDeep(X))!=null&&W[xe==null?void 0:xe.key]&&(xe.value=(Pe=E.cloneDeep(X))==null?void 0:Pe[xe==null?void 0:xe.key]),xe})),fe});const ee=await rt.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((K=ee==null?void 0:ee.data)==null?void 0:K.type)==="success"&&((Te=(J=ee==null?void 0:ee.data)==null?void 0:J.result)==null||Te.forEach(fe=>{var ye,Ee;((Ee=(ye=fe==null?void 0:fe.value)==null?void 0:ye.pageData)==null?void 0:Ee.name)===(ue==null?void 0:ue[0])&&(oe=fe.id)}),await rt.updateInsofDataApi({id:oe,value:{pageData:de}}))}}},G=async X=>{var R,ue,ve,Ce,ke,Fe,q,Y,k,ge,Ie,De,se,le,pe,Se;C.setImportLoading(!0);try{if(X.api){let Ye=new WeakMap;(ue=(R=(await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:$.value})).data.result)==null?void 0:R.filter(K=>{var J,Te;return((J=K==null?void 0:K.key)==null?void 0:J.pageKey)!=="menu"&&((Te=K==null?void 0:K.key)==null?void 0:Te.pageKey)!=="secret"}))==null||ue.forEach(K=>{Ye[K.key.pageKey]?Ye[K.key.pageKey]=[...Ye[K.key.pageKey],K]:Ye[K.key.pageKey]=[K]});let x=await Ve.getItemData((v==null?void 0:v.value)===""?m.value:v==null?void 0:v.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ye),V="";if(x=x==null?void 0:x.map(K=>{var J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be;if((K==null?void 0:K.comp)==="Form")K.compData=(J=K.compData)==null?void 0:J.map(He=>{var ot;return(He==null?void 0:He.key)==="formContent"&&(He.contents=(ot=He.contents)==null?void 0:ot.map(Ke=>{var nt;if((Ke==null?void 0:Ke.value)===""&&(Ke==null?void 0:Ke.type)==="Select"){let Ae=Ve.judgeContents((nt=E.cloneDeep(Ke))==null?void 0:nt.optionUrl,Ye);Ke.value=Ke.value||Ae}return Ke})),He});else if((K==null?void 0:K.comp)==="Table"&&(Te=K.compData)!=null&&Te.find(He=>(He==null?void 0:He.key)==="pageColumn")){let He=(ee=(de=K.compData)==null?void 0:de.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:ee.contents,ot=((fe=(oe=K.compData)==null?void 0:oe.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:fe.contents)??"",Ke=(xe=(Ee=(ye=He==null?void 0:He.split("["))==null?void 0:ye[1])==null?void 0:Ee.split("]"))==null?void 0:xe[0];V=((W=He==null?void 0:He.split("["))==null?void 0:W[0])+((be=(Pe=F.value)==null?void 0:Pe.find(Ae=>(Ae==null?void 0:Ae.key)===Ke))==null?void 0:be.value)}return K}),!(V===""||V==="")){const K=await Ve.getItemData(V,sessionStorage.getItem("systemKey"),"",!1,"","",Ye);x=x==null?void 0:x.map(J=>{var Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot;if((J==null?void 0:J.comp)==="Table"&&(Te=J.compData)!=null&&Te.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(ee=(de=J.compData)==null?void 0:de.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:ee.contents,nt=((fe=(oe=J.compData)==null?void 0:oe.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:fe.contents)??"",Ae=(xe=(Ee=(ye=Ke==null?void 0:Ke.split("["))==null?void 0:ye[1])==null?void 0:Ee.split("]"))==null?void 0:xe[0],mt=((W=Ke==null?void 0:Ke.split("["))==null?void 0:W[0])+((be=(Pe=F.value)==null?void 0:Pe.find(ze=>(ze==null?void 0:ze.key)===Ae))==null?void 0:be.value),tt=(He=K==null?void 0:K.find(ze=>(ze==null?void 0:ze.name)===(nt===""?u==null?void 0:u.compName:nt)))==null?void 0:He.compData;J.compData=(ot=J.compData)==null?void 0:ot.map(ze=>{var it;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(it=tt==null?void 0:tt.find(gt=>(gt==null?void 0:gt.key)==="tableContents"))==null?void 0:it.contents),ze})}return J})}let H={};if(((Ce=(ve=X==null?void 0:X.extraValues)==null?void 0:ve.input)==null?void 0:Ce.length)>0){const K=(Fe=(ke=X==null?void 0:X.extraValues)==null?void 0:ke.input)==null?void 0:Fe.map(async J=>{var Te;te!=null&&te.find(de=>de===J)?H=await we(J,x):H[Object.keys(J)[0]]=await we((Te=Object.values(J))==null?void 0:Te[0],x,Ye)});await Promise.all(K)}else H=await we("/",x);let ne=!1;(Y=(q=X==null?void 0:X.extraValues)==null?void 0:q.output)==null||Y.forEach(K=>{var J,Te;(Te=(J=Object.values(K))==null?void 0:J[0])!=null&&Te.includes(".doc")&&(ne=!0)});let N;if(ne){const K=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});N=await rt.axios.post(X.api,H,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{K.close()})}else N=await rt.axios.post(X.api,H,{headers:{"Content-Type":"application/json"}});let ce=(De=(Ie=(ge=(k=E.cloneDeep(X))==null?void 0:k.extraValues)==null?void 0:ge.output)==null?void 0:Ie.map(K=>{var J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot,Ke,nt;if(!((Te=(J=Object.values(K))==null?void 0:J[0])!=null&&Te.includes(".doc"))){let Ae=(W=(xe=(Ee=(ee=E.cloneDeep((de=Object.values(K))==null?void 0:de[0]))==null?void 0:ee.split("["))==null?void 0:Ee[((ye=(fe=E.cloneDeep((oe=Object.values(K))==null?void 0:oe[0]))==null?void 0:fe.split("["))==null?void 0:ye.length)-1])==null?void 0:xe.split("]"))==null?void 0:W[0],mt=Ae==null?void 0:Ae.split(":"),tt=(He=E.cloneDeep((Pe=Object.values(K))==null?void 0:Pe[0]))==null?void 0:He.substring(0,E.cloneDeep((be=Object.values(K))==null?void 0:be[0]).lastIndexOf("["));if(tt=(Ke=E.cloneDeep(tt))==null?void 0:Ke.slice(0,((ot=E.cloneDeep(tt))==null?void 0:ot.length)-1),tt!=null&&tt.includes("[")){let ze="";if((nt=Ve.contentTransArrayToAll(tt,"/"))==null||nt.forEach(it=>{var gt,Je,We,Nt,Ne,Ge,je;if(!(it!=null&&it.includes("[")))ze=ze===""?ze+it.replaceAll("/",""):ze+"/"+it.replaceAll("/","");else{let Ze=E.cloneDeep(it).slice(1,((gt=E.cloneDeep(it))==null?void 0:gt.length)-1),A=(Ge=(Ne=(Nt=(We=(Je=E.cloneDeep(Ze))==null?void 0:Je.split("["))==null?void 0:We[1])==null?void 0:Nt.split("]"))==null?void 0:Ne[0])==null?void 0:Ge.split(":"),he="",qe=(je=x==null?void 0:x.find(me=>(me==null?void 0:me.name)===(A==null?void 0:A[0])))==null?void 0:je.compData;qe==null||qe.forEach(me=>{var ut;(me==null?void 0:me.key)==="formContent"&&((ut=me==null?void 0:me.contents)==null||ut.forEach(st=>{(st==null?void 0:st.key)===(A==null?void 0:A[1])&&(he=st==null?void 0:st.value)}))}),ze=ze===""?ze+he.replaceAll("/",""):ze+"/"+he.replaceAll("/","")}}),tt=ze,tt[(tt==null?void 0:tt.length)-1]!=="/")return tt}}}))==null?void 0:De.filter(K=>K);ce=[...new Set(E.cloneDeep(ce))];let Oe=ce==null?void 0:ce.map(async K=>{let J=await Ve.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,"","",Ye);if((J==null?void 0:J.length)===0)return await Ve.getParentContents(K)});await Promise.all(Oe);let O=[],re=(pe=(le=(se=E.cloneDeep(X))==null?void 0:se.extraValues)==null?void 0:le.output)==null?void 0:pe.map(async K=>{var Ee,xe,W,Pe,be,He,ot,Ke,nt,Ae,mt,tt,ze,it,gt,Je,We,Nt,Ne,Ge,je,Ze,A,he,qe,me,ut,st,wt,pt,ct,ft,Dt,Bt,Wt,vt,zt,Ut,Ht,Yt,aa,Ft,Ia,Fa,xa,$a,wa,ja,Ua,Ka,Wa,Ha,Na,ga,pa,Da,ya,ia,va,qa,Aa,Va,_a,Xa,Ya,Oa,Ga,Ja,Ct,ta;if((xe=(Ee=Object.values(K))==null?void 0:Ee[0])!=null&&xe.includes(".doc")){var J=new Blob([N.data],{type:"application/octet-stream;charset=UTF-8"}),Te=N.headers["content-disposition"],de=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ee=de.exec(Te),oe=ee==null?void 0:ee[1],fe=document.createElement("a"),ye=window.URL.createObjectURL(J);y.value=[{name:oe,blobUrl:ye}],s.value=!0}else{let yt=(Ae=(nt=(Ke=(Pe=E.cloneDeep((W=Object.values(K))==null?void 0:W[0]))==null?void 0:Pe.split("["))==null?void 0:Ke[((ot=(He=E.cloneDeep((be=Object.values(K))==null?void 0:be[0]))==null?void 0:He.split("["))==null?void 0:ot.length)-1])==null?void 0:nt.split("]"))==null?void 0:Ae[0],Mt=yt==null?void 0:yt.split(":"),bt=(ze=E.cloneDeep((mt=Object.values(K))==null?void 0:mt[0]))==null?void 0:ze.substring(0,E.cloneDeep((tt=Object.values(K))==null?void 0:tt[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(gt=E.cloneDeep(bt))==null?void 0:gt.slice(0,((it=E.cloneDeep(bt))==null?void 0:it.length)-1):bt===""&&(bt=m.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let Et="";(Je=Ve.contentTransArrayToAll(bt,"/"))==null||Je.forEach((_t,Rt)=>{var Ot,Pt,Gt,sa,Ma,Za,za,Qa,Tn,sn,gn;if(!(_t!=null&&_t.includes("[")))Et=Et===""?Et+_t.replaceAll("/",""):Et+"/"+_t.replaceAll("/","");else{let cn="",fa="";(Ot=E.cloneDeep(_t))!=null&&Ot.includes("]")?(cn=E.cloneDeep(_t).slice(1,((Pt=E.cloneDeep(_t))==null?void 0:Pt.length)-1),fa=(za=(Za=(Ma=(sa=(Gt=E.cloneDeep(cn))==null?void 0:Gt.split("["))==null?void 0:sa[1])==null?void 0:Ma.split("]"))==null?void 0:Za[0])==null?void 0:za.split(":")):(cn=E.cloneDeep(_t).slice(1,(Qa=E.cloneDeep(_t))==null?void 0:Qa.length),fa=(Tn=E.cloneDeep(cn))==null?void 0:Tn.split("/"));let en="",un=(sn=x==null?void 0:x.find(ca=>(ca==null?void 0:ca.name)===(fa==null?void 0:fa[0])))==null?void 0:sn.compData;un==null||un.forEach(ca=>{var Bn;(ca==null?void 0:ca.key)==="formContent"&&((Bn=ca==null?void 0:ca.contents)==null||Bn.forEach(Ra=>{(Ra==null?void 0:Ra.key)===(fa==null?void 0:fa[1])&&(en=Ra==null?void 0:Ra.value)}))}),((gn=Ve.contentTransArrayToAll(bt,"/"))==null?void 0:gn.length)-1!==Rt?Et=Et===""?Et+en.replaceAll("/",""):Et+"/"+en.replaceAll("/",""):Et=Et+l.value+en.replaceAll("/","")}}),(We=m.value)!=null&&We.includes(Et)?bt=m.value:bt=Et}let qt=E.cloneDeep((Nt=Object.keys(K))==null?void 0:Nt[0]);if(((Ne=N==null?void 0:N.data)==null?void 0:Ne.statusCode)===200||((Ge=N==null?void 0:N.data)==null?void 0:Ge.code)===200){if(((Ze=(je=N==null?void 0:N.data)==null?void 0:je.data)!=null&&Ze[qt]||(he=(A=N==null?void 0:N.data)==null?void 0:A.result)!=null&&he[qt])&&(Mt==null?void 0:Mt.length)===1)return await Q(((me=(qe=N==null?void 0:N.data)==null?void 0:qe.data)==null?void 0:me[qt])||((st=(ut=N==null?void 0:N.data)==null?void 0:ut.result)==null?void 0:st[qt]),E.cloneDeep(bt),Mt,V);if((pt=(wt=N==null?void 0:N.data)==null?void 0:wt.data)!=null&&pt[qt]||(ft=(ct=N==null?void 0:N.data)==null?void 0:ct.result)!=null&&ft[qt]){let Et=await Le(((Bt=(Dt=N==null?void 0:N.data)==null?void 0:Dt.data)==null?void 0:Bt[qt])||((vt=(Wt=N==null?void 0:N.data)==null?void 0:Wt.result)==null?void 0:vt[qt]),E.cloneDeep(bt),Mt);return Et&&(O=[...O,...Et]),Et}else{if(!((zt=N==null?void 0:N.data)!=null&&zt.data)){let Et=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ye);Et=Et==null?void 0:Et.map(Rt=>{var Ot;return(Rt==null?void 0:Rt.name)===(Mt==null?void 0:Mt[0])&&(Rt.compData=(Ot=Rt.compData)==null?void 0:Ot.map(Pt=>{var Gt;return(Pt==null?void 0:Pt.key)==="formContent"&&(Pt.contents=(Gt=Pt.contents)==null?void 0:Gt.map(sa=>{var Ma,Za;return(sa==null?void 0:sa.key)===(Mt==null?void 0:Mt[1])&&(sa.value=(Za=(Ma=N==null?void 0:N.data)==null?void 0:Ma.result)==null?void 0:Za[qt==null?void 0:qt.replaceAll(":","")]),sa})),Pt})),Rt});let _t=[];(Ut=Et==null?void 0:Et.filter(Rt=>(Rt==null?void 0:Rt.comp)==="Form"))==null||Ut.forEach(async Rt=>{let Ot={};for(let Pt in Rt)Pt!=="id"&&(Ot[Pt]=Rt[Pt]);_t.push({id:Rt==null?void 0:Rt.id,value:{pageData:Ot}})}),(_t==null?void 0:_t.length)>0&&await rt.batchUpdateInsofDataApi({dataList:_t});return}if((Mt==null?void 0:Mt.length)===1){const Et=(aa=(Yt=(Ht=N==null?void 0:N.data)==null?void 0:Ht.data)==null?void 0:Yt.path)==null?void 0:aa.path;let _t="";($a=(xa=(Fa=(Ia=(Ft=Et==null?void 0:Et.split("("))==null?void 0:Ft[1])==null?void 0:Ia.split(")"))==null?void 0:Fa[0])==null?void 0:xa.split(":"))==null||$a.forEach(Pt=>{var Gt,sa;_t=_t===""?_t+((Gt=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:Gt.trim()):_t+"/"+((sa=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:sa.trim())});let Rt=[(Wa=(Ka=(Ua=(ja=(wa=Et==null?void 0:Et.split("<"))==null?void 0:wa[1])==null?void 0:ja.split(">"))==null?void 0:Ua[0])==null?void 0:Ka.replaceAll("'",""))==null?void 0:Wa.trim()],Ot;return(ga=(Na=(Ha=N==null?void 0:N.data)==null?void 0:Ha.data)==null?void 0:Na.data)!=null&&ga[Mt==null?void 0:Mt[0]]?Ot=await Q((ya=(Da=(pa=N==null?void 0:N.data)==null?void 0:pa.data)==null?void 0:Da.data)==null?void 0:ya[Mt==null?void 0:Mt[0]],_t,Mt,V):Ot=await Me((va=(ia=N==null?void 0:N.data)==null?void 0:ia.data)==null?void 0:va.data,_t,Rt,Ye),Ot}else{const Et=(Va=(Aa=(qa=N==null?void 0:N.data)==null?void 0:qa.data)==null?void 0:Aa.path)==null?void 0:Va.path;let _t="";return(Ga=(Oa=(Ya=(Xa=(_a=Et==null?void 0:Et.split("("))==null?void 0:_a[1])==null?void 0:Xa.split(")"))==null?void 0:Ya[0])==null?void 0:Oa.split(":"))==null||Ga.forEach(Ot=>{var Pt,Gt;_t=_t===""?_t+((Pt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Pt.trim()):_t+"/"+((Gt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Gt.trim())}),await Le((ta=(Ct=(Ja=N==null?void 0:N.data)==null?void 0:Ja.data)==null?void 0:Ct.data)==null?void 0:ta[Mt==null?void 0:Mt[0]],_t,Mt)}}}}});if(await Promise.all(re),(O==null?void 0:O.length)>0){let K=[];O==null||O.forEach(de=>{K!=null&&K.find(ee=>{var oe,fe,ye,Ee;return((fe=(oe=ee==null?void 0:ee.value)==null?void 0:oe.pageData)==null?void 0:fe.name)===((Ee=(ye=de==null?void 0:de.value)==null?void 0:ye.pageData)==null?void 0:Ee.name)})||K.push(de)});let J=[];K==null||K.forEach(de=>{var fe,ye,Ee,xe;let ee=E.cloneDeep(de);ee.value.pageData.compData=(fe=ee.value.pageData.compData)==null?void 0:fe.map(W=>{var Pe;return(W==null?void 0:W.key)==="formContent"&&(W.contents=(Pe=W.contents)==null?void 0:Pe.map(be=>{var ot,Ke,nt,Ae;let He=(ot=E.cloneDeep(O))==null?void 0:ot.find(mt=>(mt==null?void 0:mt.keyType)===(be==null?void 0:be.key));if(He){let mt=(Ae=(nt=(Ke=He.value.pageData.compData)==null?void 0:Ke.find(tt=>(tt==null?void 0:tt.key)==="formContent"))==null?void 0:nt.contents)==null?void 0:Ae.find(tt=>(tt==null?void 0:tt.key)===(be==null?void 0:be.key));be.value=mt==null?void 0:mt.value}return be})),W}),J.push({id:ee==null?void 0:ee.id,value:ee==null?void 0:ee.value});let oe=[];(xe=(Ee=(ye=ee==null?void 0:ee.value)==null?void 0:ye.pageData)==null?void 0:Ee.compData)==null||xe.forEach(W=>{var Pe;(W==null?void 0:W.key)==="formContent"&&((Pe=W==null?void 0:W.contents)==null||Pe.forEach(be=>{var He,ot,Ke,nt,Ae,mt;if((ot=(He=be==null?void 0:be.optionUrl)==null?void 0:He.menuSelect)!=null&&ot.find(tt=>tt==null?void 0:tt.includes("[")))if(oe!=null&&oe.find(tt=>{var ze,it,gt;return((ze=tt==null?void 0:tt.key)==null?void 0:ze.join(","))===((gt=(it=be==null?void 0:be.optionUrl)==null?void 0:it.menuSelect)==null?void 0:gt.join(","))})){let tt=(Ke=oe==null?void 0:oe.find(ze=>{var it,gt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(gt=be==null?void 0:be.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))}))==null?void 0:Ke.value;tt.push({key:be==null?void 0:be.prop,groups:(nt=be==null?void 0:be.optionUrl)==null?void 0:nt.groupSelect,value:be==null?void 0:be.value}),oe=oe==null?void 0:oe.map(ze=>{var it,gt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(gt=be==null?void 0:be.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))&&(ze.value=tt),ze})}else oe.push({key:(Ae=be==null?void 0:be.optionUrl)==null?void 0:Ae.menuSelect,value:[{key:be==null?void 0:be.prop,groups:(mt=be==null?void 0:be.optionUrl)==null?void 0:mt.groupSelect,value:be==null?void 0:be.value}]})}))}),(oe==null?void 0:oe.length)>0&&(oe=oe==null?void 0:oe.map(W=>{var be;let Pe="";return(be=W==null?void 0:W.key)==null||be.forEach(He=>{var ot;if(!(He!=null&&He.includes("[")))Pe=Pe===""?Pe+He:Pe+"/"+He;else{let Ke="",nt=(ot=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:ot.split(":");x==null||x.forEach(Ae=>{var mt;(Ae==null?void 0:Ae.name)===(nt==null?void 0:nt[0])&&((mt=Ae==null?void 0:Ae.compData)==null||mt.forEach(tt=>{var ze;(tt==null?void 0:tt.key)==="formContent"&&((ze=tt==null?void 0:tt.contents)==null||ze.forEach(it=>{(it==null?void 0:it.prop)===(nt==null?void 0:nt[1])&&(Ke=it==null?void 0:it.value)}))}))}),Pe=Pe+l.value+Ke}}),W.key=Pe,W})),oe==null||oe.forEach(W=>{var ot,Ke,nt;let Pe=(ot=Ye[W.key])==null?void 0:ot.find(Ae=>{var mt,tt,ze,it,gt,Je,We;return((tt=(mt=Ae==null?void 0:Ae.value)==null?void 0:mt.pageData)==null?void 0:tt.name)===((gt=(it=(ze=W==null?void 0:W.value)==null?void 0:ze[0])==null?void 0:it.groups)==null?void 0:gt[0])&&((We=(Je=Ae==null?void 0:Ae.value)==null?void 0:Je.pageData)==null?void 0:We.name)!==void 0}),be=Pe==null?void 0:Pe.id,He=(Ke=Pe==null?void 0:Pe.value)==null?void 0:Ke.pageData;He.compData=(nt=He.compData)==null?void 0:nt.map(Ae=>{var mt;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(mt=Ae.contents)==null?void 0:mt.map(tt=>{var it;let ze=(it=W.value)==null?void 0:it.find(gt=>(gt==null?void 0:gt.key)===(tt==null?void 0:tt.prop));return ze&&(tt.value=ze.value),tt})),Ae}),J.push({id:be,value:{pageData:He}})})});let Te=(Se=E.cloneDeep(O))==null?void 0:Se[0];(J==null?void 0:J.length)>0&&await rt.batchUpdateInsofDataApi({dataList:J})}g.setFreshContent(!0)}C.setImportLoading(!1)}catch{rt.ElMessage.error("方法执行错误,请查看方法!"),C.setImportLoading(!1)}b.value=!0},te=["createInsofDataApi"],Re=kl(async X=>{G(X)},100),Qe=async X=>{var q,Y,k,ge,Ie;const R=E.cloneDeep(X);let ue,ve=new WeakMap,Ce=await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:$.value});(Y=(q=Ce.data.result)==null?void 0:q.filter(De=>{var se,le;return((se=De==null?void 0:De.key)==null?void 0:se.pageKey)!=="menu"&&((le=De==null?void 0:De.key)==null?void 0:le.pageKey)!=="secret"}))==null||Y.forEach(De=>{ve[De.key.pageKey]?ve[De.key.pageKey]=[...ve[De.key.pageKey],De]:ve[De.key.pageKey]=[De]}),X!=null&&X[0].path&&(ue=await(R==null?void 0:R.map(async(De,se)=>{var H,ne,N,ce,Oe,O,re,K,J,Te,de,ee,oe,fe,ye,Ee;const pe=(H=ve[De==null?void 0:De.path])==null?void 0:H.filter(xe=>{var W;return((W=xe==null?void 0:xe.key)==null?void 0:W.type)==="data"});let Se="";const Ye=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve);pe==null||pe.forEach(xe=>{var W,Pe,be,He,ot;((Pe=(W=xe==null?void 0:xe.value)==null?void 0:W.tableData)==null?void 0:Pe.算法名称)===((be=R==null?void 0:R[se])==null?void 0:be.method)&&(Se=(ot=(He=xe==null?void 0:xe.value)==null?void 0:He.tableData)==null?void 0:ot.算法体)});const dt=await Ve.getItemData(De==null?void 0:De.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve);let x="",V=(Oe=(ce=(N=(ne=dt==null?void 0:dt[0])==null?void 0:ne.compData)==null?void 0:N.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:ce.contents)==null?void 0:Oe.findIndex(xe=>(xe==null?void 0:xe.prop)==="算法体");return(re=(O=dt==null?void 0:dt[0])==null?void 0:O.compData)==null||re.forEach(xe=>{var W;(xe==null?void 0:xe.key)==="tableContents"&&((W=xe==null?void 0:xe.contents)==null||W.forEach(Pe=>{Pe!=null&&Pe.find(be=>be===(De==null?void 0:De.method))&&(x=Pe[V])}))}),{buttonName:((K=R==null?void 0:R[se])==null?void 0:K.method)||((de=(Te=(J=pe==null?void 0:pe[0])==null?void 0:J.value)==null?void 0:Te.tableData)==null?void 0:de.算法名称),api:(Se===""?(fe=(oe=(ee=pe==null?void 0:pe[0])==null?void 0:ee.value)==null?void 0:oe.tableData)==null?void 0:fe.算法体:Se)||x,content:Ye==null?void 0:Ye.filter(xe=>xe.comp!=="methodButton"),extraContent:(ye=E.cloneDeep(De.value))==null?void 0:ye.slice(1),methodName:(De==null?void 0:De.path)??"",extraValues:(Ee=R==null?void 0:R[se])==null?void 0:Ee.data}})));const ke=R==null?void 0:R.map(async De=>{var dt,x,V,H,ne,N;const se=(dt=Ce.data.result)==null?void 0:dt.filter(ce=>{var Oe,O,re;return((Oe=ce==null?void 0:ce.key)==null?void 0:Oe.parentTable)===""&&((O=ce==null?void 0:ce.key)==null?void 0:O.type)==="method"&&((re=ce==null?void 0:ce.key)==null?void 0:re.methodName)===ce.method}),le=se==null?void 0:se[0],pe=(x=Ce.data.result)==null?void 0:x.filter(ce=>{var Oe,O;return((Oe=ce==null?void 0:ce.key)==null?void 0:Oe.type)==="methodData"&&((O=ce==null?void 0:ce.key)==null?void 0:O.tableId)===(le==null?void 0:le.id)}),Se=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ve),Ye=pe==null?void 0:pe[0];return{buttonName:(V=le==null?void 0:le.key)==null?void 0:V.methodKey,api:(ne=(H=Ye==null?void 0:Ye.value)==null?void 0:H.tableData)==null?void 0:ne[0],content:Se==null?void 0:Se.filter(ce=>ce.comp!=="methodButton"),extraContent:(N=E.cloneDeep(De.value))==null?void 0:N.slice(1),methodName:(De==null?void 0:De.method)??""}}),Fe=(k=X==null?void 0:X[0])!=null&&k.path&&((ge=X==null?void 0:X[0])==null?void 0:ge.path)!==""?await Promise.all(ue):await Promise.all(ke);r.value=Fe==null?void 0:Fe.filter(De=>De==null?void 0:De.extraContent),(Ie=r.value)==null||Ie.forEach(De=>{var se;De.api===""&&((se=De.content)==null||se.forEach(le=>{var pe;le.comp=="Table"&&g.setExtraContents(Ve.methodTableToContent(le.compData,(pe=De.extraContent)==null?void 0:pe[0]))}))})};return e.watch(()=>u.itemData,async()=>{B.value=="view"&&!b.value&&await Qe(E.cloneDeep(u.itemData)),b.value=!1},{immediate:!0,deep:!0}),(X,R)=>{var ue,ve,Ce;return e.unref(B)!=="edit"?(e.openBlock(),e.createElementBlock("div",_c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=r.value)==null?void 0:ue.filter(ke=>(ke==null?void 0:ke.buttonName)!=="保存"),ke=>{var Fe;return e.openBlock(),e.createElementBlock("div",null,[ke.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(L)===e.unref(m)&&!((Fe=ke==null?void 0:ke.buttonName)!=null&&Fe.includes("预览")),class:"calculator-content",modelValue:ke.buttonName,onClickTrigger:q=>e.unref(Re)(ke),loading:D.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Z)!==""&&((Ce=e.unref(m))==null?void 0:Ce[((ve=e.unref(m))==null?void 0:ve.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ie,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:Be},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Cc=Lt._export_sfc(Ec,[["__scopeId","data-v-11fca7e0"]]),Sc={};function Tc(n,r){return" 567 "}const Bc=Lt._export_sfc(Sc,[["render",Tc]]),Ic={class:"module content"},Nc={class:"module data"},Ac={class:"module layout"},Vc={class:"form-content"},Oc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),y=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}]),p=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:""}]),g=e.ref({}),D=e.ref([]),C=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:D.value},{key:"signConfig",contents:g.value}]}),z=F=>{var L;g.value=E.cloneDeep(F),l("change",(L=C())==null?void 0:L.compData)},j=F=>{var L,$;if((F==null?void 0:F.buttonName)==="确认"){const m=E.cloneDeep(F==null?void 0:F.content);switch(s.value){case"create":D.value.push({...m,index:((L=D.value)==null?void 0:L.length)+1});break}l("change",($=C())==null?void 0:$.compData),u.visible=!1}else u.visible=!1},B=(F,L)=>{var $,m;switch(F){case"create":($=p.value)==null||$.forEach(S=>{S.value=""}),s.value="create",u.visible=!0;break;case"update":(m=p.value)==null||m.forEach(S=>{S.value=L[S==null?void 0:S.prop]}),s.value="update",u.visible=!0;break;case"delete":D.value.splice(L,1),s.value="delete";break}},Z=()=>{u.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var L,$;F&&(g.value=((L=F==null?void 0:F.find(m=>m.key==="signConfig"))==null?void 0:L.contents)??{},D.value=(($=F==null?void 0:F.find(m=>m.key==="signTypeList"))==null?void 0:$.contents)??[])},{immediate:!0}),(F,L)=>{const $=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ic,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=S=>B("create"))},{icon:e.withCtx(()=>[e.createVNode($,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(S,v)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:v},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:T=>B("update",{...S,index:v+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>B("delete",v)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ac,[e.createVNode(It.ssForm,{rowContents:h.value,onChange:z},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:Z,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Vc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Mc=Lt._export_sfc(Oc,[["__scopeId","data-v-487e0536"]]),zc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(1),s=e.computed(()=>{var C,z;return(C=i==null?void 0:i.stepConfig)!=null&&C.allowTrigger?u.value:(z=i==null?void 0:i.stepConfig)==null?void 0:z.active}),y=(C,z)=>{u.value=z,l("clickStep",C,z)},h=C=>It.getComponent(C),p=()=>{var z;const C=(z=i==null?void 0:i.stepList)==null?void 0:z.find((j,B)=>B+1===s.value);return console.log("findStep",C),C?C==null?void 0:C.children:[]},g=C=>{l("clickTrigger",C)},D=C=>{l("changeTrigger",C)};return(C,z)=>{var Z,F,L,$,m;const j=e.resolveComponent("el-step"),B=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(B,{direction:(Z=n.stepConfig)==null?void 0:Z.direction,active:s.value,"finish-status":"success",simple:(F=n.stepConfig)==null?void 0:F.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,(S,v)=>(e.openBlock(),e.createBlock(j,{key:v,class:"step-item",onClick:T=>y(S,v+1)},{title:e.withCtx(()=>[e.renderSlot(C.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(C.$slots,"description",{description:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),($=n.stepConfig)!=null&&$.allowTrigger&&((m=n.stepConfig)!=null&&m.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(S,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":T=>S.value=T,onClickTrigger:g,onChangeTrigger:D,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(C.$slots,(T,b)=>({name:b,fn:e.withCtx(ie=>[e.renderSlot(C.$slots,b,e.mergeProps({ref_for:!0},ie||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Rc=Lt._export_sfc(zc,[["__scopeId","data-v-d7c99969"]]),Pc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:r}){const i=n,l=r,u=e.ref({}),s=e.ref([]),y=(h,p)=>{l("clickStep",h,p)};return e.watch(()=>i==null?void 0:i.itemData,h=>{var p,g;s.value=(p=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepList"))==null?void 0:p.contents,u.value=(g=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepConfig"))==null?void 0:g.contents},{immediate:!0,deep:!0}),(h,p)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Rc,{stepConfig:u.value,stepList:s.value,onClickStep:y},{icon:e.withCtx(()=>[e.createVNode(g,{name:"import"})]),title:e.withCtx(({title:D})=>[e.createTextVNode(e.toDisplayString(D),1)]),description:e.withCtx(({description:D})=>[e.createTextVNode(e.toDisplayString(D),1)]),_:1},8,["stepConfig","stepList"])}}}),Lc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(r,i)=>{const l=e.resolveComponent("el-timeline-item"),u=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(s,y)=>(e.openBlock(),e.createBlock(l,{key:y,timestamp:s.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(r.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Fc=Lt._export_sfc(Lc,[["__scopeId","data-v-4172a886"]]),$c={class:"line-content"},jc={class:"line-time"},Uc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const r=n,i=e.ref({}),l=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,u=>{var s,y;l.value=(s=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:s.contents,i.value=(y=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:y.contents},{immediate:!0}),(u,s)=>(e.openBlock(),e.createBlock(Fc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:y,timestamp:h})=>[e.createElementVNode("span",$c,e.toDisplayString(y),1),e.createElementVNode("span",jc,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Kc=Lt._export_sfc(Uc,[["__scopeId","data-v-b4d9deed"]]),Wc={class:"tabs-content"},Hc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const r=n,i=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,l=>{const u=l.find(s=>(s==null?void 0:s.key)=="stepList");u?i.value=u.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})):i.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",Wc,[e.createVNode(It.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},qc=Lt._export_sfc(Hc,[["__scopeId","data-v-40865f68"]]),Gn=E.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}}}),Xc={class:"type-select"},Yc=["onClick"],Gc={class:"list-icon"},Jc={__name:"modelSelect",setup(n){const r=Gn(E.pinia),{itemData:i}=E.storeToRefs(r),l=u=>{const s=E.cloneDeep(i.value);s.push({comp:u.comp,name:u.name,compData:[]}),r.setItemData(s)};return(u,s)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pr),(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:g=>l(h)},[e.createElementVNode("div",Gc,[e.createVNode(y,{name:h.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(h.name),1)],8,Yc)]))),128))])}}},Zc=Lt._export_sfc(Jc,[["__scopeId","data-v-91799bf8"]]),Qc={class:"fill-content"},eu={class:"operate-content"},tu={class:"collapse-title-content"},au={class:"collapse-title-item"},nu={key:1},ou=["onClick"],lu={class:"icon-content"},ru={key:0,class:"edit-content"},iu=["onClick"],su={class:"comp-child"},cu={__name:"modelFill",setup(n){const r=Gn(E.pinia),{itemData:i,originalData:l}=E.storeToRefs(r),u=e.ref([]);e.ref([]);const s=e.ref([]),y=e.ref([]),h=j=>{var Z;let B=(Z=E.cloneDeep(y.value))==null?void 0:Z.map((F,L)=>(j===L&&(F.content=!0),F));y.value=B},p=j=>{var Z;let B=(Z=E.cloneDeep(y.value))==null?void 0:Z.map((F,L)=>(j===L&&(F.content=!1),F));y.value=B,u.value=E.cloneDeep(i.value)},g=(j,B)=>{var $;let Z=($=E.cloneDeep(y.value))==null?void 0:$.map((m,S)=>(j===S&&(m.content=!1),m));y.value=Z;const F=E.cloneDeep(i.value),L=F==null?void 0:F.filter((m,S)=>(S===j&&(m.name=B),m));r.setOriginalData(L),r.setItemData(L)};e.watch(()=>i.value,()=>{var j,B,Z;!i.value||((j=i.value)==null?void 0:j.length)===0?u.value=[]:u.value=(B=E.cloneDeep(i.value))==null?void 0:B.filter(F=>(F==null?void 0:F.comp)!=="methodButton"),s.value=u.value,y.value=(Z=E.cloneDeep(s.value))==null?void 0:Z.map((F,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const D=j=>rn(j),C=(j,B,Z)=>{var L,$;if(!j)return;let F=E.cloneDeep(i.value);F=(L=F==null?void 0:F.map((m,S)=>(S===Z&&(m.compData=j),m)))==null?void 0:L.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),y.value=($=E.cloneDeep(F))==null?void 0:$.map((m,S)=>({id:S,content:!1})),r.setOriginalData(F),r.setItemData(F)},z=j=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=E.cloneDeep(i.value),Z=B==null?void 0:B.filter((F,L)=>L!==j);r.setOriginalData(Z),r.setItemData(Z),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(j,B)=>{const Z=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Qc,[B[1]||(B[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",eu,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:u.value},{title:e.withCtx(({item:F,index:L})=>{var $,m,S,v,T,b,ie,Be,et,we;return[e.createElementVNode("div",tu,[e.createElementVNode("div",au,[(m=($=y.value)==null?void 0:$.find(Le=>Le.id===L))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:F.name&&F.name!==""?"8px":"0px"})},e.toDisplayString(F.name),5)),(v=(S=y.value)==null?void 0:S.find(Le=>Le.id===L))!=null&&v.content?(e.openBlock(),e.createElementBlock("div",nu,[e.createVNode(It._sfc_main$2,{modelValue:F.name,"onUpdate:modelValue":Le=>F.name=Le,onClick:B[0]||(B[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(b=(T=y.value)==null?void 0:T.find(Le=>Le.id===L))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Le=>h(L),["stop"]),class:"icon-content"},[e.createVNode(Z,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ou))]),e.createElementVNode("div",lu,[(Be=(ie=y.value)==null?void 0:ie.find(Le=>Le.id===L))!=null&&Be.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(Z,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Le=>p(L),["stop"])},null,8,["onClick"]),e.createVNode(Z,{name:"Save",onClick:e.withModifiers(Le=>g(L,F.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(we=(et=y.value)==null?void 0:et.find(Le=>Le.id===L))!=null&&we.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Le=>z(L),["stop"]),class:"icon-content"},[e.createVNode(Z,{name:"Delete",style:{width:"16px",height:"16px"}})],8,iu))])])]}),content:e.withCtx(({item:F,index:L})=>{var $,m;return[e.createElementVNode("div",su,[e.createTextVNode(e.toDisplayString(D(F.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(F.comp+"Operate")),{itemContents:F==null?void 0:F.compData,originalItemContents:(m=($=s.value)==null?void 0:$.find((S,v)=>v===L))==null?void 0:m.compData,onChange:S=>C(S,F,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},uu=Lt._export_sfc(cu,[["__scopeId","data-v-a46a44b9"]]),du={key:0,class:"show-content"},pu={style:{display:"flex"}},fu={__name:"modelShow",setup(n){const r=Gn(E.pinia),{itemData:i}=E.storeToRefs(r),l=e.ref([]);e.watch(()=>i.value,()=>{var s;!i.value||((s=i.value)==null?void 0:s.length)===0?l.value=[]:l.value=E.cloneDeep(i.value)},{deep:!0,immediate:!0});const u=s=>rn(s);return(s,y)=>{var h;return((h=l.value)==null?void 0:h.length)>0?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:g},[e.createElementVNode("div",pu,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:g},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},hu=Lt._export_sfc(fu,[["__scopeId","data-v-3f3e863e"]]),vu={class:"tabs-header"},mu={class:"tabs-list"},gu={class:"tab-name"},yu={class:"tab-actions"},bu=["onClick"],ku=["onClick"],xu=["onClick"],wu={class:"model-operate"},Du={class:"model-select",style:{display:"unset"}},_u={class:"existing-components"},Eu={class:"component-list"},Cu=["onClick"],Su={class:"component-info"},Tu={class:"component-type"},Bu={class:"component-name"},Iu={class:"model-fill"},Nu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.ref([]),s=e.ref(!1),y=e.ref(""),h=e.ref({title:""}),p=e.ref(-1),g=e.ref(!1),D=e.ref(-1),C=e.ref(new WeakMap),z=e.ref(null),j=Gn(E.pinia),{itemData:B}=E.storeToRefs(j),Z=()=>{y.value="新增标签页",h.value.title="",p.value=-1,s.value=!0},F=X=>{y.value="修改标签页",h.value.title=u.value[X].title,p.value=X,s.value=!0},L=X=>{const R=S(X);C.value.delete(R),u.value.splice(X,1),Qe()},$=()=>{if(h.value.title.trim()){if(p.value===-1){const X={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:m()};u.value.push(X)}else u.value[p.value].title=h.value.title,u.value[p.value].value=h.value.title,u.value[p.value].label=h.value.title;s.value=!1,Qe()}},m=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=X=>{const R=u.value[X];return R.id||(R.id=m()),R.id},v=X=>{var ve;D.value=X;const R=S(X);z.value=E.cloneDeep(B.value);let ue=C.value.get(R);!ue&&((ve=u.value[X].children)==null?void 0:ve.length)>0&&(ue=Be(u.value[X].children)),ue?j.setItemData(E.cloneDeep(ue)):j.setItemData([]),g.value=!0},T=e.computed(()=>{const X=E.useModelComp(E.pinia),R=E.storeToRefs(X).itemData.value;return console.log("可用组件数据",R),!R||!Array.isArray(R)?[]:R.filter(ue=>{var ve;if(ue.comp==="Tabs"&&D.value>=0){const Ce=S(D.value);if((ve=ue.compData)==null?void 0:ve.some(Fe=>{var q;return Fe.key==="stepList"&&((q=Fe.contents)==null?void 0:q.some(Y=>Y.id===Ce))}))return!1}return!0})}),b=X=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[X]||X,ie=X=>{var R;try{const ue=E.cloneDeep(X);ue.id=Date.now()+Math.random(),ue.comp==="Tabs"&&((R=ue.compData)==null||R.forEach(Ce=>{Ce.key==="stepList"&&Ce.contents&&Ce.contents.forEach(ke=>{ke.id=m()})}));const ve=E.cloneDeep(B.value);ve.push(ue),j.setItemData(ve)}catch(ue){console.error("添加组件失败:",ue)}},Be=X=>X.map(R=>{var ue;switch(R.type){case"form":return{comp:"Form",name:R.value||"表单",compData:et(R.content)};case"table":return{comp:"Table",name:R.value||"表格",compData:we(R.content)};default:return{comp:"Unknown",name:R.value||"",compData:((ue=R.content)==null?void 0:ue.originalData)||[]}}}),et=X=>{if(!X)return[];const R=[];return X.rowContents&&R.push({key:"formContent",contents:X.rowContents}),X.buttonValue&&R.push({key:"formButton",contents:X.buttonValue}),typeof X.isEnableWrap<"u"&&R.push({key:"enableWrap",contents:X.isEnableWrap}),R},we=X=>[],Le=()=>{if(D.value>=0&&D.value<u.value.length){const X=S(D.value);C.value.set(X,E.cloneDeep(B.value)),u.value[D.value].children=Q(B.value),console.log("保存后的数据",Q(B.value))}g.value=!1,D.value=-1,z.value=null,Qe()},Me=()=>{z.value&&j.setItemData(E.cloneDeep(z.value)),g.value=!1,D.value=-1,z.value=null},I=()=>{g.value&&Me()},Q=X=>{if(!Array.isArray(X))throw new Error("sourceData must be an array");return X.map((R,ue)=>{if(!R||typeof R!="object")return R;const{comp:ve,name:Ce,compData:ke}=R;switch(ve){case"Form":return{type:"form",content:G(ke||[]),value:"表单"};case"Table":return{type:"table",content:te(ke||[]),value:"表格"};default:return{type:"xxx",content:Re(ke||[]),value:""}}})},G=X=>{const R={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ue={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return X.forEach((ve,Ce)=>{if(!ve||typeof ve!="object"){console.warn(`Invalid config at index ${Ce}:`,ve);return}const{key:ke,contents:Fe}=ve,q=ue[ke];if(!q){console.warn(`Unknown Form config key: ${ke}`);return}ke==="enableWrap"?R[q]=!!Fe:R[q]=Array.isArray(Fe)?Fe:[]}),R},te=X=>{const R={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ue={header:"columns",tableContents:"tableData"};return X.forEach((ve,Ce)=>{if(!ve||typeof ve!="object"){console.warn(`Invalid config at index ${Ce}:`,ve);return}const{key:ke,contents:Fe}=ve,q=ue[ke];if(!q){console.warn(`Unknown Table config key: ${ke}`);return}R[q]=Array.isArray(Fe)?Fe:[]}),R},Re=X=>(console.log("Default conversion logic - to be implemented"),{originalData:X,processed:!1,componentType:"unknown"}),Qe=()=>{const X=[{key:"stepList",contents:u.value}];l("change",X)};return e.watch(()=>i.itemContents,X=>{if(X&&X.length>0){const R=X.find(ue=>ue.key==="stepList");R&&R.contents&&(u.value=R.contents.map(ue=>({title:ue.title||"",value:ue.value||ue.title||"",label:ue.label||ue.title||"",children:ue.children||[],id:ue.id||m()})))}},{immediate:!0,deep:!0}),(X,R)=>{const ue=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-input"),Ce=e.resolveComponent("el-form-item"),ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vu,[R[6]||(R[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Z},[e.createVNode(ue,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),R[5]||(R[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",mu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(Fe,q)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:q},[e.createElementVNode("span",gu,e.toDisplayString(Fe.title),1),e.createElementVNode("div",yu,[e.createElementVNode("button",{onClick:Y=>F(q)},"修改标题",8,bu),e.createElementVNode("button",{onClick:Y=>v(q)},"布局调整",8,ku),e.createElementVNode("button",{onClick:Y=>L(q)},"删除",8,xu)])]))),128))]),e.createVNode(Jt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":R[2]||(R[2]=Fe=>s.value=Fe),title:y.value,onBeforeDestroy:R[3]||(R[3]=Fe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:R[1]||(R[1]=Fe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:$},"确定")]),default:e.withCtx(()=>[e.createVNode(ke,{model:h.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ce,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ve,{modelValue:h.value.title,"onUpdate:modelValue":R[0]||(R[0]=Fe=>h.value.title=Fe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Jt.ssDialog,{modelValue:g.value,"onUpdate:modelValue":R[4]||(R[4]=Fe=>g.value=Fe),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Me},"取消"),e.createElementVNode("button",{onClick:Le},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",wu,[e.createElementVNode("div",Du,[e.createVNode(Zc),e.createElementVNode("div",_u,[R[8]||(R[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,Fe=>(e.openBlock(),e.createElementBlock("div",{key:Fe.id,class:"component-item",onClick:q=>ie(Fe)},[e.createElementVNode("div",Su,[e.createElementVNode("span",Tu,e.toDisplayString(b(Fe.comp)),1),e.createElementVNode("span",Bu,e.toDisplayString(Fe.name),1)]),R[7]||(R[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Cu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:X.innerWidth},[e.createVNode(hu)])),e.createElementVNode("div",Iu,[e.createVNode(uu)])])]),_:1},8,["modelValue"])])}}},Au=Lt._export_sfc(Nu,[["__scopeId","data-v-9096ed0d"]]);function Vu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function Ou(n){return{type:"line",...n}}function Mu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function zu(n){return{type:"bar",barWidth:"60%",...n}}function Ru(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Pu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Ba={line:{initBaseoptions:Vu,initSeries:Ou},bar:{initBaseoptions:Mu,initSeries:zu},pie:{initBaseoptions:Ru,initSeries:Pu}},Lo=E.useMenuState(E.pinia),Bl=(n,r)=>{var D;const i=[],l=[],{group:u,nameCol:s,valueCol:y}=r||{},h=n==null?void 0:n.find(C=>{const{name:z}=C;return z===u});if(!h)return{names:i,values:l};const p=(D=h==null?void 0:h.compData)==null?void 0:D.find(C=>{const{key:z}=C;return z==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(C=>{const z=C==null?void 0:C[0];let j=!1;rt.isObject(z)&&(z!=null&&z.id)&&(j=!0);let B=s,Z=y;j&&(B=B+1,Z=Z+1);const F=C==null?void 0:C[B],L=C==null?void 0:C[Z];i.push(F),l.push(L)}),{names:i,values:l}},Lu=async n=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:u,detailValueCol:s,isSelfDetail:y}=n||{};let h=null;const p=sessionStorage.getItem("systemKey");if(y&&Lo.activeMenuPath&&(h=await Ve.getItemData(`${Lo.activeMenuPath}`,p,"")),!y){const g=r==null?void 0:r.join("/");h=await Ve.getItemData(`${g}^${i}`,p,"")}return Bl(h,{group:l,nameCol:u,valueCol:s})},Fu=async n=>{const{menu:r,group:i,nameCol:l,valueCol:u}=n||{},s=r==null?void 0:r.join("/"),y=sessionStorage.getItem("systemKey"),h=await Ve.getItemData(s,y,"");return Bl(h,{group:i,nameCol:l,valueCol:u})},ko=async(n,r)=>{const i={names:[],values:[]},{menu:l,group:u,nameCol:s,valueCol:y}=n||{};if(!l.length||!u)return i;const{mainKey:h,group:p,nameCol:g,valueCol:D,isSelfDetail:C}=r||{};return h&&p&&It.isNumber(g)&&It.isNumber(D)?await Lu({menu:l,mainKey:h,detailGroup:p,detailNameCol:g,detailValueCol:D,isSelfDetail:C}):It.isNumber(s)&&It.isNumber(y)?await Fu({menu:l,group:u,nameCol:s,valueCol:y}):i},$u=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ba==null?void 0:Ba[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=u??"";const{names:g,values:D}=await ko(r,i);if(!g||!D)return p;p.xAxis.data=g;const C=h({data:D});return p.series.push(C),p},ju=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ba==null?void 0:Ba[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=u??"";const{names:g,values:D}=await ko(r,i);if(!g||!D)return p;p.xAxis.data=g;const C=h({data:D});return p.series.push(C),p},Uu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ba==null?void 0:Ba[l];if(!s)return;const{initBaseoptions:y,initSeries:h}=s,p=y();p.title.text=u??"";const{names:g,values:D}=await ko(r,i);if(!g||!D)return p;const C=[];for(let j=0;j<g.length;j++){const B=g[j],Z=D[j];C.push({name:B,value:Z})}const z=h({data:C});return p.series.push(z),p},Ku=async(n=[])=>{var y,h,p;const r=((y=n==null?void 0:n.find(g=>g.key==="chartBaseConfig"))==null?void 0:y.contents)??{},i=((h=n==null?void 0:n.find(g=>g.key==="chartDataConfig"))==null?void 0:h.contents)??{},l=((p=n==null?void 0:n.find(g=>g.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:u}=r;let s={};return u==="line"&&(s=await $u({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="bar"&&(s=await ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="pie"&&(s=await Uu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s},Wu=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 r=n,i=e.ref({});e.onMounted(async()=>{const u=r==null?void 0:r.itemData;i.value=await Ku(u)});const l=e.computed(()=>(r==null?void 0:r.height)||"300px");return(u,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Wr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Hu=Lt._export_sfc(Wu,[["__scopeId","data-v-d4c081e8"]]),qu={class:"chart-module layout"},Xu={class:"chart-module content"},Yu={class:"chart-module content"},Gu={class:"form-content"},Ju={class:"dialog-footer"},Zu={class:"form-content"},Qu={class:"dialog-footer"},ed={class:"form-content"},td={class:"dialog-footer"},ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r,u=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),y=()=>[{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({}),p=()=>{var se;s.value=y(),(se=s.value)==null||se.forEach(le=>{var Se;const pe=le==null?void 0:le.prop;le.value=(Se=h==null?void 0:h.value)==null?void 0:Se[pe]}),u.visible=!0},g=se=>{h.value=se},D=()=>{var se;u.visible=!1,l("change",(se=Ie())==null?void 0:se.compData)},C=e.reactive({visible:!1,width:"840",title:"数据配置"}),z=e.ref([]),j=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],B=e.ref({}),Z=()=>{const se=z.value,le=E.cloneDeep(se);return le==null||le.forEach(pe=>{var Ye;const Se=pe==null?void 0:pe.prop;pe.value=(Ye=B.value)==null?void 0:Ye[Se]}),le},F=se=>{var pe;B.value=se;const le=Z();z.value=le,l("change",(pe=Ie())==null?void 0:pe.compData)},L=async()=>{const se=await Ve.getMenusContent(),le=Z();le==null||le.forEach(pe=>{(pe==null?void 0:pe.prop)==="menu"&&(pe.contents=se)}),z.value=le,C.visible=!0,await Fe(B.value.menu),await k(B.value.group)},$=e.reactive({visible:!1,width:"840",title:"详情页配置"}),m=e.ref([]),S=()=>[{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:[]}],v=e.ref({}),T=()=>{const se=m.value,le=E.cloneDeep(se);return le==null||le.forEach(pe=>{var Ye;const Se=pe==null?void 0:pe.prop;pe.value=(Ye=v.value)==null?void 0:Ye[Se]}),le},b=se=>{var pe;v.value=se;const le=T();m.value=le,l("change",(pe=Ie())==null?void 0:pe.compData)},ie=async()=>{await I();const se=E.cloneDeep(Be.value),le=T();le==null||le.forEach(pe=>{var Ye;const Se=pe==null?void 0:pe.prop;pe.value=(Ye=v==null?void 0:v.value)==null?void 0:Ye[Se],Se==="mainKey"&&(pe.contents=se)}),m.value=le,$.visible=!0},Be=e.ref([]),et=e.ref([]),we=e.ref({}),Le=e.ref({}),Me=()=>{const{compData:se}=ve.value||{},le=se==null?void 0:se.find(H=>{const{key:ne}=H;return ne==="header"}),pe=(le==null?void 0:le.contents)||[],Se=pe==null?void 0:pe.filter((H,ne)=>{const{label:N}=H;return N!=="操作"}),Ye=Se==null?void 0:Se.findIndex((H,ne)=>{const{isMainKey:N}=H;return N});if(Ye<0)return[];const dt=se==null?void 0:se.find(H=>{const{key:ne}=H;return ne==="tableContents"}),x=(dt==null?void 0:dt.contents)||[];return x==null?void 0:x.map(H=>{const ne=H==null?void 0:H[0];let N=Ye;rt.isObject(ne)&&(ne!=null&&ne.id)&&(N=N+1);const ce=H==null?void 0:H[N];return{label:ce,value:ce}})},I=async()=>{const se=await Me();Be.value=se},Q=async se=>{const le=sessionStorage.getItem("systemKey");return await Ve.getItemData(se,le,"")},G=async se=>{const le=se;et.value=le==null?void 0:le.map(pe=>{const{name:Se}=pe;return we.value[Se]=pe,{label:Se,value:Se}})},te=se=>{const{comp:le,compData:pe}=Le.value||{};if(le==="Table"){let Se=T();Se=Se.filter(Ye=>{const{prop:dt}=Ye;return dt!=="formItems"}),q(Se,pe),m.value=Se}},Re=async()=>{var pe,Se;const se=(pe=v==null?void 0:v.value)==null?void 0:pe.mainKey,le=(Se=B==null?void 0:B.value)==null?void 0:Se.menu;if(se){const dt=`${le==null?void 0:le.join("/")}^${se}`,x=await Q(dt);await G(x);const V=T();V==null||V.forEach(H=>{(H==null?void 0:H.prop)==="group"&&(H.contents=et.value)}),m.value=V}};e.watch(()=>{var se;return(se=v==null?void 0:v.value)==null?void 0:se.mainKey},async(se,le)=>{se!=le&&se&&await Re()});const Qe=async se=>{const le=we.value[se];Le.value=le,await te()};e.watch(()=>{var se;return(se=v==null?void 0:v.value)==null?void 0:se.group},async(se,le)=>{se!=le&&se&&Qe(se)});const X=async()=>{var le;await Re();const se=(le=v.value)==null?void 0:le.group;await Qe(se)},R=e.ref([]),ue=e.ref({}),ve=e.ref({}),Ce=async se=>{const le=se==null?void 0:se.join("/"),pe=sessionStorage.getItem("systemKey");return await Ve.getItemData(le,pe,"")},ke=async se=>{const le=await Ce(se);R.value=le==null?void 0:le.map(pe=>{const{name:Se}=pe;return ue.value[Se]=pe,{label:Se,value:Se}})},Fe=async(se,le)=>{await ke(se);const pe=Z();pe==null||pe.forEach(Se=>{(Se==null?void 0:Se.prop)==="group"&&(Se.contents=R.value)}),z.value=pe};e.watch(()=>{var se;return(se=B==null?void 0:B.value)==null?void 0:se.menu},async(se,le)=>{const pe=se==null?void 0:se.join("/"),Se=le==null?void 0:le.join("/");pe!=Se&&await Fe(se)});const q=(se,le)=>{const pe=le==null?void 0:le.find(x=>{const{key:V}=x;return V==="header"}),Se=(pe==null?void 0:pe.contents)||[],Ye=Se==null?void 0:Se.filter((x,V)=>{const{label:H}=x;return H!=="操作"}),dt=Ye==null?void 0:Ye.map((x,V)=>{const{label:H}=x;return{label:H,value:V}});se==null||se.forEach(x=>{const V=x==null?void 0:x.prop;(V==="nameCol"||V==="valueCol")&&(x.contents=dt)})},Y=se=>{const{comp:le,compData:pe}=ve.value||{};if(le==="Table"){B.value.formItems=[];let Se=Z();Se=Se.filter(Ye=>{const{prop:dt}=Ye;return dt!=="formItems"}),q(Se,pe),z.value=Se}},k=async se=>{const le=ue.value[se];ve.value=le,await Y()};e.watch(()=>{var se;return(se=B==null?void 0:B.value)==null?void 0:se.group},async(se,le)=>{se!=le&&k(se)});const ge=async()=>{var pe,Se;const se=(pe=B.value)==null?void 0:pe.menu;await Fe(se);const le=(Se=B.value)==null?void 0:Se.group;await k(le)},Ie=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:B.value},{key:"chartDetailConfig",contents:v.value}]}),De=()=>{u.visible=!1,C.visible=!1,$.visible=!1};return e.onMounted(async()=>{var le,pe,Se;z.value=j(),m.value=S();const se=i==null?void 0:i.itemContents;h.value=((le=se==null?void 0:se.find(Ye=>Ye.key==="chartBaseConfig"))==null?void 0:le.contents)??{},B.value=((pe=se==null?void 0:se.find(Ye=>Ye.key==="chartDataConfig"))==null?void 0:pe.contents)??{},await ge(),v.value=((Se=se==null?void 0:se.find(Ye=>Ye.key==="chartDetailConfig"))==null?void 0:Se.contents)??{},await X()}),(se,le)=>{const pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qu,[le[4]||(le[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:le[0]||(le[0]=Se=>p())},{default:e.withCtx(()=>le[3]||(le[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Xu,[le[6]||(le[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:le[1]||(le[1]=Se=>L())},{default:e.withCtx(()=>le[5]||(le[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Yu,[le[8]||(le[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:le[2]||(le[2]=Se=>ie())},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:De,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Gu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ju,[e.createVNode(pe,{class:"cancel-button button",onClick:De,id:"themeBorderButton"},{default:e.withCtx(()=>le[9]||(le[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(pe,{class:"ok-button button",onClick:D,id:"themeButton"},{default:e.withCtx(()=>le[10]||(le[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:De,width:C.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:F},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qu,[e.createVNode(pe,{class:"cancel-button button",onClick:De,id:"themeBorderButton"},{default:e.withCtx(()=>le[11]||(le[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(pe,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>le[12]||(le[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:$.visible,title:$.title,onBeforeDestroy:De,width:$.width},{default:e.withCtx(()=>[e.createElementVNode("div",ed,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",td,[e.createVNode(pe,{class:"cancel-button button",onClick:De,id:"themeBorderButton"},{default:e.withCtx(()=>le[13]||(le[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(pe,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>le[14]||(le[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),nd=Lt._export_sfc(ad,[["__scopeId","data-v-fe119645"]]),od=(n,r)=>{let i;n.replaceAll(" ",`\r
2
- `).replaceAll(`
3
- `,`\r
4
- `).includes(`\r
5
- `)?i=n.replaceAll(`
6
- `,`\r
7
- `).replaceAll(" ",`\r
8
- `).split(`\r
9
- `).filter(s=>s.trim()!==""):i=n.replaceAll(" ",`\r
10
- `).split(`
11
- `).filter(s=>s.trim()!==""),i=i==null?void 0:i.map(s=>(s=s==null?void 0:s.replaceAll("\r",""),s));const l=[];let u="";for(const s of i)s.includes("{")||u.includes("{")||s.includes("[")||u.includes("[")||s.includes("【")||u.includes("【")||s.includes("(")||u.includes("(")||s.includes("(")||u.includes("(")||s.includes("/*")||u.includes("/*")?(u+=s.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&!(r!=null&&r.find(y=>y===u[u.length-1]))?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):u!=null&&u.includes("*/")&&(u=u.replace(/\/\*[\s\S]*?\*\//g,""))):r!=null&&r.find(y=>y===s[s.length-1])?u+=s.trim():l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},jt=(n,r)=>{let i=n;const l=[];let u="",s=0;for(const y of i)s++,y.includes("{")||u.includes("{")||y.includes("[")||u.includes("[")||y.includes("【")||u.includes("【")||y.includes("(")||u.includes("(")||y.includes("(")||u.includes("(")||y.includes("/*")||u.includes("/*")?(u+=y.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&u[u.length-1]===r?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):s===(n==null?void 0:n.length)&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u="")):(u+=y.trim(),(u==null?void 0:u[(u==null?void 0:u.length)-1])===r&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""));return(u==null?void 0:u.length)!==0&&l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),l},ld=(n,r)=>n===r||n.length===r.length&&n.every((i,l)=>i===r[l]),rd=n=>n.reduce((r,i)=>{var u;const l=(((u=r.at(-1))==null?void 0:u.total)??0)+i;return r.push({key:i,total:l}),r},[]),id=n=>{for(let r=n.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[n[r],n[i]]=[n[i],n[r]]}return n},sd=n=>{let r=n;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1))};let xt="$R",cd="[Any]";const ud=n=>{var y,h;let r={},i=n==null?void 0:n[0],l=(h=(y=i==null?void 0:i.replace("{",xt))==null?void 0:y.split(xt))==null?void 0:h[0];(l==null?void 0:l[0])==="*"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length)),l=l==null?void 0:l.split(":"),r.group=l;let u=n==null?void 0:n[1],s=u==null?void 0:u.replaceAll(cd,"");return(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),r.filter=s,r},dd=n=>{var g,D,C,z,j,B,Z,F,L;let r=[],i=[],l=n==null?void 0:n.map($=>{var S;let m=(S=jt($,"@"))==null?void 0:S[0];return(m==null?void 0:m[(m==null?void 0:m.length)-1])==="@"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m}),u=jt(l==null?void 0:l[0],":");i=(g=u==null?void 0:u.filter($=>!($!=null&&$.includes("{"))&&!($!=null&&$.includes("["))))==null?void 0:g.join(""),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":");let s=u==null?void 0:u.filter($=>($==null?void 0:$.includes("{"))||($==null?void 0:$.includes("["))),y=(C=s==null?void 0:s[0])==null?void 0:C.slice(1,((D=s==null?void 0:s[0])==null?void 0:D.length)-1);y=(z=jt(y,","))==null?void 0:z.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$));let h="@"+((Z=(B=(j=n==null?void 0:n[0])==null?void 0:j.replace("@",xt))==null?void 0:B.split(xt))==null?void 0:Z[1]);((F=jt(h,":"))==null?void 0:F.length)>1&&(r=Jn((L=jt(h,":"))==null?void 0:L[1]),r=[r]);let p=y==null?void 0:y.map(($,m)=>{var Be,et,we,Le,Me,I,Q,G,te,Re,Qe,X;let S=(Be=$==null?void 0:$.split("=="))==null?void 0:Be[0],v=(et=$==null?void 0:$.split("=="))==null?void 0:et[1],T=[],b=[],ie=[];return(v==null?void 0:v[0])==="$"&&(v=v==null?void 0:v.slice(1,v==null?void 0:v.length),T=(Le=(we=v==null?void 0:v.split("*"))==null?void 0:we[0])==null?void 0:Le.split(":"),b=(Re=(te=(G=(Q=(I=(Me=v==null?void 0:v.split("*"))==null?void 0:Me[1])==null?void 0:I.replace("{",xt))==null?void 0:Q.split(xt))==null?void 0:G[0])==null?void 0:te.split(":"))==null?void 0:Re.filter(R=>R!==""),ie=(X=(Qe=v==null?void 0:v.replace("{",xt))==null?void 0:Qe.split(xt))==null?void 0:X[1],ie=ie==null?void 0:ie.replaceAll("}",""),ie=ie==null?void 0:ie.split(":")),{prop:S,label:S,value:"",menuPath:T,groups:b,columns:ie,width:y==null?void 0:y.length}});return{groupName:i,formContents:p,contents:r}},Jn=n=>{var l,u;let r=[],i=n.slice(1,(n==null?void 0:n.length)-1);if((i==null?void 0:i[0])!=="[")(l=jt(i,","))==null||l.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),r.push(s??"")});else{let s=[];(u=jt(i,","))==null||u.forEach(y=>{(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),s.push(Jn(y))}),r=s}return r},fo=(n,r)=>{var C,z,j,B,Z,F,L,$,m,S,v,T,b,ie,Be,et,we,Le,Me,I,Q,G,te,Re,Qe,X,R,ue,ve,Ce,ke,Fe,q;let i,l=[],u=[],s=[],y=[],h=[],p=[],g="Input",D;if(n!=null&&n.includes("@Pam")||n!=null&&n.includes("==")||n!=null&&n.includes("="))if(n!=null&&n.includes("@Pam")){i=(z=(C=n==null?void 0:n.replace("@Pam",xt))==null?void 0:C.split(xt))==null?void 0:z[0];let Y=(B=(j=n==null?void 0:n.replace("@Pam",xt))==null?void 0:j.split(xt))==null?void 0:B[1];Y=Y==null?void 0:Y.slice(1,(Y==null?void 0:Y.length)-1),Y=(Z=jt(Y,","))==null?void 0:Z.map(k=>(k="@"+k,k)),D=Y==null?void 0:Y.find(k=>k==null?void 0:k.includes("@IdentName")),D=D?(L=(F=D==null?void 0:D.replace("=",xt))==null?void 0:F.split(xt))==null?void 0:L[1]:i}else{if(i=($=n==null?void 0:n.split("=="))==null?void 0:$[0],D=(m=n==null?void 0:n.split("=="))==null?void 0:m[0],n!=null&&n.includes("=")&&!(n!=null&&n.includes("==")))i=(S=n==null?void 0:n.split("="))==null?void 0:S[0],D=i,l=(b=(T=(v=n==null?void 0:n.split("="))==null?void 0:v[1])==null?void 0:T.split("/"))==null?void 0:b.map(Y=>({label:Y,value:Y}));else if((Be=(ie=n==null?void 0:n.split("=="))==null?void 0:ie[1])!=null&&Be.includes("||")){let Y=[];(Le=(we=(et=n==null?void 0:n.split("=="))==null?void 0:et[1])==null?void 0:we.split("||"))==null||Le.forEach(k=>{var ge,Ie,De;u.push((Ie=(ge=k==null?void 0:k.split("@Filter"))==null?void 0:ge[0])==null?void 0:Ie.split("/")),Y.push((De=k==null?void 0:k.split("@Filter"))==null?void 0:De[1])}),s=Y==null?void 0:Y.map(k=>(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1),k))}else{let Y=(I=n==null?void 0:n.split("=="))==null?void 0:I[((Me=n==null?void 0:n.split("=="))==null?void 0:Me.length)-1];if(!(Y!=null&&Y.includes("&"))){let k=(Q=Y==null?void 0:Y.replace("*",xt))==null?void 0:Q.split(xt),ge=(k==null?void 0:k[0])===""?r==null?void 0:r.value:k==null?void 0:k[0];ge=ge==null?void 0:ge.replaceAll("[Any]",""),(ge==null?void 0:ge[0])==="$"&&(ge=(G=ge==null?void 0:ge.slice(1,ge==null?void 0:ge.length))==null?void 0:G.replaceAll(":","/")),y=ge==null?void 0:ge.split("/");let Ie=(Re=(te=k==null?void 0:k[1])==null?void 0:te.replace("{",xt))==null?void 0:Re.split(xt),De=Ie==null?void 0:Ie[0];(De==null?void 0:De[(De==null?void 0:De.length)-1])===":"&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),h=De==null?void 0:De.split(":"),p=(ue=(R=(X=(Qe=Ie==null?void 0:Ie[1])==null?void 0:Qe.replace("}",xt))==null?void 0:X.split(xt))==null?void 0:R[0])==null?void 0:ue.split(":");let se=(ke=(Ce=(ve=Ie==null?void 0:Ie[1])==null?void 0:ve.replace("}",xt))==null?void 0:Ce.split(xt))==null?void 0:ke[1];se!==""&&sd(se)}}g="Select"}else i=n,D=n;return i!=null&&i.includes("@Pam")&&(i=(q=(Fe=n==null?void 0:n.replace("@Pam",xt))==null?void 0:Fe.split(xt))==null?void 0:q[0],D=i),{label:i,prop:D,options:l,allContents:u,filterContents:s,menus:y,groups:h,words:p,align:"center",formType:g}},ho=(n,r)=>{var l,u,s,y,h,p,g,D,C,z,j,B,Z,F,L,$,m;let i=[];if((n==null?void 0:n[0])==="{"&&(n==null?void 0:n[(n==null?void 0:n.length)-1])==="}"&&!((y=(s=(u=(l=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1))==null?void 0:l.replace(":",xt))==null?void 0:u.split(xt))==null?void 0:s[0])!=null&&y.includes(","))){let S=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1),v=(h=S==null?void 0:S.replace(":",xt))==null?void 0:h.split(xt);if(((p=jt(v==null?void 0:v[1],"="))==null?void 0:p.length)===1){let T=v==null?void 0:v[0];i==null||i.push({label:T,prop:T,children:ho((D=v==null?void 0:v[1])==null?void 0:D.slice(1,((g=v==null?void 0:v[1])==null?void 0:g.length)-1),r),align:"center"})}else(L=(F=(Z=(B=(j=(z=(C=S==null?void 0:S.replace("{",xt))==null?void 0:C.split(xt))==null?void 0:z[1])==null?void 0:j.replace("}",xt))==null?void 0:B.split(xt))==null?void 0:Z[0])==null?void 0:F.split(","))==null||L.forEach(T=>{i==null||i.push({label:T,prop:T,align:"center"})})}else if((n==null?void 0:n[0])==="{")($=jt(n,","))==null||$.forEach(S=>{var v,T,b,ie,Be,et,we,Le,Me,I,Q;if((S==null?void 0:S[(S==null?void 0:S.length)-1])===","&&(S=S==null?void 0:S.slice(0,(S==null?void 0:S.length)-1)),(S==null?void 0:S[0])==="{"){let G=jt(S,"="),te=G==null?void 0:G[(G==null?void 0:G.length)-1],Re=[],Qe=[],X=[],R=(v=te==null?void 0:te.replace("*",xt))==null?void 0:v.split(xt),ue=(R==null?void 0:R[0])===""?r==null?void 0:r.value:R==null?void 0:R[0];ue=ue==null?void 0:ue.replaceAll("[Any]",""),(ue==null?void 0:ue[0])==="$"&&(ue=(T=ue==null?void 0:ue.slice(1,ue==null?void 0:ue.length))==null?void 0:T.replaceAll(":","/")),Re=ue==null?void 0:ue.split("/");let ve=(ie=(b=R==null?void 0:R[1])==null?void 0:b.replace("{",xt))==null?void 0:ie.split(xt),Ce=ve==null?void 0:ve[0];(Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])===":"&&(Ce=Ce==null?void 0:Ce.slice(0,(Ce==null?void 0:Ce.length)-1)),Qe=Ce==null?void 0:Ce.split(":"),X=(Le=(we=(et=(Be=ve==null?void 0:ve[1])==null?void 0:Be.replace("}",xt))==null?void 0:et.split(xt))==null?void 0:we[0])==null?void 0:Le.split(",");let ke=(I=G==null?void 0:G[0])==null?void 0:I.slice(1,((Me=G==null?void 0:G[0])==null?void 0:Me.length)-2);(Q=ke==null?void 0:ke.split(","))==null||Q.forEach((Fe,q)=>{var Y;i.push({label:Fe,prop:Fe,align:"center",menus:Re,groups:Qe,words:(Y=X==null?void 0:X[q])==null?void 0:Y.split(":"),formType:(Re==null?void 0:Re.length)>0?"Select":"Input"})})}else i.push({label:S,prop:S,align:"center"})});else{let S=(m=jt(n,","))==null?void 0:m.map(v=>((v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),v));S==null||S.forEach(v=>{i.push(fo(v,r))})}return i},pd=(n,r)=>{var y,h,p,g,D;let i=n;if(!n)return;let l="";((y=jt(n,"}"))==null?void 0:y.length)>1&&(i=(h=jt(n,"}"))==null?void 0:h[0],l=(p=jt(n,"}"))==null?void 0:p[1]),(n==null?void 0:n[0])==="{"&&(n==null?void 0:n[(n==null?void 0:n.length)-1])==="}"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1));let u=[],s=[];return u.push({label:"排序",prop:"sort"}),(g=jt(i,","))==null||g.forEach(C=>{var z;(C==null?void 0:C[(C==null?void 0:C.length)-1])===","&&(C=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1)),(C==null?void 0:C[0])==="{"?(z=ho(C,r))==null||z.forEach(j=>{u.push(j)}):u.push(fo(C,r))}),l!==""&&((l==null?void 0:l[0])=="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),(D=jt(l,","))==null||D.forEach(C=>{var z;(C==null?void 0:C[(C==null?void 0:C.length)-1])===","&&(C=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1)),(C==null?void 0:C[0])==="{"?(z=ho(C,r))==null||z.forEach(j=>{s.push(j)}):s.push(fo(C,r))})),{columns:u,secondColumns:s}},Fo=n=>{var r,i,l;if(n!=null&&n.includes("@Filter"))return n;{let u=(i=(r=n==null?void 0:n.replace("(",xt))==null?void 0:r.split(xt))==null?void 0:i[1];return u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),u=(l=jt(u,","))==null?void 0:l.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),"@"+s)),u=u==null?void 0:u.join(","),n!=null&&n.includes("@Quote")&&(u!=null&&u.includes("@Type")||(u=u===""?u+"@Type:Manual":u+",@Type:Manual"),u!=null&&u.includes("@SonSync")||(u=u===""?u+"@SonSync:No":u+",@SonSync:No"),u!=null&&u.includes("@FatherSync")||(u=u===""?u+"@FatherSync:Yes":u+",@FatherSync:Yes")),u}},fd=(n,r,i="")=>{var z,j,B,Z,F,L,$,m,S,v,T,b,ie,Be,et,we,Le,Me;let l=[];if(((z=n==null?void 0:n[0])==null?void 0:z[0])!=="*"&&((j=n==null?void 0:n[0])==null?void 0:j[0])!=="$")return;let u=jt(n==null?void 0:n[0],":");l=(B=u==null?void 0:u.filter(I=>!(I!=null&&I.includes("{"))&&!(I!=null&&I.includes("["))))==null?void 0:B.join("");let s="";(l==null?void 0:l[(l==null?void 0:l.length)-1])===":"&&(l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1)),(l==null?void 0:l[0])==="*"?(l=l==null?void 0:l.slice(1,l==null?void 0:l.length),l=l==null?void 0:l.split(":")):(s=E.cloneDeep(l)+":",l=[]);let y=u==null?void 0:u.filter(I=>!(!(I!=null&&I.includes("{"))&&!(I!=null&&I.includes("["))));s=s+((y==null?void 0:y[0])??"");let h=y==null?void 0:y[1];(s==null?void 0:s[0])==="["&&(h=E.cloneDeep(s)+(h??""),s="");let p=h?Jn(h):[];!(p!=null&&p.every(I=>Array.isArray(I)))&&(p==null?void 0:p.length)>0&&(p=[p]);let g=(Z=jt(s,"@"))!=null&&Z[1]?"@"+((F=jt(s,"@"))==null?void 0:F[1]):"";if(s=(L=jt(s,"@"))==null?void 0:L[0],(s==null?void 0:s[0])==="$"&&(g=E.cloneDeep(s)+(g??""),s=""),i!==""&&(g=i),g!==""){(g==null?void 0:g[0])==="$"&&(g=g==null?void 0:g.slice(1,g==null?void 0:g.length)),(g==null?void 0:g[(g==null?void 0:g.length)-1])===":"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1));let I="";if(g!=null&&g.includes("(@")){I=(m=($=g==null?void 0:g.replace("(@",xt))==null?void 0:$.split(xt))==null?void 0:m[0];let Q=(v=(S=g==null?void 0:g.replace("(@",xt))==null?void 0:S.split(xt))==null?void 0:v[1];Q="@"+(Q==null?void 0:Q.slice(0,(Q==null?void 0:Q.length)-1));let G=(T=jt(Q,","))==null?void 0:T.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),Fo(te)));g=I+"("+(G==null?void 0:G.join(","))+")"}else{I=(ie=(b=g==null?void 0:g.replace("@",xt))==null?void 0:b.split(xt))==null?void 0:ie[0];let Q=(et=(Be=g==null?void 0:g.replace("@",xt))==null?void 0:Be.split(xt))==null?void 0:et[1];if(Q){Q="@"+Q;let G=(we=jt(Q,","))==null?void 0:we.map(te=>Fo(te));g=I+"("+(G==null?void 0:G.join(","))+")"}else g=I}}(s==null?void 0:s[(s==null?void 0:s.length)-1])==="@"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[(s==null?void 0:s.length)-1])===":"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1));let D=pd(s,r),C=s===""?[]:(D==null?void 0:D.columns)??[];return C!=null&&C.some(I=>{var Q;return Array.isArray(I==null?void 0:I.children)&&((Q=I==null?void 0:I.children)==null?void 0:Q.length)>0})&&(C=[C]),(p==null?void 0:p.length)>0&&(Array.isArray(p==null?void 0:p[0])&&((Le=p==null?void 0:p[0])!=null&&Le.every(I=>Array.isArray(I)))?p=p==null?void 0:p.map((I,Q)=>(I=I.map((G,te)=>(G.unshift((te+1).toString()),G)),I)):p=p==null?void 0:p.map((I,Q)=>(I.unshift((Q+1).toString()),I))),D!=null&&D.secondColumns&&((Me=D==null?void 0:D.secondColumns)==null?void 0:Me.length)>0&&(p=p==null?void 0:p.map((I,Q)=>{var G,te;return Array.isArray(I==null?void 0:I[0])?I=I==null?void 0:I.map((Re,Qe)=>{var X,R;return Re.unshift((R=(X=D==null?void 0:D.secondColumns)==null?void 0:X[Qe])==null?void 0:R.prop),Re}):I.unshift((te=(G=D==null?void 0:D.secondColumns)==null?void 0:G[Q])==null?void 0:te.prop),I}),C.unshift({label:"",prop:"disabled",sortable:!1})),{groupName:l,tableColumns:C,tableFilter:g,tableContents:p,columns:(D==null?void 0:D.secondColumns)??[]}};let Xt="$R";const fn=[{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},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1}],hd=n=>{var i;return(n==null?void 0:n.filter.toUpperCase())==="ALL"||(n==null?void 0:n.filter.toUpperCase())==="NONE"?n==null?void 0:n.contents:(i=n==null?void 0:n.contents)==null?void 0:i.map(l=>{var u;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(u=l.contents)==null?void 0:u.slice(0,parseInt(n==null?void 0:n.filter))),l})},vd=n=>{var r;return(n==null?void 0:n.filter)==="Random"?(r=n==null?void 0:n.contents)==null?void 0:r.map(l=>((l==null?void 0:l.key)==="tableContents"&&(l.contents=id(l.contents)),l)):((n==null?void 0:n.filter)==="Ordin"&&(n==null?void 0:n.contents).push({key:"enableWrap",contents:!0}),n==null?void 0:n.contents)},md=n=>{var l,u,s,y;let r=n==null?void 0:n.filter;if(r!=null&&r.includes("*")&&(r="({"+((u=(l=r==null?void 0:r.replace("{",Xt))==null?void 0:l.split(Xt))==null?void 0:u[1])),r=(s=r==null?void 0:r.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return n==null?void 0:n.contents;let i=Ve.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let h=[];return i==null||i.forEach(g=>{let D={};for(let C in g){let z=C;z!=null&&z.includes("[")||(D[z]=g[C])}h.push(D)}),(y=n==null?void 0:n.contents)==null?void 0:y.map(g=>{var C,z,j;let D=(z=(C=n==null?void 0:n.contents)==null?void 0:C.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:z.contents;if(D=(j=Ve.getEqualChild(D))==null?void 0:j.filter(B=>(B==null?void 0:B.label)!=="操作"),(g==null?void 0:g.key)==="tableContents"){let Z=Ve.tableToForm(g==null?void 0:g.contents,D);h==null||h.forEach(F=>{var L,$;for(let m in F)!((L=Z==null?void 0:Z[0])!=null&&L.find(S=>{var v;return(S==null?void 0:S.key)===m||((v=S==null?void 0:S.key)==null?void 0:v.includes(m))}))&&!(Z!=null&&Z.find(S=>{var v;return(S==null?void 0:S.key)===m||((v=S==null?void 0:S.key)==null?void 0:v.includes(m))}))||((($=F[m])==null?void 0:$[0])!=="!"?Z=Z==null?void 0:Z.filter(S=>{var v,T;return((v=S==null?void 0:S.find(b=>{var ie;return(b==null?void 0:b.key)===m||((ie=b==null?void 0:b.key)==null?void 0:ie.includes(m))}))==null?void 0:v.value)===F[m]&&!Array.isArray(F==null?void 0:F[m])||Array.isArray(F==null?void 0:F[m])&&((T=F==null?void 0:F[m])==null?void 0:T.find(b=>{var ie;return((ie=S==null?void 0:S.find(Be=>{var et;return(Be==null?void 0:Be.key)===m||((et=Be==null?void 0:Be.key)==null?void 0:et.includes(m))}))==null?void 0:ie.value)===b}))}):Z=Z==null?void 0:Z.filter(S=>{var v;return((v=S==null?void 0:S.find(T=>{var b;return(T==null?void 0:T.key)===m||((b=T==null?void 0:T.key)==null?void 0:b.includes(m))}))==null?void 0:v.value)!==F[m]}))}),(Z==null?void 0:Z.length)===0?g.contents=[]:g.contents=Z==null?void 0:Z.map(F=>{let L={};return F==null||F.forEach($=>{L[$==null?void 0:$.key]=$==null?void 0:$.value}),L})}return g})}return n==null?void 0:n.contents},gd=n=>n==null?void 0:n.contents,yd=n=>n==null?void 0:n.contents,bd=n=>n==null?void 0:n.contents,kd=n=>n==null?void 0:n.contents,xd=n=>n==null?void 0:n.contents,wd=n=>n==null?void 0:n.contents,Dd=n=>{var r,i,l,u;if(((r=n==null?void 0:n.filter)==null?void 0:r[0])!=="[")return(i=n==null?void 0:n.contents)==null?void 0:i.map(y=>{var h;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(h=y.contents)==null?void 0:h.map(p=>(p.width=parseInt(n==null?void 0:n.filter),p))),y});if(((l=n==null?void 0:n.filter)==null?void 0:l[0])==="["){let s=Jn(n==null?void 0:n.filter),y=s==null?void 0:s.map(p=>parseInt(p));return y=rd(y),(u=n==null?void 0:n.contents)==null?void 0:u.map((p,g)=>{var D;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(D=p.contents)==null?void 0:D.map(C=>{var z;return C.width=(z=y==null?void 0:y.find(j=>(j==null?void 0:j.total)>g+1))==null?void 0:z.key,C})),p})}return n==null?void 0:n.contents},_d=n=>{var r;if((n==null?void 0:n.filter)!==""){let i=n==null?void 0:n.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split(","),(r=n==null?void 0:n.contents)==null?void 0:r.map(u=>{var s,y,h;return(u==null?void 0:u.key)==="header"&&(Array.isArray((s=u==null?void 0:u.contents)==null?void 0:s[0])?u.contents[0]=(h=u.contents[0])==null?void 0:h.map(p=>(i!=null&&i.find(g=>g===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):u.contents=(y=u.contents)==null?void 0:y.map(p=>(i!=null&&i.find(g=>g===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),u})}return n==null?void 0:n.contents},Ed=async n=>{var l,u,s,y,h,p,g,D,C,z,j;const r=Ve.useUnit(E.pinia),{chooseTitle:i}=E.storeToRefs(r);if((n==null?void 0:n.filter)==="true"){let B=await vn((u=(l=i==null?void 0:i.value)==null?void 0:l[0])==null?void 0:u.parentContent,!1),Z=(y=(s=i==null?void 0:i.value)==null?void 0:s[0])==null?void 0:y.value;B=(h=B==null?void 0:B[0])==null?void 0:h.compData;let F=(p=B==null?void 0:B.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:p.contents;F=((g=F==null?void 0:F.find(m=>m==null?void 0:m.isMainKey))==null?void 0:g.prop)??((D=F==null?void 0:F[0])==null?void 0:D.prop);let L=(z=(C=B==null?void 0:B.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:C.contents)==null?void 0:z.find(m=>(m==null?void 0:m[F])===Z);return(j=n==null?void 0:n.contents)==null?void 0:j.map(m=>{var S;return(m==null?void 0:m.key)==="formContent"&&(m.contents=(S=m.contents)==null?void 0:S.map(v=>(v.value=L==null?void 0:L[v==null?void 0:v.prop],v))),m})}return n==null?void 0:n.contents},Il={onNumSlice:hd,onRandomContents:vd,onConditionContents:md,onFatherPaceContents:gd,onPaceContents:yd,onMainTagContents:bd,onButtonContents:kd,onPamButtonContents:xd,onRowButtonContents:wd,onRelated:Ed,onRowNum:Dd,onFixRow:_d},Cd=async n=>{var u,s,y,h,p,g,D,C,z,j,B,Z,F,L,$,m,S,v,T;let r="";if(((u=n==null?void 0:n.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=n==null?void 0:n.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents),r===""||!r)return n;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(h=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:h[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=jt(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=n;for(let b in i){let ie,Be="";(g=i==null?void 0:i[b])!=null&&g.includes("(")?(ie=(z=(C=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:C.split(Xt))==null?void 0:z[0],Be="("+((Z=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Z[1])):(ie=($=(L=(F=i==null?void 0:i[b])==null?void 0:F.replace("=",Xt))==null?void 0:L.split(Xt))==null?void 0:$[0],Be=(v=(S=(m=i==null?void 0:i[b])==null?void 0:m.replace("=",Xt))==null?void 0:S.split(Xt))==null?void 0:v[1]);let et=(T=fn==null?void 0:fn.find(we=>(we==null?void 0:we.key)===ie))==null?void 0:T.value;if(et){const we=Il[et];l=await we({contents:l,filter:Be})}}return l},Sd=async n=>{var u,s,y,h,p,g,D,C,z,j,B,Z,F,L,$,m,S,v,T;let r="";if(((u=n==null?void 0:n.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=n==null?void 0:n.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents),r==="")return n;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(h=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:h[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=jt(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=n;for(let b in i){let ie,Be="";(g=i==null?void 0:i[b])!=null&&g.includes("(")?(ie=(z=(C=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:C.split(Xt))==null?void 0:z[0],Be="("+((Z=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Z[1])):(ie=($=(L=(F=i==null?void 0:i[b])==null?void 0:F.replace("=",Xt))==null?void 0:L.split(Xt))==null?void 0:$[0],Be=(v=(S=(m=i==null?void 0:i[b])==null?void 0:m.replace("=",Xt))==null?void 0:S.split(Xt))==null?void 0:v[1]);let et=(T=fn==null?void 0:fn.find(we=>(we==null?void 0:we.key)===ie))==null?void 0:T.value;if(et){const we=Il[et];l=await we({contents:l,filter:Be})}}return l};let no=["新增","导入","导出"],oo=["查看","编辑","复制新增","删除"],lo=["导入","导出"],ro=["查看","编辑"];const $o=async n=>{let r=[],i=n==null?void 0:n.map(async l=>{var p,g,D,C,z,j,B,Z,F,L,$,m,S,v,T,b,ie,Be,et,we,Le,Me,I,Q,G,te,Re,Qe,X,R,ue,ve,Ce;let u=(C=(D=(g=(p=l==null?void 0:l.contents)==null?void 0:p.find(ke=>{var Fe;return(Fe=ke==null?void 0:ke.key)==null?void 0:Fe.includes("struct")}))==null?void 0:g.value)==null?void 0:D[0])==null?void 0:C.类型,s=Object.values(l==null?void 0:l.name);s=s==null?void 0:s.reverse();let y=(z=l==null?void 0:l.contents)==null?void 0:z.map(ke=>ke==null?void 0:ke.key),h={comp:u,isShow:l==null?void 0:l.is_show,name:s==null?void 0:s[0],id:l==null?void 0:l.object_id,relatedTables:y};for(let ke in s)parseInt(ke)>=1&&(h[`name${parseInt(ke)-1}`]=s[ke]);if(u==="Table"){let ke=(j=l==null?void 0:l.contents)==null?void 0:j.find(ge=>{var Ie;return(Ie=ge==null?void 0:ge.key)==null?void 0:Ie.includes("content")}),Fe=[];ke.value=(B=ke==null?void 0:ke.value)==null?void 0:B.sort((ge,Ie)=>parseInt(ge==null?void 0:ge.id)-parseInt(Ie==null?void 0:Ie.id)),Fe.push({key:"tableContents",contents:ke==null?void 0:ke.value});let q=(m=($=(L=(F=(Z=l==null?void 0:l.contents)==null?void 0:Z.find(ge=>{var Ie;return(Ie=ge==null?void 0:ge.key)==null?void 0:Ie.includes("struct")}))==null?void 0:F.value)==null?void 0:L[0])==null?void 0:$.结构)==null?void 0:m.contents;Array.isArray(q==null?void 0:q[0])?q[0]=(S=q==null?void 0:q[0])==null?void 0:S.filter(ge=>(ge==null?void 0:ge.prop)!=="sort"):q=q==null?void 0:q.filter(ge=>(ge==null?void 0:ge.prop)!=="sort"),Fe.push({key:"header",contents:q}),Fe.push({key:"filter",contents:(Be=(ie=(b=(T=(v=l==null?void 0:l.contents)==null?void 0:v.find(ge=>{var Ie;return(Ie=ge==null?void 0:ge.key)==null?void 0:Ie.includes("struct")}))==null?void 0:T.value)==null?void 0:b[0])==null?void 0:ie.引用)==null?void 0:Be.contents});let Y=no==null?void 0:no.map(ge=>({label:ge})),k=oo==null?void 0:oo.map(ge=>({label:ge}));!Array.isArray(q==null?void 0:q[0])&&((et=q==null?void 0:q[0])==null?void 0:et.prop)==="disabled"&&(Y=lo==null?void 0:lo.map(ge=>({label:ge})),k=ro==null?void 0:ro.map(ge=>({label:ge}))),Fe.push({key:"extraButton",contents:Y}),Fe.push({key:"rowButton",contents:k}),h.compData=await Sd(Fe)}else if(u==="Form"){let ke=[],Fe=(Me=(Le=(we=l==null?void 0:l.contents)==null?void 0:we.find(Y=>{var k;return(k=Y==null?void 0:Y.key)==null?void 0:k.includes("content")}))==null?void 0:Le.value)==null?void 0:Me[0],q=(Qe=(Re=(te=(G=(Q=(I=l==null?void 0:l.contents)==null?void 0:I.find(Y=>{var k;return(k=Y==null?void 0:Y.key)==null?void 0:k.includes("struct")}))==null?void 0:Q.value)==null?void 0:G[0])==null?void 0:te.结构)==null?void 0:Re.contents)==null?void 0:Qe.map(Y=>(Y.value=Fe==null?void 0:Fe[Y==null?void 0:Y.prop],Y));ke.push({key:"filter",contents:(Ce=(ve=(ue=(R=(X=l==null?void 0:l.contents)==null?void 0:X.find(Y=>{var k;return(k=Y==null?void 0:Y.key)==null?void 0:k.includes("struct")}))==null?void 0:R.value)==null?void 0:ue[0])==null?void 0:ve.引用)==null?void 0:Ce.contents}),ke.push({key:"formContent",contents:q}),h.compData=await Cd(ke)}return h});return r=await Promise.all(i),r},Td=E.useLoginState(E.pinia),{loginUserInfo:ra}=E.storeToRefs(Td),Bd=E.useMenuState(E.pinia),{activeMenuPath:jo,currentMenuPath:Id}=E.storeToRefs(Bd),Nl=Ve.useUnit(E.pinia),{selectTitle:io}=E.storeToRefs(Nl),Nd=async(n,r)=>{var y,h,p,g,D,C,z,j,B,Z,F,L,$;let i=jo.value,l="",u=((y=io==null?void 0:io.value)==null?void 0:y.find(m=>(m==null?void 0:m.condition)==="child"&&!(m!=null&&m.relatedContent)))??void 0;(n==null?void 0:n.length)===0||(i=r?i:(h=n==null?void 0:n[0])==null?void 0:h.object_name,l=(p=n==null?void 0:n[0])==null?void 0:p.father_name);let s=[];if(l!==""){let m=l;(m==null?void 0:m[(m==null?void 0:m.length)-1])==="/"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1));let S=await vn(m,!1);S=(g=S==null?void 0:S[0])==null?void 0:g.compData;let v=(D=S==null?void 0:S.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:D.contents;v=((C=v==null?void 0:v.find(b=>b==null?void 0:b.isMainKey))==null?void 0:C.prop)??((z=v==null?void 0:v[0])==null?void 0:z.prop);let T=(B=(j=S==null?void 0:S.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:B.map(b=>({label:b==null?void 0:b[v],value:b==null?void 0:b[v]}));s=(Z=l==null?void 0:l.split("/"))==null?void 0:Z.map(b=>(b===""?u?(u.isShow=!0,b=u):b={value:b,condition:"child",options:T,parentContent:(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"?l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1):l,isShow:!0}:b={condition:"parent",value:b.trim(),isShow:!0},b))}if(i!==""){let m=(F=i==null?void 0:i.split("/"))==null?void 0:F.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((L=m==null?void 0:m[0])==null?void 0:L.value)===(($=s==null?void 0:s[0])==null?void 0:$.value)&&(m=m==null?void 0:m.filter((S,v)=>v!==0)),s=[...s,...m??[]]}l===""&&u&&((u==null?void 0:u.parentContent)!==jo.value&&(u.isShow=!1),(u==null?void 0:u.value)!==""&&s.push(u)),Nl.setSelectTitle(s)},Ad=async n=>{var u,s;let r=await Ta.getPageDataApi({platId:parseInt((u=ra==null?void 0:ra.value)==null?void 0:u.plat_id),pageName:"menu"}),i=(s=r==null?void 0:r.data)==null?void 0:s.result,l=i==null?void 0:i.filter(y=>(y==null?void 0:y.object_name)===Id.value+"/");return(l==null?void 0:l.length)>0&&(n=n==null?void 0:n.map(y=>{var h;return(y==null?void 0:y.comp)==="Table"&&(y.compData=(h=y==null?void 0:y.compData)==null?void 0:h.map(p=>{var g;return(p==null?void 0:p.key)==="header"&&(p.contents=(g=p.contents)==null?void 0:g.map((D,C)=>(C===0&&(D.isExistChild=!0),D))),p})),y})),n},vn=async(n,r,i={})=>{var y,h,p,g,D,C,z,j,B,Z,F,L;let l=await Ta.getPageDataApi({platId:parseInt((y=ra==null?void 0:ra.value)==null?void 0:y.plat_id),pageName:n}),u=(h=l==null?void 0:l.data)==null?void 0:h.result;if((u==null?void 0:u.length)===0&&(i!=null&&i.originPath)&&(i==null?void 0:i.originPath)!==n){let $=await Ta.getPageDataApi({platId:parseInt((p=ra==null?void 0:ra.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((D=(g=$==null?void 0:$.data)==null?void 0:g.result)==null?void 0:D.length)>0){let m=await $o((C=$==null?void 0:$.data)==null?void 0:C.result);m=m==null?void 0:m.map(T=>{var Be,et,we,Le,Me,I,Q,G,te,Re,Qe,X,R,ue,ve,Ce,ke,Fe;let b=[],ie=(Be=Object.keys(T))==null?void 0:Be.filter(q=>q==null?void 0:q.includes("name"));for(let q in T)ie!=null&&ie.find(Y=>Y===q)&&b.push(T==null?void 0:T[q]);if(b=b.reverse(),(T==null?void 0:T.comp)==="Table"){let q=(Le=(we=(et=T==null?void 0:T.compData)==null?void 0:et.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:we.contents)==null?void 0:Le.map(k=>{let ge={};for(let Ie in k)Ie!=="id"&&(ge[Ie]=k==null?void 0:k[Ie]);return k=Object.values(ge),k}),Y=(I=(Me=T==null?void 0:T.compData)==null?void 0:Me.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:I.contents;Array.isArray(Y==null?void 0:Y[0])?(Y[0].unshift({label:"排序",prop:"sort"}),(Q=Y[0])!=null&&Q.find(k=>(k==null?void 0:k.prop)==="disabled")&&(Y[0]=(G=Y[0])==null?void 0:G.filter(k=>(k==null?void 0:k.prop)!=="disabled"),Y[0].unshift({label:"",prop:"disabled",sortable:!1}))):(Y.unshift({label:"排序",prop:"sort"}),Y!=null&&Y.find(k=>(k==null?void 0:k.prop)==="disabled")&&(Y=Y==null?void 0:Y.filter(k=>(k==null?void 0:k.prop)!=="disabled"),Y.unshift({label:"",prop:"disabled",sortable:!1}))),T={filter:(Re=(te=T==null?void 0:T.compData)==null?void 0:te.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Re.contents,key:T==null?void 0:T.comp,name:b,tableColumns:Y,tableContents:q}}else{let q=(R=(X=(Qe=T==null?void 0:T.compData)==null?void 0:Qe.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:X.contents)==null?void 0:R.map(k=>(k==null?void 0:k.value)??"");q=[q];let Y=(Ce=(ve=(ue=T==null?void 0:T.compData)==null?void 0:ue.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:ve.contents)==null?void 0:Ce.map(k=>(k.value="",k));T={contents:q,filter:(Fe=(ke=T==null?void 0:T.compData)==null?void 0:ke.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Fe.contents,key:T==null?void 0:T.comp,name:b,value:Y}}return T.isShow=!1,T});let S=[{key:"menuPath",contents:[{path:n,fatherPath:(B=(j=(z=$==null?void 0:$.data)==null?void 0:z.result)==null?void 0:j[0])==null?void 0:B.father_name,isShow:!1}]},{key:n,contents:m}];await Ta.createPlatFormDataApi({platId:parseInt((Z=ra==null?void 0:ra.value)==null?void 0:Z.plat_id),changeData:S});let v=await Ta.getPageDataApi({platId:parseInt((F=ra==null?void 0:ra.value)==null?void 0:F.plat_id),pageName:n});u=(L=v==null?void 0:v.data)==null?void 0:L.result}}r&&await Nd(u,!!(i!=null&&i.originPath));let s=await $o(u);return r&&(s=await Ad(s)),s};var Pn={exports:{}},Vd=Pn.exports,Uo;function Od(){return Uo||(Uo=1,function(n,r){(function(i,l){l()})(Vd,function(){function i(g,D){return typeof D>"u"?D={autoBom:!1}:typeof D!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),D={autoBom:!D}),D.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(g.type)?new Blob(["\uFEFF",g],{type:g.type}):g}function l(g,D,C){var z=new XMLHttpRequest;z.open("GET",g),z.responseType="blob",z.onload=function(){p(z.response,D,C)},z.onerror=function(){console.error("could not download file")},z.send()}function u(g){var D=new XMLHttpRequest;D.open("HEAD",g,!1);try{D.send()}catch{}return 200<=D.status&&299>=D.status}function s(g){try{g.dispatchEvent(new MouseEvent("click"))}catch{var D=document.createEvent("MouseEvents");D.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),g.dispatchEvent(D)}}var y=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=y.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=y.saveAs||(typeof window!="object"||window!==y?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(g,D,C){var z=y.URL||y.webkitURL,j=document.createElement("a");D=D||g.name||"download",j.download=D,j.rel="noopener",typeof g=="string"?(j.href=g,j.origin===location.origin?s(j):u(j.href)?l(g,D,C):s(j,j.target="_blank")):(j.href=z.createObjectURL(g),setTimeout(function(){z.revokeObjectURL(j.href)},4e4),setTimeout(function(){s(j)},0))}:"msSaveOrOpenBlob"in navigator?function(g,D,C){if(D=D||g.name||"download",typeof g!="string")navigator.msSaveOrOpenBlob(i(g,C),D);else if(u(g))l(g,D,C);else{var z=document.createElement("a");z.href=g,z.target="_blank",setTimeout(function(){s(z)})}}:function(g,D,C,z){if(z=z||open("","_blank"),z&&(z.document.title=z.document.body.innerText="downloading..."),typeof g=="string")return l(g,D,C);var j=g.type==="application/octet-stream",B=/constructor/i.test(y.HTMLElement)||y.safari,Z=/CriOS\/[\d]+/.test(navigator.userAgent);if((Z||j&&B||h)&&typeof FileReader<"u"){var F=new FileReader;F.onloadend=function(){var m=F.result;m=Z?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),z?z.location.href=m:location=m,z=null},F.readAsDataURL(g)}else{var L=y.URL||y.webkitURL,$=L.createObjectURL(g);z?z.location=$:location.href=$,z=null,setTimeout(function(){L.revokeObjectURL($)},4e4)}});y.saveAs=p.saveAs=p,n.exports=p})}(Pn)),Pn.exports}Od();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B_vXxIGd.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Al={__name:"index",props:{name:String},setup(n){const r=n,i=e.computed(()=>rt.ElIcons[r.name]);return e.onMounted(()=>{}),(l,u)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))]),_:1})}}},Vl=(n,r,i=0)=>{let l=n;return l!=null&&l.every(u=>Array.isArray(u))&&(l!=null&&l.every(u=>Array.isArray(u)&&u.length===1)?l=l==null?void 0:l.filter(u=>(u==null?void 0:u[0])!==(r==null?void 0:r[i])):l=l==null?void 0:l.map(u=>{if(u!=null&&u.find(s=>s===(r==null?void 0:r[i]))&&(r==null?void 0:r.length)!==1){let s=E.cloneDeep(r),y=u==null?void 0:u.filter(D=>D!==(s==null?void 0:s[i])),h=i+1,p=Vl(y,s,h),g=[];g.push(u==null?void 0:u[0]),p==null||p.forEach(D=>{g.push(D)}),u=g}return u})),l},Ol=(n,r,i,l=0)=>{let u=n;return u!=null&&u.every(s=>Array.isArray(s))&&(u!=null&&u.every(s=>Array.isArray(s)&&s.length===1)?u.push([i]):u=u==null?void 0:u.map(s=>{if(s!=null&&s.find(y=>y===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let y=E.cloneDeep(r),h=s==null?void 0:s.filter(C=>C!==(y==null?void 0:y[l])),p=l+1,g=Ol(h,y,i,p),D=[];D.push(s==null?void 0:s[0]),g==null||g.forEach(C=>{D.push(C)}),s=D}return s})),u},Ml=(n,r,i,l,u=0)=>{let s=n;return s!=null&&s.every(y=>Array.isArray(y))&&(s!=null&&s.every(y=>Array.isArray(y)&&y.length===1)?s=s==null?void 0:s.map(y=>((y==null?void 0:y[0])===i&&(y=[l]),y)):s=s==null?void 0:s.map(y=>{if(y!=null&&y.find(h=>h===(r==null?void 0:r[u]))&&(r==null?void 0:r.length)!==1){let h=E.cloneDeep(r),p=y==null?void 0:y.filter(z=>z!==(h==null?void 0:h[u])),g=u+1,D=Ml(p,h,i,l,g),C=[];C.push(y==null?void 0:y[0]),D==null||D.forEach(z=>{C.push(z)}),y=C}return y})),s};function zl(n="menu"){return{name:n,components:{SvgIcon:Hr.SvgIcon,ssMenu:jn,DynamicIcon:Al,ssDialog:Jt.ssDialog,ssInput:It._sfc_main$2},setup(r,{emit:i}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),u=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=E.useMenuState(),y=E.useModelComp(E.pinia),h=E.useLoginState(E.pinia),{loginUserInfo:p}=E.storeToRefs(h),g=e.ref(0),D=qr.useRouter(),C=e.ref(),{asideMenus:z,menuTriggerType:j,platform:B}=E.storeToRefs(s),{fixMenuStatus:Z}=E.storeToRefs(y),F=e.computed(()=>l==null?void 0:l.mode),L=q=>q==null?void 0:q.map(k=>{var ge,Ie;return!(k!=null&&k.children)||((ge=k==null?void 0:k.children)==null?void 0:ge.length)===0?k.config=u.value:k!=null&&k.children&&((Ie=k==null?void 0:k.children)==null?void 0:Ie.length)>0&&(k.children=L(k.children)),k}),$=e.computed(()=>{let q=[...z.value];if((q==null?void 0:q.length)===0)return D.push("/"),[];const Y=ie(q,b.value);return Y.isFlag||(q=Y==null?void 0:Y.data),q=q==null?void 0:q.map(k=>{var ge,Ie;return!(k!=null&&k.children)||((ge=k==null?void 0:k.children)==null?void 0:ge.length)===0?k.config=u.value:k!=null&&k.children&&((Ie=k==null?void 0:k.children)==null?void 0:Ie.length)>0&&(k.children=L(k.children)),k}),q}),m=async(q,Y)=>{y.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(q==null?void 0:q.path),s.setActiveAsideMenu(q),q.isRouter?D.push(q.path):D.push("/"),i("node-click",q,Y)},S=async q=>{const Y=Xr.findNodeByPropInTree($.value,"path",q);s.setActiveAsideMenu(Y),y.setRouteToChildPath(""),Z.value?y.setFixMenuStatus(!1):(ke.value&&(j.value="open"),j.value==="click"?g.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(q):ke.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(q))),q!=null&&q.startsWith("/")?D.push(q):D.push("/"),g.value++},v=q=>{ke.value||s.setActiveMenuPath(q)},T=q=>{const Y=document.documentElement;q==null||q.forEach(k=>{Y.style.setProperty(k.name,k.value)})};e.onMounted(()=>{g.value=1});const b=e.computed(()=>{const q=sessionStorage.getItem("authority");return q?JSON.parse(q):[]});e.watch(()=>B.value,q=>{q==="browser"?T(xn.browserVerticalMenuClasses):q==="client"?(T(xn.clientHorizontalMenuClasses),T(xn.clientVerticalMenuClasses)):q==="three"&&(T(xn.threeHorizontalMenuClasses),T(xn.threeVerticalMenuClasses))},{immediate:!0});const ie=(q,Y)=>({isFlag:!0}),Be=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),et=q=>rn(q),we=e.ref({}),Le=e.ref([]),Me=e.ref({}),I=e.ref({}),Q=q=>{switch(q){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},G=e.ref({}),te=q=>{s.setCacheInputMenu({type:Be.type,data:q}),s.setIsRefreshMenus(!0)},Re=async(q,Y,k)=>{var ge,Ie,De,se,le,pe,Se,Ye,dt,x,V,H,ne,N,ce,Oe,O,re,K,J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot,Ke,nt,Ae,mt,tt,ze,it,gt,Je;if(Y==="create"){let We=(k==null?void 0:k.title)+"(1)",Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ne=(Ie=(ge=Nt==null?void 0:Nt.data)==null?void 0:ge.result)==null?void 0:Ie[0],Ge=(De=Ne==null?void 0:Ne.value)==null?void 0:De.pageData;Ge.compData=(se=Ge.compData)==null?void 0:se.map(A=>{var he;return(A==null?void 0:A.key)==="menuContents"&&(A.contents=Ol(A.contents,(he=k==null?void 0:k.path)==null?void 0:he.split("/"),We)),A}),await rt.updateInsofDataApi({id:Ne==null?void 0:Ne.id,value:{pageData:Ge}});let je=(pe=(le=k==null?void 0:k.path)==null?void 0:le.split("/"))==null?void 0:pe.filter((A,he)=>{var qe,me;return he!==((me=(qe=k==null?void 0:k.path)==null?void 0:qe.split("/"))==null?void 0:me.length)-1}),Ze=await Ve.getItemData((dt=(Ye=(Se=k==null?void 0:k.path)==null?void 0:Se.split("/"))==null?void 0:Ye.filter((A,he)=>{var qe,me;return he!==((me=(qe=k==null?void 0:k.path)==null?void 0:qe.split("/"))==null?void 0:me.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(je.push(We),je=je==null?void 0:je.join("/"),(Ze==null?void 0:Ze.length)>0){let A=Ze==null?void 0:Ze[0],he=(V=(x=A==null?void 0:A.compData)==null?void 0:x.find(qe=>(qe==null?void 0:qe.key)==="header"))==null?void 0:V.contents;if(((H=he==null?void 0:he[0])==null?void 0:H.directiveLabel)==="#isMain"){let qe=(ne=he==null?void 0:he[0])==null?void 0:ne.prop,me=(ce=(N=A==null?void 0:A.compData)==null?void 0:N.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:ce.contents,ut;me==null||me.forEach(st=>{var wt,pt;if(st.length===1)((wt=st==null?void 0:st[0])==null?void 0:wt[qe])===(k==null?void 0:k.title)&&(ut=st==null?void 0:st[0],ut[qe]=We);else{let ct=(pt=he==null?void 0:he.filter(Bt=>Bt!=="操作"))==null?void 0:pt.map(Bt=>Bt==null?void 0:Bt.prop),ft=st==null?void 0:st.filter(Bt=>!(Bt!=null&&Bt.id)),Dt=Ve.getValueToObjectValue(ft,ct);Dt[qe]=We,ut=Dt}}),await rt.createInsofDataApi({key:{type:"data",pageKey:(re=(O=(Oe=k==null?void 0:k.path)==null?void 0:Oe.split("/"))==null?void 0:O.filter((st,wt)=>{var pt,ct;return wt!==((ct=(pt=k==null?void 0:k.path)==null?void 0:pt.split("/"))==null?void 0:ct.length)-1}))==null?void 0:re.join("/"),tableId:A==null?void 0:A.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(K=p.value)==null?void 0:K.id,createUserLayer:((J=p.value)==null?void 0:J.dept)||((Te=p.value)==null?void 0:Te.部门名称)},value:{tableData:ut}})}}await Ve.newLoadingConstruct(k==null?void 0:k.path,je),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((oe=(ee=(de=k==null?void 0:k.path)==null?void 0:de.split("/"))==null?void 0:ee.filter((A,he)=>{var qe,me;return he!==((me=(qe=k==null?void 0:k.path)==null?void 0:qe.split("/"))==null?void 0:me.length)-1}))==null?void 0:oe.join("/")),s.setActiveTopMenuPath((ye=(fe=k==null?void 0:k.path)==null?void 0:fe.split("/"))==null?void 0:ye[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(Y==="update")C.value=k;else if(Y==="delete"){let We=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:k==null?void 0:k.path}}),Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ne=(xe=(Ee=Nt==null?void 0:Nt.data)==null?void 0:Ee.result)==null?void 0:xe[0],Ge=(W=Ne==null?void 0:Ne.value)==null?void 0:W.pageData;if(Ge.compData=(Pe=Ge.compData)==null?void 0:Pe.map(A=>{var he;return(A==null?void 0:A.key)==="menuContents"&&(A.contents=Vl(A.contents,(he=k==null?void 0:k.path)==null?void 0:he.split("/"))),A}),await rt.updateInsofDataApi({id:Ne==null?void 0:Ne.id,value:{pageData:Ge}}),((He=(be=We==null?void 0:We.data)==null?void 0:be.result)==null?void 0:He.length)>0){let A=(Ke=(ot=We==null?void 0:We.data)==null?void 0:ot.result)==null?void 0:Ke.map(he=>he==null?void 0:he.id);(A==null?void 0:A.length)>0&&await rt.batchDeleteInsofDataApi({ids:A})}let je=await Ve.getItemData((mt=(Ae=(nt=k==null?void 0:k.path)==null?void 0:nt.split("/"))==null?void 0:Ae.filter((A,he)=>{var qe,me;return he!==((me=(qe=k==null?void 0:k.path)==null?void 0:qe.split("/"))==null?void 0:me.length)-1}))==null?void 0:mt.join("/"),sessionStorage.getItem("systemKey"),""),Ze=[];(je==null?void 0:je.length)>0&&(je==null||je.forEach(A=>{var qe,me,ut,st,wt,pt,ct,ft,Dt,Bt,Wt;let he=(st=(ut=(me=(qe=A==null?void 0:A.compData)==null?void 0:qe.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:me.contents)==null?void 0:ut[0])==null?void 0:st.prop;((ft=(ct=(pt=(wt=A==null?void 0:A.compData)==null?void 0:wt.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:pt.contents)==null?void 0:ct[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((Wt=(Bt=(Dt=A==null?void 0:A.compData)==null?void 0:Dt.find(vt=>(vt==null?void 0:vt.key)==="tableContents"))==null?void 0:Bt.contents)==null||Wt.forEach(vt=>{var zt,Ut,Ht;(vt==null?void 0:vt.length)>1?(vt==null?void 0:vt[1])===(k==null?void 0:k.title)&&Ze.push((zt=vt==null?void 0:vt[0])==null?void 0:zt.id):((Ut=vt==null?void 0:vt[0])==null?void 0:Ut[he])===(k==null?void 0:k.title)&&Ze.push((Ht=vt==null?void 0:vt[0])==null?void 0:Ht.id)}))})),(Ze==null?void 0:Ze.length)>0&&await rt.batchDeleteInsofDataApi({ids:Ze}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((it=(ze=(tt=k==null?void 0:k.path)==null?void 0:tt.split("/"))==null?void 0:ze.filter((A,he)=>{var qe,me;return he!==((me=(qe=k==null?void 0:k.path)==null?void 0:qe.split("/"))==null?void 0:me.length)-1}))==null?void 0:it.join("/")),s.setActiveTopMenuPath((Je=(gt=k==null?void 0:k.path)==null?void 0:gt.split("/"))==null?void 0:Je[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},Qe=async(q,Y)=>{var Ye,dt,x,V,H,ne,N,ce,Oe,O,re,K,J,Te,de,ee,oe,fe,ye,Ee,xe,W,Pe,be,He,ot,Ke,nt,Ae,mt,tt;let k=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ge=(dt=(Ye=k==null?void 0:k.data)==null?void 0:Ye.result)==null?void 0:dt[0],Ie=(x=ge==null?void 0:ge.value)==null?void 0:x.pageData;Ie.compData=(V=Ie.compData)==null?void 0:V.map(ze=>{var it,gt;return(ze==null?void 0:ze.key)==="menuContents"&&(ze.contents=Ml(ze.contents,(it=Y==null?void 0:Y.path)==null?void 0:it.split("/"),Y==null?void 0:Y.title,(gt=q==null?void 0:q.target)==null?void 0:gt.value)),ze}),ge!=null&&ge.id&&await rt.updateInsofDataApi({id:ge==null?void 0:ge.id,value:{pageData:Ie}});let De=(ne=(H=Y==null?void 0:Y.path)==null?void 0:H.split("/"))==null?void 0:ne.filter((ze,it)=>{var gt,Je;return it!==((Je=(gt=Y==null?void 0:Y.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}),se=De==null?void 0:De.join("/");De.push((N=q==null?void 0:q.target)==null?void 0:N.value),De=De==null?void 0:De.join("/");let le=await Ve.getItemData(se,sessionStorage.getItem("systemKey"),"");if(((K=(re=(O=(Oe=(ce=le==null?void 0:le[0])==null?void 0:ce.compData)==null?void 0:Oe.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:O.contents)==null?void 0:re[0])==null?void 0:K.directiveLabel)==="#isMain"){let ze=(oe=(ee=(de=(Te=(J=le==null?void 0:le[0])==null?void 0:J.compData)==null?void 0:Te.find(We=>(We==null?void 0:We.key)==="header"))==null?void 0:de.contents)==null?void 0:ee[0])==null?void 0:oe.prop,it=(Ee=(ye=(fe=le==null?void 0:le[0])==null?void 0:fe.compData)==null?void 0:ye.find(We=>(We==null?void 0:We.key)==="tableContents"))==null?void 0:Ee.contents,gt=(be=(Pe=(W=(xe=le==null?void 0:le[0])==null?void 0:xe.compData)==null?void 0:W.find(We=>(We==null?void 0:We.key)==="header"))==null?void 0:Pe.contents)==null?void 0:be.map(We=>We==null?void 0:We.prop),Je;if(it==null||it.forEach(We=>{var Ne;let Nt=Ve.getValueToObjectValue(We,gt);(Nt==null?void 0:Nt[ze])===Y.title&&(Je=Nt,Je[ze]=(Ne=q==null?void 0:q.target)==null?void 0:Ne.value)}),Je){let We={};for(let Ne in Je)Ne!=="id"&&(We[Ne]=Je==null?void 0:Je[Ne]);let Nt=[{id:Je==null?void 0:Je.id,value:{tableData:We}}];await rt.batchUpdateInsofDataApi({dataList:Nt})}}let pe=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),Se=(ot=(He=pe==null?void 0:pe.data)==null?void 0:He.result)==null?void 0:ot.map(ze=>({id:ze==null?void 0:ze.id,key:ze==null?void 0:ze.key}));Se=Se==null?void 0:Se.map(ze=>(ze.key.pageKey=De,ze)),(Se==null?void 0:Se.length)>0&&await rt.batchUpdateInsofDataApi({dataList:Se}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((Ae=(nt=(Ke=Y==null?void 0:Y.path)==null?void 0:Ke.split("/"))==null?void 0:nt.filter((ze,it)=>{var gt,Je;return it!==((Je=(gt=Y==null?void 0:Y.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}))==null?void 0:Ae.join("/")),s.setActiveTopMenuPath((tt=(mt=Y==null?void 0:Y.path)==null?void 0:mt.split("/"))==null?void 0:tt[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),C.value=void 0},X=async(q,Y)=>{Be.type=Q(Y==null?void 0:Y.operateType),await Re(Y,Be.type,q),I.value=q,G.value=Y},R=()=>{Be.show=!1},ue=q=>q==null?void 0:q.filter(Y=>Y.allowInherit),ve=()=>{var k,ge,Ie,De,se;let q;Be.type==="create"&&(q=((k=I.value)==null?void 0:k.path)+"/"+Me.value[(ge=Me.value)==null?void 0:ge.prop]),Be.type==="update"&&(q=(Ie=I.value)==null?void 0:Ie.path);const Y={...I.value,config:ue((De=I.value)==null?void 0:De.config),children:[],childMenus:[],title:Me.value[(se=Me.value)==null?void 0:se.prop],path:q};console.log("clickSubmitForm",G.value,I.value,Y),te(Y),Be.show=!1},Ce=q=>{var k,ge;const Y=(k=q==null?void 0:q.contents)==null?void 0:k.find(Ie=>Ie.key==="formContent");Y&&(Me.value=(ge=Y==null?void 0:Y.contents)==null?void 0:ge.reduce((Ie,De)=>(Ie[De.key]=De.value,Ie.prop=De.key,Ie),{}))},ke=e.ref(!1);return{isCollapse:ke,handleMenuCollapse:()=>{ke.value=!ke.value},handleCompChange:Ce,dialogForm:we,dialogRenderComps:Le,getComponents:et,clickSubmitForm:ve,dialogInfo:Be,beforeDialogDestroy:R,clickMenuIcon:X,mode:F,renderMenuList:$,clickMenu:m,openMenu:S,closeMenu:v,changeMenuStyle:T,fixElement:C,onBlur:Qe}}}}e.defineComponent(zl());const Md=E.useLoginState(),{loginUserInfo:ha}=E.storeToRefs(Md),Zt=E.useModelComp(E.pinia),zd=e.ref(!1),{itemData:Rd,itemGridData:an,curStructureCompIds:Ko,isSubmitCurStructure:Pd,isRefreshCurStructure:Ef,routeToChildPath:Ld,pageMapState:vo,itemExtendData:On}=E.storeToRefs(Zt),Qt=E.useMenuState(E.pinia),{activeTopMenuPath:Fd,activeMenuPath:ea,platform:Cf,activeAsideMenu:Sf,buttonTriggerType:$d,menus:Tf,currentMenuPath:Bf}=E.storeToRefs(Qt),ka=Ve.useUnit(E.pinia),{selectTitle:xo,chooseTitle:Wo}=E.storeToRefs(ka),jd=Ve.useOriginalState(E.pinia),{originalPath:If}=E.storeToRefs(jd);e.ref();E.useAuthorityState(E.pinia);const Un=e.ref(!0),mn=e.ref(0),mo=e.ref([]);e.ref(!1);const Ud=()=>{Zt.setItemGridData([]),Zt.setIsEdit("edit"),Zt.setSubmitCurStructure(ea.value!=="/平台管理/菜单管理")},Kd=()=>{Zt.setIsEdit("view"),Zt.setRefreshCurStructure(!0)},Wd=async n=>{var u;let r=xo.value,i=r==null?void 0:r.findIndex(s=>(s==null?void 0:s.value)===(n==null?void 0:n.value)),l=r==null?void 0:r.filter((s,y)=>y<=i);ka.setSelectTitle(E.cloneDeep(l)),l=(u=l==null?void 0:l.map(s=>s==null?void 0:s.value))==null?void 0:u.join("/"),Qt.setActiveMenuPath(null),Qt.setActiveMenuPath(l)},so=async(n,r,i,l="contentConfig")=>{var u;try{if(!Array.isArray(n))return;let s,y;r==="create"?(s={dataList:n==null?void 0:n.map(p=>{var g;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...p,compData:(g=p==null?void 0:p.compData)==null?void 0:g.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},y=rt.batchAddInsofDataApi):r==="update"?(s={dataList:n==null?void 0:n.map(p=>{var g;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(g=p==null?void 0:p.compData)==null?void 0:g.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},y=rt.batchUpdateInsofDataApi):r==="delete"&&(s={ids:n},y=rt.batchDeleteInsofDataApi);const h=await y(s);if(((u=h==null?void 0:h.data)==null?void 0:u.code)===200)return h.data.result;throw rt.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{rt.ElMessage.error("保存响应失败")}},Ho=async(n,r,i,l)=>{var u,s,y,h,p,g,D,C,z,j,B;try{const Z=(s=(u=n==null?void 0:n.results)==null?void 0:u.filter(v=>!(v!=null&&v.id)||typeof(v==null?void 0:v.id)=="string"))==null?void 0:s.map(v=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:i},value:{tableData:v}})),F=(h=(y=n==null?void 0:n.results)==null?void 0:y.filter(v=>(v==null?void 0:v.id)&&typeof(v==null?void 0:v.id)=="number"))==null?void 0:h.map(v=>({id:v==null?void 0:v.id,value:{tableData:v}})),L=JSON.parse(E.cloneDeep(JSON.stringify(n))),$=(p=L==null?void 0:L.results)==null?void 0:p.map(v=>v.id);let m;i?m=(C=(D=(g=vo.value)==null?void 0:g[ea.value])==null?void 0:D.filter(v=>{var T,b,ie;return((T=v==null?void 0:v.key)==null?void 0:T.type)===r&&((ie=(b=v==null?void 0:v.key)==null?void 0:b.relatedInfo)==null?void 0:ie.target)===l}))==null?void 0:C.map(v=>v==null?void 0:v.id):m=(B=(j=(z=vo.value)==null?void 0:z[ea.value])==null?void 0:j.filter(v=>{var T;return((T=v==null?void 0:v.key)==null?void 0:T.type)===r}))==null?void 0:B.map(v=>v==null?void 0:v.id);const S=m==null?void 0:m.filter(v=>!($!=null&&$.includes(v))&&typeof v=="number");(Z==null?void 0:Z.length)>0&&await rt.batchAddInsofDataApi({dataList:Z}),(F==null?void 0:F.length)>0&&await rt.batchUpdateInsofDataApi({dataList:F}),(S==null?void 0:S.length)>0&&await rt.batchDeleteInsofDataApi({ids:S})}catch(Z){throw new Error(Z)}},Hd=async n=>{var g,D,C,z,j,B,Z,F,L,$;Qt.setContentLoading(!0);const r=JSON.parse(E.cloneDeep(JSON.stringify(Rd.value)));if(!Pd.value)return Qt.setCacheStructures({key:$d.value,data:r}),rt.ElMessage.success("已暂存");const i=r==null?void 0:r.map(m=>m.id),l=i.filter(m=>{var S;return!((S=Ko.value)!=null&&S.includes(m))}),u=(g=Ko.value)==null?void 0:g.filter(m=>!i.includes(m)),s=[...l,...u].filter(m=>typeof m!==null&&typeof m<"u"),y=r==null?void 0:r.filter(m=>!m.id),h=r==null?void 0:r.filter(m=>m.id);let p=[];if(s&&(s==null?void 0:s.length)>0&&p.push(so(s,"delete",n)),y&&(y==null?void 0:y.length)>0&&p.push(so(y,"create",n)),h&&(h==null?void 0:h.length)>0&&p.push(so(h,"update",n)),an.value&&((D=an.value)!=null&&D.isDelete&&((z=(C=an.value)==null?void 0:C.results)==null?void 0:z.length)>0&&((B=(j=an.value)==null?void 0:j.results)!=null&&B.every(m=>typeof m=="number"))?await rt.batchDeleteInsofDataApi({ids:(Z=an.value)==null?void 0:Z.results}):(console.log("itemGridData.value",an.value),p.push(await Ho(an.value,"gridLayout")))),On.value)for(const m in On.value)p.push(await Ho((F=On.value)==null?void 0:F[m],"extend",{target:m,compId:($=(L=On.value)==null?void 0:L[m])==null?void 0:$.compId},m));await Promise.all(p).then(()=>{rt.ElMessage.success("保存成功"),Zt.setRefreshCurStructure(!0)}).catch(m=>{rt.ElMessage.success(m)}),Qt.setContentLoading(!1)},Kn=n=>rn(n),$t=e.ref([]),qd=e.computed(()=>{var n;return(n=$t.value)==null?void 0:n.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),Rl=e.computed(()=>{var n;return(n=$t.value)==null?void 0:n.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),Pl=e.ref(0),Ll=e.ref(null),Wn=async(n,r="data",i)=>{var l,u,s,y,h,p,g,D;if((n==null?void 0:n.buttonName)==="新增"){let C=[{tableName:(l=n==null?void 0:n.relatedContents)==null?void 0:l.find(z=>z==null?void 0:z.includes("content")),tableContents:n==null?void 0:n.fixContent}];await Ta.pageBatchAddApi({platId:parseInt((u=ha==null?void 0:ha.value)==null?void 0:u.plat_id),changeContents:C})}if((n==null?void 0:n.buttonName)==="OCR批量新增"){const C=((n==null?void 0:n.ocrRows)||[]).map(j=>{const B={...j};return delete B._isOCRRow,delete B._ocrTableId,B});let z=[{tableName:(s=n==null?void 0:n.relatedContents)==null?void 0:s.find(j=>j==null?void 0:j.includes("content")),tableContents:C}];await Ta.pageBatchAddApi({platId:parseInt((y=ha==null?void 0:ha.value)==null?void 0:y.plat_id),changeContents:z})}if((n==null?void 0:n.buttonName)==="编辑"){const C=((n==null?void 0:n.fixContent)||[]).map(j=>{const B={...j};return delete B._isOCRRow,delete B._ocrTableId,delete B._isTemp,delete B.tableEditType,delete B.index,B});let z=[{tableName:(h=n==null?void 0:n.relatedContents)==null?void 0:h.find(j=>j==null?void 0:j.includes("content")),tableContents:C}];await Ta.pageBatchUpdateApi({platId:parseInt((p=ha==null?void 0:ha.value)==null?void 0:p.plat_id),changeContents:z})}if((n==null?void 0:n.buttonName)==="删除"){let C=[{tableName:(g=n==null?void 0:n.relatedContents)==null?void 0:g.find(z=>z==null?void 0:z.includes("content")),tableContents:n==null?void 0:n.fixContent}];await Ta.pageBatchDeleteApi({platId:parseInt((D=ha==null?void 0:ha.value)==null?void 0:D.plat_id),changeContents:C})}Zt.setRefreshCurStructure(!0)},Hn=async(n,r)=>{},qn=async n=>{$t.value=await Ve.getDeepDiffItems(n),Zt.setItemData($t.value),Zt.setOriginalData($t.value)};e.ref();const Xd=e.ref(null),Yd=()=>{var n,r;console.log("倒计时结束时"),E.ElMessageBox.alert(`超时未提交,【${(r=(n=ea.value)==null?void 0:n.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),Gd=e.computed(()=>{var n,r;return(r=(n=vo.value)==null?void 0:n[ea.value])==null?void 0:r.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Fd.value],()=>{ka.setSelectTitle([]),ka.setChooseTitle([])},{deep:!0});e.watch(()=>[Wo.value],async()=>{var r,i,l;let n=(r=Wo.value)==null?void 0:r.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==ea.value);if((n==null?void 0:n.length)>0){Qt.setContentLoading(!0);let u=ea.value+"/"+((i=n==null?void 0:n[0])==null?void 0:i.value),s=!!((l=n==null?void 0:n[0])!=null&&l.parentContent),y=await vn(u,s,{originPath:ea.value});y=y==null?void 0:y.map(h=>(h.isShow=!0,h)),$t.value=await Ve.getDeepDiffItems(y),Qt.setContentLoading(!1)}});e.watch(()=>[ea.value],async n=>{var y,h,p;if(!ea.value)return;Qt.setCurrentMenuPath(ea.value),Zt.setLockingPage(""),$t.value=[];let r=e.getCurrentInstance();(y=r==null?void 0:r.scope)==null||y.stop(),r=null,Un.value=!1,Qt.setContentLoading(!0),zd.value=!0;let i=n==null?void 0:n[0],l=i,u=(h=xo.value)==null?void 0:h.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==ea.value&&!(g!=null&&g.relatedContent));(u==null?void 0:u.length)>0&&(i=i+"/"+((p=u==null?void 0:u[0])==null?void 0:p.value));let s=await vn(i,!0,{originPath:l});s=s==null?void 0:s.map(g=>(g.isShow=!0,g)),$t.value=await Ve.getDeepDiffItems(s),Qt.setContentLoading(!1),Zt.setExtraContents([]),ka.setSelectIndex(""),ka.setSelectMenu(""),Zt.setItemData($t.value),Zt.setOriginalData($t.value),e.nextTick(()=>{mn.value=mn.value++,Un.value=!0})},{immediate:!0});const Jd=async()=>{Qt.setLinkMenuInfo(null),Qt.setActiveMenuPath(Ld.value),$t.value=null,Zt.setRouteToChildPath(""),Qt.setChildMenu("")},Zd=n=>new RegExp("button","i").test(n),Qd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),$l=n=>{if(Qd(n)){const r=n==null?void 0:n.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Qt.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},jl=async n=>{var h,p,g,D,C,z,j,B;Qt.setCurrentMenuPath(ea.value+"/"+n),Qt.setContentLoading(!0),$t.value=await vn(ea.value+"/"+n,!0,{originPath:ea.value+"/"});let r=await vn(ea.value,!1);$t.value=(h=$t.value)==null?void 0:h.map(Z=>(Z.isShow=!0,Z));let i=(p=r==null?void 0:r.filter(Z=>(Z==null?void 0:Z.comp)==="Table"))==null?void 0:p[0],l=(z=(C=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:D.contents)==null?void 0:C[0])==null?void 0:z.prop,u=(B=(j=i==null?void 0:i.compData)==null?void 0:j.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:B.contents;u=u==null?void 0:u.map(Z=>({label:Z==null?void 0:Z[l],value:Z==null?void 0:Z[l]}));let s=xo.value,y={value:n,condition:"child",options:u,relatedContent:ea.value,isShow:!0};s.push(y),ka.setSelectTitle(s),ka.setChooseTitle([y]),$t.value=await Ve.getDeepDiffItems($t.value),Qt.setContentLoading(!1),Zt.setExtraContents([]),ka.setSelectIndex(""),ka.setSelectMenu(""),Zt.setItemData($t.value),Zt.setOriginalData($t.value)},ep=n=>{Pl.value=n},pn=e.reactive({index:0,comp:null}),tp=e.computed(()=>{var n;return(n=$t.value)==null?void 0:n.map((r,i)=>({id:r.id,name:r.name,status:ap(r,i)}))}),Ul=(n,r)=>{var p,g,D,C,z;const i=r?n:n-2,l=(p=$t.value)==null?void 0:p[i],u=(D=(g=l==null?void 0:l.compData)==null?void 0:g.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:D.contents,s=u==null?void 0:u.findIndex(j=>(j==null?void 0:j.isMainKey)&&(j==null?void 0:j.label)!=="操作"),y=s===-1?0:s,h=(z=(C=l==null?void 0:l.compData)==null?void 0:C.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:z.contents;return{valid:h==null?void 0:h.every(j=>j==null?void 0:j[y+1]),length:(h==null?void 0:h.length)||0}},ap=(n,r)=>{var l;let i="process";if(((l=n==null?void 0:n.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:u,length:s}=Ul(r,!0);pn.index===r?i="process":s===0?i="wait":i=u?"success":"error"}return i},Kl=n=>{var i,l,u,s,y;const r=n+1;if(r>1&&((u=(l=(i=$t.value)==null?void 0:i[n])==null?void 0:l.comp)==null?void 0:u.toUpperCase())==="TABLE"){const{valid:h}=Ul(r);h?(pn.index=r,pn.comp=(s=$t.value)==null?void 0:s[n]):rt.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else pn.index=r,pn.comp=(y=$t.value)==null?void 0:y[n]},Wl=e.computed(()=>{var n,r;return(r=(n=Rl.value)==null?void 0:n[0])==null?void 0:r.isStepLayout});e.watch(()=>Wl.value,n=>{n&&Kl(0)},{immediate:!0});const np={class:"layout"},op=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:r}){const i=r,l=n;e.onMounted(async()=>{});const u=e.computed(()=>E.cloneDeep(l==null?void 0:l.itemData)||[]),s=e.computed(()=>{var D;const g=(D=u==null?void 0:u.value)==null?void 0:D.find(C=>{const{key:z}=C;return z==="baseConfig"});return g==null?void 0:g.contents}),y=e.computed(()=>{var D;const g=(D=u==null?void 0:u.value)==null?void 0:D.find(C=>{const{key:z}=C;return z==="children"});return g==null?void 0:g.contents}),h=e.computed(()=>{let g=E.cloneDeep(y.value)||[];const D=g.length;let C=0;const z=[];if(g=g.map(j=>{const B=j.span;return B?(j.span=Number(B),C=C+j.span):z.push(j),j}),C<24){const j=Math.floor((24-C)/D);z.forEach(B=>{B.span=j})}return g}),p=g=>{i("rowClick",g)};return(g,D)=>{var j;const C=e.resolveComponent("el-col"),z=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",np,[e.createVNode(z,{style:e.normalizeStyle({height:(j=s.value)==null?void 0:j.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(B,Z)=>(e.openBlock(),e.createBlock(C,{span:B==null?void 0:B.span},{default:e.withCtx(()=>{var F;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)(B.comp)),{key:e.unref(mn),compName:B.name,index:(B==null?void 0:B.id)??Z,height:(F=s.value)==null?void 0:F.height,itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,onChange:e.unref(Wn),onContentChange:e.unref(Hn),onPageChange:e.unref(qn),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),lp=Lt._export_sfc(op,[["__scopeId","data-v-ab9a36ed"]]),rp={class:"layout-operate"},ip={class:"layout-module"},sp={class:"collapse-title-item"},cp={class:"collapse-title"},up={class:"icon-content"},dp=["onClick"],pp={class:"comp-child"},fp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const i=n,l=r;e.onMounted(()=>{Z()});const u=e.ref({}),s=e.ref({}),y=e.ref([]),h=v=>[{label:"高度",prop:"height",type:"input",value:v==null?void 0:v.height}],p=v=>{s.value=v,l("change",S(),!0)},g=e.ref([]),D=e.ref([]),C=v=>[{label:"占比",prop:"span",type:"input",value:v==null?void 0:v.span}],z=e.computed(()=>{const v=i==null?void 0:i.itemContents;return E.cloneDeep(v)}),j=e.computed(()=>{const v=z==null?void 0:z.value,T=v==null?void 0:v.find(b=>{const{key:ie}=b;return ie==="baseConfig"});return T==null?void 0:T.contents}),B=e.computed(()=>{const v=z==null?void 0:z.value,T=v==null?void 0:v.find(b=>{const{key:ie}=b;return ie==="children"});return T==null?void 0:T.contents}),Z=()=>{var v;u.value=z.value||{},g.value=(B==null?void 0:B.value)||[],y.value=h(),y.value=(v=y.value)==null?void 0:v.map(T=>{var ie;const{prop:b}=T;return T.value=(ie=j.value)==null?void 0:ie[b],T})};e.watch(()=>{var v;return(v=B==null?void 0:B.value)==null?void 0:v.length},()=>{var v;g.value=(B==null?void 0:B.value)||[],D.value=(v=B.value)==null?void 0:v.map(T=>C(T))},{immediate:!0});const F=(v,T)=>{const b=E.cloneDeep(B==null?void 0:B.value);b[T].span=v.span,g.value=b,l("change",S(),!0)},L=v=>rn(v),$=(v,T,b)=>{if(!v)return;const ie=E.cloneDeep(B==null?void 0:B.value);ie[b]&&(ie[b].compData=v,g.value=ie,l("change",S(),!0))},m=v=>{E.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=E.cloneDeep(B==null?void 0:B.value);T=T==null?void 0:T.filter((b,ie)=>v!==ie),g.value=T,l("change",S(),!0),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:g==null?void 0:g.value}]});return(v,T)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",rp,[e.createElementVNode("div",ip,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(It.ssForm,{rowContents:y.value,isEnableWrap:!0,onChange:T[0]||(T[0]=ie=>p(ie))},null,8,["rowContents"])])]),e.createVNode(bl.default,{class:"collapse-content",collapseContents:B.value},{title:e.withCtx(({item:ie,index:Be})=>[e.createElementVNode("div",sp,[e.createElementVNode("div",cp,e.toDisplayString(ie.name),1),e.createElementVNode("div",up,[e.createElementVNode("div",{onClick:e.withModifiers(et=>m(Be),["stop"]),class:"icon-content"},[e.createVNode(b,{name:"Delete",style:{width:"16px",height:"16px"}})],8,dp)])])]),content:e.withCtx(({item:ie,index:Be})=>[e.createElementVNode("div",pp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:D.value[Be],key:Be,isEnableWrap:!0,onChange:et=>F(et,Be)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(ie.comp+"Operate")),{itemContents:ie==null?void 0:ie.compData,originalItemContents:ie.compData,onChange:et=>$(et,ie,Be)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),hp=Lt._export_sfc(fp,[["__scopeId","data-v-ba05456e"]]),vp=typeof window<"u";var qo;vp&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function da(n){return n==null}function Hl(){}const mp=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(mp)));function gp(){const n=new Map;return{on(r,i){const l=n.get(r);l!=null&&l.add(i)||n.set(r,new Set([i]))},off(r,i){const l=n.get(r);l&&l.delete(i)},clear(r){const i=n.get(r);i&&i.clear()},clearAll(){n.clear()},emit(r,...i){const l=n.get(r);l&&l.forEach(u=>{u(...i)})}}}function Xo(n,r=16){if(typeof n!="function")return Hl;const i=(...s)=>{n(...s)};if(r<=0)return ql(i);let l=0,u;return function(...s){const y=Date.now(),h=y-l;clearTimeout(u),h>=r?(l=y,i(...s)):u=setTimeout(()=>{l=Date.now(),i(...s)},Math.max(0,r-h))}}function yp(n,r=100){if(typeof n!="function")return Hl;const i=(...u)=>{n(...u)};if(r<=0)return ql(i);let l;return function(...u){clearTimeout(l),l=setTimeout(()=>{i(...u)},r)}}function ql(n){if(typeof n!="function")return n;let r=!1,i,l;return function(...u){return i=u,r||(r=!0,l=Promise.resolve().then(()=>(r=!1,l=void 0,n(...i)))),l}}const _n=new Set,Xl=new WeakMap;function bp(){_n.forEach(n=>{n(...Xl.get(n))}),_n.clear()}function la(n,...r){if(typeof n!="function")return n;Xl.set(n,r),!_n.has(n)&&(_n.add(n),_n.size===1&&Promise.resolve().then(bp))}const Yl=Symbol("LAYOUT_KEY"),Gl=Symbol("EMITTER_KEY");function kp(n){let r=0,i;for(let l=0,u=n.length;l<u;l++)i=n[l].y+n[l].h,i>r&&(r=i);return r}function go(n){const r=Array(n.length);for(let i=0,l=n.length;i<l;i++)r[i]=xp(n[i]);return r}function xp(n){return{...n}}function Jl(n,r){return!(n===r||n.x+n.w<=r.x||n.x>=r.x+r.w||n.y+n.h<=r.y||n.y>=r.y+r.h)}function dn(n,r,i){const l=Ql(n),u=er(n),s=Array(n.length);for(let y=0,h=u.length;y<h;y++){let p=u[y];p.static||(p=wp(l,p,r,i),l.push(p)),s[n.findIndex(g=>g.i===p.i)]=p,p.moved=!1}return s}function wp(n,r,i,l){if(i)for(;r.y>0&&!En(n,r);)r.y--;else if(l){const s=l[r.i].y;for(;r.y>s&&!En(n,r);)r.y--}let u;for(;u=En(n,r);)r.y=u.y+u.h;return r}function Dp(n,r){const i=Ql(n);for(let l=0,u=n.length;l<u;l++){const s=n[l];if(s.x+s.w>r.cols&&(s.x=r.cols-s.w),s.x<0&&(s.x=0,s.w=r.cols),!s.static)i.push(s);else for(;En(i,s);)s.y++}return n}function Yo(n,r){for(let i=0,l=n.length;i<l;i++)if(n[i].i===r)return n[i]}function En(n,r){for(let i=0,l=n.length;i<l;i++)if(Jl(n[i],r))return n[i]}function Zl(n,r){return n.filter(i=>Jl(i,r))}function Ql(n){return n.filter(r=>r.static)}function yo(n,r,i,l,u=!1,s=!1){if(r.static)return n;const y=r.x,h=r.y,p=l&&r.y>l;typeof i=="number"&&(r.x=i),typeof l=="number"&&(r.y=l),r.moved=!0;let g=er(n);p&&(g=g.reverse());const D=Zl(g,r);if(s&&D.length)return r.x=y,r.y=h,r.moved=!1,n;for(let C=0,z=D.length;C<z;C++){const j=D[C];j.moved||r.y>j.y&&r.y-j.y>j.h/4||(j.static?n=Go(n,j,r,u):n=Go(n,r,j,u))}return n}function Go(n,r,i,l){if(l){const u={x:i.x,y:i.y,w:i.w,h:i.h};if(u.y=Math.max(r.y-i.h,0),!En(n,u))return yo(n,i,void 0,u.y,!1)}return yo(n,i,void 0,i.y+1,!1)}function _p(n,r,i,l){const u="translate3d("+r+"px,"+n+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function Ep(n,r,i,l){const u="translate3d("+r*-1+"px,"+n+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function Cp(n,r,i,l){return{top:n+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Sp(n,r,i,l){return{top:n+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function er(n){return Array.from(n).sort(function(r,i){return r.y===i.y&&r.x===i.x?0:r.y>i.y||r.y===i.y&&r.x>i.x?1:-1})}function Tp(n,r){r=r||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(n))throw new Error(r+" must be an array!");for(let u=0,s=n.length;u<s;u++){const y=n[u];for(let h=0;h<i.length;h++)if(typeof y[i[h]]!="number")throw new Error("VueGridLayout: "+r+"["+u+"]."+i[h]+" must be a number!");if(y.i===void 0||y.i===null)throw new Error("VueGridLayout: "+r+"["+u+"].i cannot be null!");if(typeof y.i!="number"&&typeof y.i!="string")throw new Error("VueGridLayout: "+r+"["+u+"].i must be a string or number!");if(l.indexOf(y.i)>=0)throw new Error("VueGridLayout: "+r+"["+u+"].i must be unique!");if(l.push(y.i),y.static!==void 0&&typeof y.static!="boolean")throw new Error("VueGridLayout: "+r+"["+u+"].static must be a boolean!")}}function Bp(n,r="vgl"){const i=()=>`${r}-${n}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,u)=>`${i()}__${l}--${u}`}}function Jo(n){return Ip(n)}function Ip(n){var r;const i=((r=n.target)==null?void 0:r.offsetParent)||document.body,l=n.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),u=n.clientX+i.scrollLeft-l.left,s=n.clientY+i.scrollTop-l.top;return{x:u,y:s}}function Zo(n,r,i,l){return Np(n)?{deltaX:i-n,deltaY:l-r,lastX:n,lastY:r,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function Np(n){return typeof n=="number"&&!Number.isNaN(n)}function Ap(n,r){const i=ar(n);let l=i[0];for(let u=1,s=i.length;u<s;u++){const y=i[u];r>n[y]&&(l=y)}return l}function tr(n,r){if(!r[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return r[n]}function Vp(n,r,i,l,u,s,y){if(r[l])return go(r[l]);let h=n;const p=ar(i),g=p.slice(p.indexOf(l));for(let D=0,C=g.length;D<C;D++){const z=g[D];if(r[z]){h=r[z];break}}return h=go(h||[]),dn(Dp(h,{cols:s}),y)}function ar(n){return Object.keys(n).sort((r,i)=>n[r]-n[i])}let Op="auto";function Mp(){return typeof document<"u"}function Qo(){return Mp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Op}var Dn={exports:{}},zp=Dn.exports,el;function Rp(){return el||(el=1,function(n,r){(function(i,l){n.exports=l()})(zp,function(){function i(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(a);t&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(a,d).enumerable})),o.push.apply(o,c)}return o}function l(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(c){p(a,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(o,c))})}return a}function u(a){return u=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},u(a)}function s(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function y(a,t){for(var o=0;o<t.length;o++){var c=t[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,Z(c.key),c)}}function h(a,t,o){return t&&y(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function p(a,t,o){return(t=Z(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function g(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&&C(a,t)}function D(a){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(a)}function C(a,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},C(a,t)}function z(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function j(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,c=D(a);if(t){var d=D(this).constructor;o=Reflect.construct(c,arguments,d)}else o=c.apply(this,arguments);return function(f,w){if(w&&(typeof w=="object"||typeof w=="function"))return w;if(w!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z(f)}(this,o)}}function B(){return B=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var c=function(f,w){for(;!Object.prototype.hasOwnProperty.call(f,w)&&(f=D(f))!==null;);return f}(a,t);if(c){var d=Object.getOwnPropertyDescriptor(c,t);return d.get?d.get.call(arguments.length<3?a:o):d.value}},B.apply(this,arguments)}function Z(a){var t=function(o,c){if(typeof o!="object"||o===null)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var f=d.call(o,c);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var F=function(a){return!(!a||!a.Window)&&a instanceof a.Window},L=void 0,$=void 0;function m(a){L=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),$=a}function S(a){return F(a)?a:(a.ownerDocument||a).defaultView||$.window}typeof window<"u"&&window&&m(window);var v=function(a){return!!a&&u(a)==="object"},T=function(a){return typeof a=="function"},b={window:function(a){return a===$||F(a)},docFrag:function(a){return v(a)&&a.nodeType===11},object:v,func:T,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||u(a)!=="object")return!1;var t=S(a)||$;return/object|function/.test(typeof Element>"u"?"undefined":u(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return v(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return v(a)&&a.length!==void 0&&T(a.splice)}};function ie(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 Be(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var c=o.prepared.axis;if(c==="x"||c==="y"){var d=c==="x"?"y":"x";t.page[d]=o.coords.start.page[d],t.client[d]=o.coords.start.client[d],t.delta[d]=0}}}var et={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,c=a.defaults;o.prototype.draggable=et.draggable,t.map.drag=et,t.methodDict.drag="draggable",c.actions.drag=et.defaults},listeners:{"interactions:before-action-move":ie,"interactions:action-resume":ie,"interactions:action-move":Be,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,c=a.buttons,d=o.options.drag;if(d&&d.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(c&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(a){return b.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):b.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ie,move:Be,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},we=et,Le={init:function(a){var t=a;Le.document=t.document,Le.DocumentFragment=t.DocumentFragment||Me,Le.SVGElement=t.SVGElement||Me,Le.SVGSVGElement=t.SVGSVGElement||Me,Le.SVGElementInstance=t.SVGElementInstance||Me,Le.Element=t.Element||Me,Le.HTMLElement=t.HTMLElement||Le.Element,Le.Event=t.Event,Le.Touch=t.Touch||Me,Le.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 Me(){}var I=Le,Q={init:function(a){var t=I.Element,o=a.navigator||{};Q.supportsTouch="ontouchstart"in a||b.func(a.DocumentTouch)&&I.document instanceof a.DocumentTouch,Q.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.PointerEvent,Q.isIOS=/iP(hone|od|ad)/.test(o.platform),Q.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),Q.isIe9=/MSIE 9/.test(o.userAgent),Q.isOperaMobile=o.appName==="Opera"&&Q.supportsTouch&&/Presto/.test(o.userAgent),Q.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",Q.pEventTypes=Q.supportsPointerEvent?I.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,Q.wheelEvent=I.document&&"onmousewheel"in I.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},G=Q;function te(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Re(a,t){for(;b.element(a);){if(X(a,t))return a;a=Qe(a)}return null}function Qe(a){var t=a.parentNode;if(b.docFrag(t)){for(;(t=t.host)&&b.docFrag(t););return t}return t}function X(a,t){return $!==L&&(t=t.replace(/\/deep\//g," ")),a[G.prefixedMatchesSelector](t)}var R=function(a){return a.parentNode||a.host};function ue(a,t){for(var o,c=[],d=a;(o=R(d))&&d!==t&&o!==d.ownerDocument;)c.unshift(d),d=o;return c}function ve(a,t,o){for(;b.element(a);){if(X(a,t))return!0;if((a=Qe(a))===o)return X(a,t)}return!1}function Ce(a){return a.correspondingUseElement||a}function ke(a){var t=a instanceof I.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 Fe(a){var t,o=ke(a);if(!G.isIOS7&&o){var c={x:(t=(t=S(a))||$).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=c.x,o.right+=c.x,o.top+=c.y,o.bottom+=c.y}return o}function q(a){for(var t=[];a;)t.push(a),a=Qe(a);return t}function Y(a){return!!b.string(a)&&(I.document.querySelector(a),!0)}function k(a,t){for(var o in t)a[o]=t[o];return a}function ge(a,t,o){return a==="parent"?Qe(o):a==="self"?t.getRect(o):Re(o,a)}function Ie(a,t,o,c){var d=a;return b.string(d)?d=ge(d,t,o):b.func(d)&&(d=d.apply(void 0,c)),b.element(d)&&(d=Fe(d)),d}function De(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function se(a){return!a||"x"in a&&"y"in a||((a=k({},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 le(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 pe(a,t,o){var c=o&&a.options[o];return De(Ie(c&&c.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Se(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(M){return!0},c=arguments.length>3?arguments[3]:void 0;if(c=c||{},b.string(a)&&a.search(" ")!==-1&&(a=Ye(a)),b.array(a))return a.forEach(function(M){return Se(M,t,o,c)}),c;if(b.object(a)&&(t=a,a=""),b.func(t)&&o(a))c[a]=c[a]||[],c[a].push(t);else if(b.array(t))for(var d=0,f=t;d<f.length;d++){var w=f[d];Se(a,w,o,c)}else if(b.object(t))for(var _ in t)Se(Ye(_).map(function(M){return"".concat(a).concat(M)}),t[_],o,c);return c}function Ye(a){return a.trim().split(/ +/)}var dt=function(a,t){return Math.sqrt(a*a+t*t)},x=["webkit","moz"];function V(a,t){a.__set||(a.__set={});var o=function(d){if(x.some(function(f){return d.indexOf(f)===0}))return 1;typeof a[d]!="function"&&d!=="__set"&&Object.defineProperty(a,d,{get:function(){return d in a.__set?a.__set[d]:a.__set[d]=t[d]},set:function(f){a.__set[d]=f},configurable:!0})};for(var c in t)o(c);return a}function H(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 ne(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function N(a){return a instanceof I.Event||a instanceof I.Touch}function ce(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function Oe(a,t){return t=t||{x:0,y:0},G.isOperaMobile&&N(a)?(ce("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):ce("page",a,t),t}function O(a){return b.number(a.pointerId)?a.pointerId:a.identifier}function re(a,t,o){var c=t.length>1?J(t):t[0];Oe(c,a.page),function(d,f){f=f||{},G.isOperaMobile&&N(d)?ce("screen",d,f):ce("client",d,f)}(c,a.client),a.timeStamp=o}function K(a){var t=[];return b.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 J(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var c=a[o];for(var d in t)t[d]+=c[d]}for(var f in t)t[f]/=a.length;return t}function Te(a){if(!a.length)return null;var t=K(a),o=Math.min(t[0].pageX,t[1].pageX),c=Math.min(t[0].pageY,t[1].pageY),d=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:c,left:o,top:c,right:d,bottom:f,width:d-o,height:f-c}}function de(a,t){var o=t+"X",c=t+"Y",d=K(a),f=d[0][o]-d[1][o],w=d[0][c]-d[1][c];return dt(f,w)}function ee(a,t){var o=t+"X",c=t+"Y",d=K(a),f=d[1][o]-d[0][o],w=d[1][c]-d[0][c];return 180*Math.atan2(w,f)/Math.PI}function oe(a){return b.string(a.pointerType)?a.pointerType:b.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof I.Touch?"touch":"mouse"}function fe(a){var t=b.func(a.composedPath)?a.composedPath():a.path;return[Ce(t?t[0]:a.target),Ce(a.currentTarget)]}var ye=function(){function a(t){s(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(ye.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Ee=function(a,t){for(var o=0;o<t.length;o++){var c=t[o];a.push(c)}return a},xe=function(a){return Ee([],a)},W=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Pe=function(a,t){return a[W(a,t)]},be=function(a){g(o,a);var t=j(o);function o(c,d,f){var w;s(this,o),(w=t.call(this,d._interaction)).dropzone=void 0,w.dragEvent=void 0,w.relatedTarget=void 0,w.draggable=void 0,w.propagationStopped=!1,w.immediatePropagationStopped=!1;var _=f==="dragleave"?c.prev:c.cur,M=_.element,U=_.dropzone;return w.type=f,w.target=M,w.currentTarget=M,w.dropzone=U,w.dragEvent=d,w.relatedTarget=d.target,w.draggable=d.interactable,w.timeStamp=d.timeStamp,w}return h(o,[{key:"reject",value:function(){var c=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=d.activeDrops,w=W(f,function(M){var U=M.dropzone,P=M.element;return U===c.dropzone&&P===c.target});d.activeDrops.splice(w,1);var _=new o(d,this.dragEvent,"dropdeactivate");_.dropzone=this.dropzone,_.target=this.target,this.dropzone.fire(_)}else this.dropzone.fire(new o(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ye);function He(a,t){for(var o=0,c=a.slice();o<c.length;o++){var d=c[o],f=d.dropzone,w=d.element;t.dropzone=f,t.target=w,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ot(a,t){for(var o=function(f,w){for(var _=[],M=0,U=f.interactables.list;M<U.length;M++){var P=U[M];if(P.options.drop.enabled){var ae=P.options.drop.accept;if(!(b.element(ae)&&ae!==w||b.string(ae)&&!X(w,ae)||b.func(ae)&&!ae({dropzone:P,draggableElement:w})))for(var _e=0,Ue=P.getAllElements();_e<Ue.length;_e++){var $e=Ue[_e];$e!==w&&_.push({dropzone:P,element:$e,rect:P.getRect($e)})}}}return _}(a,t),c=0;c<o.length;c++){var d=o[c];d.rect=d.dropzone.getRect(d.element)}return o}function Ke(a,t,o){for(var c=a.dropState,d=a.interactable,f=a.element,w=[],_=0,M=c.activeDrops;_<M.length;_++){var U=M[_],P=U.dropzone,ae=U.element,_e=U.rect,Ue=P.dropCheck(t,o,d,f,ae,_e);w.push(Ue?ae:null)}var $e=function(Xe){for(var lt,at,ht,St=[],At=0;At<Xe.length;At++){var kt=Xe[At],Tt=Xe[lt];if(kt&&At!==lt)if(Tt){var oa=R(kt),Kt=R(Tt);if(oa!==kt.ownerDocument)if(Kt!==kt.ownerDocument)if(oa!==Kt){St=St.length?St:ue(Tt);var ua=void 0;if(Tt instanceof I.HTMLElement&&kt instanceof I.SVGElement&&!(kt instanceof I.SVGSVGElement)){if(kt===Kt)continue;ua=kt.ownerSVGElement}else ua=kt;for(var ma=ue(ua,Tt.ownerDocument),Ea=0;ma[Ea]&&ma[Ea]===St[Ea];)Ea++;var Vn=[ma[Ea-1],ma[Ea],St[Ea]];if(Vn[0])for(var kn=Vn[0].lastChild;kn;){if(kn===Vn[1]){lt=At,St=ma;break}if(kn===Vn[2])break;kn=kn.previousSibling}}else ht=Tt,(parseInt(S(at=kt).getComputedStyle(at).zIndex,10)||0)>=(parseInt(S(ht).getComputedStyle(ht).zIndex,10)||0)&&(lt=At);else lt=At}else lt=At}return lt}(w);return c.activeDrops[$e]||null}function nt(a,t,o){var c=a.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(d.activate=new be(c,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new be(c,o,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),c.rejected||(c.cur.element!==c.prev.element&&(c.prev.dropzone&&(d.leave=new be(c,o,"dragleave"),o.dragLeave=d.leave.target=c.prev.element,o.prevDropzone=d.leave.dropzone=c.prev.dropzone),c.cur.dropzone&&(d.enter=new be(c,o,"dragenter"),o.dragEnter=c.cur.element,o.dropzone=c.cur.dropzone)),o.type==="dragend"&&c.cur.dropzone&&(d.drop=new be(c,o,"drop"),o.dropzone=c.cur.dropzone,o.relatedTarget=c.cur.element),o.type==="dragmove"&&c.cur.dropzone&&(d.move=new be(c,o,"dropmove"),o.dropzone=c.cur.dropzone)),d}function Ae(a,t){var o=a.dropState,c=o.activeDrops,d=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&d.dropzone.fire(t.enter),t.move&&d.dropzone.fire(t.move),t.drop&&d.dropzone.fire(t.drop),t.deactivate&&He(c,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function mt(a,t){var o=a.interaction,c=a.iEvent,d=a.event;if(c.type==="dragmove"||c.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=ot(t,o.element));var w=c,_=Ke(o,w,d);f.rejected=f.rejected&&!!_&&_.dropzone===f.cur.dropzone&&_.element===f.cur.element,f.cur.dropzone=_&&_.dropzone,f.cur.element=_&&_.element,f.events=nt(o,0,w)}}var tt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,c=a.Interactable,d=a.defaults;a.usePlugin(we),c.prototype.dropzone=function(f){return function(w,_){if(b.object(_)){if(w.options.drop.enabled=_.enabled!==!1,_.listeners){var M=Se(_.listeners),U=Object.keys(M).reduce(function(ae,_e){return ae[/^(enter|leave)/.test(_e)?"drag".concat(_e):/^(activate|deactivate|move)/.test(_e)?"drop".concat(_e):_e]=M[_e],ae},{}),P=w.options.drop.listeners;P&&w.off(P),w.on(U),w.options.drop.listeners=U}return b.func(_.ondrop)&&w.on("drop",_.ondrop),b.func(_.ondropactivate)&&w.on("dropactivate",_.ondropactivate),b.func(_.ondropdeactivate)&&w.on("dropdeactivate",_.ondropdeactivate),b.func(_.ondragenter)&&w.on("dragenter",_.ondragenter),b.func(_.ondragleave)&&w.on("dragleave",_.ondragleave),b.func(_.ondropmove)&&w.on("dropmove",_.ondropmove),/^(pointer|center)$/.test(_.overlap)?w.options.drop.overlap=_.overlap:b.number(_.overlap)&&(w.options.drop.overlap=Math.max(Math.min(1,_.overlap),0)),"accept"in _&&(w.options.drop.accept=_.accept),"checker"in _&&(w.options.drop.checker=_.checker),w}return b.bool(_)?(w.options.drop.enabled=_,w):w.options.drop}(this,f)},c.prototype.dropCheck=function(f,w,_,M,U,P){return function(ae,_e,Ue,$e,Xe,lt,at){var ht=!1;if(!(at=at||ae.getRect(lt)))return!!ae.options.drop.checker&&ae.options.drop.checker(_e,Ue,ht,ae,lt,$e,Xe);var St=ae.options.drop.overlap;if(St==="pointer"){var At=pe($e,Xe,"drag"),kt=Oe(_e);kt.x+=At.x,kt.y+=At.y;var Tt=kt.x>at.left&&kt.x<at.right,oa=kt.y>at.top&&kt.y<at.bottom;ht=Tt&&oa}var Kt=$e.getRect(Xe);if(Kt&&St==="center"){var ua=Kt.left+Kt.width/2,ma=Kt.top+Kt.height/2;ht=ua>=at.left&&ua<=at.right&&ma>=at.top&&ma<=at.bottom}return Kt&&b.number(St)&&(ht=Math.max(0,Math.min(at.right,Kt.right)-Math.max(at.left,Kt.left))*Math.max(0,Math.min(at.bottom,Kt.bottom)-Math.max(at.top,Kt.top))/(Kt.width*Kt.height)>=St),ae.options.drop.checker&&(ht=ae.options.drop.checker(_e,Ue,ht,ae,lt,$e,Xe)),ht}(this,f,w,_,M,U,P)},o.dynamicDrop=function(f){return b.bool(f)?(a.dynamicDrop=f,o):a.dynamicDrop},k(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,d.actions.drop=tt.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,c=(a.event,a.iEvent);if(o.prepared.name==="drag"){var d=o.dropState;d.activeDrops=[],d.events={},d.activeDrops=ot(t,o.element),d.events=nt(o,0,c),d.events.activate&&(He(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:c}))}},"interactions:action-move":mt,"interactions:after-action-move":function(a,t){var o=a.interaction,c=a.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ae(o,d.events),t.fire("actions/drop:move",{interaction:o,dragEvent:c}),d.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,c=a.iEvent;mt(a,t),Ae(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:c})}},"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:ot,getDrop:Ke,getDropEvents:nt,fireDropEvents:Ae,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=tt;function it(a){var t=a.interaction,o=a.iEvent,c=a.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(U){return U.pointer}),f=c==="start",w=c==="end",_=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],f)o.distance=de(d,_),o.box=Te(d),o.scale=1,o.ds=0,o.angle=ee(d,_),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(w||t.pointers.length<2){var M=t.prevEvent;o.distance=M.distance,o.box=M.box,o.scale=M.scale,o.ds=0,o.angle=M.angle,o.da=0}else o.distance=de(d,_),o.box=Te(d),o.scale=o.distance/t.gesture.startDistance,o.angle=ee(d,_),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,b.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var gt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,c=a.defaults;o.prototype.gesturable=function(d){return b.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):b.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},t.map.gesture=gt,t.methodDict.gesture="gesturable",c.actions.gesture=gt.defaults},listeners:{"interactions:action-start":it,"interactions:action-move":it,"interactions:action-end":it,"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=gt;function We(a,t,o,c,d,f,w){if(!t)return!1;if(t===!0){var _=b.number(f.width)?f.width:f.right-f.left,M=b.number(f.height)?f.height:f.bottom-f.top;if(w=Math.min(w,Math.abs((a==="left"||a==="right"?_:M)/2)),_<0&&(a==="left"?a="right":a==="right"&&(a="left")),M<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var U=_>=0?f.left:f.right;return o.x<U+w}if(a==="top"){var P=M>=0?f.top:f.bottom;return o.y<P+w}if(a==="right")return o.x>(_>=0?f.right:f.left)-w;if(a==="bottom")return o.y>(M>=0?f.bottom:f.top)-w}return!!b.element(c)&&(b.element(t)?t===c:ve(c,t,d))}function Nt(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var c=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?c.delta.x=c.delta.y:c.delta.y=c.delta.x,c.axes="xy"):(c.axes=o.resizeAxes,o.resizeAxes==="x"?c.delta.y=0:o.resizeAxes==="y"&&(c.delta.x=0))}}var Ne,Ge,je={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,c=a.Interactable,d=a.defaults;je.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),je.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,c.prototype.resizable=function(f){return function(w,_,M){return b.object(_)?(w.options.resize.enabled=_.enabled!==!1,w.setPerAction("resize",_),w.setOnEvents("resize",_),b.string(_.axis)&&/^x$|^y$|^xy$/.test(_.axis)?w.options.resize.axis=_.axis:_.axis===null&&(w.options.resize.axis=M.defaults.actions.resize.axis),b.bool(_.preserveAspectRatio)?w.options.resize.preserveAspectRatio=_.preserveAspectRatio:b.bool(_.square)&&(w.options.resize.square=_.square),w):b.bool(_)?(w.options.resize.enabled=_,w):w.options.resize}(this,f,a)},t.map.resize=je,t.methodDict.resize="resizable",d.actions.resize=je.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.rect;c._rects={start:k({},f),corrected:k({},f),previous:k({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=c.prepared.edges,d.rect=c._rects.corrected,d.deltaRect=c._rects.delta}})(a),Nt(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.interactable.options.resize.invert,w=f==="reposition"||f==="negate",_=c.rect,M=c._rects,U=M.start,P=M.corrected,ae=M.delta,_e=M.previous;if(k(_e,P),w){if(k(P,_),f==="reposition"){if(P.top>P.bottom){var Ue=P.top;P.top=P.bottom,P.bottom=Ue}if(P.left>P.right){var $e=P.left;P.left=P.right,P.right=$e}}}else P.top=Math.min(_.top,U.bottom),P.bottom=Math.max(_.bottom,U.top),P.left=Math.min(_.left,U.right),P.right=Math.max(_.right,U.left);for(var Xe in P.width=P.right-P.left,P.height=P.bottom-P.top,P)ae[Xe]=P[Xe]-_e[Xe];d.edges=c.prepared.edges,d.rect=P,d.deltaRect=ae}})(a),Nt(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var c=t;c.edges=o.prepared.edges,c.rect=o._rects.corrected,c.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,c=a.element,d=a.rect,f=a.buttons;if(d){var w=k({},t.coords.cur.page),_=o.options.resize;if(_&&_.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&_.mouseButtons)!=0)){if(b.object(_.edges)){var M={left:!1,right:!1,top:!1,bottom:!1};for(var U in M)M[U]=We(U,_.edges[U],w,t._latestPointer.eventTarget,c,d,_.margin||je.defaultMargin);M.left=M.left&&!M.right,M.top=M.top&&!M.bottom,(M.left||M.right||M.top||M.bottom)&&(a.action={name:"resize",edges:M})}else{var P=_.axis!=="y"&&w.x>d.right-je.defaultMargin,ae=_.axis!=="x"&&w.y>d.bottom-je.defaultMargin;(P||ae)&&(a.action={name:"resize",axes:(P?"x":"")+(ae?"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,c=a.name,d=je.cursors,f=null;if(o)f=d[c+o];else if(t){for(var w="",_=0,M=["top","bottom","left","right"];_<M.length;_++){var U=M[_];t[U]&&(w+=U)}f=d[w]}return f},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Ze=je,A={id:"actions",install:function(a){a.usePlugin(Je),a.usePlugin(Ze),a.usePlugin(we),a.usePlugin(ze)}},he=0,qe={request:function(a){return Ne(a)},cancel:function(a){return Ge(a)},init:function(a){if(Ne=a.requestAnimationFrame,Ge=a.cancelAnimationFrame,!Ne)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var c=t[o];Ne=a["".concat(c,"RequestAnimationFrame")],Ge=a["".concat(c,"CancelAnimationFrame")]||a["".concat(c,"CancelRequestAnimationFrame")]}Ne=Ne&&Ne.bind(a),Ge=Ge&&Ge.bind(a),Ne||(Ne=function(d){var f=Date.now(),w=Math.max(0,16-(f-he)),_=a.setTimeout(function(){d(f+w)},w);return he=f+w,_},Ge=function(d){return clearTimeout(d)})}},me={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){me.isScrolling=!0,qe.cancel(me.i),a.autoScroll=me,me.interaction=a,me.prevTime=me.now(),me.i=qe.request(me.scroll)},stop:function(){me.isScrolling=!1,me.interaction&&(me.interaction.autoScroll=null),qe.cancel(me.i)},scroll:function(){var a=me.interaction,t=a.interactable,o=a.element,c=a.prepared.name,d=t.options[c].autoScroll,f=ut(d.container,t,o),w=me.now(),_=(w-me.prevTime)/1e3,M=d.speed*_;if(M>=1){var U={x:me.x*M,y:me.y*M};if(U.x||U.y){var P=st(f);b.window(f)?f.scrollBy(U.x,U.y):f&&(f.scrollLeft+=U.x,f.scrollTop+=U.y);var ae=st(f),_e={x:ae.x-P.x,y:ae.y-P.y};(_e.x||_e.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:_e,interaction:a,container:f})}me.prevTime=w}me.isScrolling&&(qe.cancel(me.i),me.i=qe.request(me.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()&&me.check(t.interactable,t.prepared.name))if(t.simulation)me.x=me.y=0;else{var c,d,f,w,_=t.interactable,M=t.element,U=t.prepared.name,P=_.options[U].autoScroll,ae=ut(P.container,_,M);if(b.window(ae))w=o.clientX<me.margin,c=o.clientY<me.margin,d=o.clientX>ae.innerWidth-me.margin,f=o.clientY>ae.innerHeight-me.margin;else{var _e=ke(ae);w=o.clientX<_e.left+me.margin,c=o.clientY<_e.top+me.margin,d=o.clientX>_e.right-me.margin,f=o.clientY>_e.bottom-me.margin}me.x=d?1:w?-1:0,me.y=f?1:c?-1:0,me.isScrolling||(me.margin=P.margin,me.speed=P.speed,me.start(t))}}};function ut(a,t,o){return(b.string(a)?ge(a,t,o):a)||S(o)}function st(a){return b.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=me,me.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=me.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,me.stop(),me.interaction&&(me.interaction=null)},"interactions:stop":me.stop,"interactions:action-move":function(a){return me.onInteractionMove(a)}}},pt=wt;function ct(a,t){var o=!1;return function(){return o||($.console.warn(t),o=!0),a.apply(this,arguments)}}function ft(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Dt(a){return b.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Bt(a){return b.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,c,d,f){var w=function(_,M,U,P,ae){var _e=_.getRect(P),Ue=M.buttons||{0:1,1:4,3:8,4:16}[M.button],$e={action:null,interactable:_,interaction:U,element:P,rect:_e,buttons:Ue};return ae.fire("auto-start:check",$e),$e.action}(this,c,d,f,a);return this.options.actionChecker?this.options.actionChecker(o,c,w,this,f,d):w},t.prototype.ignoreFrom=ct(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ct(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Bt,t.prototype.styleCursor=Dt}};function vt(a,t,o,c,d){return t.testIgnoreAllow(t.options[a.name],o,c)&&t.options[a.name].enabled&&Yt(t,o,a,d)?a:null}function zt(a,t,o,c,d,f,w){for(var _=0,M=c.length;_<M;_++){var U=c[_],P=d[_],ae=U.getAction(t,o,a,P);if(ae){var _e=vt(ae,U,P,f,w);if(_e)return{action:_e,interactable:U,element:P}}}return{action:null,interactable:null,element:null}}function Ut(a,t,o,c,d){var f=[],w=[],_=c;function M(P){f.push(P),w.push(_)}for(;b.element(_);){f=[],w=[],d.interactables.forEachMatch(_,M);var U=zt(a,t,o,f,w,c,d);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;_=Qe(_)}return{action:null,interactable:null,element:null}}function Ht(a,t,o){var c=t.action,d=t.interactable,f=t.element;c=c||{name:null},a.interactable=d,a.element=f,ft(a.prepared,c),a.rect=d&&c.name?d.getRect(f):null,Ia(a,o),o.fire("autoStart:prepared",{interaction:a})}function Yt(a,t,o,c){var d=a.options,f=d[o.name].max,w=d[o.name].maxPerElement,_=c.autoStart.maxInteractions,M=0,U=0,P=0;if(!(f&&w&&_))return!1;for(var ae=0,_e=c.interactions.list;ae<_e.length;ae++){var Ue=_e[ae],$e=Ue.prepared.name;if(Ue.interacting()&&(++M>=_||Ue.interactable===a&&((U+=$e===o.name?1:0)>=f||Ue.element===t&&(P++,$e===o.name&&P>=w))))return!1}return _>0}function aa(a,t){return b.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function Ft(a,t,o){var c=o.autoStart.cursorElement;c&&c!==a&&(c.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Ia(a,t){var o=a.interactable,c=a.element,d=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(d.name){var w=o.options[d.name].cursorChecker;f=b.func(w)?w(d,o,c,a._interacting):t.actions.map[d.name].getCursor(d)}Ft(a.element,f||"",t)}else t.autoStart.cursorElement&&Ft(t.autoStart.cursorElement,"",t)}var Fa={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,k(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(c){return aa(c,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Yt,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget;o.interacting()||Ht(o,Ut(o,c,d,f,t),t)},"interactions:move":function(a,t){(function(o,c){var d=o.interaction,f=o.pointer,w=o.event,_=o.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Ht(d,Ut(d,f,w,_,c),c)})(a,t),function(o,c){var d=o.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){c.fire("autoStart:before-start",o);var f=d.interactable,w=d.prepared.name;w&&f&&(f.options[w].manualStart||!Yt(f,d.element,d.prepared,c)?d.stop():(d.start(d.prepared,f,d.element),Ia(d,c)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,c=o.interactable;c&&c.options.styleCursor&&Ft(o.element,"",t)}},maxInteractions:aa,withinInteractionLimit:Yt,validateAction:vt},xa=Fa,$a={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,c=a.eventTarget,d=a.dx,f=a.dy;if(o.prepared.name==="drag"){var w=Math.abs(d),_=Math.abs(f),M=o.interactable.options.drag,U=M.startAxis,P=w>_?"x":w<_?"y":"xy";if(o.prepared.axis=M.lockAxis==="start"?P[0]:M.lockAxis,P!=="xy"&&U!=="xy"&&U!==P){o.prepared.name=null;for(var ae=c,_e=function($e){if($e!==o.interactable){var Xe=o.interactable.options.drag;if(!Xe.manualStart&&$e.testIgnoreAllow(Xe,ae,c)){var lt=$e.getAction(o.downPointer,o.downEvent,o,ae);if(lt&&lt.name==="drag"&&function(at,ht){if(!ht)return!1;var St=ht.options.drag.startAxis;return at==="xy"||St==="xy"||St===at}(P,$e)&&xa.validateAction(lt,$e,ae,c,t))return $e}}};b.element(ae);){var Ue=t.interactables.forEachMatch(ae,_e);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=ae;break}ae=Qe(ae)}}}}}};function wa(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 ja={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(xa),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=wa(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;wa(t)>0&&(t.prepared.name=null)}},getHoldDuration:wa},Ua=ja,Ka={id:"auto-start",install:function(a){a.usePlugin(xa),a.usePlugin(Ua),a.usePlugin($a)}},Wa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):b.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ha(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Na={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Wa,t.prototype.checkAndPreventDefault=function(o){return function(c,d,f){var w=c.options.preventDefault;if(w!=="never")if(w!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var _=S(f.target).document,M=d.getDocOptions(_);if(!M||!M.events||M.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||b.element(f.target)&&X(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var c=0,d=a.interactions.list;c<d.length;c++){var f=d[c];if(f.element&&(f.element===o.target||te(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ha,a},{})};function ga(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 pa(a){var t={};for(var o in a){var c=a[o];b.plainObject(c)?t[o]=pa(c):b.array(c)?t[o]=xe(c):t[o]=c}return t}var Da=function(){function a(t){s(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=ya(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(a,[{key:"start",value:function(t,o){var c,d,f=t.phase,w=this.interaction,_=function(U){var P=U.interactable.options[U.prepared.name],ae=P.modifiers;return ae&&ae.length?ae:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(_e){var Ue=P[_e];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(_e){return!!_e})}(w);this.prepareStates(_),this.startEdges=k({},w.edges),this.edges=k({},this.startEdges),this.startOffset=(c=w.rect,d=o,c?{left:d.x-c.left,top:d.y-c.top,right:c.right-d.x,bottom:c.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var M=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=ya(),this.startAll(M),this.result=this.setAll(M)}},{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,c=this.states;o<c.length;o++){var d=c[o];d.methods.start&&(t.state=d,d.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,c=t.preEnd,d=t.skipModifiers,f=t.rect,w=t.edges;t.coords=k({},t.pageCoords),t.rect=k({},f),t.edges=k({},w);for(var _=d?this.states.slice(d):this.states,M=ya(t.coords,t.rect),U=0;U<_.length;U++){var P,ae=_[U],_e=ae.options,Ue=k({},t.coords),$e=null;(P=ae.methods)!=null&&P.set&&this.shouldDo(_e,c,o)&&(t.state=ae,$e=ae.methods.set(t),le(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),M.eventProps.push($e)}k(this.edges,t.edges),M.delta.x=t.coords.x-t.pageCoords.x,M.delta.y=t.coords.y-t.pageCoords.y,M.rectDelta.left=t.rect.left-f.left,M.rectDelta.right=t.rect.right-f.right,M.rectDelta.top=t.rect.top-f.top,M.rectDelta.bottom=t.rect.bottom-f.bottom;var Xe=this.result.coords,lt=this.result.rect;if(Xe&&lt){var at=M.rect.left!==lt.left||M.rect.right!==lt.right||M.rect.top!==lt.top||M.rect.bottom!==lt.bottom;M.changed=at||Xe.x!==M.coords.x||Xe.y!==M.coords.y}return M}},{key:"applyToInteraction",value:function(t){var o=this.interaction,c=t.phase,d=o.coords.cur,f=o.coords.start,w=this.result,_=this.startDelta,M=w.delta;c==="start"&&k(this.startDelta,w.delta);for(var U=0,P=[[f,_],[d,M]];U<P.length;U++){var ae=P[U],_e=ae[0],Ue=ae[1];_e.page.x+=Ue.x,_e.page.y+=Ue.y,_e.client.x+=Ue.x,_e.client.y+=Ue.y}var $e=this.result.rectDelta,Xe=t.rect||o.rect;Xe.left+=$e.left,Xe.right+=$e.right,Xe.top+=$e.top,Xe.bottom+=$e.bottom,Xe.width=Xe.right-Xe.left,Xe.height=Xe.bottom-Xe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,c=t.phase,d=t.preEnd,f=t.skipModifiers,w=this.setAll(this.fillArg({preEnd:d,phase:c,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=w,!w.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var _=o.coords.cur.page,M={x:t.modifiedCoords.x-_.x,y:t.modifiedCoords.y-_.y};w.coords.x+=M.x,w.coords.y+=M.y,w.delta.x+=M.x,w.delta.y+=M.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,c=t.event,d=this.states;if(d&&d.length){for(var f=!1,w=0;w<d.length;w++){var _=d[w];t.state=_;var M=_.options,U=_.methods,P=U.beforeEnd&&U.beforeEnd(t);if(P)return this.endResult=P,!1;f=f||!f&&this.shouldDo(M,!0,t.phase,!0)}f&&o.move({event:c,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var c=k({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(c);for(var d=0,f=this.states;d<f.length;d++){var w=f[d];c.state=w,w.methods.stop&&w.methods.stop(c)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var c=t[o],d=c.options,f=c.methods,w=c.name;this.states.push({options:d,methods:f,index:o,name:w})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,c=o.coords,d=o.rect,f=o.modification;if(f.result){for(var w=f.startDelta,_=f.result,M=_.delta,U=_.rectDelta,P=0,ae=[[c.start,w],[c.cur,M]];P<ae.length;P++){var _e=ae[P],Ue=_e[0],$e=_e[1];Ue.page.x-=$e.x,Ue.page.y-=$e.y,Ue.client.x-=$e.x,Ue.client.y-=$e.y}d.left-=U.left,d.right-=U.right,d.top-=U.top,d.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,c,d){return!(!t||t.enabled===!1||d&&!t.endOnly||t.endOnly&&!o||c==="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 pa(o)}),this.result=ya(k({},t.result.coords),k({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ya(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 ia(a,t){var o=a.defaults,c={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},d=function(f){var w=f||{};for(var _ in w.enabled=w.enabled!==!1,o)_ in w||(w[_]=o[_]);var M={options:w,methods:c,name:t,enable:function(){return w.enabled=!0,M},disable:function(){return w.enabled=!1,M}};return M};return t&&typeof t=="string"&&(d._defaults=o,d._methods=c),d}function va(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var qa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new Da(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,c=o.setAndApply(a);return t.edges=o.edges,c},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,c=o.beforeEnd(a);return t.edges=o.startEdges,c},"interactions:action-start":va,"interactions:action-move":va,"interactions:action-end":va,"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)}}},Aa=qa,Va={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},_a=function(a){g(o,a);var t=j(o);function o(c,d,f,w,_,M,U){var P;s(this,o),(P=t.call(this,c)).relatedTarget=null,P.screenX=void 0,P.screenY=void 0,P.button=void 0,P.buttons=void 0,P.ctrlKey=void 0,P.shiftKey=void 0,P.altKey=void 0,P.metaKey=void 0,P.page=void 0,P.client=void 0,P.delta=void 0,P.rect=void 0,P.x0=void 0,P.y0=void 0,P.t0=void 0,P.dt=void 0,P.duration=void 0,P.clientX0=void 0,P.clientY0=void 0,P.velocity=void 0,P.speed=void 0,P.swipe=void 0,P.axes=void 0,P.preEnd=void 0,_=_||c.element;var ae=c.interactable,_e=(ae&&ae.options||Va).deltaSource,Ue=pe(ae,_,f),$e=w==="start",Xe=w==="end",lt=$e?z(P):c.prevEvent,at=$e?c.coords.start:Xe?{page:lt.page,client:lt.client,timeStamp:c.coords.cur.timeStamp}:c.coords.cur;return P.page=k({},at.page),P.client=k({},at.client),P.rect=k({},c.rect),P.timeStamp=at.timeStamp,Xe||(P.page.x-=Ue.x,P.page.y-=Ue.y,P.client.x-=Ue.x,P.client.y-=Ue.y),P.ctrlKey=d.ctrlKey,P.altKey=d.altKey,P.shiftKey=d.shiftKey,P.metaKey=d.metaKey,P.button=d.button,P.buttons=d.buttons,P.target=_,P.currentTarget=_,P.preEnd=M,P.type=U||f+(w||""),P.interactable=ae,P.t0=$e?c.pointers[c.pointers.length-1].downTime:lt.t0,P.x0=c.coords.start.page.x-Ue.x,P.y0=c.coords.start.page.y-Ue.y,P.clientX0=c.coords.start.client.x-Ue.x,P.clientY0=c.coords.start.client.y-Ue.y,P.delta=$e||Xe?{x:0,y:0}:{x:P[_e].x-lt[_e].x,y:P[_e].y-lt[_e].y},P.dt=c.coords.delta.timeStamp,P.duration=P.timeStamp-P.t0,P.velocity=k({},c.coords.velocity[_e]),P.speed=dt(P.velocity.x,P.velocity.y),P.swipe=Xe||w==="inertiastart"?P.getSwipe():null,P}return h(o,[{key:"getSwipe",value:function(){var c=this._interaction;if(c.prevEvent.speed<600||this.timeStamp-c.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(c.prevEvent.velocityY,c.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var f=112.5<=d&&d<247.5,w=202.5<=d&&d<337.5;return{up:w,down:!w&&22.5<=d&&d<157.5,left:f,right:!f&&(292.5<=d||d<67.5),angle:d,speed:c.prevEvent.speed,velocity:{x:c.prevEvent.velocityX,y:c.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ye);Object.defineProperties(_a.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 Xa=h(function a(t,o,c,d,f){s(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=c,this.downTime=d,this.downTarget=f}),Ya=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),Oa=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ga=0,Ja=function(){function a(t){var o=this,c=t.pointerType,d=t.scopeFire;s(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=ct(function(P){this.move(P)},"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=Ga++,this._scopeFire=d,this.pointerType=c;var f=this;this._proxy={};var w=function(P){Object.defineProperty(o._proxy,P,{get:function(){return f[P]}})};for(var _ in Ya)w(_);var M=function(P){Object.defineProperty(o._proxy,P,{value:function(){return f[P].apply(f,arguments)}})};for(var U in Oa)M(U);this._scopeFire("interactions:new",{interaction:this})}return h(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,c){var d=this.updatePointer(t,o,c,!0),f=this.pointers[d];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:c,pointerIndex:d,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,c){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=c,this.rect=o.getRect(c),this.edges=this.prepared.edges?k({},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,c){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,c,!1);var d,f,w=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&&(d=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,f)>this.pointerMoveTolerance);var _,M,U,P=this.getPointerIndex(t),ae={pointer:t,pointerIndex:P,pointerInfo:this.pointers[P],event:o,type:"move",eventTarget:c,dx:d,dy:f,duplicate:w,interaction:this};w||(_=this.coords.velocity,M=this.coords.delta,U=Math.max(M.timeStamp/1e3,.001),_.page.x=M.page.x/U,_.page.y=M.page.y/U,_.client.x=M.client.x/U,_.client.y=M.client.y/U,_.timeStamp=U),this._scopeFire("interactions:move",ae),w||this.simulation||(this.interacting()&&(ae.type=null,this.move(ae)),this.pointerWasMoved&&H(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ne(this.coords.delta),(t=k({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,c,d){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,c,!1));var w=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(w),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:c,type:w,curEventTarget:d,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=O(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:W(this.pointers,function(c){return c.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,c,d){var f,w,_,M=O(t),U=this.getPointerIndex(t),P=this.pointers[U];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),P?P.pointer=t:(P=new Xa(M,t,o,null,null),U=this.pointers.length,this.pointers.push(P)),re(this.coords.cur,this.pointers.map(function(ae){return ae.pointer}),this._now()),f=this.coords.delta,w=this.coords.prev,_=this.coords.cur,f.page.x=_.page.x-w.page.x,f.page.y=_.page.y-w.page.y,f.client.x=_.client.x-w.client.x,f.client.y=_.client.y-w.client.y,f.timeStamp=_.timeStamp-w.timeStamp,d&&(this.pointerIsDown=!0,P.downTime=this.coords.cur.timeStamp,P.downTarget=c,V(this.downPointer,t),this.interacting()||(H(this.coords.start,this.coords.cur),H(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,c),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:c,down:d,pointerInfo:P,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var c=this.getPointerIndex(t);if(c!==-1){var d=this.pointers[c];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:c,pointerInfo:d,interaction:this}),this.pointers.splice(c,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,c){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=c}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,c,d){return new _a(this,t,this.prepared.name,o,this.element,c,d)}},{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,c=t.phase,d=t.preEnd,f=t.type,w=this.rect;if(w&&c==="move"&&(le(this.edges,w,this.coords.delta[this.interactable.options.deltaSource]),w.width=w.right-w.left,w.height=w.bottom-w.top),this._scopeFire("interactions:before-action-".concat(c),t)===!1)return!1;var _=t.iEvent=this._createPreparedEvent(o,c,d,f);return this._scopeFire("interactions:action-".concat(c),t),c==="start"&&(this.prevEvent=_),this._fireEvent(_),this._scopeFire("interactions:after-action-".concat(c),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function Ct(a){ta(a.interaction)}function ta(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Mt(a.coords.cur,t),Mt(a.coords.delta,t),le(a.edges,a.rect,t),t.x=0,t.y=0,!0}function yt(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 Mt(a,t){var o=a.page,c=a.client,d=t.x,f=t.y;o.x+=d,o.y+=f,c.x+=d,c.y+=f}Oa.offsetBy="";var bt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=yt},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&&(Mt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":Ct,"interactions:before-action-move":Ct,"interactions:before-action-end":function(a){var t=a.interaction;if(ta(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=bt,Et=function(){function a(t){s(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,c=_t(o);if(!c||!c.enabled)return!1;var d=o.coords.velocity.client,f=dt(d.x,d.y),w=this.modification||(this.modification=new Da(o));if(w.copyFrom(o.modification),this.t0=o._now(),this.allowResume=c.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=w.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>c.minSpeed&&f>c.endSpeed)this.startInertia();else{if(w.result=w.setAll(this.modifierArg),!w.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,c=_t(this.interaction),d=c.resistance,f=-Math.log(c.endSpeed/this.v0)/d;this.targetOffset={x:(o.x-f)/d,y:(o.y-f)/d},this.te=f,this.lambda_v0=d/this.v0,this.one_ve_v0=1-c.endSpeed/this.v0;var w=this.modification,_=this.modifierArg;_.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},w.result=w.setAll(_),w.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+w.result.delta.x,y:this.targetOffset.y+w.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=qe.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,c,d,f,w,_,M=this,U=this.interaction,P=_t(U).resistance,ae=(U._now()-this.t0)/1e3;if(ae<this.te){var _e,Ue=1-(Math.exp(-P*ae)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,c=this.targetOffset.x,d=this.targetOffset.y,f=this.modifiedOffset.x,w=this.modifiedOffset.y,_e={x:Ot(_=Ue,t,c,f),y:Ot(_,o,d,w)}):_e={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var $e={x:_e.x-this.currentOffset.x,y:_e.y-this.currentOffset.y};this.currentOffset.x+=$e.x,this.currentOffset.y+=$e.y,U.offsetBy($e),U.move(),this.onNextFrame(function(){return M.inertiaTick()})}else U.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,c=o._now()-this.t0,d=_t(o).smoothEndDuration;if(c<d){var f={x:Pt(c,0,this.targetOffset.x,d),y:Pt(c,0,this.targetOffset.y,d)},w={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=w.x,this.currentOffset.y+=w.y,o.offsetBy(w),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,c=t.event,d=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,c,d,!0),f._doPhase({interaction:f,event:c,phase:"resume"}),H(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,qe.cancel(this.timeout)}}]),a}();function _t(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Rt={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(qt),a.usePlugin(Aa),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,c=t.inertia;if(c.active)for(var d=o;b.element(d);){if(d===t.element){c.resume(a);break}d=Qe(d)}},"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":va,"interactions:action-inertiastart":va,"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,c){var d=1-a;return d*d*t+2*d*a*o+a*a*c}function Pt(a,t,o,c){return-o*(a/=c)*(a-2)+t}var Gt=Rt;function sa(a,t){for(var o=0;o<t.length;o++){var c=t[o];if(a.immediatePropagationStopped)break;c(a)}}var Ma=function(){function a(t){s(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=k({},t||{})}return h(a,[{key:"fire",value:function(t){var o,c=this.global;(o=this.types[t.type])&&sa(t,o),!t.propagationStopped&&c&&(o=c[t.type])&&sa(t,o)}},{key:"on",value:function(t,o){var c=Se(t,o);for(t in c)this.types[t]=Ee(this.types[t]||[],c[t])}},{key:"off",value:function(t,o){var c=Se(t,o);for(t in c){var d=this.types[t];if(d&&d.length)for(var f=0,w=c[t];f<w.length;f++){var _=w[f],M=d.indexOf(_);M!==-1&&d.splice(M,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Za=function(){function a(t){s(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,V(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 za(a){return b.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 Tn={id:"events",install:function(a){var t,o=[],c={},d=[],f={add:w,remove:_,addDelegate:function(P,ae,_e,Ue,$e){var Xe=za($e);if(!c[_e]){c[_e]=[];for(var lt=0;lt<d.length;lt++){var at=d[lt];w(at,_e,M),w(at,_e,U,!0)}}var ht=c[_e],St=Pe(ht,function(At){return At.selector===P&&At.context===ae});St||(St={selector:P,context:ae,listeners:[]},ht.push(St)),St.listeners.push({func:Ue,options:Xe})},removeDelegate:function(P,ae,_e,Ue,$e){var Xe,lt=za($e),at=c[_e],ht=!1;if(at)for(Xe=at.length-1;Xe>=0;Xe--){var St=at[Xe];if(St.selector===P&&St.context===ae){for(var At=St.listeners,kt=At.length-1;kt>=0;kt--){var Tt=At[kt];if(Tt.func===Ue&&Qa(Tt.options,lt)){At.splice(kt,1),At.length||(at.splice(Xe,1),_(ae,_e,M),_(ae,_e,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:M,delegateUseCapture:U,delegatedEvents:c,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function w(P,ae,_e,Ue){if(P.addEventListener){var $e=za(Ue),Xe=Pe(o,function(lt){return lt.eventTarget===P});Xe||(Xe={eventTarget:P,events:{}},o.push(Xe)),Xe.events[ae]||(Xe.events[ae]=[]),Pe(Xe.events[ae],function(lt){return lt.func===_e&&Qa(lt.options,$e)})||(P.addEventListener(ae,_e,f.supportsOptions?$e:$e.capture),Xe.events[ae].push({func:_e,options:$e}))}}function _(P,ae,_e,Ue){if(P.addEventListener&&P.removeEventListener){var $e=W(o,function(oa){return oa.eventTarget===P}),Xe=o[$e];if(Xe&&Xe.events)if(ae!=="all"){var lt=!1,at=Xe.events[ae];if(at){if(_e==="all"){for(var ht=at.length-1;ht>=0;ht--){var St=at[ht];_(P,ae,St.func,St.options)}return}for(var At=za(Ue),kt=0;kt<at.length;kt++){var Tt=at[kt];if(Tt.func===_e&&Qa(Tt.options,At)){P.removeEventListener(ae,_e,f.supportsOptions?At:At.capture),at.splice(kt,1),at.length===0&&(delete Xe.events[ae],lt=!0);break}}}lt&&!Object.keys(Xe.events).length&&o.splice($e,1)}else for(ae in Xe.events)Xe.events.hasOwnProperty(ae)&&_(P,ae,"all")}}function M(P,ae){for(var _e=za(ae),Ue=new Za(P),$e=c[P.type],Xe=fe(P)[0],lt=Xe;b.element(lt);){for(var at=0;at<$e.length;at++){var ht=$e[at],St=ht.selector,At=ht.context;if(X(lt,St)&&te(At,Xe)&&te(At,lt)){var kt=ht.listeners;Ue.currentTarget=lt;for(var Tt=0;Tt<kt.length;Tt++){var oa=kt[Tt];Qa(oa.options,_e)&&oa.func(Ue)}}}lt=Qe(lt)}}function U(P){return M(P,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),a.events=f,f}},sn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=sn.methodOrder;t<o.length;t++){var c=o[t],d=sn[c](a);if(d)return d}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,c=a.eventTarget,d=a.scope;if(!/down|start/i.test(o))return null;for(var f=0,w=d.interactions.list;f<w.length;f++){var _=w[f],M=c;if(_.simulation&&_.simulation.allowResume&&_.pointerType===t)for(;M;){if(M===_.element)return _;M=Qe(M)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,c=a.pointerType,d=a.eventType,f=a.scope;if(c!=="mouse"&&c!=="pen")return null;for(var w=0,_=f.interactions.list;w<_.length;w++){var M=_[w];if(M.pointerType===c){if(M.simulation&&!gn(M,o))continue;if(M.interacting())return M;t||(t=M)}}if(t)return t;for(var U=0,P=f.interactions.list;U<P.length;U++){var ae=P[U];if(!(ae.pointerType!==c||/down/i.test(d)&&ae.simulation))return ae}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,c=a.scope.interactions.list;o<c.length;o++){var d=c[o];if(gn(d,t))return d}return null},idle:function(a){for(var t=a.pointerType,o=0,c=a.scope.interactions.list;o<c.length;o++){var d=c[o];if(d.pointers.length===1){var f=d.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&t===d.pointerType)return d}return null}};function gn(a,t){return a.pointers.some(function(o){return o.id===t})}var cn=sn,fa=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function en(a,t){return function(o){var c=t.interactions.list,d=oe(o),f=fe(o),w=f[0],_=f[1],M=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,P=o.changedTouches;U<P.length;U++){var ae=P[U],_e={pointer:ae,pointerId:O(ae),pointerType:d,eventType:o.type,eventTarget:w,curEventTarget:_,scope:t},Ue=un(_e);M.push([_e.pointer,_e.eventTarget,_e.curEventTarget,Ue])}}else{var $e=!1;if(!G.supportsPointerEvent&&/mouse/.test(o.type)){for(var Xe=0;Xe<c.length&&!$e;Xe++)$e=c[Xe].pointerType!=="mouse"&&c[Xe].pointerIsDown;$e=$e||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!$e){var lt={pointer:o,pointerId:O(o),pointerType:d,eventType:o.type,curEventTarget:_,eventTarget:w,scope:t},at=un(lt);M.push([lt.pointer,lt.eventTarget,lt.curEventTarget,at])}}for(var ht=0;ht<M.length;ht++){var St=M[ht],At=St[0],kt=St[1],Tt=St[2];St[3][a](At,o,kt,Tt)}}}function un(a){var t=a.pointerType,o=a.scope,c={interaction:cn.search(a),searchDetails:a};return o.fire("interactions:find",c),c.interaction||o.interactions.new({pointerType:t})}function ca(a,t){var o=a.doc,c=a.scope,d=a.options,f=c.interactions.docEvents,w=c.events,_=w[t];for(var M in c.browser.isIOS&&!d.events&&(d.events={passive:!1}),w.delegatedEvents)_(o,M,w.delegateListener),_(o,M,w.delegateUseCapture,!0);for(var U=d&&d.events,P=0;P<f.length;P++){var ae=f[P];_(o,ae.type,ae.listener,U)}}var Bn={id:"core/interactions",install:function(a){for(var t={},o=0;o<fa.length;o++){var c=fa[o];t[c]=en(c,a)}var d,f=G.pEventTypes;function w(){for(var _=0,M=a.interactions.list;_<M.length;_++){var U=M[_];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var P=function(){var Ue=_e[ae];a.documents.some(function($e){return te($e.doc,Ue.downTarget)})||U.removePointer(Ue.pointer,Ue.event)},ae=0,_e=U.pointers;ae<_e.length;ae++)P()}}(d=I.PointerEvent?[{type:f.down,listener:w},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:w},{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(_){for(var M=0,U=a.interactions.list;M<U.length;M++)U[M].documentBlur(_)}}),a.prevTouchTime=0,a.Interaction=function(_){g(U,_);var M=j(U);function U(){return s(this,U),M.apply(this,arguments)}return h(U,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(P){a.interactions.pointerMoveTolerance=P}},{key:"_now",value:function(){return a.now()}}]),U}(Ja),a.interactions={list:[],new:function(_){_.scopeFire=function(U,P){return a.fire(U,P)};var M=new a.Interaction(_);return a.interactions.list.push(M),M},listeners:t,docEvents:d,pointerMoveTolerance:1},a.usePlugin(Na)},listeners:{"scope:add-document":function(a){return ca(a,"add")},"scope:remove-document":function(a){return ca(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,c=t.interactions.list.length-1;c>=0;c--){var d=t.interactions.list[c];d.interactable===o&&(d.stop(),t.fire("interactions:destroy",{interaction:d}),d.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(c,1))}}},onDocSignal:ca,doOnInteractions:en,methodNames:fa},Ra=Bn,Pa=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Pa||{}),fr=function(){function a(t,o,c,d){s(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ma,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||c,this._win=S(Y(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=d,this.set(o)}return h(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return b.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),b.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),b.func(o.onend)&&this.on("".concat(t,"end"),o.onend),b.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,c){var d,f=this,w=(d=this._actions.map[t])==null?void 0:d.filterEventType,_=function(M){return(w==null||w(M))&&ga(M,f._actions)};(b.array(o)||b.object(o))&&this._onOff(Pa.Off,t,o,void 0,_),(b.array(c)||b.object(c))&&this._onOff(Pa.On,t,c,void 0,_)}},{key:"setPerAction",value:function(t,o){var c=this._defaults;for(var d in o){var f=d,w=this.options[t],_=o[f];f==="listeners"&&this.updatePerActionListeners(t,w.listeners,_),b.array(_)?w[f]=xe(_):b.plainObject(_)?(w[f]=k(w[f]||{},pa(_)),b.object(c.perAction[f])&&"enabled"in c.perAction[f]&&(w[f].enabled=_.enabled!==!1)):b.bool(_)&&b.object(c.perAction[f])?w[f].enabled=_:w[f]=_}}},{key:"getRect",value:function(t){return t=t||(b.element(this.target)?this.target:null),b.string(this.target)&&(t=t||this._context.querySelector(this.target)),Fe(t)}},{key:"rectChecker",value:function(t){var o=this;return b.func(t)?(this.getRect=function(c){var d=k({},t.apply(o,c));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(Y(o)||b.object(o)){for(var c in this.options[t]=o,this._actions.map)this.options[c][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 b.string(t)?Array.from(this._context.querySelectorAll(t)):b.func(t)&&t.getAllElements?t.getAllElements():b.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||te(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,c){return!this.testIgnore(t.ignoreFrom,o,c)&&this.testAllow(t.allowFrom,o,c)}},{key:"testAllow",value:function(t,o,c){return!t||!!b.element(c)&&(b.string(t)?ve(c,t,o):!!b.element(t)&&te(t,c))}},{key:"testIgnore",value:function(t,o,c){return!(!t||!b.element(c))&&(b.string(t)?ve(c,t,o):!!b.element(t)&&te(t,c))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,c,d,f){b.object(o)&&!b.array(o)&&(d=c,c=null);var w=Se(o,c,f);for(var _ in w){_==="wheel"&&(_=G.wheelEvent);for(var M=0,U=w[_];M<U.length;M++){var P=U[M];ga(_,this._actions)?this.events[t===Pa.On?"on":"off"](_,P):b.string(this.target)?this._scopeEvents[t===Pa.On?"addDelegate":"removeDelegate"](this.target,this._context,_,P,d):this._scopeEvents[t===Pa.On?"add":"remove"](this.target,_,P,d)}}return this}},{key:"on",value:function(t,o,c){return this._onOff(Pa.On,t,o,c)}},{key:"off",value:function(t,o,c){return this._onOff(Pa.Off,t,o,c)}},{key:"set",value:function(t){var o=this._defaults;for(var c in b.object(t)||(t={}),this.options=pa(o.base),this._actions.methodDict){var d=c,f=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,k(k({},o.perAction),o.actions[d])),this[f](t[d])}for(var w in t)w!=="getRect"?b.func(this[w])&&this[w](t[w]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(b.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],c=o.length-1;c>=0;c--){var d=o[c],f=d.selector,w=d.context,_=d.listeners;f===this.target&&w===this._context&&o.splice(c,1);for(var M=_.length-1;M>=0;M--)this._scopeEvents.removeDelegate(this.target,this._context,t,_[M][0],_[M][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),hr=function(){function a(t){var o=this;s(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(c){var d=c.interactable,f=d.target,w=b.string(f)?o.selectorMap[f]:f[o.scope.id],_=W(w,function(M){return M===d});w.splice(_,1)}})}return h(a,[{key:"new",value:function(t,o){o=k(o||{},{actions:this.scope.actions});var c=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(c._doc),this.list.push(c),b.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(c)):(c.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(c)),this.scope.fire("interactable:new",{target:t,options:o,interactable:c,win:this.scope._win}),c}},{key:"getExisting",value:function(t,o){var c=o&&o.context||this.scope.document,d=b.string(t),f=d?this.selectorMap[t]:t[this.scope.id];if(f)return Pe(f,function(w){return w._context===c&&(d||w.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var c=0,d=this.list;c<d.length;c++){var f=d[c],w=void 0;if((b.string(f.target)?b.element(t)&&X(t,f.target):t===f.target)&&f.inContext(t)&&(w=o(f)),w!==void 0)return w}}}]),a}(),vr=function(){function a(){var t=this;s(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=G,this.defaults=pa(Va),this.Eventable=Ma,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(c){var d=function f(w,_){var M=c.interactables.getExisting(w,_);return M||((M=c.interactables.new(w,_)).events.global=f.globalEvents),M};return d.getPointerAverage=J,d.getTouchBBox=Te,d.getTouchDistance=de,d.getTouchAngle=ee,d.getElementRect=Fe,d.getElementClientRect=ke,d.matchesSelector=X,d.closest=Re,d.globalEvents={},d.version="1.10.27",d.scope=c,d.use=function(f,w){return this.scope.usePlugin(f,w),this},d.isSet=function(f,w){return!!this.scope.interactables.get(f,w&&w.context)},d.on=ct(function(f,w,_){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var M=0,U=f;M<U.length;M++){var P=U[M];this.on(P,w,_)}return this}if(b.object(f)){for(var ae in f)this.on(ae,f[ae],w);return this}return ga(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(w):this.globalEvents[f]=[w]:this.scope.events.add(this.scope.document,f,w,{options:_}),this},"The interact.on() method is being deprecated"),d.off=ct(function(f,w,_){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var M=0,U=f;M<U.length;M++){var P=U[M];this.off(P,w,_)}return this}if(b.object(f)){for(var ae in f)this.off(ae,f[ae],w);return this}var _e;return ga(f,this.scope.actions)?f in this.globalEvents&&(_e=this.globalEvents[f].indexOf(w))!==-1&&this.globalEvents[f].splice(_e,1):this.scope.events.remove(this.scope.document,f,w,_),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return G.supportsTouch},d.supportsPointerEvent=function(){return G.supportsPointerEvent},d.stop=function(){for(var f=0,w=this.scope.interactions.list;f<w.length;f++)w[f].stop();return this},d.pointerMoveTolerance=function(f){return b.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(f,w){this.scope.addDocument(f,w)},d.removeDocument=function(f){this.scope.removeDocument(f)},d}(this),this.InteractEvent=_a,this.Interactable=void 0,this.interactables=new hr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(c){return t.removeDocument(c.target)};var o=this;this.Interactable=function(c){g(f,c);var d=j(f);function f(){return s(this,f),d.apply(this,arguments)}return h(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(w){return B(D(f.prototype),"set",this).call(this,w),o.fire("interactable:set",{options:w,interactable:this}),this}},{key:"unset",value:function(){B(D(f.prototype),"unset",this).call(this);var w=o.interactables.list.indexOf(this);w<0||(o.interactables.list.splice(w,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(fr)}return h(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var c=0,d=this.listenerMaps;c<d.length;c++){var f=d[c].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,c){return o.isInitialized=!0,b.window(c)&&m(c),I.init(c),G.init(c),qe.init(c),o.window=c,o.document=c.document,o.usePlugin(Ra),o.usePlugin(Tn),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 c=0,d=this.listenerMaps.length,f=t.before.reduce(function(_,M){return _[M]=!0,_[Do(M)]=!0,_},{});c<d;c++){var w=this.listenerMaps[c].id;if(w&&(f[w]||f[Do(w)]))break}this.listenerMaps.splice(c,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 c=S(t);o=o?k({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(c,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:c,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),c=S(t),d=this.documents[o].options;this.events.remove(c,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:c,scope:this,options:d})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function Do(a){return a&&a.replace(/\/.*$/,"")}var _o=new vr,na=_o.interactStatic,mr=typeof globalThis<"u"?globalThis:window;_o.init(mr);var gr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(c){var d=c[0],f=c[1];return d in a||f in a}),o=function(c,d){for(var f=a.range,w=a.limits,_=w===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:w,M=a.offset,U=M===void 0?{x:0,y:0}:M,P={range:f,grid:a,x:null,y:null},ae=0;ae<t.length;ae++){var _e=t[ae],Ue=_e[0],$e=_e[1],Xe=Math.round((c-U.x)/a[Ue]),lt=Math.round((d-U.y)/a[$e]);P[Ue]=Math.max(_.left,Math.min(_.right,Xe*a[Ue]+U.x)),P[$e]=Math.max(_.top,Math.min(_.bottom,lt*a[$e]+U.y))}return P};return o.grid=a,o.coordFields=t,o}}),yr={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=k(t.snappers||{},gr),t.createSnapGrid=t.snappers.grid}},br=yr,kr={start:function(a){var t=a.state,o=a.rect,c=a.edges,d=a.pageCoords,f=t.options,w=f.ratio,_=f.enabled,M=t.options,U=M.equalDelta,P=M.modifiers;w==="preserve"&&(w=o.width/o.height),t.startCoords=k({},d),t.startRect=k({},o),t.ratio=w,t.equalDelta=U;var ae=t.linkedEdges={top:c.top||c.left&&!c.bottom,left:c.left||c.top&&!c.right,bottom:c.bottom||c.right&&!c.top,right:c.right||c.bottom&&!c.left};if(t.xIsPrimaryAxis=!(!c.left&&!c.right),t.equalDelta){var _e=(ae.left?1:-1)*(ae.top?1:-1);t.edgeSign={x:_e,y:_e}}else t.edgeSign={x:ae.left?-1:1,y:ae.top?-1:1};if(_!==!1&&k(c,ae),P!=null&&P.length){var Ue=new Da(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(P),t.subModification=Ue,Ue.startAll(l({},a))}},set:function(a){var t=a.state,o=a.rect,c=a.coords,d=t.linkedEdges,f=k({},c),w=t.equalDelta?xr:wr;if(k(a.edges,d),w(t,t.xIsPrimaryAxis,c,o),!t.subModification)return null;var _=k({},o);le(d,_,{x:c.x-f.x,y:c.y-f.y});var M=t.subModification.setAll(l(l({},a),{},{rect:_,edges:d,pageCoords:c,prevCoords:c,prevRect:_})),U=M.delta;return M.changed&&(w(t,Math.abs(U.x)>Math.abs(U.y),M.coords,M.rect),k(c,M.coords)),M.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function xr(a,t,o){var c=a.startCoords,d=a.edgeSign;t?o.y=c.y+(o.x-c.x)*d.y:o.x=c.x+(o.y-c.y)*d.x}function wr(a,t,o,c){var d=a.startRect,f=a.startCoords,w=a.ratio,_=a.edgeSign;if(t){var M=c.width/w;o.y=f.y+(M-d.height)*_.y}else{var U=c.height*w;o.x=f.x+(U-d.width)*_.x}}var Dr=ia(kr,"aspectRatio"),Eo=function(){};Eo._defaults={};var In=Eo;function tn(a,t,o){return b.func(a)?Ie(a,t.interactable,t.element,[o.x,o.y,t]):Ie(a,t.interactable,t.element)}var Nn={start:function(a){var t=a.rect,o=a.startOffset,c=a.state,d=a.interaction,f=a.pageCoords,w=c.options,_=w.elementRect,M=k({left:0,top:0,right:0,bottom:0},w.offset||{});if(t&&_){var U=tn(w.restriction,d,f);if(U){var P=U.right-U.left-t.width,ae=U.bottom-U.top-t.height;P<0&&(M.left+=P,M.right+=P),ae<0&&(M.top+=ae,M.bottom+=ae)}M.left+=o.left-t.width*_.left,M.top+=o.top-t.height*_.top,M.right+=o.right-t.width*(1-_.right),M.bottom+=o.bottom-t.height*(1-_.bottom)}c.offset=M},set:function(a){var t=a.coords,o=a.interaction,c=a.state,d=c.options,f=c.offset,w=tn(d.restriction,o,t);if(w){var _=function(M){return!M||"left"in M&&"top"in M||((M=k({},M)).left=M.x||0,M.top=M.y||0,M.right=M.right||M.left+M.width,M.bottom=M.bottom||M.top+M.height),M}(w);t.x=Math.max(Math.min(_.right-f.right,t.x),_.left+f.left),t.y=Math.max(Math.min(_.bottom-f.bottom,t.y),_.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},_r=ia(Nn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(a,t){for(var o=0,c=["top","left","bottom","right"];o<c.length;o++){var d=c[o];d in a||(a[d]=t[d])}return a}var yn={noInner:Co,noOuter:So,start:function(a){var t,o=a.interaction,c=a.startOffset,d=a.state,f=d.options;f&&(t=De(tn(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},d.offset={top:t.y+c.top,left:t.x+c.left,bottom:t.y-c.bottom,right:t.x-c.right}},set:function(a){var t=a.coords,o=a.edges,c=a.interaction,d=a.state,f=d.offset,w=d.options;if(o){var _=k({},t),M=tn(w.inner,c,_)||{},U=tn(w.outer,c,_)||{};To(M,Co),To(U,So),o.top?t.y=Math.min(Math.max(U.top+f.top,_.y),M.top+f.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+f.bottom,_.y),M.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(U.left+f.left,_.x),M.left+f.left):o.right&&(t.x=Math.max(Math.min(U.right+f.right,_.x),M.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Er=ia(yn,"restrictEdges"),Cr=k({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Nn.defaults),Sr=ia({start:Nn.start,set:Nn.set,defaults:Cr},"restrictRect"),Tr={width:-1/0,height:-1/0},Br={width:1/0,height:1/0},Ir=ia({start:function(a){return yn.start(a)},set:function(a){var t=a.interaction,o=a.state,c=a.rect,d=a.edges,f=o.options;if(d){var w=se(tn(f.min,t,a.coords))||Tr,_=se(tn(f.max,t,a.coords))||Br;o.options={endOnly:f.endOnly,inner:k({},yn.noInner),outer:k({},yn.noOuter)},d.top?(o.options.inner.top=c.bottom-w.height,o.options.outer.top=c.bottom-_.height):d.bottom&&(o.options.inner.bottom=c.top+w.height,o.options.outer.bottom=c.top+_.height),d.left?(o.options.inner.left=c.right-w.width,o.options.outer.left=c.right-_.width):d.right&&(o.options.inner.right=c.left+w.width,o.options.outer.right=c.left+_.width),yn.set(a),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Zn={start:function(a){var t,o=a.interaction,c=a.interactable,d=a.element,f=a.rect,w=a.state,_=a.startOffset,M=w.options,U=M.offsetWithOrigin?function(_e){var Ue=_e.interaction.element,$e=De(Ie(_e.state.options.origin,null,null,[Ue])),Xe=$e||pe(_e.interactable,Ue,_e.interaction.prepared.name);return Xe}(a):{x:0,y:0};if(M.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var P=Ie(M.offset,c,d,[o]);(t=De(P)||{x:0,y:0}).x+=U.x,t.y+=U.y}var ae=M.relativePoints;w.offsets=f&&ae&&ae.length?ae.map(function(_e,Ue){return{index:Ue,relativePoint:_e,x:_.left-f.width*_e.x+t.x,y:_.top-f.height*_e.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,c=a.state,d=c.options,f=c.offsets,w=pe(t.interactable,t.element,t.prepared.name),_=k({},o),M=[];d.offsetWithOrigin||(_.x-=w.x,_.y-=w.y);for(var U=0,P=f;U<P.length;U++)for(var ae=P[U],_e=_.x-ae.x,Ue=_.y-ae.y,$e=0,Xe=d.targets.length;$e<Xe;$e++){var lt=d.targets[$e],at=void 0;(at=b.func(lt)?lt(_e,Ue,t._proxy,ae,$e):lt)&&M.push({x:(b.number(at.x)?at.x:_e)+ae.x,y:(b.number(at.y)?at.y:Ue)+ae.y,range:b.number(at.range)?at.range:d.range,source:lt,index:$e,offset:ae})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},St=0;St<M.length;St++){var At=M[St],kt=At.range,Tt=At.x-_.x,oa=At.y-_.y,Kt=dt(Tt,oa),ua=Kt<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(ua=!1),ht.target&&!(ua?ht.inRange&&kt!==1/0?Kt/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=At,ht.distance=Kt,ht.range=kt,ht.inRange=ua,ht.delta.x=Tt,ht.delta.y=oa)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),c.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Nr=ia(Zn,"snap"),An={start:function(a){var t=a.state,o=a.edges,c=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:c.offset||"self",origin:{x:0,y:0},range:c.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Zn.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,c=a.coords,d=o.options,f=o.offsets,w={x:c.x-f[0].x,y:c.y-f[0].y};o.options=k({},d),o.options.targets=[];for(var _=0,M=d.targets||[];_<M.length;_++){var U=M[_],P=void 0;if(P=b.func(U)?U(w.x,w.y,t):U){for(var ae=0,_e=o.targetFields;ae<_e.length;ae++){var Ue=_e[ae],$e=Ue[0],Xe=Ue[1];if($e in P||Xe in P){P.x=P[$e],P.y=P[Xe];break}}o.options.targets.push(P)}}var lt=Zn.set(a);return o.options=d,lt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ar=ia(An,"snapSize"),Qn={aspectRatio:Dr,restrictEdges:Er,restrict:_r,restrictRect:Sr,restrictSize:Ir,snapEdges:ia({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],An.start(a)):null},set:An.set,defaults:k(pa(An.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Nr,snapSize:Ar,spring:In,avoid:In,transform:In,rubberband:In},Vr={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(Aa),a.usePlugin(br),t.modifiers=Qn,Qn){var c=Qn[o],d=c._defaults,f=c._methods;d._methods=f,a.defaults.perAction[o]=d}}},Or=Vr,Bo=function(a){g(o,a);var t=j(o);function o(c,d,f,w,_,M){var U;if(s(this,o),V(z(U=t.call(this,_)),f),f!==d&&V(z(U),d),U.timeStamp=M,U.originalEvent=f,U.type=c,U.pointerId=O(d),U.pointerType=oe(d),U.target=w,U.currentTarget=null,c==="tap"){var P=_.getPointerIndex(d);U.dt=U.timeStamp-_.pointers[P].downTime;var ae=U.timeStamp-_.tapTime;U.double=!!_.prevTap&&_.prevTap.type!=="doubletap"&&_.prevTap.target===U.target&&ae<500}else c==="doubletap"&&(U.dt=d.timeStamp-_.tapTime,U.double=!0);return U}return h(o,[{key:"_subtractOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX-=d,this.pageY-=f,this.clientX-=d,this.clientY-=f,this}},{key:"_addOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX+=d,this.pageY+=f,this.clientX+=d,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ye),bn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=bn,a.defaults.actions.pointerEvents=bn.defaults,k(a.actions.phaselessTypes,bn.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,c=a.pointer,d=a.event,f=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&eo(a),La({interaction:o,pointer:c,event:d,eventTarget:f,type:"move"},t))},"interactions:down":function(a,t){(function(o,c){for(var d=o.interaction,f=o.pointer,w=o.event,_=o.eventTarget,M=o.pointerIndex,U=d.pointers[M].hold,P=q(_),ae={interaction:d,pointer:f,event:w,eventTarget:_,type:"hold",targets:[],path:P,node:null},_e=0;_e<P.length;_e++){var Ue=P[_e];ae.node=Ue,c.fire("pointerEvents:collect-targets",ae)}if(ae.targets.length){for(var $e=1/0,Xe=0,lt=ae.targets;Xe<lt.length;Xe++){var at=lt[Xe].eventable.options.holdDuration;at<$e&&($e=at)}U.duration=$e,U.timeout=setTimeout(function(){La({interaction:d,eventTarget:_,pointer:f,event:w,type:"hold"},c)},$e)}})(a,t),La(a,t)},"interactions:up":function(a,t){eo(a),La(a,t),function(o,c){var d=o.interaction,f=o.pointer,w=o.event,_=o.eventTarget;d.pointerWasMoved||La({interaction:d,eventTarget:_,pointer:f,event:w,type:"tap"},c)}(a,t)},"interactions:cancel":function(a,t){eo(a),La(a,t)}},PointerEvent:Bo,fire:La,collectEventTargets:Io,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 La(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget,w=a.type,_=a.targets,M=_===void 0?Io(a,t):_,U=new Bo(w,c,d,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var P={interaction:o,pointer:c,event:d,eventTarget:f,targets:M,type:w,pointerEvent:U},ae=0;ae<M.length;ae++){var _e=M[ae];for(var Ue in _e.props||{})U[Ue]=_e.props[Ue];var $e=pe(_e.eventable,_e.node);if(U._subtractOrigin($e),U.eventable=_e.eventable,U.currentTarget=_e.node,_e.eventable.fire(U),U._addOrigin($e),U.immediatePropagationStopped||U.propagationStopped&&ae+1<M.length&&M[ae+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",P),w==="tap"){var Xe=U.double?La({interaction:o,pointer:c,event:d,eventTarget:f,type:"doubletap"},t):U;o.prevTap=Xe,o.tapTime=Xe.timeStamp}return U}function Io(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget,w=a.type,_=o.getPointerIndex(c),M=o.pointers[_];if(w==="tap"&&(o.pointerWasMoved||!M||M.downTarget!==f))return[];for(var U=q(f),P={interaction:o,pointer:c,event:d,eventTarget:f,type:w,path:U,targets:[],node:null},ae=0;ae<U.length;ae++){var _e=U[ae];P.node=_e,t.fire("pointerEvents:collect-targets",P)}return w==="hold"&&(P.targets=P.targets.filter(function(Ue){var $e,Xe;return Ue.eventable.options.holdDuration===(($e=o.pointers[_])==null||(Xe=$e.hold)==null?void 0:Xe.duration)})),P.targets}function eo(a){var t=a.interaction,o=a.pointerIndex,c=t.pointers[o].hold;c&&c.timeout&&(clearTimeout(c.timeout),c.timeout=null)}var Mr=Object.freeze({__proto__:null,default:bn});function zr(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Rr={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(bn);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)]=zr,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,c=a.pointerEvent,d=a.eventTarget,f=a.targets;if(c.type==="hold"&&f.length){var w=f[0].eventable.options.holdRepeatInterval;w<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:d,type:"hold",pointer:c,event:c},t)},w))}}})},Pr=Rr,Lr={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(c){return k(this.events.options,c),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(c,d){var f=o.call(this,c,d);return f===this&&(this.events.options[c]=d),f}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,c=a.node,d=a.type,f=a.eventTarget;t.interactables.forEachMatch(c,function(w){var _=w.events,M=_.options;_.types[d]&&_.types[d].length&&w.testIgnoreAllow(M,c,f)&&o.push({node:c,eventable:_,props:{interactable:w}})})},"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,c=a.options;k(o.events.options,t.pointerEvents.defaults),k(o.events.options,c.pointerEvents||{})}}},Fr=Lr,$r={id:"pointer-events",install:function(a){a.usePlugin(Mr),a.usePlugin(Pr),a.usePlugin(Fr)}},jr=$r,Ur={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(c,d,f){for(var w=c.getAllElements(),_=f.window.Promise,M=_?[]:null,U=function(){var ae=w[P],_e=c.getRect(ae);if(!_e)return 1;var Ue,$e=Pe(f.interactions.list,function(at){return at.interacting()&&at.interactable===c&&at.element===ae&&at.prepared.name===d.name});if($e)$e.move(),M&&(Ue=$e._reflowPromise||new _(function(at){$e._reflowResolve=at}));else{var Xe=se(_e),lt=function(at){return{coords:at,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Xe.x,y:Xe.y},client:{x:Xe.x,y:Xe.y},timeStamp:f.now()});Ue=function(at,ht,St,At,kt){var Tt=at.interactions.new({pointerType:"reflow"}),oa={interaction:Tt,event:kt,pointer:kt,eventTarget:St,phase:"reflow"};Tt.interactable=ht,Tt.element=St,Tt.prevEvent=kt,Tt.updatePointer(kt,kt,St,!0),ne(Tt.coords.delta),ft(Tt.prepared,At),Tt._doPhase(oa);var Kt=at.window,ua=Kt.Promise,ma=ua?new ua(function(Ea){Tt._reflowResolve=Ea}):void 0;return Tt._reflowPromise=ma,Tt.start(At,ht,St),Tt._interacting?(Tt.move(oa),Tt.end(kt)):(Tt.stop(),Tt._reflowResolve()),Tt.removePointer(kt,kt),ma}(f,c,ae,d,lt)}M&&M.push(Ue)},P=0;P<w.length&&!U();P++);return M&&_.all(M).then(function(){return c})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(c,d){c.splice(c.indexOf(d),1)}(t.interactions.list,o))}}},Kr=Ur;if(na.use(Na),na.use(qt),na.use(jr),na.use(Gt),na.use(Or),na.use(Ka),na.use(A),na.use(pt),na.use(Kr),na.default=na,u(n)==="object"&&n)try{n.exports=na}catch{}return na.default=na,na})}(Dn,Dn.exports)),Dn.exports}var Pp=Rp();const tl=Ve.getDefaultExportFromCjs(Pp),Xn=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:r,emit:i}){const l=n,u=i,s=e.inject(Yl),y=e.inject(Gl);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=e.shallowRef(null),p=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 g=!1,D=!1,C=NaN,z=NaN,j=NaN,B=NaN,Z=-1,F=-1,L=-1,$=-1,m=l.x,S=l.y,v=l.w,T=l.h;const b=e.ref(),ie=e.reactive({i:e.toRef(l,"i"),state:p,wrapper:b,calcXY:Ie});function Be(N){Se(N)}function et(){Ye()}function we(N){da(l.isDraggable)&&(p.draggable=N)}function Le(N){da(l.isResizable)&&(p.resizable=N)}function Me(N){da(l.isBounded)&&(p.bounded=N)}function I(N){p.transformScale=N}function Q(N){p.rowHeight=N}function G(N){p.maxRows=N}function te(){p.rtl=Qo()==="rtl",Ye()}function Re(N){p.cols=Math.floor(N)}s.increaseItem(ie),e.onBeforeMount(()=>{p.rtl=Qo()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?p.cols=tr(s.lastBreakpoint,s.cols):p.cols=s.colNum,p.rowHeight=s.rowHeight,p.containerWidth=s.width!==null?s.width:100,p.margin=s.margin!==void 0?s.margin.map(Number):[10,10],p.maxRows=s.maxRows,da(l.isDraggable)?p.draggable=s.isDraggable:p.draggable=l.isDraggable,da(l.isResizable)?p.resizable=s.isResizable:p.resizable=l.isResizable,da(l.isBounded)?p.bounded=s.isBounded:p.bounded=l.isBounded,p.transformScale=s.transformScale,p.useCssTransforms=s.useCssTransforms,p.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{m=l.x,S=l.y,T=l.h,v=l.w,la(Fe)}),y.on("updateWidth",Be),y.on("compact",et),y.on("setDraggable",we),y.on("setResizable",Le),y.on("setBounded",Me),y.on("setTransformScale",I),y.on("setRowHeight",Q),y.on("setMaxRows",G),y.on("directionchange",te),y.on("setColNum",Re)}),e.onBeforeUnmount(()=>{y.off("updateWidth",Be),y.off("compact",et),y.off("setDraggable",we),y.off("setResizable",Le),y.off("setBounded",Me),y.off("setTransformScale",I),y.off("setRowHeight",Q),y.off("setMaxRows",G),y.off("directionchange",te),y.off("setColNum",Re),h.value&&(h.value.unset(),h.value=null),s.decreaseItem(ie)}),r({state:p,wrapper:b});const Qe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,X=e.computed(()=>p.resizable&&!l.static),R=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),ue=e.computed(()=>(p.draggable||p.resizable)&&!l.static),ve=Bp("item"),Ce=e.computed(()=>({[ve.b()]:!0,[ve.bm("resizable")]:X.value,[ve.bm("static")]:l.static,[ve.bm("resizing")]:p.isResizing,[ve.bm("dragging")]:p.isDragging,[ve.bm("transform")]:p.useCssTransforms,[ve.bm("rtl")]:R.value,[ve.bm("no-touch")]:Qe&&ue.value})),ke=e.computed(()=>[ve.be("resizer"),R.value&&ve.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,N=>{p.draggable=N}),e.watch(()=>l.static,()=>{la(V),la(ne)}),e.watch(()=>p.draggable,()=>{la(V)}),e.watch(()=>l.isResizable,N=>{p.resizable=N}),e.watch(()=>l.isBounded,N=>{p.bounded=N}),e.watch(()=>p.resizable,()=>{la(ne)}),e.watch(()=>p.rowHeight,()=>{la(Fe),la(q)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{la(ne),la(Fe),la(q)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{la(ne)}),e.watch(R,()=>{la(ne),la(Fe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const N=s.margin;!N||N[0]===p.margin[0]&&N[1]===p.margin[1]||(p.margin=N.map(Number),la(Fe),la(q))});function Fe(){l.x+l.w>p.cols?(m=0,v=l.w>p.cols?p.cols:l.w):(m=l.x,v=l.w);const N=ge(m,S,v,T);p.isDragging&&(N.top=p.dragging.top,R.value?N.right=p.dragging.left:N.left=p.dragging.left),p.isResizing&&(N.width=p.resizing.width,N.height=p.resizing.height);let ce;p.useCssTransforms?R.value?ce=Ep(N.top,N.right,N.width,N.height):ce=_p(N.top,N.left,N.width,N.height):R.value?ce=Sp(N.top,N.right,N.width,N.height):ce=Cp(N.top,N.left,N.width,N.height),p.style=ce}function q(){const N={};for(const ce of["width","height"]){const Oe=p.style[ce].match(/^(\d+)px$/);if(!Oe)return;N[ce]=Oe[1]}u("container-resized",l.i,l.h,l.w,N.height,N.width)}function Y(N){if(l.static)return;const ce=N.type;if(ce==="resizestart"&&p.isResizing||ce!=="resizestart"&&!p.isResizing)return;const Oe=Jo(N);if(da(Oe))return;const{x:O,y:re}=Oe,K={width:0,height:0};let J;switch(ce){case"resizestart":{ne(),Z=v,F=T,J=ge(m,S,v,T),K.width=J.width,K.height=J.height,p.resizing=K,p.isResizing=!0;break}case"resizemove":{!N.edges.right&&!N.edges.left&&(j=O),!N.edges.top&&!N.edges.bottom&&(B=re);const Te=Zo(j,B,O,re);R.value?K.width=p.resizing.width-Te.deltaX/p.transformScale:K.width=p.resizing.width+Te.deltaX/p.transformScale,K.height=p.resizing.height+Te.deltaY/p.transformScale,p.resizing=K;break}case"resizeend":{J=ge(m,S,v,T),K.width=J.width,K.height=J.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}J=pe(K.height,K.width),J.w<l.minW&&(J.w=l.minW),J.w>l.maxW&&(J.w=l.maxW),J.h<l.minH&&(J.h=l.minH),J.h>l.maxH&&(J.h=l.maxH),J.h<1&&(J.h=1),J.w<1&&(J.w=1),j=O,B=re,(v!==J.w||T!==J.h)&&u("resize",l.i,J.h,J.w,K.height,K.width),N.type==="resizeend"&&(Z!==v||F!==T)&&u("resized",l.i,J.h,J.w,K.height,K.width),y.emit("resizeEvent",N.type,l.i,m,S,J.h,J.w)}function k(N){if(l.static||p.isResizing)return;const ce=N.type;if(ce==="dragstart"&&p.isDragging||ce!=="dragstart"&&!p.isDragging)return;const Oe=Jo(N);if(da(Oe))return;const{x:O,y:re}=Oe,K=N.target;if(!K.offsetParent)return;const J={top:0,left:0};switch(ce){case"dragstart":{L=m,$=S;const de=K.offsetParent.getBoundingClientRect(),ee=K.getBoundingClientRect(),oe=ee.left/p.transformScale,fe=de.left/p.transformScale,ye=ee.right/p.transformScale,Ee=de.right/p.transformScale,xe=ee.top/p.transformScale,W=de.top/p.transformScale;R.value?J.left=(ye-Ee)*-1:J.left=oe-fe,J.top=xe-W,p.dragging=J,p.isDragging=!0;break}case"dragmove":{const de=Zo(C,z,O,re);if(R.value?J.left=p.dragging.left-de.deltaX/p.transformScale:J.left=p.dragging.left+de.deltaX/p.transformScale,J.top=p.dragging.top+de.deltaY/p.transformScale,p.bounded){const ee=K.offsetParent.clientHeight-se(l.h,p.rowHeight,p.margin[1]);J.top=le(J.top,0,ee);const oe=De(),fe=p.containerWidth-se(l.w,oe,p.margin[0]);J.left=le(J.left,0,fe)}p.dragging=J;break}case"dragend":{const de=K.offsetParent.getBoundingClientRect(),ee=K.getBoundingClientRect(),oe=ee.left/p.transformScale,fe=de.left/p.transformScale,ye=ee.right/p.transformScale,Ee=de.right/p.transformScale,xe=ee.top/p.transformScale,W=de.top/p.transformScale;R.value?J.left=(ye-Ee)*-1:J.left=oe-fe,J.top=xe-W,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let Te;R.value,Te=Ie(J.top,J.left),C=O,z=re,(m!==Te.x||S!==Te.y)&&u("move",l.i,Te.x,Te.y),N.type==="dragend"&&(L!==m||$!==S)&&u("moved",l.i,Te.x,Te.y),y.emit("dragEvent",N.type,l.i,Te.x,Te.y,T,v)}function ge(N,ce,Oe,O){const re=De();let K;return R.value?K={right:Math.round(re*N+(N+1)*p.margin[0]),top:Math.round(p.rowHeight*ce+(ce+1)*p.margin[1]),width:Oe===1/0?Oe:Math.round(re*Oe+Math.max(0,Oe-1)*p.margin[0]),height:O===1/0?O:Math.round(p.rowHeight*O+Math.max(0,O-1)*p.margin[1])}:K={left:Math.round(re*N+(N+1)*p.margin[0]),top:Math.round(p.rowHeight*ce+(ce+1)*p.margin[1]),width:Oe===1/0?Oe:Math.round(re*Oe+Math.max(0,Oe-1)*p.margin[0]),height:O===1/0?O:Math.round(p.rowHeight*O+Math.max(0,O-1)*p.margin[1])},K}function Ie(N,ce){const Oe=De();let O=Math.round((ce-p.margin[0])/(Oe+p.margin[0])),re=Math.round((N-p.margin[1])/(p.rowHeight+p.margin[1]));return O=Math.max(Math.min(O,p.cols-v),0),re=Math.max(Math.min(re,p.maxRows-T),0),{x:O,y:re}}function De(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function se(N,ce,Oe){return Number.isFinite(N)?Math.round(ce*N+Math.max(0,N-1)*Oe):N}function le(N,ce,Oe){return Math.max(Math.min(N,Oe),ce)}function pe(N,ce,Oe=!1){const O=De();let re=Math.round((ce+p.margin[0])/(O+p.margin[0])),K=0;return Oe?K=Math.ceil((N+p.margin[1])/(p.rowHeight+p.margin[1])):K=Math.round((N+p.margin[1])/(p.rowHeight+p.margin[1])),re=Math.max(Math.min(re,p.cols-m),0),K=Math.max(Math.min(K,p.maxRows-S),0),{w:re,h:K}}function Se(N,ce){p.containerWidth=N}function Ye(){Fe()}function dt(){!h.value&&b.value&&(h.value=tl(b.value),p.useStyleCursor||h.value.styleCursor(!1))}const x=Xo(k);function V(){if(dt(),!!h.value)if(p.draggable&&!l.static){const N={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};h.value.draggable(N),g||(g=!0,h.value.on("dragstart dragmove dragend",ce=>{ce.type==="dragmove"?x(ce):k(ce)}))}else h.value.draggable({enabled:!1})}const H=Xo(Y);function ne(){if(dt(),!!h.value)if(p.resizable&&!l.static){const N=ge(0,0,l.maxW,l.maxH),ce=ge(0,0,l.minW,l.minH),Oe={edges:{left:R.value?`.${ke.value[0]}`:!1,right:R.value?!1:`.${ke.value[0]}`,bottom:`.${ke.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:ce.height*p.transformScale,width:ce.width*p.transformScale},max:{height:N.height*p.transformScale,width:N.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Oe.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(Oe),D||(D=!0,h.value.on("resizestart resizemove resizeend",O=>{O.type==="resizemove"?H(O):Y(O)}))}else h.value.resizable({enabled:!1})}return(N,ce)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:b,class:e.normalizeClass(Ce.value),style:e.normalizeStyle(p.style)},[e.renderSlot(N.$slots,"default"),X.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(ke.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ln=typeof window<"u";var al;ln&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nl(n){return n!=null}function ol(){}const Lp=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(Lp)));const Fp=ln&&("ontouchstart"in window||jp()>0),$p=Fp?"pointerdown":"click";function jp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Up(n,r,i=window.Event){const{type:l,bubbles:u=!1,cancelable:s=!1,...y}=r;if(!nl(l)||l==="")return!1;let h;return nl(i)?h=new i(l,{bubbles:u,cancelable:s}):(h=document.createEvent("HTMLEvents"),h.initEvent(l,u,s)),Object.assign(h,y),n.dispatchEvent(h)}const Kp="clickoutside",Wp=new Set;ln&&document.addEventListener($p,n=>{const r=n.target,i=n.composedPath&&n.composedPath();Wp.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&Up(l,{type:Kp})})},!0);const Hp=[["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 Ln;if(ln){for(const n of Hp)if(n[1]in document){Ln=n;break}}e.computed(()=>!1);const qp=new Set,Xp=new WeakMap;if(ln&&Ln){const n=Ln[2],r=Ln[4];document.addEventListener(r,()=>{if(qp.forEach(i=>{i.value=!1}),document[n]){const i=Xp.get(document[n]);i&&(i.value=!0)}},!1)}const nr=new Map;nr.set("x",0);nr.set("y",0);var nn=[],Yp=function(){return nn.some(function(n){return n.activeTargets.length>0})},Gp=function(){return nn.some(function(n){return n.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",Jp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ll}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ll),window.dispatchEvent(n)},Sn;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sn||(Sn={}));var on=function(n){return Object.freeze(n)},Zp=function(){function n(r,i){this.inlineSize=r,this.blockSize=i,on(this)}return n}(),or=function(){function n(r,i,l,u){return this.x=r,this.y=i,this.width=l,this.height=u,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,on(this)}return n.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,u=r.top,s=r.right,y=r.bottom,h=r.left,p=r.width,g=r.height;return{x:i,y:l,top:u,right:s,bottom:y,left:h,width:p,height:g}},n.fromRect=function(r){return new n(r.x,r.y,r.width,r.height)},n}(),wo=function(n){return n instanceof SVGElement&&"getBBox"in n},lr=function(n){if(wo(n)){var r=n.getBBox(),i=r.width,l=r.height;return!i&&!l}var u=n,s=u.offsetWidth,y=u.offsetHeight;return!(s||y||n.getClientRects().length)},rl=function(n){var r;if(n instanceof Element)return!0;var i=(r=n==null?void 0:n.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(i&&n instanceof i.Element)},Qp=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:{},Mn=new WeakMap,il=/auto|scroll/,ef=/^tb|vertical/,tf=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),ba=function(n){return parseFloat(n||"0")},hn=function(n,r,i){return n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=!1),new Zp((i?r:n)||0,(i?n:r)||0)},sl=on({devicePixelContentBoxSize:hn(),borderBoxSize:hn(),contentBoxSize:hn(),contentRect:new or(0,0,0,0)}),rr=function(n,r){if(r===void 0&&(r=!1),Mn.has(n)&&!r)return Mn.get(n);if(lr(n))return Mn.set(n,sl),sl;var i=getComputedStyle(n),l=wo(n)&&n.ownerSVGElement&&n.getBBox(),u=!tf&&i.boxSizing==="border-box",s=ef.test(i.writingMode||""),y=!l&&il.test(i.overflowY||""),h=!l&&il.test(i.overflowX||""),p=l?0:ba(i.paddingTop),g=l?0:ba(i.paddingRight),D=l?0:ba(i.paddingBottom),C=l?0:ba(i.paddingLeft),z=l?0:ba(i.borderTopWidth),j=l?0:ba(i.borderRightWidth),B=l?0:ba(i.borderBottomWidth),Z=l?0:ba(i.borderLeftWidth),F=C+g,L=p+D,$=Z+j,m=z+B,S=h?n.offsetHeight-m-n.clientHeight:0,v=y?n.offsetWidth-$-n.clientWidth:0,T=u?F+$:0,b=u?L+m:0,ie=l?l.width:ba(i.width)-T-v,Be=l?l.height:ba(i.height)-b-S,et=ie+F+v+$,we=Be+L+S+m,Le=on({devicePixelContentBoxSize:hn(Math.round(ie*devicePixelRatio),Math.round(Be*devicePixelRatio),s),borderBoxSize:hn(et,we,s),contentBoxSize:hn(ie,Be,s),contentRect:new or(C,p,ie,Be)});return Mn.set(n,Le),Le},ir=function(n,r,i){var l=rr(n,i),u=l.borderBoxSize,s=l.contentBoxSize,y=l.devicePixelContentBoxSize;switch(r){case Sn.DEVICE_PIXEL_CONTENT_BOX:return y;case Sn.BORDER_BOX:return u;default:return s}},af=function(){function n(r){var i=rr(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=on([i.borderBoxSize]),this.contentBoxSize=on([i.contentBoxSize]),this.devicePixelContentBoxSize=on([i.devicePixelContentBoxSize])}return n}(),sr=function(n){if(lr(n))return 1/0;for(var r=0,i=n.parentNode;i;)r+=1,i=i.parentNode;return r},nf=function(){var n=1/0,r=[];nn.forEach(function(s){if(s.activeTargets.length!==0){var y=[];s.activeTargets.forEach(function(h){var p=new af(h.target),g=sr(h.target);y.push(p),h.lastReportedSize=ir(h.target,h.observedBox),g<n&&(n=g)}),r.push(function(){s.callback.call(s.observer,y,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var i=0,l=r;i<l.length;i++){var u=l[i];u()}return n},cl=function(n){nn.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(sr(i.target)>n?r.activeTargets.push(i):r.skippedTargets.push(i))})})},of=function(){var n=0;for(cl(n);Yp();)n=nf(),cl(n);return Gp()&&Jp(),n>0},co,cr=[],lf=function(){return cr.splice(0).forEach(function(n){return n()})},rf=function(n){if(!co){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return lf()}).observe(i,l),co=function(){i.textContent="".concat(r?r--:r++)}}cr.push(n),co()},sf=function(n){rf(function(){requestAnimationFrame(n)})},Fn=0,cf=function(){return!!Fn},uf=250,df={attributes:!0,characterData:!0,childList:!0,subtree:!0},ul=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(n){return n===void 0&&(n=0),Date.now()+n},uo=!1,pf=function(){function n(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return n.prototype.run=function(r){var i=this;if(r===void 0&&(r=uf),!uo){uo=!0;var l=dl(r);sf(function(){var u=!1;try{u=of()}finally{if(uo=!1,r=l-dl(),!cf())return;u?i.run(1e3):r>0?i.run(r):i.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var r=this,i=function(){return r.observer&&r.observer.observe(document.body,df)};document.body?i():Cn.addEventListener("DOMContentLoaded",i)},n.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ul.forEach(function(i){return Cn.addEventListener(i,r.listener,!0)}))},n.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),ul.forEach(function(i){return Cn.removeEventListener(i,r.listener,!0)}),this.stopped=!0)},n}(),bo=new pf,pl=function(n){!Fn&&n>0&&bo.start(),Fn+=n,!Fn&&bo.stop()},ff=function(n){return!wo(n)&&!Qp(n)&&getComputedStyle(n).display==="inline"},hf=function(){function n(r,i){this.target=r,this.observedBox=i||Sn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var r=ir(this.target,this.observedBox,!0);return ff(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},n}(),vf=function(){function n(r,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=i}return n}(),zn=new WeakMap,fl=function(n,r){for(var i=0;i<n.length;i+=1)if(n[i].target===r)return i;return-1},Rn=function(){function n(){}return n.connect=function(r,i){var l=new vf(r,i);zn.set(r,l)},n.observe=function(r,i,l){var u=zn.get(r),s=u.observationTargets.length===0;fl(u.observationTargets,i)<0&&(s&&nn.push(u),u.observationTargets.push(new hf(i,l&&l.box)),pl(1),bo.schedule())},n.unobserve=function(r,i){var l=zn.get(r),u=fl(l.observationTargets,i),s=l.observationTargets.length===1;u>=0&&(s&&nn.splice(nn.indexOf(l),1),l.observationTargets.splice(u,1),pl(-1))},n.disconnect=function(r){var i=this,l=zn.get(r);l.observationTargets.slice().forEach(function(u){return i.unobserve(r,u.target)}),l.activeTargets.splice(0,l.activeTargets.length)},n}(),mf=function(){function n(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rn.connect(this,r)}return n.prototype.observe=function(r,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rn.observe(this,r,i)},n.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rn.unobserve(this,r)},n.prototype.disconnect=function(){Rn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Yn=new WeakMap;function gf(n){var r;for(let i=0,l=n.length;i<l;++i){const u=n[i],s=Yn.get(u.target);if(typeof s=="function"){const{inlineSize:y,blockSize:h}=((r=u.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:g}=u.target;s(Object.assign(u,{offsetWidth:p,offsetHeight:g,width:y??p,height:h??g}))}}}const ur=new(ln&&window.ResizeObserver||mf)(gf);function hl(n,r){Yn.set(n,r),ur.observe(n)}function vl(n){Yn.has(n)&&(ur.unobserve(n),Yn.delete(n))}function yf(n={}){let r=ol;const i=e.watch(()=>e.unref(n.target),u=>{r(),!(!u||typeof n.onResize!="function")&&(hl(u,n.onResize),r=()=>{vl(u),r=ol})},{immediate:!0}),l=()=>{i(),r()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:hl,unobserveResize:vl,unobserve:l}}const bf=e.ref(!1);e.computed(()=>bf.value);const ml="__theme_style__",po="__theme_observer__",gl=e.reactive(new Map),yl=new Map;e.watch(gl,()=>{if(!ln)return;yl.clear();const n=document.head.querySelector(`#${ml}`);n&&document.head.removeChild(n);const r=document.createElement("style");let i=`.${po} { width: 1px }`,l=1;for(const[u,[s,y]]of gl.entries())i+=` html.${s} .${po}, .${y} .${po} { width: ${++l}px }`,yl.set(l,u);r.textContent=i,r.id=ml,document.head.appendChild(r)});const dr=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:r,emit:i}){const l=n,u=i,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),y=new Map,h=e.ref(l.layout),p=e.ref(),{observeResize:g,unobserveResize:D}=yf(),C=gp();C.on("resizeEvent",z),C.on("dragEvent",j),e.onBeforeMount(()=>{u("layout-before-mount",h.value)}),e.onMounted(()=>{u("layout-mounted",h.value),e.nextTick(()=>{Tp(h.value),s.originalLayout=h.value,e.nextTick(()=>{Be(),p.value&&g(p.value,yp(m,16)),dn(h.value,l.verticalCompact),u("layout-updated",h.value),$(),m()})})}),e.onBeforeUnmount(()=>{C.clearAll(),p.value&&D(p.value)});function z(we,Le,Me,I,Q,G){b(we,Le,Me,I,Q,G)}function j(we,Le,Me,I,Q,G){T(we,Le,Me,I,Q,G)}e.watch(()=>s.width,(we,Le)=>{e.nextTick(()=>{C.emit("updateWidth",we),Le===-1&&e.nextTick(()=>{u("layout-ready",h.value)}),$()})}),e.watch(()=>[l.layout,l.layout.length],()=>{h.value=l.layout,L()}),e.watch(()=>l.colNum,we=>{C.emit("setColNum",we)}),e.watch(()=>l.rowHeight,we=>{C.emit("setRowHeight",we)}),e.watch(()=>l.isDraggable,we=>{C.emit("setDraggable",we)}),e.watch(()=>l.isResizable,we=>{C.emit("setResizable",we)}),e.watch(()=>l.isBounded,we=>{C.emit("setBounded",we)}),e.watch(()=>l.transformScale,we=>{C.emit("setTransformScale",we)}),e.watch(()=>l.responsive,we=>{we||(u("update:layout",s.originalLayout),C.emit("setColNum",l.colNum)),m()}),e.watch(()=>l.maxRows,we=>{C.emit("setMaxRows",we)}),e.watch([()=>l.margin,()=>l.margin[1]],$),e.provide(Yl,e.reactive({...e.toRefs(l),...e.toRefs(s),increaseItem:B,decreaseItem:Z})),e.provide(Gl,C),r({state:s,getItem:F,resizeEvent:b,dragEvent:T,layoutUpdate:L});function B(we){y.set(we.i,we)}function Z(we){y.delete(we.i)}function F(we){return y.get(we)}function L(){if(!da(h.value)&&!da(s.originalLayout)){if(h.value.length!==s.originalLayout.length){const we=et(h.value,s.originalLayout);if(we.length>0)if(h.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(we);else{const Le=new Set(we.map(Me=>Me.i));s.originalLayout=s.originalLayout.filter(Me=>!Le.has(Me.i))}s.lastLayoutLength=h.value.length,Be()}dn(h.value,l.verticalCompact),C.emit("updateWidth",s.width),$(),u("layout-updated",h.value)}}function $(){s.mergedStyle={height:S()}}function m(){p.value&&(s.width=p.value.offsetWidth),C.emit("resizeEvent")}function S(){if(!l.autoSize)return;const we=parseFloat(l.margin[1]);return kp(h.value)*(l.rowHeight+we)+we+"px"}let v;function T(we,Le,Me,I,Q,G){let te=Yo(h.value,Le);da(te)&&(te={h:0,w:0,x:0,y:0,i:""}),we==="dragstart"&&!l.verticalCompact&&(v=h.value.reduce((Re,{i:Qe,x:X,y:R})=>({...Re,[Qe]:{x:X,y:R}}),{})),we==="dragmove"||we==="dragstart"?(s.placeholder.i=Le,s.placeholder.x=te.x,s.placeholder.y=te.y,s.placeholder.w=G,s.placeholder.h=Q,e.nextTick(()=>{s.isDragging=!0}),C.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),h.value=yo(h.value,te,Me,I,!0,l.preventCollision),l.restoreOnDrag?(te.static=!0,dn(h.value,l.verticalCompact,v),te.static=!1):dn(h.value,l.verticalCompact),C.emit("compact"),$(),we==="dragend"&&(v=void 0,u("layout-updated",h.value))}function b(we,Le,Me,I,Q,G){let te=Yo(h.value,Le);da(te)&&(te={h:0,w:0,x:0,y:0,i:""});let Re;if(l.preventCollision){const Qe=Zl(h.value,{...te,w:G,h:Q}).filter(X=>X.i!==te.i);if(Re=Qe.length>0,Re){let X=1/0,R=1/0;Qe.forEach(ue=>{ue.x>te.x&&(X=Math.min(X,ue.x)),ue.y>te.y&&(R=Math.min(R,ue.y))}),Number.isFinite(X)&&(te.w=X-te.x),Number.isFinite(R)&&(te.h=R-te.y)}}Re||(te.w=G,te.h=Q),we==="resizestart"||we==="resizemove"?(s.placeholder.i=Le,s.placeholder.x=Me,s.placeholder.y=I,s.placeholder.w=te.w,s.placeholder.h=te.h,e.nextTick(()=>{s.isDragging=!0}),C.emit("updateWidth",s.width)):we&&e.nextTick(()=>{s.isDragging=!1}),l.responsive&&ie(),dn(h.value,l.verticalCompact),C.emit("compact"),$(),we==="resizeend"&&u("layout-updated",h.value)}function ie(){const we=Ap(l.breakpoints,s.width);if(we===s.lastBreakpoint)return;const Le=tr(we,l.cols);!da(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=go(h.value));const Me=Vp(s.originalLayout,s.layouts,l.breakpoints,we,s.lastBreakpoint,Le,l.verticalCompact);s.layouts[we]=Me,s.lastBreakpoint!==we&&u("breakpoint-changed",we,Me),h.value=Me,u("update:layout",Me),s.lastBreakpoint=we,C.emit("setColNum",Le)}function Be(){s.layouts=Object.assign({},l.responsiveLayouts)}function et(we,Le){const Me=new Set(Le.map(te=>te.i)),I=new Set(we.map(te=>te.i)),Q=we.filter(te=>!Me.has(te.i)),G=Le.filter(te=>!I.has(te.i));return Q.concat(G)}return(we,Le)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[we.$slots.default?e.renderSlot(we.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,Me=>(e.openBlock(),e.createBlock(Xn,e.mergeProps({key:Me.i,ref_for:!0},Me),{default:e.withCtx(()=>[e.renderSlot(we.$slots,"item",{item:Me})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Xn,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.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(r){console.error("vite-plugin-css-injected-by-js",r)}})();const kf={key:0,class:"item-view-group"},xf={key:0,class:"item-view-group"},wf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:r}){const i=E.useModelComp(E.pinia),{isEdit:l}=E.storeToRefs(i),u=r,s=n,y=e.computed(()=>s==null?void 0:s.children),h=e.computed(()=>{var z,j,B,Z;return((z=s==null?void 0:s.children)==null?void 0:z.length)>0&&((j=s==null?void 0:s.children)!=null&&j.every(F=>F==null?void 0:F.layout))?(Z=(B=s==null?void 0:s.children)==null?void 0:B[0])==null?void 0:Z.layout:"vertical"}),p=e.computed(()=>{var z,j;return((j=(z=s==null?void 0:s.children)==null?void 0:z[0])==null?void 0:j.isGridLayout)||!1}),g=e.ref((s==null?void 0:s.level)+1),D=z=>{u("rowClick",z)},C=(z,j)=>{u("routeUrl",z,j)};return(z,j)=>p.value?(e.openBlock(),e.createBlock(e.unref(dr),{key:0,layout:y.value,"onUpdate:layout":j[0]||(j[0]=B=>y.value=B),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(B,Z)=>(e.openBlock(),e.createBlock(e.unref(Xn),{key:B.i,x:B.x,y:B.y,"min-h":B.minH,"max-h":B.maxH,"min-w":B.minW,w:B.w,h:B.h,i:B.i},{default:e.withCtx(()=>{var F,L,$,m,S,v,T,b,ie,Be,et,we,Le;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Z===((F=s==null?void 0:s.children)==null?void 0:F.length)-1?"0px":"24px"})},[(($=(L=B==null?void 0:B.component)==null?void 0:L.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((m=B==null?void 0:B.component)!=null&&m.name)?(e.openBlock(),e.createElementBlock("div",kf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(g.value.toString())-1)*12+"px",fontWeight:600-(g.value-1)*100>=400?600-(g.value-1)*100:400,fontSize:17-g.value>=14?17-g.value+"px":"14px"})},e.toDisplayString((S=B==null?void 0:B.component)==null?void 0:S.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)((v=B==null?void 0:B.component)==null?void 0:v.comp)),{pageLayout:h.value,config:{showIndex:(T=e.unref($t)[Z])==null?void 0:T.showIndex,allowMove:(b=e.unref($t)[Z])==null?void 0:b.allowMove,viewport:(ie=e.unref($t)[Z])==null?void 0:ie.viewport},related:B==null?void 0:B.relatedTables,compName:B==null?void 0:B.component.name,compNames:e.unref(Fl),itemData:(Be=B==null?void 0:B.component)==null?void 0:Be.compData,childItemData:(et=B==null?void 0:B.component)==null?void 0:et.itemChildData,key:e.unref(mn),cacheNewData:e.unref(Ll),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Z,onContentChange:e.unref(Hn),onPageChange:e.unref(qn),parentTableId:(we=B==null?void 0:B.component)==null?void 0:we.tableId,allMapContents:e.unref(mo),children:(Le=B==null?void 0:B.component)==null?void 0:Le.children,level:g.value,onRowClick:D,onRouteUrl:C,onClickTrigger:e.unref($l),onClickMainKey:e.unref(jl)},null,40,["pageLayout","config","related","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(s==null?void 0:s.children,(B,Z)=>{var F,L;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(B==null?void 0:B.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(Z)===((F=s==null?void 0:s.children)==null?void 0:F.length)-1?"0px":"24px"})},[((L=B==null?void 0:B.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&B.name?(e.openBlock(),e.createElementBlock("div",xf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(g.value.toString())>1?"12px":"0px",fontWeight:600-(g.value-1)*100>=400?600-(g.value-1)*100:400,fontSize:17-g.value>=14?17-g.value+"px":"14px"})},e.toDisplayString(B.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)(B.comp)),{compName:B.name,itemData:B==null?void 0:B.compData,related:B==null?void 0:B.relatedTables,childItemData:B==null?void 0:B.itemChildData,key:e.unref(mn),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Z,onContentChange:e.unref(Hn),onPageChange:e.unref(qn),parentTableId:B==null?void 0:B.tableId,allMapContents:e.unref(mo),children:B==null?void 0:B.children,level:g.value,onRowClick:D,onRouteUrl:C},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Df=Lt._export_sfc(wf,[["__scopeId","data-v-a00427c1"]]),pr=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"}]),_f={TABLE:wn.ssTable,FORM:Ro,TABLEOPERATE:ks,TABLESTYLE:zs,TABLEEXTEND:Ps,TABLEINTERACTION:$s,FORMOPERATE:Po,FOLD:gc,CALCULATOR:Dc,METHODBUTTON:Cc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Ro,STEP:Pc,STEPOPERATE:sc,TIMELINE:Kc,TIMELINEOPERATE:hc,FORMTOPOPERATE:Po,SIGNATUREOPERATE:Mc,AVATARUPLOADOPERATE:Bc,TABS:qc,TABSOPERATE:Au,CHART:Hu,CHARTOPERATE:nd,LAYOUT:lp,LAYOUTOPERATE:hp,PARENTITEM:Df};function rn(n){return _f[n==null?void 0:n.toUpperCase()]||null}exports.De=dr;exports._sfc_main=Al;exports.activeStepInfo=pn;exports.affixItems=qd;exports.allMapContents=mo;exports.analyzeForm=dd;exports.analyzeQuoteForm=ud;exports.analyzeSplitToContent=jt;exports.analyzeTable=fd;exports.analyzerStringToArray=od;exports.cacheNewData=Ll;exports.clickMainKey=jl;exports.clickSavePage=Hd;exports.clickStep=Kl;exports.clickTrigger=$l;exports.compId=mn;exports.compNames=Fl;exports.compShow=Un;exports.existLayouts=Gd;exports.generateLayouts=As;exports.getComponent=rn;exports.getComponents=Kn;exports.getSliceContLength=ep;exports.gridRowHeight=Ss;exports.isStepLayout=Wl;exports.onBack=Kd;exports.onChange=Wn;exports.onClick=Wd;exports.onContentChange=Hn;exports.onExtendTaskEnd=Yd;exports.onPageBack=Jd;exports.onPageChange=qn;exports.onSelectFixContent=Ud;exports.renderShowItems=Rl;exports.same=ld;exports.setComponent=zl;exports.showItems=$t;exports.sliceTableLength=Pl;exports.slotContent=pr;exports.ssMenu=jn;exports.st=Xn;exports.stepItems=tp;exports.toolBar=Xd;exports.verifyButton=Zd;