ss-component-new 1.3.76 → 1.3.78

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 (117) hide show
  1. package/dist/{MTLLoader-DYLUvPra.js → MTLLoader-Bkr7rTJW.js} +1 -1
  2. package/dist/{MTLLoader-D1uo8mcW.cjs → MTLLoader-ByAfB26z.cjs} +1 -1
  3. package/dist/{OrbitControls-B4mz4dJ8.cjs → OrbitControls-BcfNtf3a.cjs} +1 -1
  4. package/dist/{OrbitControls-Cd9ZVfIV.js → OrbitControls-goGQ9Lfs.js} +1 -1
  5. package/dist/{URDFLoader-BfRhERaC.js → URDFLoader-d1AzVQ5F.js} +2 -2
  6. package/dist/{URDFLoader-BnH2w4x6.cjs → URDFLoader-nyfij85d.cjs} +1 -1
  7. package/dist/{animationData-CjVloDDN.cjs → animationData-Cew-c11l.cjs} +1 -1
  8. package/dist/{animationData-CO_7EKV4.js → animationData-Sok20fOI.js} +2 -2
  9. package/dist/{array-Xb-5MHCa.js → array-BkHYCyls.js} +45 -45
  10. package/dist/{array-DtmeNOPn.cjs → array-CCxIPliQ.cjs} +1 -1
  11. package/dist/{iconfont-CD3omIZU.js → iconfont-CJoblcL2.js} +2 -2
  12. package/dist/{iconfont-CkpU7gNh.cjs → iconfont-DZ9KiHjj.cjs} +1 -1
  13. package/dist/{index-IYg_iR8H.cjs → index-2B1wHje0.cjs} +1 -1
  14. package/dist/{index-C55GyDvp.js → index-5CdDKPk6.js} +2 -2
  15. package/dist/{index-B_kCqo4M.cjs → index-AHbRUQqE.cjs} +1 -1
  16. package/dist/{index-B-A_4_n_.cjs → index-B7cNKrrU.cjs} +1 -1
  17. package/dist/{index-CFCn1Gpd.cjs → index-BAelm3VG.cjs} +1 -1
  18. package/dist/index-BFvOrU__.cjs +19 -0
  19. package/dist/{index-lz-ekKYh.js → index-BHrQS0PO.js} +1 -1
  20. package/dist/{index-wv1wwLNX.cjs → index-BIbLwf-J.cjs} +1 -1
  21. package/dist/{index-BLqnYCsi.js → index-BPmWhs0O.js} +2 -2
  22. package/dist/{index-pWdzgg-b.cjs → index-BQ5LLLCI.cjs} +1 -1
  23. package/dist/{index-BQEvzo4s.cjs → index-BQWGBLrD.cjs} +1 -1
  24. package/dist/{index-DJg5d7ei.cjs → index-BRPLPxlx.cjs} +1 -1
  25. package/dist/{index-CW-lwsDk.cjs → index-BVh3Ylgt.cjs} +1 -1
  26. package/dist/{index-C5WqP8vL.cjs → index-BZqkclA9.cjs} +1 -1
  27. package/dist/{index-BRyE_Lab.cjs → index-BgKqiFcg.cjs} +1 -1
  28. package/dist/{index-BkipVGFw.js → index-Bj7H-CHU.js} +4 -4
  29. package/dist/{index-DtJC43XK.cjs → index-BysdHzB7.cjs} +1 -1
  30. package/dist/{index-CVCJuzlD.cjs → index-C036vLtM.cjs} +1 -1
  31. package/dist/index-C5pQXH0_.cjs +11 -0
  32. package/dist/{index-C-iUVY59.js → index-CGpIY6jB.js} +2074 -2021
  33. package/dist/{index-DxGZaHuy.js → index-CI8pzqx6.js} +6 -6
  34. package/dist/{index-jiFqoYN9.js → index-CIGrCpB_.js} +8 -8
  35. package/dist/{index-j1S7YTh5.cjs → index-CInkQ8cP.cjs} +1 -1
  36. package/dist/index-CM8Na0Nb.js +12905 -0
  37. package/dist/{index-BrLLsp39.js → index-CNLUhFlr.js} +2 -2
  38. package/dist/{index-Dysx8GkS.js → index-CST5bbhY.js} +3 -3
  39. package/dist/{index-mdJtPr2-.js → index-CWY9HxrG.js} +1 -1
  40. package/dist/{index-DYqVJN3W.js → index-ChiYyt8L.js} +2 -2
  41. package/dist/index-CjCqvZ07.cjs +11 -0
  42. package/dist/index-Cuw9DLEb.cjs +1 -0
  43. package/dist/{index-CI_UVQ4Z.js → index-D0aKEqnU.js} +4 -4
  44. package/dist/{index-5dvr_F6Q.cjs → index-D7GkHVm4.cjs} +1 -1
  45. package/dist/{index-DhSdgyHz.cjs → index-D8DcUSsZ.cjs} +1 -1
  46. package/dist/{index-u7JCx5KX.cjs → index-D8k54p_x.cjs} +1 -1
  47. package/dist/{index-COyNONVE.js → index-D9hditHi.js} +11 -7
  48. package/dist/{index-BFtGkyJf.js → index-DBh4mbmL.js} +3881 -3898
  49. package/dist/{index-DcqWejmU.cjs → index-DHdrBDP4.cjs} +1 -1
  50. package/dist/{index-Cfzc5_ZK.js → index-DLGxv8po.js} +4 -4
  51. package/dist/{index-nlfIt66y.cjs → index-DXxZIqBP.cjs} +1 -1
  52. package/dist/{index-X_HnLtRC.js → index-DaWzSNzm.js} +1 -1
  53. package/dist/{index-BLeSUjbB.js → index-DijK6RWK.js} +4 -4
  54. package/dist/{index-BulgFj9c.cjs → index-DilZmA-l.cjs} +1 -1
  55. package/dist/{index-B_uWA5AJ.js → index-Dld88iXe.js} +1 -1
  56. package/dist/{index-CeXyg5Rl.cjs → index-Dlob1bxY.cjs} +1 -1
  57. package/dist/{index-0HSo1RHX.js → index-DmeZpSGM.js} +5 -5
  58. package/dist/{index-CMdeEau9.js → index-DnMPqjrX.js} +4 -4
  59. package/dist/{index-DPjDv9Ws.cjs → index-DsymuEzu.cjs} +13 -13
  60. package/dist/{index-B5i-XCGU.js → index-Dyhg1YNv.js} +1 -1
  61. package/dist/{index-C3gtImRs.js → index-EtZh1qtq.js} +2 -2
  62. package/dist/{index-ChBgkXqb.js → index-G0nsjixB.js} +8 -8
  63. package/dist/{index-BYyFrGfX.js → index-JAXzKk2F.js} +1 -1
  64. package/dist/{index-jkHlUTog.js → index-K1n-pA4G.js} +2545 -2616
  65. package/dist/index-KEXDCkKc.js +8139 -0
  66. package/dist/{index-B-nrai8J.cjs → index-M_FLMoBh.cjs} +1 -1
  67. package/dist/index-TvWbGp-2.cjs +1 -0
  68. package/dist/{index-sHmgudEg.js → index-XSETNP_T.js} +1 -1
  69. package/dist/{index-D03MbrNK.cjs → index-cKFeu5XW.cjs} +1 -1
  70. package/dist/{index-CAD9KqHl.cjs → index-eUZKu-7F.cjs} +1 -1
  71. package/dist/{index-BfOeLrc4.cjs → index-fwa9LBX5.cjs} +1 -1
  72. package/dist/{index-vURW-4ky.js → index-oJEY_fSN.js} +12 -12
  73. package/dist/{index--D0Thf0J.js → index-rCV_Ea-P.js} +1 -1
  74. package/dist/{index-DMfz6Qrm.js → index-t9jd4l9Q.js} +2 -2
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs} +49 -49
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CU0erI7U.js → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-DljCMBcU.js} +2076 -2071
  77. package/dist/{index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs → index.vue_vue_type_style_index_1_lang-D9kYnXoD.cjs} +1 -1
  78. package/dist/{index.vue_vue_type_style_index_1_lang-CCQPqKHr.js → index.vue_vue_type_style_index_1_lang-DDUoM--M.js} +5 -5
  79. package/dist/{isString-DhPkQDQg.cjs → isString-Cdf6R00a.cjs} +1 -1
  80. package/dist/{isString-Bn5VcA2n.js → isString-D4Yi9bDE.js} +1 -1
  81. package/dist/{main-j2YKSWX-.cjs → main-DDI-kRzh.cjs} +3 -3
  82. package/dist/{main-BLk4Mfi1.js → main-DKugsEJQ.js} +4 -4
  83. package/dist/{menuIndex-D332F0dw.cjs → menuIndex-BVHXKOLk.cjs} +1 -1
  84. package/dist/{menuIndex-BJ1CSzli.js → menuIndex-BvSKgV5f.js} +1 -1
  85. package/dist/obj/model.mtl +42 -0
  86. package/dist/obj/model.obj +26110 -0
  87. package/dist/ss-component.cjs +1 -1
  88. package/dist/ss-component.css +2 -2
  89. package/dist/ss-component.js +11 -11
  90. package/dist/ss-component2.cjs +1 -1
  91. package/dist/ss-component2.js +13 -13
  92. package/dist/{threeModel-C3N_ghfY.cjs → threeModel-BC_JZ1RV.cjs} +1 -1
  93. package/dist/{threeModel-v33sxEBl.js → threeModel-BwWSWObs.js} +6 -6
  94. package/dist/{threePreview-DNw547cG.js → threePreview-CfyAicAQ.js} +5 -5
  95. package/dist/{threePreview-Dif-1kRY.cjs → threePreview-mSNaLCWp.cjs} +1 -1
  96. package/dist/{threeSceneView-iXMcW_Z9.cjs → threeSceneView-66dCWgEi.cjs} +1 -1
  97. package/dist/{threeSceneView-BkGy9bnz.js → threeSceneView-Dbr2KLMM.js} +11 -11
  98. package/dist/{threeSceneViewForCPMPIP-Bjimwk9q.cjs → threeSceneViewForCPMPIP-BzMYLFuK.cjs} +1 -1
  99. package/dist/{threeSceneViewForCPMPIP-qP-6IJzE.js → threeSceneViewForCPMPIP-tPswynXd.js} +9 -9
  100. package/dist/{threeTrackPathView-Cqrx2pEK.cjs → threeTrackPathView-C65T-bEd.cjs} +1 -1
  101. package/dist/{threeTrackPathView-wK0hwn3B.js → threeTrackPathView-CZt3mY2y.js} +6 -6
  102. package/dist/{threeViewerHost-B2fHt8c2.js → threeViewerHost-D2qSyCw-.js} +3 -3
  103. package/dist/{threeViewerHost-RuZpxQGN.cjs → threeViewerHost-DtuM2v2G.cjs} +1 -1
  104. package/dist/{urdfTree-i-8eGN0m.js → urdfTree-BCj0sPXo.js} +1 -1
  105. package/dist/{urdfTree-CnVw_qic.cjs → urdfTree-UVAVh9q0.cjs} +1 -1
  106. package/dist/{workpieceTreePanel-auNIy7t8.cjs → workpieceTreePanel-BtxWzOMx.cjs} +1 -1
  107. package/dist/{workpieceTreePanel-Cy1eCrLl.js → workpieceTreePanel-CrpY18jo.js} +4 -4
  108. package/package.json +1 -1
  109. package/public/obj/model.mtl +42 -0
  110. package/public/obj/model.obj +26110 -0
  111. package/dist/index-BGuyjj26.cjs +0 -1
  112. package/dist/index-CLTriF5O.cjs +0 -11
  113. package/dist/index-CSUpvfmH.js +0 -12750
  114. package/dist/index-CcJb2uXu.js +0 -8191
  115. package/dist/index-DbFGGKSI.cjs +0 -1
  116. package/dist/index-Dc6Q0f3F.cjs +0 -11
  117. package/dist/index-HCKkRTvn.cjs +0 -19
@@ -1,11 +0,0 @@
1
- "use strict";const oa=require("./index-HCKkRTvn.cjs"),e=require("vue"),C=require("./index-BfOeLrc4.cjs"),Nt=require("./index-DPjDv9Ws.cjs"),ct=require("./index-Dc6Q0f3F.cjs"),Oe=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs"),Gt=require("./index-CAD9KqHl.cjs"),No=require("./threeViewerHost-RuZpxQGN.cjs");require("./index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs");const Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-DhPkQDQg.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-IYg_iR8H.cjs"),bl=require("./index-BVaHwt5f.cjs"),Hr=require("./index-j1S7YTh5.cjs"),Ba=require("./index-BGuyjj26.cjs"),qr=require("./index-BpPyaNFa.cjs"),Xr=require("vue-router"),wn=require("./index-9hspBVrQ.cjs"),Yr=require("./menuIndex-D332F0dw.cjs"),to=require("./index-DhSdgyHz.cjs");var Gr=/\s/;function Jr(n){for(var r=n.length;r--&&Gr.test(n.charAt(r)););return r}var Zr=/^\s+/;function Qr(n){return n&&n.slice(0,Jr(n)+1).replace(Zr,"")}var Mo=NaN,ei=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ai=/^0o[0-7]+$/i,ni=parseInt;function zo(n){if(typeof n=="number")return n;if(ct.isSymbol(n))return Mo;if(ct.isObject(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=ct.isObject(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=Qr(n);var i=ti.test(n);return i||ai.test(n)?ni(n.slice(2),i?2:8):ei.test(n)?Mo:+n}var ao=function(){return ct.root.Date.now()},oi="Expected a function",li=Math.max,ri=Math.min;function kl(n,r,i){var l,u,s,g,h,p,y=0,D=!1,E=!1,V=!0;if(typeof n!="function")throw new TypeError(oi);r=zo(r)||0,ct.isObject(i)&&(D=!!i.leading,E="maxWait"in i,s=E?li(zo(i.maxWait)||0,r):s,V="trailing"in i?!!i.trailing:V);function j(T){var b=l,ie=u;return l=u=void 0,y=T,g=n.apply(ie,b),g}function B(T){return y=T,h=setTimeout(P,r),D?j(T):g}function Q(T){var b=T-p,ie=T-y,Be=r-b;return E?ri(Be,s-ie):Be}function L(T){var b=T-p,ie=T-y;return p===void 0||b>=r||b<0||E&&ie>=s}function P(){var T=ao();if(L(T))return F(T);h=setTimeout(P,Q(T))}function F(T){return h=void 0,V&&l?j(T):(l=u=void 0,g)}function m(){h!==void 0&&clearTimeout(h),y=0,l=p=u=h=void 0}function S(){return h===void 0?g:F(ao())}function v(){var T=ao(),b=L(T);if(l=arguments,u=this,p=T,b){if(h===void 0)return B(p);if(E)return clearTimeout(h),h=setTimeout(P,r),j(p)}return h===void 0&&(h=setTimeout(P,r)),g}return v.cancel=m,v.flush=S,v}var ii="[object Boolean]";function xl(n){return n===!0||n===!1||ct.isObjectLike(n)&&ct.baseGetTag(n)==ii}function si(n){return n===void 0}const ci={class:"statistics-cards-container"},ui={class:"statistics-label"},di={class:"statistics-value"},pi=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(n){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ci,[(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",ui,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",di,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),fi=Pt._export_sfc(pi,[["__scopeId","data-v-f54ed8af"]]),hi={class:"static-form-card"},vi={key:0,class:"static-form-body"},mi={class:"static-form-label"},gi={class:"static-form-value"},yi={key:1},bi={key:1,class:"static-form-empty"},ki=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},compName:{default:""},title:{default:""}},setup(n){const r=n,i=u=>{switch(u){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},l=e.computed(()=>{var g;const u=(g=r.itemData)==null?void 0:g.find(h=>(h==null?void 0:h.key)==="formContent");return((u==null?void 0:u.contents)||[]).filter(h=>!(h!=null&&h.isFormColHidden)&&(h==null?void 0:h.label)).map(h=>{let p=h==null?void 0:h.value;Array.isArray(p)&&(p=p.map(V=>V==null?"":typeof V=="object"?V.label??V.value??V.name??JSON.stringify(V):String(V)).filter(Boolean).join(",")),p!=null&&typeof p=="object"&&(p=p.label??p.value??p.name??JSON.stringify(p));const y=h.label??"",D=p??"",E=y==="使用状态";return{label:y,value:D,isStatus:E,tagType:E?i(D):""}})});return(u,s)=>{const g=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",hi,[l.value.length?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"static-form-item"},[e.createElementVNode("div",mi,e.toDisplayString(h.label)+": ",1),e.createElementVNode("div",gi,[h.isStatus?(e.openBlock(),e.createBlock(g,{key:0,type:h.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",yi,e.toDisplayString(h.value??"-"),1))])]))),128))])):(e.openBlock(),e.createElementBlock("div",bi," 暂无数据 "))])}}}),wl=Pt._export_sfc(ki,[["__scopeId","data-v-d92a85c0"]]),xi={class:"form-content"},wi={title:"选择标签"},Di={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},_i={class:"col-operate-wrap"},Ei={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Ci={__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=()=>{g.value=!1,h.value=!1,p.value=[]},l=n;e.computed(()=>{var X;const U=(X=z.value)==null?void 0:X.split("/");return(U==null?void 0:U.some(De=>(De==null?void 0:De.includes("updateLoading"))||(De==null?void 0:De.includes("loading"))))?!1:I.value==="view"});const u=r,s=e.ref([]),g=e.ref(!1),h=e.ref(!1),p=e.ref([]),{getFileExtension:y}=No.useThreeSystem(),D=e.ref(),E=e.ref(!1),V=e.ref(!1),j=Oe.useUnit(C.pinia),{chooseTitle:B}=C.storeToRefs(j),Q=e.ref([]),L=e.ref(),P=e.ref(!1),F=e.ref([]),m=oa.useFormToTableComp(C.pinia),S=oa.useFormComp(C.pinia),v=e.ref(!1),T=e.ref(),b=C.useLoginState(C.pinia),{loginUserInfo:ie}=C.storeToRefs(b),Be=e.ref(),Qe=e.ref(!0),ke=C.useModelComp(C.pinia),{tableViewContents:Pe,itemData:ze,isEdit:I,routeToChildPath:ee,lockingPage:Z}=C.storeToRefs(ke),te=e.ref(null),Re=e.ref(!1),Ze=e.ref(!1),G=C.useMenuState(),{activeMenuPath:z}=C.storeToRefs(G),ce=Oe.useOriginalState(C.pinia),{originalPath:ge}=C.storeToRefs(ce),Ee=e.computed(()=>z.value==="设备管理/试验设备"&&l.compName==="设备概要"),be=e.ref([]),Le=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Y=async U=>{Ze.value=U,await ne("disabled",null,U,!0)},J=async U=>{await ne("operable",null,U,!0)};e.watch(()=>z.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const k=()=>{e.nextTick(()=>{ue()})},ye=U=>{var W;s.value=(W=s.value)==null?void 0:W.map(X=>({...X,isFormColHidden:!(U!=null&&U.includes(X.label))}))};e.onUnmounted(()=>{te.value=null});const Ie=U=>{u("clickTrigger",U)},we=async U=>{var W,X,De,he,H,fe;if(U===""){let re="";(W=s.value)==null||W.forEach($=>{$!=null&&$.isMain&&(re=$==null?void 0:$.value)});let Ae=await Oe.getItemData(ee.value,sessionStorage.getItem("systemKey"),"");re=((fe=(H=(he=(De=(X=Ae==null?void 0:Ae[0])==null?void 0:X.compData)==null?void 0:De.find($=>($==null?void 0:$.key)==="mainRouters"))==null?void 0:he.contents)==null?void 0:H[0])==null?void 0:fe.routerContent)+ge.value+re;let Te=await Oe.getItemData(re,sessionStorage.getItem("systemKey"),"");P.value=!0,F.value=Te==null?void 0:Te.filter($=>($==null?void 0:$.comp)!=="methodButton"),u("routeUrl",F.value)}},ue=()=>{var W;const U=(W=te.value)==null?void 0:W.$el;U&&Oe.Sortable.create(U,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:X=>{const{oldIndex:De,newIndex:he}=X;if(De===he)return;const H=s.value.splice(De,1)[0];s.value.splice(he,0,H)}})},ne=async(U,W,X,De=!1)=>{try{ke.setRefreshCurStructure(!1)}catch{ct.ElMessage.error("编辑处理失败")}},de=async(U,W)=>{await ne()},Ce=async(U,W)=>{U&&await ne()},Ge=async(U,W,X)=>{await ne(W,X,U,!1)},dt=(U,W)=>{Be.value===W?Qe.value=!1:Qe.value=!0,Be.value=W==null?void 0:W.changeProp},x=async U=>{var X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve,We,st,Ye;let W=[];if((X=U==null?void 0:U.toString())!=null&&X.includes(".urdf")){if(U.includes(",")){ct.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:U,extension:y(U)}],h.value=!0,g.value=!0;return}if((De=U==null?void 0:U.toString())!=null&&De.includes(".stl")||(he=U==null?void 0:U.toString())!=null&&he.includes(".STL")||(H=U==null?void 0:U.toString())!=null&&H.includes(".obj")||(fe=U==null?void 0:U.toString())!=null&&fe.includes(".mtl")){const Ne=((re=U==null?void 0:U.toString())==null?void 0:re.split(",")).map(pt=>({url:pt,extension:y(pt)}));p.value=Ne,h.value=!1,g.value=!0;return}if((Ae=U==null?void 0:U.toString())!=null&&Ae.includes(".stl")||(pe=U==null?void 0:U.toString())!=null&&pe.includes(".STL")||(Te=U==null?void 0:U.toString())!=null&&Te.includes(".obj")||($=U==null?void 0:U.toString())!=null&&$.includes(".mtl")){let tt,Ne=[],pt={};if(Array.isArray(U)?tt=U:tt=U==null?void 0:U.split(","),tt==null||tt.forEach(Je=>{Je.includes(".mtl")?Ne.push(Je):pt.blob=pt.blob?pt.blob+","+Je:Je}),(Ne==null?void 0:Ne.length)>0&&(pt.mtlBlobs=Ne),(ve=(Ve=Object.values(pt))==null?void 0:Ve[0])!=null&&ve.includes("http:"))W.push(pt);else{const Je=new Blob([pt.blob],{type:"application/octet-stream;charset=UTF-8"});let $e=URL.createObjectURL(Je),rt="";(We=U==null?void 0:U.split("/"))==null||We.forEach((mt,wt)=>{var He;wt===((He=U==null?void 0:U.split("/"))==null?void 0:He.length)-1&&(rt=mt)}),(st=pt.blob)!=null&&st.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),L.value=[{name:rt,blobUrl:$e}],V.value=!0}}else{const tt=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ne=await ct.axios.get(U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{tt.close()}),pt=new Blob([Ne.data],{type:"application/octet-stream;charset=UTF-8"});let Je=URL.createObjectURL(pt),$e="";(Ye=U==null?void 0:U.split("/"))==null||Ye.forEach((rt,mt)=>{var wt;mt===((wt=U==null?void 0:U.split("/"))==null?void 0:wt.length)-1&&($e=rt)}),L.value=[{name:$e,blobUrl:Je}],V.value=!0}(W==null?void 0:W.length)>0&&S.setBlobUrls(W)},A=()=>{V.value=!1},q=U=>{var H,fe,re,Ae;const W=(fe=(H=C.cloneDeep(l.itemData))==null?void 0:H.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:fe.contents,X=C.cloneDeep(U.content);let De={};X&&((re=Object.values(X))==null?void 0:re.length)>0&&((Ae=Object.values(X))==null||Ae.forEach((pe,Te)=>{De[W[Te].key]=pe}));const he={content:De,index:l==null?void 0:l.index,buttonName:U==null?void 0:U.buttonName};u("change",he)},oe=e.computed(()=>"http://222.92.178.198:62001"),N=async U=>{var Ve,ve,We,st,Ye,tt,Ne,pt,Je,$e,rt,mt,wt,He,ot,yt;if(!U)return;(ve=(Ve=l==null?void 0:l.itemData)==null?void 0:Ve.find(je=>(je==null?void 0:je.key)==="parentFormPath"))==null||ve.contents;let W=Pe.value;(W==null?void 0:W.length)>0&&(W=W==null?void 0:W.map(je=>{var Xe,Se,M,me;let Ke=(Xe=je==null?void 0:je.key)==null?void 0:Xe.split("/");return(l==null?void 0:l.compName)===(Ke==null?void 0:Ke[0])&&(Se=s.value)!=null&&Se.find(xe=>(xe==null?void 0:xe.prop)===(Ke==null?void 0:Ke[1]))&&(je.value=(me=(M=s.value)==null?void 0:M.find(xe=>(xe==null?void 0:xe.prop)===(Ke==null?void 0:Ke[1])))==null?void 0:me.value),je}),ke.setTableViewContents(W));const X=C.cloneDeep(l.itemData);let De=X==null?void 0:X.map(je=>{var Ke;return(je==null?void 0:je.key)==="formContent"&&((Ke=je.contents)==null||Ke.map((Xe,Se)=>{var M,me,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt,Rt,Kt,Ht,Jt,ta;return Xe.type=(me=(M=s.value)==null?void 0:M.find(Ft=>(Ft==null?void 0:Ft.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:me.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((et=(at=(xe=Xe==null?void 0:Xe.key)==null?void 0:xe.split("$"))==null?void 0:at[1])==null?void 0:et.length)>0?(ft=(ut=oa.formGetOptions((_t=(Et=Xe==null?void 0:Xe.key)==null?void 0:Et.split("$"))==null?void 0:_t[1]))==null?void 0:ut.split(","))==null?void 0:ft.map(Ft=>({label:Ft,value:Ft})):[],(vt=Xe==null?void 0:Xe.key)!=null&&vt.includes("$")&&(Xe.key=(Lt=(gt=Xe==null?void 0:Xe.key)==null?void 0:gt.split("$"))==null?void 0:Lt[0]),Xe.signature=(zt=(bt=s.value)==null?void 0:bt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:zt.signature,Xe.isLoginUser=(Kt=(Rt=s.value)==null?void 0:Rt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Kt.isLoginUser,Xe.value=(Ht=Object.values(U))==null?void 0:Ht[Se],Xe.isFormColHidden=(ta=(Jt=s.value)==null?void 0:Jt.find(Ft=>(Ft==null?void 0:Ft.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ta.isFormColHidden,Xe})),je}),he=s.value,H=(st=(We=C.cloneDeep(De))==null?void 0:We.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:st.contents;if(he=he==null?void 0:he.map(je=>{var Ke;return je.value=(Ke=H==null?void 0:H.find((Xe,Se)=>((Xe==null?void 0:Xe.id)??Se)===(je==null?void 0:je.id)))==null?void 0:Ke.value,je}),!Qe.value){u("contentChange",{contents:De,index:l.index});return}let fe="",re=(Ne=(tt=(Ye=C.cloneDeep(De))==null?void 0:Ye.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ne.find((je,Ke)=>{var Xe,Se,M;return(je==null?void 0:je.label)===Be.value||Ke.toString()===((M=(Se=(Xe=Be.value)==null?void 0:Xe.split("t"))==null?void 0:Se[1])==null?void 0:M.toString())}),Ae=(pt=re==null?void 0:re.optionUrl)==null?void 0:pt.menuSelect,pe=!0;if((rt=($e=(Je=C.cloneDeep(De))==null?void 0:Je.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:$e.contents)==null||rt.forEach(je=>{var Ke,Xe,Se,M,me,xe;pe&&((Se=(Xe=(Ke=je==null?void 0:je.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:Xe[1])!=null&&Se.includes("["))&&(fe=(me=(M=je==null?void 0:je.optionUrl)==null?void 0:M.groupSelect)==null?void 0:me[1],JSON.stringify(Ae)===JSON.stringify((xe=je==null?void 0:je.optionUrl)==null?void 0:xe.menuSelect)&&(pe=!1))}),(mt=re==null?void 0:re.optionUrl)!=null&&mt.menuSelect&&Qe.value){let je=await oa.getSelectRow(re),Ke,Xe=(wt=re==null?void 0:re.optionUrl)==null?void 0:wt.menuSelect;if(je==null||je.forEach(Se=>{var M,me,xe,at,et,Et,_t,ut,ft,vt;fe===((me=(M=re==null?void 0:re.optionUrl)==null?void 0:M.groupSelect)==null?void 0:me[1])&&((et=(at=(xe=re==null?void 0:re.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:at[1])!=null&&et.includes("["))&&((vt=C.cloneDeep(Se))==null?void 0:vt[(ft=(ut=(_t=(Et=re==null?void 0:re.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:_t[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:ft.replaceAll("]","")])===(re==null?void 0:re.value)&&(Ke=Se)}),Ke){let Se=C.cloneDeep(he);Se=Se==null?void 0:Se.map(me=>{var xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt;return(Ke!=null&&Ke[me==null?void 0:me.label]||Ke!=null&&Ke[(Et=(et=(at=(xe=me==null?void 0:me.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:at[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Et.replaceAll("]","")])&&((ft=(ut=(_t=me==null?void 0:me.optionUrl)==null?void 0:_t.groupSelect)==null?void 0:ut[1])!=null&&ft.includes("["))&&Xe!=null&&Xe.every(zt=>{var Rt,Kt;return(Kt=(Rt=me==null?void 0:me.optionUrl)==null?void 0:Rt.menuSelect)==null?void 0:Kt.includes(zt)})&&(me.value=(Ke==null?void 0:Ke[me==null?void 0:me.label])||(Ke==null?void 0:Ke[(bt=(Lt=(gt=(vt=me==null?void 0:me.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:gt[1])==null?void 0:Lt.replaceAll("[",""))==null?void 0:bt.replaceAll("]","")]),Array.isArray(me.value)&&me.value.every(zt=>(zt==null?void 0:zt.url)&&(zt==null?void 0:zt.name))&&(me.type="Upload")),me}),Se=Se==null?void 0:Se.map(me=>{var xe,at,et;return(xe=me==null?void 0:me.optionUrl)!=null&&xe.oldMenuSelect&&(me.optionUrl.menuSelect=(et=(at=C.cloneDeep(me))==null?void 0:at.optionUrl)==null?void 0:et.oldMenuSelect),me}),s.value=C.cloneDeep(Se);let M=C.cloneDeep(Se);M=M==null?void 0:M.map(me=>{var xe,at,et,Et,_t,ut;return(at=(xe=me==null?void 0:me.optionUrl)==null?void 0:xe.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))&&(me.optionUrl.oldMenuSelect=(Et=(et=C.cloneDeep(me))==null?void 0:et.optionUrl)==null?void 0:Et.menuSelect,me.optionUrl.menuSelect=(ut=(_t=me==null?void 0:me.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:ut.map(ft=>{var vt,gt,Lt,bt;if(ft!=null&&ft.includes("[")){let zt=(gt=(vt=ft==null?void 0:ft.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:gt[1];ft=(bt=(Lt=C.cloneDeep(Se))==null?void 0:Lt.find(Rt=>(Rt==null?void 0:Rt.label)===zt))==null?void 0:bt.value}return ft})),me}),s.value=M}else s.value=he;De=De==null?void 0:De.map(Se=>{var M;return(Se==null?void 0:Se.key)==="formContent"&&(Se.contents=(M=Se.contents)==null?void 0:M.map(me=>{var xe,at,et,Et;return me.value=((at=(xe=s.value)==null?void 0:xe.find(_t=>(_t==null?void 0:_t.label)===(me==null?void 0:me.key)))==null?void 0:at.value)??(me==null?void 0:me.value),me.type=((Et=(et=s.value)==null?void 0:et.find(_t=>(_t==null?void 0:_t.prop)===(me==null?void 0:me.key)))==null?void 0:Et.type)??(me==null?void 0:me.type),me})),Se})}Qe.value=!1,u("contentChange",{contents:De,index:l.index});let Te=[],$=[];if((ot=C.cloneDeep((He=De==null?void 0:De.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:He.contents))==null||ot.forEach(je=>{var Ke;Array.isArray(je==null?void 0:je.value)&&((Ke=je==null?void 0:je.value)!=null&&Ke.find(Xe=>{var Se;return(Se=Xe==null?void 0:Xe.url)==null?void 0:Se.includes(".obj")}))&&($=je==null?void 0:je.value)}),($==null?void 0:$.length)>0){const je=(yt=C.cloneDeep($))==null?void 0:yt.filter(Ke=>{var Xe;return(Xe=Ke==null?void 0:Ke.url)==null?void 0:Xe.includes(".obj")});je==null||je.forEach(Ke=>{var Se,M,me,xe;const Xe=(Se=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Se.map(at=>at==null?void 0:at.url);Te.push({objUrl:Ke==null?void 0:Ke.url,mtlUrls:((M=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:M.length)===1?(xe=(me=$==null?void 0:$.filter(at=>{var et;return(at==null?void 0:at.name)===(Ke==null?void 0:Ke.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:me[0])==null?void 0:xe.url:Xe})}),S.setObjUrl(Te)}},se=U=>{if(!U)return;const W=[];let X="";for(let De of U)(De.includes("[")||X.includes("["))&&(X+=De.trim(),C.cloneDeep(X).split("【").length-1===C.cloneDeep(X).split("】").length-1&&C.cloneDeep(X).split("[").length-1===C.cloneDeep(X).split("]").length-1&&(W.push(X.replace(/\/\*[\s\S]*?\*\//g,"")),X=""));return W},Me=(U,W,X)=>{let De="";const he=W==null?void 0:W.map(H=>{var fe;return(fe=H==null?void 0:H.value)==null?void 0:fe.pageData});return he==null||he.forEach(H=>{var fe;(H==null?void 0:H.name)===(U==null?void 0:U[0])&&((fe=H==null?void 0:H.compData)==null||fe.forEach(re=>{var Ae;(re==null?void 0:re.key)==="formContent"&&((Ae=re==null?void 0:re.contents)==null||Ae.forEach(pe=>{var Te;(pe==null?void 0:pe.prop)===(U==null?void 0:U[1])&&(De=(pe==null?void 0:pe.value)===""?Oe.judgeContents((Te=C.cloneDeep(pe))==null?void 0:Te.optionUrl,X):pe==null?void 0:pe.value)}))}))}),De},le=(U,W,X,De)=>{var re,Ae;let he="",H="";(re=C.cloneDeep(W))==null||re.forEach((pe,Te)=>{pe!=null&&pe.includes("[")?H=H+ge.value+U[Te]:H=H===""?H+pe:H+"/"+pe});let fe=(Ae=De[H])==null?void 0:Ae.map(pe=>{var Te;return(Te=pe==null?void 0:pe.value)==null?void 0:Te.pageData});return fe==null||fe.forEach(pe=>{var Te;(pe==null?void 0:pe.name)===(X==null?void 0:X[0])&&((Te=pe==null?void 0:pe.compData)==null||Te.forEach($=>{var Ve;($==null?void 0:$.key)==="formContent"&&((Ve=$==null?void 0:$.contents)==null||Ve.forEach(ve=>{(ve==null?void 0:ve.prop)===(X==null?void 0:X[1])&&(he=ve==null?void 0:ve.value)}))}))}),he};return e.watch(()=>l.itemData,async()=>{var fe,re,Ae,pe,Te,$,Ve,ve,We,st,Ye,tt,Ne,pt,Je,$e,rt,mt,wt;const U=(fe=l.itemData)==null?void 0:fe.find(He=>(He==null?void 0:He.key)==="formContent"),W=(re=C.cloneDeep(l.itemData))==null?void 0:re.find(He=>(He==null?void 0:He.key)==="formButton"),X=(Ae=C.cloneDeep(l.itemData))==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formFlex"),De=(pe=C.cloneDeep(l.itemData))==null?void 0:pe.find(He=>(He==null?void 0:He.key)==="formWrap"),he=(Te=C.cloneDeep(l.itemData))==null?void 0:Te.find(He=>(He==null?void 0:He.key)==="enableWrap");if((De==null?void 0:De.contents)==="纵向"?E.value=!1:E.value=!0,v.value=(he==null?void 0:he.contents)===void 0?!1:he==null?void 0:he.contents,T.value=typeof(X==null?void 0:X.contents)!="boolean"?!(!(X!=null&&X.contents)===""||(($=X==null?void 0:X.contents)==null?void 0:$.toUpperCase())==="VERTICAL"):X==null?void 0:X.contents,((Ve=U==null?void 0:U.contents)==null?void 0:Ve.length)>0&&Array.isArray(U==null?void 0:U.contents)){let He=l.allMapContents;const ot=(We=(ve=C.cloneDeep(U))==null?void 0:ve.contents)==null?void 0:We.map((M,me)=>{var zt,Rt,Kt,Ht,Jt,ta,Ft,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma;let xe=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",at=(M==null?void 0:M.type)??"",et=(M==null?void 0:M.options)??[];if((zt=M==null?void 0:M.key)!=null&&zt.includes("$")&&(xe=(Rt=C.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Rt[0],((Ht=(Kt=C.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Kt[1])==null?void 0:Ht.length)>0)){const[Ct,aa]=(ta=(Jt=C.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Jt[1])==null?void 0:ta.split(/[()]/);at=((Ft=Oe.FormType.find(nt=>(nt==null?void 0:nt.key)===Ct))==null?void 0:Ft.value)??"",((Fa=aa==null?void 0:aa.split(","))==null?void 0:Fa.length)>0&&(et=(wa=aa==null?void 0:aa.split(","))==null?void 0:wa.map(nt=>({label:nt,value:nt})))}let Et=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Et=(Da=(ja=M==null?void 0:M.contents)==null?void 0:ja.split(","))==null?void 0:Da.map(Ct=>({label:Ct,value:Ct}))),((Ua=M==null?void 0:M.optionUrl)==null?void 0:Ua.selectRelateType)==="自定义绑定"&&(Et=(Wa=(Ka=M==null?void 0:M.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Wa.map(Ct=>({label:Ct,value:Ct})));let _t=!1,ut=(M==null?void 0:M.isFormColHidden)??!1,ft=Oe.judgeContents((Ha=C.cloneDeep(M))==null?void 0:Ha.optionUrl,He),vt=ft!==void 0&&ft!==""?ft:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(et==null?void 0:et.length)>0?(qa=et==null?void 0:et[0])==null?void 0:qa.value:(M==null?void 0:M.value)??"",gt=!1,Lt=ft!==void 0||at===""?"Input":at;if((Array.isArray(ft)&&(ft!=null&&ft.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&(Lt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||M!=null&&M.isLoginUser)_t=!0,vt=((Na=ie.value)==null?void 0:Na.姓名)||((ya=ie.value)==null?void 0:ya.account)||((fa=ie.value)==null?void 0:fa.账号)||((_a=ie.value)==null?void 0:_a.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(gt=!0,(M==null?void 0:M.isShow)==="originalSignature")Lt="image",vt=oe.value+"/"+((ba=ie.value)==null?void 0:ba.signature);else{let Ct=[...new Set(se(M.isShow))].map(St=>{var It,Mt,$t,At;return{key:(At=($t=(Mt=(It=St==null?void 0:St.split("["))==null?void 0:It[1])==null?void 0:Mt.split("]"))==null?void 0:$t[0])==null?void 0:At.split(":"),value:""}});(ca=ze.value)==null||ca.forEach(St=>{Ct==null||Ct.forEach((Dt,It)=>{var $t;let Mt=Dt==null?void 0:Dt.key;(St==null?void 0:St.name)===(Mt==null?void 0:Mt[0].replaceAll("'",""))&&(($t=St==null?void 0:St.compData)==null||$t.forEach(At=>{var na;(At==null?void 0:At.key)==="formContent"&&((na=At==null?void 0:At.contents)==null||na.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Mt==null?void 0:Mt[1].replaceAll("'",""))&&(Ct[It].value=Yt==null?void 0:Yt.value)}))}))})});let aa=Ct==null?void 0:Ct.map(St=>{var Dt;return St.key="["+((Dt=St.key)==null?void 0:Dt.join(":"))+"]",St}),nt=M==null?void 0:M.isShow;aa==null||aa.forEach(St=>{St!=null&&St.value?nt=nt.replaceAll(St==null?void 0:St.key,"'"+(St==null?void 0:St.value)+"'"):nt=nt.replaceAll(St==null?void 0:St.key,"undefined")}),nt!=null&&nt.includes("(")||(nt!=null&&nt.includes("==")?nt=((ma=nt==null?void 0:nt.split("==="))==null?void 0:ma[0])+"==='"+((Xa=nt==null?void 0:nt.split("==="))==null?void 0:Xa[1])+"'":nt=((Aa=nt==null?void 0:nt.split("="))==null?void 0:Aa[0])+"='"+((Va=nt==null?void 0:nt.split("="))==null?void 0:Va[1])+"'"),nt!=null&&nt.includes("=")&&!(nt!=null&&nt.includes("=="))&&!(nt!=null&&nt.includes("==="))&&(nt=nt==null?void 0:nt.replaceAll("=","==")),new Function(`if (${nt}) { return true } else { return false }`)()?(ut=!1,Lt="image",vt=oe.value+"/"+((Ea=ie.value)==null?void 0:Ea.signature)):vt=""}return Array.isArray(vt)&&vt.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Lt="Url"),{label:xe??"",name:"t"+me,prop:C.cloneDeep(M==null?void 0:M.key),type:Lt,value:M!=null&&M.isSync?((Ga=(Ya=B.value)==null?void 0:Ya[0])==null?void 0:Ga.value)??((Ma=(Oa=z==null?void 0:z.value)==null?void 0:Oa.split("/"))==null?void 0:Ma[((Za=(Ja=z==null?void 0:z.value)==null?void 0:Ja.split("/"))==null?void 0:Za.length)-1]):M!=null&&M.isNewDate&&vt===""?new Date:vt,id:(M==null?void 0:M.id)??me,contents:(Et==null?void 0:Et.length)>0?Et:et??[],width:(M==null?void 0:M.width)??1,isLoginUser:_t,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:ut,signature:gt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1,isSync:M==null?void 0:M.isSync}}),yt=ot==null?void 0:ot.map(M=>M==null?void 0:M.value);let je="";yt==null||yt.forEach(M=>{M!==""&&M!==void 0&&(je=je===""?M:je+"/"+M)}),m.setSelectArray(yt),m.setSelectString(je);let Ke=(st=C.cloneDeep(ot))==null?void 0:st.map(M=>(M!=null&&M.value&&Oe.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));Ke=Ke==null?void 0:Ke.map(M=>{var me,xe,at,et,Et,_t,ut,ft;if((xe=(me=M==null?void 0:M.optionUrl)==null?void 0:me.menuSelect)!=null&&xe.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";M.optionUrl.oldMenuSelect=(et=(at=C.cloneDeep(M))==null?void 0:at.optionUrl)==null?void 0:et.menuSelect,M.optionUrl.menuSelect=(_t=(Et=M==null?void 0:M.optionUrl)==null?void 0:Et.menuSelect)==null?void 0:_t.map(gt=>{var Lt,bt,zt,Rt,Kt,Ht;if(gt!=null&&gt.includes("[")){let Jt=(bt=(Lt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Lt.split(":"))==null?void 0:bt[1];vt=Me((zt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:zt.split(":"),He==null?void 0:He[z.value],He),gt=((Kt=(Rt=C.cloneDeep(Ke))==null?void 0:Rt.find(ta=>(ta==null?void 0:ta.label)===Jt))==null?void 0:Kt.value)||Me((Ht=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),He==null?void 0:He[z.value],He)}return gt}),vt!==""&&M.value===""&&(M.value=le(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(ut=M==null?void 0:M.optionUrl)==null?void 0:ut.groupSelect,He),Array.isArray(M.value)&&((ft=M.value)!=null&&ft.every(gt=>gt==null?void 0:gt.url))&&(M.type="UPLOAD"))}return M}),s.value=Ke,Ze.value=((Ye=s.value)==null?void 0:Ye.every(M=>M==null?void 0:M.disabled))||Z.value===z.value,Re.value=(tt=s.value)==null?void 0:tt.every(M=>M==null?void 0:M.operable),be.value=(Ne=s.value)==null?void 0:Ne.map(M=>M==null?void 0:M.label);let Xe=[],Se=[];if((pt=C.cloneDeep(s.value))==null||pt.forEach(M=>{var me;Array.isArray(M==null?void 0:M.value)&&((me=M==null?void 0:M.value)!=null&&me.find(xe=>{var at;return(at=xe==null?void 0:xe.url)==null?void 0:at.includes(".obj")}))&&(Se=M==null?void 0:M.value)}),(Se==null?void 0:Se.length)>0){const M=(Je=C.cloneDeep(Se))==null?void 0:Je.filter(me=>{var xe;return(xe=me==null?void 0:me.url)==null?void 0:xe.includes(".obj")});M==null||M.forEach(me=>{var at,et,Et,_t;const xe=(at=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(me==null?void 0:me.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:at.map(ut=>ut==null?void 0:ut.url);Xe.push({objUrl:me==null?void 0:me.url,mtlUrls:((et=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(me==null?void 0:me.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:et.length)===1?(_t=(Et=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(me==null?void 0:me.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Et[0])==null?void 0:_t.url:xe})}),S.setObjUrl(Xe)}($e=C.cloneDeep(s.value))==null||$e.forEach(M=>{var me,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt;if((xe=(me=M==null?void 0:M.value)==null?void 0:me.toString())!=null&&xe.includes(".stl")||(et=(at=M==null?void 0:M.value)==null?void 0:at.toString())!=null&&et.includes(".STL")||(_t=(Et=M==null?void 0:M.value)==null?void 0:Et.toString())!=null&&_t.includes(".obj")||(ft=(ut=M==null?void 0:M.value)==null?void 0:ut.toString())!=null&&ft.includes(".mtl")||(gt=(vt=M==null?void 0:M.value)==null?void 0:vt.toString())!=null&&gt.includes(".urdf")){let Rt={},Kt=[],Ht;Array.isArray(M==null?void 0:M.value)?Ht=M==null?void 0:M.value:Ht=(Lt=M==null?void 0:M.value)==null?void 0:Lt.split(","),Ht==null||Ht.forEach(Jt=>{Jt.includes(".mtl")?Kt.push(Jt):Rt.blob=Rt.blob==="undefined"?Jt:Rt.blob+","+Jt}),(Kt==null?void 0:Kt.length)>0&&(Rt.mtlBlobs=Kt),(zt=(bt=Object.values(Rt))==null?void 0:bt[0])!=null&&zt.includes("http:")}})}else s.value=[];let H=Pe.value;if((H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(He=>{var yt,je,Ke,Xe;let ot=(yt=He==null?void 0:He.key)==null?void 0:yt.split("/");return(l==null?void 0:l.compName)===(ot==null?void 0:ot[0])&&(je=s.value)!=null&&je.find(Se=>(Se==null?void 0:Se.prop)===(ot==null?void 0:ot[1]))&&(He.value=(Xe=(Ke=s.value)==null?void 0:Ke.find(Se=>(Se==null?void 0:Se.prop)===(ot==null?void 0:ot[1])))==null?void 0:Xe.value),He}),ke.setTableViewContents(H)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let He={};(rt=C.cloneDeep(s).value)==null||rt.forEach(ot=>{(ot==null?void 0:ot.isMain)===!0&&(He[(ot==null?void 0:ot.prop)??(ot==null?void 0:ot.name)]=[{required:!0,message:`${(ot==null?void 0:ot.prop)||(ot==null?void 0:ot.name)}不能为空`}])}),D.value=He}if(((mt=W==null?void 0:W.contents)==null?void 0:mt.length)>0){const He=[];(wt=W==null?void 0:W.contents)==null||wt.forEach((ot,yt)=>{(ot==null?void 0:ot.label)!==""&&He.push({label:(ot==null?void 0:ot.label)??"",id:(ot==null?void 0:ot.id)??yt,type:(ot==null?void 0:ot.type)??"",background:ot==null?void 0:ot.background})}),Q.value=He}else Q.value=[]},{deep:!0,immediate:!0}),e.watch(()=>Z.value,U=>{Ze.value=U===z.value},{immediate:!0}),(U,W)=>{var re,Ae;const X=e.resolveComponent("svg-icon"),De=e.resolveComponent("el-switch"),he=e.resolveComponent("el-checkbox"),H=e.resolveComponent("el-popover"),fe=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xi,[v.value===!1?(e.openBlock(),e.createBlock(fi,{key:0,items:(Ae=(re=s.value)==null?void 0:re.filter(pe=>!(pe!=null&&pe.isFormColHidden)))==null?void 0:Ae.map(pe=>({label:pe==null?void 0:pe.label,value:pe==null?void 0:pe.value}))},null,8,["items"])):Ee.value?(e.openBlock(),e.createBlock(wl,{key:1,itemData:n.itemData,compName:n.compName},null,8,["itemData","compName"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":v.value})},[e.createVNode(Nt.ssForm,{rowContents:s.value,formRules:D.value,buttonValue:Q.value,isRowFlex:!1,isEnableWrap:v.value,onOnButtonClick:q,onChange:N,formDisabled:Ze.value,formLabelsOperable:Re.value,isButtonRow:E.value,onPreview:x,onBlurChange:dt,onHandleColEditChange:de,onHandleColTypeChange:Ce,onRouteUrl:we,onClickTrigger:Ie},{operateCol:e.withCtx(({renderColumns:pe,formDisabled:Te,formLabelsOperable:$})=>[e.createVNode(H,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:k},{reference:e.withCtx(()=>[e.createElementVNode("span",wi,[e.createVNode(X,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Di,[W[1]||(W[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(De,{"model-value":Te,"active-text":"禁用","inactive-text":"",onChange:Y,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(De,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:J},null,8,["model-value"]),W[2]||(W[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(fe,{modelValue:be.value,"onUpdate:modelValue":W[0]||(W[0]=Ve=>be.value=Ve),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe,Ve=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Ve.label},[e.createVNode(he,{value:Ve.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Ve.label),1)]),_:2},1032,["value"]),e.createVNode(H,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(X,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ve;return[e.createElementVNode("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ve=Object.keys(Ve))==null?void 0:ve.filter(We=>{var st;return(st=Le.value)==null?void 0:st.find(Ye=>(Ye==null?void 0:Ye.value)===We)}),We=>{var st,Ye;return e.openBlock(),e.createElementBlock("div",{key:We},[e.createVNode(Nt._sfc_main$1,{value:Ve==null?void 0:Ve[We],"active-text":(Ye=(st=Le.value)==null?void 0:st.find(tt=>(tt==null?void 0:tt.value)===We))==null?void 0:Ye.label,inactiveText:"",onChange:tt=>Ge(tt,We,Ve)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ei,[e.createVNode(X,{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)),V.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:3,fileDataList:L.value,onDestroy:A},null,8,["fileDataList"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:4,visible:g.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:p.value,onGetAnimationData:U.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ro=Pt._export_sfc(Ci,[["__scopeId","data-v-354b0fba"]]),Fn=e.ref(0),Dl=n=>{var r;return!n||(n==null?void 0:n.length)===0?[]:(r=C.cloneDeep(n))==null?void 0:r.map(l=>(Fn.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)??Fn.value,children:Dl(l==null?void 0:l.children)},l))},Si=n=>{var i;return(i=C.cloneDeep(n))==null?void 0:i.map(l=>(Fn.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)??Fn.value,children:Dl(l==null?void 0:l.children)},l))},_l=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===r)?(i=C.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=_l(l==null?void 0:l.children,r),l)),n)},El=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=C.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=El(l==null?void 0:l.children,r),l)),n)},Cl=(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=C.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=Cl(l==null?void 0:l.children,r),l)),n)},Sl=(n,r)=>{var i;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=C.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=Sl(l==null?void 0:l.children,r),l)),n)},Ot=[{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"}],Ti=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Bi=[{label:"新增",value:"add"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Bi},{key:"background",label:"按钮背景色",type:"Color"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ti},{key:"textColor",label:"按钮颜色",type:"Color"}],Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(!1),s=e.ref(""),g=Oe.useTableComp(C.pinia),{tableIndex:h}=C.storeToRefs(g);e.ref(0);const p=e.ref(""),y=e.ref([]),D=e.ref([]),E=m=>{var v;u.value=!0;let S=[];Ot==null||Ot.forEach(T=>{let b=C.cloneDeep(h.value)+1;g.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,y.value=S,D.value=S},V=m=>{l("fixChange",C.cloneDeep(m))},j=m=>{l("deleteChange",C.cloneDeep(m))},B=m=>{u.value=!0;let S=[];Ot==null||Ot.forEach(v=>{let T=C.cloneDeep(h.value)+1;g.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,y.value=S,D.value=S},Q=m=>{let S=C.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},L=()=>{var S,v;y.value=D.value;let m={};if(p.value!=="")m.id=p.value,(S=y.value)==null||S.forEach(T=>{const b=Ot==null?void 0:Ot.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:C.cloneDeep(m),id:s.value,type:"fix"});else{let T=C.cloneDeep(h.value)+1;g.setTableIndex(T),m.id="id"+h.value,(v=y.value)==null||v.forEach(b=>{const ie=Ot==null?void 0:Ot.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:C.cloneDeep(m),id:s.value,type:"add"})}p.value="",y.value=[],D.value=[]},P=()=>{u.value=!1,p.value="",s.value="",y.value=[],D.value=[]},F=m=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(m,S)=>{const v=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(T,b)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(T.label),1),e.createElementVNode("div",Oi,[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=>E(T)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>F(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Tl,{tableChildContents:T==null?void 0:T.children,onDeleteChange:j,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:u.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pi=Pt._export_sfc(Ri,[["__scopeId","data-v-e0fef72d"]]),Li={class:"table-header-child"},$i={class:"table-header-child-main"},Fi={class:"table-header-child-content"},ji={class:"table-header-child-content-item"},Ui={class:"fix-button"},Ki={key:0},Wi={class:"form-content"},Hi={class:"dialog-footer"},qi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const i=n,l=r,u=e.ref(!1),s=e.ref(""),g=Oe.useTableComp(C.pinia),{tableIndex:h}=C.storeToRefs(g),p=e.ref(""),y=e.ref([]),D=e.ref([]),E=m=>{l("fixChange",C.cloneDeep(m))},V=m=>{var v;u.value=!0;let S=[];Ot==null||Ot.forEach(T=>{let b=C.cloneDeep(h.value)+1;g.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,y.value=S,D.value=S},j=m=>{u.value=!0;let S=[];Ot==null||Ot.forEach(v=>{let T=C.cloneDeep(h.value)+1;g.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,y.value=S,D.value=S},B=m=>{let S=C.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},Q=()=>{var S,v;y.value=D.value;let m={};if(p.value!=="")m.id=p.value,(S=y.value)==null||S.forEach(T=>{const b=Ot==null?void 0:Ot.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:C.cloneDeep(m),id:s.value,type:"fix"});else{let T=C.cloneDeep(h.value)+1;g.setTableIndex(T),m.id="idChild"+h.value,(v=y.value)==null||v.forEach(b=>{const ie=Ot==null?void 0:Ot.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:C.cloneDeep(m),id:s.value,type:"add"})}p.value="",y.value=[],D.value=[]},L=()=>{u.value=!1,p.value="",s.value="",y.value=[],D.value=[]},P=m=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=m=>{l("deleteChange",m)};return(m,S)=>{const v=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(b,ie)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("div",Fi,[e.createElementVNode("div",ji,e.toDisplayString(b.label),1),e.createElementVNode("div",Ui,[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=>V(b)},null,8,["onClick"]),e.createVNode(v,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>P(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",Ki,[e.createVNode(Pi,{tableChildContents:b==null?void 0:b.children,onDeleteChange:F,onFixChange:E},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:u.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(T,{onClick:L,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:Q,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Pt._export_sfc(qi,[["__scopeId","data-v-ebd68fa1"]]),Xi={class:"table-operate-content"},Yi={class:"table-operate-item"},Gi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={key:0},as={class:"operate-title"},ns={class:"operate-content"},os={class:"fix-content"},ls={class:"fix-content-label"},rs={class:"fix-button"},is={class:"operate-title"},ss={class:"operate-content"},cs={class:"fix-content"},us={class:"fix-content-label"},ds={class:"fix-button"},ps={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-content-label"},ms={class:"fix-button"},gs={class:"operate-content"},ys={style:{display:"flex","justify-content":"space-between"}},bs={class:"form-content"},ks={class:"dialog-footer"},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},_s={class:"dialog-footer"},Es={class:"form-content"},Cs={class:"dialog-footer"},Ss={__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),g=e.ref(!1),h=e.ref([]),p=e.ref(!1),y=e.ref([]),D=e.ref(!1),E=e.ref([]),V=e.ref(""),j=e.ref(""),B=e.ref([]),Q=e.ref([]),L=e.ref([]),P=e.ref([]),F=e.ref(!1),m=e.ref([]),S=e.ref([]),v=e.ref(0),T=e.ref([]),b=e.ref([]),ie=e.ref([]),Be=()=>{F.value=!0;let x=[];Sa==null||Sa.forEach(A=>{v.value++,x.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:(A==null?void 0:A.key)==="background"?"var(--ssComponent-primary-color)":"",id:v.value,contents:A==null?void 0:A.options})}),m.value=x,S.value=x},Qe=()=>{var A,q,oe;g.value=!0;let x=[];(oe=(q=(A=Oe.FormContent)==null?void 0:A.find(N=>(N==null?void 0:N.key)==="Input"))==null?void 0:q.value)==null||oe.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},ke=x=>{x||(T.value=b.value)},Pe=async x=>{var A,q,oe,N,se,Me,le,U,W,X,De,he;if((x==null?void 0:x.类型)!==((q=(A=b.value)==null?void 0:A.find(H=>(H==null?void 0:H.label)==="类型"))==null?void 0:q.value)){let H=[],fe=await((se=(N=(oe=Oe.FormContent)==null?void 0:oe.find(re=>(re==null?void 0:re.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:N.value)==null?void 0:se.value)?await((X=(W=(U=Oe.FormContent)==null?void 0:U.find(re=>(re==null?void 0:re.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:W.value)==null?void 0:X.value):(le=(Me=Oe.FormContent)==null?void 0:Me.find(re=>(re==null?void 0:re.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:le.value;if(fe==null||fe.forEach(re=>{v.value++,H.push({label:re==null?void 0:re.label,name:(re==null?void 0:re.name)||(re==null?void 0:re.label),type:re.type,value:re!=null&&re.属性名?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):(x==null?void 0:x[re.label])??"",id:v.value,contents:re==null?void 0:re.options,prop:(re==null?void 0:re.prop)||(re==null?void 0:re.name)||(re==null?void 0:re.label)})}),x!=null&&x.菜单选项&&((De=x==null?void 0:x.菜单选项)==null?void 0:De.length)>0){const re=await Oe.menuToContentType(x==null?void 0:x.菜单选项);H=H==null?void 0:H.map(Ae=>((Ae==null?void 0:Ae.name)==="组信息选项"&&(Ae.contents=re),Ae))}b.value=await Oe.selectToBase(C.cloneDeep(H)),T.value=await Oe.selectToBase(C.cloneDeep(H))}else{let H=C.cloneDeep(T.value);if(H=H==null?void 0:H.map(fe=>(fe.value=x==null?void 0:x[fe.name],fe)),x!=null&&x.菜单选项&&((he=x==null?void 0:x.菜单选项)==null?void 0:he.length)>0){const fe=await Oe.menuToContentType(x==null?void 0:x.菜单选项);H=H==null?void 0:H.map(re=>((re==null?void 0:re.name)==="组信息选项"&&(re.contents=fe),re))}H=Oe.formToOptionsContents(H),b.value=await Oe.selectToBase(C.cloneDeep(H))}},ze=async x=>{await Pe(x),T.value=b.value},I=(x,A)=>{if((A==null?void 0:A.type)=="Select"&&(x==null?void 0:x.key)==="selectRelateType"){const q=A==null?void 0:A.optionUrl;return(q==null?void 0:q.selectRelateType)||A[x.key]}if((A==null?void 0:A.type)=="Select"&&(x==null?void 0:x.key)==="menuSelect"){const q=A==null?void 0:A.optionUrl;return(q==null?void 0:q.menuSelect)||A[x.key]}if((A==null?void 0:A.type)=="Select"&&(x==null?void 0:x.key)==="groupSelect"){const q=A==null?void 0:A.optionUrl;return(q==null?void 0:q.groupSelect)||A[x.key]}if((A==null?void 0:A.type)=="Select"&&(x==null?void 0:x.key)==="originalContent")return(A==null?void 0:A.value)||A[x.key];if((A==null?void 0:A.type)=="Select"&&(x==null?void 0:x.key)==="multiple"){const q=A[x.key];return xl(q)?q:x.default}return(x==null?void 0:x.label)==="类型"&&A[x.key]===""?"Input":(x==null?void 0:x.key)==="isFormColHidden"&&!A[x.key]?!1:A[x.key]},ee=async x=>{var oe,N,se,Me,le,U,W,X,De;g.value=!0;let A=[];const q=await((se=(N=(oe=Oe.FormContent)==null?void 0:oe.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:N.value)==null?void 0:se.value)?await((X=(W=(U=Oe.FormContent)==null?void 0:U.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:W.value)==null?void 0:X.value):(le=(Me=Oe.FormContent)==null?void 0:Me.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:le.value;if(q==null||q.forEach(he=>{v.value++,A.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:(he==null?void 0:he.label)==="属性名"?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):I(he,x),id:v.value,contents:he==null?void 0:he.options})}),x!=null&&x.menuSelect&&((De=x==null?void 0:x.menuSelect)==null?void 0:De.length)>0){const he=await Oe.menuToContentType(x==null?void 0:x.menuSelect);A=A==null?void 0:A.map(H=>((H==null?void 0:H.name)==="组信息选项"&&(H.contents=he),H))}V.value=x==null?void 0:x.id,T.value=await Oe.selectToBase(Oe.formToOptionsContents(A)),b.value=await Oe.selectToBase(Oe.formToOptionsContents(A))},Z=x=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,q;ie.value=(A=C.cloneDeep(ie.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(x==null?void 0:x.id)),l("change",(q=C.cloneDeep(i.originalItemContents))==null?void 0:q.map(oe=>((oe==null?void 0:oe.key)==="tableToForm"&&(oe.contents=ie.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},te=()=>{g.value=!1,T.value=[],V.value=""},Re=async()=>{var oe,N,se,Me,le,U,W,X,De,he;T.value=b.value;let x={};V.value!==""?x.id=V.value:(v.value++,x.id="id"+v.value);let A=await((se=(N=(oe=Oe.FormContent)==null?void 0:oe.find(H=>{var fe,re;return(H==null?void 0:H.key)===(((re=(fe=T.value)==null?void 0:fe.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:N.value)==null?void 0:se.value)??((le=(Me=Oe.FormContent)==null?void 0:Me.find(H=>{var fe,re;return(H==null?void 0:H.key)===(((re=(fe=T.value)==null?void 0:fe.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:le.value);if((U=T.value)==null||U.forEach(H=>{const fe=A==null?void 0:A.find(re=>(re==null?void 0:re.label)===(H==null?void 0:H.label));fe&&(x[fe.key]=H.value)}),x.name=x.label,(W=ie.value)!=null&&W.find(H=>H.id===x.id))ie.value=(X=ie.value)==null?void 0:X.map(H=>(H.id===x.id&&(H=x),H));else{let H=C.cloneDeep(ie.value);ie.value||(ie.value=[]),H.push(x),ie.value=H}ie.value=ie.value.map(({id:H,...fe})=>fe),g.value=!1,V.value="";let q=C.cloneDeep(i.originalItemContents);(De=C.cloneDeep(i.originalItemContents))!=null&&De.find(H=>(H==null?void 0:H.key)==="tableToForm")?q=(he=C.cloneDeep(i.originalItemContents))==null?void 0:he.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=ie.value),H)):q.push({key:"tableToForm",contents:ie.value}),l("change",q)},Ze=x=>{F.value=!0;let A=[];Sa==null||Sa.forEach(q=>{v.value++,A.push({label:q==null?void 0:q.label,name:q==null?void 0:q.label,type:q.type,value:x[q.key],id:v.value,contents:q==null?void 0:q.options})}),V.value=x==null?void 0:x.id,m.value=A,S.value=A};e.watch(()=>D.value,()=>{var A,q;let x=C.cloneDeep(i.originalItemContents);(A=C.cloneDeep(i.originalItemContents))!=null&&A.find(oe=>(oe==null?void 0:oe.key)==="page")?x=(q=C.cloneDeep(i.originalItemContents))==null?void 0:q.map(oe=>((oe==null?void 0:oe.key)==="page"&&(oe.contents=D.value),oe)):x.push({key:"page",contents:D.value}),l("change",x)},{deep:!0});const G=x=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,q;Q.value=(A=C.cloneDeep(Q.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(x==null?void 0:x.id)),l("change",(q=C.cloneDeep(i.originalItemContents))==null?void 0:q.map(oe=>((oe==null?void 0:oe.key)==="extraButton"&&(oe.contents=Q.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var q,oe,N,se,Me;m.value=S.value;let x={};if(V.value!==""?x.id=V.value:(v.value++,x.id="id"+v.value),(q=m.value)==null||q.forEach(le=>{const U=Sa==null?void 0:Sa.find(W=>(W==null?void 0:W.label)===(le==null?void 0:le.label));U?x[U.key]=le.value:le!=null&&le.children&&le.children.length>0&&(x.children=le.children)}),(oe=Q.value)!=null&&oe.find(le=>le.id===x.id))Q.value=(N=Q.value)==null?void 0:N.map(le=>(le.id===x.id&&(le=x),le));else{let le=C.cloneDeep(Q.value)??[];le.push(x),Q.value=le}F.value=!1,V.value="";let A=C.cloneDeep(i.originalItemContents);(se=C.cloneDeep(i.originalItemContents))!=null&&se.find(le=>(le==null?void 0:le.key)==="extraButton")?A=(Me=C.cloneDeep(i.originalItemContents))==null?void 0:Me.map(le=>((le==null?void 0:le.key)==="extraButton"&&(le.contents=Q.value),le)):A.push({key:"extraButton",contents:Q.value}),l("change",A)},ce=x=>{let A=C.cloneDeep(S.value);A=A==null?void 0:A.map(q=>(q.children||(q.value=x==null?void 0:x[q.name]),q)),S.value=A},ge=()=>{F.value=!1,m.value=[],V.value=""},Ee=x=>{p.value=!0;let A=[];Ta==null||Ta.forEach(q=>{v.value++,A.push({label:q==null?void 0:q.label,name:q==null?void 0:q.label,type:q.type,value:x[q.key],id:v.value,contents:q==null?void 0:q.options})}),V.value=x==null?void 0:x.id,L.value=A,P.value=A},be=x=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,q;B.value=(A=C.cloneDeep(B.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(x==null?void 0:x.id)),l("change",(q=C.cloneDeep(i.originalItemContents))==null?void 0:q.map(oe=>((oe==null?void 0:oe.key)==="rowButton"&&(oe.contents=B.value),oe))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Le=()=>{s.value=!0;let x=[];Ot==null||Ot.forEach(A=>{v.value++,x.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:v.value,contents:A==null?void 0:A.options})}),y.value=x,E.value=x},Y=()=>{p.value=!0;let x=[];Ta==null||Ta.forEach(A=>{v.value++,x.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:v.value,contents:A==null?void 0:A.options})}),L.value=x,P.value=x},J=x=>{let A=C.cloneDeep(P.value);A=A==null?void 0:A.map(q=>(q.children||(q.value=x==null?void 0:x[q.name]),q)),P.value=A},k=()=>{var q,oe,N,se,Me;L.value=P.value;let x={};if(V.value!==""?x.id=V.value:(v.value++,x.id="id"+v.value),(q=L.value)==null||q.forEach(le=>{const U=Ta==null?void 0:Ta.find(W=>(W==null?void 0:W.label)===(le==null?void 0:le.label));U?x[U.key]=le.value:le!=null&&le.children&&le.children.length>0&&(x.children=le.children)}),(oe=B.value)!=null&&oe.find(le=>le.id===x.id))B.value=(N=B.value)==null?void 0:N.map(le=>(le.id===x.id&&(le=x),le));else{let le=C.cloneDeep(B.value);le.push(x),B.value=le}p.value=!1,V.value="";let A=C.cloneDeep(i.originalItemContents);(se=C.cloneDeep(i.originalItemContents))!=null&&se.find(le=>(le==null?void 0:le.key)==="rowButton")?A=(Me=C.cloneDeep(i.originalItemContents))==null?void 0:Me.map(le=>((le==null?void 0:le.key)==="rowButton"&&(le.contents=B.value),le)):A.push({key:"rowButton",contents:B.value}),l("change",A)},ye=()=>{p.value=!1,V.value="",P.value=[],L.value=[]},Ie=x=>{s.value=!0;let A=[];Ot==null||Ot.forEach(q=>{v.value++,A.push({label:q==null?void 0:q.label,name:q==null?void 0:q.label,type:q.type,value:"",id:v.value,contents:q==null?void 0:q.options})}),y.value=A,j.value=x==null?void 0:x.id,E.value=A},we=x=>{var A;h.value=_l(C.cloneDeep(h.value),x==null?void 0:x.id),l("change",(A=C.cloneDeep(i.originalItemContents))==null?void 0:A.map(q=>{var oe;return(q==null?void 0:q.key)==="header"&&(q.contents=(oe=h.value)!=null&&oe.some(N=>N==null?void 0:N.children)?[h.value]:h.value),q}))},ue=x=>{var q,oe,N;x.type==="fix"?x.id!==""?h.value=Cl(h.value,x):h.value=El(h.value,x==null?void 0:x.contents):h.value=Sl(h.value,x),h.value=(q=h.value)!=null&&q.some(se=>se==null?void 0:se.children)?[h.value]:h.value,V.value="";let A=C.cloneDeep(i.originalItemContents);(oe=C.cloneDeep(i.originalItemContents))!=null&&oe.find(se=>(se==null?void 0:se.key)==="header")?A=(N=C.cloneDeep(i.originalItemContents))==null?void 0:N.map(se=>((se==null?void 0:se.key)==="header"&&(se.contents=h.value),se)):A.push({key:"header",contents:h.value}),l("change",A)},ne=x=>{var q;s.value=!0;let A=[];Ot==null||Ot.forEach(oe=>{v.value++,A.push({label:oe==null?void 0:oe.label,name:oe==null?void 0:oe.label,type:oe.type,value:x[oe.key],id:v.value,contents:oe==null?void 0:oe.options})}),x!=null&&x.children&&((q=x==null?void 0:x.children)==null?void 0:q.length)>0&&A.push({children:x==null?void 0:x.children,isFormColHidden:!0}),V.value=x==null?void 0:x.id,j.value="",y.value=A,E.value=A},de=x=>{let A=C.cloneDeep(E.value);A=A==null?void 0:A.map(q=>(q.children||(q.value=x==null?void 0:x[q.name]),q)),E.value=A},Ce=()=>{s.value=!1,V.value="",j.value="",E.value=[]},Ge=()=>{var q,oe,N,se,Me,le;y.value=E.value;let x={};if(V.value!==""?x.id=V.value:(v.value++,x.id="id"+v.value),(q=y.value)==null||q.forEach(U=>{const W=Ot==null?void 0:Ot.find(X=>(X==null?void 0:X.label)===(U==null?void 0:U.label));W?x[W.key]=U.value:U!=null&&U.children&&U.children.length>0&&(x.children=U.children)}),(oe=h.value)!=null&&oe.find(U=>U.id===x.id))h.value=(N=h.value)==null?void 0:N.map(U=>(U.id===x.id&&(U=x),U));else{let U=C.cloneDeep(h.value)??[];j.value===""?U.push(x):U=U==null?void 0:U.map(W=>(W.id===j.value&&(W.children||(W.children=[]),W.children.push(x)),W)),h.value=U}h.value=(se=h.value)!=null&&se.some(U=>U==null?void 0:U.children)?[h.value]:h.value,s.value=!1,V.value="",j.value="";let A=C.cloneDeep(i.originalItemContents);(Me=C.cloneDeep(i.originalItemContents))!=null&&Me.find(U=>(U==null?void 0:U.key)==="header")?A=(le=C.cloneDeep(i.originalItemContents))==null?void 0:le.map(U=>((U==null?void 0:U.key)==="header"&&(U.contents=h.value),U)):A.push({key:"header",contents:h.value}),l("change",A)},dt=x=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,q;h.value=(A=C.cloneDeep(h.value))==null?void 0:A.filter(oe=>(oe==null?void 0:oe.id)!==(x==null?void 0:x.id)),l("change",(q=C.cloneDeep(i.originalItemContents))==null?void 0:q.map(oe=>{var N;return(oe==null?void 0:oe.key)==="header"&&(oe.contents=(N=h.value)!=null&&N.some(se=>se==null?void 0:se.children)?[h.value]:h.value),oe})),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var x,A,q,oe,N,se,Me,le,U,W,X,De,he,H,fe,re,Ae,pe,Te;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(u.value=C.cloneDeep(i.originalItemContents),h.value=(A=(x=u.value)==null?void 0:x.find($=>($==null?void 0:$.key)==="header"))==null?void 0:A.contents,B.value=(oe=(q=u.value)==null?void 0:q.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:oe.contents,Q.value=(se=(N=u.value)==null?void 0:N.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:se.contents,D.value=(le=(Me=u.value)==null?void 0:Me.find($=>($==null?void 0:$.key)==="page"))!=null&&le.contents?!!((W=(U=u.value)==null?void 0:U.find($=>($==null?void 0:$.key)==="page"))!=null&&W.contents):!1,ie.value=(De=(X=u.value)==null?void 0:X.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:De.contents,h.value=(he=h.value)==null?void 0:he.map(($,Ve)=>(Array.isArray($)?$=Si($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??Ve,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),h.value=(H=h.value)!=null&&H.every($=>Array.isArray($))?(fe=h.value)==null?void 0:fe[0]:h.value,B.value=(re=B.value)==null?void 0:re.map(($,Ve)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??Ve}),Q.value=(Ae=Q.value)==null?void 0:Ae.map(($,Ve)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??Ve}),ie.value)ie.value=(Te=ie.value)==null?void 0:Te.map($=>{v.value++;let Ve=$;return Ve.id=v.value,Ve});else{let $=[];const Ve=(pe=Oe.getColumnChild(C.cloneDeep(h.value)))==null?void 0:pe.filter(ve=>(ve==null?void 0:ve.prop)!=="operate");Ve==null||Ve.forEach(ve=>{var We;v.value++,$.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.prop)||(ve==null?void 0:ve.label),type:ve!=null&&ve.groupSelect?"Select":"Input",value:"",id:v.value,contents:ve==null?void 0:ve.options,menuSelect:ve==null?void 0:ve.formMenuSelect,groupSelect:(We=ve==null?void 0:ve.groupSelect)==null?void 0:We.split(":"),selectRelateType:"关联绑定列"})}),ie.value=$}},{deep:!0,immediate:!0}),(x,A)=>{const q=e.resolveComponent("svg-icon"),oe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("div",Yi,[e.createElementVNode("div",Gi,[A[2]||(A[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(oe,{class:"icon-content",onClick:Le,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[1]||(A[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(N,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",es,[e.createVNode(q,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>Ie(N)},null,8,["onClick"]),e.createVNode(q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>ne(N)},null,8,["onClick"]),e.createVNode(q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>dt(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(Tl,{tableChildContents:N==null?void 0:N.children,onDeleteChange:we,onFixChange:ue},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",as,[A[4]||(A[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Y},{icon:e.withCtx(()=>[e.createVNode(q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[3]||(A[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(N,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",os,[e.createElementVNode("div",ls,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",rs,[e.createVNode(q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>Ee(N)},null,8,["onClick"]),e.createVNode(q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>be(N)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",is,[A[6]||(A[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Be},{icon:e.withCtx(()=>[e.createVNode(q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[5]||(A[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",ss,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(N,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",ds,[e.createVNode(q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>Ze(N)},null,8,["onClick"]),e.createVNode(q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>G(N)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ps,[A[8]||(A[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(oe,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[A[7]||(A[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(N,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(N==null?void 0:N.label),1),e.createElementVNode("div",ms,[e.createVNode(q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>ee(N)},null,8,["onClick"]),e.createVNode(q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>Z(N)},null,8,["onClick"])])])]))),128))]),A[10]||(A[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",gs,[e.createElementVNode("div",ys,[A[9]||(A[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:D.value,"onUpdate:modelValue":A[0]||(A[0]=N=>D.value=N)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ks,[e.createVNode(oe,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[11]||(A[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(oe,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>A[12]||(A[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:ye,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:L.value,key:L.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(oe,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[13]||(A[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(oe,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>A[14]||(A[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:F.value,onBeforeDestroy:ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createVNode(oe,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[15]||(A[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(oe,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>A[16]||(A[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Es,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:Pe,onChangeVisible:ke,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Cs,[e.createVNode(oe,{onClick:te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>A[17]||(A[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(oe,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>A[18]||(A[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Ts=Pt._export_sfc(Ss,[["__scopeId","data-v-7a6b87b5"]]),Bs=C.useModelComp(C.pinia),{pageMapState:Is}=C.storeToRefs(Bs),Ns=C.useMenuState(C.pinia),{activeMenuPath:As}=C.storeToRefs(Ns),Vs=e.ref(24),Os=e.ref(6),Ms=e.ref(70),zs=e.ref(.18),Rs=e.ref(45),Ps=(n,r,i,l)=>{var u,s,g,h,p,y,D,E,V,j,B,Q,L,P,F,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=(g=n==null?void 0:n.value)==null?void 0:g.tableData)==null?void 0:h.y)||r,w:((y=(p=n==null?void 0:n.value)==null?void 0:p.tableData)==null?void 0:y.w)||Vs.value,h:((E=(D=n==null?void 0:n.value)==null?void 0:D.tableData)==null?void 0:E.h)||i,minW:((j=(V=n==null?void 0:n.value)==null?void 0:V.tableData)==null?void 0:j.minW)||Os.value,minH:((Q=(B=n==null?void 0:n.value)==null?void 0:B.tableData)==null?void 0:Q.minH)||zs.value,maxH:((P=(L=n==null?void 0:n.value)==null?void 0:L.tableData)==null?void 0:P.maxH)||Rs.value,i:((m=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:m.i)||r,id:(n==null?void 0:n.id)||r+"",component:l}},Ls=(n,r)=>{var l,u,s,g,h,p,y,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(((g=(s=(u=n==null?void 0:n.compData)==null?void 0:u.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:g.length)===0)return 2}else((h=n==null?void 0:n.comp)==null?void 0:h.toUpperCase())==="FORM"&&(i=((D=(y=(p=n==null?void 0:n.compData)==null?void 0:p.find(V=>(V==null?void 0:V.key)==="formContent"))==null?void 0:y.contents)==null?void 0:D.length)/5);return i*2},Bl=(n,r,i)=>{var g,h;const l=(h=(g=Is.value)==null?void 0:g[As.value])==null?void 0:h.filter(p=>{var y;return((y=p==null?void 0:p.key)==null?void 0:y.type)==="gridLayout"}),u=l==null?void 0:l.find(p=>{var y,D,E;return((E=(D=(y=p==null?void 0:p.value)==null?void 0:y.tableData)==null?void 0:D.component)==null?void 0:E.id)===n.id}),s=Ls(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((p,y)=>Bl(p,y))),{...Ps(u,r,s,n)}},$s=(n,r)=>{if((n==null?void 0:n.length)===0)return[];const i=C.cloneDeep(n);return Array.isArray(n)?i==null?void 0:i.map((l,u)=>Bl(l,u)):[]},Fs=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}]}]}}),js=(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}),Us=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=Fs(i==null?void 0:i.optionItems),y=h?(D=p[h==null?void 0:h.toUpperCase()])==null?void 0:D[i==null?void 0:i.target]:[];u.value=y==null?void 0:y.map(E=>{for(const[V,j]of Object.entries((i==null?void 0:i.comp)||{}))if((E==null?void 0:E.prop)===V)return{...E,value:j};return E})},{immediate:!0});const s=h=>Nt.getComponent(h),g=h=>{var p,y;(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 E;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(E=D==null?void 0:D.options)==null?void 0:E.map(V=>({...V,disabled:!0}))}:(D==null?void 0:D.prop)==="isGridLayout"?{...D,disabled:!0}:D}):u.value=(y=u.value)==null?void 0:y.map(D=>{var E;return(D==null?void 0:D.prop)==="isStepLayout"?{...D,options:(E=D==null?void 0:D.options)==null?void 0:E.map(V=>({...V,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 y=e.resolveComponent("el-col"),D=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,E=>(e.openBlock(),e.createBlock(D,{class:"style-row",key:E==null?void 0:E.prop},{default:e.withCtx(()=>[e.createVNode(y,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E==null?void 0:E.label)+":",1)]),_:2},1024),e.createVNode(y,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(E.type)),{modelValue:E.value,"onUpdate:modelValue":V=>E.value=V,content:E==null?void 0:E.options,optionUrl:E==null?void 0:E.optionUrl,disabled:E==null?void 0:E.disabled,activeText:E==null?void 0:E.activeText,inactiveText:E==null?void 0:E.inactiveText,onChange:V=>g(E)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ks=Pt._export_sfc(Us,[["__scopeId","data-v-6c233914"]]),Ws=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:r}){const i=n,l=r,u=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),g=P=>P==null?void 0:P.reduce((F,m)=>(F[m==null?void 0:m.prop]=m==null?void 0:m.rule,F),{}),h=e.computed(()=>({formRules:g(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([]),y=e.ref(""),D=(P,F,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:P},{label:"按钮名称",value:"按钮名称",children:F}]},{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,...E(P,F,m)]:v=S,v},E=(P,F,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},V=(P,F)=>{var b,ie,Be,Qe,ke,Pe,ze,I,ee;const m=((ke=(Qe=(Be=(ie=(b=i==null?void 0:i.comp)==null?void 0:b.compData)==null?void 0:ie.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:Be.contents)==null?void 0:Qe.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:ke.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],S=/button/i,v=((ee=(I=(ze=(Pe=i==null?void 0:i.comp)==null?void 0:Pe.compData)==null?void 0:ze.filter(Z=>S.test(Z==null?void 0:Z.key)))==null?void 0:I.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:ee.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],T=D(m,v,P);p.value=F?js(T,F):T,P&&(P==null?void 0:P.length)>0&&s.value.push(...P==null?void 0:P.map(Z=>({prop:Z,rule:u})))};e.onMounted(()=>{V(null,i==null?void 0:i.extendItem)});const j=P=>{const F=P==null?void 0:P[y.value];if(y.value==="执行任务"){if(!(F!=null&&F.join("/")))return;const m=F==null?void 0:F.join("/");V(m==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:m==="进度设置/进度条"?["进度关键词"]:null,P)}},B=P=>{l("change",{target:i==null?void 0:i.target,extendConfigs:P})},Q=(P,F)=>{y.value=F==null?void 0:F.changeProp,j(P)},L=P=>{l("onButtonClick",P)};return(P,F)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:B,onBlurChange:Q,onOnButtonClick:L},null,8,["rowContents","formRules","buttonValue"]))}}),Hs=Pt._export_sfc(Ws,[["__scopeId","data-v-7c660c1f"]]),qs={};function Xs(n,r){return null}const Ys=Pt._export_sfc(qs,[["render",Xs]]),Gs={class:"form-operate-content"},Js={class:"form-operate-item"},Zs={class:"operate-title"},Qs={class:"operate-content"},ec={class:"fix-content"},tc={class:"fix-button"},ac={class:"operate-title"},nc={class:"operate-content"},oc={class:"fix-content"},lc={class:"fix-button"},rc={style:{display:"flex","justify-content":"space-between"}},ic={class:"form-content"},sc={class:"dialog-footer"},cc={class:"form-content"},uc={__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([]),g=e.ref([]),h=e.ref(!1),p=e.ref([]),y=e.ref([]),D=e.ref(""),E=e.ref(!1),V=e.ref(0),j=e.ref([]),B=e.ref([]),Q=(I,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const Z=ee==null?void 0:ee.optionUrl;return(Z==null?void 0:Z.selectRelateType)||ee[I.key]}if((ee==null?void 0:ee.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const Z=ee==null?void 0:ee.optionUrl;return(Z==null?void 0:Z.menuSelect)||ee[I.key]}if((ee==null?void 0:ee.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const Z=ee==null?void 0:ee.optionUrl;return(Z==null?void 0:Z.groupSelect)||ee[I.key]}if((ee==null?void 0:ee.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[I.key];if((ee==null?void 0:ee.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const Z=ee[I.key];return xl(Z)?Z:I.default}return(I==null?void 0:I.label)==="类型"&&ee[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!ee[I.key]?!1:ee[I.key]},L=async I=>{var te,Re,Ze,G,z,ce;u.value=!0;let ee=[];const Z=await((Ze=(Re=(te=Oe.FormContent)==null?void 0:te.find(ge=>(ge==null?void 0:ge.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Re.value)==null?void 0:Ze.value)??((z=(G=Oe.FormContent)==null?void 0:G.find(ge=>(ge==null?void 0:ge.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:z.value);if(Z==null||Z.forEach(ge=>{V.value++,ee.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,prop:ge==null?void 0:ge.prop,value:Q(ge,I),id:V.value,contents:ge==null?void 0:ge.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((ce=I==null?void 0:I.menuSelect)==null?void 0:ce.length)>0){const ge=await Oe.menuToContentType(I==null?void 0:I.menuSelect);ee=ee==null?void 0:ee.map(Ee=>((Ee==null?void 0:Ee.name)==="组信息选项"&&(Ee.contents=ge),Ee))}D.value=I==null?void 0:I.id,s.value=await Oe.selectToBase(Oe.formToOptionsContents(ee)),g.value=await Oe.selectToBase(Oe.formToOptionsContents(ee))},P=I=>{var Z;h.value=!0;let ee=[];(Z=Oe.FormButton)==null||Z.forEach(te=>{V.value++,ee.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:V.value,contents:te==null?void 0:te.options})}),j.value=ee,B.value=ee,D.value=I==null?void 0:I.id};e.watch(()=>E.value,()=>{var ee,Z;let I=C.cloneDeep(i.originalItemContents);(ee=C.cloneDeep(i.originalItemContents))!=null&&ee.find(te=>(te==null?void 0:te.key)==="enableWrap")?I=(Z=C.cloneDeep(i.originalItemContents))==null?void 0:Z.map(te=>((te==null?void 0:te.key)==="enableWrap"&&(te.contents=!E.value),te)):I.push({key:"enableWrap",contents:!E.value}),l("change",I)},{deep:!0});const F=()=>{var Z,te,Re,Ze,G;j.value=B.value;let I={};if(D.value!==""?I.id=D.value:(V.value++,I.id="id"+V.value),(Z=j.value)==null||Z.forEach(z=>{var ge;const ce=(ge=Oe.FormButton)==null?void 0:ge.find(Ee=>(Ee==null?void 0:Ee.label)===(z==null?void 0:z.label));ce&&(I[ce.key]=z.value)}),(te=p.value)!=null&&te.find(z=>z.id===I.id))p.value=(Re=p.value)==null?void 0:Re.map(z=>(z.id===I.id&&(z=I),z));else{let z=C.cloneDeep(p.value);p.value||(p.value=[]),z.push(I),p.value=z}h.value=!1,D.value="";let ee=C.cloneDeep(i.originalItemContents);(Ze=C.cloneDeep(i.originalItemContents))!=null&&Ze.find(z=>(z==null?void 0:z.key)==="formButton")?ee=(G=C.cloneDeep(i.originalItemContents))==null?void 0:G.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=p.value),z)):ee.push({key:"formButton",contents:p.value}),l("change",ee)},m=I=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,Z;y.value=(ee=C.cloneDeep(y.value))==null?void 0:ee.filter(te=>(te==null?void 0:te.id)!==(I==null?void 0:I.id)),l("change",(Z=C.cloneDeep(i.originalItemContents))==null?void 0:Z.map(te=>((te==null?void 0:te.key)==="formContent"&&(te.contents=y.value),te))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=I=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,Z;p.value=(ee=C.cloneDeep(p.value))==null?void 0:ee.filter(te=>(te==null?void 0:te.id)!==(I==null?void 0:I.id)),l("change",(Z=C.cloneDeep(i.originalItemContents))==null?void 0:Z.map(te=>((te==null?void 0:te.key)==="formButton"&&(te.contents=p.value),te))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=()=>{var ee;h.value=!0;let I=[];(ee=Oe.FormButton)==null||ee.forEach(Z=>{V.value++,I.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:V.value,contents:Z==null?void 0:Z.options})}),j.value=I,B.value=I},T=()=>{var ee,Z,te;u.value=!0;let I=[];(te=(Z=(ee=Oe.FormContent)==null?void 0:ee.find(Re=>(Re==null?void 0:Re.key)==="Input"))==null?void 0:Z.value)==null||te.forEach(Re=>{V.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:V.value,contents:Re==null?void 0:Re.options})}),s.value=I,g.value=I},b=I=>{let ee=C.cloneDeep(B.value);ee=ee==null?void 0:ee.map(Z=>(Z.value=I==null?void 0:I[Z.name],Z)),B.value=ee},ie=I=>{const ee=I.find(Re=>(Re==null?void 0:Re.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const Z=I.find(Re=>(Re==null?void 0:Re.name)==="多选"),te=I.find(Re=>(Re==null?void 0:Re.name)==="初始值");Z!=null&&Z.value&&Ao.isString(te.value)&&(te.value=[te.value]),!(Z!=null&&Z.value)&&!Ao.isString(te.value)&&(te.value="")},Be=async I=>{var ee,Z,te,Re,Ze,G,z,ce,ge,Ee,be,Le;if((I==null?void 0:I.类型)!==((Z=(ee=g.value)==null?void 0:ee.find(Y=>(Y==null?void 0:Y.label)==="类型"))==null?void 0:Z.value)){let Y=[];const J=await((Ze=(Re=(te=Oe.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:Ze.value)?await((Ee=(ge=(ce=Oe.FormContent)==null?void 0:ce.find(k=>(k==null?void 0:k.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:ge.value)==null?void 0:Ee.value):(z=(G=Oe.FormContent)==null?void 0:G.find(k=>(k==null?void 0:k.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:z.value;if(J==null||J.forEach(k=>{var Ie,we;V.value++;const ye=si(k==null?void 0:k.default)?(I==null?void 0:I[k.label])??k.value??"":k==null?void 0:k.default;Y.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:ye,prop:k==null?void 0:k.prop,id:V.value,contents:k==null?void 0:k.options,width:((we=(Ie=g.value)==null?void 0:Ie[0])==null?void 0:we.width)??1})}),I!=null&&I.菜单选项&&((be=I==null?void 0:I.菜单选项)==null?void 0:be.length)>0){const k=await Oe.menuToContentType(I==null?void 0:I.菜单选项);Y=Y==null?void 0:Y.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=k),ye))}ie(Y),g.value=await Oe.selectToBase(C.cloneDeep(Y)),s.value=await Oe.selectToBase(C.cloneDeep(Y))}else{let Y=C.cloneDeep(g.value);if(Y=Y==null?void 0:Y.map(J=>(J.value=I==null?void 0:I[J.name],J)),I!=null&&I.菜单选项&&((Le=I==null?void 0:I.菜单选项)==null?void 0:Le.length)>0){const J=await Oe.menuToContentType(I==null?void 0:I.菜单选项);Y=Y==null?void 0:Y.map(k=>((k==null?void 0:k.name)==="组信息选项"&&(k.contents=J),k))}Y=Oe.formToOptionsContents(Y),ie(Y),g.value=await Oe.selectToBase(C.cloneDeep(Y))}},Qe=I=>{I||(s.value=g.value)},ke=async I=>{await Be(I),s.value=g.value},Pe=kl(async()=>{var te,Re,Ze,G,z,ce,ge,Ee,be,Le,Y,J;s.value=g.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:(V.value++,I.id="id"+V.value);let ee=await((z=(G=(Ze=Oe.FormContent)==null?void 0:Ze.find(k=>{var ye,Ie;return(k==null?void 0:k.key)===(((Ie=(ye=s.value)==null?void 0:ye.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:G.value)==null?void 0:z.value)??((ge=(ce=Oe.FormContent)==null?void 0:ce.find(k=>{var ye,Ie;return(k==null?void 0:k.key)===(((Ie=(ye=s.value)==null?void 0:ye.find(we=>(we==null?void 0:we.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:ge.value);if((Ee=s.value)==null||Ee.forEach(k=>{const ye=ee==null?void 0:ee.find(Ie=>(Ie==null?void 0:Ie.label)===(k==null?void 0:k.label));ye&&(I[ye.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,(be=y.value)!=null&&be.find(k=>k.id===I.id))y.value=(Le=y.value)==null?void 0:Le.map(k=>(k.id===I.id&&(k=I),k));else{let k=C.cloneDeep(y.value);k.push(I),y.value=k}y.value=y.value.map(({id:k,...ye})=>ye),u.value=!1,D.value="";let Z=C.cloneDeep(i.originalItemContents);(Y=C.cloneDeep(i.originalItemContents))!=null&&Y.find(k=>(k==null?void 0:k.key)==="formContent")?Z=(J=C.cloneDeep(i.originalItemContents))==null?void 0:J.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=y.value),k)):Z.push({key:"formContent",contents:y.value}),l("change",Z)},300),ze=()=>{u.value=!1,h.value=!1,D.value="",g.value=[],B.value=[]};return e.watch(()=>i.originalItemContents,()=>{var ee,Z,te,Re,Ze,G;if(!i.originalItemContents||i.originalItemContents.length===0)return;const I=C.cloneDeep(i.originalItemContents);y.value=((ee=I==null?void 0:I.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:ee.contents)??[],p.value=((Z=I==null?void 0:I.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:Z.contents)??[],E.value=(te=I==null?void 0:I.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&te.contents?!((Re=I==null?void 0:I.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Re.contents):!0,y.value=(Ze=C.cloneDeep(y.value))==null?void 0:Ze.map((z,ce)=>{var Ee;let ge=z;return ge.id=(z==null?void 0:z.id)??ce,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((Ee=z==null?void 0:z.options)==null?void 0:Ee.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,ge}),y.value=Oe.formToOptionsContents(y.value),p.value=(G=p.value)==null?void 0:G.map((z,ce)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:ce})},{deep:!0,immediate:!0}),(I,ee)=>{const Z=e.resolveComponent("svg-icon"),te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Js,[e.createElementVNode("div",Zs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(Re,Ze)=>(e.openBlock(),e.createElementBlock("div",{key:Ze},[e.createElementVNode("div",ec,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",tc,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>L(Re)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>m(Re)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ac,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:v},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(Re,Ze)=>(e.openBlock(),e.createElementBlock("div",{key:Ze},[e.createElementVNode("div",oc,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",lc,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>P(Re)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>S(Re)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",rc,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":ee[0]||(ee[0]=Re=>E.value=Re)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:u.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ic,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Be,onChangeVisible:Qe,onBlurChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",sc,[e.createVNode(te,{onClick:ze,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(te,{class:"ok-button button",onClick:e.unref(Pe),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cc,[(e.openBlock(),e.createBlock(Nt.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:ze,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Po=Pt._export_sfc(uc,[["__scopeId","data-v-20850524"]]),dc={class:"step-module content"},pc={class:"module-data"},fc={class:"step-module layout"},hc={class:"form-content"},vc=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:""}]),g=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),y=e.ref({}),D=e.ref([]),E=L=>{var P;y.value=L,l("change",(P=B())==null?void 0:P.compData)},V=(L,P)=>{var F,m;switch(L){case"create":(F=s.value)==null||F.forEach(S=>{S.value=""}),p.value="create",h.visible=!0;break;case"update":(m=s.value)==null||m.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),p.value="update",h.visible=!0;break;case"delete":D.value.splice(P,1),p.value="delete";break}},j=L=>{var P,F,m;if((L==null?void 0:L.buttonName)==="确认"){const S=C.cloneDeep(L==null?void 0:L.content);switch(Object.keys(S).forEach(v=>{S[v]===""&&delete S[v]}),p.value){case"create":D.value.push({...S,index:((P=D.value)==null?void 0:P.length)+1});break;case"update":D.value=(F=D.value)==null?void 0:F.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:y.value}]}),Q=()=>{h.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,L=>{var P,F;L&&(y.value=((P=L==null?void 0:L.find(m=>m.key==="stepConfig"))==null?void 0:P.contents)??{},D.value=((F=L==null?void 0:L.find(m=>m.key==="stepList"))==null?void 0:F.contents)??[])},{immediate:!0}),(L,P)=>{const F=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pc,[(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=>V("update",{...S,index:v+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>V("delete",v)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",fc,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:u.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Q,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),mc=Pt._export_sfc(vc,[["__scopeId","data-v-7dbd17f2"]]),gc={class:"step-module content"},yc={class:"module-data"},bc={class:"step-module layout"},kc={class:"form-content"},xc=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({}),g=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:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),D=e.reactive({visible:!1,width:"40%",title:"时间线"}),E=L=>{var P;s.value=L,l("change",(P=B())==null?void 0:P.compData)},V=(L,P)=>{var F,m;switch(L){case"create":(F=p.value)==null||F.forEach(S=>{S.value=""}),u.value="create",D.visible=!0;break;case"update":(m=p.value)==null||m.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),u.value="update",D.visible=!0;break;case"delete":g.value.splice(P,1),u.value="delete";break}},j=L=>{var P,F,m,S;if((L==null?void 0:L.buttonName)==="确认"){const v=C.cloneDeep(L==null?void 0:L.content);switch(Object.keys(v).forEach(T=>{v[T]===""&&delete v[T]}),u.value){case"create":(F=g.value)==null||F.push({...v,index:((P=g.value)==null?void 0:P.length)+1});break;case"update":g.value=(m=g.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:g.value},{key:"timeLineConfig",contents:s.value}]}),Q=()=>{D.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,L=>{var P,F;L&&(s.value=((P=L==null?void 0:L.find(m=>m.key==="timeLineConfig"))==null?void 0:P.contents)??{},g.value=((F=L==null?void 0:L.find(m=>m.key==="timeLineList"))==null?void 0:F.contents)??[])},{immediate:!0}),(L,P)=>{const F=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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=>V("update",{...S,index:v+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>V("delete",v)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",bc,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:h.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:D.visible,title:D.title,onBeforeDestroy:Q,width:D.width},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[(e.openBlock(),e.createBlock(Nt.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)}}}),wc=Pt._export_sfc(xc,[["__scopeId","data-v-39ffc861"]]),Dc={};function _c(n,r){return e.openBlock(),e.createElementBlock("div")}const Ec=Pt._export_sfc(Dc,[["render",_c]]),Cc={class:"extra-content"},Sc={key:0},Tc={key:1},Bc={class:"dialog-footer"},Ic={__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(),g=r,h=e.ref(!1),p=e.ref({}),y=e.ref({}),D=e.ref();e.watch(()=>[i.itemData],()=>{var S;const m=C.cloneDeep(i.itemData);u.value=(S=C.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 E=(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,y.value=v,D.value=T.id)},V=m=>{var Be,Qe,ke,Pe;const S=(Qe=(Be=Object.values(C.cloneDeep(p.value)))==null?void 0:Be[0])==null?void 0:Qe.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),v=(Pe=(ke=Object.values(C.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),T=v==null?void 0:v.map((ze,I)=>{var ee;return I===m.index&&(ze==null?void 0:ze.comp)==="Table"&&(ze.compData=(ee=ze.compData)==null?void 0:ee.map(Z=>{var te,Re;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(Re=(te=m.content)==null?void 0:te.map(Ze=>{let G={};for(let z in Ze)z!=="id"&&(G[z]=Ze[z]);return G}))==null?void 0:Re.map(Ze=>Object.values(Ze))),Z})),ze});T.unshift(S==null?void 0:S[0]);let b=C.cloneDeep(p.value),ie={};for(let ze in b)ie[ze]=T;p.value=ie},j=()=>{h.value=!1,p.value={},y.value={},D.value=void 0,l.value++},B=m=>{var Be,Qe,ke,Pe;const S=(Qe=(Be=Object.values(C.cloneDeep(p.value)))==null?void 0:Be[0])==null?void 0:Qe.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),v=(Pe=(ke=Object.values(C.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),T=v==null?void 0:v.map((ze,I)=>(I===m.index&&(ze.compData=m.contents),ze));T.unshift(S==null?void 0:S[0]);let b=C.cloneDeep(p.value),ie={};for(let ze in b)ie[ze]=T;p.value=ie},Q=()=>{var S,v;let m={};for(let T in y.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]=y.value[T];g("change",{buttonName:"编辑",index:D.value,singleContent:m},"methodData"),h.value=!1,p.value={},y.value={},D.value=void 0},L=()=>{h.value=!1,p.value={},y.value={},D.value=void 0},P=m=>{g("change",m,"methodData")},F=m=>sn(m);return(m,S)=>{const v=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cc,[(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",Sc)):(e.openBlock(),e.createElementBlock("div",Tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(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:E,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:L},{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(F(T.comp)),{itemData:T==null?void 0:T.compData,onChange:V,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",Bc,[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:Q,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Nc=Pt._export_sfc(Ic,[["__scopeId","data-v-2d9c5ab2"]]),Ac={key:0,class:"method-content"},Vc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const r=e.ref([]),i=Oe.useOriginalState(C.pinia),{originalPath:l}=C.storeToRefs(i),u=n,s=e.ref(!1),g=e.ref(),h=Oe.useTableComp(C.pinia),{multipleTableConst:p}=C.storeToRefs(h),y=C.useModelComp(C.pinia),D=e.ref(!1),E=C.useMenuState(C.pinia),V=C.useLoginState(C.pinia),{itemData:j,isEdit:B,routeToChildPath:Q,tableViewContents:L,lockingPage:P,payloadTypes:F}=C.storeToRefs(y),{activeMenuPath:m,platform:S,childMenu:v}=C.storeToRefs(E),{loginUserInfo:T}=C.storeToRefs(V),b=e.ref(!1),ie=async()=>{var G,z;(G=r.value)!=null&&G.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")&&await Z((z=r.value)==null?void 0:z.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")),await Oe.onSaveBack()};e.watch(()=>j.value,async()=>{B.value==="view"&&!b.value&&await Ze(C.cloneDeep(u.itemData)),b.value=!1},{deep:!0});const Be=()=>{s.value=!1,g.value=void 0},Qe=G=>G.map(z=>{const ce={};for(const ge in z){const Ee=z[ge];if(ge.includes(p.value)){const be=ge.split(p.value);let Le=ce;be.forEach((Y,J)=>{J===be.length-1?Le[Y]=Ee:(Le[Y]||(Le[Y]={}),Le=Le[Y])})}else ce[ge]=Ee}return ce}),ke=async(G,z,ce=[])=>{var Ee,be,Le,Y,J,k,ye,Ie,we,ue,ne,de,Ce,Ge,dt;let ge=(Ee=C.cloneDeep(z))==null?void 0:Ee.filter(x=>(x==null?void 0:x.comp)!=="methodButton");if(G!=null&&G.includes("[")){let x=(k=(J=(Y=(Le=(be=C.cloneDeep(G))==null?void 0:be.split("["))==null?void 0:Le[1])==null?void 0:Y.split("]"))==null?void 0:J[0])==null?void 0:k.split(":"),A="";if(x!=null&&x[0]){let q=(ye=ge==null?void 0:ge.find(oe=>(oe==null?void 0:oe.name)===(x==null?void 0:x[0])))==null?void 0:ye.compData;if(!q){let oe=(Ie=G==null?void 0:G.split("["))==null?void 0:Ie[0],N=await Oe.getItemData(oe,sessionStorage.getItem("systemKey"),"",!1,"","",ce);q=(we=N==null?void 0:N.find(se=>(se==null?void 0:se.name)===(x==null?void 0:x[0])))==null?void 0:we.compData}q==null||q.forEach(oe=>{var N,se,Me,le,U,W;if((oe==null?void 0:oe.key)==="formContent")(N=oe==null?void 0:oe.contents)==null||N.forEach(X=>{var De;(X==null?void 0:X.key)===(x==null?void 0:x[1])&&(Array.isArray(X==null?void 0:X.value)?A=X==null?void 0:X.value:A=(De=X==null?void 0:X.value)==null?void 0:De.toString())});else if((oe==null?void 0:oe.key)==="tableContents"){let X=[],De=(se=q==null?void 0:q.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:se.contents,he=(x==null?void 0:x[1])??"";if(De!=null&&De.every(H=>Array.isArray(H))){let H=Oe.getColumnChild((U=De==null?void 0:De[0])==null?void 0:U.filter(fe=>(fe==null?void 0:fe.label)!=="操作"));(W=oe.contents)==null||W.forEach(fe=>{let re={};fe=fe==null?void 0:fe.filter(Ae=>!(Ae!=null&&Ae.id)),H==null||H.forEach((Ae,pe)=>{let Te=fe[pe];typeof fe[pe]=="number"&&(Te=fe[pe].toString()),(he===""||he===Ae.prop)&&(re[Ae.prop]=Te)}),X.push(re)}),X=Qe(X)}else{let H=(Me=De==null?void 0:De.map(fe=>fe==null?void 0:fe.label))==null?void 0:Me.filter(fe=>fe!=="操作");(le=oe.contents)==null||le.forEach(fe=>{let re={};fe=fe==null?void 0:fe.filter(Ae=>!(Ae!=null&&Ae.id)),H==null||H.forEach((Ae,pe)=>{let Te=fe[pe];typeof fe[pe]=="number"&&(Te=fe[pe].toString()),(he===""||he===Ae)&&(re[Ae]=Te)}),X.push(re)})}A=X}})}return A}else if(G!=null&&G.includes("/")){let x={};return(ue=C.cloneDeep(ge))==null||ue.forEach((A,q)=>{var oe,N,se,Me,le,U,W,X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve;if((A==null?void 0:A.comp)==="Table"){let We=Array.isArray((se=(N=(oe=A==null?void 0:A.compData)==null?void 0:oe.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:N.contents)==null?void 0:se[0])?(W=(U=(le=(Me=A==null?void 0:A.compData)==null?void 0:Me.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:le.contents)==null?void 0:U[0])==null?void 0:W.some(Ne=>Ne==null?void 0:Ne.children):[],st=(he=(De=(X=A==null?void 0:A.compData)==null?void 0:X.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:De.contents)==null?void 0:he.map(Ne=>(Ne!=null&&Ne.find(pt=>pt==null?void 0:pt.id)&&(Ne=Ne.slice(1)),Ne)),Ye=(pe=(Ae=(re=(fe=(H=A==null?void 0:A.compData)==null?void 0:H.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:fe.contents)==null?void 0:re[0])==null?void 0:Ae[0])==null?void 0:pe.label,tt=($=(Te=A==null?void 0:A.compData)==null?void 0:Te.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:$.contents;if(We)(We==null?void 0:We.length)===0?x[A.name]=x!=null&&x[A.name]?x[A.name]:Oe.tableToForm(st,tt):x[Ye]=Oe.tableToForm(st,tt);else{const Ne=[];tt=tt.slice(1,tt.length-1),tt==null||tt.forEach((pt,Je)=>{st==null||st.forEach($e=>{Ne.push({key:pt.label+$e[0],value:$e[Je+1]})})}),x["form"+q]=Ne}}else{const We=(ve=(Ve=A.compData)==null?void 0:Ve.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:ve.contents;x!=null&&x.form||(x.form=[]);const st=[];We==null||We.forEach(Ye=>{Ye.key!==""&&(Ye={key:(Ye==null?void 0:Ye.key)??(Ye==null?void 0:Ye.label),value:Ye==null?void 0:Ye.value},st.push(Ye))}),x.form=[...st,...C.cloneDeep(x==null?void 0:x.form)]}}),x}else{if(G==="createInsofDataApi"){let x=(ne=C.cloneDeep(z))==null?void 0:ne[0];return x={comp:(de=C.cloneDeep(x))==null?void 0:de.comp,compData:(Ce=C.cloneDeep(x))==null?void 0:Ce.compData,name:(Ge=C.cloneDeep(x))==null?void 0:Ge.name,isShow:(dt=C.cloneDeep(x))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:m.value},value:{pageData:x}}}return G}},Pe=async(G,z,ce)=>{var be,Le,Y;let ge=await Oe.getItemData(z,sessionStorage.getItem("systemKey"),""),Ee=ge==null?void 0:ge.find(J=>(J==null?void 0:J.name)===(ce==null?void 0:ce[0]));if(Ee){if((Ee==null?void 0:Ee.comp)==="Table"){let J={};for(let de in C.cloneDeep(G))C.cloneDeep(G)[de]!=="loginUser"?J[de]=C.cloneDeep(G)[de]:J[de]=((be=T.value)==null?void 0:be.account)||((Le=T.value)==null?void 0:Le.账号);let k=[],ye=J;Array.isArray(G)||(ye=[J]),ye==null||ye.forEach(de=>{k.push({[de[ce[1]]]:de})});let Ie=[],we=k==null?void 0:k.map(de=>{var Ce;return(Ce=Object.keys(de))==null?void 0:Ce[0]});ge==null||ge.forEach(de=>{var Ce;(de==null?void 0:de.name)===(ce==null?void 0:ce[0])&&((Ce=de==null?void 0:de.compData)==null||Ce.forEach(Ge=>{var dt;(Ge==null?void 0:Ge.key)==="tableContents"&&((dt=Ge==null?void 0:Ge.contents)==null||dt.forEach(x=>{x!=null&&x.some(A=>we.includes(A))&&Ie.push({[x.find(A=>A.id).id]:x.find(A=>we.includes(A))})}))}))});let ue=Ie==null?void 0:Ie.map(de=>{var Ce;return(Ce=Object.keys(de))==null?void 0:Ce[0]}),ne=[];if(ue==null||ue.forEach(de=>{var dt;let Ce=(dt=Ie==null?void 0:Ie.find(x=>{var A;return((A=Object.keys(x))==null?void 0:A[0].toString())===de.toString()}))==null?void 0:dt[de],Ge=k==null?void 0:k.find(x=>{var A;return((A=Object.keys(x))==null?void 0:A[0])===Ce});ne.push({id:parseInt(de),value:{tableData:Ge[Ce]}})}),(ne==null?void 0:ne.length)>0)return ne}else if((Ee==null?void 0:Ee.comp)==="Form"){let J=C.cloneDeep(Ee);J.compData=(Y=J.compData)==null?void 0:Y.map(Ie=>{var we;return(Ie==null?void 0:Ie.key)==="formContent"&&(Ie.contents=(we=Ie.contents)==null?void 0:we.map(ue=>((ue==null?void 0:ue.key)===(ce==null?void 0:ce[1])&&(ue.value=(G==null?void 0:G[ue==null?void 0:ue.prop])||G),ue))),Ie});let k={};for(let Ie in J)Ie!=="id"&&(k[Ie]=J[Ie]);let ye=[];if(ye.push({id:Ee==null?void 0:Ee.id,keyType:ce==null?void 0:ce[1],value:{pageData:k}}),(ye==null?void 0:ye.length)>0)return ye}}},ze=async(G,z,ce)=>{var be,Le,Y,J,k,ye,Ie,we,ue,ne;let ge=await Oe.getItemData(z,sessionStorage.getItem("systemKey"),""),Ee=ge==null?void 0:ge.find(de=>(de==null?void 0:de.name)===(ce==null?void 0:ce[0]));if(Ee){if((Ee==null?void 0:Ee.comp)==="Table"){let de={};for(let Ce in C.cloneDeep(G))C.cloneDeep(G)[Ce]!=="loginUser"?de[Ce]=C.cloneDeep(G)[Ce]:de[Ce]=((be=T.value)==null?void 0:be.account)||((Le=T.value)==null?void 0:Le.账号);await ct.createInsofDataApi({key:{type:"data",pageKey:z,tableId:Ee==null?void 0:Ee.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})}else if((Ee==null?void 0:Ee.comp)==="Form"){let de=C.cloneDeep(Ee),Ce=Object.keys(G),Ge="";(J=(Y=C.cloneDeep(de))==null?void 0:Y.compData)==null||J.forEach(N=>{var se,Me;(N==null?void 0:N.key)==="formContent"&&((Me=(se=C.cloneDeep(N))==null?void 0:se.contents)==null||Me.forEach(le=>{var U;Ce.includes(le==null?void 0:le.key)&&(le==null?void 0:le.value)===((U=T.value)==null?void 0:U.姓名)&&(Ge=le==null?void 0:le.key)}))});let dt=[];(k=Object.values(G[Ge]))==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 W,X,De,he,H,fe,re,Ae,pe,Te,$,Ve;let se="";(fe=(H=(he=(De=(X=(W=C.cloneDeep(N))==null?void 0:W.split("("))==null?void 0:X[1])==null?void 0:De.split(")"))==null?void 0:he[0])==null?void 0:H.split(":"))==null||fe.forEach(ve=>{se=se===""?se+ve.replaceAll("'",""):se+"/"+ve.replaceAll("'","")});let Me=[];(Ve=($=(Te=(pe=(Ae=(re=C.cloneDeep(N))==null?void 0:re.split("<"))==null?void 0:Ae[1])==null?void 0:pe.split(">"))==null?void 0:Te[0])==null?void 0:$.split(":"))==null||Ve.forEach(ve=>{Me.push(ve.replaceAll("'",""))});const le=await Oe.getItemData(se,sessionStorage.getItem("systemKey"),"");let U="";return le==null||le.forEach(ve=>{var We;ve.name===(Me==null?void 0:Me[0])&&((We=ve==null?void 0:ve.compData)==null||We.forEach(st=>{var Ye;(st==null?void 0:st.key)==="formContent"&&((Ye=st.contents)==null||Ye.forEach(tt=>{(tt==null?void 0:tt.key)===(Me==null?void 0:Me[1])&&(U=tt==null?void 0:tt.value)}))}))}),{[N]:U}}),A=await Promise.all(x);de.compData=(Ie=(ye=C.cloneDeep(de))==null?void 0:ye.compData)==null?void 0:Ie.map(N=>{var se,Me;return(N==null?void 0:N.key)==="formContent"&&(N.contents=(Me=(se=C.cloneDeep(N))==null?void 0:se.contents)==null?void 0:Me.map(le=>{var U,W,X,De;return(U=G[Ge])!=null&&U[le==null?void 0:le.key]&&(G[Ge][le==null?void 0:le.key].includes("(")?le.value=(W=A==null?void 0:A.find(he=>{var H;return((H=Object.keys(he))==null?void 0:H[0])===G[Ge][le==null?void 0:le.key]}))==null?void 0:W[G[Ge][le==null?void 0:le.key]]:le.value=(De=(X=C.cloneDeep(G))==null?void 0:X[Ge])==null?void 0:De[le==null?void 0:le.key]),le})),N});const q=await ct.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((we=q==null?void 0:q.data)==null?void 0:we.type)==="success"&&((ne=(ue=q==null?void 0:q.data)==null?void 0:ue.result)==null||ne.forEach(N=>{var se,Me;((Me=(se=N==null?void 0:N.value)==null?void 0:se.pageData)==null?void 0:Me.name)===(ce==null?void 0:ce[0])&&(oe=N.id)}),await ct.updateInsofDataApi({id:oe,value:{pageData:de}}))}}},I=(G,z="",ce={})=>{for(const[ge,Ee]of Object.entries(G)){const be=z?`${z}.${ge}`:ge;Ee!==null&&typeof Ee=="object"&&!Array.isArray(Ee)&&Object.prototype.toString.call(Ee)!=="[object Date]"?I(Ee,be,ce):ce[be]=Ee}return ce},ee=async(G,z,ce,ge)=>{var Le,Y,J,k,ye,Ie,we,ue,ne,de,Ce,Ge,dt,x,A,q,oe,N,se,Me,le,U,W,X,De;let Ee=await Oe.getItemData(z,sessionStorage.getItem("systemKey"),""),be=Ee==null?void 0:Ee.find(he=>(he==null?void 0:he.name)===(ce==null?void 0:ce[0]));if(be){if(!(ce!=null&&ce[1])&&(be==null?void 0:be.comp)==="Table"){let he={},H=[],fe=(Y=(Le=be==null?void 0:be.compData)==null?void 0:Le.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Y.contents;fe!=null&&fe.every(pe=>Array.isArray(pe))?H=(k=Oe.getColumnChild((J=fe==null?void 0:fe[0])==null?void 0:J.filter(pe=>(pe==null?void 0:pe.label)!=="操作")))==null?void 0:k.map(pe=>pe==null?void 0:pe.prop):H=fe==null?void 0:fe.map(pe=>pe==null?void 0:pe.label);for(let pe in C.cloneDeep(G))if(C.cloneDeep(G)[pe]!=="loginUser"){let Te=I(C.cloneDeep(G)[pe]),$={};for(let Ve in Te)if(H!=null&&H.find(ve=>ve===Ve))$[Ve]=Te[Ve];else if(H!=null&&H.find(ve=>(ve==null?void 0:ve.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()))){let ve=H==null?void 0:H.find(We=>(We==null?void 0:We.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()));$[ve]=Te[Ve]}he[pe]=$}else he[pe]=((ye=T.value)==null?void 0:ye.account)||((Ie=T.value)==null?void 0:Ie.账号);let re=await ct.getInsofDataApi({keyLikes:{tableId:be==null?void 0:be.id}});if(((ue=(we=re==null?void 0:re.data)==null?void 0:we.result)==null?void 0:ue.length)>0){let pe=(de=(ne=re==null?void 0:re.data)==null?void 0:ne.result)==null?void 0:de.map(Te=>Te==null?void 0:Te.id);(pe==null?void 0:pe.length)>0&&await ct.batchDeleteInsofDataApi({ids:pe})}let Ae=[];if((Ce=be==null?void 0:be.compData)!=null&&Ce.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")&&((x=(dt=(Ge=be==null?void 0:be.compData)==null?void 0:Ge.find(pe=>(pe==null?void 0:pe.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&x.includes("["))){const pe=await ct.getInsofDataApi({id:be==null?void 0:be.tableId});let Te=((N=(oe=(q=(A=pe==null?void 0:pe.data)==null?void 0:A.result)==null?void 0:q[0])==null?void 0:oe.key)==null?void 0:N.pageKey)??"";(se=Object.values(he))==null||se.forEach($=>{Ae.push({key:{type:"data",pageKey:Te,tableId:be==null?void 0:be.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(Me=Object.values(he))==null||Me.forEach(pe=>{Ae.push({key:{type:"data",pageKey:z,tableId:be==null?void 0:be.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})});(Ae==null?void 0:Ae.length)>0&&await ct.batchAddInsofDataApi({dataList:Ae})}else if(!(ce!=null&&ce[1])&&(be==null?void 0:be.comp)==="Form"){let he=C.cloneDeep(be);he.compData=(U=(le=C.cloneDeep(he))==null?void 0:le.compData)==null?void 0:U.map(re=>{var Ae,pe;return(re==null?void 0:re.key)==="formContent"&&(re.contents=(pe=(Ae=C.cloneDeep(re))==null?void 0:Ae.contents)==null?void 0:pe.map(Te=>{var $,Ve;return($=C.cloneDeep(G))!=null&&$[Te==null?void 0:Te.key]&&(Te.value=(Ve=C.cloneDeep(G))==null?void 0:Ve[Te==null?void 0:Te.key]),Te})),re});const H=await ct.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let fe="";((W=H==null?void 0:H.data)==null?void 0:W.type)==="success"&&((De=(X=H==null?void 0:H.data)==null?void 0:X.result)==null||De.forEach(re=>{var Ae,pe;((pe=(Ae=re==null?void 0:re.value)==null?void 0:Ae.pageData)==null?void 0:pe.name)===(ce==null?void 0:ce[0])&&(fe=re.id)}),await ct.updateInsofDataApi({id:fe,value:{pageData:he}}))}}},Z=async G=>{var z,ce,ge,Ee,be,Le,Y,J,k,ye,Ie,we,ue,ne,de,Ce;E.setImportLoading(!0);try{if(G.api){let Ge=new WeakMap;(ce=(z=(await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:F.value})).data.result)==null?void 0:z.filter(W=>{var X,De;return((X=W==null?void 0:W.key)==null?void 0:X.pageKey)!=="menu"&&((De=W==null?void 0:W.key)==null?void 0:De.pageKey)!=="secret"}))==null||ce.forEach(W=>{Ge[W.key.pageKey]?Ge[W.key.pageKey]=[...Ge[W.key.pageKey],W]:Ge[W.key.pageKey]=[W]});let x=await Oe.getItemData((v==null?void 0:v.value)===""?m.value:v==null?void 0:v.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),A="";if(x=x==null?void 0:x.map(W=>{var X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve;if((W==null?void 0:W.comp)==="Form")W.compData=(X=W.compData)==null?void 0:X.map(We=>{var st;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(st=We.contents)==null?void 0:st.map(Ye=>{var tt;if((Ye==null?void 0:Ye.value)===""&&(Ye==null?void 0:Ye.type)==="Select"){let Ne=Oe.judgeContents((tt=C.cloneDeep(Ye))==null?void 0:tt.optionUrl,Ge);Ye.value=Ye.value||Ne}return Ye})),We});else if((W==null?void 0:W.comp)==="Table"&&(De=W.compData)!=null&&De.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(H=(he=W.compData)==null?void 0:he.find(Ne=>(Ne==null?void 0:Ne.key)==="pageColumn"))==null?void 0:H.contents,st=((re=(fe=W.compData)==null?void 0:fe.find(Ne=>(Ne==null?void 0:Ne.key)==="pageGroup"))==null?void 0:re.contents)??"",Ye=(Te=(pe=(Ae=We==null?void 0:We.split("["))==null?void 0:Ae[1])==null?void 0:pe.split("]"))==null?void 0:Te[0];A=(($=We==null?void 0:We.split("["))==null?void 0:$[0])+((ve=(Ve=L.value)==null?void 0:Ve.find(Ne=>(Ne==null?void 0:Ne.key)===Ye))==null?void 0:ve.value)}return W}),!(A===""||A==="")){const W=await Oe.getItemData(A,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);x=x==null?void 0:x.map(X=>{var De,he,H,fe,re,Ae,pe,Te,$,Ve,ve,We,st;if((X==null?void 0:X.comp)==="Table"&&(De=X.compData)!=null&&De.find(Ye=>(Ye==null?void 0:Ye.key)==="pageColumn")){let Ye=(H=(he=X.compData)==null?void 0:he.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:H.contents,tt=((re=(fe=X.compData)==null?void 0:fe.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:re.contents)??"",Ne=(Te=(pe=(Ae=Ye==null?void 0:Ye.split("["))==null?void 0:Ae[1])==null?void 0:pe.split("]"))==null?void 0:Te[0],pt=(($=Ye==null?void 0:Ye.split("["))==null?void 0:$[0])+((ve=(Ve=L.value)==null?void 0:Ve.find($e=>($e==null?void 0:$e.key)===Ne))==null?void 0:ve.value),Je=(We=W==null?void 0:W.find($e=>($e==null?void 0:$e.name)===(tt===""?u==null?void 0:u.compName:tt)))==null?void 0:We.compData;X.compData=(st=X.compData)==null?void 0:st.map($e=>{var rt;return($e==null?void 0:$e.key)==="tableContents"&&($e.contents=(rt=Je==null?void 0:Je.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:rt.contents),$e})}return X})}let q={};if(((Ee=(ge=G==null?void 0:G.extraValues)==null?void 0:ge.input)==null?void 0:Ee.length)>0){const W=(Le=(be=G==null?void 0:G.extraValues)==null?void 0:be.input)==null?void 0:Le.map(async X=>{var De;te!=null&&te.find(he=>he===X)?q=await ke(X,x):q[Object.keys(X)[0]]=await ke((De=Object.values(X))==null?void 0:De[0],x,Ge)});await Promise.all(W)}else q=await ke("/",x);let oe=!1;(J=(Y=G==null?void 0:G.extraValues)==null?void 0:Y.output)==null||J.forEach(W=>{var X,De;(De=(X=Object.values(W))==null?void 0:X[0])!=null&&De.includes(".doc")&&(oe=!0)});let N;if(oe){const W=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});N=await ct.axios.post(G.api,q,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{W.close()})}else N=await ct.axios.post(G.api,q,{headers:{"Content-Type":"application/json"}});let se=(we=(Ie=(ye=(k=C.cloneDeep(G))==null?void 0:k.extraValues)==null?void 0:ye.output)==null?void 0:Ie.map(W=>{var X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve,We,st,Ye,tt;if(!((De=(X=Object.values(W))==null?void 0:X[0])!=null&&De.includes(".doc"))){let Ne=($=(Te=(pe=(H=C.cloneDeep((he=Object.values(W))==null?void 0:he[0]))==null?void 0:H.split("["))==null?void 0:pe[((Ae=(re=C.cloneDeep((fe=Object.values(W))==null?void 0:fe[0]))==null?void 0:re.split("["))==null?void 0:Ae.length)-1])==null?void 0:Te.split("]"))==null?void 0:$[0],pt=Ne==null?void 0:Ne.split(":"),Je=(We=C.cloneDeep((Ve=Object.values(W))==null?void 0:Ve[0]))==null?void 0:We.substring(0,C.cloneDeep((ve=Object.values(W))==null?void 0:ve[0]).lastIndexOf("["));if(Je=(Ye=C.cloneDeep(Je))==null?void 0:Ye.slice(0,((st=C.cloneDeep(Je))==null?void 0:st.length)-1),Je!=null&&Je.includes("[")){let $e="";if((tt=Oe.contentTransArrayToAll(Je,"/"))==null||tt.forEach(rt=>{var mt,wt,He,ot,yt,je,Ke;if(!(rt!=null&&rt.includes("[")))$e=$e===""?$e+rt.replaceAll("/",""):$e+"/"+rt.replaceAll("/","");else{let Xe=C.cloneDeep(rt).slice(1,((mt=C.cloneDeep(rt))==null?void 0:mt.length)-1),Se=(je=(yt=(ot=(He=(wt=C.cloneDeep(Xe))==null?void 0:wt.split("["))==null?void 0:He[1])==null?void 0:ot.split("]"))==null?void 0:yt[0])==null?void 0:je.split(":"),M="",me=(Ke=x==null?void 0:x.find(xe=>(xe==null?void 0:xe.name)===(Se==null?void 0:Se[0])))==null?void 0:Ke.compData;me==null||me.forEach(xe=>{var at;(xe==null?void 0:xe.key)==="formContent"&&((at=xe==null?void 0:xe.contents)==null||at.forEach(et=>{(et==null?void 0:et.key)===(Se==null?void 0:Se[1])&&(M=et==null?void 0:et.value)}))}),$e=$e===""?$e+M.replaceAll("/",""):$e+"/"+M.replaceAll("/","")}}),Je=$e,Je[(Je==null?void 0:Je.length)-1]!=="/")return Je}}}))==null?void 0:we.filter(W=>W);se=[...new Set(C.cloneDeep(se))];let Me=se==null?void 0:se.map(async W=>{let X=await Oe.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((X==null?void 0:X.length)===0)return await Oe.getParentContents(W)});await Promise.all(Me);let le=[],U=(de=(ne=(ue=C.cloneDeep(G))==null?void 0:ue.extraValues)==null?void 0:ne.output)==null?void 0:de.map(async W=>{var pe,Te,$,Ve,ve,We,st,Ye,tt,Ne,pt,Je,$e,rt,mt,wt,He,ot,yt,je,Ke,Xe,Se,M,me,xe,at,et,Et,_t,ut,ft,vt,gt,Lt,bt,zt,Rt,Kt,Ht,Jt,ta,Ft,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma,Ct;if((Te=(pe=Object.values(W))==null?void 0:pe[0])!=null&&Te.includes(".doc")){var X=new Blob([N.data],{type:"application/octet-stream;charset=UTF-8"}),De=N.headers["content-disposition"],he=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),H=he.exec(De),fe=H==null?void 0:H[1],re=document.createElement("a"),Ae=window.URL.createObjectURL(X);g.value=[{name:fe,blobUrl:Ae}],s.value=!0}else{let aa=(Ne=(tt=(Ye=(Ve=C.cloneDeep(($=Object.values(W))==null?void 0:$[0]))==null?void 0:Ve.split("["))==null?void 0:Ye[((st=(We=C.cloneDeep((ve=Object.values(W))==null?void 0:ve[0]))==null?void 0:We.split("["))==null?void 0:st.length)-1])==null?void 0:tt.split("]"))==null?void 0:Ne[0],nt=aa==null?void 0:aa.split(":"),qt=($e=C.cloneDeep((pt=Object.values(W))==null?void 0:pt[0]))==null?void 0:$e.substring(0,C.cloneDeep((Je=Object.values(W))==null?void 0:Je[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(mt=C.cloneDeep(qt))==null?void 0:mt.slice(0,((rt=C.cloneDeep(qt))==null?void 0:rt.length)-1):qt===""&&(qt=m.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Dt="";(wt=Oe.contentTransArrayToAll(qt,"/"))==null||wt.forEach((It,Mt)=>{var $t,At,na,Yt,za,Qa,Ra,en,Tn,cn,yn;if(!(It!=null&&It.includes("[")))Dt=Dt===""?Dt+It.replaceAll("/",""):Dt+"/"+It.replaceAll("/","");else{let un="",ha="";($t=C.cloneDeep(It))!=null&&$t.includes("]")?(un=C.cloneDeep(It).slice(1,((At=C.cloneDeep(It))==null?void 0:At.length)-1),ha=(Ra=(Qa=(za=(Yt=(na=C.cloneDeep(un))==null?void 0:na.split("["))==null?void 0:Yt[1])==null?void 0:za.split("]"))==null?void 0:Qa[0])==null?void 0:Ra.split(":")):(un=C.cloneDeep(It).slice(1,(en=C.cloneDeep(It))==null?void 0:en.length),ha=(Tn=C.cloneDeep(un))==null?void 0:Tn.split("/"));let tn="",dn=(cn=x==null?void 0:x.find(ua=>(ua==null?void 0:ua.name)===(ha==null?void 0:ha[0])))==null?void 0:cn.compData;dn==null||dn.forEach(ua=>{var Bn;(ua==null?void 0:ua.key)==="formContent"&&((Bn=ua==null?void 0:ua.contents)==null||Bn.forEach(Pa=>{(Pa==null?void 0:Pa.key)===(ha==null?void 0:ha[1])&&(tn=Pa==null?void 0:Pa.value)}))}),((yn=Oe.contentTransArrayToAll(qt,"/"))==null?void 0:yn.length)-1!==Mt?Dt=Dt===""?Dt+tn.replaceAll("/",""):Dt+"/"+tn.replaceAll("/",""):Dt=Dt+l.value+tn.replaceAll("/","")}}),(He=m.value)!=null&&He.includes(Dt)?qt=m.value:qt=Dt}let St=C.cloneDeep((ot=Object.keys(W))==null?void 0:ot[0]);if(((yt=N==null?void 0:N.data)==null?void 0:yt.statusCode)===200||((je=N==null?void 0:N.data)==null?void 0:je.code)===200){if(((Xe=(Ke=N==null?void 0:N.data)==null?void 0:Ke.data)!=null&&Xe[St]||(M=(Se=N==null?void 0:N.data)==null?void 0:Se.result)!=null&&M[St])&&(nt==null?void 0:nt.length)===1)return await ee(((xe=(me=N==null?void 0:N.data)==null?void 0:me.data)==null?void 0:xe[St])||((et=(at=N==null?void 0:N.data)==null?void 0:at.result)==null?void 0:et[St]),C.cloneDeep(qt),nt,A);if((_t=(Et=N==null?void 0:N.data)==null?void 0:Et.data)!=null&&_t[St]||(ft=(ut=N==null?void 0:N.data)==null?void 0:ut.result)!=null&&ft[St]){let Dt=await Pe(((gt=(vt=N==null?void 0:N.data)==null?void 0:vt.data)==null?void 0:gt[St])||((bt=(Lt=N==null?void 0:N.data)==null?void 0:Lt.result)==null?void 0:bt[St]),C.cloneDeep(qt),nt);return Dt&&(le=[...le,...Dt]),Dt}else{if(!((zt=N==null?void 0:N.data)!=null&&zt.data)){let Dt=await Oe.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);Dt=Dt==null?void 0:Dt.map(Mt=>{var $t;return(Mt==null?void 0:Mt.name)===(nt==null?void 0:nt[0])&&(Mt.compData=($t=Mt.compData)==null?void 0:$t.map(At=>{var na;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(na=At.contents)==null?void 0:na.map(Yt=>{var za,Qa;return(Yt==null?void 0:Yt.key)===(nt==null?void 0:nt[1])&&(Yt.value=(Qa=(za=N==null?void 0:N.data)==null?void 0:za.result)==null?void 0:Qa[St==null?void 0:St.replaceAll(":","")]),Yt})),At})),Mt});let It=[];(Rt=Dt==null?void 0:Dt.filter(Mt=>(Mt==null?void 0:Mt.comp)==="Form"))==null||Rt.forEach(async Mt=>{let $t={};for(let At in Mt)At!=="id"&&($t[At]=Mt[At]);It.push({id:Mt==null?void 0:Mt.id,value:{pageData:$t}})}),(It==null?void 0:It.length)>0&&await ct.batchUpdateInsofDataApi({dataList:It});return}if((nt==null?void 0:nt.length)===1){const Dt=(Jt=(Ht=(Kt=N==null?void 0:N.data)==null?void 0:Kt.data)==null?void 0:Ht.path)==null?void 0:Jt.path;let It="";(ja=(wa=(Fa=(Ft=(ta=Dt==null?void 0:Dt.split("("))==null?void 0:ta[1])==null?void 0:Ft.split(")"))==null?void 0:Fa[0])==null?void 0:wa.split(":"))==null||ja.forEach(At=>{var na,Yt;It=It===""?It+((na=At==null?void 0:At.replaceAll("'",""))==null?void 0:na.trim()):It+"/"+((Yt=At==null?void 0:At.replaceAll("'",""))==null?void 0:Yt.trim())});let Mt=[(Ha=(Wa=(Ka=(Ua=(Da=Dt==null?void 0:Dt.split("<"))==null?void 0:Da[1])==null?void 0:Ua.split(">"))==null?void 0:Ka[0])==null?void 0:Wa.replaceAll("'",""))==null?void 0:Ha.trim()],$t;return(ya=(Na=(qa=N==null?void 0:N.data)==null?void 0:qa.data)==null?void 0:Na.data)!=null&&ya[nt==null?void 0:nt[0]]?$t=await ee((ba=(_a=(fa=N==null?void 0:N.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ba[nt==null?void 0:nt[0]],It,nt,A):$t=await ze((ma=(ca=N==null?void 0:N.data)==null?void 0:ca.data)==null?void 0:ma.data,It,Mt,Ge),$t}else{const Dt=(Va=(Aa=(Xa=N==null?void 0:N.data)==null?void 0:Xa.data)==null?void 0:Aa.path)==null?void 0:Va.path;let It="";return(Ja=(Oa=(Ga=(Ya=(Ea=Dt==null?void 0:Dt.split("("))==null?void 0:Ea[1])==null?void 0:Ya.split(")"))==null?void 0:Ga[0])==null?void 0:Oa.split(":"))==null||Ja.forEach($t=>{var At,na;It=It===""?It+((At=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:At.trim()):It+"/"+((na=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:na.trim())}),await Pe((Ct=(Ma=(Za=N==null?void 0:N.data)==null?void 0:Za.data)==null?void 0:Ma.data)==null?void 0:Ct[nt==null?void 0:nt[0]],It,nt)}}}}});if(await Promise.all(U),(le==null?void 0:le.length)>0){let W=[];le==null||le.forEach(he=>{W!=null&&W.find(H=>{var fe,re,Ae,pe;return((re=(fe=H==null?void 0:H.value)==null?void 0:fe.pageData)==null?void 0:re.name)===((pe=(Ae=he==null?void 0:he.value)==null?void 0:Ae.pageData)==null?void 0:pe.name)})||W.push(he)});let X=[];W==null||W.forEach(he=>{var re,Ae,pe,Te;let H=C.cloneDeep(he);H.value.pageData.compData=(re=H.value.pageData.compData)==null?void 0:re.map($=>{var Ve;return($==null?void 0:$.key)==="formContent"&&($.contents=(Ve=$.contents)==null?void 0:Ve.map(ve=>{var st,Ye,tt,Ne;let We=(st=C.cloneDeep(le))==null?void 0:st.find(pt=>(pt==null?void 0:pt.keyType)===(ve==null?void 0:ve.key));if(We){let pt=(Ne=(tt=(Ye=We.value.pageData.compData)==null?void 0:Ye.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ne.find(Je=>(Je==null?void 0:Je.key)===(ve==null?void 0:ve.key));ve.value=pt==null?void 0:pt.value}return ve})),$}),X.push({id:H==null?void 0:H.id,value:H==null?void 0:H.value});let fe=[];(Te=(pe=(Ae=H==null?void 0:H.value)==null?void 0:Ae.pageData)==null?void 0:pe.compData)==null||Te.forEach($=>{var Ve;($==null?void 0:$.key)==="formContent"&&((Ve=$==null?void 0:$.contents)==null||Ve.forEach(ve=>{var We,st,Ye,tt,Ne,pt;if((st=(We=ve==null?void 0:ve.optionUrl)==null?void 0:We.menuSelect)!=null&&st.find(Je=>Je==null?void 0:Je.includes("[")))if(fe!=null&&fe.find(Je=>{var $e,rt,mt;return(($e=Je==null?void 0:Je.key)==null?void 0:$e.join(","))===((mt=(rt=ve==null?void 0:ve.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:mt.join(","))})){let Je=(Ye=fe==null?void 0:fe.find($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ve==null?void 0:ve.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))}))==null?void 0:Ye.value;Je.push({key:ve==null?void 0:ve.prop,groups:(tt=ve==null?void 0:ve.optionUrl)==null?void 0:tt.groupSelect,value:ve==null?void 0:ve.value}),fe=fe==null?void 0:fe.map($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ve==null?void 0:ve.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))&&($e.value=Je),$e})}else fe.push({key:(Ne=ve==null?void 0:ve.optionUrl)==null?void 0:Ne.menuSelect,value:[{key:ve==null?void 0:ve.prop,groups:(pt=ve==null?void 0:ve.optionUrl)==null?void 0:pt.groupSelect,value:ve==null?void 0:ve.value}]})}))}),(fe==null?void 0:fe.length)>0&&(fe=fe==null?void 0:fe.map($=>{var ve;let Ve="";return(ve=$==null?void 0:$.key)==null||ve.forEach(We=>{var st;if(!(We!=null&&We.includes("[")))Ve=Ve===""?Ve+We:Ve+"/"+We;else{let Ye="",tt=(st=We==null?void 0:We.replaceAll("[","").replaceAll("]",""))==null?void 0:st.split(":");x==null||x.forEach(Ne=>{var pt;(Ne==null?void 0:Ne.name)===(tt==null?void 0:tt[0])&&((pt=Ne==null?void 0:Ne.compData)==null||pt.forEach(Je=>{var $e;(Je==null?void 0:Je.key)==="formContent"&&(($e=Je==null?void 0:Je.contents)==null||$e.forEach(rt=>{(rt==null?void 0:rt.prop)===(tt==null?void 0:tt[1])&&(Ye=rt==null?void 0:rt.value)}))}))}),Ve=Ve+l.value+Ye}}),$.key=Ve,$})),fe==null||fe.forEach($=>{var st,Ye,tt;let Ve=(st=Ge[$.key])==null?void 0:st.find(Ne=>{var pt,Je,$e,rt,mt,wt,He;return((Je=(pt=Ne==null?void 0:Ne.value)==null?void 0:pt.pageData)==null?void 0:Je.name)===((mt=(rt=($e=$==null?void 0:$.value)==null?void 0:$e[0])==null?void 0:rt.groups)==null?void 0:mt[0])&&((He=(wt=Ne==null?void 0:Ne.value)==null?void 0:wt.pageData)==null?void 0:He.name)!==void 0}),ve=Ve==null?void 0:Ve.id,We=(Ye=Ve==null?void 0:Ve.value)==null?void 0:Ye.pageData;We.compData=(tt=We.compData)==null?void 0:tt.map(Ne=>{var pt;return(Ne==null?void 0:Ne.key)==="formContent"&&(Ne.contents=(pt=Ne.contents)==null?void 0:pt.map(Je=>{var rt;let $e=(rt=$.value)==null?void 0:rt.find(mt=>(mt==null?void 0:mt.key)===(Je==null?void 0:Je.prop));return $e&&(Je.value=$e.value),Je})),Ne}),X.push({id:ve,value:{pageData:We}})})});let De=(Ce=C.cloneDeep(le))==null?void 0:Ce[0];(X==null?void 0:X.length)>0&&await ct.batchUpdateInsofDataApi({dataList:X})}y.setFreshContent(!0)}E.setImportLoading(!1)}catch{ct.ElMessage.error("方法执行错误,请查看方法!"),E.setImportLoading(!1)}b.value=!0},te=["createInsofDataApi"],Re=kl(async G=>{Z(G)},100),Ze=async G=>{var Y,J,k,ye,Ie;const z=C.cloneDeep(G);let ce,ge=new WeakMap,Ee=await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:F.value});(J=(Y=Ee.data.result)==null?void 0:Y.filter(we=>{var ue,ne;return((ue=we==null?void 0:we.key)==null?void 0:ue.pageKey)!=="menu"&&((ne=we==null?void 0:we.key)==null?void 0:ne.pageKey)!=="secret"}))==null||J.forEach(we=>{ge[we.key.pageKey]?ge[we.key.pageKey]=[...ge[we.key.pageKey],we]:ge[we.key.pageKey]=[we]}),G!=null&&G[0].path&&(ce=await(z==null?void 0:z.map(async(we,ue)=>{var q,oe,N,se,Me,le,U,W,X,De,he,H,fe,re,Ae,pe;const de=(q=ge[we==null?void 0:we.path])==null?void 0:q.filter(Te=>{var $;return(($=Te==null?void 0:Te.key)==null?void 0:$.type)==="data"});let Ce="";const Ge=await Oe.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);de==null||de.forEach(Te=>{var $,Ve,ve,We,st;((Ve=($=Te==null?void 0:Te.value)==null?void 0:$.tableData)==null?void 0:Ve.算法名称)===((ve=z==null?void 0:z[ue])==null?void 0:ve.method)&&(Ce=(st=(We=Te==null?void 0:Te.value)==null?void 0:We.tableData)==null?void 0:st.算法体)});const dt=await Oe.getItemData(we==null?void 0:we.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge);let x="",A=(Me=(se=(N=(oe=dt==null?void 0:dt[0])==null?void 0:oe.compData)==null?void 0:N.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:se.contents)==null?void 0:Me.findIndex(Te=>(Te==null?void 0:Te.prop)==="算法体");return(U=(le=dt==null?void 0:dt[0])==null?void 0:le.compData)==null||U.forEach(Te=>{var $;(Te==null?void 0:Te.key)==="tableContents"&&(($=Te==null?void 0:Te.contents)==null||$.forEach(Ve=>{Ve!=null&&Ve.find(ve=>ve===(we==null?void 0:we.method))&&(x=Ve[A])}))}),{buttonName:((W=z==null?void 0:z[ue])==null?void 0:W.method)||((he=(De=(X=de==null?void 0:de[0])==null?void 0:X.value)==null?void 0:De.tableData)==null?void 0:he.算法名称),api:(Ce===""?(re=(fe=(H=de==null?void 0:de[0])==null?void 0:H.value)==null?void 0:fe.tableData)==null?void 0:re.算法体:Ce)||x,content:Ge==null?void 0:Ge.filter(Te=>Te.comp!=="methodButton"),extraContent:(Ae=C.cloneDeep(we.value))==null?void 0:Ae.slice(1),methodName:(we==null?void 0:we.path)??"",extraValues:(pe=z==null?void 0:z[ue])==null?void 0:pe.data}})));const be=z==null?void 0:z.map(async we=>{var dt,x,A,q,oe,N;const ue=(dt=Ee.data.result)==null?void 0:dt.filter(se=>{var Me,le,U;return((Me=se==null?void 0:se.key)==null?void 0:Me.parentTable)===""&&((le=se==null?void 0:se.key)==null?void 0:le.type)==="method"&&((U=se==null?void 0:se.key)==null?void 0:U.methodName)===se.method}),ne=ue==null?void 0:ue[0],de=(x=Ee.data.result)==null?void 0:x.filter(se=>{var Me,le;return((Me=se==null?void 0:se.key)==null?void 0:Me.type)==="methodData"&&((le=se==null?void 0:se.key)==null?void 0:le.tableId)===(ne==null?void 0:ne.id)}),Ce=await Oe.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ge),Ge=de==null?void 0:de[0];return{buttonName:(A=ne==null?void 0:ne.key)==null?void 0:A.methodKey,api:(oe=(q=Ge==null?void 0:Ge.value)==null?void 0:q.tableData)==null?void 0:oe[0],content:Ce==null?void 0:Ce.filter(se=>se.comp!=="methodButton"),extraContent:(N=C.cloneDeep(we.value))==null?void 0:N.slice(1),methodName:(we==null?void 0:we.method)??""}}),Le=(k=G==null?void 0:G[0])!=null&&k.path&&((ye=G==null?void 0:G[0])==null?void 0:ye.path)!==""?await Promise.all(ce):await Promise.all(be);r.value=Le==null?void 0:Le.filter(we=>we==null?void 0:we.extraContent),(Ie=r.value)==null||Ie.forEach(we=>{var ue;we.api===""&&((ue=we.content)==null||ue.forEach(ne=>{var de;ne.comp=="Table"&&y.setExtraContents(Oe.methodTableToContent(ne.compData,(de=we.extraContent)==null?void 0:de[0]))}))})};return e.watch(()=>u.itemData,async()=>{B.value=="view"&&!b.value&&await Ze(C.cloneDeep(u.itemData)),b.value=!1},{immediate:!0,deep:!0}),(G,z)=>{var ce,ge,Ee;return e.unref(B)!=="edit"?(e.openBlock(),e.createElementBlock("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=r.value)==null?void 0:ce.filter(be=>(be==null?void 0:be.buttonName)!=="保存"),be=>{var Le;return e.openBlock(),e.createElementBlock("div",null,[be.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(P)===e.unref(m)&&!((Le=be==null?void 0:be.buttonName)!=null&&Le.includes("预览")),class:"calculator-content",modelValue:be.buttonName,onClickTrigger:Y=>e.unref(Re)(be),loading:D.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Q)!==""&&((Ee=e.unref(m))==null?void 0:Ee[((ge=e.unref(m))==null?void 0:ge.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(Nt.ssFilePreview,{key:0,fileDataList:g.value,onDestroy:Be},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oc=Pt._export_sfc(Vc,[["__scopeId","data-v-11fca7e0"]]),Mc={};function zc(n,r){return" 567 "}const Rc=Pt._export_sfc(Mc,[["render",zc]]),Pc={class:"module content"},Lc={class:"module data"},$c={class:"module layout"},Fc={class:"form-content"},jc=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"),g=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:""}]),y=e.ref({}),D=e.ref([]),E=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:D.value},{key:"signConfig",contents:y.value}]}),V=L=>{var P;y.value=C.cloneDeep(L),l("change",(P=E())==null?void 0:P.compData)},j=L=>{var P,F;if((L==null?void 0:L.buttonName)==="确认"){const m=C.cloneDeep(L==null?void 0:L.content);switch(s.value){case"create":D.value.push({...m,index:((P=D.value)==null?void 0:P.length)+1});break}l("change",(F=E())==null?void 0:F.compData),u.visible=!1}else u.visible=!1},B=(L,P)=>{var F,m;switch(L){case"create":(F=p.value)==null||F.forEach(S=>{S.value=""}),s.value="create",u.visible=!0;break;case"update":(m=p.value)==null||m.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),s.value="update",u.visible=!0;break;case"delete":D.value.splice(P,1),s.value="delete";break}},Q=()=>{u.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,L=>{var P,F;L&&(y.value=((P=L==null?void 0:L.find(m=>m.key==="signConfig"))==null?void 0:P.contents)??{},D.value=((F=L==null?void 0:L.find(m=>m.key==="signTypeList"))==null?void 0:F.contents)??[])},{immediate:!0}),(L,P)=>{const F=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>B("create"))},{icon:e.withCtx(()=>[e.createVNode(F,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Lc,[(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(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:T=>B("delete",v)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",$c,[e.createVNode(Nt.ssForm,{rowContents:h.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:Q,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fc,[(e.openBlock(),e.createBlock(Nt.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)}}}),Uc=Pt._export_sfc(jc,[["__scopeId","data-v-487e0536"]]),Kc=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 E,V;return(E=i==null?void 0:i.stepConfig)!=null&&E.allowTrigger?u.value:(V=i==null?void 0:i.stepConfig)==null?void 0:V.active}),g=(E,V)=>{u.value=V,l("clickStep",E,V)},h=E=>Nt.getComponent(E),p=()=>{var V;const E=(V=i==null?void 0:i.stepList)==null?void 0:V.find((j,B)=>B+1===s.value);return console.log("findStep",E),E?E==null?void 0:E.children:[]},y=E=>{l("clickTrigger",E)},D=E=>{l("changeTrigger",E)};return(E,V)=>{var Q,L,P,F,m;const j=e.resolveComponent("el-step"),B=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(B,{direction:(Q=n.stepConfig)==null?void 0:Q.direction,active:s.value,"finish-status":"success",simple:(L=n.stepConfig)==null?void 0:L.simple,"align-center":((P=n.stepConfig)==null?void 0:P.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=>g(S,v+1)},{title:e.withCtx(()=>[e.renderSlot(E.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(E.$slots,"description",{description:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(F=n.stepConfig)!=null&&F.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:y,onChangeTrigger:D,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(E.$slots,(T,b)=>({name:b,fn:e.withCtx(ie=>[e.renderSlot(E.$slots,b,e.mergeProps({ref_for:!0},ie||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Wc=Pt._export_sfc(Kc,[["__scopeId","data-v-d7c99969"]]),Hc=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([]),g=(h,p)=>{l("clickStep",h,p)};return e.watch(()=>i==null?void 0:i.itemData,h=>{var p,y;s.value=(p=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepList"))==null?void 0:p.contents,u.value=(y=h==null?void 0:h.find(D=>(D==null?void 0:D.key)==="stepConfig"))==null?void 0:y.contents},{immediate:!0,deep:!0}),(h,p)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Wc,{stepConfig:u.value,stepList:s.value,onClickStep:g},{icon:e.withCtx(()=>[e.createVNode(y,{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"])}}}),qc=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,g)=>(e.openBlock(),e.createBlock(l,{key:g,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})}}}),Xc=Pt._export_sfc(qc,[["__scopeId","data-v-4172a886"]]),Yc={class:"line-content"},Gc={class:"line-time"},Jc=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,g;l.value=(s=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:s.contents,i.value=(g=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:g.contents},{immediate:!0}),(u,s)=>(e.openBlock(),e.createBlock(Xc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:g,timestamp:h})=>[e.createElementVNode("span",Yc,e.toDisplayString(g),1),e.createElementVNode("span",Gc,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Zc=Pt._export_sfc(Jc,[["__scopeId","data-v-b4d9deed"]]),Qc={class:"tabs-content"},eu={__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",Qc,[e.createVNode(Nt.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},tu=Pt._export_sfc(eu,[["__scopeId","data-v-40865f68"]]),Gn=C.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}}}),au={class:"type-select"},nu=["onClick"],ou={class:"list-icon"},lu={__name:"modelSelect",setup(n){const r=Gn(C.pinia),{itemData:i}=C.storeToRefs(r),l=u=>{const s=C.cloneDeep(i.value);s.push({comp:u.comp,name:u.name,compData:[]}),r.setItemData(s)};return(u,s)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(fr),(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:y=>l(h)},[e.createElementVNode("div",ou,[e.createVNode(g,{name:h.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(h.name),1)],8,nu)]))),128))])}}},ru=Pt._export_sfc(lu,[["__scopeId","data-v-91799bf8"]]),iu={class:"fill-content"},su={class:"operate-content"},cu={class:"collapse-title-content"},uu={class:"collapse-title-item"},du={key:1},pu=["onClick"],fu={class:"icon-content"},hu={key:0,class:"edit-content"},vu=["onClick"],mu={class:"comp-child"},gu={__name:"modelFill",setup(n){const r=Gn(C.pinia),{itemData:i,originalData:l}=C.storeToRefs(r),u=e.ref([]);e.ref([]);const s=e.ref([]),g=e.ref([]),h=j=>{var Q;let B=(Q=C.cloneDeep(g.value))==null?void 0:Q.map((L,P)=>(j===P&&(L.content=!0),L));g.value=B},p=j=>{var Q;let B=(Q=C.cloneDeep(g.value))==null?void 0:Q.map((L,P)=>(j===P&&(L.content=!1),L));g.value=B,u.value=C.cloneDeep(i.value)},y=(j,B)=>{var F;let Q=(F=C.cloneDeep(g.value))==null?void 0:F.map((m,S)=>(j===S&&(m.content=!1),m));g.value=Q;const L=C.cloneDeep(i.value),P=L==null?void 0:L.filter((m,S)=>(S===j&&(m.name=B),m));r.setOriginalData(P),r.setItemData(P)};e.watch(()=>i.value,()=>{var j,B,Q;!i.value||((j=i.value)==null?void 0:j.length)===0?u.value=[]:u.value=(B=C.cloneDeep(i.value))==null?void 0:B.filter(L=>(L==null?void 0:L.comp)!=="methodButton"),s.value=u.value,g.value=(Q=C.cloneDeep(s.value))==null?void 0:Q.map((L,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const D=j=>sn(j),E=(j,B,Q)=>{var P,F;if(!j)return;let L=C.cloneDeep(i.value);L=(P=L==null?void 0:L.map((m,S)=>(S===Q&&(m.compData=j),m)))==null?void 0:P.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),g.value=(F=C.cloneDeep(L))==null?void 0:F.map((m,S)=>({id:S,content:!1})),r.setOriginalData(L),r.setItemData(L)},V=j=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=C.cloneDeep(i.value),Q=B==null?void 0:B.filter((L,P)=>P!==j);r.setOriginalData(Q),r.setItemData(Q),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(j,B)=>{const Q=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",iu,[B[1]||(B[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",su,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:u.value},{title:e.withCtx(({item:L,index:P})=>{var F,m,S,v,T,b,ie,Be,Qe,ke;return[e.createElementVNode("div",cu,[e.createElementVNode("div",uu,[(m=(F=g.value)==null?void 0:F.find(Pe=>Pe.id===P))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:L.name&&L.name!==""?"8px":"0px"})},e.toDisplayString(L.name),5)),(v=(S=g.value)==null?void 0:S.find(Pe=>Pe.id===P))!=null&&v.content?(e.openBlock(),e.createElementBlock("div",du,[e.createVNode(Nt._sfc_main$2,{modelValue:L.name,"onUpdate:modelValue":Pe=>L.name=Pe,onClick:B[0]||(B[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(b=(T=g.value)==null?void 0:T.find(Pe=>Pe.id===P))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Pe=>h(P),["stop"]),class:"icon-content"},[e.createVNode(Q,{name:"Edit",style:{width:"16px",height:"16px"}})],8,pu))]),e.createElementVNode("div",fu,[(Be=(ie=g.value)==null?void 0:ie.find(Pe=>Pe.id===P))!=null&&Be.content?(e.openBlock(),e.createElementBlock("div",hu,[e.createVNode(Q,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Pe=>p(P),["stop"])},null,8,["onClick"]),e.createVNode(Q,{name:"Save",onClick:e.withModifiers(Pe=>y(P,L.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ke=(Qe=g.value)==null?void 0:Qe.find(Pe=>Pe.id===P))!=null&&ke.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Pe=>V(P),["stop"]),class:"icon-content"},[e.createVNode(Q,{name:"Delete",style:{width:"16px",height:"16px"}})],8,vu))])])]}),content:e.withCtx(({item:L,index:P})=>{var F,m;return[e.createElementVNode("div",mu,[e.createTextVNode(e.toDisplayString(D(L.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(L.comp+"Operate")),{itemContents:L==null?void 0:L.compData,originalItemContents:(m=(F=s.value)==null?void 0:F.find((S,v)=>v===P))==null?void 0:m.compData,onChange:S=>E(S,L,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},yu=Pt._export_sfc(gu,[["__scopeId","data-v-a46a44b9"]]),bu={key:0,class:"show-content"},ku={style:{display:"flex"}},xu={__name:"modelShow",setup(n){const r=Gn(C.pinia),{itemData:i}=C.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=C.cloneDeep(i.value)},{deep:!0,immediate:!0});const u=s=>sn(s);return(s,g)=>{var h;return((h=l.value)==null?void 0:h.length)>0?(e.openBlock(),e.createElementBlock("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:y},[e.createElementVNode("div",ku,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:y},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},wu=Pt._export_sfc(xu,[["__scopeId","data-v-3f3e863e"]]),Du={class:"tabs-header"},_u={class:"tabs-list"},Eu={class:"tab-name"},Cu={class:"tab-actions"},Su=["onClick"],Tu=["onClick"],Bu=["onClick"],Iu={class:"model-operate"},Nu={class:"model-select",style:{display:"unset"}},Au={class:"existing-components"},Vu={class:"component-list"},Ou=["onClick"],Mu={class:"component-info"},zu={class:"component-type"},Ru={class:"component-name"},Pu={class:"model-fill"},Lu={__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),g=e.ref(""),h=e.ref({title:""}),p=e.ref(-1),y=e.ref(!1),D=e.ref(-1),E=e.ref(new WeakMap),V=e.ref(null),j=Gn(C.pinia),{itemData:B}=C.storeToRefs(j),Q=()=>{g.value="新增标签页",h.value.title="",p.value=-1,s.value=!0},L=G=>{g.value="修改标签页",h.value.title=u.value[G].title,p.value=G,s.value=!0},P=G=>{const z=S(G);E.value.delete(z),u.value.splice(G,1),Ze()},F=()=>{if(h.value.title.trim()){if(p.value===-1){const G={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:m()};u.value.push(G)}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,Ze()}},m=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=G=>{const z=u.value[G];return z.id||(z.id=m()),z.id},v=G=>{var ge;D.value=G;const z=S(G);V.value=C.cloneDeep(B.value);let ce=E.value.get(z);!ce&&((ge=u.value[G].children)==null?void 0:ge.length)>0&&(ce=Be(u.value[G].children)),ce?j.setItemData(C.cloneDeep(ce)):j.setItemData([]),y.value=!0},T=e.computed(()=>{const G=C.useModelComp(C.pinia),z=C.storeToRefs(G).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(ce=>{var ge;if(ce.comp==="Tabs"&&D.value>=0){const Ee=S(D.value);if((ge=ce.compData)==null?void 0:ge.some(Le=>{var Y;return Le.key==="stepList"&&((Y=Le.contents)==null?void 0:Y.some(J=>J.id===Ee))}))return!1}return!0})}),b=G=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[G]||G,ie=G=>{var z;try{const ce=C.cloneDeep(G);ce.id=Date.now()+Math.random(),ce.comp==="Tabs"&&((z=ce.compData)==null||z.forEach(Ee=>{Ee.key==="stepList"&&Ee.contents&&Ee.contents.forEach(be=>{be.id=m()})}));const ge=C.cloneDeep(B.value);ge.push(ce),j.setItemData(ge)}catch(ce){console.error("添加组件失败:",ce)}},Be=G=>G.map(z=>{var ce;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:Qe(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:ke(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((ce=z.content)==null?void 0:ce.originalData)||[]}}}),Qe=G=>{if(!G)return[];const z=[];return G.rowContents&&z.push({key:"formContent",contents:G.rowContents}),G.buttonValue&&z.push({key:"formButton",contents:G.buttonValue}),typeof G.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:G.isEnableWrap}),z},ke=G=>[],Pe=()=>{if(D.value>=0&&D.value<u.value.length){const G=S(D.value);E.value.set(G,C.cloneDeep(B.value)),u.value[D.value].children=ee(B.value),console.log("保存后的数据",ee(B.value))}y.value=!1,D.value=-1,V.value=null,Ze()},ze=()=>{V.value&&j.setItemData(C.cloneDeep(V.value)),y.value=!1,D.value=-1,V.value=null},I=()=>{y.value&&ze()},ee=G=>{if(!Array.isArray(G))throw new Error("sourceData must be an array");return G.map((z,ce)=>{if(!z||typeof z!="object")return z;const{comp:ge,name:Ee,compData:be}=z;switch(ge){case"Form":return{type:"form",content:Z(be||[]),value:"表单"};case"Table":return{type:"table",content:te(be||[]),value:"表格"};default:return{type:"xxx",content:Re(be||[]),value:""}}})},Z=G=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ce={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return G.forEach((ge,Ee)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${Ee}:`,ge);return}const{key:be,contents:Le}=ge,Y=ce[be];if(!Y){console.warn(`Unknown Form config key: ${be}`);return}be==="enableWrap"?z[Y]=!!Le:z[Y]=Array.isArray(Le)?Le:[]}),z},te=G=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ce={header:"columns",tableContents:"tableData"};return G.forEach((ge,Ee)=>{if(!ge||typeof ge!="object"){console.warn(`Invalid config at index ${Ee}:`,ge);return}const{key:be,contents:Le}=ge,Y=ce[be];if(!Y){console.warn(`Unknown Table config key: ${be}`);return}z[Y]=Array.isArray(Le)?Le:[]}),z},Re=G=>(console.log("Default conversion logic - to be implemented"),{originalData:G,processed:!1,componentType:"unknown"}),Ze=()=>{const G=[{key:"stepList",contents:u.value}];l("change",G)};return e.watch(()=>i.itemContents,G=>{if(G&&G.length>0){const z=G.find(ce=>ce.key==="stepList");z&&z.contents&&(u.value=z.contents.map(ce=>({title:ce.title||"",value:ce.value||ce.title||"",label:ce.label||ce.title||"",children:ce.children||[],id:ce.id||m()})))}},{immediate:!0,deep:!0}),(G,z)=>{const ce=e.resolveComponent("svg-icon"),ge=e.resolveComponent("el-input"),Ee=e.resolveComponent("el-form-item"),be=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Du,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Q},[e.createVNode(ce,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(Le,Y)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Y},[e.createElementVNode("span",Eu,e.toDisplayString(Le.title),1),e.createElementVNode("div",Cu,[e.createElementVNode("button",{onClick:J=>L(Y)},"修改标题",8,Su),e.createElementVNode("button",{onClick:J=>v(Y)},"布局调整",8,Tu),e.createElementVNode("button",{onClick:J=>P(Y)},"删除",8,Bu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":z[2]||(z[2]=Le=>s.value=Le),title:g.value,onBeforeDestroy:z[3]||(z[3]=Le=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Le=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:F},"确定")]),default:e.withCtx(()=>[e.createVNode(be,{model:h.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ee,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ge,{modelValue:h.value.title,"onUpdate:modelValue":z[0]||(z[0]=Le=>h.value.title=Le),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:y.value,"onUpdate:modelValue":z[4]||(z[4]=Le=>y.value=Le),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ze},"取消"),e.createElementVNode("button",{onClick:Pe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Iu,[e.createElementVNode("div",Nu,[e.createVNode(ru),e.createElementVNode("div",Au,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,Le=>(e.openBlock(),e.createElementBlock("div",{key:Le.id,class:"component-item",onClick:Y=>ie(Le)},[e.createElementVNode("div",Mu,[e.createElementVNode("span",zu,e.toDisplayString(b(Le.comp)),1),e.createElementVNode("span",Ru,e.toDisplayString(Le.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Ou))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:G.innerWidth},[e.createVNode(wu)])),e.createElementVNode("div",Pu,[e.createVNode(yu)])])]),_:1},8,["modelValue"])])}}},$u=Pt._export_sfc(Lu,[["__scopeId","data-v-9096ed0d"]]);function Fu(){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 ju(n){return{type:"line",...n}}function Uu(){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 Ku(n){return{type:"bar",barWidth:"60%",...n}}function Wu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Hu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Ia={line:{initBaseoptions:Fu,initSeries:ju},bar:{initBaseoptions:Uu,initSeries:Ku},pie:{initBaseoptions:Wu,initSeries:Hu}},Lo=C.useMenuState(C.pinia),Il=(n,r)=>{var D;const i=[],l=[],{group:u,nameCol:s,valueCol:g}=r||{},h=n==null?void 0:n.find(E=>{const{name:V}=E;return V===u});if(!h)return{names:i,values:l};const p=(D=h==null?void 0:h.compData)==null?void 0:D.find(E=>{const{key:V}=E;return V==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(E=>{const V=E==null?void 0:E[0];let j=!1;ct.isObject(V)&&(V!=null&&V.id)&&(j=!0);let B=s,Q=g;j&&(B=B+1,Q=Q+1);const L=E==null?void 0:E[B],P=E==null?void 0:E[Q];i.push(L),l.push(P)}),{names:i,values:l}},qu=async n=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:u,detailValueCol:s,isSelfDetail:g}=n||{};let h=null;const p=sessionStorage.getItem("systemKey");if(g&&Lo.activeMenuPath&&(h=await Oe.getItemData(`${Lo.activeMenuPath}`,p,"")),!g){const y=r==null?void 0:r.join("/");h=await Oe.getItemData(`${y}^${i}`,p,"")}return Il(h,{group:l,nameCol:u,valueCol:s})},Xu=async n=>{const{menu:r,group:i,nameCol:l,valueCol:u}=n||{},s=r==null?void 0:r.join("/"),g=sessionStorage.getItem("systemKey"),h=await Oe.getItemData(s,g,"");return Il(h,{group:i,nameCol:l,valueCol:u})},ko=async(n,r)=>{const i={names:[],values:[]},{menu:l,group:u,nameCol:s,valueCol:g}=n||{};if(!l.length||!u)return i;const{mainKey:h,group:p,nameCol:y,valueCol:D,isSelfDetail:E}=r||{};return h&&p&&Nt.isNumber(y)&&Nt.isNumber(D)?await qu({menu:l,mainKey:h,detailGroup:p,detailNameCol:y,detailValueCol:D,isSelfDetail:E}):Nt.isNumber(s)&&Nt.isNumber(g)?await Xu({menu:l,group:u,nameCol:s,valueCol:g}):i},Yu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:g,initSeries:h}=s,p=g();p.title.text=u??"";const{names:y,values:D}=await ko(r,i);if(!y||!D)return p;p.xAxis.data=y;const E=h({data:D});return p.series.push(E),p},Gu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:g,initSeries:h}=s,p=g();p.title.text=u??"";const{names:y,values:D}=await ko(r,i);if(!y||!D)return p;p.xAxis.data=y;const E=h({data:D});return p.series.push(E),p},Ju=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=n||{},s=Ia==null?void 0:Ia[l];if(!s)return;const{initBaseoptions:g,initSeries:h}=s,p=g();p.title.text=u??"";const{names:y,values:D}=await ko(r,i);if(!y||!D)return p;const E=[];for(let j=0;j<y.length;j++){const B=y[j],Q=D[j];E.push({name:B,value:Q})}const V=h({data:E});return p.series.push(V),p},Zu=async(n=[])=>{var g,h,p;const r=((g=n==null?void 0:n.find(y=>y.key==="chartBaseConfig"))==null?void 0:g.contents)??{},i=((h=n==null?void 0:n.find(y=>y.key==="chartDataConfig"))==null?void 0:h.contents)??{},l=((p=n==null?void 0:n.find(y=>y.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:u}=r;let s={};return u==="line"&&(s=await Yu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="bar"&&(s=await Gu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="pie"&&(s=await Ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s},Qu=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 Zu(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(Hr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),ed=Pt._export_sfc(Qu,[["__scopeId","data-v-d4c081e8"]]),td={class:"chart-module layout"},ad={class:"chart-module content"},nd={class:"chart-module content"},od={class:"form-content"},ld={class:"dialog-footer"},rd={class:"form-content"},id={class:"dialog-footer"},sd={class:"form-content"},cd={class:"dialog-footer"},ud=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([]),g=()=>[{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 ue;s.value=g(),(ue=s.value)==null||ue.forEach(ne=>{var Ce;const de=ne==null?void 0:ne.prop;ne.value=(Ce=h==null?void 0:h.value)==null?void 0:Ce[de]}),u.visible=!0},y=ue=>{h.value=ue},D=()=>{var ue;u.visible=!1,l("change",(ue=Ie())==null?void 0:ue.compData)},E=e.reactive({visible:!1,width:"840",title:"数据配置"}),V=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({}),Q=()=>{const ue=V.value,ne=C.cloneDeep(ue);return ne==null||ne.forEach(de=>{var Ge;const Ce=de==null?void 0:de.prop;de.value=(Ge=B.value)==null?void 0:Ge[Ce]}),ne},L=ue=>{var de;B.value=ue;const ne=Q();V.value=ne,l("change",(de=Ie())==null?void 0:de.compData)},P=async()=>{const ue=await Oe.getMenusContent(),ne=Q();ne==null||ne.forEach(de=>{(de==null?void 0:de.prop)==="menu"&&(de.contents=ue)}),V.value=ne,E.visible=!0,await Le(B.value.menu),await k(B.value.group)},F=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 ue=m.value,ne=C.cloneDeep(ue);return ne==null||ne.forEach(de=>{var Ge;const Ce=de==null?void 0:de.prop;de.value=(Ge=v.value)==null?void 0:Ge[Ce]}),ne},b=ue=>{var de;v.value=ue;const ne=T();m.value=ne,l("change",(de=Ie())==null?void 0:de.compData)},ie=async()=>{await I();const ue=C.cloneDeep(Be.value),ne=T();ne==null||ne.forEach(de=>{var Ge;const Ce=de==null?void 0:de.prop;de.value=(Ge=v==null?void 0:v.value)==null?void 0:Ge[Ce],Ce==="mainKey"&&(de.contents=ue)}),m.value=ne,F.visible=!0},Be=e.ref([]),Qe=e.ref([]),ke=e.ref({}),Pe=e.ref({}),ze=()=>{const{compData:ue}=ge.value||{},ne=ue==null?void 0:ue.find(q=>{const{key:oe}=q;return oe==="header"}),de=(ne==null?void 0:ne.contents)||[],Ce=de==null?void 0:de.filter((q,oe)=>{const{label:N}=q;return N!=="操作"}),Ge=Ce==null?void 0:Ce.findIndex((q,oe)=>{const{isMainKey:N}=q;return N});if(Ge<0)return[];const dt=ue==null?void 0:ue.find(q=>{const{key:oe}=q;return oe==="tableContents"}),x=(dt==null?void 0:dt.contents)||[];return x==null?void 0:x.map(q=>{const oe=q==null?void 0:q[0];let N=Ge;ct.isObject(oe)&&(oe!=null&&oe.id)&&(N=N+1);const se=q==null?void 0:q[N];return{label:se,value:se}})},I=async()=>{const ue=await ze();Be.value=ue},ee=async ue=>{const ne=sessionStorage.getItem("systemKey");return await Oe.getItemData(ue,ne,"")},Z=async ue=>{const ne=ue;Qe.value=ne==null?void 0:ne.map(de=>{const{name:Ce}=de;return ke.value[Ce]=de,{label:Ce,value:Ce}})},te=ue=>{const{comp:ne,compData:de}=Pe.value||{};if(ne==="Table"){let Ce=T();Ce=Ce.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),Y(Ce,de),m.value=Ce}},Re=async()=>{var de,Ce;const ue=(de=v==null?void 0:v.value)==null?void 0:de.mainKey,ne=(Ce=B==null?void 0:B.value)==null?void 0:Ce.menu;if(ue){const dt=`${ne==null?void 0:ne.join("/")}^${ue}`,x=await ee(dt);await Z(x);const A=T();A==null||A.forEach(q=>{(q==null?void 0:q.prop)==="group"&&(q.contents=Qe.value)}),m.value=A}};e.watch(()=>{var ue;return(ue=v==null?void 0:v.value)==null?void 0:ue.mainKey},async(ue,ne)=>{ue!=ne&&ue&&await Re()});const Ze=async ue=>{const ne=ke.value[ue];Pe.value=ne,await te()};e.watch(()=>{var ue;return(ue=v==null?void 0:v.value)==null?void 0:ue.group},async(ue,ne)=>{ue!=ne&&ue&&Ze(ue)});const G=async()=>{var ne;await Re();const ue=(ne=v.value)==null?void 0:ne.group;await Ze(ue)},z=e.ref([]),ce=e.ref({}),ge=e.ref({}),Ee=async ue=>{const ne=ue==null?void 0:ue.join("/"),de=sessionStorage.getItem("systemKey");return await Oe.getItemData(ne,de,"")},be=async ue=>{const ne=await Ee(ue);z.value=ne==null?void 0:ne.map(de=>{const{name:Ce}=de;return ce.value[Ce]=de,{label:Ce,value:Ce}})},Le=async(ue,ne)=>{await be(ue);const de=Q();de==null||de.forEach(Ce=>{(Ce==null?void 0:Ce.prop)==="group"&&(Ce.contents=z.value)}),V.value=de};e.watch(()=>{var ue;return(ue=B==null?void 0:B.value)==null?void 0:ue.menu},async(ue,ne)=>{const de=ue==null?void 0:ue.join("/"),Ce=ne==null?void 0:ne.join("/");de!=Ce&&await Le(ue)});const Y=(ue,ne)=>{const de=ne==null?void 0:ne.find(x=>{const{key:A}=x;return A==="header"}),Ce=(de==null?void 0:de.contents)||[],Ge=Ce==null?void 0:Ce.filter((x,A)=>{const{label:q}=x;return q!=="操作"}),dt=Ge==null?void 0:Ge.map((x,A)=>{const{label:q}=x;return{label:q,value:A}});ue==null||ue.forEach(x=>{const A=x==null?void 0:x.prop;(A==="nameCol"||A==="valueCol")&&(x.contents=dt)})},J=ue=>{const{comp:ne,compData:de}=ge.value||{};if(ne==="Table"){B.value.formItems=[];let Ce=Q();Ce=Ce.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),Y(Ce,de),V.value=Ce}},k=async ue=>{const ne=ce.value[ue];ge.value=ne,await J()};e.watch(()=>{var ue;return(ue=B==null?void 0:B.value)==null?void 0:ue.group},async(ue,ne)=>{ue!=ne&&k(ue)});const ye=async()=>{var de,Ce;const ue=(de=B.value)==null?void 0:de.menu;await Le(ue);const ne=(Ce=B.value)==null?void 0:Ce.group;await k(ne)},Ie=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:B.value},{key:"chartDetailConfig",contents:v.value}]}),we=()=>{u.visible=!1,E.visible=!1,F.visible=!1};return e.onMounted(async()=>{var ne,de,Ce;V.value=j(),m.value=S();const ue=i==null?void 0:i.itemContents;h.value=((ne=ue==null?void 0:ue.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:ne.contents)??{},B.value=((de=ue==null?void 0:ue.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:de.contents)??{},await ye(),v.value=((Ce=ue==null?void 0:ue.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Ce.contents)??{},await G()}),(ue,ne)=>{const de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",td,[ne[4]||(ne[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[0]||(ne[0]=Ce=>p())},{default:e.withCtx(()=>ne[3]||(ne[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",ad,[ne[6]||(ne[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[1]||(ne[1]=Ce=>P())},{default:e.withCtx(()=>ne[5]||(ne[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",nd,[ne[8]||(ne[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[2]||(ne[2]=Ce=>ie())},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:we,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",od,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createVNode(de,{class:"cancel-button button",onClick:we,id:"themeBorderButton"},{default:e.withCtx(()=>ne[9]||(ne[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(de,{class:"ok-button button",onClick:D,id:"themeButton"},{default:e.withCtx(()=>ne[10]||(ne[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:we,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",rd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:L},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",id,[e.createVNode(de,{class:"cancel-button button",onClick:we,id:"themeBorderButton"},{default:e.withCtx(()=>ne[11]||(ne[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(de,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>ne[12]||(ne[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:F.visible,title:F.title,onBeforeDestroy:we,width:F.width},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cd,[e.createVNode(de,{class:"cancel-button button",onClick:we,id:"themeBorderButton"},{default:e.withCtx(()=>ne[13]||(ne[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(de,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>ne[14]||(ne[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),dd=Pt._export_sfc(ud,[["__scopeId","data-v-fe119645"]]),pd=(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(g=>g===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(g=>g===s[s.length-1])?u+=s.trim():l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},Ut=(n,r)=>{let i=n;const l=[];let u="",s=0;for(const g of i)s++,g.includes("{")||u.includes("{")||g.includes("[")||u.includes("[")||g.includes("【")||u.includes("【")||g.includes("(")||u.includes("(")||g.includes("(")||u.includes("(")||g.includes("/*")||u.includes("/*")?(u+=g.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+=g.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},fd=(n,r)=>n===r||n.length===r.length&&n.every((i,l)=>i===r[l]),hd=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},[]),vd=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},md=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",gd="[Any]";const yd=n=>{var g,h;let r={},i=n==null?void 0:n[0],l=(h=(g=i==null?void 0:i.replace("{",xt))==null?void 0:g.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(gd,"");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},bd=n=>{var y,D,E,V,j,B,Q,L,P;let r=[],i=[],l=n==null?void 0:n.map(F=>{var S;let m=(S=Ut(F,"@"))==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=Ut(l==null?void 0:l[0],":");i=(y=u==null?void 0:u.filter(F=>!(F!=null&&F.includes("{"))&&!(F!=null&&F.includes("["))))==null?void 0:y.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(F=>(F==null?void 0:F.includes("{"))||(F==null?void 0:F.includes("["))),g=(E=s==null?void 0:s[0])==null?void 0:E.slice(1,((D=s==null?void 0:s[0])==null?void 0:D.length)-1);g=(V=Ut(g,","))==null?void 0:V.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F));let h="@"+((Q=(B=(j=n==null?void 0:n[0])==null?void 0:j.replace("@",xt))==null?void 0:B.split(xt))==null?void 0:Q[1]);((L=Ut(h,":"))==null?void 0:L.length)>1&&(r=Jn((P=Ut(h,":"))==null?void 0:P[1]),r=[r]);let p=g==null?void 0:g.map((F,m)=>{var Be,Qe,ke,Pe,ze,I,ee,Z,te,Re,Ze,G;let S=(Be=F==null?void 0:F.split("=="))==null?void 0:Be[0],v=(Qe=F==null?void 0:F.split("=="))==null?void 0:Qe[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=(Pe=(ke=v==null?void 0:v.split("*"))==null?void 0:ke[0])==null?void 0:Pe.split(":"),b=(Re=(te=(Z=(ee=(I=(ze=v==null?void 0:v.split("*"))==null?void 0:ze[1])==null?void 0:I.replace("{",xt))==null?void 0:ee.split(xt))==null?void 0:Z[0])==null?void 0:te.split(":"))==null?void 0:Re.filter(z=>z!==""),ie=(G=(Ze=v==null?void 0:v.replace("{",xt))==null?void 0:Ze.split(xt))==null?void 0:G[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:g==null?void 0:g.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=Ut(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=Ut(i,","))==null||u.forEach(g=>{(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)),s.push(Jn(g))}),r=s}return r},fo=(n,r)=>{var E,V,j,B,Q,L,P,F,m,S,v,T,b,ie,Be,Qe,ke,Pe,ze,I,ee,Z,te,Re,Ze,G,z,ce,ge,Ee,be,Le,Y;let i,l=[],u=[],s=[],g=[],h=[],p=[],y="Input",D;if(n!=null&&n.includes("@Pam")||n!=null&&n.includes("==")||n!=null&&n.includes("="))if(n!=null&&n.includes("@Pam")){i=(V=(E=n==null?void 0:n.replace("@Pam",xt))==null?void 0:E.split(xt))==null?void 0:V[0];let J=(B=(j=n==null?void 0:n.replace("@Pam",xt))==null?void 0:j.split(xt))==null?void 0:B[1];J=J==null?void 0:J.slice(1,(J==null?void 0:J.length)-1),J=(Q=Ut(J,","))==null?void 0:Q.map(k=>(k="@"+k,k)),D=J==null?void 0:J.find(k=>k==null?void 0:k.includes("@IdentName")),D=D?(P=(L=D==null?void 0:D.replace("=",xt))==null?void 0:L.split(xt))==null?void 0:P[1]:i}else{if(i=(F=n==null?void 0:n.split("=="))==null?void 0:F[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(J=>({label:J,value:J}));else if((Be=(ie=n==null?void 0:n.split("=="))==null?void 0:ie[1])!=null&&Be.includes("||")){let J=[];(Pe=(ke=(Qe=n==null?void 0:n.split("=="))==null?void 0:Qe[1])==null?void 0:ke.split("||"))==null||Pe.forEach(k=>{var ye,Ie,we;u.push((Ie=(ye=k==null?void 0:k.split("@Filter"))==null?void 0:ye[0])==null?void 0:Ie.split("/")),J.push((we=k==null?void 0:k.split("@Filter"))==null?void 0:we[1])}),s=J==null?void 0:J.map(k=>(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1),k))}else{let J=(I=n==null?void 0:n.split("=="))==null?void 0:I[((ze=n==null?void 0:n.split("=="))==null?void 0:ze.length)-1];if(!(J!=null&&J.includes("&"))){let k=(ee=J==null?void 0:J.replace("*",xt))==null?void 0:ee.split(xt),ye=(k==null?void 0:k[0])===""?r==null?void 0:r.value:k==null?void 0:k[0];ye=ye==null?void 0:ye.replaceAll("[Any]",""),(ye==null?void 0:ye[0])==="$"&&(ye=(Z=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length))==null?void 0:Z.replaceAll(":","/")),g=ye==null?void 0:ye.split("/");let Ie=(Re=(te=k==null?void 0:k[1])==null?void 0:te.replace("{",xt))==null?void 0:Re.split(xt),we=Ie==null?void 0:Ie[0];(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),h=we==null?void 0:we.split(":"),p=(ce=(z=(G=(Ze=Ie==null?void 0:Ie[1])==null?void 0:Ze.replace("}",xt))==null?void 0:G.split(xt))==null?void 0:z[0])==null?void 0:ce.split(":");let ue=(be=(Ee=(ge=Ie==null?void 0:Ie[1])==null?void 0:ge.replace("}",xt))==null?void 0:Ee.split(xt))==null?void 0:be[1];ue!==""&&md(ue)}}y="Select"}else i=n,D=n;return i!=null&&i.includes("@Pam")&&(i=(Y=(Le=n==null?void 0:n.replace("@Pam",xt))==null?void 0:Le.split(xt))==null?void 0:Y[0],D=i),{label:i,prop:D,options:l,allContents:u,filterContents:s,menus:g,groups:h,words:p,align:"center",formType:y}},ho=(n,r)=>{var l,u,s,g,h,p,y,D,E,V,j,B,Q,L,P,F,m;let i=[];if((n==null?void 0:n[0])==="{"&&(n==null?void 0:n[(n==null?void 0:n.length)-1])==="}"&&!((g=(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&&g.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=Ut(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,((y=v==null?void 0:v[1])==null?void 0:y.length)-1),r),align:"center"})}else(P=(L=(Q=(B=(j=(V=(E=S==null?void 0:S.replace("{",xt))==null?void 0:E.split(xt))==null?void 0:V[1])==null?void 0:j.replace("}",xt))==null?void 0:B.split(xt))==null?void 0:Q[0])==null?void 0:L.split(","))==null||P.forEach(T=>{i==null||i.push({label:T,prop:T,align:"center"})})}else if((n==null?void 0:n[0])==="{")(F=Ut(n,","))==null||F.forEach(S=>{var v,T,b,ie,Be,Qe,ke,Pe,ze,I,ee;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 Z=Ut(S,"="),te=Z==null?void 0:Z[(Z==null?void 0:Z.length)-1],Re=[],Ze=[],G=[],z=(v=te==null?void 0:te.replace("*",xt))==null?void 0:v.split(xt),ce=(z==null?void 0:z[0])===""?r==null?void 0:r.value:z==null?void 0:z[0];ce=ce==null?void 0:ce.replaceAll("[Any]",""),(ce==null?void 0:ce[0])==="$"&&(ce=(T=ce==null?void 0:ce.slice(1,ce==null?void 0:ce.length))==null?void 0:T.replaceAll(":","/")),Re=ce==null?void 0:ce.split("/");let ge=(ie=(b=z==null?void 0:z[1])==null?void 0:b.replace("{",xt))==null?void 0:ie.split(xt),Ee=ge==null?void 0:ge[0];(Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])===":"&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ze=Ee==null?void 0:Ee.split(":"),G=(Pe=(ke=(Qe=(Be=ge==null?void 0:ge[1])==null?void 0:Be.replace("}",xt))==null?void 0:Qe.split(xt))==null?void 0:ke[0])==null?void 0:Pe.split(",");let be=(I=Z==null?void 0:Z[0])==null?void 0:I.slice(1,((ze=Z==null?void 0:Z[0])==null?void 0:ze.length)-2);(ee=be==null?void 0:be.split(","))==null||ee.forEach((Le,Y)=>{var J;i.push({label:Le,prop:Le,align:"center",menus:Re,groups:Ze,words:(J=G==null?void 0:G[Y])==null?void 0:J.split(":"),formType:(Re==null?void 0:Re.length)>0?"Select":"Input"})})}else i.push({label:S,prop:S,align:"center"})});else{let S=(m=Ut(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},kd=(n,r)=>{var g,h,p,y,D;let i=n;if(!n)return;let l="";((g=Ut(n,"}"))==null?void 0:g.length)>1&&(i=(h=Ut(n,"}"))==null?void 0:h[0],l=(p=Ut(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"}),(y=Ut(i,","))==null||y.forEach(E=>{var V;(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),(E==null?void 0:E[0])==="{"?(V=ho(E,r))==null||V.forEach(j=>{u.push(j)}):u.push(fo(E,r))}),l!==""&&((l==null?void 0:l[0])=="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),(D=Ut(l,","))==null||D.forEach(E=>{var V;(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),(E==null?void 0:E[0])==="{"?(V=ho(E,r))==null||V.forEach(j=>{s.push(j)}):s.push(fo(E,r))})),{columns:u,secondColumns:s}},$o=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=Ut(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}},xd=(n,r,i="")=>{var V,j,B,Q,L,P,F,m,S,v,T,b,ie,Be,Qe,ke,Pe,ze;let l=[];if(((V=n==null?void 0:n[0])==null?void 0:V[0])!=="*"&&((j=n==null?void 0:n[0])==null?void 0:j[0])!=="$")return;let u=Ut(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=C.cloneDeep(l)+":",l=[]);let g=u==null?void 0:u.filter(I=>!(!(I!=null&&I.includes("{"))&&!(I!=null&&I.includes("["))));s=s+((g==null?void 0:g[0])??"");let h=g==null?void 0:g[1];(s==null?void 0:s[0])==="["&&(h=C.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 y=(Q=Ut(s,"@"))!=null&&Q[1]?"@"+((L=Ut(s,"@"))==null?void 0:L[1]):"";if(s=(P=Ut(s,"@"))==null?void 0:P[0],(s==null?void 0:s[0])==="$"&&(y=C.cloneDeep(s)+(y??""),s=""),i!==""&&(y=i),y!==""){(y==null?void 0:y[0])==="$"&&(y=y==null?void 0:y.slice(1,y==null?void 0:y.length)),(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));let I="";if(y!=null&&y.includes("(@")){I=(m=(F=y==null?void 0:y.replace("(@",xt))==null?void 0:F.split(xt))==null?void 0:m[0];let ee=(v=(S=y==null?void 0:y.replace("(@",xt))==null?void 0:S.split(xt))==null?void 0:v[1];ee="@"+(ee==null?void 0:ee.slice(0,(ee==null?void 0:ee.length)-1));let Z=(T=Ut(ee,","))==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)),$o(te)));y=I+"("+(Z==null?void 0:Z.join(","))+")"}else{I=(ie=(b=y==null?void 0:y.replace("@",xt))==null?void 0:b.split(xt))==null?void 0:ie[0];let ee=(Qe=(Be=y==null?void 0:y.replace("@",xt))==null?void 0:Be.split(xt))==null?void 0:Qe[1];if(ee){ee="@"+ee;let Z=(ke=Ut(ee,","))==null?void 0:ke.map(te=>$o(te));y=I+"("+(Z==null?void 0:Z.join(","))+")"}else y=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=kd(s,r),E=s===""?[]:(D==null?void 0:D.columns)??[];return E!=null&&E.some(I=>{var ee;return Array.isArray(I==null?void 0:I.children)&&((ee=I==null?void 0:I.children)==null?void 0:ee.length)>0})&&(E=[E]),(p==null?void 0:p.length)>0&&(Array.isArray(p==null?void 0:p[0])&&((Pe=p==null?void 0:p[0])!=null&&Pe.every(I=>Array.isArray(I)))?p=p==null?void 0:p.map((I,ee)=>(I=I.map((Z,te)=>(Z.unshift((te+1).toString()),Z)),I)):p=p==null?void 0:p.map((I,ee)=>(I.unshift((ee+1).toString()),I))),D!=null&&D.secondColumns&&((ze=D==null?void 0:D.secondColumns)==null?void 0:ze.length)>0&&(p=p==null?void 0:p.map((I,ee)=>{var Z,te;return Array.isArray(I==null?void 0:I[0])?I=I==null?void 0:I.map((Re,Ze)=>{var G,z;return Re.unshift((z=(G=D==null?void 0:D.secondColumns)==null?void 0:G[Ze])==null?void 0:z.prop),Re}):I.unshift((te=(Z=D==null?void 0:D.secondColumns)==null?void 0:Z[ee])==null?void 0:te.prop),I}),E.unshift({label:"",prop:"disabled",sortable:!1})),{groupName:l,tableColumns:E,tableFilter:y,tableContents:p,columns:(D==null?void 0:D.secondColumns)??[]}};let Xt="$R";const hn=[{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}],wd=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})},Dd=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=vd(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)},_d=n=>{var l,u,s,g;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=Oe.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let h=[];return i==null||i.forEach(y=>{let D={};for(let E in y){let V=E;V!=null&&V.includes("[")||(D[V]=y[E])}h.push(D)}),(g=n==null?void 0:n.contents)==null?void 0:g.map(y=>{var E,V,j;let D=(V=(E=n==null?void 0:n.contents)==null?void 0:E.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:V.contents;if(D=(j=Oe.getEqualChild(D))==null?void 0:j.filter(B=>(B==null?void 0:B.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let Q=Oe.tableToForm(y==null?void 0:y.contents,D);h==null||h.forEach(L=>{var P,F;for(let m in L)!((P=Q==null?void 0:Q[0])!=null&&P.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))}))&&!(Q!=null&&Q.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=L[m])==null?void 0:F[0])!=="!"?Q=Q==null?void 0:Q.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)===L[m]&&!Array.isArray(L==null?void 0:L[m])||Array.isArray(L==null?void 0:L[m])&&((T=L==null?void 0:L[m])==null?void 0:T.find(b=>{var ie;return((ie=S==null?void 0:S.find(Be=>{var Qe;return(Be==null?void 0:Be.key)===m||((Qe=Be==null?void 0:Be.key)==null?void 0:Qe.includes(m))}))==null?void 0:ie.value)===b}))}):Q=Q==null?void 0:Q.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)!==L[m]}))}),(Q==null?void 0:Q.length)===0?y.contents=[]:y.contents=Q==null?void 0:Q.map(L=>{let P={};return L==null||L.forEach(F=>{P[F==null?void 0:F.key]=F==null?void 0:F.value}),P})}return y})}return n==null?void 0:n.contents},Ed=n=>n==null?void 0:n.contents,Cd=n=>n==null?void 0:n.contents,Sd=n=>n==null?void 0:n.contents,Td=n=>n==null?void 0:n.contents,Bd=n=>n==null?void 0:n.contents,Id=n=>n==null?void 0:n.contents,Nd=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(g=>{var h;return(g==null?void 0:g.key)==="formContent"&&(g.contents=(h=g.contents)==null?void 0:h.map(p=>(p.width=parseInt(n==null?void 0:n.filter),p))),g});if(((l=n==null?void 0:n.filter)==null?void 0:l[0])==="["){let s=Jn(n==null?void 0:n.filter),g=s==null?void 0:s.map(p=>parseInt(p));return g=hd(g),(u=n==null?void 0:n.contents)==null?void 0:u.map((p,y)=>{var D;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(D=p.contents)==null?void 0:D.map(E=>{var V;return E.width=(V=g==null?void 0:g.find(j=>(j==null?void 0:j.total)>y+1))==null?void 0:V.key,E})),p})}return n==null?void 0:n.contents},Ad=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,g,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(y=>y===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):u.contents=(g=u.contents)==null?void 0:g.map(p=>(i!=null&&i.find(y=>y===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),u})}return n==null?void 0:n.contents},Vd=async n=>{var l,u,s,g,h,p,y,D,E,V,j;const r=Oe.useUnit(C.pinia),{chooseTitle:i}=C.storeToRefs(r);if((n==null?void 0:n.filter)==="true"){let B=await mn((u=(l=i==null?void 0:i.value)==null?void 0:l[0])==null?void 0:u.parentContent,!1),Q=(g=(s=i==null?void 0:i.value)==null?void 0:s[0])==null?void 0:g.value;B=(h=B==null?void 0:B[0])==null?void 0:h.compData;let L=(p=B==null?void 0:B.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:p.contents;L=((y=L==null?void 0:L.find(m=>m==null?void 0:m.isMainKey))==null?void 0:y.prop)??((D=L==null?void 0:L[0])==null?void 0:D.prop);let P=(V=(E=B==null?void 0:B.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:E.contents)==null?void 0:V.find(m=>(m==null?void 0:m[L])===Q);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=P==null?void 0:P[v==null?void 0:v.prop],v))),m})}return n==null?void 0:n.contents},Nl={onNumSlice:wd,onRandomContents:Dd,onConditionContents:_d,onFatherPaceContents:Ed,onPaceContents:Cd,onMainTagContents:Sd,onButtonContents:Td,onPamButtonContents:Bd,onRowButtonContents:Id,onRelated:Vd,onRowNum:Nd,onFixRow:Ad},Od=async n=>{var u,s,g,h,p,y,D,E,V,j,B,Q,L,P,F,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=(g=r==null?void 0:r.replace("(",Xt))==null?void 0:g.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=Ut(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="";(y=i==null?void 0:i[b])!=null&&y.includes("(")?(ie=(V=(E=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:E.split(Xt))==null?void 0:V[0],Be="("+((Q=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Q[1])):(ie=(F=(P=(L=i==null?void 0:i[b])==null?void 0:L.replace("=",Xt))==null?void 0:P.split(Xt))==null?void 0:F[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 Qe=(T=hn==null?void 0:hn.find(ke=>(ke==null?void 0:ke.key)===ie))==null?void 0:T.value;if(Qe){const ke=Nl[Qe];l=await ke({contents:l,filter:Be})}}return l},Md=async n=>{var u,s,g,h,p,y,D,E,V,j,B,Q,L,P,F,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=(g=r==null?void 0:r.replace("(",Xt))==null?void 0:g.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=Ut(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="";(y=i==null?void 0:i[b])!=null&&y.includes("(")?(ie=(V=(E=(D=i==null?void 0:i[b])==null?void 0:D.replace("(",Xt))==null?void 0:E.split(Xt))==null?void 0:V[0],Be="("+((Q=(B=(j=i==null?void 0:i[b])==null?void 0:j.replace("(",Xt))==null?void 0:B.split(Xt))==null?void 0:Q[1])):(ie=(F=(P=(L=i==null?void 0:i[b])==null?void 0:L.replace("=",Xt))==null?void 0:P.split(Xt))==null?void 0:F[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 Qe=(T=hn==null?void 0:hn.find(ke=>(ke==null?void 0:ke.key)===ie))==null?void 0:T.value;if(Qe){const ke=Nl[Qe];l=await ke({contents:l,filter:Be})}}return l};let no=["新增","导入","导出"],oo=["查看","编辑","复制新增","删除"],lo=["导入","导出"],ro=["查看","编辑"];const Fo=async n=>{let r=[],i=n==null?void 0:n.map(async l=>{var p,y,D,E,V,j,B,Q,L,P,F,m,S,v,T,b,ie,Be,Qe,ke,Pe,ze,I,ee,Z,te,Re,Ze,G,z,ce,ge,Ee;let u=(E=(D=(y=(p=l==null?void 0:l.contents)==null?void 0:p.find(be=>{var Le;return(Le=be==null?void 0:be.key)==null?void 0:Le.includes("struct")}))==null?void 0:y.value)==null?void 0:D[0])==null?void 0:E.类型,s=Object.values(l==null?void 0:l.name);s=s==null?void 0:s.reverse();let g=(V=l==null?void 0:l.contents)==null?void 0:V.map(be=>be==null?void 0:be.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:g};for(let be in s)parseInt(be)>=1&&(h[`name${parseInt(be)-1}`]=s[be]);if(u==="Table"){let be=(j=l==null?void 0:l.contents)==null?void 0:j.find(ye=>{var Ie;return(Ie=ye==null?void 0:ye.key)==null?void 0:Ie.includes("content")}),Le=[];be.value=(B=be==null?void 0:be.value)==null?void 0:B.sort((ye,Ie)=>parseInt(ye==null?void 0:ye.id)-parseInt(Ie==null?void 0:Ie.id)),Le.push({key:"tableContents",contents:be==null?void 0:be.value});let Y=(m=(F=(P=(L=(Q=l==null?void 0:l.contents)==null?void 0:Q.find(ye=>{var Ie;return(Ie=ye==null?void 0:ye.key)==null?void 0:Ie.includes("struct")}))==null?void 0:L.value)==null?void 0:P[0])==null?void 0:F.结构)==null?void 0:m.contents;Array.isArray(Y==null?void 0:Y[0])?Y[0]=(S=Y==null?void 0:Y[0])==null?void 0:S.filter(ye=>(ye==null?void 0:ye.prop)!=="sort"):Y=Y==null?void 0:Y.filter(ye=>(ye==null?void 0:ye.prop)!=="sort"),Le.push({key:"header",contents:Y}),Le.push({key:"filter",contents:(Be=(ie=(b=(T=(v=l==null?void 0:l.contents)==null?void 0:v.find(ye=>{var Ie;return(Ie=ye==null?void 0:ye.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 J=no==null?void 0:no.map(ye=>({label:ye})),k=oo==null?void 0:oo.map(ye=>({label:ye}));!Array.isArray(Y==null?void 0:Y[0])&&((Qe=Y==null?void 0:Y[0])==null?void 0:Qe.prop)==="disabled"&&(J=lo==null?void 0:lo.map(ye=>({label:ye})),k=ro==null?void 0:ro.map(ye=>({label:ye}))),Le.push({key:"extraButton",contents:J}),Le.push({key:"rowButton",contents:k}),h.compData=await Md(Le)}else if(u==="Form"){let be=[],Le=(ze=(Pe=(ke=l==null?void 0:l.contents)==null?void 0:ke.find(J=>{var k;return(k=J==null?void 0:J.key)==null?void 0:k.includes("content")}))==null?void 0:Pe.value)==null?void 0:ze[0],Y=(Ze=(Re=(te=(Z=(ee=(I=l==null?void 0:l.contents)==null?void 0:I.find(J=>{var k;return(k=J==null?void 0:J.key)==null?void 0:k.includes("struct")}))==null?void 0:ee.value)==null?void 0:Z[0])==null?void 0:te.结构)==null?void 0:Re.contents)==null?void 0:Ze.map(J=>(J.value=Le==null?void 0:Le[J==null?void 0:J.prop],J));be.push({key:"filter",contents:(Ee=(ge=(ce=(z=(G=l==null?void 0:l.contents)==null?void 0:G.find(J=>{var k;return(k=J==null?void 0:J.key)==null?void 0:k.includes("struct")}))==null?void 0:z.value)==null?void 0:ce[0])==null?void 0:ge.引用)==null?void 0:Ee.contents}),be.push({key:"formContent",contents:Y}),h.compData=await Od(be)}return h});return r=await Promise.all(i),r},zd=C.useLoginState(C.pinia),{loginUserInfo:sa}=C.storeToRefs(zd),Rd=C.useMenuState(C.pinia),{activeMenuPath:jo,currentMenuPath:Pd}=C.storeToRefs(Rd),Al=Oe.useUnit(C.pinia),{selectTitle:io}=C.storeToRefs(Al),Ld=async(n,r)=>{var g,h,p,y,D,E,V,j,B,Q,L,P,F;let i=jo.value,l="",u=((g=io==null?void 0:io.value)==null?void 0:g.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 mn(m,!1);S=(y=S==null?void 0:S[0])==null?void 0:y.compData;let v=(D=S==null?void 0:S.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:D.contents;v=((E=v==null?void 0:v.find(b=>b==null?void 0:b.isMainKey))==null?void 0:E.prop)??((V=v==null?void 0:v[0])==null?void 0:V.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=(Q=l==null?void 0:l.split("/"))==null?void 0:Q.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=(L=i==null?void 0:i.split("/"))==null?void 0:L.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((P=m==null?void 0:m[0])==null?void 0:P.value)===((F=s==null?void 0:s[0])==null?void 0:F.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)),Al.setSelectTitle(s)},$d=async n=>{var u,s;let r=await Ba.getPageDataApi({platId:parseInt((u=sa==null?void 0:sa.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(g=>(g==null?void 0:g.object_name)===Pd.value+"/");return(l==null?void 0:l.length)>0&&(n=n==null?void 0:n.map(g=>{var h;return(g==null?void 0:g.comp)==="Table"&&(g.compData=(h=g==null?void 0:g.compData)==null?void 0:h.map(p=>{var y;return(p==null?void 0:p.key)==="header"&&(p.contents=(y=p.contents)==null?void 0:y.map((D,E)=>(E===0&&(D.isExistChild=!0),D))),p})),g})),n},mn=async(n,r,i={})=>{var g,h,p,y,D,E,V,j,B,Q,L,P;let l=await Ba.getPageDataApi({platId:parseInt((g=sa==null?void 0:sa.value)==null?void 0:g.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 F=await Ba.getPageDataApi({platId:parseInt((p=sa==null?void 0:sa.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((D=(y=F==null?void 0:F.data)==null?void 0:y.result)==null?void 0:D.length)>0){let m=await Fo((E=F==null?void 0:F.data)==null?void 0:E.result);m=m==null?void 0:m.map(T=>{var Be,Qe,ke,Pe,ze,I,ee,Z,te,Re,Ze,G,z,ce,ge,Ee,be,Le;let b=[],ie=(Be=Object.keys(T))==null?void 0:Be.filter(Y=>Y==null?void 0:Y.includes("name"));for(let Y in T)ie!=null&&ie.find(J=>J===Y)&&b.push(T==null?void 0:T[Y]);if(b=b.reverse(),(T==null?void 0:T.comp)==="Table"){let Y=(Pe=(ke=(Qe=T==null?void 0:T.compData)==null?void 0:Qe.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:Pe.map(k=>{let ye={};for(let Ie in k)Ie!=="id"&&(ye[Ie]=k==null?void 0:k[Ie]);return k=Object.values(ye),k}),J=(I=(ze=T==null?void 0:T.compData)==null?void 0:ze.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:I.contents;Array.isArray(J==null?void 0:J[0])?(J[0].unshift({label:"排序",prop:"sort"}),(ee=J[0])!=null&&ee.find(k=>(k==null?void 0:k.prop)==="disabled")&&(J[0]=(Z=J[0])==null?void 0:Z.filter(k=>(k==null?void 0:k.prop)!=="disabled"),J[0].unshift({label:"",prop:"disabled",sortable:!1}))):(J.unshift({label:"排序",prop:"sort"}),J!=null&&J.find(k=>(k==null?void 0:k.prop)==="disabled")&&(J=J==null?void 0:J.filter(k=>(k==null?void 0:k.prop)!=="disabled"),J.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:J,tableContents:Y}}else{let Y=(z=(G=(Ze=T==null?void 0:T.compData)==null?void 0:Ze.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:G.contents)==null?void 0:z.map(k=>(k==null?void 0:k.value)??"");Y=[Y];let J=(Ee=(ge=(ce=T==null?void 0:T.compData)==null?void 0:ce.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:ge.contents)==null?void 0:Ee.map(k=>(k.value="",k));T={contents:Y,filter:(Le=(be=T==null?void 0:T.compData)==null?void 0:be.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Le.contents,key:T==null?void 0:T.comp,name:b,value:J}}return T.isShow=!1,T});let S=[{key:"menuPath",contents:[{path:n,fatherPath:(B=(j=(V=F==null?void 0:F.data)==null?void 0:V.result)==null?void 0:j[0])==null?void 0:B.father_name,isShow:!1}]},{key:n,contents:m}];await Ba.createPlatFormDataApi({platId:parseInt((Q=sa==null?void 0:sa.value)==null?void 0:Q.plat_id),changeData:S});let v=await Ba.getPageDataApi({platId:parseInt((L=sa==null?void 0:sa.value)==null?void 0:L.plat_id),pageName:n});u=(P=v==null?void 0:v.data)==null?void 0:P.result}}r&&await Ld(u,!!(i!=null&&i.originPath));let s=await Fo(u);return r&&(s=await $d(s)),s};var Pn={exports:{}},Fd=Pn.exports,Uo;function jd(){return Uo||(Uo=1,function(n,r){(function(i,l){l()})(Fd,function(){function i(y,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(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function l(y,D,E){var V=new XMLHttpRequest;V.open("GET",y),V.responseType="blob",V.onload=function(){p(V.response,D,E)},V.onerror=function(){console.error("could not download file")},V.send()}function u(y){var D=new XMLHttpRequest;D.open("HEAD",y,!1);try{D.send()}catch{}return 200<=D.status&&299>=D.status}function s(y){try{y.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),y.dispatchEvent(D)}}var g=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Oe.commonjsGlobal=="object"&&Oe.commonjsGlobal.global===Oe.commonjsGlobal?Oe.commonjsGlobal:void 0,h=g.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=g.saveAs||(typeof window!="object"||window!==g?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(y,D,E){var V=g.URL||g.webkitURL,j=document.createElement("a");D=D||y.name||"download",j.download=D,j.rel="noopener",typeof y=="string"?(j.href=y,j.origin===location.origin?s(j):u(j.href)?l(y,D,E):s(j,j.target="_blank")):(j.href=V.createObjectURL(y),setTimeout(function(){V.revokeObjectURL(j.href)},4e4),setTimeout(function(){s(j)},0))}:"msSaveOrOpenBlob"in navigator?function(y,D,E){if(D=D||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(i(y,E),D);else if(u(y))l(y,D,E);else{var V=document.createElement("a");V.href=y,V.target="_blank",setTimeout(function(){s(V)})}}:function(y,D,E,V){if(V=V||open("","_blank"),V&&(V.document.title=V.document.body.innerText="downloading..."),typeof y=="string")return l(y,D,E);var j=y.type==="application/octet-stream",B=/constructor/i.test(g.HTMLElement)||g.safari,Q=/CriOS\/[\d]+/.test(navigator.userAgent);if((Q||j&&B||h)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var m=L.result;m=Q?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),V?V.location.href=m:location=m,V=null},L.readAsDataURL(y)}else{var P=g.URL||g.webkitURL,F=P.createObjectURL(y);V?V.location=F:location.href=F,V=null,setTimeout(function(){P.revokeObjectURL(F)},4e4)}});g.saveAs=p.saveAs=p,n.exports=p})}(Pn)),Pn.exports}jd();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DPjDv9Ws.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Vl={__name:"index",props:{name:String},setup(n){const r=n,i=e.computed(()=>ct.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})}}},Ol=(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=C.cloneDeep(r),g=u==null?void 0:u.filter(D=>D!==(s==null?void 0:s[i])),h=i+1,p=Ol(g,s,h),y=[];y.push(u==null?void 0:u[0]),p==null||p.forEach(D=>{y.push(D)}),u=y}return u})),l},Ml=(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(g=>g===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let g=C.cloneDeep(r),h=s==null?void 0:s.filter(E=>E!==(g==null?void 0:g[l])),p=l+1,y=Ml(h,g,i,p),D=[];D.push(s==null?void 0:s[0]),y==null||y.forEach(E=>{D.push(E)}),s=D}return s})),u},zl=(n,r,i,l,u=0)=>{let s=n;return s!=null&&s.every(g=>Array.isArray(g))&&(s!=null&&s.every(g=>Array.isArray(g)&&g.length===1)?s=s==null?void 0:s.map(g=>((g==null?void 0:g[0])===i&&(g=[l]),g)):s=s==null?void 0:s.map(g=>{if(g!=null&&g.find(h=>h===(r==null?void 0:r[u]))&&(r==null?void 0:r.length)!==1){let h=C.cloneDeep(r),p=g==null?void 0:g.filter(V=>V!==(h==null?void 0:h[u])),y=u+1,D=zl(p,h,i,l,y),E=[];E.push(g==null?void 0:g[0]),D==null||D.forEach(V=>{E.push(V)}),g=E}return g})),s};function Rl(n="menu"){return{name:n,components:{SvgIcon:qr.SvgIcon,ssMenu:jn,DynamicIcon:Vl,ssDialog:Gt.ssDialog,ssInput:Nt._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=C.useMenuState(),g=C.useModelComp(C.pinia),h=C.useLoginState(C.pinia),{loginUserInfo:p}=C.storeToRefs(h),y=e.ref(0),D=Xr.useRouter(),E=e.ref(),{asideMenus:V,menuTriggerType:j,platform:B}=C.storeToRefs(s),{fixMenuStatus:Q}=C.storeToRefs(g),L=e.computed(()=>l==null?void 0:l.mode),P=Y=>Y==null?void 0:Y.map(k=>{var ye,Ie;return!(k!=null&&k.children)||((ye=k==null?void 0:k.children)==null?void 0:ye.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=P(k.children)),k}),F=e.computed(()=>{let Y=[...V.value];if((Y==null?void 0:Y.length)===0)return D.push("/"),[];const J=ie(Y,b.value);return J.isFlag||(Y=J==null?void 0:J.data),Y=Y==null?void 0:Y.map(k=>{var ye,Ie;return!(k!=null&&k.children)||((ye=k==null?void 0:k.children)==null?void 0:ye.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=P(k.children)),k}),Y}),m=async(Y,J)=>{g.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(Y==null?void 0:Y.path),s.setActiveAsideMenu(Y),Y.isRouter?D.push(Y.path):D.push("/"),i("node-click",Y,J)},S=async Y=>{const J=Yr.findNodeByPropInTree(F.value,"path",Y);s.setActiveAsideMenu(J),g.setRouteToChildPath(""),Q.value?g.setFixMenuStatus(!1):(be.value&&(j.value="open"),j.value==="click"?y.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(Y):be.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(Y))),Y!=null&&Y.startsWith("/")?D.push(Y):D.push("/"),y.value++},v=Y=>{be.value||s.setActiveMenuPath(Y)},T=Y=>{const J=document.documentElement;Y==null||Y.forEach(k=>{J.style.setProperty(k.name,k.value)})};e.onMounted(()=>{y.value=1});const b=e.computed(()=>{const Y=sessionStorage.getItem("authority");return Y?JSON.parse(Y):[]});e.watch(()=>B.value,Y=>{Y==="browser"?T(wn.browserVerticalMenuClasses):Y==="client"?(T(wn.clientHorizontalMenuClasses),T(wn.clientVerticalMenuClasses)):Y==="three"&&(T(wn.threeHorizontalMenuClasses),T(wn.threeVerticalMenuClasses))},{immediate:!0});const ie=(Y,J)=>({isFlag:!0}),Be=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Qe=Y=>sn(Y),ke=e.ref({}),Pe=e.ref([]),ze=e.ref({}),I=e.ref({}),ee=Y=>{switch(Y){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Z=e.ref({}),te=Y=>{s.setCacheInputMenu({type:Be.type,data:Y}),s.setIsRefreshMenus(!0)},Re=async(Y,J,k)=>{var ye,Ie,we,ue,ne,de,Ce,Ge,dt,x,A,q,oe,N,se,Me,le,U,W,X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve,We,st,Ye,tt,Ne,pt,Je,$e,rt,mt,wt;if(J==="create"){let He=(k==null?void 0:k.title)+"(1)",ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),yt=(Ie=(ye=ot==null?void 0:ot.data)==null?void 0:ye.result)==null?void 0:Ie[0],je=(we=yt==null?void 0:yt.value)==null?void 0:we.pageData;je.compData=(ue=je.compData)==null?void 0:ue.map(Se=>{var M;return(Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=Ml(Se.contents,(M=k==null?void 0:k.path)==null?void 0:M.split("/"),He)),Se}),await ct.updateInsofDataApi({id:yt==null?void 0:yt.id,value:{pageData:je}});let Ke=(de=(ne=k==null?void 0:k.path)==null?void 0:ne.split("/"))==null?void 0:de.filter((Se,M)=>{var me,xe;return M!==((xe=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:xe.length)-1}),Xe=await Oe.getItemData((dt=(Ge=(Ce=k==null?void 0:k.path)==null?void 0:Ce.split("/"))==null?void 0:Ge.filter((Se,M)=>{var me,xe;return M!==((xe=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:xe.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Ke.push(He),Ke=Ke==null?void 0:Ke.join("/"),(Xe==null?void 0:Xe.length)>0){let Se=Xe==null?void 0:Xe[0],M=(A=(x=Se==null?void 0:Se.compData)==null?void 0:x.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:A.contents;if(((q=M==null?void 0:M[0])==null?void 0:q.directiveLabel)==="#isMain"){let me=(oe=M==null?void 0:M[0])==null?void 0:oe.prop,xe=(se=(N=Se==null?void 0:Se.compData)==null?void 0:N.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:se.contents,at;xe==null||xe.forEach(et=>{var Et,_t;if(et.length===1)((Et=et==null?void 0:et[0])==null?void 0:Et[me])===(k==null?void 0:k.title)&&(at=et==null?void 0:et[0],at[me]=He);else{let ut=(_t=M==null?void 0:M.filter(gt=>gt!=="操作"))==null?void 0:_t.map(gt=>gt==null?void 0:gt.prop),ft=et==null?void 0:et.filter(gt=>!(gt!=null&&gt.id)),vt=Oe.getValueToObjectValue(ft,ut);vt[me]=He,at=vt}}),await ct.createInsofDataApi({key:{type:"data",pageKey:(U=(le=(Me=k==null?void 0:k.path)==null?void 0:Me.split("/"))==null?void 0:le.filter((et,Et)=>{var _t,ut;return Et!==((ut=(_t=k==null?void 0:k.path)==null?void 0:_t.split("/"))==null?void 0:ut.length)-1}))==null?void 0:U.join("/"),tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(W=p.value)==null?void 0:W.id,createUserLayer:((X=p.value)==null?void 0:X.dept)||((De=p.value)==null?void 0:De.部门名称)},value:{tableData:at}})}}await Oe.newLoadingConstruct(k==null?void 0:k.path,Ke),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((fe=(H=(he=k==null?void 0:k.path)==null?void 0:he.split("/"))==null?void 0:H.filter((Se,M)=>{var me,xe;return M!==((xe=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:xe.length)-1}))==null?void 0:fe.join("/")),s.setActiveTopMenuPath((Ae=(re=k==null?void 0:k.path)==null?void 0:re.split("/"))==null?void 0:Ae[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(J==="update")E.value=k;else if(J==="delete"){let He=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:k==null?void 0:k.path}}),ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),yt=(Te=(pe=ot==null?void 0:ot.data)==null?void 0:pe.result)==null?void 0:Te[0],je=($=yt==null?void 0:yt.value)==null?void 0:$.pageData;if(je.compData=(Ve=je.compData)==null?void 0:Ve.map(Se=>{var M;return(Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=Ol(Se.contents,(M=k==null?void 0:k.path)==null?void 0:M.split("/"))),Se}),await ct.updateInsofDataApi({id:yt==null?void 0:yt.id,value:{pageData:je}}),((We=(ve=He==null?void 0:He.data)==null?void 0:ve.result)==null?void 0:We.length)>0){let Se=(Ye=(st=He==null?void 0:He.data)==null?void 0:st.result)==null?void 0:Ye.map(M=>M==null?void 0:M.id);(Se==null?void 0:Se.length)>0&&await ct.batchDeleteInsofDataApi({ids:Se})}let Ke=await Oe.getItemData((pt=(Ne=(tt=k==null?void 0:k.path)==null?void 0:tt.split("/"))==null?void 0:Ne.filter((Se,M)=>{var me,xe;return M!==((xe=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:xe.length)-1}))==null?void 0:pt.join("/"),sessionStorage.getItem("systemKey"),""),Xe=[];(Ke==null?void 0:Ke.length)>0&&(Ke==null||Ke.forEach(Se=>{var me,xe,at,et,Et,_t,ut,ft,vt,gt,Lt;let M=(et=(at=(xe=(me=Se==null?void 0:Se.compData)==null?void 0:me.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:xe.contents)==null?void 0:at[0])==null?void 0:et.prop;((ft=(ut=(_t=(Et=Se==null?void 0:Se.compData)==null?void 0:Et.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:_t.contents)==null?void 0:ut[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((Lt=(gt=(vt=Se==null?void 0:Se.compData)==null?void 0:vt.find(bt=>(bt==null?void 0:bt.key)==="tableContents"))==null?void 0:gt.contents)==null||Lt.forEach(bt=>{var zt,Rt,Kt;(bt==null?void 0:bt.length)>1?(bt==null?void 0:bt[1])===(k==null?void 0:k.title)&&Xe.push((zt=bt==null?void 0:bt[0])==null?void 0:zt.id):((Rt=bt==null?void 0:bt[0])==null?void 0:Rt[M])===(k==null?void 0:k.title)&&Xe.push((Kt=bt==null?void 0:bt[0])==null?void 0:Kt.id)}))})),(Xe==null?void 0:Xe.length)>0&&await ct.batchDeleteInsofDataApi({ids:Xe}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((rt=($e=(Je=k==null?void 0:k.path)==null?void 0:Je.split("/"))==null?void 0:$e.filter((Se,M)=>{var me,xe;return M!==((xe=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:xe.length)-1}))==null?void 0:rt.join("/")),s.setActiveTopMenuPath((wt=(mt=k==null?void 0:k.path)==null?void 0:mt.split("/"))==null?void 0:wt[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},Ze=async(Y,J)=>{var Ge,dt,x,A,q,oe,N,se,Me,le,U,W,X,De,he,H,fe,re,Ae,pe,Te,$,Ve,ve,We,st,Ye,tt,Ne,pt,Je;let k=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ye=(dt=(Ge=k==null?void 0:k.data)==null?void 0:Ge.result)==null?void 0:dt[0],Ie=(x=ye==null?void 0:ye.value)==null?void 0:x.pageData;Ie.compData=(A=Ie.compData)==null?void 0:A.map($e=>{var rt,mt;return($e==null?void 0:$e.key)==="menuContents"&&($e.contents=zl($e.contents,(rt=J==null?void 0:J.path)==null?void 0:rt.split("/"),J==null?void 0:J.title,(mt=Y==null?void 0:Y.target)==null?void 0:mt.value)),$e}),ye!=null&&ye.id&&await ct.updateInsofDataApi({id:ye==null?void 0:ye.id,value:{pageData:Ie}});let we=(oe=(q=J==null?void 0:J.path)==null?void 0:q.split("/"))==null?void 0:oe.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=J==null?void 0:J.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}),ue=we==null?void 0:we.join("/");we.push((N=Y==null?void 0:Y.target)==null?void 0:N.value),we=we==null?void 0:we.join("/");let ne=await Oe.getItemData(ue,sessionStorage.getItem("systemKey"),"");if(((W=(U=(le=(Me=(se=ne==null?void 0:ne[0])==null?void 0:se.compData)==null?void 0:Me.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:le.contents)==null?void 0:U[0])==null?void 0:W.directiveLabel)==="#isMain"){let $e=(fe=(H=(he=(De=(X=ne==null?void 0:ne[0])==null?void 0:X.compData)==null?void 0:De.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:he.contents)==null?void 0:H[0])==null?void 0:fe.prop,rt=(pe=(Ae=(re=ne==null?void 0:ne[0])==null?void 0:re.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:pe.contents,mt=(ve=(Ve=($=(Te=ne==null?void 0:ne[0])==null?void 0:Te.compData)==null?void 0:$.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:Ve.contents)==null?void 0:ve.map(He=>He==null?void 0:He.prop),wt;if(rt==null||rt.forEach(He=>{var yt;let ot=Oe.getValueToObjectValue(He,mt);(ot==null?void 0:ot[$e])===J.title&&(wt=ot,wt[$e]=(yt=Y==null?void 0:Y.target)==null?void 0:yt.value)}),wt){let He={};for(let yt in wt)yt!=="id"&&(He[yt]=wt==null?void 0:wt[yt]);let ot=[{id:wt==null?void 0:wt.id,value:{tableData:He}}];await ct.batchUpdateInsofDataApi({dataList:ot})}}let de=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:J==null?void 0:J.path}}),Ce=(st=(We=de==null?void 0:de.data)==null?void 0:We.result)==null?void 0:st.map($e=>({id:$e==null?void 0:$e.id,key:$e==null?void 0:$e.key}));Ce=Ce==null?void 0:Ce.map($e=>($e.key.pageKey=we,$e)),(Ce==null?void 0:Ce.length)>0&&await ct.batchUpdateInsofDataApi({dataList:Ce}),s.setUpdateMenuStatus(!1),await to.verifyStructureDataToStore(),s.setActiveMenuPath((Ne=(tt=(Ye=J==null?void 0:J.path)==null?void 0:Ye.split("/"))==null?void 0:tt.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=J==null?void 0:J.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}))==null?void 0:Ne.join("/")),s.setActiveTopMenuPath((Je=(pt=J==null?void 0:J.path)==null?void 0:pt.split("/"))==null?void 0:Je[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),E.value=void 0},G=async(Y,J)=>{Be.type=ee(J==null?void 0:J.operateType),await Re(J,Be.type,Y),I.value=Y,Z.value=J},z=()=>{Be.show=!1},ce=Y=>Y==null?void 0:Y.filter(J=>J.allowInherit),ge=()=>{var k,ye,Ie,we,ue;let Y;Be.type==="create"&&(Y=((k=I.value)==null?void 0:k.path)+"/"+ze.value[(ye=ze.value)==null?void 0:ye.prop]),Be.type==="update"&&(Y=(Ie=I.value)==null?void 0:Ie.path);const J={...I.value,config:ce((we=I.value)==null?void 0:we.config),children:[],childMenus:[],title:ze.value[(ue=ze.value)==null?void 0:ue.prop],path:Y};console.log("clickSubmitForm",Z.value,I.value,J),te(J),Be.show=!1},Ee=Y=>{var k,ye;const J=(k=Y==null?void 0:Y.contents)==null?void 0:k.find(Ie=>Ie.key==="formContent");J&&(ze.value=(ye=J==null?void 0:J.contents)==null?void 0:ye.reduce((Ie,we)=>(Ie[we.key]=we.value,Ie.prop=we.key,Ie),{}))},be=e.ref(!1);return{isCollapse:be,handleMenuCollapse:()=>{be.value=!be.value},handleCompChange:Ee,dialogForm:ke,dialogRenderComps:Pe,getComponents:Qe,clickSubmitForm:ge,dialogInfo:Be,beforeDialogDestroy:z,clickMenuIcon:G,mode:L,renderMenuList:F,clickMenu:m,openMenu:S,closeMenu:v,changeMenuStyle:T,fixElement:E,onBlur:Ze}}}}e.defineComponent(Rl());const Ud=C.useLoginState(),{loginUserInfo:va}=C.storeToRefs(Ud),Zt=C.useModelComp(C.pinia),Kd=e.ref(!1),{itemData:Wd,itemGridData:nn,curStructureCompIds:Ko,isSubmitCurStructure:Hd,isRefreshCurStructure:Vf,routeToChildPath:qd,pageMapState:vo,itemExtendData:On}=C.storeToRefs(Zt),Qt=C.useMenuState(C.pinia),{activeTopMenuPath:Xd,activeMenuPath:ea,platform:Of,activeAsideMenu:Mf,buttonTriggerType:Yd,menus:zf,currentMenuPath:Rf}=C.storeToRefs(Qt),xa=Oe.useUnit(C.pinia),{selectTitle:xo,chooseTitle:Wo}=C.storeToRefs(xa),Gd=Oe.useOriginalState(C.pinia),{originalPath:Pf}=C.storeToRefs(Gd);e.ref();C.useAuthorityState(C.pinia);const Un=e.ref(!0),gn=e.ref(0),mo=e.ref([]);e.ref(!1);const Jd=()=>{Zt.setItemGridData([]),Zt.setIsEdit("edit"),Zt.setSubmitCurStructure(ea.value!=="/平台管理/菜单管理")},Zd=()=>{Zt.setIsEdit("view"),Zt.setRefreshCurStructure(!0)},Qd=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,g)=>g<=i);xa.setSelectTitle(C.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,g;r==="create"?(s={dataList:n==null?void 0:n.map(p=>{var y;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:(y=p==null?void 0:p.compData)==null?void 0:y.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},g=ct.batchAddInsofDataApi):r==="update"?(s={dataList:n==null?void 0:n.map(p=>{var y;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(y=p==null?void 0:p.compData)==null?void 0:y.filter(D=>(D==null?void 0:D.key)!=="tableContents")}}}})},g=ct.batchUpdateInsofDataApi):r==="delete"&&(s={ids:n},g=ct.batchDeleteInsofDataApi);const h=await g(s);if(((u=h==null?void 0:h.data)==null?void 0:u.code)===200)return h.data.result;throw ct.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ct.ElMessage.error("保存响应失败")}},Ho=async(n,r,i,l)=>{var u,s,g,h,p,y,D,E,V,j,B;try{const Q=(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}})),L=(h=(g=n==null?void 0:n.results)==null?void 0:g.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}})),P=JSON.parse(C.cloneDeep(JSON.stringify(n))),F=(p=P==null?void 0:P.results)==null?void 0:p.map(v=>v.id);let m;i?m=(E=(D=(y=vo.value)==null?void 0:y[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:E.map(v=>v==null?void 0:v.id):m=(B=(j=(V=vo.value)==null?void 0:V[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=>!(F!=null&&F.includes(v))&&typeof v=="number");(Q==null?void 0:Q.length)>0&&await ct.batchAddInsofDataApi({dataList:Q}),(L==null?void 0:L.length)>0&&await ct.batchUpdateInsofDataApi({dataList:L}),(S==null?void 0:S.length)>0&&await ct.batchDeleteInsofDataApi({ids:S})}catch(Q){throw new Error(Q)}},ep=async n=>{var y,D,E,V,j,B,Q,L,P,F;Qt.setContentLoading(!0);const r=JSON.parse(C.cloneDeep(JSON.stringify(Wd.value)));if(!Hd.value)return Qt.setCacheStructures({key:Yd.value,data:r}),ct.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=(y=Ko.value)==null?void 0:y.filter(m=>!i.includes(m)),s=[...l,...u].filter(m=>typeof m!==null&&typeof m<"u"),g=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)),g&&(g==null?void 0:g.length)>0&&p.push(so(g,"create",n)),h&&(h==null?void 0:h.length)>0&&p.push(so(h,"update",n)),nn.value&&((D=nn.value)!=null&&D.isDelete&&((V=(E=nn.value)==null?void 0:E.results)==null?void 0:V.length)>0&&((B=(j=nn.value)==null?void 0:j.results)!=null&&B.every(m=>typeof m=="number"))?await ct.batchDeleteInsofDataApi({ids:(Q=nn.value)==null?void 0:Q.results}):(console.log("itemGridData.value",nn.value),p.push(await Ho(nn.value,"gridLayout")))),On.value)for(const m in On.value)p.push(await Ho((L=On.value)==null?void 0:L[m],"extend",{target:m,compId:(F=(P=On.value)==null?void 0:P[m])==null?void 0:F.compId},m));await Promise.all(p).then(()=>{ct.ElMessage.success("保存成功"),Zt.setRefreshCurStructure(!0)}).catch(m=>{ct.ElMessage.success(m)}),Qt.setContentLoading(!1)},Kn=n=>sn(n),jt=e.ref([]),tp=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),Pl=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),Ll=e.ref(0),$l=e.ref(null),Wn=async(n,r="data",i)=>{var l,u,s,g,h,p,y,D;if((n==null?void 0:n.buttonName)==="新增"){let E=[{tableName:(l=n==null?void 0:n.relatedContents)==null?void 0:l.find(V=>V==null?void 0:V.includes("content")),tableContents:n==null?void 0:n.fixContent}];await Ba.pageBatchAddApi({platId:parseInt((u=va==null?void 0:va.value)==null?void 0:u.plat_id),changeContents:E})}if((n==null?void 0:n.buttonName)==="OCR批量新增"){const E=((n==null?void 0:n.ocrRows)||[]).map(j=>{const B={...j};return delete B._isOCRRow,delete B._ocrTableId,B});let V=[{tableName:(s=n==null?void 0:n.relatedContents)==null?void 0:s.find(j=>j==null?void 0:j.includes("content")),tableContents:E}];await Ba.pageBatchAddApi({platId:parseInt((g=va==null?void 0:va.value)==null?void 0:g.plat_id),changeContents:V})}if((n==null?void 0:n.buttonName)==="编辑"){const E=((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 V=[{tableName:(h=n==null?void 0:n.relatedContents)==null?void 0:h.find(j=>j==null?void 0:j.includes("content")),tableContents:E}];await Ba.pageBatchUpdateApi({platId:parseInt((p=va==null?void 0:va.value)==null?void 0:p.plat_id),changeContents:V})}if((n==null?void 0:n.buttonName)==="删除"){let E=[{tableName:(y=n==null?void 0:n.relatedContents)==null?void 0:y.find(V=>V==null?void 0:V.includes("content")),tableContents:n==null?void 0:n.fixContent}];await Ba.pageBatchDeleteApi({platId:parseInt((D=va==null?void 0:va.value)==null?void 0:D.plat_id),changeContents:E})}Zt.setRefreshCurStructure(!0)},Hn=async(n,r)=>{},qn=async n=>{jt.value=await Oe.getDeepDiffItems(n),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value)};e.ref();const ap=e.ref(null),np=()=>{var n,r;console.log("倒计时结束时"),oa.ElMessageBox.alert(`超时未提交,【${(r=(n=ea.value)==null?void 0:n.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),op=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(()=>[Xd.value],()=>{xa.setSelectTitle([]),xa.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),g=await mn(u,s,{originPath:ea.value});g=g==null?void 0:g.map(h=>(h.isShow=!0,h)),jt.value=await Oe.getDeepDiffItems(g),Qt.setContentLoading(!1)}});e.watch(()=>[ea.value],async n=>{var g,h,p;if(!ea.value)return;Qt.setCurrentMenuPath(ea.value),Zt.setLockingPage(""),jt.value=[];let r=e.getCurrentInstance();(g=r==null?void 0:r.scope)==null||g.stop(),r=null,Un.value=!1,Qt.setContentLoading(!0),Kd.value=!0;let i=n==null?void 0:n[0],l=i,u=(h=xo.value)==null?void 0:h.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==ea.value&&!(y!=null&&y.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 mn(i,!0,{originPath:l});s=s==null?void 0:s.map(y=>(y.isShow=!0,y)),jt.value=await Oe.getDeepDiffItems(s),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value),e.nextTick(()=>{gn.value=gn.value++,Un.value=!0})},{immediate:!0});const lp=async()=>{Qt.setLinkMenuInfo(null),Qt.setActiveMenuPath(qd.value),jt.value=null,Zt.setRouteToChildPath(""),Qt.setChildMenu("")},rp=n=>new RegExp("button","i").test(n),ip=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),jl=n=>{if(ip(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]})}},Ul=async n=>{var h,p,y,D,E,V,j,B;Qt.setCurrentMenuPath(ea.value+"/"+n),Qt.setContentLoading(!0),jt.value=await mn(ea.value+"/"+n,!0,{originPath:ea.value+"/"});let r=await mn(ea.value,!1);jt.value=(h=jt.value)==null?void 0:h.map(Q=>(Q.isShow=!0,Q));let i=(p=r==null?void 0:r.filter(Q=>(Q==null?void 0:Q.comp)==="Table"))==null?void 0:p[0],l=(V=(E=(D=(y=i==null?void 0:i.compData)==null?void 0:y.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:D.contents)==null?void 0:E[0])==null?void 0:V.prop,u=(B=(j=i==null?void 0:i.compData)==null?void 0:j.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:B.contents;u=u==null?void 0:u.map(Q=>({label:Q==null?void 0:Q[l],value:Q==null?void 0:Q[l]}));let s=xo.value,g={value:n,condition:"child",options:u,relatedContent:ea.value,isShow:!0};s.push(g),xa.setSelectTitle(s),xa.setChooseTitle([g]),jt.value=await Oe.getDeepDiffItems(jt.value),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(jt.value),Zt.setOriginalData(jt.value)},sp=n=>{Ll.value=n},fn=e.reactive({index:0,comp:null}),cp=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.map((r,i)=>({id:r.id,name:r.name,status:up(r,i)}))}),Kl=(n,r)=>{var p,y,D,E,V;const i=r?n:n-2,l=(p=jt.value)==null?void 0:p[i],u=(D=(y=l==null?void 0:l.compData)==null?void 0:y.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)!=="操作"),g=s===-1?0:s,h=(V=(E=l==null?void 0:l.compData)==null?void 0:E.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:V.contents;return{valid:h==null?void 0:h.every(j=>j==null?void 0:j[g+1]),length:(h==null?void 0:h.length)||0}},up=(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}=Kl(r,!0);fn.index===r?i="process":s===0?i="wait":i=u?"success":"error"}return i},Wl=n=>{var i,l,u,s,g;const r=n+1;if(r>1&&((u=(l=(i=jt.value)==null?void 0:i[n])==null?void 0:l.comp)==null?void 0:u.toUpperCase())==="TABLE"){const{valid:h}=Kl(r);h?(fn.index=r,fn.comp=(s=jt.value)==null?void 0:s[n]):ct.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else fn.index=r,fn.comp=(g=jt.value)==null?void 0:g[n]},Hl=e.computed(()=>{var n,r;return(r=(n=Pl.value)==null?void 0:n[0])==null?void 0:r.isStepLayout});e.watch(()=>Hl.value,n=>{n&&Wl(0)},{immediate:!0});const dp={class:"layout"},pp=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(()=>C.cloneDeep(l==null?void 0:l.itemData)||[]),s=e.computed(()=>{var D;const y=(D=u==null?void 0:u.value)==null?void 0:D.find(E=>{const{key:V}=E;return V==="baseConfig"});return y==null?void 0:y.contents}),g=e.computed(()=>{var D;const y=(D=u==null?void 0:u.value)==null?void 0:D.find(E=>{const{key:V}=E;return V==="children"});return y==null?void 0:y.contents}),h=e.computed(()=>{let y=C.cloneDeep(g.value)||[];const D=y.length;let E=0;const V=[];if(y=y.map(j=>{const B=j.span;return B?(j.span=Number(B),E=E+j.span):V.push(j),j}),E<24){const j=Math.floor((24-E)/D);V.forEach(B=>{B.span=j})}return y}),p=y=>{i("rowClick",y)};return(y,D)=>{var j;const E=e.resolveComponent("el-col"),V=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",dp,[e.createVNode(V,{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,Q)=>(e.openBlock(),e.createBlock(E,{span:B==null?void 0:B.span},{default:e.withCtx(()=>{var L;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kn)(B.comp)),{key:e.unref(gn),compName:B.name,index:(B==null?void 0:B.id)??Q,height:(L=s.value)==null?void 0:L.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"])])}}}),fp=Pt._export_sfc(pp,[["__scopeId","data-v-ab9a36ed"]]),hp={class:"layout-operate"},vp={class:"layout-module"},mp={class:"collapse-title-item"},gp={class:"collapse-title"},yp={class:"icon-content"},bp=["onClick"],kp={class:"comp-child"},xp=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(()=>{Q()});const u=e.ref({}),s=e.ref({}),g=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)},y=e.ref([]),D=e.ref([]),E=v=>[{label:"占比",prop:"span",type:"input",value:v==null?void 0:v.span}],V=e.computed(()=>{const v=i==null?void 0:i.itemContents;return C.cloneDeep(v)}),j=e.computed(()=>{const v=V==null?void 0:V.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=V==null?void 0:V.value,T=v==null?void 0:v.find(b=>{const{key:ie}=b;return ie==="children"});return T==null?void 0:T.contents}),Q=()=>{var v;u.value=V.value||{},y.value=(B==null?void 0:B.value)||[],g.value=h(),g.value=(v=g.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;y.value=(B==null?void 0:B.value)||[],D.value=(v=B.value)==null?void 0:v.map(T=>E(T))},{immediate:!0});const L=(v,T)=>{const b=C.cloneDeep(B==null?void 0:B.value);b[T].span=v.span,y.value=b,l("change",S(),!0)},P=v=>sn(v),F=(v,T,b)=>{if(!v)return;const ie=C.cloneDeep(B==null?void 0:B.value);ie[b]&&(ie[b].compData=v,y.value=ie,l("change",S(),!0))},m=v=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=C.cloneDeep(B==null?void 0:B.value);T=T==null?void 0:T.filter((b,ie)=>v!==ie),y.value=T,l("change",S(),!0),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:y==null?void 0:y.value}]});return(v,T)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",hp,[e.createElementVNode("div",vp,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:g.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",mp,[e.createElementVNode("div",gp,e.toDisplayString(ie.name),1),e.createElementVNode("div",yp,[e.createElementVNode("div",{onClick:e.withModifiers(Qe=>m(Be),["stop"]),class:"icon-content"},[e.createVNode(b,{name:"Delete",style:{width:"16px",height:"16px"}})],8,bp)])])]),content:e.withCtx(({item:ie,index:Be})=>[e.createElementVNode("div",kp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value[Be],key:Be,isEnableWrap:!0,onChange:Qe=>L(Qe,Be)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(ie.comp+"Operate")),{itemContents:ie==null?void 0:ie.compData,originalItemContents:ie.compData,onChange:Qe=>F(Qe,ie,Be)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),wp=Pt._export_sfc(xp,[["__scopeId","data-v-ba05456e"]]),Dp=typeof window<"u";var qo;Dp&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function ql(){}const _p=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(_p)));function Ep(){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 ql;const i=(...s)=>{n(...s)};if(r<=0)return Xl(i);let l=0,u;return function(...s){const g=Date.now(),h=g-l;clearTimeout(u),h>=r?(l=g,i(...s)):u=setTimeout(()=>{l=Date.now(),i(...s)},Math.max(0,r-h))}}function Cp(n,r=100){if(typeof n!="function")return ql;const i=(...u)=>{n(...u)};if(r<=0)return Xl(i);let l;return function(...u){clearTimeout(l),l=setTimeout(()=>{i(...u)},r)}}function Xl(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,Yl=new WeakMap;function Sp(){_n.forEach(n=>{n(...Yl.get(n))}),_n.clear()}function ia(n,...r){if(typeof n!="function")return n;Yl.set(n,r),!_n.has(n)&&(_n.add(n),_n.size===1&&Promise.resolve().then(Sp))}const Gl=Symbol("LAYOUT_KEY"),Jl=Symbol("EMITTER_KEY");function Tp(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]=Bp(n[i]);return r}function Bp(n){return{...n}}function Zl(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 pn(n,r,i){const l=er(n),u=tr(n),s=Array(n.length);for(let g=0,h=u.length;g<h;g++){let p=u[g];p.static||(p=Ip(l,p,r,i),l.push(p)),s[n.findIndex(y=>y.i===p.i)]=p,p.moved=!1}return s}function Ip(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 Np(n,r){const i=er(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(Zl(n[i],r))return n[i]}function Ql(n,r){return n.filter(i=>Zl(i,r))}function er(n){return n.filter(r=>r.static)}function yo(n,r,i,l,u=!1,s=!1){if(r.static)return n;const g=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 y=tr(n);p&&(y=y.reverse());const D=Ql(y,r);if(s&&D.length)return r.x=g,r.y=h,r.moved=!1,n;for(let E=0,V=D.length;E<V;E++){const j=D[E];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 Ap(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 Vp(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 Op(n,r,i,l){return{top:n+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Mp(n,r,i,l){return{top:n+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function tr(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 zp(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 g=n[u];for(let h=0;h<i.length;h++)if(typeof g[i[h]]!="number")throw new Error("VueGridLayout: "+r+"["+u+"]."+i[h]+" must be a number!");if(g.i===void 0||g.i===null)throw new Error("VueGridLayout: "+r+"["+u+"].i cannot be null!");if(typeof g.i!="number"&&typeof g.i!="string")throw new Error("VueGridLayout: "+r+"["+u+"].i must be a string or number!");if(l.indexOf(g.i)>=0)throw new Error("VueGridLayout: "+r+"["+u+"].i must be unique!");if(l.push(g.i),g.static!==void 0&&typeof g.static!="boolean")throw new Error("VueGridLayout: "+r+"["+u+"].static must be a boolean!")}}function Rp(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 Pp(n)}function Pp(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 Lp(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 Lp(n){return typeof n=="number"&&!Number.isNaN(n)}function $p(n,r){const i=nr(n);let l=i[0];for(let u=1,s=i.length;u<s;u++){const g=i[u];r>n[g]&&(l=g)}return l}function ar(n,r){if(!r[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return r[n]}function Fp(n,r,i,l,u,s,g){if(r[l])return go(r[l]);let h=n;const p=nr(i),y=p.slice(p.indexOf(l));for(let D=0,E=y.length;D<E;D++){const V=y[D];if(r[V]){h=r[V];break}}return h=go(h||[]),pn(Np(h,{cols:s}),g)}function nr(n){return Object.keys(n).sort((r,i)=>n[r]-n[i])}let jp="auto";function Up(){return typeof document<"u"}function Qo(){return Up()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):jp}var Dn={exports:{}},Kp=Dn.exports,el;function Wp(){return el||(el=1,function(n,r){(function(i,l){n.exports=l()})(Kp,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 g(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,Q(c.key),c)}}function h(a,t,o){return t&&g(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function p(a,t,o){return(t=Q(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function y(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&&E(a,t)}function D(a){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(a)}function E(a,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},E(a,t)}function V(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 V(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 Q(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 L=function(a){return!(!a||!a.Window)&&a instanceof a.Window},P=void 0,F=void 0;function m(a){P=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),F=a}function S(a){return L(a)?a:(a.ownerDocument||a).defaultView||F.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||L(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)||F;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 Qe={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,c=a.defaults;o.prototype.draggable=Qe.draggable,t.map.drag=Qe,t.methodDict.drag="draggable",c.actions.drag=Qe.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}},ke=Qe,Pe={init:function(a){var t=a;Pe.document=t.document,Pe.DocumentFragment=t.DocumentFragment||ze,Pe.SVGElement=t.SVGElement||ze,Pe.SVGSVGElement=t.SVGSVGElement||ze,Pe.SVGElementInstance=t.SVGElementInstance||ze,Pe.Element=t.Element||ze,Pe.HTMLElement=t.HTMLElement||Pe.Element,Pe.Event=t.Event,Pe.Touch=t.Touch||ze,Pe.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 ze(){}var I=Pe,ee={init:function(a){var t=I.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||b.func(a.DocumentTouch)&&I.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?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,ee.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},Z=ee;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(G(a,t))return a;a=Ze(a)}return null}function Ze(a){var t=a.parentNode;if(b.docFrag(t)){for(;(t=t.host)&&b.docFrag(t););return t}return t}function G(a,t){return F!==P&&(t=t.replace(/\/deep\//g," ")),a[Z.prefixedMatchesSelector](t)}var z=function(a){return a.parentNode||a.host};function ce(a,t){for(var o,c=[],d=a;(o=z(d))&&d!==t&&o!==d.ownerDocument;)c.unshift(d),d=o;return c}function ge(a,t,o){for(;b.element(a);){if(G(a,t))return!0;if((a=Ze(a))===o)return G(a,t)}return!1}function Ee(a){return a.correspondingUseElement||a}function be(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 Le(a){var t,o=be(a);if(!Z.isIOS7&&o){var c={x:(t=(t=S(a))||F).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 Y(a){for(var t=[];a;)t.push(a),a=Ze(a);return t}function J(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 ye(a,t,o){return a==="parent"?Ze(o):a==="self"?t.getRect(o):Re(o,a)}function Ie(a,t,o,c){var d=a;return b.string(d)?d=ye(d,t,o):b.func(d)&&(d=d.apply(void 0,c)),b.element(d)&&(d=Le(d)),d}function we(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function ue(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 ne(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 de(a,t,o){var c=o&&a.options[o];return we(Ie(c&&c.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Ce(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(O){return!0},c=arguments.length>3?arguments[3]:void 0;if(c=c||{},b.string(a)&&a.search(" ")!==-1&&(a=Ge(a)),b.array(a))return a.forEach(function(O){return Ce(O,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];Ce(a,w,o,c)}else if(b.object(t))for(var _ in t)Ce(Ge(_).map(function(O){return"".concat(a).concat(O)}),t[_],o,c);return c}function Ge(a){return a.trim().split(/ +/)}var dt=function(a,t){return Math.sqrt(a*a+t*t)},x=["webkit","moz"];function A(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 q(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 oe(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 se(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function Me(a,t){return t=t||{x:0,y:0},Z.isOperaMobile&&N(a)?(se("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):se("page",a,t),t}function le(a){return b.number(a.pointerId)?a.pointerId:a.identifier}function U(a,t,o){var c=t.length>1?X(t):t[0];Me(c,a.page),function(d,f){f=f||{},Z.isOperaMobile&&N(d)?se("screen",d,f):se("client",d,f)}(c,a.client),a.timeStamp=o}function W(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 X(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 De(a){if(!a.length)return null;var t=W(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 he(a,t){var o=t+"X",c=t+"Y",d=W(a),f=d[0][o]-d[1][o],w=d[0][c]-d[1][c];return dt(f,w)}function H(a,t){var o=t+"X",c=t+"Y",d=W(a),f=d[1][o]-d[0][o],w=d[1][c]-d[0][c];return 180*Math.atan2(w,f)/Math.PI}function fe(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 re(a){var t=b.func(a.composedPath)?a.composedPath():a.path;return[Ee(t?t[0]:a.target),Ee(a.currentTarget)]}var Ae=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(Ae.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var pe=function(a,t){for(var o=0;o<t.length;o++){var c=t[o];a.push(c)}return a},Te=function(a){return pe([],a)},$=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ve=function(a,t){return a[$(a,t)]},ve=function(a){y(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,O=_.element,K=_.dropzone;return w.type=f,w.target=O,w.currentTarget=O,w.dropzone=K,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=$(f,function(O){var K=O.dropzone,R=O.element;return K===c.dropzone&&R===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}(Ae);function We(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 st(a,t){for(var o=function(f,w){for(var _=[],O=0,K=f.interactables.list;O<K.length;O++){var R=K[O];if(R.options.drop.enabled){var ae=R.options.drop.accept;if(!(b.element(ae)&&ae!==w||b.string(ae)&&!G(w,ae)||b.func(ae)&&!ae({dropzone:R,draggableElement:w})))for(var _e=0,Ue=R.getAllElements();_e<Ue.length;_e++){var Fe=Ue[_e];Fe!==w&&_.push({dropzone:R,element:Fe,rect:R.getRect(Fe)})}}}return _}(a,t),c=0;c<o.length;c++){var d=o[c];d.rect=d.dropzone.getRect(d.element)}return o}function Ye(a,t,o){for(var c=a.dropState,d=a.interactable,f=a.element,w=[],_=0,O=c.activeDrops;_<O.length;_++){var K=O[_],R=K.dropzone,ae=K.element,_e=K.rect,Ue=R.dropCheck(t,o,d,f,ae,_e);w.push(Ue?ae:null)}var Fe=function(qe){for(var it,lt,ht,Tt=[],Vt=0;Vt<qe.length;Vt++){var kt=qe[Vt],Bt=qe[it];if(kt&&Vt!==it)if(Bt){var ra=z(kt),Wt=z(Bt);if(ra!==kt.ownerDocument)if(Wt!==kt.ownerDocument)if(ra!==Wt){Tt=Tt.length?Tt:ce(Bt);var da=void 0;if(Bt instanceof I.HTMLElement&&kt instanceof I.SVGElement&&!(kt instanceof I.SVGSVGElement)){if(kt===Wt)continue;da=kt.ownerSVGElement}else da=kt;for(var ga=ce(da,Bt.ownerDocument),Ca=0;ga[Ca]&&ga[Ca]===Tt[Ca];)Ca++;var Vn=[ga[Ca-1],ga[Ca],Tt[Ca]];if(Vn[0])for(var xn=Vn[0].lastChild;xn;){if(xn===Vn[1]){it=Vt,Tt=ga;break}if(xn===Vn[2])break;xn=xn.previousSibling}}else ht=Bt,(parseInt(S(lt=kt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(S(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=Vt);else it=Vt}else it=Vt}return it}(w);return c.activeDrops[Fe]||null}function tt(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 ve(c,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new ve(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 ve(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 ve(c,o,"dragenter"),o.dragEnter=c.cur.element,o.dropzone=c.cur.dropzone)),o.type==="dragend"&&c.cur.dropzone&&(d.drop=new ve(c,o,"drop"),o.dropzone=c.cur.dropzone,o.relatedTarget=c.cur.element),o.type==="dragmove"&&c.cur.dropzone&&(d.move=new ve(c,o,"dropmove"),o.dropzone=c.cur.dropzone)),d}function Ne(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&&We(c,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function pt(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=st(t,o.element));var w=c,_=Ye(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=tt(o,0,w)}}var Je={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,c=a.Interactable,d=a.defaults;a.usePlugin(ke),c.prototype.dropzone=function(f){return function(w,_){if(b.object(_)){if(w.options.drop.enabled=_.enabled!==!1,_.listeners){var O=Ce(_.listeners),K=Object.keys(O).reduce(function(ae,_e){return ae[/^(enter|leave)/.test(_e)?"drag".concat(_e):/^(activate|deactivate|move)/.test(_e)?"drop".concat(_e):_e]=O[_e],ae},{}),R=w.options.drop.listeners;R&&w.off(R),w.on(K),w.options.drop.listeners=K}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,_,O,K,R){return function(ae,_e,Ue,Fe,qe,it,lt){var ht=!1;if(!(lt=lt||ae.getRect(it)))return!!ae.options.drop.checker&&ae.options.drop.checker(_e,Ue,ht,ae,it,Fe,qe);var Tt=ae.options.drop.overlap;if(Tt==="pointer"){var Vt=de(Fe,qe,"drag"),kt=Me(_e);kt.x+=Vt.x,kt.y+=Vt.y;var Bt=kt.x>lt.left&&kt.x<lt.right,ra=kt.y>lt.top&&kt.y<lt.bottom;ht=Bt&&ra}var Wt=Fe.getRect(qe);if(Wt&&Tt==="center"){var da=Wt.left+Wt.width/2,ga=Wt.top+Wt.height/2;ht=da>=lt.left&&da<=lt.right&&ga>=lt.top&&ga<=lt.bottom}return Wt&&b.number(Tt)&&(ht=Math.max(0,Math.min(lt.right,Wt.right)-Math.max(lt.left,Wt.left))*Math.max(0,Math.min(lt.bottom,Wt.bottom)-Math.max(lt.top,Wt.top))/(Wt.width*Wt.height)>=Tt),ae.options.drop.checker&&(ht=ae.options.drop.checker(_e,Ue,ht,ae,it,Fe,qe)),ht}(this,f,w,_,O,K,R)},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=Je.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=st(t,o.element),d.events=tt(o,0,c),d.events.activate&&(We(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:c}))}},"interactions:action-move":pt,"interactions:after-action-move":function(a,t){var o=a.interaction,c=a.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ne(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;pt(a,t),Ne(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:st,getDrop:Ye,getDropEvents:tt,fireDropEvents:Ne,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$e=Je;function rt(a){var t=a.interaction,o=a.iEvent,c=a.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(K){return K.pointer}),f=c==="start",w=c==="end",_=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],f)o.distance=he(d,_),o.box=De(d),o.scale=1,o.ds=0,o.angle=H(d,_),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(w||t.pointers.length<2){var O=t.prevEvent;o.distance=O.distance,o.box=O.box,o.scale=O.scale,o.ds=0,o.angle=O.angle,o.da=0}else o.distance=he(d,_),o.box=De(d),o.scale=o.distance/t.gesture.startDistance,o.angle=H(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 mt={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=mt,t.methodDict.gesture="gesturable",c.actions.gesture=mt.defaults},listeners:{"interactions:action-start":rt,"interactions:action-move":rt,"interactions:action-end":rt,"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}},wt=mt;function He(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,O=b.number(f.height)?f.height:f.bottom-f.top;if(w=Math.min(w,Math.abs((a==="left"||a==="right"?_:O)/2)),_<0&&(a==="left"?a="right":a==="right"&&(a="left")),O<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var K=_>=0?f.left:f.right;return o.x<K+w}if(a==="top"){var R=O>=0?f.top:f.bottom;return o.y<R+w}if(a==="right")return o.x>(_>=0?f.right:f.left)-w;if(a==="bottom")return o.y>(O>=0?f.bottom:f.top)-w}return!!b.element(c)&&(b.element(t)?t===c:ge(c,t,d))}function ot(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 yt,je,Ke={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,c=a.Interactable,d=a.defaults;Ke.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),Ke.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,c.prototype.resizable=function(f){return function(w,_,O){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=O.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=Ke,t.methodDict.resize="resizable",d.actions.resize=Ke.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),ot(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,O=c._rects,K=O.start,R=O.corrected,ae=O.delta,_e=O.previous;if(k(_e,R),w){if(k(R,_),f==="reposition"){if(R.top>R.bottom){var Ue=R.top;R.top=R.bottom,R.bottom=Ue}if(R.left>R.right){var Fe=R.left;R.left=R.right,R.right=Fe}}}else R.top=Math.min(_.top,K.bottom),R.bottom=Math.max(_.bottom,K.top),R.left=Math.min(_.left,K.right),R.right=Math.max(_.right,K.left);for(var qe in R.width=R.right-R.left,R.height=R.bottom-R.top,R)ae[qe]=R[qe]-_e[qe];d.edges=c.prepared.edges,d.rect=R,d.deltaRect=ae}})(a),ot(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 O={left:!1,right:!1,top:!1,bottom:!1};for(var K in O)O[K]=He(K,_.edges[K],w,t._latestPointer.eventTarget,c,d,_.margin||Ke.defaultMargin);O.left=O.left&&!O.right,O.top=O.top&&!O.bottom,(O.left||O.right||O.top||O.bottom)&&(a.action={name:"resize",edges:O})}else{var R=_.axis!=="y"&&w.x>d.right-Ke.defaultMargin,ae=_.axis!=="x"&&w.y>d.bottom-Ke.defaultMargin;(R||ae)&&(a.action={name:"resize",axes:(R?"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=Ke.cursors,f=null;if(o)f=d[c+o];else if(t){for(var w="",_=0,O=["top","bottom","left","right"];_<O.length;_++){var K=O[_];t[K]&&(w+=K)}f=d[w]}return f},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Xe=Ke,Se={id:"actions",install:function(a){a.usePlugin(wt),a.usePlugin(Xe),a.usePlugin(ke),a.usePlugin($e)}},M=0,me={request:function(a){return yt(a)},cancel:function(a){return je(a)},init:function(a){if(yt=a.requestAnimationFrame,je=a.cancelAnimationFrame,!yt)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var c=t[o];yt=a["".concat(c,"RequestAnimationFrame")],je=a["".concat(c,"CancelAnimationFrame")]||a["".concat(c,"CancelRequestAnimationFrame")]}yt=yt&&yt.bind(a),je=je&&je.bind(a),yt||(yt=function(d){var f=Date.now(),w=Math.max(0,16-(f-M)),_=a.setTimeout(function(){d(f+w)},w);return M=f+w,_},je=function(d){return clearTimeout(d)})}},xe={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){xe.isScrolling=!0,me.cancel(xe.i),a.autoScroll=xe,xe.interaction=a,xe.prevTime=xe.now(),xe.i=me.request(xe.scroll)},stop:function(){xe.isScrolling=!1,xe.interaction&&(xe.interaction.autoScroll=null),me.cancel(xe.i)},scroll:function(){var a=xe.interaction,t=a.interactable,o=a.element,c=a.prepared.name,d=t.options[c].autoScroll,f=at(d.container,t,o),w=xe.now(),_=(w-xe.prevTime)/1e3,O=d.speed*_;if(O>=1){var K={x:xe.x*O,y:xe.y*O};if(K.x||K.y){var R=et(f);b.window(f)?f.scrollBy(K.x,K.y):f&&(f.scrollLeft+=K.x,f.scrollTop+=K.y);var ae=et(f),_e={x:ae.x-R.x,y:ae.y-R.y};(_e.x||_e.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:_e,interaction:a,container:f})}xe.prevTime=w}xe.isScrolling&&(me.cancel(xe.i),xe.i=me.request(xe.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()&&xe.check(t.interactable,t.prepared.name))if(t.simulation)xe.x=xe.y=0;else{var c,d,f,w,_=t.interactable,O=t.element,K=t.prepared.name,R=_.options[K].autoScroll,ae=at(R.container,_,O);if(b.window(ae))w=o.clientX<xe.margin,c=o.clientY<xe.margin,d=o.clientX>ae.innerWidth-xe.margin,f=o.clientY>ae.innerHeight-xe.margin;else{var _e=be(ae);w=o.clientX<_e.left+xe.margin,c=o.clientY<_e.top+xe.margin,d=o.clientX>_e.right-xe.margin,f=o.clientY>_e.bottom-xe.margin}xe.x=d?1:w?-1:0,xe.y=f?1:c?-1:0,xe.isScrolling||(xe.margin=R.margin,xe.speed=R.speed,xe.start(t))}}};function at(a,t,o){return(b.string(a)?ye(a,t,o):a)||S(o)}function et(a){return b.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var Et={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=xe,xe.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=xe.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,xe.stop(),xe.interaction&&(xe.interaction=null)},"interactions:stop":xe.stop,"interactions:action-move":function(a){return xe.onInteractionMove(a)}}},_t=Et;function ut(a,t){var o=!1;return function(){return o||(F.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 vt(a){return b.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function gt(a){return b.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Lt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,c,d,f){var w=function(_,O,K,R,ae){var _e=_.getRect(R),Ue=O.buttons||{0:1,1:4,3:8,4:16}[O.button],Fe={action:null,interactable:_,interaction:K,element:R,rect:_e,buttons:Ue};return ae.fire("auto-start:check",Fe),Fe.action}(this,c,d,f,a);return this.options.actionChecker?this.options.actionChecker(o,c,w,this,f,d):w},t.prototype.ignoreFrom=ut(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ut(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=gt,t.prototype.styleCursor=vt}};function bt(a,t,o,c,d){return t.testIgnoreAllow(t.options[a.name],o,c)&&t.options[a.name].enabled&&Ht(t,o,a,d)?a:null}function zt(a,t,o,c,d,f,w){for(var _=0,O=c.length;_<O;_++){var K=c[_],R=d[_],ae=K.getAction(t,o,a,R);if(ae){var _e=bt(ae,K,R,f,w);if(_e)return{action:_e,interactable:K,element:R}}}return{action:null,interactable:null,element:null}}function Rt(a,t,o,c,d){var f=[],w=[],_=c;function O(R){f.push(R),w.push(_)}for(;b.element(_);){f=[],w=[],d.interactables.forEachMatch(_,O);var K=zt(a,t,o,f,w,c,d);if(K.action&&!K.interactable.options[K.action.name].manualStart)return K;_=Ze(_)}return{action:null,interactable:null,element:null}}function Kt(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,Ft(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ht(a,t,o,c){var d=a.options,f=d[o.name].max,w=d[o.name].maxPerElement,_=c.autoStart.maxInteractions,O=0,K=0,R=0;if(!(f&&w&&_))return!1;for(var ae=0,_e=c.interactions.list;ae<_e.length;ae++){var Ue=_e[ae],Fe=Ue.prepared.name;if(Ue.interacting()&&(++O>=_||Ue.interactable===a&&((K+=Fe===o.name?1:0)>=f||Ue.element===t&&(R++,Fe===o.name&&R>=w))))return!1}return _>0}function Jt(a,t){return b.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function ta(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 Ft(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)}ta(a.element,f||"",t)}else t.autoStart.cursorElement&&ta(t.autoStart.cursorElement,"",t)}var Fa={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(Lt),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 Jt(c,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ht,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget;o.interacting()||Kt(o,Rt(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()||Kt(d,Rt(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||!Ht(f,d.element,d.prepared,c)?d.stop():(d.start(d.prepared,f,d.element),Ft(d,c)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,c=o.interactable;c&&c.options.styleCursor&&ta(o.element,"",t)}},maxInteractions:Jt,withinInteractionLimit:Ht,validateAction:bt},wa=Fa,ja={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),O=o.interactable.options.drag,K=O.startAxis,R=w>_?"x":w<_?"y":"xy";if(o.prepared.axis=O.lockAxis==="start"?R[0]:O.lockAxis,R!=="xy"&&K!=="xy"&&K!==R){o.prepared.name=null;for(var ae=c,_e=function(Fe){if(Fe!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&Fe.testIgnoreAllow(qe,ae,c)){var it=Fe.getAction(o.downPointer,o.downEvent,o,ae);if(it&&it.name==="drag"&&function(lt,ht){if(!ht)return!1;var Tt=ht.options.drag.startAxis;return lt==="xy"||Tt==="xy"||Tt===lt}(R,Fe)&&wa.validateAction(it,Fe,ae,c,t))return Fe}}};b.element(ae);){var Ue=t.interactables.forEachMatch(ae,_e);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=ae;break}ae=Ze(ae)}}}}}};function Da(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(wa),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=Da(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;Da(t)>0&&(t.prepared.name=null)}},getHoldDuration:Da},Ka=Ua,Wa={id:"auto-start",install:function(a){a.usePlugin(wa),a.usePlugin(Ka),a.usePlugin(ja)}},Ha=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 qa(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=Ha,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,O=d.getDocOptions(_);if(!O||!O.events||O.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||b.element(f.target)&&G(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)]=qa,a},{})};function ya(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var c=a[o];b.plainObject(c)?t[o]=fa(c):b.array(c)?t[o]=Te(c):t[o]=c}return t}var _a=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=ba(),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(K){var R=K.interactable.options[K.prepared.name],ae=R.modifiers;return ae&&ae.length?ae:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(_e){var Ue=R[_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 O=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=ba(),this.startAll(O),this.result=this.setAll(O)}},{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,O=ba(t.coords,t.rect),K=0;K<_.length;K++){var R,ae=_[K],_e=ae.options,Ue=k({},t.coords),Fe=null;(R=ae.methods)!=null&&R.set&&this.shouldDo(_e,c,o)&&(t.state=ae,Fe=ae.methods.set(t),ne(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),O.eventProps.push(Fe)}k(this.edges,t.edges),O.delta.x=t.coords.x-t.pageCoords.x,O.delta.y=t.coords.y-t.pageCoords.y,O.rectDelta.left=t.rect.left-f.left,O.rectDelta.right=t.rect.right-f.right,O.rectDelta.top=t.rect.top-f.top,O.rectDelta.bottom=t.rect.bottom-f.bottom;var qe=this.result.coords,it=this.result.rect;if(qe&&it){var lt=O.rect.left!==it.left||O.rect.right!==it.right||O.rect.top!==it.top||O.rect.bottom!==it.bottom;O.changed=lt||qe.x!==O.coords.x||qe.y!==O.coords.y}return O}},{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,O=w.delta;c==="start"&&k(this.startDelta,w.delta);for(var K=0,R=[[f,_],[d,O]];K<R.length;K++){var ae=R[K],_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 Fe=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=Fe.left,qe.right+=Fe.right,qe.top+=Fe.top,qe.bottom+=Fe.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.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,O={x:t.modifiedCoords.x-_.x,y:t.modifiedCoords.y-_.y};w.coords.x+=O.x,w.coords.y+=O.y,w.delta.x+=O.x,w.delta.y+=O.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 O=_.options,K=_.methods,R=K.beforeEnd&&K.beforeEnd(t);if(R)return this.endResult=R,!1;f=f||!f&&this.shouldDo(O,!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,O=_.delta,K=_.rectDelta,R=0,ae=[[c.start,w],[c.cur,O]];R<ae.length;R++){var _e=ae[R],Ue=_e[0],Fe=_e[1];Ue.page.x-=Fe.x,Ue.page.y-=Fe.y,Ue.client.x-=Fe.x,Ue.client.y-=Fe.y}d.left-=K.left,d.right-=K.right,d.top-=K.top,d.bottom-=K.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 fa(o)}),this.result=ba(k({},t.result.coords),k({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ba(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 ca(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 O={options:w,methods:c,name:t,enable:function(){return w.enabled=!0,O},disable:function(){return w.enabled=!1,O}};return O};return t&&typeof t=="string"&&(d._defaults=o,d._methods=c),d}function ma(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,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":ma,"interactions:action-move":ma,"interactions:action-end":ma,"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=Xa,Va={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ea=function(a){y(o,a);var t=j(o);function o(c,d,f,w,_,O,K){var R;s(this,o),(R=t.call(this,c)).relatedTarget=null,R.screenX=void 0,R.screenY=void 0,R.button=void 0,R.buttons=void 0,R.ctrlKey=void 0,R.shiftKey=void 0,R.altKey=void 0,R.metaKey=void 0,R.page=void 0,R.client=void 0,R.delta=void 0,R.rect=void 0,R.x0=void 0,R.y0=void 0,R.t0=void 0,R.dt=void 0,R.duration=void 0,R.clientX0=void 0,R.clientY0=void 0,R.velocity=void 0,R.speed=void 0,R.swipe=void 0,R.axes=void 0,R.preEnd=void 0,_=_||c.element;var ae=c.interactable,_e=(ae&&ae.options||Va).deltaSource,Ue=de(ae,_,f),Fe=w==="start",qe=w==="end",it=Fe?V(R):c.prevEvent,lt=Fe?c.coords.start:qe?{page:it.page,client:it.client,timeStamp:c.coords.cur.timeStamp}:c.coords.cur;return R.page=k({},lt.page),R.client=k({},lt.client),R.rect=k({},c.rect),R.timeStamp=lt.timeStamp,qe||(R.page.x-=Ue.x,R.page.y-=Ue.y,R.client.x-=Ue.x,R.client.y-=Ue.y),R.ctrlKey=d.ctrlKey,R.altKey=d.altKey,R.shiftKey=d.shiftKey,R.metaKey=d.metaKey,R.button=d.button,R.buttons=d.buttons,R.target=_,R.currentTarget=_,R.preEnd=O,R.type=K||f+(w||""),R.interactable=ae,R.t0=Fe?c.pointers[c.pointers.length-1].downTime:it.t0,R.x0=c.coords.start.page.x-Ue.x,R.y0=c.coords.start.page.y-Ue.y,R.clientX0=c.coords.start.client.x-Ue.x,R.clientY0=c.coords.start.client.y-Ue.y,R.delta=Fe||qe?{x:0,y:0}:{x:R[_e].x-it[_e].x,y:R[_e].y-it[_e].y},R.dt=c.coords.delta.timeStamp,R.duration=R.timeStamp-R.t0,R.velocity=k({},c.coords.velocity[_e]),R.speed=dt(R.velocity.x,R.velocity.y),R.swipe=qe||w==="inertiastart"?R.getSwipe():null,R}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}(Ae);Object.defineProperties(Ea.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 Ya=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}),Ga=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}({}),Ja=0,Za=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=ut(function(R){this.move(R)},"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=Ja++,this._scopeFire=d,this.pointerType=c;var f=this;this._proxy={};var w=function(R){Object.defineProperty(o._proxy,R,{get:function(){return f[R]}})};for(var _ in Ga)w(_);var O=function(R){Object.defineProperty(o._proxy,R,{value:function(){return f[R].apply(f,arguments)}})};for(var K in Oa)O(K);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 _,O,K,R=this.getPointerIndex(t),ae={pointer:t,pointerIndex:R,pointerInfo:this.pointers[R],event:o,type:"move",eventTarget:c,dx:d,dy:f,duplicate:w,interaction:this};w||(_=this.coords.velocity,O=this.coords.delta,K=Math.max(O.timeStamp/1e3,.001),_.page.x=O.page.x/K,_.page.y=O.page.y/K,_.client.x=O.client.x/K,_.client.y=O.client.y/K,_.timeStamp=K),this._scopeFire("interactions:move",ae),w||this.simulation||(this.interacting()&&(ae.type=null,this.move(ae)),this.pointerWasMoved&&q(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||oe(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=le(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(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,_,O=le(t),K=this.getPointerIndex(t),R=this.pointers[K];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),R?R.pointer=t:(R=new Ya(O,t,o,null,null),K=this.pointers.length,this.pointers.push(R)),U(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,R.downTime=this.coords.cur.timeStamp,R.downTarget=c,A(this.downPointer,t),this.interacting()||(q(this.coords.start,this.coords.cur),q(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:R,pointerIndex:K,interaction:this}),K}},{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 Ea(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"&&(ne(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 Ma(a){Ct(a.interaction)}function Ct(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return nt(a.coords.cur,t),nt(a.coords.delta,t),ne(a.edges,a.rect,t),t.x=0,t.y=0,!0}function aa(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 nt(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 qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=aa},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&&(nt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":Ma,"interactions:before-action-move":Ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Ct(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}}},St=qt,Dt=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=It(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 _a(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=It(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=me.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,c,d,f,w,_,O=this,K=this.interaction,R=It(K).resistance,ae=(K._now()-this.t0)/1e3;if(ae<this.te){var _e,Ue=1-(Math.exp(-R*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:$t(_=Ue,t,c,f),y:$t(_,o,d,w)}):_e={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var Fe={x:_e.x-this.currentOffset.x,y:_e.y-this.currentOffset.y};this.currentOffset.x+=Fe.x,this.currentOffset.y+=Fe.y,K.offsetBy(Fe),K.move(),this.onNextFrame(function(){return O.inertiaTick()})}else K.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=It(o).smoothEndDuration;if(c<d){var f={x:At(c,0,this.targetOffset.x,d),y:At(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"}),q(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,me.cancel(this.timeout)}}]),a}();function It(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Mt={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(St),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 Dt(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=Ze(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":ma,"interactions:action-inertiastart":ma,"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 $t(a,t,o,c){var d=1-a;return d*d*t+2*d*a*o+a*a*c}function At(a,t,o,c){return-o*(a/=c)*(a-2)+t}var na=Mt;function Yt(a,t){for(var o=0;o<t.length;o++){var c=t[o];if(a.immediatePropagationStopped)break;c(a)}}var za=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])&&Yt(t,o),!t.propagationStopped&&c&&(o=c[t.type])&&Yt(t,o)}},{key:"on",value:function(t,o){var c=Ce(t,o);for(t in c)this.types[t]=pe(this.types[t]||[],c[t])}},{key:"off",value:function(t,o){var c=Ce(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],O=d.indexOf(_);O!==-1&&d.splice(O,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Qa=function(){function a(t){s(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,A(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 Ra(a){return b.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function en(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(R,ae,_e,Ue,Fe){var qe=Ra(Fe);if(!c[_e]){c[_e]=[];for(var it=0;it<d.length;it++){var lt=d[it];w(lt,_e,O),w(lt,_e,K,!0)}}var ht=c[_e],Tt=Ve(ht,function(Vt){return Vt.selector===R&&Vt.context===ae});Tt||(Tt={selector:R,context:ae,listeners:[]},ht.push(Tt)),Tt.listeners.push({func:Ue,options:qe})},removeDelegate:function(R,ae,_e,Ue,Fe){var qe,it=Ra(Fe),lt=c[_e],ht=!1;if(lt)for(qe=lt.length-1;qe>=0;qe--){var Tt=lt[qe];if(Tt.selector===R&&Tt.context===ae){for(var Vt=Tt.listeners,kt=Vt.length-1;kt>=0;kt--){var Bt=Vt[kt];if(Bt.func===Ue&&en(Bt.options,it)){Vt.splice(kt,1),Vt.length||(lt.splice(qe,1),_(ae,_e,O),_(ae,_e,K,!0)),ht=!0;break}}if(ht)break}}},delegateListener:O,delegateUseCapture:K,delegatedEvents:c,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function w(R,ae,_e,Ue){if(R.addEventListener){var Fe=Ra(Ue),qe=Ve(o,function(it){return it.eventTarget===R});qe||(qe={eventTarget:R,events:{}},o.push(qe)),qe.events[ae]||(qe.events[ae]=[]),Ve(qe.events[ae],function(it){return it.func===_e&&en(it.options,Fe)})||(R.addEventListener(ae,_e,f.supportsOptions?Fe:Fe.capture),qe.events[ae].push({func:_e,options:Fe}))}}function _(R,ae,_e,Ue){if(R.addEventListener&&R.removeEventListener){var Fe=$(o,function(ra){return ra.eventTarget===R}),qe=o[Fe];if(qe&&qe.events)if(ae!=="all"){var it=!1,lt=qe.events[ae];if(lt){if(_e==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Tt=lt[ht];_(R,ae,Tt.func,Tt.options)}return}for(var Vt=Ra(Ue),kt=0;kt<lt.length;kt++){var Bt=lt[kt];if(Bt.func===_e&&en(Bt.options,Vt)){R.removeEventListener(ae,_e,f.supportsOptions?Vt:Vt.capture),lt.splice(kt,1),lt.length===0&&(delete qe.events[ae],it=!0);break}}}it&&!Object.keys(qe.events).length&&o.splice(Fe,1)}else for(ae in qe.events)qe.events.hasOwnProperty(ae)&&_(R,ae,"all")}}function O(R,ae){for(var _e=Ra(ae),Ue=new Qa(R),Fe=c[R.type],qe=re(R)[0],it=qe;b.element(it);){for(var lt=0;lt<Fe.length;lt++){var ht=Fe[lt],Tt=ht.selector,Vt=ht.context;if(G(it,Tt)&&te(Vt,qe)&&te(Vt,it)){var kt=ht.listeners;Ue.currentTarget=it;for(var Bt=0;Bt<kt.length;Bt++){var ra=kt[Bt];en(ra.options,_e)&&ra.func(Ue)}}}it=Ze(it)}}function K(R){return O(R,!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}},cn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=cn.methodOrder;t<o.length;t++){var c=o[t],d=cn[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],O=c;if(_.simulation&&_.simulation.allowResume&&_.pointerType===t)for(;O;){if(O===_.element)return _;O=Ze(O)}}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 O=_[w];if(O.pointerType===c){if(O.simulation&&!yn(O,o))continue;if(O.interacting())return O;t||(t=O)}}if(t)return t;for(var K=0,R=f.interactions.list;K<R.length;K++){var ae=R[K];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(yn(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 yn(a,t){return a.pointers.some(function(o){return o.id===t})}var un=cn,ha=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function tn(a,t){return function(o){var c=t.interactions.list,d=fe(o),f=re(o),w=f[0],_=f[1],O=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var K=0,R=o.changedTouches;K<R.length;K++){var ae=R[K],_e={pointer:ae,pointerId:le(ae),pointerType:d,eventType:o.type,eventTarget:w,curEventTarget:_,scope:t},Ue=dn(_e);O.push([_e.pointer,_e.eventTarget,_e.curEventTarget,Ue])}}else{var Fe=!1;if(!Z.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<c.length&&!Fe;qe++)Fe=c[qe].pointerType!=="mouse"&&c[qe].pointerIsDown;Fe=Fe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Fe){var it={pointer:o,pointerId:le(o),pointerType:d,eventType:o.type,curEventTarget:_,eventTarget:w,scope:t},lt=dn(it);O.push([it.pointer,it.eventTarget,it.curEventTarget,lt])}}for(var ht=0;ht<O.length;ht++){var Tt=O[ht],Vt=Tt[0],kt=Tt[1],Bt=Tt[2];Tt[3][a](Vt,o,kt,Bt)}}}function dn(a){var t=a.pointerType,o=a.scope,c={interaction:un.search(a),searchDetails:a};return o.fire("interactions:find",c),c.interaction||o.interactions.new({pointerType:t})}function ua(a,t){var o=a.doc,c=a.scope,d=a.options,f=c.interactions.docEvents,w=c.events,_=w[t];for(var O in c.browser.isIOS&&!d.events&&(d.events={passive:!1}),w.delegatedEvents)_(o,O,w.delegateListener),_(o,O,w.delegateUseCapture,!0);for(var K=d&&d.events,R=0;R<f.length;R++){var ae=f[R];_(o,ae.type,ae.listener,K)}}var Bn={id:"core/interactions",install:function(a){for(var t={},o=0;o<ha.length;o++){var c=ha[o];t[c]=tn(c,a)}var d,f=Z.pEventTypes;function w(){for(var _=0,O=a.interactions.list;_<O.length;_++){var K=O[_];if(K.pointerIsDown&&K.pointerType==="touch"&&!K._interacting)for(var R=function(){var Ue=_e[ae];a.documents.some(function(Fe){return te(Fe.doc,Ue.downTarget)})||K.removePointer(Ue.pointer,Ue.event)},ae=0,_e=K.pointers;ae<_e.length;ae++)R()}}(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 O=0,K=a.interactions.list;O<K.length;O++)K[O].documentBlur(_)}}),a.prevTouchTime=0,a.Interaction=function(_){y(K,_);var O=j(K);function K(){return s(this,K),O.apply(this,arguments)}return h(K,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(R){a.interactions.pointerMoveTolerance=R}},{key:"_now",value:function(){return a.now()}}]),K}(Za),a.interactions={list:[],new:function(_){_.scopeFire=function(K,R){return a.fire(K,R)};var O=new a.Interaction(_);return a.interactions.list.push(O),O},listeners:t,docEvents:d,pointerMoveTolerance:1},a.usePlugin(Na)},listeners:{"scope:add-document":function(a){return ua(a,"add")},"scope:remove-document":function(a){return ua(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:ua,doOnInteractions:tn,methodNames:ha},Pa=Bn,La=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(La||{}),hr=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 za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||c,this._win=S(J(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(O){return(w==null||w(O))&&ya(O,f._actions)};(b.array(o)||b.object(o))&&this._onOff(La.Off,t,o,void 0,_),(b.array(c)||b.object(c))&&this._onOff(La.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]=Te(_):b.plainObject(_)?(w[f]=k(w[f]||{},fa(_)),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)),Le(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(J(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)?ge(c,t,o):!!b.element(t)&&te(t,c))}},{key:"testIgnore",value:function(t,o,c){return!(!t||!b.element(c))&&(b.string(t)?ge(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=Ce(o,c,f);for(var _ in w){_==="wheel"&&(_=Z.wheelEvent);for(var O=0,K=w[_];O<K.length;O++){var R=K[O];ya(_,this._actions)?this.events[t===La.On?"on":"off"](_,R):b.string(this.target)?this._scopeEvents[t===La.On?"addDelegate":"removeDelegate"](this.target,this._context,_,R,d):this._scopeEvents[t===La.On?"add":"remove"](this.target,_,R,d)}}return this}},{key:"on",value:function(t,o,c){return this._onOff(La.On,t,o,c)}},{key:"off",value:function(t,o,c){return this._onOff(La.Off,t,o,c)}},{key:"set",value:function(t){var o=this._defaults;for(var c in b.object(t)||(t={}),this.options=fa(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 O=_.length-1;O>=0;O--)this._scopeEvents.removeDelegate(this.target,this._context,t,_[O][0],_[O][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),vr=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,function(O){return O===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 Ve(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)&&G(t,f.target):t===f.target)&&f.inContext(t)&&(w=o(f)),w!==void 0)return w}}}]),a}(),mr=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=Z,this.defaults=fa(Va),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(c){var d=function f(w,_){var O=c.interactables.getExisting(w,_);return O||((O=c.interactables.new(w,_)).events.global=f.globalEvents),O};return d.getPointerAverage=X,d.getTouchBBox=De,d.getTouchDistance=he,d.getTouchAngle=H,d.getElementRect=Le,d.getElementClientRect=be,d.matchesSelector=G,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=ut(function(f,w,_){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var O=0,K=f;O<K.length;O++){var R=K[O];this.on(R,w,_)}return this}if(b.object(f)){for(var ae in f)this.on(ae,f[ae],w);return this}return ya(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=ut(function(f,w,_){if(b.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),b.array(f)){for(var O=0,K=f;O<K.length;O++){var R=K[O];this.off(R,w,_)}return this}if(b.object(f)){for(var ae in f)this.off(ae,f[ae],w);return this}var _e;return ya(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 Z.supportsTouch},d.supportsPointerEvent=function(){return Z.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=Ea,this.Interactable=void 0,this.interactables=new vr(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){y(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}(hr)}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),Z.init(c),me.init(c),o.window=c,o.document=c.document,o.usePlugin(Pa),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(_,O){return _[O]=!0,_[Do(O)]=!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 mr,la=_o.interactStatic,gr=typeof globalThis<"u"?globalThis:window;_o.init(gr);var yr=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,O=a.offset,K=O===void 0?{x:0,y:0}:O,R={range:f,grid:a,x:null,y:null},ae=0;ae<t.length;ae++){var _e=t[ae],Ue=_e[0],Fe=_e[1],qe=Math.round((c-K.x)/a[Ue]),it=Math.round((d-K.y)/a[Fe]);R[Ue]=Math.max(_.left,Math.min(_.right,qe*a[Ue]+K.x)),R[Fe]=Math.max(_.top,Math.min(_.bottom,it*a[Fe]+K.y))}return R};return o.grid=a,o.coordFields=t,o}}),br={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=k(t.snappers||{},yr),t.createSnapGrid=t.snappers.grid}},kr=br,xr={start:function(a){var t=a.state,o=a.rect,c=a.edges,d=a.pageCoords,f=t.options,w=f.ratio,_=f.enabled,O=t.options,K=O.equalDelta,R=O.modifiers;w==="preserve"&&(w=o.width/o.height),t.startCoords=k({},d),t.startRect=k({},o),t.ratio=w,t.equalDelta=K;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),R!=null&&R.length){var Ue=new _a(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(R),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?wr:Dr;if(k(a.edges,d),w(t,t.xIsPrimaryAxis,c,o),!t.subModification)return null;var _=k({},o);ne(d,_,{x:c.x-f.x,y:c.y-f.y});var O=t.subModification.setAll(l(l({},a),{},{rect:_,edges:d,pageCoords:c,prevCoords:c,prevRect:_})),K=O.delta;return O.changed&&(w(t,Math.abs(K.x)>Math.abs(K.y),O.coords,O.rect),k(c,O.coords)),O.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function wr(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 Dr(a,t,o,c){var d=a.startRect,f=a.startCoords,w=a.ratio,_=a.edgeSign;if(t){var O=c.width/w;o.y=f.y+(O-d.height)*_.y}else{var K=c.height*w;o.x=f.x+(K-d.width)*_.x}}var _r=ca(xr,"aspectRatio"),Eo=function(){};Eo._defaults={};var In=Eo;function an(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,O=k({left:0,top:0,right:0,bottom:0},w.offset||{});if(t&&_){var K=an(w.restriction,d,f);if(K){var R=K.right-K.left-t.width,ae=K.bottom-K.top-t.height;R<0&&(O.left+=R,O.right+=R),ae<0&&(O.top+=ae,O.bottom+=ae)}O.left+=o.left-t.width*_.left,O.top+=o.top-t.height*_.top,O.right+=o.right-t.width*(1-_.right),O.bottom+=o.bottom-t.height*(1-_.bottom)}c.offset=O},set:function(a){var t=a.coords,o=a.interaction,c=a.state,d=c.options,f=c.offset,w=an(d.restriction,o,t);if(w){var _=function(O){return!O||"left"in O&&"top"in O||((O=k({},O)).left=O.x||0,O.top=O.y||0,O.right=O.right||O.left+O.width,O.bottom=O.bottom||O.top+O.height),O}(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}},Er=ca(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 bn={noInner:Co,noOuter:So,start:function(a){var t,o=a.interaction,c=a.startOffset,d=a.state,f=d.options;f&&(t=we(an(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),O=an(w.inner,c,_)||{},K=an(w.outer,c,_)||{};To(O,Co),To(K,So),o.top?t.y=Math.min(Math.max(K.top+f.top,_.y),O.top+f.top):o.bottom&&(t.y=Math.max(Math.min(K.bottom+f.bottom,_.y),O.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(K.left+f.left,_.x),O.left+f.left):o.right&&(t.x=Math.max(Math.min(K.right+f.right,_.x),O.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Cr=ca(bn,"restrictEdges"),Sr=k({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Nn.defaults),Tr=ca({start:Nn.start,set:Nn.set,defaults:Sr},"restrictRect"),Br={width:-1/0,height:-1/0},Ir={width:1/0,height:1/0},Nr=ca({start:function(a){return bn.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=ue(an(f.min,t,a.coords))||Br,_=ue(an(f.max,t,a.coords))||Ir;o.options={endOnly:f.endOnly,inner:k({},bn.noInner),outer:k({},bn.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),bn.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,O=w.options,K=O.offsetWithOrigin?function(_e){var Ue=_e.interaction.element,Fe=we(Ie(_e.state.options.origin,null,null,[Ue])),qe=Fe||de(_e.interactable,Ue,_e.interaction.prepared.name);return qe}(a):{x:0,y:0};if(O.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var R=Ie(O.offset,c,d,[o]);(t=we(R)||{x:0,y:0}).x+=K.x,t.y+=K.y}var ae=O.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=de(t.interactable,t.element,t.prepared.name),_=k({},o),O=[];d.offsetWithOrigin||(_.x-=w.x,_.y-=w.y);for(var K=0,R=f;K<R.length;K++)for(var ae=R[K],_e=_.x-ae.x,Ue=_.y-ae.y,Fe=0,qe=d.targets.length;Fe<qe;Fe++){var it=d.targets[Fe],lt=void 0;(lt=b.func(it)?it(_e,Ue,t._proxy,ae,Fe):it)&&O.push({x:(b.number(lt.x)?lt.x:_e)+ae.x,y:(b.number(lt.y)?lt.y:Ue)+ae.y,range:b.number(lt.range)?lt.range:d.range,source:it,index:Fe,offset:ae})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<O.length;Tt++){var Vt=O[Tt],kt=Vt.range,Bt=Vt.x-_.x,ra=Vt.y-_.y,Wt=dt(Bt,ra),da=Wt<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&kt!==1/0?Wt/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||Wt<ht.distance:!ht.inRange&&Wt<ht.distance)||(ht.target=Vt,ht.distance=Wt,ht.range=kt,ht.inRange=da,ht.delta.x=Bt,ht.delta.y=ra)}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}},Ar=ca(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,O=d.targets||[];_<O.length;_++){var K=O[_],R=void 0;if(R=b.func(K)?K(w.x,w.y,t):K){for(var ae=0,_e=o.targetFields;ae<_e.length;ae++){var Ue=_e[ae],Fe=Ue[0],qe=Ue[1];if(Fe in R||qe in R){R.x=R[Fe],R.y=R[qe];break}}o.options.targets.push(R)}}var it=Zn.set(a);return o.options=d,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Vr=ca(An,"snapSize"),Qn={aspectRatio:_r,restrictEdges:Cr,restrict:Er,restrictRect:Tr,restrictSize:Nr,snapEdges:ca({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(fa(An.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ar,snapSize:Vr,spring:In,avoid:In,transform:In,rubberband:In},Or={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(Aa),a.usePlugin(kr),t.modifiers=Qn,Qn){var c=Qn[o],d=c._defaults,f=c._methods;d._methods=f,a.defaults.perAction[o]=d}}},Mr=Or,Bo=function(a){y(o,a);var t=j(o);function o(c,d,f,w,_,O){var K;if(s(this,o),A(V(K=t.call(this,_)),f),f!==d&&A(V(K),d),K.timeStamp=O,K.originalEvent=f,K.type=c,K.pointerId=le(d),K.pointerType=fe(d),K.target=w,K.currentTarget=null,c==="tap"){var R=_.getPointerIndex(d);K.dt=K.timeStamp-_.pointers[R].downTime;var ae=K.timeStamp-_.tapTime;K.double=!!_.prevTap&&_.prevTap.type!=="doubletap"&&_.prevTap.target===K.target&&ae<500}else c==="doubletap"&&(K.dt=d.timeStamp-_.tapTime,K.double=!0);return K}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}(Ae),kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=kn,a.defaults.actions.pointerEvents=kn.defaults,k(a.actions.phaselessTypes,kn.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),$a({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,O=o.pointerIndex,K=d.pointers[O].hold,R=Y(_),ae={interaction:d,pointer:f,event:w,eventTarget:_,type:"hold",targets:[],path:R,node:null},_e=0;_e<R.length;_e++){var Ue=R[_e];ae.node=Ue,c.fire("pointerEvents:collect-targets",ae)}if(ae.targets.length){for(var Fe=1/0,qe=0,it=ae.targets;qe<it.length;qe++){var lt=it[qe].eventable.options.holdDuration;lt<Fe&&(Fe=lt)}K.duration=Fe,K.timeout=setTimeout(function(){$a({interaction:d,eventTarget:_,pointer:f,event:w,type:"hold"},c)},Fe)}})(a,t),$a(a,t)},"interactions:up":function(a,t){eo(a),$a(a,t),function(o,c){var d=o.interaction,f=o.pointer,w=o.event,_=o.eventTarget;d.pointerWasMoved||$a({interaction:d,eventTarget:_,pointer:f,event:w,type:"tap"},c)}(a,t)},"interactions:cancel":function(a,t){eo(a),$a(a,t)}},PointerEvent:Bo,fire:$a,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 $a(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget,w=a.type,_=a.targets,O=_===void 0?Io(a,t):_,K=new Bo(w,c,d,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:K});for(var R={interaction:o,pointer:c,event:d,eventTarget:f,targets:O,type:w,pointerEvent:K},ae=0;ae<O.length;ae++){var _e=O[ae];for(var Ue in _e.props||{})K[Ue]=_e.props[Ue];var Fe=de(_e.eventable,_e.node);if(K._subtractOrigin(Fe),K.eventable=_e.eventable,K.currentTarget=_e.node,_e.eventable.fire(K),K._addOrigin(Fe),K.immediatePropagationStopped||K.propagationStopped&&ae+1<O.length&&O[ae+1].node!==K.currentTarget)break}if(t.fire("pointerEvents:fired",R),w==="tap"){var qe=K.double?$a({interaction:o,pointer:c,event:d,eventTarget:f,type:"doubletap"},t):K;o.prevTap=qe,o.tapTime=qe.timeStamp}return K}function Io(a,t){var o=a.interaction,c=a.pointer,d=a.event,f=a.eventTarget,w=a.type,_=o.getPointerIndex(c),O=o.pointers[_];if(w==="tap"&&(o.pointerWasMoved||!O||O.downTarget!==f))return[];for(var K=Y(f),R={interaction:o,pointer:c,event:d,eventTarget:f,type:w,path:K,targets:[],node:null},ae=0;ae<K.length;ae++){var _e=K[ae];R.node=_e,t.fire("pointerEvents:collect-targets",R)}return w==="hold"&&(R.targets=R.targets.filter(function(Ue){var Fe,qe;return Ue.eventable.options.holdDuration===((Fe=o.pointers[_])==null||(qe=Fe.hold)==null?void 0:qe.duration)})),R.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 zr=Object.freeze({__proto__:null,default:kn});function Rr(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Pr={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(kn);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)]=Rr,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))}}})},Lr=Pr,$r={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,O=_.options;_.types[d]&&_.types[d].length&&w.testIgnoreAllow(O,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=$r,jr={id:"pointer-events",install:function(a){a.usePlugin(zr),a.usePlugin(Lr),a.usePlugin(Fr)}},Ur=jr,Kr={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,O=_?[]:null,K=function(){var ae=w[R],_e=c.getRect(ae);if(!_e)return 1;var Ue,Fe=Ve(f.interactions.list,function(lt){return lt.interacting()&&lt.interactable===c&&lt.element===ae&&lt.prepared.name===d.name});if(Fe)Fe.move(),O&&(Ue=Fe._reflowPromise||new _(function(lt){Fe._reflowResolve=lt}));else{var qe=ue(_e),it=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:f.now()});Ue=function(lt,ht,Tt,Vt,kt){var Bt=lt.interactions.new({pointerType:"reflow"}),ra={interaction:Bt,event:kt,pointer:kt,eventTarget:Tt,phase:"reflow"};Bt.interactable=ht,Bt.element=Tt,Bt.prevEvent=kt,Bt.updatePointer(kt,kt,Tt,!0),oe(Bt.coords.delta),ft(Bt.prepared,Vt),Bt._doPhase(ra);var Wt=lt.window,da=Wt.Promise,ga=da?new da(function(Ca){Bt._reflowResolve=Ca}):void 0;return Bt._reflowPromise=ga,Bt.start(Vt,ht,Tt),Bt._interacting?(Bt.move(ra),Bt.end(kt)):(Bt.stop(),Bt._reflowResolve()),Bt.removePointer(kt,kt),ga}(f,c,ae,d,it)}O&&O.push(Ue)},R=0;R<w.length&&!K();R++);return O&&_.all(O).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))}}},Wr=Kr;if(la.use(Na),la.use(St),la.use(Ur),la.use(na),la.use(Mr),la.use(Wa),la.use(Se),la.use(_t),la.use(Wr),la.default=la,u(n)==="object"&&n)try{n.exports=la}catch{}return la.default=la,la})}(Dn,Dn.exports)),Dn.exports}var Hp=Wp();const tl=Oe.getDefaultExportFromCjs(Hp),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(Gl),g=e.inject(Jl);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 y=!1,D=!1,E=NaN,V=NaN,j=NaN,B=NaN,Q=-1,L=-1,P=-1,F=-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){Ce(N)}function Qe(){Ge()}function ke(N){pa(l.isDraggable)&&(p.draggable=N)}function Pe(N){pa(l.isResizable)&&(p.resizable=N)}function ze(N){pa(l.isBounded)&&(p.bounded=N)}function I(N){p.transformScale=N}function ee(N){p.rowHeight=N}function Z(N){p.maxRows=N}function te(){p.rtl=Qo()==="rtl",Ge()}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=ar(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,pa(l.isDraggable)?p.draggable=s.isDraggable:p.draggable=l.isDraggable,pa(l.isResizable)?p.resizable=s.isResizable:p.resizable=l.isResizable,pa(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,ia(Le)}),g.on("updateWidth",Be),g.on("compact",Qe),g.on("setDraggable",ke),g.on("setResizable",Pe),g.on("setBounded",ze),g.on("setTransformScale",I),g.on("setRowHeight",ee),g.on("setMaxRows",Z),g.on("directionchange",te),g.on("setColNum",Re)}),e.onBeforeUnmount(()=>{g.off("updateWidth",Be),g.off("compact",Qe),g.off("setDraggable",ke),g.off("setResizable",Pe),g.off("setBounded",ze),g.off("setTransformScale",I),g.off("setRowHeight",ee),g.off("setMaxRows",Z),g.off("directionchange",te),g.off("setColNum",Re),h.value&&(h.value.unset(),h.value=null),s.decreaseItem(ie)}),r({state:p,wrapper:b});const Ze=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,G=e.computed(()=>p.resizable&&!l.static),z=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),ce=e.computed(()=>(p.draggable||p.resizable)&&!l.static),ge=Rp("item"),Ee=e.computed(()=>({[ge.b()]:!0,[ge.bm("resizable")]:G.value,[ge.bm("static")]:l.static,[ge.bm("resizing")]:p.isResizing,[ge.bm("dragging")]:p.isDragging,[ge.bm("transform")]:p.useCssTransforms,[ge.bm("rtl")]:z.value,[ge.bm("no-touch")]:Ze&&ce.value})),be=e.computed(()=>[ge.be("resizer"),z.value&&ge.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,N=>{p.draggable=N}),e.watch(()=>l.static,()=>{ia(A),ia(oe)}),e.watch(()=>p.draggable,()=>{ia(A)}),e.watch(()=>l.isResizable,N=>{p.resizable=N}),e.watch(()=>l.isBounded,N=>{p.bounded=N}),e.watch(()=>p.resizable,()=>{ia(oe)}),e.watch(()=>p.rowHeight,()=>{ia(Le),ia(Y)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{ia(oe),ia(Le),ia(Y)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{ia(oe)}),e.watch(z,()=>{ia(oe),ia(Le)}),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),ia(Le),ia(Y))});function Le(){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=ye(m,S,v,T);p.isDragging&&(N.top=p.dragging.top,z.value?N.right=p.dragging.left:N.left=p.dragging.left),p.isResizing&&(N.width=p.resizing.width,N.height=p.resizing.height);let se;p.useCssTransforms?z.value?se=Vp(N.top,N.right,N.width,N.height):se=Ap(N.top,N.left,N.width,N.height):z.value?se=Mp(N.top,N.right,N.width,N.height):se=Op(N.top,N.left,N.width,N.height),p.style=se}function Y(){const N={};for(const se of["width","height"]){const Me=p.style[se].match(/^(\d+)px$/);if(!Me)return;N[se]=Me[1]}u("container-resized",l.i,l.h,l.w,N.height,N.width)}function J(N){if(l.static)return;const se=N.type;if(se==="resizestart"&&p.isResizing||se!=="resizestart"&&!p.isResizing)return;const Me=Jo(N);if(pa(Me))return;const{x:le,y:U}=Me,W={width:0,height:0};let X;switch(se){case"resizestart":{oe(),Q=v,L=T,X=ye(m,S,v,T),W.width=X.width,W.height=X.height,p.resizing=W,p.isResizing=!0;break}case"resizemove":{!N.edges.right&&!N.edges.left&&(j=le),!N.edges.top&&!N.edges.bottom&&(B=U);const De=Zo(j,B,le,U);z.value?W.width=p.resizing.width-De.deltaX/p.transformScale:W.width=p.resizing.width+De.deltaX/p.transformScale,W.height=p.resizing.height+De.deltaY/p.transformScale,p.resizing=W;break}case"resizeend":{X=ye(m,S,v,T),W.width=X.width,W.height=X.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}X=de(W.height,W.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),j=le,B=U,(v!==X.w||T!==X.h)&&u("resize",l.i,X.h,X.w,W.height,W.width),N.type==="resizeend"&&(Q!==v||L!==T)&&u("resized",l.i,X.h,X.w,W.height,W.width),g.emit("resizeEvent",N.type,l.i,m,S,X.h,X.w)}function k(N){if(l.static||p.isResizing)return;const se=N.type;if(se==="dragstart"&&p.isDragging||se!=="dragstart"&&!p.isDragging)return;const Me=Jo(N);if(pa(Me))return;const{x:le,y:U}=Me,W=N.target;if(!W.offsetParent)return;const X={top:0,left:0};switch(se){case"dragstart":{P=m,F=S;const he=W.offsetParent.getBoundingClientRect(),H=W.getBoundingClientRect(),fe=H.left/p.transformScale,re=he.left/p.transformScale,Ae=H.right/p.transformScale,pe=he.right/p.transformScale,Te=H.top/p.transformScale,$=he.top/p.transformScale;z.value?X.left=(Ae-pe)*-1:X.left=fe-re,X.top=Te-$,p.dragging=X,p.isDragging=!0;break}case"dragmove":{const he=Zo(E,V,le,U);if(z.value?X.left=p.dragging.left-he.deltaX/p.transformScale:X.left=p.dragging.left+he.deltaX/p.transformScale,X.top=p.dragging.top+he.deltaY/p.transformScale,p.bounded){const H=W.offsetParent.clientHeight-ue(l.h,p.rowHeight,p.margin[1]);X.top=ne(X.top,0,H);const fe=we(),re=p.containerWidth-ue(l.w,fe,p.margin[0]);X.left=ne(X.left,0,re)}p.dragging=X;break}case"dragend":{const he=W.offsetParent.getBoundingClientRect(),H=W.getBoundingClientRect(),fe=H.left/p.transformScale,re=he.left/p.transformScale,Ae=H.right/p.transformScale,pe=he.right/p.transformScale,Te=H.top/p.transformScale,$=he.top/p.transformScale;z.value?X.left=(Ae-pe)*-1:X.left=fe-re,X.top=Te-$,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let De;z.value,De=Ie(X.top,X.left),E=le,V=U,(m!==De.x||S!==De.y)&&u("move",l.i,De.x,De.y),N.type==="dragend"&&(P!==m||F!==S)&&u("moved",l.i,De.x,De.y),g.emit("dragEvent",N.type,l.i,De.x,De.y,T,v)}function ye(N,se,Me,le){const U=we();let W;return z.value?W={right:Math.round(U*N+(N+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(U*Me+Math.max(0,Me-1)*p.margin[0]),height:le===1/0?le:Math.round(p.rowHeight*le+Math.max(0,le-1)*p.margin[1])}:W={left:Math.round(U*N+(N+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(U*Me+Math.max(0,Me-1)*p.margin[0]),height:le===1/0?le:Math.round(p.rowHeight*le+Math.max(0,le-1)*p.margin[1])},W}function Ie(N,se){const Me=we();let le=Math.round((se-p.margin[0])/(Me+p.margin[0])),U=Math.round((N-p.margin[1])/(p.rowHeight+p.margin[1]));return le=Math.max(Math.min(le,p.cols-v),0),U=Math.max(Math.min(U,p.maxRows-T),0),{x:le,y:U}}function we(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function ue(N,se,Me){return Number.isFinite(N)?Math.round(se*N+Math.max(0,N-1)*Me):N}function ne(N,se,Me){return Math.max(Math.min(N,Me),se)}function de(N,se,Me=!1){const le=we();let U=Math.round((se+p.margin[0])/(le+p.margin[0])),W=0;return Me?W=Math.ceil((N+p.margin[1])/(p.rowHeight+p.margin[1])):W=Math.round((N+p.margin[1])/(p.rowHeight+p.margin[1])),U=Math.max(Math.min(U,p.cols-m),0),W=Math.max(Math.min(W,p.maxRows-S),0),{w:U,h:W}}function Ce(N,se){p.containerWidth=N}function Ge(){Le()}function dt(){!h.value&&b.value&&(h.value=tl(b.value),p.useStyleCursor||h.value.styleCursor(!1))}const x=Xo(k);function A(){if(dt(),!!h.value)if(p.draggable&&!l.static){const N={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};h.value.draggable(N),y||(y=!0,h.value.on("dragstart dragmove dragend",se=>{se.type==="dragmove"?x(se):k(se)}))}else h.value.draggable({enabled:!1})}const q=Xo(J);function oe(){if(dt(),!!h.value)if(p.resizable&&!l.static){const N=ye(0,0,l.maxW,l.maxH),se=ye(0,0,l.minW,l.minH),Me={edges:{left:z.value?`.${be.value[0]}`:!1,right:z.value?!1:`.${be.value[0]}`,bottom:`.${be.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:se.height*p.transformScale,width:se.width*p.transformScale},max:{height:N.height*p.transformScale,width:N.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Me.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(Me),D||(D=!0,h.value.on("resizestart resizemove resizeend",le=>{le.type==="resizemove"?q(le):J(le)}))}else h.value.resizable({enabled:!1})}return(N,se)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:b,class:e.normalizeClass(Ee.value),style:e.normalizeStyle(p.style)},[e.renderSlot(N.$slots,"default"),G.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(be.value)},null,2)):e.createCommentVNode("",!0)],6))}}),rn=typeof window<"u";var al;rn&&(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 qp=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(qp)));const Xp=rn&&("ontouchstart"in window||Gp()>0),Yp=Xp?"pointerdown":"click";function Gp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Jp(n,r,i=window.Event){const{type:l,bubbles:u=!1,cancelable:s=!1,...g}=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,g),n.dispatchEvent(h)}const Zp="clickoutside",Qp=new Set;rn&&document.addEventListener(Yp,n=>{const r=n.target,i=n.composedPath&&n.composedPath();Qp.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&Jp(l,{type:Zp})})},!0);const ef=[["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(rn){for(const n of ef)if(n[1]in document){Ln=n;break}}e.computed(()=>!1);const tf=new Set,af=new WeakMap;if(rn&&Ln){const n=Ln[2],r=Ln[4];document.addEventListener(r,()=>{if(tf.forEach(i=>{i.value=!1}),document[n]){const i=af.get(document[n]);i&&(i.value=!0)}},!1)}const or=new Map;or.set("x",0);or.set("y",0);var on=[],nf=function(){return on.some(function(n){return n.activeTargets.length>0})},of=function(){return on.some(function(n){return n.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",lf=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 ln=function(n){return Object.freeze(n)},rf=function(){function n(r,i){this.inlineSize=r,this.blockSize=i,ln(this)}return n}(),lr=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,ln(this)}return n.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,u=r.top,s=r.right,g=r.bottom,h=r.left,p=r.width,y=r.height;return{x:i,y:l,top:u,right:s,bottom:g,left:h,width:p,height:y}},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},rr=function(n){if(wo(n)){var r=n.getBBox(),i=r.width,l=r.height;return!i&&!l}var u=n,s=u.offsetWidth,g=u.offsetHeight;return!(s||g||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)},sf=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/,cf=/^tb|vertical/,uf=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),ka=function(n){return parseFloat(n||"0")},vn=function(n,r,i){return n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=!1),new rf((i?r:n)||0,(i?n:r)||0)},sl=ln({devicePixelContentBoxSize:vn(),borderBoxSize:vn(),contentBoxSize:vn(),contentRect:new lr(0,0,0,0)}),ir=function(n,r){if(r===void 0&&(r=!1),Mn.has(n)&&!r)return Mn.get(n);if(rr(n))return Mn.set(n,sl),sl;var i=getComputedStyle(n),l=wo(n)&&n.ownerSVGElement&&n.getBBox(),u=!uf&&i.boxSizing==="border-box",s=cf.test(i.writingMode||""),g=!l&&il.test(i.overflowY||""),h=!l&&il.test(i.overflowX||""),p=l?0:ka(i.paddingTop),y=l?0:ka(i.paddingRight),D=l?0:ka(i.paddingBottom),E=l?0:ka(i.paddingLeft),V=l?0:ka(i.borderTopWidth),j=l?0:ka(i.borderRightWidth),B=l?0:ka(i.borderBottomWidth),Q=l?0:ka(i.borderLeftWidth),L=E+y,P=p+D,F=Q+j,m=V+B,S=h?n.offsetHeight-m-n.clientHeight:0,v=g?n.offsetWidth-F-n.clientWidth:0,T=u?L+F:0,b=u?P+m:0,ie=l?l.width:ka(i.width)-T-v,Be=l?l.height:ka(i.height)-b-S,Qe=ie+L+v+F,ke=Be+P+S+m,Pe=ln({devicePixelContentBoxSize:vn(Math.round(ie*devicePixelRatio),Math.round(Be*devicePixelRatio),s),borderBoxSize:vn(Qe,ke,s),contentBoxSize:vn(ie,Be,s),contentRect:new lr(E,p,ie,Be)});return Mn.set(n,Pe),Pe},sr=function(n,r,i){var l=ir(n,i),u=l.borderBoxSize,s=l.contentBoxSize,g=l.devicePixelContentBoxSize;switch(r){case Sn.DEVICE_PIXEL_CONTENT_BOX:return g;case Sn.BORDER_BOX:return u;default:return s}},df=function(){function n(r){var i=ir(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=ln([i.borderBoxSize]),this.contentBoxSize=ln([i.contentBoxSize]),this.devicePixelContentBoxSize=ln([i.devicePixelContentBoxSize])}return n}(),cr=function(n){if(rr(n))return 1/0;for(var r=0,i=n.parentNode;i;)r+=1,i=i.parentNode;return r},pf=function(){var n=1/0,r=[];on.forEach(function(s){if(s.activeTargets.length!==0){var g=[];s.activeTargets.forEach(function(h){var p=new df(h.target),y=cr(h.target);g.push(p),h.lastReportedSize=sr(h.target,h.observedBox),y<n&&(n=y)}),r.push(function(){s.callback.call(s.observer,g,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){on.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(cr(i.target)>n?r.activeTargets.push(i):r.skippedTargets.push(i))})})},ff=function(){var n=0;for(cl(n);nf();)n=pf(),cl(n);return of()&&lf(),n>0},co,ur=[],hf=function(){return ur.splice(0).forEach(function(n){return n()})},vf=function(n){if(!co){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return hf()}).observe(i,l),co=function(){i.textContent="".concat(r?r--:r++)}}ur.push(n),co()},mf=function(n){vf(function(){requestAnimationFrame(n)})},$n=0,gf=function(){return!!$n},yf=250,bf={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,kf=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=yf),!uo){uo=!0;var l=dl(r);mf(function(){var u=!1;try{u=ff()}finally{if(uo=!1,r=l-dl(),!gf())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,bf)};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 kf,pl=function(n){!$n&&n>0&&bo.start(),$n+=n,!$n&&bo.stop()},xf=function(n){return!wo(n)&&!sf(n)&&getComputedStyle(n).display==="inline"},wf=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=sr(this.target,this.observedBox,!0);return xf(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},n}(),Df=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 Df(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&&on.push(u),u.observationTargets.push(new wf(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&&on.splice(on.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}(),_f=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 Ef(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:g,blockSize:h}=((r=u.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:y}=u.target;s(Object.assign(u,{offsetWidth:p,offsetHeight:y,width:g??p,height:h??y}))}}}const dr=new(rn&&window.ResizeObserver||_f)(Ef);function hl(n,r){Yn.set(n,r),dr.observe(n)}function vl(n){Yn.has(n)&&(dr.unobserve(n),Yn.delete(n))}function Cf(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 Sf=e.ref(!1);e.computed(()=>Sf.value);const ml="__theme_style__",po="__theme_observer__",gl=e.reactive(new Map),yl=new Map;e.watch(gl,()=>{if(!rn)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,g]]of gl.entries())i+=` html.${s} .${po}, .${g} .${po} { width: ${++l}px }`,yl.set(l,u);r.textContent=i,r.id=ml,document.head.appendChild(r)});const pr=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}),g=new Map,h=e.ref(l.layout),p=e.ref(),{observeResize:y,unobserveResize:D}=Cf(),E=Ep();E.on("resizeEvent",V),E.on("dragEvent",j),e.onBeforeMount(()=>{u("layout-before-mount",h.value)}),e.onMounted(()=>{u("layout-mounted",h.value),e.nextTick(()=>{zp(h.value),s.originalLayout=h.value,e.nextTick(()=>{Be(),p.value&&y(p.value,Cp(m,16)),pn(h.value,l.verticalCompact),u("layout-updated",h.value),F(),m()})})}),e.onBeforeUnmount(()=>{E.clearAll(),p.value&&D(p.value)});function V(ke,Pe,ze,I,ee,Z){b(ke,Pe,ze,I,ee,Z)}function j(ke,Pe,ze,I,ee,Z){T(ke,Pe,ze,I,ee,Z)}e.watch(()=>s.width,(ke,Pe)=>{e.nextTick(()=>{E.emit("updateWidth",ke),Pe===-1&&e.nextTick(()=>{u("layout-ready",h.value)}),F()})}),e.watch(()=>[l.layout,l.layout.length],()=>{h.value=l.layout,P()}),e.watch(()=>l.colNum,ke=>{E.emit("setColNum",ke)}),e.watch(()=>l.rowHeight,ke=>{E.emit("setRowHeight",ke)}),e.watch(()=>l.isDraggable,ke=>{E.emit("setDraggable",ke)}),e.watch(()=>l.isResizable,ke=>{E.emit("setResizable",ke)}),e.watch(()=>l.isBounded,ke=>{E.emit("setBounded",ke)}),e.watch(()=>l.transformScale,ke=>{E.emit("setTransformScale",ke)}),e.watch(()=>l.responsive,ke=>{ke||(u("update:layout",s.originalLayout),E.emit("setColNum",l.colNum)),m()}),e.watch(()=>l.maxRows,ke=>{E.emit("setMaxRows",ke)}),e.watch([()=>l.margin,()=>l.margin[1]],F),e.provide(Gl,e.reactive({...e.toRefs(l),...e.toRefs(s),increaseItem:B,decreaseItem:Q})),e.provide(Jl,E),r({state:s,getItem:L,resizeEvent:b,dragEvent:T,layoutUpdate:P});function B(ke){g.set(ke.i,ke)}function Q(ke){g.delete(ke.i)}function L(ke){return g.get(ke)}function P(){if(!pa(h.value)&&!pa(s.originalLayout)){if(h.value.length!==s.originalLayout.length){const ke=Qe(h.value,s.originalLayout);if(ke.length>0)if(h.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(ke);else{const Pe=new Set(ke.map(ze=>ze.i));s.originalLayout=s.originalLayout.filter(ze=>!Pe.has(ze.i))}s.lastLayoutLength=h.value.length,Be()}pn(h.value,l.verticalCompact),E.emit("updateWidth",s.width),F(),u("layout-updated",h.value)}}function F(){s.mergedStyle={height:S()}}function m(){p.value&&(s.width=p.value.offsetWidth),E.emit("resizeEvent")}function S(){if(!l.autoSize)return;const ke=parseFloat(l.margin[1]);return Tp(h.value)*(l.rowHeight+ke)+ke+"px"}let v;function T(ke,Pe,ze,I,ee,Z){let te=Yo(h.value,Pe);pa(te)&&(te={h:0,w:0,x:0,y:0,i:""}),ke==="dragstart"&&!l.verticalCompact&&(v=h.value.reduce((Re,{i:Ze,x:G,y:z})=>({...Re,[Ze]:{x:G,y:z}}),{})),ke==="dragmove"||ke==="dragstart"?(s.placeholder.i=Pe,s.placeholder.x=te.x,s.placeholder.y=te.y,s.placeholder.w=Z,s.placeholder.h=ee,e.nextTick(()=>{s.isDragging=!0}),E.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),h.value=yo(h.value,te,ze,I,!0,l.preventCollision),l.restoreOnDrag?(te.static=!0,pn(h.value,l.verticalCompact,v),te.static=!1):pn(h.value,l.verticalCompact),E.emit("compact"),F(),ke==="dragend"&&(v=void 0,u("layout-updated",h.value))}function b(ke,Pe,ze,I,ee,Z){let te=Yo(h.value,Pe);pa(te)&&(te={h:0,w:0,x:0,y:0,i:""});let Re;if(l.preventCollision){const Ze=Ql(h.value,{...te,w:Z,h:ee}).filter(G=>G.i!==te.i);if(Re=Ze.length>0,Re){let G=1/0,z=1/0;Ze.forEach(ce=>{ce.x>te.x&&(G=Math.min(G,ce.x)),ce.y>te.y&&(z=Math.min(z,ce.y))}),Number.isFinite(G)&&(te.w=G-te.x),Number.isFinite(z)&&(te.h=z-te.y)}}Re||(te.w=Z,te.h=ee),ke==="resizestart"||ke==="resizemove"?(s.placeholder.i=Pe,s.placeholder.x=ze,s.placeholder.y=I,s.placeholder.w=te.w,s.placeholder.h=te.h,e.nextTick(()=>{s.isDragging=!0}),E.emit("updateWidth",s.width)):ke&&e.nextTick(()=>{s.isDragging=!1}),l.responsive&&ie(),pn(h.value,l.verticalCompact),E.emit("compact"),F(),ke==="resizeend"&&u("layout-updated",h.value)}function ie(){const ke=$p(l.breakpoints,s.width);if(ke===s.lastBreakpoint)return;const Pe=ar(ke,l.cols);!pa(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=go(h.value));const ze=Fp(s.originalLayout,s.layouts,l.breakpoints,ke,s.lastBreakpoint,Pe,l.verticalCompact);s.layouts[ke]=ze,s.lastBreakpoint!==ke&&u("breakpoint-changed",ke,ze),h.value=ze,u("update:layout",ze),s.lastBreakpoint=ke,E.emit("setColNum",Pe)}function Be(){s.layouts=Object.assign({},l.responsiveLayouts)}function Qe(ke,Pe){const ze=new Set(Pe.map(te=>te.i)),I=new Set(ke.map(te=>te.i)),ee=ke.filter(te=>!ze.has(te.i)),Z=Pe.filter(te=>!I.has(te.i));return ee.concat(Z)}return(ke,Pe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[ke.$slots.default?e.renderSlot(ke.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,ze=>(e.openBlock(),e.createBlock(Xn,e.mergeProps({key:ze.i,ref_for:!0},ze),{default:e.withCtx(()=>[e.renderSlot(ke.$slots,"item",{item:ze})]),_: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 Tf={key:0,class:"item-view-group"},Bf={key:0,class:"item-view-group"},If=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:r}){const i=C.useModelComp(C.pinia),{isEdit:l}=C.storeToRefs(i),u=r,s=n,g=e.computed(()=>s==null?void 0:s.children),h=e.computed(()=>{var V,j,B,Q;return((V=s==null?void 0:s.children)==null?void 0:V.length)>0&&((j=s==null?void 0:s.children)!=null&&j.every(L=>L==null?void 0:L.layout))?(Q=(B=s==null?void 0:s.children)==null?void 0:B[0])==null?void 0:Q.layout:"vertical"}),p=e.computed(()=>{var V,j;return((j=(V=s==null?void 0:s.children)==null?void 0:V[0])==null?void 0:j.isGridLayout)||!1}),y=e.ref((s==null?void 0:s.level)+1),D=V=>{u("rowClick",V)},E=(V,j)=>{u("routeUrl",V,j)};return(V,j)=>p.value?(e.openBlock(),e.createBlock(e.unref(pr),{key:0,layout:g.value,"onUpdate:layout":j[0]||(j[0]=B=>g.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(g.value,(B,Q)=>(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 L,P,F,m,S,v,T,b,ie,Be,Qe,ke,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Q===((L=s==null?void 0:s.children)==null?void 0:L.length)-1?"0px":"24px"})},[((F=(P=B==null?void 0:B.component)==null?void 0:P.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&((m=B==null?void 0:B.component)!=null&&m.name)?(e.openBlock(),e.createElementBlock("div",Tf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(y.value.toString())-1)*12+"px",fontWeight:600-(y.value-1)*100>=400?600-(y.value-1)*100:400,fontSize:17-y.value>=14?17-y.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(jt)[Q])==null?void 0:T.showIndex,allowMove:(b=e.unref(jt)[Q])==null?void 0:b.allowMove,viewport:(ie=e.unref(jt)[Q])==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:(Qe=B==null?void 0:B.component)==null?void 0:Qe.itemChildData,key:e.unref(gn),cacheNewData:e.unref($l),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Q,onContentChange:e.unref(Hn),onPageChange:e.unref(qn),parentTableId:(ke=B==null?void 0:B.component)==null?void 0:ke.tableId,allMapContents:e.unref(mo),children:(Pe=B==null?void 0:B.component)==null?void 0:Pe.children,level:y.value,onRowClick:D,onRouteUrl:E,onClickTrigger:e.unref(jl),onClickMainKey:e.unref(Ul)},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,Q)=>{var L,P;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(Q)===((L=s==null?void 0:s.children)==null?void 0:L.length)-1?"0px":"24px"})},[((P=B==null?void 0:B.comp)==null?void 0:P.toUpperCase())!=="TABLE"&&B.name?(e.openBlock(),e.createElementBlock("div",Bf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(y.value.toString())>1?"12px":"0px",fontWeight:600-(y.value-1)*100>=400?600-(y.value-1)*100:400,fontSize:17-y.value>=14?17-y.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(gn),onChange:e.unref(Wn),index:(B==null?void 0:B.id)??Q,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:y.value,onRowClick:D,onRouteUrl:E},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Nf=Pt._export_sfc(If,[["__scopeId","data-v-a00427c1"]]),fr=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),Af={TABLE:oa.ssTable,FORM:Ro,STATICFORM:wl,TABLEOPERATE:Ts,TABLESTYLE:Ks,TABLEEXTEND:Hs,TABLEINTERACTION:Ys,FORMOPERATE:Po,FOLD:Ec,CALCULATOR:Nc,METHODBUTTON:Oc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Ro,STEP:Hc,STEPOPERATE:mc,TIMELINE:Zc,TIMELINEOPERATE:wc,FORMTOPOPERATE:Po,SIGNATUREOPERATE:Uc,AVATARUPLOADOPERATE:Rc,TABS:tu,TABSOPERATE:$u,CHART:ed,CHARTOPERATE:dd,LAYOUT:fp,LAYOUTOPERATE:wp,PARENTITEM:Nf};function sn(n){return Af[n==null?void 0:n.toUpperCase()]||null}exports.De=pr;exports._sfc_main=Vl;exports.activeStepInfo=fn;exports.affixItems=tp;exports.allMapContents=mo;exports.analyzeForm=bd;exports.analyzeQuoteForm=yd;exports.analyzeSplitToContent=Ut;exports.analyzeTable=xd;exports.analyzerStringToArray=pd;exports.cacheNewData=$l;exports.clickMainKey=Ul;exports.clickSavePage=ep;exports.clickStep=Wl;exports.clickTrigger=jl;exports.compId=gn;exports.compNames=Fl;exports.compShow=Un;exports.existLayouts=op;exports.generateLayouts=$s;exports.getComponent=sn;exports.getComponents=Kn;exports.getSliceContLength=sp;exports.gridRowHeight=Ms;exports.isStepLayout=Hl;exports.onBack=Zd;exports.onChange=Wn;exports.onClick=Qd;exports.onContentChange=Hn;exports.onExtendTaskEnd=np;exports.onPageBack=lp;exports.onPageChange=qn;exports.onSelectFixContent=Jd;exports.renderShowItems=Pl;exports.same=fd;exports.setComponent=Rl;exports.showItems=jt;exports.sliceTableLength=Ll;exports.slotContent=fr;exports.ssMenu=jn;exports.st=Xn;exports.stepItems=cp;exports.toolBar=ap;exports.verifyButton=rp;