ss-component-new 1.2.232 → 1.2.233

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{MTLLoader-C3xQp_vJ.js → MTLLoader-DFmlwzU3.js} +1 -1
  2. package/dist/{MTLLoader-Dk-MlPss.cjs → MTLLoader-Dg86upjK.cjs} +1 -1
  3. package/dist/{OrbitControls-BnbRrGfp.js → OrbitControls-BXYb3_Wa.js} +1 -1
  4. package/dist/{OrbitControls-BOp7rIAh.cjs → OrbitControls-DAhFMmy7.cjs} +1 -1
  5. package/dist/{URDFLoader-CSyotBHA.js → URDFLoader-DzkYZoIc.js} +2 -2
  6. package/dist/{URDFLoader-DNvmeMBm.cjs → URDFLoader-Gcme0UFg.cjs} +1 -1
  7. package/dist/{animationData-CAQjhH7u.cjs → animationData-BxcjkWxj.cjs} +1 -1
  8. package/dist/{animationData-UswWiNrs.js → animationData-DkNnqZXc.js} +1 -1
  9. package/dist/{array-TtWDWrDw.cjs → array-ByF_XgIy.cjs} +1 -1
  10. package/dist/{array-B6rjrXeo.js → array-VJrnCffW.js} +1 -1
  11. package/dist/{iconfont-DlRa38zY.cjs → iconfont-BeXGhE0A.cjs} +1 -1
  12. package/dist/{iconfont-D05r7RjP.js → iconfont-GwBDM4P-.js} +2 -2
  13. package/dist/{index-B2ZoOHys.js → index-5VzXINKa.js} +3 -3
  14. package/dist/{index-BWQsJVZu.js → index-8jMRAO6m.js} +5 -5
  15. package/dist/{index-6jEXQDCu.js → index-B5qOPVlo.js} +1 -1
  16. package/dist/{index-CaCc1PMv.cjs → index-BAUsMLAh.cjs} +1 -1
  17. package/dist/{index-K5yAn3DM.js → index-BDwelfih.js} +1 -1
  18. package/dist/{index-Dlmo2bzh.cjs → index-BNCWQG3z.cjs} +1 -1
  19. package/dist/{index-Ct0pyThR.js → index-BNyhLyvx.js} +1 -1
  20. package/dist/{index-BSAGUVzl.cjs → index-Bfd2Vvap.cjs} +1 -1
  21. package/dist/{index-BfyfYMgU.js → index-Bl-OXFAJ.js} +4 -4
  22. package/dist/{index-RzsDXFU5.cjs → index-Bulpr4-m.cjs} +1 -1
  23. package/dist/{index-BaxEKenW.js → index-C0H9xNgM.js} +1 -1
  24. package/dist/{index-CP3Q8Vwz.cjs → index-C0r2mQkF.cjs} +1 -1
  25. package/dist/{index--eG1HuEk.js → index-C1wdEbD-.js} +4 -4
  26. package/dist/{index-B5xqjn4H.cjs → index-C5Y11t9J.cjs} +1 -1
  27. package/dist/{index-BDfjc4pg.js → index-C6A8VCcn.js} +1 -1
  28. package/dist/{index-DhNbyjlZ.cjs → index-CAclztw7.cjs} +1 -1
  29. package/dist/{index-DOXFyGxN.js → index-CCYpPNcp.js} +1 -1
  30. package/dist/{index-M3Uy2ESr.cjs → index-CTqZlnyv.cjs} +1 -1
  31. package/dist/{index-B8v18Ew-.js → index-CV1aGQ53.js} +1 -1
  32. package/dist/{index-Cn6b-ZJb.js → index-CYw8cTK2.js} +4 -4
  33. package/dist/{index-nyXDmWkk.cjs → index-CgW0z-iB.cjs} +1 -1
  34. package/dist/{index-NNuPPUyS.cjs → index-ClBKQUzO.cjs} +1 -1
  35. package/dist/{index-BnBXAVZg.js → index-Cw8mXG1v.js} +3 -3
  36. package/dist/{index-DZ6QQf1F.cjs → index-DBj1VTrx.cjs} +1 -1
  37. package/dist/{index-DBe7pvvC.js → index-DDFkG6h6.js} +8 -8
  38. package/dist/{index-La79nsoq.cjs → index-DDG4LYuA.cjs} +1 -1
  39. package/dist/{index-C4nuCUKA.js → index-DES6EMQI.js} +2 -2
  40. package/dist/{index-Bh3Dxpbs.cjs → index-DjA4WahR.cjs} +1 -1
  41. package/dist/{index-tATIUpSX.cjs → index-DkKX_obc.cjs} +1 -1
  42. package/dist/{index-Cv7afxtj.cjs → index-DmAak3cB.cjs} +1 -1
  43. package/dist/{index-HfkvgdGf.cjs → index-DoCpY7PD.cjs} +1 -1
  44. package/dist/{index-B064aY3c.cjs → index-Dq-QTXZW.cjs} +1 -1
  45. package/dist/{index-CRa7ul-H.cjs → index-DtIw-cQA.cjs} +1 -1
  46. package/dist/{index-C93uGAcW.js → index-Du6m3eDM.js} +1 -1
  47. package/dist/{index-Do0IEThs.js → index-Dw543awg.js} +1 -1
  48. package/dist/{index-CCb2IsOh.js → index-DwWzpRNP.js} +1 -1
  49. package/dist/{index-4wmnBS8T.js → index-JwmGwJwl.js} +2 -2
  50. package/dist/{index-BuGQO6fe.cjs → index-Y4lmOoY_.cjs} +1 -1
  51. package/dist/{index-D5q83XXJ.js → index-ZuzPyc7Y.js} +16 -16
  52. package/dist/{index-C5XK7IH1.js → index-cK3MryRN.js} +1 -1
  53. package/dist/{index-CjUlZM1I.cjs → index-joILVedy.cjs} +1 -1
  54. package/dist/{index-Ofyhj_ri.js → index-wPFvJWqr.js} +7 -7
  55. package/dist/{index-BJsTBv81.cjs → index-x7CrVTb8.cjs} +1 -1
  56. package/dist/{index-taTFobG0.cjs → index-yYIitsIH.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-9pTg9CEf.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BjLvDgBT.js} +6 -6
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DQquN7Pt.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CQaB3IQv.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cogr4AVk.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B9srMPKb.js} +5120 -5118
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-r5pjOM-O.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C-Z-yYuH.cjs} +158 -158
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-CdWS_tx_.js → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BK_Svg48.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-C6Uj52bB.cjs → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-vsdezytw.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-90ExziY1.cjs → index.vue_vue_type_style_index_1_lang-DkCwPTKt.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-Dq2o3oBR.js → index.vue_vue_type_style_index_1_lang-DpVhYcxo.js} +3 -3
  65. package/dist/{main-DOjkDfvY.cjs → main-CXj4XB41.cjs} +1 -1
  66. package/dist/{main-1JkcLvHt.js → main-DYyjODd4.js} +3 -3
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.js +9 -9
  69. package/dist/ss-component2.cjs +1 -1
  70. package/dist/ss-component2.js +10 -10
  71. package/dist/{threeModel-BIvFMjeE.cjs → threeModel-BM2_oBay.cjs} +1 -1
  72. package/dist/{threeModel-tXPE6Ot9.js → threeModel-CrJwO5O6.js} +4 -4
  73. package/dist/{threePreview-Bhh2zRHt.js → threePreview-CKrx32qh.js} +3 -3
  74. package/dist/{threePreview-CLpIdYu2.cjs → threePreview-qeQiWPpC.cjs} +1 -1
  75. package/dist/{threeSceneView-oww3pt3m.js → threeSceneView-BaIDEnnr.js} +8 -8
  76. package/dist/{threeSceneView-g8BSZvdw.cjs → threeSceneView-takCqm8_.cjs} +1 -1
  77. package/dist/{threeSceneViewForCPMPIP-DUXZLgeo.js → threeSceneViewForCPMPIP-8vLzpEoJ.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-BX7RvwA3.cjs → threeSceneViewForCPMPIP-DWUrSXVU.cjs} +1 -1
  79. package/dist/{threeTrackPathView-DerCUycx.cjs → threeTrackPathView-B86w9mLO.cjs} +1 -1
  80. package/dist/{threeTrackPathView-CJRNBNt5.js → threeTrackPathView-Bgw4wfPf.js} +3 -3
  81. package/dist/{threeViewerHost-DEDhdk2E.cjs → threeViewerHost-BjJ4CzrA.cjs} +1 -1
  82. package/dist/{threeViewerHost-CSKYiso6.js → threeViewerHost-CaeheL5H.js} +2 -2
  83. package/dist/{urdfTree-D8NxjBg1.cjs → urdfTree-Bv2qbbfC.cjs} +1 -1
  84. package/dist/{urdfTree--fZfiIPN.js → urdfTree-dlxsPsTa.js} +1 -1
  85. package/dist/{workpieceTreePanel-Ddc1zyuZ.js → workpieceTreePanel-CPWsDEnC.js} +4 -4
  86. package/dist/{workpieceTreePanel-CuFyeGwc.cjs → workpieceTreePanel-DyzXsGKC.cjs} +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const bn=require("./index-DZ6QQf1F.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),St=require("./index-Bh3Dxpbs.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-r5pjOM-O.cjs"),Xt=require("./index-B5xqjn4H.cjs"),Io=require("./threeViewerHost-DEDhdk2E.cjs"),$t=require("./index-CXC0u8pm.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-B064aY3c.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-La79nsoq.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,O=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(_=!!s.leading,O="maxWait"in s,u=O?Yl(Oo(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function J(N){var E=r,ge=d;return r=d=void 0,x=N,b=n.apply(ge,E),b}function M(N){return x=N,g=setTimeout(K,i),_?J(N):b}function we(N){var E=N-f,ge=N-x,Ye=i-E;return O?Jl(Ye,u-ge):Ye}function X(N){var E=N-f,ge=N-x;return f===void 0||E>=i||E<0||O&&ge>=u}function K(){var N=ro();if(X(N))return le(N);g=setTimeout(K,we(N))}function le(N){return g=void 0,R&&r?J(N):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:le(ro())}function y(){var N=ro(),E=X(N);if(r=arguments,d=this,f=N,E){if(g===void 0)return M(f);if(O)return clearTimeout(g),g=setTimeout(K,i),J(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__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:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var z;const S=(z=at.value)==null?void 0:z.split("/");return(S==null?void 0:S.some(ue=>(ue==null?void 0:ue.includes("updateLoading"))||(ue==null?void 0:ue.includes("loading"))))?!1:We.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Io.useThreeSystem(),_=e.ref(),O=e.ref(!1),R=e.ref(!1),J=e.ref([]),M=e.ref(),we=e.ref(!1),X=e.ref([]),K=bn.useFormToTableComp(v.pinia),le=bn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:N}=v.storeToRefs(y),E=e.ref(),ge=e.ref(!0),Ye=$t.useModelComp(v.pinia),{tableViewContents:it,itemData:Le,isEdit:We,routeToChildPath:_e,lockingPage:V}=v.storeToRefs(Ye),ee=e.ref(null),se=e.ref(!1),fe=e.ref(!1),Je=$t.useMenuState(),{activeMenuPath:at}=v.storeToRefs(Je),Q=Ve.useOriginalState(v.pinia),{originalPath:L}=v.storeToRefs(Q),ye=e.ref([]),De=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ke=async S=>{fe.value=S,await pe("disabled",null,S,!0)},Re=async S=>{await pe("operable",null,S,!0)};e.watch(()=>at.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Qe=()=>{e.nextTick(()=>{Y()})},Ge=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(z=>({...z,isFormColHidden:!(S!=null&&S.includes(z.label))}))};e.onUnmounted(()=>{ee.value=null});const ve=S=>{d("clickTrigger",S)},F=async S=>{var q,z,ue,H,P,Be;if(S===""){let ne="";(q=u.value)==null||q.forEach(xe=>{xe!=null&&xe.isMain&&(ne=xe==null?void 0:xe.value)});let G=await Ve.getItemData(_e.value,sessionStorage.getItem("systemKey"),"");ne=((Be=(P=(H=(ue=(z=G==null?void 0:G[0])==null?void 0:z.compData)==null?void 0:ue.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:P[0])==null?void 0:Be.routerContent)+L.value+ne;let ce=await Ve.getItemData(ne,sessionStorage.getItem("systemKey"),"");we.value=!0,X.value=ce==null?void 0:ce.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=ee.value)==null?void 0:q.$el;S&&Ve.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:ue,newIndex:H}=z;if(ue===H)return;const P=u.value.splice(ue,1)[0];u.value.splice(H,0,P)}})},pe=async(S,q,z,ue=!1)=>{var H,P,Be,ne,G,ae,ce,xe;try{Ye.setRefreshCurStructure(!1);const Te=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((H=Te==null?void 0:Te.data)==null?void 0:H.code)===200){let Ne=(G=(ne=(Be=(P=Te==null?void 0:Te.data)==null?void 0:P.result)==null?void 0:Be[0])==null?void 0:ne.value)==null?void 0:G.pageData;ue?Ne={...Ne,compData:(ce=Ne==null?void 0:Ne.compData)==null?void 0:ce.map(Oe=>{var me;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(me=Oe==null?void 0:Oe.contents)==null?void 0:me.map(je=>({...je,[S]:z}))}:Oe})}:Ne={...Ne,compData:(ae=Ne==null?void 0:Ne.compData)==null?void 0:ae.map(Oe=>{var me;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(me=Oe==null?void 0:Oe.contents)==null?void 0:me.map(je=>(je==null?void 0:je.prop)===(q==null?void 0:q.prop)?{...je,[S]:z}:je)}:Oe})};const U=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Ne}});((xe=U==null?void 0:U.data)==null?void 0:xe.code)===200?(v.ElMessage.success("编辑成功"),Ye.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},de=async(S,q)=>{await pe("label",q,S)},Z=async(S,q)=>{S&&await pe("type",q,S)},oe=async(S,q,z)=>{await pe(q,z,S,!1)},te=(S,q)=>{E.value===q?ge.value=!1:ge.value=!0,E.value=q==null?void 0:q.changeProp},ie=async S=>{var z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;let q=[];if((z=S==null?void 0:S.toString())!=null&&z.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((ue=S==null?void 0:S.toString())!=null&&ue.includes(".stl")||(H=S==null?void 0:S.toString())!=null&&H.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Be=S==null?void 0:S.toString())!=null&&Be.includes(".mtl")){const lt=((ne=S==null?void 0:S.toString())==null?void 0:ne.split(",")).map(qe=>({url:qe,extension:x(qe)}));f.value=lt,g.value=!1,b.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".STL")||(ce=S==null?void 0:S.toString())!=null&&ce.includes(".obj")||(xe=S==null?void 0:S.toString())!=null&&xe.includes(".mtl")){let je,lt=[],qe={};if(Array.isArray(S)?je=S:je=S==null?void 0:S.split(","),je==null||je.forEach(ot=>{ot.includes(".mtl")?lt.push(ot):qe.blob=qe.blob?qe.blob+","+ot:ot}),(lt==null?void 0:lt.length)>0&&(qe.mtlBlobs=lt),(Ne=(Te=Object.values(qe))==null?void 0:Te[0])!=null&&Ne.includes("http:"))q.push(qe);else{const ot=new Blob([qe.blob],{type:"application/octet-stream;charset=UTF-8"});let $e=URL.createObjectURL(ot),ht="";(U=S==null?void 0:S.split("/"))==null||U.forEach((et,ze)=>{var he;ze===((he=S==null?void 0:S.split("/"))==null?void 0:he.length)-1&&(ht=et)}),(Oe=qe.blob)!=null&&Oe.includes(".stl")&&(ht=(ht==null?void 0:ht.replaceAll(">",""))+".urdf"),M.value=[{name:ht,blobUrl:$e}],R.value=!0}}else{const je=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),lt=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{je.close()}),qe=new Blob([lt.data],{type:"application/octet-stream;charset=UTF-8"});let ot=URL.createObjectURL(qe),$e="";(me=S==null?void 0:S.split("/"))==null||me.forEach((ht,et)=>{var ze;et===((ze=S==null?void 0:S.split("/"))==null?void 0:ze.length)-1&&($e=ht)}),M.value=[{name:$e,blobUrl:ot}],R.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Pe=()=>{R.value=!1},nt=S=>{var P,Be,ne,G;const q=(Be=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Be.contents,z=v.cloneDeep(S.content);let ue={};z&&((ne=Object.values(z))==null?void 0:ne.length)>0&&((G=Object.values(z))==null||G.forEach((ae,ce)=>{ue[q[ce].key]=ae}));const H={content:ue,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",H)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt;if(!S)return;(Ne=(Te=r==null?void 0:r.itemData)==null?void 0:Te.find(ke=>(ke==null?void 0:ke.key)==="parentFormPath"))==null||Ne.contents;let q=it.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(ke=>{var be,Se,B,Ie;let Ee=(be=ke==null?void 0:ke.key)==null?void 0:be.split("/");return(r==null?void 0:r.compName)===(Ee==null?void 0:Ee[0])&&(Se=u.value)!=null&&Se.find(tt=>(tt==null?void 0:tt.prop)===(Ee==null?void 0:Ee[1]))&&(ke.value=(Ie=(B=u.value)==null?void 0:B.find(tt=>(tt==null?void 0:tt.prop)===(Ee==null?void 0:Ee[1])))==null?void 0:Ie.value),ke}),Ye.setTableViewContents(q));const z=v.cloneDeep(r.itemData);let ue=z==null?void 0:z.map(ke=>{var Ee;return(ke==null?void 0:ke.key)==="formContent"&&((Ee=ke.contents)==null||Ee.map((be,Se)=>{var B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt;return be.type=(Ie=(B=u.value)==null?void 0:B.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Ie.type,be.options=be!=null&&be.options?be.options:((Xe=(Fe=(tt=be==null?void 0:be.key)==null?void 0:tt.split("$"))==null?void 0:Fe[1])==null?void 0:Xe.length)>0?(st=(ut=bn.formGetOptions((dt=(Me=be==null?void 0:be.key)==null?void 0:Me.split("$"))==null?void 0:dt[1]))==null?void 0:ut.split(","))==null?void 0:st.map(Ot=>({label:Ot,value:Ot})):[],(vt=be==null?void 0:be.key)!=null&&vt.includes("$")&&(be.key=(Nt=(bt=be==null?void 0:be.key)==null?void 0:bt.split("$"))==null?void 0:Nt[0]),be.signature=(Vt=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Vt.signature,be.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Ft.isLoginUser,be.value=(xt=Object.values(S))==null?void 0:xt[Se],be.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Yt.isFormColHidden,be})),ke}),H=u.value,P=(Oe=(U=v.cloneDeep(ue))==null?void 0:U.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:Oe.contents;if(H=H==null?void 0:H.map(ke=>{var Ee;return ke.value=(Ee=P==null?void 0:P.find((be,Se)=>((be==null?void 0:be.id)??Se)===(ke==null?void 0:ke.id)))==null?void 0:Ee.value,ke}),!ge.value){d("contentChange",{contents:ue,index:r.index});return}let Be="",ne=(lt=(je=(me=v.cloneDeep(ue))==null?void 0:me.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:je.contents)==null?void 0:lt.find((ke,Ee)=>{var be,Se,B;return(ke==null?void 0:ke.label)===E.value||Ee.toString()===((B=(Se=(be=E.value)==null?void 0:be.split("t"))==null?void 0:Se[1])==null?void 0:B.toString())}),G=(qe=ne==null?void 0:ne.optionUrl)==null?void 0:qe.menuSelect,ae=!0;if((ht=($e=(ot=v.cloneDeep(ue))==null?void 0:ot.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:$e.contents)==null||ht.forEach(ke=>{var Ee,be,Se,B,Ie,tt;ae&&((Se=(be=(Ee=ke==null?void 0:ke.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:be[1])!=null&&Se.includes("["))&&(Be=(Ie=(B=ke==null?void 0:ke.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ie[1],JSON.stringify(G)===JSON.stringify((tt=ke==null?void 0:ke.optionUrl)==null?void 0:tt.menuSelect)&&(ae=!1))}),(et=ne==null?void 0:ne.optionUrl)!=null&&et.menuSelect&&ge.value){let ke=await bn.getSelectRow(ne),Ee,be=(ze=ne==null?void 0:ne.optionUrl)==null?void 0:ze.menuSelect;if(ke==null||ke.forEach(Se=>{var B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt;Be===((Ie=(B=ne==null?void 0:ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ie[1])&&((Xe=(Fe=(tt=ne==null?void 0:ne.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Fe[1])!=null&&Xe.includes("["))&&((vt=v.cloneDeep(Se))==null?void 0:vt[(st=(ut=(dt=(Me=ne==null?void 0:ne.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:dt[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(ne==null?void 0:ne.value)&&(Ee=Se)}),Ee){let Se=v.cloneDeep(H);Se=Se==null?void 0:Se.map(Ie=>{var tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt;return(Ee!=null&&Ee[Ie==null?void 0:Ie.label]||Ee!=null&&Ee[(Me=(Xe=(Fe=(tt=Ie==null?void 0:Ie.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Fe[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:Me.replaceAll("]","")])&&((st=(ut=(dt=Ie==null?void 0:Ie.optionUrl)==null?void 0:dt.groupSelect)==null?void 0:ut[1])!=null&&st.includes("["))&&be!=null&&be.every(Vt=>{var _t,Ft;return(Ft=(_t=Ie==null?void 0:Ie.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(Vt)})&&(Ie.value=(Ee==null?void 0:Ee[Ie==null?void 0:Ie.label])||(Ee==null?void 0:Ee[(Pt=(Nt=(bt=(vt=Ie==null?void 0:Ie.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:bt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(Ie.value)&&Ie.value.every(Vt=>(Vt==null?void 0:Vt.url)&&(Vt==null?void 0:Vt.name))&&(Ie.type="Upload")),Ie}),Se=Se==null?void 0:Se.map(Ie=>{var tt,Fe,Xe;return(tt=Ie==null?void 0:Ie.optionUrl)!=null&&tt.oldMenuSelect&&(Ie.optionUrl.menuSelect=(Xe=(Fe=v.cloneDeep(Ie))==null?void 0:Fe.optionUrl)==null?void 0:Xe.oldMenuSelect),Ie}),u.value=v.cloneDeep(Se);let B=v.cloneDeep(Se);B=B==null?void 0:B.map(Ie=>{var tt,Fe,Xe,Me,dt,ut;return(Fe=(tt=Ie==null?void 0:Ie.optionUrl)==null?void 0:tt.menuSelect)!=null&&Fe.some(st=>st==null?void 0:st.includes("["))&&(Ie.optionUrl.oldMenuSelect=(Me=(Xe=v.cloneDeep(Ie))==null?void 0:Xe.optionUrl)==null?void 0:Me.menuSelect,Ie.optionUrl.menuSelect=(ut=(dt=Ie==null?void 0:Ie.optionUrl)==null?void 0:dt.menuSelect)==null?void 0:ut.map(st=>{var vt,bt,Nt,Pt;if(st!=null&&st.includes("[")){let Vt=(bt=(vt=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:bt[1];st=(Pt=(Nt=v.cloneDeep(Se))==null?void 0:Nt.find(_t=>(_t==null?void 0:_t.label)===Vt))==null?void 0:Pt.value}return st})),Ie}),u.value=B}else u.value=H;ue=ue==null?void 0:ue.map(Se=>{var B;return(Se==null?void 0:Se.key)==="formContent"&&(Se.contents=(B=Se.contents)==null?void 0:B.map(Ie=>{var tt,Fe,Xe,Me;return Ie.value=((Fe=(tt=u.value)==null?void 0:tt.find(dt=>(dt==null?void 0:dt.label)===(Ie==null?void 0:Ie.key)))==null?void 0:Fe.value)??(Ie==null?void 0:Ie.value),Ie.type=((Me=(Xe=u.value)==null?void 0:Xe.find(dt=>(dt==null?void 0:dt.prop)===(Ie==null?void 0:Ie.key)))==null?void 0:Me.type)??(Ie==null?void 0:Ie.type),Ie})),Se})}ge.value=!1,d("contentChange",{contents:ue,index:r.index});let ce=[],xe=[];if((Ae=v.cloneDeep((he=ue==null?void 0:ue.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:he.contents))==null||Ae.forEach(ke=>{var Ee;Array.isArray(ke==null?void 0:ke.value)&&((Ee=ke==null?void 0:ke.value)!=null&&Ee.find(be=>{var Se;return(Se=be==null?void 0:be.url)==null?void 0:Se.includes(".obj")}))&&(xe=ke==null?void 0:ke.value)}),(xe==null?void 0:xe.length)>0){const ke=(mt=v.cloneDeep(xe))==null?void 0:mt.filter(Ee=>{var be;return(be=Ee==null?void 0:Ee.url)==null?void 0:be.includes(".obj")});ke==null||ke.forEach(Ee=>{var Se,B,Ie,tt;const be=(Se=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:Se.map(Fe=>Fe==null?void 0:Fe.url);ce.push({objUrl:Ee==null?void 0:Ee.url,mtlUrls:((B=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:B.length)===1?(tt=(Ie=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:tt.url:be})}),le.setObjUrl(ce)}},I=S=>{if(!S)return;const q=[];let z="";for(let ue of S)(ue.includes("[")||z.includes("["))&&(z+=ue.trim(),v.cloneDeep(z).split("【").length-1===v.cloneDeep(z).split("】").length-1&&v.cloneDeep(z).split("[").length-1===v.cloneDeep(z).split("]").length-1&&(q.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return q},W=(S,q,z)=>{let ue="";const H=q==null?void 0:q.map(P=>{var Be;return(Be=P==null?void 0:P.value)==null?void 0:Be.pageData});return H==null||H.forEach(P=>{var Be;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Be=P==null?void 0:P.compData)==null||Be.forEach(ne=>{var G;(ne==null?void 0:ne.key)==="formContent"&&((G=ne==null?void 0:ne.contents)==null||G.forEach(ae=>{var ce;(ae==null?void 0:ae.prop)===(S==null?void 0:S[1])&&(ue=(ae==null?void 0:ae.value)===""?Ve.judgeContents((ce=v.cloneDeep(ae))==null?void 0:ce.optionUrl,z):ae==null?void 0:ae.value)}))}))}),ue},w=(S,q,z,ue)=>{var ne,G;let H="",P="";(ne=v.cloneDeep(q))==null||ne.forEach((ae,ce)=>{ae!=null&&ae.includes("[")?P=P+L.value+S[ce]:P=P===""?P+ae:P+"/"+ae});let Be=(G=ue[P])==null?void 0:G.map(ae=>{var ce;return(ce=ae==null?void 0:ae.value)==null?void 0:ce.pageData});return Be==null||Be.forEach(ae=>{var ce;(ae==null?void 0:ae.name)===(z==null?void 0:z[0])&&((ce=ae==null?void 0:ae.compData)==null||ce.forEach(xe=>{var Te;(xe==null?void 0:xe.key)==="formContent"&&((Te=xe==null?void 0:xe.contents)==null||Te.forEach(Ne=>{(Ne==null?void 0:Ne.prop)===(z==null?void 0:z[1])&&(H=Ne==null?void 0:Ne.value)}))}))}),H};return e.watch(()=>r.itemData,async()=>{var Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze;const S=(Be=r.itemData)==null?void 0:Be.find(he=>(he==null?void 0:he.key)==="formContent"),q=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(he=>(he==null?void 0:he.key)==="formButton"),z=(G=v.cloneDeep(r.itemData))==null?void 0:G.find(he=>(he==null?void 0:he.key)==="formFlex"),ue=(ae=v.cloneDeep(r.itemData))==null?void 0:ae.find(he=>(he==null?void 0:he.key)==="formWrap"),H=(ce=v.cloneDeep(r.itemData))==null?void 0:ce.find(he=>(he==null?void 0:he.key)==="enableWrap");if((ue==null?void 0:ue.contents)==="纵向"?O.value=!1:O.value=!0,D.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,$.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((xe=z==null?void 0:z.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((Te=S==null?void 0:S.contents)==null?void 0:Te.length)>0&&Array.isArray(S==null?void 0:S.contents)){let he=r.allMapContents;const Ae=(U=(Ne=v.cloneDeep(S))==null?void 0:Ne.contents)==null?void 0:U.map((B,Ie)=>{var Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa;let tt=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",Fe=(B==null?void 0:B.type)??"",Xe=(B==null?void 0:B.options)??[];if((Vt=B==null?void 0:B.key)!=null&&Vt.includes("$")&&(tt=(_t=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:_t[0],((xt=(Ft=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ft[1])==null?void 0:xt.length)>0)){const[wt,Zt]=(Yt=(Ht=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Fe=((Ot=Ve.FormType.find(yt=>(yt==null?void 0:yt.key)===wt))==null?void 0:Ot.value)??"",((Va=Zt==null?void 0:Zt.split(","))==null?void 0:Va.length)>0&&(Xe=(wa=Zt==null?void 0:Zt.split(","))==null?void 0:wa.map(yt=>({label:yt,value:yt})))}let Me=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(Me=(Ka=(Oa=B==null?void 0:B.contents)==null?void 0:Oa.split(","))==null?void 0:Ka.map(wt=>({label:wt,value:wt}))),((Da=B==null?void 0:B.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Me=(Ca=(ja=B==null?void 0:B.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let dt=!1,ut=(B==null?void 0:B.isFormColHidden)??!1,st=Ve.judgeContents((Ua=v.cloneDeep(B))==null?void 0:Ua.optionUrl,he),vt=st!==void 0&&st!==""?st:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(Xe==null?void 0:Xe.length)>0?(Wa=Xe==null?void 0:Xe[0])==null?void 0:Wa.value:(B==null?void 0:B.value)??"",bt=!1,Nt=st!==void 0||Fe===""?"Input":Fe;if((Array.isArray(st)&&(st!=null&&st.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Nt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.isLoginUser)dt=!0,vt=((Ha=N.value)==null?void 0:Ha.姓名)||((qa=N.value)==null?void 0:qa.account)||((Ga=N.value)==null?void 0:Ga.账号)||((Ma=N.value)==null?void 0:Ma.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(bt=!0,(B==null?void 0:B.isShow)==="originalSignature")Nt="image",vt=h.value+"/"+((ba=N.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(B.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=Le.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var La;(Qt==null?void 0:Qt.key)==="formContent"&&((La=Qt==null?void 0:Qt.contents)==null||La.forEach(Tt=>{(Tt==null?void 0:Tt.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=Tt==null?void 0:Tt.value)}))}))})});let Zt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),yt=B==null?void 0:B.isShow;Zt==null||Zt.forEach(Mt=>{Mt!=null&&Mt.value?yt=yt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):yt=yt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((_a=yt==null?void 0:yt.split("==="))==null?void 0:_a[0])+"==='"+((ka=yt==null?void 0:yt.split("==="))==null?void 0:ka[1])+"'":yt=((na=yt==null?void 0:yt.split("="))==null?void 0:na[0])+"='"+((ga=yt==null?void 0:yt.split("="))==null?void 0:ga[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(ut=!1,Nt="image",vt=h.value+"/"+((Xa=N.value)==null?void 0:Xa.signature)):vt=""}return Array.isArray(vt)&&vt.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Nt="Url"),{label:tt??"",name:"t"+Ie,prop:v.cloneDeep(B==null?void 0:B.key),type:Nt,value:B!=null&&B.isNewDate&&vt===""?new Date:vt,id:(B==null?void 0:B.id)??Ie,contents:(Me==null?void 0:Me.length)>0?Me:Xe??[],width:(B==null?void 0:B.width)??1,isLoginUser:dt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:ut,signature:bt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}}),mt=Ae==null?void 0:Ae.map(B=>B==null?void 0:B.value);let ke="";mt==null||mt.forEach(B=>{B!==""&&B!==void 0&&(ke=ke===""?B:ke+"/"+B)}),K.setSelectArray(mt),K.setSelectString(ke);let Ee=(Oe=v.cloneDeep(Ae))==null?void 0:Oe.map(B=>(B!=null&&B.value&&Ve.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));Ee=Ee==null?void 0:Ee.map(B=>{var Ie,tt,Fe,Xe,Me,dt,ut,st;if((tt=(Ie=B==null?void 0:B.optionUrl)==null?void 0:Ie.menuSelect)!=null&&tt.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";B.optionUrl.oldMenuSelect=(Xe=(Fe=v.cloneDeep(B))==null?void 0:Fe.optionUrl)==null?void 0:Xe.menuSelect,B.optionUrl.menuSelect=(dt=(Me=B==null?void 0:B.optionUrl)==null?void 0:Me.menuSelect)==null?void 0:dt.map(bt=>{var Nt,Pt,Vt,_t,Ft,xt;if(bt!=null&&bt.includes("[")){let Ht=(Pt=(Nt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:Pt[1];vt=W((Vt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Vt.split(":"),he==null?void 0:he[at.value],he),bt=((Ft=(_t=v.cloneDeep(Ee))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Ft.value)||W((xt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),he==null?void 0:he[at.value],he)}return bt}),vt!==""&&B.value===""&&(B.value=w(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(ut=B==null?void 0:B.optionUrl)==null?void 0:ut.groupSelect,he),Array.isArray(B.value)&&((st=B.value)!=null&&st.every(bt=>bt==null?void 0:bt.url))&&(B.type="UPLOAD"))}return B}),u.value=Ee,fe.value=((me=u.value)==null?void 0:me.every(B=>B==null?void 0:B.disabled))||V.value===at.value,se.value=(je=u.value)==null?void 0:je.every(B=>B==null?void 0:B.operable),ye.value=(lt=u.value)==null?void 0:lt.map(B=>B==null?void 0:B.label);let be=[],Se=[];if((qe=v.cloneDeep(u.value))==null||qe.forEach(B=>{var Ie;Array.isArray(B==null?void 0:B.value)&&((Ie=B==null?void 0:B.value)!=null&&Ie.find(tt=>{var Fe;return(Fe=tt==null?void 0:tt.url)==null?void 0:Fe.includes(".obj")}))&&(Se=B==null?void 0:B.value)}),(Se==null?void 0:Se.length)>0){const B=(ot=v.cloneDeep(Se))==null?void 0:ot.filter(Ie=>{var tt;return(tt=Ie==null?void 0:Ie.url)==null?void 0:tt.includes(".obj")});B==null||B.forEach(Ie=>{var Fe,Xe,Me,dt;const tt=(Fe=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Fe.map(ut=>ut==null?void 0:ut.url);be.push({objUrl:Ie==null?void 0:Ie.url,mtlUrls:((Xe=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Xe.length)===1?(dt=(Me=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Me[0])==null?void 0:dt.url:tt})}),le.setObjUrl(be)}($e=v.cloneDeep(u.value))==null||$e.forEach(B=>{var Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt;if((tt=(Ie=B==null?void 0:B.value)==null?void 0:Ie.toString())!=null&&tt.includes(".stl")||(Xe=(Fe=B==null?void 0:B.value)==null?void 0:Fe.toString())!=null&&Xe.includes(".STL")||(dt=(Me=B==null?void 0:B.value)==null?void 0:Me.toString())!=null&&dt.includes(".obj")||(st=(ut=B==null?void 0:B.value)==null?void 0:ut.toString())!=null&&st.includes(".mtl")||(bt=(vt=B==null?void 0:B.value)==null?void 0:vt.toString())!=null&&bt.includes(".urdf")){let _t={},Ft=[],xt;Array.isArray(B==null?void 0:B.value)?xt=B==null?void 0:B.value:xt=(Nt=B==null?void 0:B.value)==null?void 0:Nt.split(","),xt==null||xt.forEach(Ht=>{Ht.includes(".mtl")?Ft.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Ft==null?void 0:Ft.length)>0&&(_t.mtlBlobs=Ft),(Vt=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&Vt.includes("http:")}})}else u.value=[];let P=it.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(he=>{var mt,ke,Ee,be;let Ae=(mt=he==null?void 0:he.key)==null?void 0:mt.split("/");return(r==null?void 0:r.compName)===(Ae==null?void 0:Ae[0])&&(ke=u.value)!=null&&ke.find(Se=>(Se==null?void 0:Se.prop)===(Ae==null?void 0:Ae[1]))&&(he.value=(be=(Ee=u.value)==null?void 0:Ee.find(Se=>(Se==null?void 0:Se.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:be.value),he}),Ye.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let he={};(ht=v.cloneDeep(u).value)==null||ht.forEach(Ae=>{(Ae==null?void 0:Ae.isMain)===!0&&(he[(Ae==null?void 0:Ae.prop)??(Ae==null?void 0:Ae.name)]=[{required:!0,message:`${(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.name)}不能为空`}])}),_.value=he}if(((et=q==null?void 0:q.contents)==null?void 0:et.length)>0){const he=[];(ze=q==null?void 0:q.contents)==null||ze.forEach((Ae,mt)=>{(Ae==null?void 0:Ae.label)!==""&&he.push({label:(Ae==null?void 0:Ae.label)??"",id:(Ae==null?void 0:Ae.id)??mt,type:(Ae==null?void 0:Ae.type)??"",background:Ae==null?void 0:Ae.background})}),J.value=he}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,S=>{fe.value=S===at.value},{immediate:!0}),(S,q)=>{const z=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Be=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(St.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:nt,onChange:C,formDisabled:fe.value,formLabelsOperable:se.value,isButtonRow:O.value,onPreview:ie,onBlurChange:te,onHandleColEditChange:de,onHandleColTypeChange:Z,onRouteUrl:F,onClickTrigger:ve},{operateCol:e.withCtx(({renderColumns:ne,formDisabled:G,formLabelsOperable:ae})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Qe},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ue,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:Ke,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ue,{"model-value":ae,"active-text":"编辑所有标签","inactive-text":"",onChange:Re},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Be,{modelValue:ye.value,"onUpdate:modelValue":q[0]||(q[0]=ce=>ye.value=ce),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ee,onChange:Ge},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne,ce=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ce.label},[e.createVNode(H,{value:ce.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ce.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var xe;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xe=Object.keys(ce))==null?void 0:xe.filter(Te=>{var Ne;return(Ne=De.value)==null?void 0:Ne.find(U=>(U==null?void 0:U.value)===Te)}),Te=>{var Ne,U;return e.openBlock(),e.createElementBlock("div",{key:Te},[e.createVNode(St._sfc_main$1,{value:ce==null?void 0:ce[Te],"active-text":(U=(Ne=De.value)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.value)===Te))==null?void 0:U.label,inactiveText:"",onChange:Oe=>oe(Oe,Te,ce)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(z,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Pe},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),Kn=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Bt=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},J=D=>{r("deleteChange",v.cloneDeep(D))},M=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},we=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(N,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(N.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>M(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>O(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>le(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:N==null?void 0:N.children,onDeleteChange:J,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},J=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},M=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},we=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),N=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ge)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>J(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(N,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(N,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=zt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},Li={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),O=e.ref([]),R=e.ref(""),J=e.ref(""),M=e.ref([]),we=e.ref([]),X=e.ref([]),K=e.ref([]),le=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),N=e.ref([]),E=e.ref([]),ge=e.ref([]),Ye=()=>{le.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},it=()=>{var C,I,W;b.value=!0;let h=[];(W=(I=(C=Ve.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||W.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),N.value=h,E.value=h},Le=h=>{h||(N.value=E.value)},We=async h=>{var C,I,W,w,S,q,z,ue,H,P,Be,ne;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:I.value)){let G=[],ae=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ve.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ve.FormContent)==null?void 0:q.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:z.value;if(ae==null||ae.forEach(ce=>{y.value++,G.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[ce.label])??"",id:y.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),h!=null&&h.菜单选项&&((Be=h==null?void 0:h.菜单选项)==null?void 0:Be.length)>0){const ce=await Ve.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=ce),xe))}E.value=await Ve.selectToBase(v.cloneDeep(G)),N.value=await Ve.selectToBase(v.cloneDeep(G))}else{let G=v.cloneDeep(N.value);if(G=G==null?void 0:G.map(ae=>(ae.value=h==null?void 0:h[ae.name],ae)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const ae=await Ve.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=ae),ce))}G=Ve.formToOptionsContents(G),E.value=await Ve.selectToBase(v.cloneDeep(G))}},_e=async h=>{await We(h),N.value=E.value},V=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},ee=async h=>{var W,w,S,q,z,ue,H,P,Be;b.value=!0;let C=[];const I=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ve.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ve.FormContent)==null?void 0:q.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:z.value;if(I==null||I.forEach(ne=>{y.value++,C.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):V(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Be=h==null?void 0:h.menuSelect)==null?void 0:Be.length)>0){const ne=await Ve.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ne),G))}R.value=h==null?void 0:h.id,N.value=await Ve.selectToBase(Ve.formToOptionsContents(C)),E.value=await Ve.selectToBase(Ve.formToOptionsContents(C))},se=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ge.value=(C=v.cloneDeep(ge.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ge.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{b.value=!1,N.value=[],R.value=""},Je=async()=>{var W,w,S,q,z,ue,H,P,Be,ne;N.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((z=(q=Ve.FormContent)==null?void 0:q.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:z.value);if((ue=N.value)==null||ue.forEach(G=>{const ae=C==null?void 0:C.find(ce=>(ce==null?void 0:ce.label)===(G==null?void 0:G.label));ae&&(h[ae.key]=G.value)}),h.name=h.label,(H=ge.value)!=null&&H.find(G=>G.id===h.id))ge.value=(P=ge.value)==null?void 0:P.map(G=>(G.id===h.id&&(G=h),G));else{let G=v.cloneDeep(ge.value);ge.value||(ge.value=[]),G.push(h),ge.value=G}ge.value=ge.value.map(({id:G,...ae})=>ae),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Be=v.cloneDeep(s.originalItemContents))!=null&&Be.find(G=>(G==null?void 0:G.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=ge.value),G)):I.push({key:"tableToForm",contents:ge.value}),r("change",I)},at=h=>{le.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=_.value),W)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const Q=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;we.value=(C=v.cloneDeep(we.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=we.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>{var I,W,w,S,q;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(z=>{const ue=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=we.value)!=null&&W.find(z=>z.id===h.id))we.value=(w=we.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(we.value)??[];z.push(h),we.value=z}le.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=we.value),z)):C.push({key:"extraButton",contents:we.value}),r("change",C)},ye=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},De=()=>{le.value=!1,D.value=[],R.value=""},Ke=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,X.value=C,K.value=C},Re=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;M.value=(C=v.cloneDeep(M.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=M.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Qe=()=>{u.value=!0;let h=[];Bt==null||Bt.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,O.value=h},Ge=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),X.value=h,K.value=h},ve=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,W,w,S,q;X.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=X.value)==null||I.forEach(z=>{const ue=Ia==null?void 0:Ia.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=M.value)!=null&&W.find(z=>z.id===h.id))M.value=(w=M.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(M.value);z.push(h),M.value=z}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=M.value),z)):C.push({key:"rowButton",contents:M.value}),r("change",C)},Y=()=>{f.value=!1,R.value="",K.value=[],X.value=[]},pe=h=>{u.value=!0;let C=[];Bt==null||Bt.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,J.value=h==null?void 0:h.id,O.value=C},de=h=>{var C;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Z=h=>{var I,W,w;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},oe=h=>{var I;u.value=!0;let C=[];Bt==null||Bt.forEach(W=>{y.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,J.value="",x.value=C,O.value=C},te=h=>{let C=v.cloneDeep(O.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),O.value=C},ie=()=>{u.value=!1,R.value="",J.value="",O.value=[]},Pe=()=>{var I,W,w,S,q,z;x.value=O.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(ue=>{const H=Bt==null?void 0:Bt.find(P=>(P==null?void 0:P.label)===(ue==null?void 0:ue.label));H?h[H.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(h.children=ue.children)}),(W=g.value)!=null&&W.find(ue=>ue.id===h.id))g.value=(w=g.value)==null?void 0:w.map(ue=>(ue.id===h.id&&(ue=h),ue));else{let ue=v.cloneDeep(g.value)??[];J.value===""?ue.push(h):ue=ue==null?void 0:ue.map(H=>(H.id===J.value&&(H.children||(H.children=[]),H.children.push(h)),H)),g.value=ue}g.value=(S=g.value)!=null&&S.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,u.value=!1,R.value="",J.value="";let C=v.cloneDeep(s.originalItemContents);(q=v.cloneDeep(s.originalItemContents))!=null&&q.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(z=v.cloneDeep(s.originalItemContents))==null?void 0:z.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),r("change",C)},nt=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var w;return(W==null?void 0:W.key)==="header"&&(W.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:C.contents,M.value=(W=(I=d.value)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:W.contents,we.value=(S=(w=d.value)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="extraButton"))==null?void 0:S.contents,_.value=(z=(q=d.value)==null?void 0:q.find(U=>(U==null?void 0:U.key)==="page"))!=null&&z.contents?!!((H=(ue=d.value)==null?void 0:ue.find(U=>(U==null?void 0:U.key)==="page"))!=null&&H.contents):!1,ge.value=(Be=(P=d.value)==null?void 0:P.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Be.contents,g.value=(ne=g.value)==null?void 0:ne.map((U,Oe)=>(Array.isArray(U)?U=ri(U):U={label:(U==null?void 0:U.label)??"",prop:(U==null?void 0:U.label)==="操作"?"operate":U==null?void 0:U.prop,width:U!=null&&U.width?parseInt(U.width):"",fixed:(U==null?void 0:U.fixed)??void 0,sortable:(U==null?void 0:U.sortable)??!1,align:(U==null?void 0:U.align)??"left",showOverflowTooltip:(U==null?void 0:U.showOverflowTooltip)??!0,isNotDrag:(U==null?void 0:U.isNotDrag)??!1,isEditCol:(U==null?void 0:U.isEditCol)??!1,isOperate:(U==null?void 0:U.isOperate)??!1,id:(U==null?void 0:U.id)??Oe,formMenuSelect:(U==null?void 0:U.formMenuSelect)??void 0,groupSelect:(U==null?void 0:U.groupSelect)??void 0},U)),g.value=(G=g.value)!=null&&G.every(U=>Array.isArray(U))?(ae=g.value)==null?void 0:ae[0]:g.value,M.value=(ce=M.value)==null?void 0:ce.map((U,Oe)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",textColor:(U==null?void 0:U.textColor)??"#000000",id:(U==null?void 0:U.id)??Oe}),we.value=(xe=we.value)==null?void 0:xe.map((U,Oe)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",background:(U==null?void 0:U.background)??"var(--ssComponent-primary-color)",id:(U==null?void 0:U.id)??Oe}),ge.value)ge.value=(Ne=ge.value)==null?void 0:Ne.map(U=>{y.value++;let Oe=U;return Oe.id=y.value,Oe});else{let U=[];const Oe=(Te=Ve.getColumnChild(v.cloneDeep(g.value)))==null?void 0:Te.filter(me=>(me==null?void 0:me.prop)!=="operate");Oe==null||Oe.forEach(me=>{var je;y.value++,U.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.prop)||(me==null?void 0:me.label),type:me!=null&&me.groupSelect?"Select":"Input",value:"",id:y.value,contents:me==null?void 0:me.options,menuSelect:me==null?void 0:me.formMenuSelect,groupSelect:(je=me==null?void 0:me.groupSelect)==null?void 0:je.split(":"),selectRelateType:"关联绑定列"})}),ge.value=U}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:Qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>pe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>oe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>nt(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:de,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ge},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Li,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>Ke(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Re(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ye},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>at(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Q(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:it},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>ee(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:le.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:L,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:We,onChangeVisible:Le,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=zt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=$t.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=$t.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((O=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:O.h)||s,minW:((J=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:J.minW)||ps.value,minH:((we=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:we.minH)||vs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,O;return((O=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:O.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=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}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(O=>{for(const[R,J]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===R)return{...O,value:J};return O})},{immediate:!0});const u=g=>St.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,O=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(O.type)),{modelValue:O.value,"onUpdate:modelValue":R=>O.value=R,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:R=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=zt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=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:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((le,D)=>(le[D==null?void 0:D.prop]=D==null?void 0:D.rule,le),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,le,D)=>{var N;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{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:(N=s==null?void 0:s.relatedData)==null?void 0:N.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...O(K,le,D)]:y=$,y},O=(K,le,D)=>{const $=[{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 D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,le)=>{var E,ge,Ye,it,Le,We,_e,V,ee;const D=((Le=(it=(Ye=(ge=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ge.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Ye.contents)==null?void 0:it.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:Le.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((ee=(V=(_e=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:_e.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:V.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],N=_(D,y,K);f.value=le?ks(N,le):N,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const J=K=>{const le=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const D=le==null?void 0:le.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},M=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},we=(K,le)=>{x.value=le==null?void 0:le.changeProp,J(K)},X=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:we,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=zt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},Ls={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),O=e.ref(!1),R=e.ref(0),J=e.ref([]),M=e.ref([]),we=(V,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[V.key];if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const se=ee[V.key];return mr(se)?se:V.default}return(V==null?void 0:V.label)==="类型"&&ee[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!ee[V.key]?!1:ee[V.key]},X=async V=>{var fe,Je,at,Q,L,ye;d.value=!0;let ee=[];const se=await((at=(Je=(fe=Ve.FormContent)==null?void 0:fe.find(De=>(De==null?void 0:De.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Je.value)==null?void 0:at.value)??((L=(Q=Ve.FormContent)==null?void 0:Q.find(De=>(De==null?void 0:De.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:L.value);if(se==null||se.forEach(De=>{R.value++,ee.push({label:De==null?void 0:De.label,name:De==null?void 0:De.label,type:De.type,prop:De==null?void 0:De.prop,value:we(De,V),id:R.value,contents:De==null?void 0:De.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((ye=V==null?void 0:V.menuSelect)==null?void 0:ye.length)>0){const De=await Ve.menuToContentType(V==null?void 0:V.menuSelect);ee=ee==null?void 0:ee.map(Ke=>((Ke==null?void 0:Ke.name)==="组信息选项"&&(Ke.contents=De),Ke))}_.value=V==null?void 0:V.id,u.value=await Ve.selectToBase(Ve.formToOptionsContents(ee)),b.value=await Ve.selectToBase(Ve.formToOptionsContents(ee))},K=V=>{var se;g.value=!0;let ee=[];(se=Ve.FormButton)==null||se.forEach(fe=>{R.value++,ee.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"&&V[fe.key]===""?"normal":V[fe.key],id:R.value,contents:fe==null?void 0:fe.options})}),J.value=ee,M.value=ee,_.value=V==null?void 0:V.id};e.watch(()=>O.value,()=>{var ee,se;let V=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?V=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!O.value),fe)):V.push({key:"enableWrap",contents:!O.value}),r("change",V)},{deep:!0});const le=()=>{var se,fe,Je,at,Q;J.value=M.value;let V={};if(_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value),(se=J.value)==null||se.forEach(L=>{var De;const ye=(De=Ve.FormButton)==null?void 0:De.find(Ke=>(Ke==null?void 0:Ke.label)===(L==null?void 0:L.label));ye&&(V[ye.key]=L.value)}),(fe=f.value)!=null&&fe.find(L=>L.id===V.id))f.value=(Je=f.value)==null?void 0:Je.map(L=>(L.id===V.id&&(L=V),L));else{let L=v.cloneDeep(f.value);f.value||(f.value=[]),L.push(V),f.value=L}g.value=!1,_.value="";let ee=v.cloneDeep(s.originalItemContents);(at=v.cloneDeep(s.originalItemContents))!=null&&at.find(L=>(L==null?void 0:L.key)==="formButton")?ee=(Q=v.cloneDeep(s.originalItemContents))==null?void 0:Q.map(L=>((L==null?void 0:L.key)==="formButton"&&(L.contents=f.value),L)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},D=V=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;x.value=(ee=v.cloneDeep(x.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=x.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=V=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=f.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let V=[];(ee=Ve.FormButton)==null||ee.forEach(se=>{R.value++,V.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:R.value,contents:se==null?void 0:se.options})}),J.value=V,M.value=V},N=()=>{var ee,se,fe;d.value=!0;let V=[];(fe=(se=(ee=Ve.FormContent)==null?void 0:ee.find(Je=>(Je==null?void 0:Je.key)==="Input"))==null?void 0:se.value)==null||fe.forEach(Je=>{R.value++,V.push({label:Je==null?void 0:Je.label,name:Je==null?void 0:Je.label,type:Je.type,value:(Je==null?void 0:Je.label)==="类型"?"Input":"",id:R.value,contents:Je==null?void 0:Je.options})}),u.value=V,b.value=V},E=V=>{let ee=v.cloneDeep(M.value);ee=ee==null?void 0:ee.map(se=>(se.value=V==null?void 0:V[se.name],se)),M.value=ee},ge=V=>{const ee=V.find(Je=>(Je==null?void 0:Je.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=V.find(Je=>(Je==null?void 0:Je.name)==="多选"),fe=V.find(Je=>(Je==null?void 0:Je.name)==="初始值");se!=null&&se.value&&Bo.isString(fe.value)&&(fe.value=[fe.value]),!(se!=null&&se.value)&&!Bo.isString(fe.value)&&(fe.value="")},Ye=async V=>{var ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe;if((V==null?void 0:V.类型)!==((se=(ee=b.value)==null?void 0:ee.find(Ge=>(Ge==null?void 0:Ge.label)==="类型"))==null?void 0:se.value)){let Ge=[];const ve=await((at=(Je=(fe=Ve.FormContent)==null?void 0:fe.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Je.value)==null?void 0:at.value)?await((Ke=(De=(ye=Ve.FormContent)==null?void 0:ye.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:De.value)==null?void 0:Ke.value):(L=(Q=Ve.FormContent)==null?void 0:Q.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:L.value;if(ve==null||ve.forEach(F=>{var pe,de;R.value++;const Y=yr(F==null?void 0:F.default)?(V==null?void 0:V[F.label])??F.value??"":F==null?void 0:F.default;Ge.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:Y,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((de=(pe=b.value)==null?void 0:pe[0])==null?void 0:de.width)??1})}),V!=null&&V.菜单选项&&((Re=V==null?void 0:V.菜单选项)==null?void 0:Re.length)>0){const F=await Ve.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=F),Y))}ge(Ge),b.value=await Ve.selectToBase(v.cloneDeep(Ge)),u.value=await Ve.selectToBase(v.cloneDeep(Ge))}else{let Ge=v.cloneDeep(b.value);if(Ge=Ge==null?void 0:Ge.map(ve=>(ve.value=V==null?void 0:V[ve.name],ve)),V!=null&&V.菜单选项&&((Qe=V==null?void 0:V.菜单选项)==null?void 0:Qe.length)>0){const ve=await Ve.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=ve),F))}Ge=Ve.formToOptionsContents(Ge),ge(Ge),b.value=await Ve.selectToBase(v.cloneDeep(Ge))}},it=V=>{V||(u.value=b.value)},Le=async V=>{await Ye(V),u.value=b.value},We=vo(async()=>{var fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve;u.value=b.value;let V={};V.width=((Je=(fe=u.value)==null?void 0:fe[0])==null?void 0:Je.width)??1,_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value);let ee=await((L=(Q=(at=Ve.FormContent)==null?void 0:at.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Q.value)==null?void 0:L.value)??((De=(ye=Ve.FormContent)==null?void 0:ye.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:De.value);if((Ke=u.value)==null||Ke.forEach(F=>{const Y=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(F==null?void 0:F.label));Y&&(V[Y.key]=F.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Re=x.value)!=null&&Re.find(F=>F.id===V.id))x.value=(Qe=x.value)==null?void 0:Qe.map(F=>(F.id===V.id&&(F=V),F));else{let F=v.cloneDeep(x.value);F.push(V),x.value=F}x.value=x.value.map(({id:F,...Y})=>Y),d.value=!1,_.value="";let se=v.cloneDeep(s.originalItemContents);(Ge=v.cloneDeep(s.originalItemContents))!=null&&Ge.find(F=>(F==null?void 0:F.key)==="formContent")?se=(ve=v.cloneDeep(s.originalItemContents))==null?void 0:ve.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),_e=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,fe,Je,at,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=v.cloneDeep(s.originalItemContents);x.value=((ee=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="formButton"))==null?void 0:se.contents)??[],O.value=(fe=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&fe.contents?!((Je=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&Je.contents):!0,x.value=(at=v.cloneDeep(x.value))==null?void 0:at.map((L,ye)=>{var Ke;let De=L;return De.id=(L==null?void 0:L.id)??ye,L!=null&&L.label||(L.label=(L==null?void 0:L.key)??(L==null?void 0:L.label)??""),L!=null&&L.type||(L.type=(L==null?void 0:L.type)??""),L.contents=((Ke=L==null?void 0:L.options)==null?void 0:Ke.length)===0?(L==null?void 0:L.contents)??"":L==null?void 0:L.options,De}),x.value=Ve.formToOptionsContents(x.value),f.value=(Q=f.value)==null?void 0:Q.map((L,ye)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(V,ee)=>{const se=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:N},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Je,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Je.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>D(Je)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Je,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,e.toDisplayString(Je.label),1),e.createElementVNode("div",zs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>$(Je)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:O.value,"onUpdate:modelValue":ee[0]||(ee[0]=Je=>O.value=Je)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ye,onChangeVisible:it,onBlurChange:Le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(fe,{onClick:_e,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=zt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),O=X=>{var K;x.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},J=X=>{var K,le,D;if((X==null?void 0:X.buttonName)==="确认"){const $=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(le=_.value)==null?void 0:le.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=M())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),we=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:we,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=zt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=X=>{var K;u.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},J=X=>{var K,le,D,$;if((X==null?void 0:X.buttonName)==="确认"){const y=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(N=>{y[N]===""&&delete y[N]}),d.value){case"create":(le=b.value)==null||le.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(N=>N.index===(y==null?void 0:y.index)?{...N,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:N);break}r("change",($=M())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),we=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(u.value=((K=X==null?void 0:X.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((le=X==null?void 0:X.find(D=>D.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:we,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=zt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=zt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var N;if(y.key==="extra"){let E=[];(N=y.value)==null||N.forEach(ge=>{var Ye;E.push((Ye=Object.values(ge))==null?void 0:Ye[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const O=(D,$,y,N)=>{var ge;let E={};((ge=D==null?void 0:D[0])==null?void 0:ge.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Ye=>(Ye==null?void 0:Ye.key)!=="tableContentName"),f.value=E,x.value=y,_.value=N.id)},R=D=>{var Ye,it,Le,We;const $=(it=(Ye=Object.values(v.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=(We=(Le=Object.values(v.cloneDeep(f.value)))==null?void 0:Le[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=y==null?void 0:y.map((_e,V)=>{var ee;return V===D.index&&(_e==null?void 0:_e.comp)==="Table"&&(_e.compData=(ee=_e.compData)==null?void 0:ee.map(se=>{var fe,Je;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Je=(fe=D.content)==null?void 0:fe.map(at=>{let Q={};for(let L in at)L!=="id"&&(Q[L]=at[L]);return Q}))==null?void 0:Je.map(at=>Object.values(at))),se})),_e});N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let _e in E)ge[_e]=N;f.value=ge},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},M=D=>{var Ye,it,Le,We;const $=(it=(Ye=Object.values(v.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=(We=(Le=Object.values(v.cloneDeep(f.value)))==null?void 0:Le[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=y==null?void 0:y.map((_e,V)=>(V===D.index&&(_e.compData=D.contents),_e));N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let _e in E)ge[_e]=N;f.value=ge},we=()=>{var $,y;let D={};for(let N in x.value)N===(($=Object.keys(f.value))==null?void 0:$[0])?D[N]=(y=Object.values(f.value))==null?void 0:y[0]:D[N]=x.value[N];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},le=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(N==null?void 0:N.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:E,index:(N==null?void 0:N.id)??E,onContentClick:O,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,onChange:R,childItemData:N==null?void 0:N.itemChildData,key:E,onContentChange:M,index:(N==null?void 0:N.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=zt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Ve.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Ve.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=$t.useModelComp(v.pinia),_=e.ref(!1),O=$t.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:J,isEdit:M,routeToChildPath:we,tableViewContents:X,lockingPage:K,payloadTypes:le}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(O),{loginUserInfo:N}=v.storeToRefs(R),E=e.ref(!1),ge=async()=>{var Q,L;(Q=i.value)!=null&&Q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await se((L=i.value)==null?void 0:L.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!E.value&&await at(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Ye=()=>{u.value=!1,b.value=void 0},it=Q=>Q.map(L=>{const ye={};for(const De in L){const Ke=L[De];if(De.includes(f.value)){const Re=De.split(f.value);let Qe=ye;Re.forEach((Ge,ve)=>{ve===Re.length-1?Qe[Ge]=Ke:(Qe[Ge]||(Qe[Ge]={}),Qe=Qe[Ge])})}else ye[De]=Ke}return ye}),Le=async(Q,L,ye=[])=>{var Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt;let De=(Ke=v.cloneDeep(L))==null?void 0:Ke.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let h=(F=(ve=(Ge=(Qe=(Re=v.cloneDeep(Q))==null?void 0:Re.split("["))==null?void 0:Qe[1])==null?void 0:Ge.split("]"))==null?void 0:ve[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(Y=De==null?void 0:De.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:Y.compData;if(!I){let W=(pe=Q==null?void 0:Q.split("["))==null?void 0:pe[0],w=await Ve.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",ye);I=(de=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:de.compData}I==null||I.forEach(W=>{var w,S,q,z,ue,H;if((W==null?void 0:W.key)==="formContent")(w=W==null?void 0:W.contents)==null||w.forEach(P=>{var Be;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Be=P==null?void 0:P.value)==null?void 0:Be.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Be=(S=I==null?void 0:I.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,ne=(h==null?void 0:h[1])??"";if(Be!=null&&Be.every(G=>Array.isArray(G))){let G=Ve.getColumnChild((ue=Be==null?void 0:Be[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(H=W.contents)==null||H.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(xe=>!(xe!=null&&xe.id)),G==null||G.forEach((xe,Te)=>{let Ne=ae[Te];typeof ae[Te]=="number"&&(Ne=ae[Te].toString()),(ne===""||ne===xe.prop)&&(ce[xe.prop]=Ne)}),P.push(ce)}),P=it(P)}else{let G=(q=Be==null?void 0:Be.map(ae=>ae==null?void 0:ae.label))==null?void 0:q.filter(ae=>ae!=="操作");(z=W.contents)==null||z.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(xe=>!(xe!=null&&xe.id)),G==null||G.forEach((xe,Te)=>{let Ne=ae[Te];typeof ae[Te]=="number"&&(Ne=ae[Te].toString()),(ne===""||ne===xe)&&(ce[xe]=Ne)}),P.push(ce)})}C=P}})}return C}else if(Q!=null&&Q.includes("/")){let h={};return(Z=v.cloneDeep(De))==null||Z.forEach((C,I)=>{var W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;if((C==null?void 0:C.comp)==="Table"){let je=Array.isArray((S=(w=(W=C==null?void 0:C.compData)==null?void 0:W.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(H=(ue=(z=(q=C==null?void 0:C.compData)==null?void 0:q.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:z.contents)==null?void 0:ue[0])==null?void 0:H.some($e=>$e==null?void 0:$e.children):[],lt=(ne=(Be=(P=C==null?void 0:C.compData)==null?void 0:P.find($e=>($e==null?void 0:$e.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:ne.map($e=>($e!=null&&$e.find(ht=>ht==null?void 0:ht.id)&&($e=$e.slice(1)),$e)),qe=(Te=(xe=(ce=(ae=(G=C==null?void 0:C.compData)==null?void 0:G.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:ae.contents)==null?void 0:ce[0])==null?void 0:xe[0])==null?void 0:Te.label,ot=(U=(Ne=C==null?void 0:C.compData)==null?void 0:Ne.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:U.contents;if(je)(je==null?void 0:je.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Ve.tableToForm(lt,ot):h[qe]=Ve.tableToForm(lt,ot);else{const $e=[];ot=ot.slice(1,ot.length-1),ot==null||ot.forEach((ht,et)=>{lt==null||lt.forEach(ze=>{$e.push({key:ht.label+ze[0],value:ze[et+1]})})}),h["form"+I]=$e}}else{const je=(me=(Oe=C.compData)==null?void 0:Oe.find(qe=>(qe==null?void 0:qe.key)==="formContent"))==null?void 0:me.contents;h!=null&&h.form||(h.form=[]);const lt=[];je==null||je.forEach(qe=>{qe.key!==""&&(qe={key:(qe==null?void 0:qe.key)??(qe==null?void 0:qe.label),value:qe==null?void 0:qe.value},lt.push(qe))}),h.form=[...lt,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(Q==="createInsofDataApi"){let h=(oe=v.cloneDeep(L))==null?void 0:oe[0];return h={comp:(te=v.cloneDeep(h))==null?void 0:te.comp,compData:(ie=v.cloneDeep(h))==null?void 0:ie.compData,name:(Pe=v.cloneDeep(h))==null?void 0:Pe.name,isShow:(nt=v.cloneDeep(h))==null?void 0:nt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return Q}},We=async(Q,L,ye)=>{var Re,Qe,Ge;let De=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Ke=De==null?void 0:De.find(ve=>(ve==null?void 0:ve.name)===(ye==null?void 0:ye[0]));if(Ke){if((Ke==null?void 0:Ke.comp)==="Table"){let ve={};for(let te in v.cloneDeep(Q))v.cloneDeep(Q)[te]!=="loginUser"?ve[te]=v.cloneDeep(Q)[te]:ve[te]=((Re=N.value)==null?void 0:Re.account)||((Qe=N.value)==null?void 0:Qe.账号);let F=[],Y=ve;Array.isArray(Q)||(Y=[ve]),Y==null||Y.forEach(te=>{F.push({[te[ye[1]]]:te})});let pe=[],de=F==null?void 0:F.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]});De==null||De.forEach(te=>{var ie;(te==null?void 0:te.name)===(ye==null?void 0:ye[0])&&((ie=te==null?void 0:te.compData)==null||ie.forEach(Pe=>{var nt;(Pe==null?void 0:Pe.key)==="tableContents"&&((nt=Pe==null?void 0:Pe.contents)==null||nt.forEach(h=>{h!=null&&h.some(C=>de.includes(C))&&pe.push({[h.find(C=>C.id).id]:h.find(C=>de.includes(C))})}))}))});let Z=pe==null?void 0:pe.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]}),oe=[];if(Z==null||Z.forEach(te=>{var nt;let ie=(nt=pe==null?void 0:pe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:nt[te],Pe=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===ie});oe.push({id:parseInt(te),value:{tableData:Pe[ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((Ke==null?void 0:Ke.comp)==="Form"){let ve=v.cloneDeep(Ke);ve.compData=(Ge=ve.compData)==null?void 0:Ge.map(pe=>{var de;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(de=pe.contents)==null?void 0:de.map(Z=>((Z==null?void 0:Z.key)===(ye==null?void 0:ye[1])&&(Z.value=(Q==null?void 0:Q[Z==null?void 0:Z.prop])||Q),Z))),pe});let F={};for(let pe in ve)pe!=="id"&&(F[pe]=ve[pe]);let Y=[];if(Y.push({id:Ke==null?void 0:Ke.id,keyType:ye==null?void 0:ye[1],value:{pageData:F}}),(Y==null?void 0:Y.length)>0)return Y}}},_e=async(Q,L,ye)=>{var Re,Qe,Ge,ve,F,Y,pe,de,Z,oe;let De=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Ke=De==null?void 0:De.find(te=>(te==null?void 0:te.name)===(ye==null?void 0:ye[0]));if(Ke){if((Ke==null?void 0:Ke.comp)==="Table"){let te={};for(let ie in v.cloneDeep(Q))v.cloneDeep(Q)[ie]!=="loginUser"?te[ie]=v.cloneDeep(Q)[ie]:te[ie]=((Re=N.value)==null?void 0:Re.account)||((Qe=N.value)==null?void 0:Qe.账号);await v.createInsofDataApi({key:{type:"data",pageKey:L,tableId:Ke==null?void 0:Ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if((Ke==null?void 0:Ke.comp)==="Form"){let te=v.cloneDeep(Ke),ie=Object.keys(Q),Pe="";(ve=(Ge=v.cloneDeep(te))==null?void 0:Ge.compData)==null||ve.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(z=>{var ue;ie.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((ue=N.value)==null?void 0:ue.姓名)&&(Pe=z==null?void 0:z.key)}))});let nt=[];(F=Object.values(Q[Pe]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&nt.push(w)}),nt=[...new Set(nt)];const h=nt==null?void 0:nt.map(async w=>{var H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe;let S="";(ae=(G=(ne=(Be=(P=(H=v.cloneDeep(w))==null?void 0:H.split("("))==null?void 0:P[1])==null?void 0:Be.split(")"))==null?void 0:ne[0])==null?void 0:G.split(":"))==null||ae.forEach(me=>{S=S===""?S+me.replaceAll("'",""):S+"/"+me.replaceAll("'","")});let q=[];(Oe=(U=(Ne=(Te=(xe=(ce=v.cloneDeep(w))==null?void 0:ce.split("<"))==null?void 0:xe[1])==null?void 0:Te.split(">"))==null?void 0:Ne[0])==null?void 0:U.split(":"))==null||Oe.forEach(me=>{q.push(me.replaceAll("'",""))});const z=await Ve.getItemData(S,sessionStorage.getItem("systemKey"),"");let ue="";return z==null||z.forEach(me=>{var je;me.name===(q==null?void 0:q[0])&&((je=me==null?void 0:me.compData)==null||je.forEach(lt=>{var qe;(lt==null?void 0:lt.key)==="formContent"&&((qe=lt.contents)==null||qe.forEach(ot=>{(ot==null?void 0:ot.key)===(q==null?void 0:q[1])&&(ue=ot==null?void 0:ot.value)}))}))}),{[w]:ue}}),C=await Promise.all(h);te.compData=(pe=(Y=v.cloneDeep(te))==null?void 0:Y.compData)==null?void 0:pe.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(z=>{var ue,H,P,Be;return(ue=Q[Pe])!=null&&ue[z==null?void 0:z.key]&&(Q[Pe][z==null?void 0:z.key].includes("(")?z.value=(H=C==null?void 0:C.find(ne=>{var G;return((G=Object.keys(ne))==null?void 0:G[0])===Q[Pe][z==null?void 0:z.key]}))==null?void 0:H[Q[Pe][z==null?void 0:z.key]]:z.value=(Be=(P=v.cloneDeep(Q))==null?void 0:P[Pe])==null?void 0:Be[z==null?void 0:z.key]),z})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let W="";((de=I==null?void 0:I.data)==null?void 0:de.type)==="success"&&((oe=(Z=I==null?void 0:I.data)==null?void 0:Z.result)==null||oe.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(ye==null?void 0:ye[0])&&(W=w.id)}),await v.updateInsofDataApi({id:W,value:{pageData:te}}))}}},V=(Q,L="",ye={})=>{for(const[De,Ke]of Object.entries(Q)){const Re=L?`${L}.${De}`:De;Ke!==null&&typeof Ke=="object"&&!Array.isArray(Ke)&&Object.prototype.toString.call(Ke)!=="[object Date]"?V(Ke,Re,ye):ye[Re]=Ke}return ye},ee=async(Q,L,ye,De)=>{var Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be;let Ke=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Re=Ke==null?void 0:Ke.find(ne=>(ne==null?void 0:ne.name)===(ye==null?void 0:ye[0]));if(Re){if(!(ye!=null&&ye[1])&&(Re==null?void 0:Re.comp)==="Table"){let ne={},G=[],ae=(Ge=(Qe=Re==null?void 0:Re.compData)==null?void 0:Qe.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:Ge.contents;ae!=null&&ae.every(Te=>Array.isArray(Te))?G=(F=Ve.getColumnChild((ve=ae==null?void 0:ae[0])==null?void 0:ve.filter(Te=>(Te==null?void 0:Te.label)!=="操作")))==null?void 0:F.map(Te=>Te==null?void 0:Te.prop):G=ae==null?void 0:ae.map(Te=>Te==null?void 0:Te.label);for(let Te in v.cloneDeep(Q))if(v.cloneDeep(Q)[Te]!=="loginUser"){let Ne=V(v.cloneDeep(Q)[Te]),U={};for(let Oe in Ne)if(G!=null&&G.find(me=>me===Oe))U[Oe]=Ne[Oe];else if(G!=null&&G.find(me=>(me==null?void 0:me.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()))){let me=G==null?void 0:G.find(je=>(je==null?void 0:je.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()));U[me]=Ne[Oe]}ne[Te]=U}else ne[Te]=((Y=N.value)==null?void 0:Y.account)||((pe=N.value)==null?void 0:pe.账号);let ce=await v.getInsofDataApi({keyLikes:{tableId:Re==null?void 0:Re.id}});if(((Z=(de=ce==null?void 0:ce.data)==null?void 0:de.result)==null?void 0:Z.length)>0){let Te=(te=(oe=ce==null?void 0:ce.data)==null?void 0:oe.result)==null?void 0:te.map(Ne=>Ne==null?void 0:Ne.id);(Te==null?void 0:Te.length)>0&&await v.batchDeleteInsofDataApi({ids:Te})}let xe=[];if((ie=Re==null?void 0:Re.compData)!=null&&ie.find(Te=>(Te==null?void 0:Te.key)==="pageColumn")&&((h=(nt=(Pe=Re==null?void 0:Re.compData)==null?void 0:Pe.find(Te=>(Te==null?void 0:Te.key)==="pageColumn"))==null?void 0:nt.contents)!=null&&h.includes("["))){const Te=await v.getInsofDataApi({id:Re==null?void 0:Re.tableId});let Ne=((w=(W=(I=(C=Te==null?void 0:Te.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:w.pageKey)??"";(S=Object.values(ne))==null||S.forEach(U=>{xe.push({key:{type:"data",pageKey:Ne,tableId:Re==null?void 0:Re.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(ne))==null||q.forEach(Te=>{xe.push({key:{type:"data",pageKey:L,tableId:Re==null?void 0:Re.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Te}})});(xe==null?void 0:xe.length)>0&&await v.batchAddInsofDataApi({dataList:xe})}else if(!(ye!=null&&ye[1])&&(Re==null?void 0:Re.comp)==="Form"){let ne=v.cloneDeep(Re);ne.compData=(ue=(z=v.cloneDeep(ne))==null?void 0:z.compData)==null?void 0:ue.map(ce=>{var xe,Te;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Te=(xe=v.cloneDeep(ce))==null?void 0:xe.contents)==null?void 0:Te.map(Ne=>{var U,Oe;return(U=v.cloneDeep(Q))!=null&&U[Ne==null?void 0:Ne.key]&&(Ne.value=(Oe=v.cloneDeep(Q))==null?void 0:Oe[Ne==null?void 0:Ne.key]),Ne})),ce});const G=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((H=G==null?void 0:G.data)==null?void 0:H.type)==="success"&&((Be=(P=G==null?void 0:G.data)==null?void 0:P.result)==null||Be.forEach(ce=>{var xe,Te;((Te=(xe=ce==null?void 0:ce.value)==null?void 0:xe.pageData)==null?void 0:Te.name)===(ye==null?void 0:ye[0])&&(ae=ce.id)}),await v.updateInsofDataApi({id:ae,value:{pageData:ne}}))}}},se=async Q=>{var L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie;O.setImportLoading(!0);try{if(Q.api){let Pe=new WeakMap;(ye=(L=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:L.filter(H=>{var P,Be;return((P=H==null?void 0:H.key)==null?void 0:P.pageKey)!=="menu"&&((Be=H==null?void 0:H.key)==null?void 0:Be.pageKey)!=="secret"}))==null||ye.forEach(H=>{Pe[H.key.pageKey]?Pe[H.key.pageKey]=[...Pe[H.key.pageKey],H]:Pe[H.key.pageKey]=[H]});let h=await Ve.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Pe),C="";if(h=h==null?void 0:h.map(H=>{var P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;if((H==null?void 0:H.comp)==="Form")H.compData=(P=H.compData)==null?void 0:P.map(je=>{var lt;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(lt=je.contents)==null?void 0:lt.map(qe=>{var ot;if((qe==null?void 0:qe.value)===""&&(qe==null?void 0:qe.type)==="Select"){let $e=Ve.judgeContents((ot=v.cloneDeep(qe))==null?void 0:ot.optionUrl,Pe);qe.value=qe.value||$e}return qe})),je});else if((H==null?void 0:H.comp)==="Table"&&(Be=H.compData)!=null&&Be.find(je=>(je==null?void 0:je.key)==="pageColumn")){let je=(G=(ne=H.compData)==null?void 0:ne.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:G.contents,lt=((ce=(ae=H.compData)==null?void 0:ae.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:ce.contents)??"",qe=(Ne=(Te=(xe=je==null?void 0:je.split("["))==null?void 0:xe[1])==null?void 0:Te.split("]"))==null?void 0:Ne[0];C=((U=je==null?void 0:je.split("["))==null?void 0:U[0])+((me=(Oe=X.value)==null?void 0:Oe.find($e=>($e==null?void 0:$e.key)===qe))==null?void 0:me.value)}return H}),!(C===""||C==="")){const H=await Ve.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);h=h==null?void 0:h.map(P=>{var Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt;if((P==null?void 0:P.comp)==="Table"&&(Be=P.compData)!=null&&Be.find(qe=>(qe==null?void 0:qe.key)==="pageColumn")){let qe=(G=(ne=P.compData)==null?void 0:ne.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:G.contents,ot=((ce=(ae=P.compData)==null?void 0:ae.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:ce.contents)??"",$e=(Ne=(Te=(xe=qe==null?void 0:qe.split("["))==null?void 0:xe[1])==null?void 0:Te.split("]"))==null?void 0:Ne[0],ht=((U=qe==null?void 0:qe.split("["))==null?void 0:U[0])+((me=(Oe=X.value)==null?void 0:Oe.find(ze=>(ze==null?void 0:ze.key)===$e))==null?void 0:me.value),et=(je=H==null?void 0:H.find(ze=>(ze==null?void 0:ze.name)===(ot===""?d==null?void 0:d.compName:ot)))==null?void 0:je.compData;P.compData=(lt=P.compData)==null?void 0:lt.map(ze=>{var he;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(he=et==null?void 0:et.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:he.contents),ze})}return P})}let I={};if(((Ke=(De=Q==null?void 0:Q.extraValues)==null?void 0:De.input)==null?void 0:Ke.length)>0){const H=(Qe=(Re=Q==null?void 0:Q.extraValues)==null?void 0:Re.input)==null?void 0:Qe.map(async P=>{var Be;fe!=null&&fe.find(ne=>ne===P)?I=await Le(P,h):I[Object.keys(P)[0]]=await Le((Be=Object.values(P))==null?void 0:Be[0],h,Pe)});await Promise.all(H)}else I=await Le("/",h);let W=!1;(ve=(Ge=Q==null?void 0:Q.extraValues)==null?void 0:Ge.output)==null||ve.forEach(H=>{var P,Be;(Be=(P=Object.values(H))==null?void 0:P[0])!=null&&Be.includes(".doc")&&(W=!0)});let w;if(W){const H=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(Q.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else w=await v.axios.post(Q.api,I,{headers:{"Content-Type":"application/json"}});let S=(de=(pe=(Y=(F=v.cloneDeep(Q))==null?void 0:F.extraValues)==null?void 0:Y.output)==null?void 0:pe.map(H=>{var P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot;if(!((Be=(P=Object.values(H))==null?void 0:P[0])!=null&&Be.includes(".doc"))){let $e=(U=(Ne=(Te=(G=v.cloneDeep((ne=Object.values(H))==null?void 0:ne[0]))==null?void 0:G.split("["))==null?void 0:Te[((xe=(ce=v.cloneDeep((ae=Object.values(H))==null?void 0:ae[0]))==null?void 0:ce.split("["))==null?void 0:xe.length)-1])==null?void 0:Ne.split("]"))==null?void 0:U[0],ht=$e==null?void 0:$e.split(":"),et=(je=v.cloneDeep((Oe=Object.values(H))==null?void 0:Oe[0]))==null?void 0:je.substring(0,v.cloneDeep((me=Object.values(H))==null?void 0:me[0]).lastIndexOf("["));if(et=(qe=v.cloneDeep(et))==null?void 0:qe.slice(0,((lt=v.cloneDeep(et))==null?void 0:lt.length)-1),et!=null&&et.includes("[")){let ze="";if((ot=Ve.contentTransArrayToAll(et,"/"))==null||ot.forEach(he=>{var Ae,mt,ke,Ee,be,Se,B;if(!(he!=null&&he.includes("[")))ze=ze===""?ze+he.replaceAll("/",""):ze+"/"+he.replaceAll("/","");else{let Ie=v.cloneDeep(he).slice(1,((Ae=v.cloneDeep(he))==null?void 0:Ae.length)-1),tt=(Se=(be=(Ee=(ke=(mt=v.cloneDeep(Ie))==null?void 0:mt.split("["))==null?void 0:ke[1])==null?void 0:Ee.split("]"))==null?void 0:be[0])==null?void 0:Se.split(":"),Fe="",Xe=(B=h==null?void 0:h.find(Me=>(Me==null?void 0:Me.name)===(tt==null?void 0:tt[0])))==null?void 0:B.compData;Xe==null||Xe.forEach(Me=>{var dt;(Me==null?void 0:Me.key)==="formContent"&&((dt=Me==null?void 0:Me.contents)==null||dt.forEach(ut=>{(ut==null?void 0:ut.key)===(tt==null?void 0:tt[1])&&(Fe=ut==null?void 0:ut.value)}))}),ze=ze===""?ze+Fe.replaceAll("/",""):ze+"/"+Fe.replaceAll("/","")}}),et=ze,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:de.filter(H=>H);S=[...new Set(v.cloneDeep(S))];let q=S==null?void 0:S.map(async H=>{let P=await Ve.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);if((P==null?void 0:P.length)===0)return await Ve.getParentContents(H)});await Promise.all(q);let z=[],ue=(te=(oe=(Z=v.cloneDeep(Q))==null?void 0:Z.extraValues)==null?void 0:oe.output)==null?void 0:te.map(async H=>{var Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt,ke,Ee,be,Se,B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa,wt,Zt,yt,fn,Mt,ca,Ea,oa,ma,Qt;if((Ne=(Te=Object.values(H))==null?void 0:Te[0])!=null&&Ne.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Be=w.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ne.exec(Be),ae=G==null?void 0:G[1],ce=document.createElement("a"),xe=window.URL.createObjectURL(P);b.value=[{name:ae,blobUrl:xe}],u.value=!0}else{let La=($e=(ot=(qe=(Oe=v.cloneDeep((U=Object.values(H))==null?void 0:U[0]))==null?void 0:Oe.split("["))==null?void 0:qe[((lt=(je=v.cloneDeep((me=Object.values(H))==null?void 0:me[0]))==null?void 0:je.split("["))==null?void 0:lt.length)-1])==null?void 0:ot.split("]"))==null?void 0:$e[0],Tt=La==null?void 0:La.split(":"),qt=(ze=v.cloneDeep((ht=Object.values(H))==null?void 0:ht[0]))==null?void 0:ze.substring(0,v.cloneDeep((et=Object.values(H))==null?void 0:et[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ae=v.cloneDeep(qt))==null?void 0:Ae.slice(0,((he=v.cloneDeep(qt))==null?void 0:he.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(mt=Ve.contentTransArrayToAll(qt,"/"))==null||mt.forEach((At,Ut)=>{var Wt,Rt,ua,la,za,Ya,Fa,Ja,Sn,rn,vn;if(!(At!=null&&At.includes("[")))Et=Et===""?Et+At.replaceAll("/",""):Et+"/"+At.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(At))!=null&&Wt.includes("]")?(ln=v.cloneDeep(At).slice(1,((Rt=v.cloneDeep(At))==null?void 0:Rt.length)-1),va=(Fa=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:Fa.split(":")):(ln=v.cloneDeep(At).slice(1,(Ja=v.cloneDeep(At))==null?void 0:Ja.length),va=(Sn=v.cloneDeep(ln))==null?void 0:Sn.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Tn;(ia==null?void 0:ia.key)==="formContent"&&((Tn=ia==null?void 0:ia.contents)==null||Tn.forEach(Ra=>{(Ra==null?void 0:Ra.key)===(va==null?void 0:va[1])&&(Za=Ra==null?void 0:Ra.value)}))}),((vn=Ve.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(ke=D.value)!=null&&ke.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((Ee=Object.keys(H))==null?void 0:Ee[0]);if(((be=w==null?void 0:w.data)==null?void 0:be.statusCode)===200||((Se=w==null?void 0:w.data)==null?void 0:Se.code)===200){if(((Ie=(B=w==null?void 0:w.data)==null?void 0:B.data)!=null&&Ie[ra]||(Fe=(tt=w==null?void 0:w.data)==null?void 0:tt.result)!=null&&Fe[ra])&&(Tt==null?void 0:Tt.length)===1)return await ee(((Me=(Xe=w==null?void 0:w.data)==null?void 0:Xe.data)==null?void 0:Me[ra])||((ut=(dt=w==null?void 0:w.data)==null?void 0:dt.result)==null?void 0:ut[ra]),v.cloneDeep(qt),Tt,C);if((vt=(st=w==null?void 0:w.data)==null?void 0:st.data)!=null&&vt[ra]||(Nt=(bt=w==null?void 0:w.data)==null?void 0:bt.result)!=null&&Nt[ra]){let Et=await We(((Vt=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:Vt[ra])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[ra]),v.cloneDeep(qt),Tt);return Et&&(z=[...z,...Et]),Et}else{if(!((xt=w==null?void 0:w.data)!=null&&xt.data)){let Et=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(Tt==null?void 0:Tt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Rt=>{var ua;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(ua=Rt.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(Tt==null?void 0:Tt[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Rt})),Ut});let At=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Rt in Ut)Rt!=="id"&&(Wt[Rt]=Ut[Rt]);At.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(At==null?void 0:At.length)>0&&await v.batchUpdateInsofDataApi({dataList:At});return}if((Tt==null?void 0:Tt.length)===1){const Et=(Va=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Va.path;let At="";(ja=(Da=(Ka=(Oa=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Oa.split(")"))==null?void 0:Ka[0])==null?void 0:Da.split(":"))==null||ja.forEach(Rt=>{var ua,la;At=At===""?At+((ua=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:ua.trim()):At+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Ma=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Ma.data)!=null&&ba[Tt==null?void 0:Tt[0]]?Wt=await ee((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[Tt==null?void 0:Tt[0]],At,Tt,C):Wt=await _e((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,At,Ut,Pe),Wt}else{const Et=(Zt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Zt.path;let At="";return(Ea=(ca=(Mt=(fn=(yt=Et==null?void 0:Et.split("("))==null?void 0:yt[1])==null?void 0:fn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Rt,ua;At=At===""?At+((Rt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Rt.trim()):At+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await We((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[Tt==null?void 0:Tt[0]],At,Tt)}}}}});if(await Promise.all(ue),(z==null?void 0:z.length)>0){let H=[];z==null||z.forEach(ne=>{H!=null&&H.find(G=>{var ae,ce,xe,Te;return((ce=(ae=G==null?void 0:G.value)==null?void 0:ae.pageData)==null?void 0:ce.name)===((Te=(xe=ne==null?void 0:ne.value)==null?void 0:xe.pageData)==null?void 0:Te.name)})||H.push(ne)});let P=[];H==null||H.forEach(ne=>{var ce,xe,Te,Ne;let G=v.cloneDeep(ne);G.value.pageData.compData=(ce=G.value.pageData.compData)==null?void 0:ce.map(U=>{var Oe;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Oe=U.contents)==null?void 0:Oe.map(me=>{var lt,qe,ot,$e;let je=(lt=v.cloneDeep(z))==null?void 0:lt.find(ht=>(ht==null?void 0:ht.keyType)===(me==null?void 0:me.key));if(je){let ht=($e=(ot=(qe=je.value.pageData.compData)==null?void 0:qe.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:ot.contents)==null?void 0:$e.find(et=>(et==null?void 0:et.key)===(me==null?void 0:me.key));me.value=ht==null?void 0:ht.value}return me})),U}),P.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ae=[];(Ne=(Te=(xe=G==null?void 0:G.value)==null?void 0:xe.pageData)==null?void 0:Te.compData)==null||Ne.forEach(U=>{var Oe;(U==null?void 0:U.key)==="formContent"&&((Oe=U==null?void 0:U.contents)==null||Oe.forEach(me=>{var je,lt,qe,ot,$e,ht;if((lt=(je=me==null?void 0:me.optionUrl)==null?void 0:je.menuSelect)!=null&&lt.find(et=>et==null?void 0:et.includes("[")))if(ae!=null&&ae.find(et=>{var ze,he,Ae;return((ze=et==null?void 0:et.key)==null?void 0:ze.join(","))===((Ae=(he=me==null?void 0:me.optionUrl)==null?void 0:he.menuSelect)==null?void 0:Ae.join(","))})){let et=(qe=ae==null?void 0:ae.find(ze=>{var he,Ae,mt;return((he=ze==null?void 0:ze.key)==null?void 0:he.join(","))===((mt=(Ae=me==null?void 0:me.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:mt.join(","))}))==null?void 0:qe.value;et.push({key:me==null?void 0:me.prop,groups:(ot=me==null?void 0:me.optionUrl)==null?void 0:ot.groupSelect,value:me==null?void 0:me.value}),ae=ae==null?void 0:ae.map(ze=>{var he,Ae,mt;return((he=ze==null?void 0:ze.key)==null?void 0:he.join(","))===((mt=(Ae=me==null?void 0:me.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:mt.join(","))&&(ze.value=et),ze})}else ae.push({key:($e=me==null?void 0:me.optionUrl)==null?void 0:$e.menuSelect,value:[{key:me==null?void 0:me.prop,groups:(ht=me==null?void 0:me.optionUrl)==null?void 0:ht.groupSelect,value:me==null?void 0:me.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(U=>{var me;let Oe="";return(me=U==null?void 0:U.key)==null||me.forEach(je=>{var lt;if(!(je!=null&&je.includes("[")))Oe=Oe===""?Oe+je:Oe+"/"+je;else{let qe="",ot=(lt=je==null?void 0:je.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":");h==null||h.forEach($e=>{var ht;($e==null?void 0:$e.name)===(ot==null?void 0:ot[0])&&((ht=$e==null?void 0:$e.compData)==null||ht.forEach(et=>{var ze;(et==null?void 0:et.key)==="formContent"&&((ze=et==null?void 0:et.contents)==null||ze.forEach(he=>{(he==null?void 0:he.prop)===(ot==null?void 0:ot[1])&&(qe=he==null?void 0:he.value)}))}))}),Oe=Oe+r.value+qe}}),U.key=Oe,U})),ae==null||ae.forEach(U=>{var lt,qe,ot;let Oe=(lt=Pe[U.key])==null?void 0:lt.find($e=>{var ht,et,ze,he,Ae,mt,ke;return((et=(ht=$e==null?void 0:$e.value)==null?void 0:ht.pageData)==null?void 0:et.name)===((Ae=(he=(ze=U==null?void 0:U.value)==null?void 0:ze[0])==null?void 0:he.groups)==null?void 0:Ae[0])&&((ke=(mt=$e==null?void 0:$e.value)==null?void 0:mt.pageData)==null?void 0:ke.name)!==void 0}),me=Oe==null?void 0:Oe.id,je=(qe=Oe==null?void 0:Oe.value)==null?void 0:qe.pageData;je.compData=(ot=je.compData)==null?void 0:ot.map($e=>{var ht;return($e==null?void 0:$e.key)==="formContent"&&($e.contents=(ht=$e.contents)==null?void 0:ht.map(et=>{var he;let ze=(he=U.value)==null?void 0:he.find(Ae=>(Ae==null?void 0:Ae.key)===(et==null?void 0:et.prop));return ze&&(et.value=ze.value),et})),$e}),P.push({id:me,value:{pageData:je}})})});let Be=(ie=v.cloneDeep(z))==null?void 0:ie[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}E.value=!0},fe=["createInsofDataApi"],Je=vo(async Q=>{se(Q)},100),at=async Q=>{var Ge,ve,F,Y,pe;const L=v.cloneDeep(Q);let ye,De=new WeakMap,Ke=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(ve=(Ge=Ke.data.result)==null?void 0:Ge.filter(de=>{var Z,oe;return((Z=de==null?void 0:de.key)==null?void 0:Z.pageKey)!=="menu"&&((oe=de==null?void 0:de.key)==null?void 0:oe.pageKey)!=="secret"}))==null||ve.forEach(de=>{De[de.key.pageKey]?De[de.key.pageKey]=[...De[de.key.pageKey],de]:De[de.key.pageKey]=[de]}),Q!=null&&Q[0].path&&(ye=await(L==null?void 0:L.map(async(de,Z)=>{var I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te;const te=(I=De[de==null?void 0:de.path])==null?void 0:I.filter(Ne=>{var U;return((U=Ne==null?void 0:Ne.key)==null?void 0:U.type)==="data"});let ie="";const Pe=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,De);te==null||te.forEach(Ne=>{var U,Oe,me,je,lt;((Oe=(U=Ne==null?void 0:Ne.value)==null?void 0:U.tableData)==null?void 0:Oe.算法名称)===((me=L==null?void 0:L[Z])==null?void 0:me.method)&&(ie=(lt=(je=Ne==null?void 0:Ne.value)==null?void 0:je.tableData)==null?void 0:lt.算法体)});const nt=await Ve.getItemData(de==null?void 0:de.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,De);let h="",C=(q=(S=(w=(W=nt==null?void 0:nt[0])==null?void 0:W.compData)==null?void 0:w.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Ne=>(Ne==null?void 0:Ne.prop)==="算法体");return(ue=(z=nt==null?void 0:nt[0])==null?void 0:z.compData)==null||ue.forEach(Ne=>{var U;(Ne==null?void 0:Ne.key)==="tableContents"&&((U=Ne==null?void 0:Ne.contents)==null||U.forEach(Oe=>{Oe!=null&&Oe.find(me=>me===(de==null?void 0:de.method))&&(h=Oe[C])}))}),{buttonName:((H=L==null?void 0:L[Z])==null?void 0:H.method)||((ne=(Be=(P=te==null?void 0:te[0])==null?void 0:P.value)==null?void 0:Be.tableData)==null?void 0:ne.算法名称),api:(ie===""?(ce=(ae=(G=te==null?void 0:te[0])==null?void 0:G.value)==null?void 0:ae.tableData)==null?void 0:ce.算法体:ie)||h,content:Pe==null?void 0:Pe.filter(Ne=>Ne.comp!=="methodButton"),extraContent:(xe=v.cloneDeep(de.value))==null?void 0:xe.slice(1),methodName:(de==null?void 0:de.path)??"",extraValues:(Te=L==null?void 0:L[Z])==null?void 0:Te.data}})));const Re=L==null?void 0:L.map(async de=>{var nt,h,C,I,W,w;const Z=(nt=Ke.data.result)==null?void 0:nt.filter(S=>{var q,z,ue;return((q=S==null?void 0:S.key)==null?void 0:q.parentTable)===""&&((z=S==null?void 0:S.key)==null?void 0:z.type)==="method"&&((ue=S==null?void 0:S.key)==null?void 0:ue.methodName)===S.method}),oe=Z==null?void 0:Z[0],te=(h=Ke.data.result)==null?void 0:h.filter(S=>{var q,z;return((q=S==null?void 0:S.key)==null?void 0:q.type)==="methodData"&&((z=S==null?void 0:S.key)==null?void 0:z.tableId)===(oe==null?void 0:oe.id)}),ie=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,De),Pe=te==null?void 0:te[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(W=(I=Pe==null?void 0:Pe.value)==null?void 0:I.tableData)==null?void 0:W[0],content:ie==null?void 0:ie.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(de.value))==null?void 0:w.slice(1),methodName:(de==null?void 0:de.method)??""}}),Qe=(F=Q==null?void 0:Q[0])!=null&&F.path&&((Y=Q==null?void 0:Q[0])==null?void 0:Y.path)!==""?await Promise.all(ye):await Promise.all(Re);i.value=Qe==null?void 0:Qe.filter(de=>de==null?void 0:de.extraContent),(pe=i.value)==null||pe.forEach(de=>{var Z;de.api===""&&((Z=de.content)==null||Z.forEach(oe=>{var te;oe.comp=="Table"&&x.setExtraContents(Ve.methodTableToContent(oe.compData,(te=de.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!E.value&&await at(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Q,L)=>{var ye,De,Ke;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=i.value)==null?void 0:ye.filter(Re=>(Re==null?void 0:Re.buttonName)!=="保存"),Re=>{var Qe;return e.openBlock(),e.createElementBlock("div",null,[Re.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Qe=Re==null?void 0:Re.buttonName)!=null&&Qe.includes("预览")),class:"calculator-content",modelValue:Re.buttonName,onClickTrigger:Ge=>e.unref(Je)(Re),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(we)!==""&&((Ke=e.unref(D))==null?void 0:Ke[((De=e.unref(D))==null?void 0:De.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ge,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Ye},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=zt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=zt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=X=>{var K;x.value=v.cloneDeep(X),r("change",(K=O())==null?void 0:K.compData)},J=X=>{var K,le;if((X==null?void 0:X.buttonName)==="确认"){const D=v.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(le=O())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},M=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},we=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>M("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>M("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:we,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=zt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var O,R;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(O,R)=>{d.value=R,r("clickStep",O,R)},g=O=>St.getComponent(O),f=()=>{var R;const O=(R=s==null?void 0:s.stepList)==null?void 0:R.find((J,M)=>M+1===u.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},x=O=>{r("clickTrigger",O)},_=O=>{r("changeTrigger",O)};return(O,R)=>{var we,X,K,le,D;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(we=n.stepConfig)==null?void 0:we.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(J,{key:y,class:"step-item",onClick:N=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":N=>$.value=N,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(O.$slots,(N,E)=>({name:E,fn:e.withCtx(ge=>[e.renderSlot(O.$slots,E,e.mergeProps({ref_for:!0},ge||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=zt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=zt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=zt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=zt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.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}}}),Oc={class:"type-select"},Mc=["onClick"],Lc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",Lc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=zt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=J=>{var we;let M=(we=v.cloneDeep(b.value))==null?void 0:we.map((X,K)=>(J===K&&(X.content=!0),X));b.value=M},f=J=>{var we;let M=(we=v.cloneDeep(b.value))==null?void 0:we.map((X,K)=>(J===K&&(X.content=!1),X));b.value=M,d.value=v.cloneDeep(s.value)},x=(J,M)=>{var le;let we=(le=v.cloneDeep(b.value))==null?void 0:le.map((D,$)=>(J===$&&(D.content=!1),D));b.value=we;const X=v.cloneDeep(s.value),K=X==null?void 0:X.filter((D,$)=>($===J&&(D.name=M),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var J,M,we;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(M=v.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,b.value=(we=v.cloneDeep(u.value))==null?void 0:we.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),O=(J,M,we)=>{var K,le;if(!J)return;let X=v.cloneDeep(s.value);X=(K=X==null?void 0:X.map((D,$)=>($===we&&(D.compData=J),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(le=v.cloneDeep(X))==null?void 0:le.map((D,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},R=J=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=v.cloneDeep(s.value),we=M==null?void 0:M.filter((X,K)=>K!==J);i.setOriginalData(we),i.setItemData(we),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const we=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:K})=>{var le,D,$,y,N,E,ge,Ye,it,Le;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(D=(le=b.value)==null?void 0:le.find(We=>We.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(y=($=b.value)==null?void 0:$.find(We=>We.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(St._sfc_main$2,{modelValue:X.name,"onUpdate:modelValue":We=>X.name=We,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(N=b.value)==null?void 0:N.find(We=>We.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Ye=(ge=b.value)==null?void 0:ge.find(We=>We.id===K))!=null&&Ye.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(we,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(we,{name:"Save",onClick:e.withModifiers(We=>x(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Le=(it=b.value)==null?void 0:it.find(We=>We.id===K))!=null&&Le.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>R(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:X,index:K})=>{var le,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(D=(le=u.value)==null?void 0:le.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>O($,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=zt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=zt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),R=e.ref(null),J=Qn(v.pinia),{itemData:M}=v.storeToRefs(J),we=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Q=>{b.value="修改标签页",g.value.title=d.value[Q].title,f.value=Q,u.value=!0},K=Q=>{const L=$(Q);O.value.delete(L),d.value.splice(Q,1),at()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(Q)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,at()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Q=>{const L=d.value[Q];return L.id||(L.id=D()),L.id},y=Q=>{var De;_.value=Q;const L=$(Q);R.value=v.cloneDeep(M.value);let ye=O.value.get(L);!ye&&((De=d.value[Q].children)==null?void 0:De.length)>0&&(ye=Ye(d.value[Q].children)),ye?J.setItemData(v.cloneDeep(ye)):J.setItemData([]),x.value=!0},N=e.computed(()=>{const Q=$t.useModelComp(v.pinia),L=v.storeToRefs(Q).itemData.value;return console.log("可用组件数据",L),!L||!Array.isArray(L)?[]:L.filter(ye=>{var De;if(ye.comp==="Tabs"&&_.value>=0){const Ke=$(_.value);if((De=ye.compData)==null?void 0:De.some(Qe=>{var Ge;return Qe.key==="stepList"&&((Ge=Qe.contents)==null?void 0:Ge.some(ve=>ve.id===Ke))}))return!1}return!0})}),E=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,ge=Q=>{var L;try{const ye=v.cloneDeep(Q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((L=ye.compData)==null||L.forEach(Ke=>{Ke.key==="stepList"&&Ke.contents&&Ke.contents.forEach(Re=>{Re.id=D()})}));const De=v.cloneDeep(M.value);De.push(ye),J.setItemData(De)}catch(ye){console.error("添加组件失败:",ye)}},Ye=Q=>Q.map(L=>{var ye;switch(L.type){case"form":return{comp:"Form",name:L.value||"表单",compData:it(L.content)};case"table":return{comp:"Table",name:L.value||"表格",compData:Le(L.content)};default:return{comp:"Unknown",name:L.value||"",compData:((ye=L.content)==null?void 0:ye.originalData)||[]}}}),it=Q=>{if(!Q)return[];const L=[];return Q.rowContents&&L.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&L.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&L.push({key:"enableWrap",contents:Q.isEnableWrap}),L},Le=Q=>[],We=()=>{if(_.value>=0&&_.value<d.value.length){const Q=$(_.value);O.value.set(Q,v.cloneDeep(M.value)),d.value[_.value].children=ee(M.value),console.log("保存后的数据",ee(M.value))}x.value=!1,_.value=-1,R.value=null,at()},_e=()=>{R.value&&J.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},V=()=>{x.value&&_e()},ee=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((L,ye)=>{if(!L||typeof L!="object")return L;const{comp:De,name:Ke,compData:Re}=L;switch(De){case"Form":return{type:"form",content:se(Re||[]),value:"表单"};case"Table":return{type:"table",content:fe(Re||[]),value:"表格"};default:return{type:"xxx",content:Je(Re||[]),value:""}}})},se=Q=>{const L={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((De,Ke)=>{if(!De||typeof De!="object"){console.warn(`Invalid config at index ${Ke}:`,De);return}const{key:Re,contents:Qe}=De,Ge=ye[Re];if(!Ge){console.warn(`Unknown Form config key: ${Re}`);return}Re==="enableWrap"?L[Ge]=!!Qe:L[Ge]=Array.isArray(Qe)?Qe:[]}),L},fe=Q=>{const L={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return Q.forEach((De,Ke)=>{if(!De||typeof De!="object"){console.warn(`Invalid config at index ${Ke}:`,De);return}const{key:Re,contents:Qe}=De,Ge=ye[Re];if(!Ge){console.warn(`Unknown Table config key: ${Re}`);return}L[Ge]=Array.isArray(Qe)?Qe:[]}),L},Je=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),at=()=>{const Q=[{key:"stepList",contents:d.value}];r("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const L=Q.find(ye=>ye.key==="stepList");L&&L.contents&&(d.value=L.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||D()})))}},{immediate:!0,deep:!0}),(Q,L)=>{const ye=e.resolveComponent("svg-icon"),De=e.resolveComponent("el-input"),Ke=e.resolveComponent("el-form-item"),Re=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[L[6]||(L[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:we},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),L[5]||(L[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Qe,Ge)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ge},[e.createElementVNode("span",nu,e.toDisplayString(Qe.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:ve=>X(Ge)},"修改标题",8,ru),e.createElementVNode("button",{onClick:ve=>y(Ge)},"布局调整",8,lu),e.createElementVNode("button",{onClick:ve=>K(Ge)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":L[2]||(L[2]=Qe=>u.value=Qe),title:b.value,onBeforeDestroy:L[3]||(L[3]=Qe=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:L[1]||(L[1]=Qe=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Re,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ke,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(De,{modelValue:g.value.title,"onUpdate:modelValue":L[0]||(L[0]=Qe=>g.value.title=Qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":L[4]||(L[4]=Qe=>x.value=Qe),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:_e},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[L[8]||(L[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Qe=>(e.openBlock(),e.createElementBlock("div",{key:Qe.id,class:"component-item",onClick:Ge=>ge(Qe)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Qe.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Qe.name),1)]),L[7]||(L[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=zt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},zo=$t.useMenuState(v.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(O=>{const{name:R}=O;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(O=>{const{key:R}=O;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const R=O==null?void 0:O[0];let J=!1;v.isObject(R)&&(R!=null&&R.id)&&(J=!0);let M=u,we=b;J&&(M=M+1,we=we+1);const X=O==null?void 0:O[M],K=O==null?void 0:O[we];s.push(X),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&zo.activeMenuPath&&(g=await Ve.getItemData(`${zo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Ve.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Ve.getItemData(u,b,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:O}=i||{};return g&&f&&St.isNumber(x)&&St.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:O}):St.isNumber(u)&&St.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const O=[];for(let J=0;J<x.length;J++){const M=x[J],we=_[J];O.push({name:M,value:we})}const R=g({data:O});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=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 i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=zt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},Lu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Z;u.value=b(),(Z=u.value)==null||Z.forEach(oe=>{var ie;const te=oe==null?void 0:oe.prop;oe.value=(ie=g==null?void 0:g.value)==null?void 0:ie[te]}),d.visible=!0},x=Z=>{g.value=Z},_=()=>{var Z;d.visible=!1,r("change",(Z=pe())==null?void 0:Z.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=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:[]}],M=e.ref({}),we=()=>{const Z=R.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=M.value)==null?void 0:Pe[ie]}),oe},X=Z=>{var te;M.value=Z;const oe=we();R.value=oe,r("change",(te=pe())==null?void 0:te.compData)},K=async()=>{const Z=await Ve.getMenusContent(),oe=we();oe==null||oe.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=Z)}),R.value=oe,O.visible=!0,await Qe(M.value.menu),await F(M.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),N=()=>{const Z=D.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=y.value)==null?void 0:Pe[ie]}),oe},E=Z=>{var te;y.value=Z;const oe=N();D.value=oe,r("change",(te=pe())==null?void 0:te.compData)},ge=async()=>{await V();const Z=v.cloneDeep(Ye.value),oe=N();oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=y==null?void 0:y.value)==null?void 0:Pe[ie],ie==="mainKey"&&(te.contents=Z)}),D.value=oe,le.visible=!0},Ye=e.ref([]),it=e.ref([]),Le=e.ref({}),We=e.ref({}),_e=()=>{const{compData:Z}=De.value||{},oe=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="header"}),te=(oe==null?void 0:oe.contents)||[],ie=te==null?void 0:te.filter((I,W)=>{const{label:w}=I;return w!=="操作"}),Pe=ie==null?void 0:ie.findIndex((I,W)=>{const{isMainKey:w}=I;return w});if(Pe<0)return[];const nt=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(nt==null?void 0:nt.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let w=Pe;v.isObject(W)&&(W!=null&&W.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},V=async()=>{const Z=await _e();Ye.value=Z},ee=async Z=>{const oe=sessionStorage.getItem("systemKey");return await Ve.getItemData(Z,oe,"")},se=async Z=>{const oe=Z;it.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return Le.value[ie]=te,{label:ie,value:ie}})},fe=Z=>{const{comp:oe,compData:te}=We.value||{};if(oe==="Table"){let ie=N();ie=ie.filter(Pe=>{const{prop:nt}=Pe;return nt!=="formItems"}),Ge(ie,te),D.value=ie}},Je=async()=>{var te,ie;const Z=(te=y==null?void 0:y.value)==null?void 0:te.mainKey,oe=(ie=M==null?void 0:M.value)==null?void 0:ie.menu;if(Z){const nt=`${oe==null?void 0:oe.join("/")}^${Z}`,h=await ee(nt);await se(h);const C=N();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=it.value)}),D.value=C}};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey},async(Z,oe)=>{Z!=oe&&Z&&await Je()});const at=async Z=>{const oe=Le.value[Z];We.value=oe,await fe()};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&Z&&at(Z)});const Q=async()=>{var oe;await Je();const Z=(oe=y.value)==null?void 0:oe.group;await at(Z)},L=e.ref([]),ye=e.ref({}),De=e.ref({}),Ke=async Z=>{const oe=Z==null?void 0:Z.join("/"),te=sessionStorage.getItem("systemKey");return await Ve.getItemData(oe,te,"")},Re=async Z=>{const oe=await Ke(Z);L.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return ye.value[ie]=te,{label:ie,value:ie}})},Qe=async(Z,oe)=>{await Re(Z);const te=we();te==null||te.forEach(ie=>{(ie==null?void 0:ie.prop)==="group"&&(ie.contents=L.value)}),R.value=te};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.menu},async(Z,oe)=>{const te=Z==null?void 0:Z.join("/"),ie=oe==null?void 0:oe.join("/");te!=ie&&await Qe(Z)});const Ge=(Z,oe)=>{const te=oe==null?void 0:oe.find(h=>{const{key:C}=h;return C==="header"}),ie=(te==null?void 0:te.contents)||[],Pe=ie==null?void 0:ie.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),nt=Pe==null?void 0:Pe.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Z==null||Z.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=nt)})},ve=Z=>{const{comp:oe,compData:te}=De.value||{};if(oe==="Table"){M.value.formItems=[];let ie=we();ie=ie.filter(Pe=>{const{prop:nt}=Pe;return nt!=="formItems"}),Ge(ie,te),R.value=ie}},F=async Z=>{const oe=ye.value[Z];De.value=oe,await ve()};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&F(Z)});const Y=async()=>{var te,ie;const Z=(te=M.value)==null?void 0:te.menu;await Qe(Z);const oe=(ie=M.value)==null?void 0:ie.group;await F(oe)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),de=()=>{d.visible=!1,O.visible=!1,le.visible=!1};return e.onMounted(async()=>{var oe,te,ie;R.value=J(),D.value=$();const Z=s==null?void 0:s.itemContents;g.value=((oe=Z==null?void 0:Z.find(Pe=>Pe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},M.value=((te=Z==null?void 0:Z.find(Pe=>Pe.key==="chartDataConfig"))==null?void 0:te.contents)??{},await Y(),y.value=((ie=Z==null?void 0:Z.find(Pe=>Pe.key==="chartDetailConfig"))==null?void 0:ie.contents)??{},await Q()}),(Z,oe)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[0]||(oe[0]=ie=>f())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[1]||(oe[1]=ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[2]||(oe[2]=ie=>ge())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:de,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:de,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:de,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=zt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Uu=Fn.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,O){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,O)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ve.commonjsGlobal=="object"&&Ve.commonjsGlobal.global===Ve.commonjsGlobal?Ve.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,O){var R=b.URL||b.webkitURL,J=document.createElement("a");_=_||x.name||"download",J.download=_,J.rel="noopener",typeof x=="string"?(J.href=x,J.origin===location.origin?u(J):d(J.href)?r(x,_,O):u(J,J.target="_blank")):(J.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,O){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,O),_);else if(d(x))r(x,_,O);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,O,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,O);var J=x.type==="application/octet-stream",M=/constructor/i.test(b.HTMLElement)||b.safari,we=/CriOS\/[\d]+/.test(navigator.userAgent);if((we||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var D=X.result;D=we?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},X.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,le=K.createObjectURL(x);R?R.location=le:location.href=le,R=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Bh3Dxpbs.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=Tr(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(O=>O!==(b==null?void 0:b[r])),f=r+1,x=eo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(O=>{_.push(O)}),u=_}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=go(f,g,s,r,x),O=[];O.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{O.push(R)}),b=O}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Xt.ssDialog,ssInput:St._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=$t.useMenuState(),b=$t.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),O=e.ref(),{asideMenus:R,menuTriggerType:J,platform:M}=v.storeToRefs(u),{fixMenuStatus:we}=v.storeToRefs(b),X=e.computed(()=>r==null?void 0:r.mode),K=ve=>ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),le=e.computed(()=>{let ve=[...R.value];if((ve==null?void 0:ve.length)===0)return _.push("/"),[];const F=Ye(ve,E.value);return F.isFlag||(ve=F==null?void 0:F.data),ve=ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),ve}),D=async(ve,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ve==null?void 0:ve.path),u.setActiveAsideMenu(ve),ve.isRouter?_.push(ve.path):_.push("/"),s("node-click",ve,F)},$=async ve=>{const F=v.findNodeByPropInTree(le.value,"path",ve);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),we.value?b.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ve):(u.setMenuTriggerType("click"),u.setActiveMenuPath(ve)),ve!=null&&ve.startsWith("/")?_.push(ve):_.push("/"),x.value++},y=ve=>{u.setActiveMenuPath(ve)},N=ve=>{const F=document.documentElement;ve==null||ve.forEach(Y=>{F.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const ve=sessionStorage.getItem("authority");return ve?JSON.parse(ve):[]});e.watch(()=>M.value,ve=>{ve==="browser"?N(yn.browserVerticalMenuClasses):ve==="client"?(N(yn.clientHorizontalMenuClasses),N(yn.clientVerticalMenuClasses)):ve==="three"&&(N(yn.threeHorizontalMenuClasses),N(yn.threeVerticalMenuClasses))},{immediate:!0});const ge=(ve,F)=>{function Y(pe){pe==null||pe.forEach(de=>{var oe,te;const Z=(oe=de==null?void 0:de.path)!=null&&oe.startsWith("/")?(te=de==null?void 0:de.path)==null?void 0:te.substring(1):de==null?void 0:de.path;de.show=F==null?void 0:F.some(ie=>ie==null?void 0:ie.includes(Z)),de.children&&Y(de.children)})}return Y(ve),ve},Ye=(ve,F)=>{if(Array.isArray(F)){const Y=Array.from(new Set(F==null?void 0:F.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:ge(ve,Y),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},it=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Le=ve=>on(ve),We=e.ref({}),_e=e.ref([]),V=e.ref({}),ee=e.ref({}),se=ve=>{switch(ve){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},fe=e.ref({}),Je=ve=>{u.setCacheInputMenu({type:it.type,data:ve}),u.setIsRefreshMenus(!0)},at=async(ve,F,Y)=>{var pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt,ke;if(F==="create"){let Ee=(Y==null?void 0:Y.title)+"(1)",be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(de=(pe=be==null?void 0:be.data)==null?void 0:pe.result)==null?void 0:de[0],B=(Z=Se==null?void 0:Se.value)==null?void 0:Z.pageData;B.compData=(oe=B.compData)==null?void 0:oe.map(Fe=>{var Xe;return(Fe==null?void 0:Fe.key)==="menuContents"&&(Fe.contents=eo(Fe.contents,(Xe=Y==null?void 0:Y.path)==null?void 0:Xe.split("/"),Ee)),Fe}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:B}});let Ie=(ie=(te=Y==null?void 0:Y.path)==null?void 0:te.split("/"))==null?void 0:ie.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}),tt=await Ve.getItemData((h=(nt=(Pe=Y==null?void 0:Y.path)==null?void 0:Pe.split("/"))==null?void 0:nt.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Ie.push(Ee),Ie=Ie==null?void 0:Ie.join("/"),(tt==null?void 0:tt.length)>0){let Fe=tt==null?void 0:tt[0],Xe=(I=(C=Fe==null?void 0:Fe.compData)==null?void 0:C.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:I.contents;if(((W=Xe==null?void 0:Xe[0])==null?void 0:W.directiveLabel)==="#isMain"){let Me=(w=Xe==null?void 0:Xe[0])==null?void 0:w.prop,dt=(q=(S=Fe==null?void 0:Fe.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:q.contents,ut;dt==null||dt.forEach(st=>{var vt,bt;if(st.length===1)((vt=st==null?void 0:st[0])==null?void 0:vt[Me])===(Y==null?void 0:Y.title)&&(ut=st==null?void 0:st[0],ut[Me]=Ee);else{let Nt=(bt=Xe==null?void 0:Xe.filter(_t=>_t!=="操作"))==null?void 0:bt.map(_t=>_t==null?void 0:_t.prop),Pt=st==null?void 0:st.filter(_t=>!(_t!=null&&_t.id)),Vt=Ve.getValueToObjectValue(Pt,Nt);Vt[Me]=Ee,ut=Vt}}),await v.createInsofDataApi({key:{type:"data",pageKey:(H=(ue=(z=Y==null?void 0:Y.path)==null?void 0:z.split("/"))==null?void 0:ue.filter((st,vt)=>{var bt,Nt;return vt!==((Nt=(bt=Y==null?void 0:Y.path)==null?void 0:bt.split("/"))==null?void 0:Nt.length)-1}))==null?void 0:H.join("/"),tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Be=f.value)==null?void 0:Be.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:ut}})}}await Ve.newLoadingConstruct(Y==null?void 0:Y.path,Ie),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((ce=(ae=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ae.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:ce.join("/")),u.setActiveTopMenuPath((Te=(xe=Y==null?void 0:Y.path)==null?void 0:xe.split("/"))==null?void 0:Te[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")O.value=Y;else if(F==="delete"){let Ee=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(U=(Ne=be==null?void 0:be.data)==null?void 0:Ne.result)==null?void 0:U[0],B=(Oe=Se==null?void 0:Se.value)==null?void 0:Oe.pageData;if(B.compData=(me=B.compData)==null?void 0:me.map(Fe=>{var Xe;return(Fe==null?void 0:Fe.key)==="menuContents"&&(Fe.contents=Tr(Fe.contents,(Xe=Y==null?void 0:Y.path)==null?void 0:Xe.split("/"))),Fe}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:B}}),((lt=(je=Ee==null?void 0:Ee.data)==null?void 0:je.result)==null?void 0:lt.length)>0){let Fe=(ot=(qe=Ee==null?void 0:Ee.data)==null?void 0:qe.result)==null?void 0:ot.map(Xe=>Xe==null?void 0:Xe.id);(Fe==null?void 0:Fe.length)>0&&await v.batchDeleteInsofDataApi({ids:Fe})}let Ie=await Ve.getItemData((et=(ht=($e=Y==null?void 0:Y.path)==null?void 0:$e.split("/"))==null?void 0:ht.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:et.join("/"),sessionStorage.getItem("systemKey"),""),tt=[];(Ie==null?void 0:Ie.length)>0&&(Ie==null||Ie.forEach(Fe=>{var Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft;let Xe=(st=(ut=(dt=(Me=Fe==null?void 0:Fe.compData)==null?void 0:Me.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ut[0])==null?void 0:st.prop;((Pt=(Nt=(bt=(vt=Fe==null?void 0:Fe.compData)==null?void 0:vt.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:bt.contents)==null?void 0:Nt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(Vt=Fe==null?void 0:Fe.compData)==null?void 0:Vt.find(xt=>(xt==null?void 0:xt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(xt=>{var Ht,Yt,Ot;(xt==null?void 0:xt.length)>1?(xt==null?void 0:xt[1])===(Y==null?void 0:Y.title)&&tt.push((Ht=xt==null?void 0:xt[0])==null?void 0:Ht.id):((Yt=xt==null?void 0:xt[0])==null?void 0:Yt[Xe])===(Y==null?void 0:Y.title)&&tt.push((Ot=xt==null?void 0:xt[0])==null?void 0:Ot.id)}))})),(tt==null?void 0:tt.length)>0&&await v.batchDeleteInsofDataApi({ids:tt}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((Ae=(he=(ze=Y==null?void 0:Y.path)==null?void 0:ze.split("/"))==null?void 0:he.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:Ae.join("/")),u.setActiveTopMenuPath((ke=(mt=Y==null?void 0:Y.path)==null?void 0:mt.split("/"))==null?void 0:ke[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(ve,F)=>{var nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze;let Y=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(nt=Y==null?void 0:Y.data)==null?void 0:nt.result)==null?void 0:h[0],de=(C=pe==null?void 0:pe.value)==null?void 0:C.pageData;de.compData=(I=de.compData)==null?void 0:I.map(he=>{var Ae,mt;return(he==null?void 0:he.key)==="menuContents"&&(he.contents=go(he.contents,(Ae=F==null?void 0:F.path)==null?void 0:Ae.split("/"),F==null?void 0:F.title,(mt=ve==null?void 0:ve.target)==null?void 0:mt.value)),he}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:de}});let Z=(w=(W=F==null?void 0:F.path)==null?void 0:W.split("/"))==null?void 0:w.filter((he,Ae)=>{var mt,ke;return Ae!==((ke=(mt=F==null?void 0:F.path)==null?void 0:mt.split("/"))==null?void 0:ke.length)-1}),oe=Z==null?void 0:Z.join("/");Z.push((S=ve==null?void 0:ve.target)==null?void 0:S.value),Z=Z==null?void 0:Z.join("/");let te=await Ve.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((P=(H=(ue=(z=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:z.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:ue.contents)==null?void 0:H[0])==null?void 0:P.directiveLabel)==="#isMain"){let he=(ce=(ae=(G=(ne=(Be=te==null?void 0:te[0])==null?void 0:Be.compData)==null?void 0:ne.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:G.contents)==null?void 0:ae[0])==null?void 0:ce.prop,Ae=(Ne=(Te=(xe=te==null?void 0:te[0])==null?void 0:xe.compData)==null?void 0:Te.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:Ne.contents,mt=(je=(me=(Oe=(U=te==null?void 0:te[0])==null?void 0:U.compData)==null?void 0:Oe.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:me.contents)==null?void 0:je.map(Ee=>Ee==null?void 0:Ee.prop),ke;if(Ae==null||Ae.forEach(Ee=>{var Se;let be=Ve.getValueToObjectValue(Ee,mt);(be==null?void 0:be[he])===F.title&&(ke=be,ke[he]=(Se=ve==null?void 0:ve.target)==null?void 0:Se.value)}),ke){let Ee={};for(let Se in ke)Se!=="id"&&(Ee[Se]=ke==null?void 0:ke[Se]);let be=[{id:ke==null?void 0:ke.id,value:{tableData:Ee}}];await v.batchUpdateInsofDataApi({dataList:be})}}let ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Pe=(qe=(lt=ie==null?void 0:ie.data)==null?void 0:lt.result)==null?void 0:qe.map(he=>({id:he==null?void 0:he.id,key:he==null?void 0:he.key}));Pe=Pe==null?void 0:Pe.map(he=>(he.key.pageKey=Z,he)),(Pe==null?void 0:Pe.length)>0&&await v.batchUpdateInsofDataApi({dataList:Pe}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((ht=($e=(ot=F==null?void 0:F.path)==null?void 0:ot.split("/"))==null?void 0:$e.filter((he,Ae)=>{var mt,ke;return Ae!==((ke=(mt=F==null?void 0:F.path)==null?void 0:mt.split("/"))==null?void 0:ke.length)-1}))==null?void 0:ht.join("/")),u.setActiveTopMenuPath((ze=(et=F==null?void 0:F.path)==null?void 0:et.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},L=async(ve,F)=>{it.type=se(F==null?void 0:F.operateType),await at(F,it.type,ve),ee.value=ve,fe.value=F},ye=()=>{it.show=!1},De=ve=>ve==null?void 0:ve.filter(F=>F.allowInherit),Ke=()=>{var Y,pe,de,Z,oe;let ve;it.type==="create"&&(ve=((Y=ee.value)==null?void 0:Y.path)+"/"+V.value[(pe=V.value)==null?void 0:pe.prop]),it.type==="update"&&(ve=(de=ee.value)==null?void 0:de.path);const F={...ee.value,config:De((Z=ee.value)==null?void 0:Z.config),children:[],childMenus:[],title:V.value[(oe=V.value)==null?void 0:oe.prop],path:ve};console.log("clickSubmitForm",fe.value,ee.value,F),Je(F),it.show=!1},Re=ve=>{var Y,pe;const F=(Y=ve==null?void 0:ve.contents)==null?void 0:Y.find(de=>de.key==="formContent");F&&(V.value=(pe=F==null?void 0:F.contents)==null?void 0:pe.reduce((de,Z)=>(de[Z.key]=Z.value,de.prop=Z.key,de),{}))},Qe=e.ref(!1);return{isCollapse:Qe,handleMenuCollapse:()=>{Qe.value=!Qe.value},handleCompChange:Re,dialogForm:We,dialogRenderComps:_e,getComponents:Le,clickSubmitForm:Ke,dialogInfo:it,beforeDialogDestroy:ye,clickMenuIcon:L,mode:X,renderMenuList:le,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:N,fixElement:O,onBlur:Q}}}}e.defineComponent(Ir());const Aa=v.useLoginState(),{loginUserInfo:Vn}=v.storeToRefs(Aa),Lt=$t.useModelComp(v.pinia),Rn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Un,itemExtendData:On}=v.storeToRefs(Lt),jt=$t.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:ft,platform:jp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(jt),ha=Ve.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Ve.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Jt=e.ref(),$o=$t.useAuthorityState(v.pinia),Wn=e.ref(!0),pn=e.ref(0),Hn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=ft.value)!=null&&i.startsWith("/")?(s=ft.value)==null?void 0:s.substring(1):ft.value;return(n==null?void 0:n.includes(to.value))||await ud(n)}),td=()=>{Lt.setItemGridData([]),Lt.setIsEdit("edit"),Lt.setSubmitCurStructure(ft.value!=="/平台管理/菜单管理")},ad=()=>{Lt.setIsEdit("view"),Lt.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),jt.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},Ko=async(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M;try{const we=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),X=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(O=(_=(x=Un.value)==null?void 0:x[ft.value])==null?void 0:_.filter(y=>{var N,E,ge;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i&&((ge=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ge.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):D=(M=(J=(R=Un.value)==null?void 0:R[ft.value])==null?void 0:J.filter(y=>{var N;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i}))==null?void 0:M.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we}),(X==null?void 0:X.length)>0&&await v.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(we){throw new Error(we)}},od=async n=>{var x,_,O,R,J,M,we,X,K,le;jt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return jt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Ro.value)!=null&&$.includes(D))}),d=(x=Ro.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(lo(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(O=en.value)==null?void 0:O.results)==null?void 0:R.length)>0&&((M=(J=en.value)==null?void 0:J.results)!=null&&M.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(we=en.value)==null?void 0:we.results}):(console.log("itemGridData.value",en.value),f.push(await Ko(en.value,"gridLayout")))),On.value)for(const D in On.value)f.push(await Ko((X=On.value)==null?void 0:X[D],"extend",{target:D,compId:(le=(K=On.value)==null?void 0:K[D])==null?void 0:le.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Lt.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),jt.setContentLoading(!1)},qn=n=>on(n),pt=e.ref([]),rd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(ft).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(O=>O==null?void 0:O.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Lt.setTableLoading(!1)}},jo=async n=>{var i,s;try{let r=v.cloneDeep(ft).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Lt.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:ft.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),wn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et;wn.value=null;let r=ft.value;if((d=Jt.value)!=null&&d.compData&&((u=Jt.value)==null?void 0:u.compData)!==ft.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await jo(n):await Ve.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),await Aa.setLogRecordAsync({type:"删除",data:n},ft.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((_=n==null?void 0:n.selectItems)!=null&&_.every(ze=>typeof(ze==null?void 0:ze.id)=="string")){const ze=(O=n==null?void 0:n.selectItems)==null?void 0:O.map(he=>({content:n==null?void 0:n.content,singleContent:he,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await jo(ze)}else{const ze=(R=n==null?void 0:n.selectItems)==null?void 0:R.map(he=>he==null?void 0:he.id);await v.batchDeleteInsofDataApi({ids:ze}),await Aa.setLogRecordAsync({type:"删除",data:ze},ft.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((J=n==null?void 0:n.ocrRows)==null?void 0:J.length)>0){Lt.setTableLoading(n==null?void 0:n.index);const ze=sessionStorage.getItem("systemKey"),he=[],Ae=[];let mt=r,ke=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const Ee=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId}),be=(we=(M=Ee==null?void 0:Ee.data)==null?void 0:M.result)==null?void 0:we[0];(X=be==null?void 0:be.key)!=null&&X.pageKey&&(mt=be.key.pageKey),ke=n==null?void 0:n.parentTableId}for(const Ee of n.ocrRows){const be={};for(const Se in Ee)Se!=="id"&&Se!=="index"&&!(typeof Se=="string"&&Se.startsWith("_"))&&(be[Se]=Ee[Se]);try{const Se=await v.createInsofDataApi({key:{type:i,pageKey:mt,tableId:ke,systemKey:ze},value:{tableData:be}});if(((K=Se==null?void 0:Se.data)==null?void 0:K.code)===200){const B=(le=Se==null?void 0:Se.data)==null?void 0:le.result;he.push({resId:B,compId:n==null?void 0:n.index,data:Ee}),Ae.push(B)}}catch(Se){console.error("OCR数据保存失败:",Se)}}wn.value=he,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(Ae)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:mt,tableId:ke,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),Ae.length>0?v.ElMessage.success(`成功保存 ${Ae.length} 条OCR识别数据`):v.ElMessage.warning("OCR数据保存失败,请重试"),await Aa.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},ft.value)}Lt.setCacheUpdatingData(null),Lt.setTableLoading(!1),Lt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let ze={};for(let Ae in n==null?void 0:n.singleContent)Ae!=="id"&&Ae!=="index"&&(ze[Ae]=n==null?void 0:n.singleContent[Ae]);const he=await Ve.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(ze),n==null?void 0:n.column,n,{param:s});if(wn.value={resId:he,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},(($=(D=n==null?void 0:n.column)==null?void 0:D[0])==null?void 0:$.directiveLabel)==="#isMain"&&((N=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:N.directiveColor)!==!0){let Ae=(Ye=n==null?void 0:n.singleContent)==null?void 0:Ye[(ge=(E=n==null?void 0:n.column)==null?void 0:E[0])==null?void 0:ge.prop],mt=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ke=ft.value+"/"+(Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-3)),Ee=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke}}),be=(Le=(it=mt==null?void 0:mt.data)==null?void 0:it.result)==null?void 0:Le[0],Se=(We=be==null?void 0:be.value)==null?void 0:We.pageData;if(Se.compData=(_e=Se.compData)==null?void 0:_e.map(B=>((B==null?void 0:B.key)==="menuContents"&&(B.contents=eo(B.contents,ke==null?void 0:ke.split("/"),Ae)),B)),await v.updateInsofDataApi({id:be==null?void 0:be.id,value:{pageData:Se}}),((ee=(V=Ee==null?void 0:Ee.data)==null?void 0:V.result)==null?void 0:ee.length)>0)await Ve.newLoadingConstruct(ke,ft.value+"/"+Ae);else{let B=await v.getInsofDataApi({key:{pageKey:ft.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((fe=(se=B==null?void 0:B.data)==null?void 0:se.result)==null?void 0:fe.length)>=1?await Ve.newLoadingCutFirstConstruct(ft.value+"/",ft.value+"/"+Ae):await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+Ae)}jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((at=(Je=ke==null?void 0:ke.split("/"))==null?void 0:Je.filter((B,Ie)=>{var tt;return Ie!==((tt=ke==null?void 0:ke.split("/"))==null?void 0:tt.length)-1}))==null?void 0:at.join("/"))}Lt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((L=(Q=n==null?void 0:n.column)==null?void 0:Q[0])==null?void 0:L.directiveLabel)==="#isMain"&&((De=(ye=n==null?void 0:n.column)==null?void 0:ye[0])==null?void 0:De.directiveColor)!==!0){let ze=(Qe=n==null?void 0:n.singleContent)==null?void 0:Qe[(Re=(Ke=n==null?void 0:n.column)==null?void 0:Ke[0])==null?void 0:Re.prop];if(St.isNumber((Ge=n==null?void 0:n.singleContent)==null?void 0:Ge.id)){let he=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ae=await v.getInsofDataApi({id:(ve=n==null?void 0:n.singleContent)==null?void 0:ve.id}),mt=(te=(de=(pe=(Y=(F=Ae==null?void 0:Ae.data)==null?void 0:F.result)==null?void 0:Y[0])==null?void 0:pe.value)==null?void 0:de.tableData)==null?void 0:te[(oe=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:oe.prop],ke=ft.value+"/"+mt,Ee=(Pe=(ie=he==null?void 0:he.data)==null?void 0:ie.result)==null?void 0:Pe[0],be=(nt=Ee==null?void 0:Ee.value)==null?void 0:nt.pageData;be.compData=(h=be.compData)==null?void 0:h.map(Se=>((Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=go(Se.contents,ke==null?void 0:ke.split("/"),mt,ze)),Se)),await v.updateInsofDataApi({id:Ee==null?void 0:Ee.id,value:{pageData:be}}),jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((I=(C=ke==null?void 0:ke.split("/"))==null?void 0:C.filter((Se,B)=>{var Ie;return B!==((Ie=ke==null?void 0:ke.split("/"))==null?void 0:Ie.length)-1}))==null?void 0:I.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let ze=[],he=[],Ae=((w=(W=n==null?void 0:n.content)==null?void 0:W[0])==null?void 0:w.id)??"",mt=s==null?void 0:s.url,ke="",Ee="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const be=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId});ke=((ue=(z=(q=(S=be==null?void 0:be.data)==null?void 0:S.result)==null?void 0:q[0])==null?void 0:z.key)==null?void 0:ue.tableId)??(n==null?void 0:n.parentTableId),Ee=((ne=(Be=(P=(H=be==null?void 0:be.data)==null?void 0:H.result)==null?void 0:P[0])==null?void 0:Be.key)==null?void 0:ne.pageKey)??""}else if(Ae!==""&&((G=n==null?void 0:n.content)==null?void 0:G.length)>1&&typeof((ce=(ae=n==null?void 0:n.content)==null?void 0:ae[0])==null?void 0:ce.id)!="string"){const be=await v.getInsofDataApi({id:Ae});ke=((U=(Ne=(Te=(xe=be==null?void 0:be.data)==null?void 0:xe.result)==null?void 0:Te[0])==null?void 0:Ne.key)==null?void 0:U.tableId)??"",Ee=((lt=(je=(me=(Oe=be==null?void 0:be.data)==null?void 0:Oe.result)==null?void 0:me[0])==null?void 0:je.key)==null?void 0:lt.pageKey)??""}(qe=n==null?void 0:n.singleContent)==null||qe.forEach(be=>{let Se={};for(let B in be)B!=="id"&&B!=="index"&&(Se[B]=be[B]);typeof(be==null?void 0:be.id)=="number"?ze.push({id:be==null?void 0:be.id,value:{tableData:Se}}):he.push({key:{type:i,pageKey:mt||Ee||ft.value,tableId:ke||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Se}})}),(he==null?void 0:he.length)>0&&await v.batchAddInsofDataApi({dataList:he}),(ze==null?void 0:ze.length)>0&&await v.batchUpdateInsofDataApi({dataList:ze})}else{let ze={},he=(ot=n==null?void 0:n.singleContent)==null?void 0:ot.id;for(let Ae in n==null?void 0:n.singleContent)Ae!=="id"&&Ae!=="index"&&(ze[Ae]=n==null?void 0:n.singleContent[Ae]);await Ve.fixTableContents(i,r,n==null?void 0:n.index,he,sessionStorage.getItem("systemKey"),Object.values(ze),n==null?void 0:n.column,n)}Lt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);Lt.setTableLoading(!1),($e=n==null?void 0:n.column)!=null&&$e.some(ze=>ze==null?void 0:ze.isMainKey),pt.value=await Ve.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(ht=pt.value)==null?void 0:ht.filter(ze=>{var he;return((he=ze==null?void 0:ze.compData)==null?void 0:he.length)>0}),pt.value=(et=pt.value)==null?void 0:et.filter(ze=>(ze==null?void 0:ze.comp)!==""),pt.value=Ve.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Lt.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Rn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ve.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(jt.setActiveMenuPath(null),jt.setActiveMenuPath(i))},Yn=async n=>{pt.value=Ve.getDeepDiffItems(n),Lt.setItemData(pt.value),Lt.setOriginalData(pt.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>R&&(i=i===""?i+O:i+"/"+O)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>R&&(s=s===""?s+O:s+"/"+O)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We;const i=(_=(x=Un.value)==null?void 0:x[n])==null?void 0:_.filter(_e=>{var V;return((V=_e==null?void 0:_e.key)==null?void 0:V.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(O=i==null?void 0:i.find(_e=>{var V,ee,se;return(se=(ee=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:O.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(we=(M=(J=i==null?void 0:i.find(_e=>{var V,ee,se;return(se=(ee=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:we.compId,d=(X=pt.value)==null?void 0:X.find(_e=>(_e==null?void 0:_e.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(_e=>(_e==null?void 0:_e.prop)===u),g=(Ye=(ge=(E=(N=d==null?void 0:d.compData)==null?void 0:N.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(_e=>_e==null?void 0:_e.isMainKey))==null?void 0:Ye.prop,f=(We=(Le=(it=d==null?void 0:d.compData)==null?void 0:it.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Le.contents)==null?void 0:We[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),$t.ElMessageBox.alert(`超时未提交,【${(i=(n=ft.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=ft.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Lt.setLockingPage(ft.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=Un.value)==null?void 0:n[ft.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y;if(((r=Jt.value)==null?void 0:r.compData)===ft.value||((d=Gt.value)==null?void 0:d.length)===0)return;jt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(pe=>{var de,Z;return((de=pe==null?void 0:pe.key)==null?void 0:de.pageKey)!=="menu"&&((Z=pe==null?void 0:pe.key)==null?void 0:Z.pageKey)!=="secret"}))==null||b.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),pt.value=await Ve.getItemData(ft.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Jt.value=(f=pt.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((x=Jt.value)==null?void 0:x.compData)===ft.value){let pe=(_=ft.value)==null?void 0:_.split("/").map(de=>({value:de.trim()}));pe=[...pe,...Gt.value??[]]}else{let pe=(R=(O=Jt.value)==null?void 0:O.compData)==null?void 0:R.split("/").map(de=>({value:de.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let de=await Ve.getItemData((J=Jt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);de=de==null?void 0:de.filter(ie=>{var Pe,nt,h;return Array.isArray(ie==null?void 0:ie.compData)&&((h=(nt=(Pe=ie==null?void 0:ie.compData)==null?void 0:Pe.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:nt.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Z=(le=(K=(X=(we=(M=de==null?void 0:de[0])==null?void 0:M.compData)==null?void 0:we.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"))==null?void 0:le.prop,oe=(N=(y=($=(D=de==null?void 0:de[0])==null?void 0:D.compData)==null?void 0:$.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:y.contents)==null?void 0:N.findIndex(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"),te=(it=(Ye=(ge=(E=de==null?void 0:de[0])==null?void 0:E.compData)==null?void 0:ge.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:Ye.contents)==null?void 0:it.map(ie=>{var Pe;return(ie==null?void 0:ie.length)>1?ie==null?void 0:ie[oe+1]:(Pe=ie==null?void 0:ie[0])==null?void 0:Pe[Z]});if(te=te==null?void 0:te.map(ie=>({label:ie,value:ie})),(Le=Gt.value)==null||Le.length,((_e=(We=Gt.value)==null?void 0:We[0])==null?void 0:_e.value)!==""){let ie=await Ve.getItemData(ft.value+"/"+((ee=(V=Gt.value)==null?void 0:V[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);ie||(await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+((fe=(se=Gt.value)==null?void 0:se[0])==null?void 0:fe.value)),ie=await Ve.getItemData(ft.value+"/"+((at=(Je=Gt.value)==null?void 0:Je[0])==null?void 0:at.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=ie}}(pe==null?void 0:pe.length)>0&&((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)===""&&(pt.value=[])}pt.value=(ye=pt.value)==null?void 0:ye.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!pt.value){let pe=(Re=(Ke=(De=ft.value)==null?void 0:De.split("/"))==null?void 0:Ke.filter((de,Z)=>{var oe,te;return Z!==((te=(oe=ft.value)==null?void 0:oe.split("/"))==null?void 0:te.length)-1}))==null?void 0:Re.join("/");pt.value=await Ve.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Qe=ft.value)==null?void 0:Qe.split("/"))==null?void 0:F[((ve=(Ge=ft.value)==null?void 0:Ge.split("/"))==null?void 0:ve.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:pt.value},ft.value),s!==""&&(pt.value=(Y=pt.value)==null?void 0:Y.map(pe=>{var de;return pe!=null&&pe.isShow&&(pe.compData=(de=pe==null?void 0:pe.compData)==null?void 0:de.map(Z=>{var oe,te,ie,Pe,nt;if((Z==null?void 0:Z.key)==="tableContents"){let h=[],C="";C=(Pe=(ie=(te=(oe=pe==null?void 0:pe.compData)==null?void 0:oe.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:te.contents)==null?void 0:ie[0])==null?void 0:Pe.prop,h=(nt=Z.contents)==null?void 0:nt.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Z.contents=h}return Z})),pe})),pt.value=Ve.getDeepDiffItems(pt.value),jt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[ft.value,Gu.value],async n=>{var u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt;if(!ft.value)return;Lt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Wn.value=!1,Rn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Hn.value=r,s){jt.setContentLoading(!0),sessionStorage.setItem("pageKey",ft.value),ha.setSelectTitle([]),pt.value=await Ve.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=pt.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Jt.value=(O=pt.value)==null?void 0:O.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Jt.value)!=null&&R.compData)){let I=hd(Zu.value,(J=ft.value)==null?void 0:J.split("/")),W=await Ve.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(w=>(w==null?void 0:w.comp)==="")?h=(we=(M=W==null?void 0:W.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:M.compData)==null?void 0:we.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((X=Jt.value)==null?void 0:X.compData)===ft.value){let I=(K=ft.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],W=(D=(le=Jt.value)==null?void 0:le.compData)==null?void 0:D.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Jt.value={compData:ft.value});else{let q=await Ve.getItemData(($=Jt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);q=q==null?void 0:q.filter(P=>{var Be,ne,G;return Array.isArray(P==null?void 0:P.compData)&&((G=(ne=(Be=P==null?void 0:P.compData)==null?void 0:Be.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ne.contents)==null?void 0:G.find(ae=>(ae==null?void 0:ae.directiveLabel)==="#isMain"))});let z=(Ye=(ge=(E=(N=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Ye.prop,ue=(_e=(We=(Le=(it=q==null?void 0:q[0])==null?void 0:it.compData)==null?void 0:Le.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:We.contents)==null?void 0:_e.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),H=(fe=(se=(ee=(V=q==null?void 0:q[0])==null?void 0:V.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:fe.map(P=>{var Be;return(P==null?void 0:P.length)>1?P==null?void 0:P[ue+1]:(Be=P==null?void 0:P[0])==null?void 0:Be[z]});if(H=H==null?void 0:H.map(P=>({label:P,value:P})),((Je=Gt.value)==null?void 0:Je.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:H,parentContent:(at=Jt.value)==null?void 0:at.compData}]),((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)!==""){let P=await Ve.getItemData(ft.value+"/"+((De=(ye=Gt.value)==null?void 0:ye[0])==null?void 0:De.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+((Re=(Ke=Gt.value)==null?void 0:Ke[0])==null?void 0:Re.value)),P=await Ve.getItemData(ft.value+"/"+((Ge=(Qe=Gt.value)==null?void 0:Qe[0])==null?void 0:Ge.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((F=(ve=Gt.value)==null?void 0:ve[0])==null?void 0:F.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Gt.value??[]];let w=(Y=ft.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(I!=null&&I.find(z=>(z==null?void 0:z.value)===(q==null?void 0:q.value))));I=[...I,...S??[]],ha.setSelectTitle(I)}pt.value=(pe=pt.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!pt.value){let I=(Z=(de=s==null?void 0:s.split("/"))==null?void 0:de.filter((W,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Z.join("/");pt.value=await Ve.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(te=s==null?void 0:s.split("/"))==null?void 0:te[((oe=s==null?void 0:s.split("/"))==null?void 0:oe.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:pt.value},ft.value),C!==""&&(pt.value=(ie=pt.value)==null?void 0:ie.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(w=>{var S,q,z,ue,H;if((w==null?void 0:w.key)==="tableContents"){let P=[],Be="";Be=(ue=(z=(q=(S=I==null?void 0:I.compData)==null?void 0:S.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0])==null?void 0:ue.prop,P=(H=w.contents)==null?void 0:H.filter(ne=>(ne==null?void 0:ne[Be])===C||(ne==null?void 0:ne[1])===C),w.contents=P}return w})),I})),pt.value=Ve.getDeepDiffItems(pt.value),await cd(pt.value),Or(),pd(s),yo.value=(Pe=pt.value)==null?void 0:Pe.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Lt.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),Lt.setItemData(pt.value),Lt.setOriginalData(pt.value),Lt.setCurStructureCompIds((nt=pt.value)==null?void 0:nt.map(I=>I==null?void 0:I.id)),Lt.setRefreshCurStructure(!1),jt.setChildMenu(""),jt.setContentLoading(!1),Lt.setTableLoading(!1),Rn.value=!1}else pt.value=[],Rn.value=!1;e.nextTick(()=>{pn.value=pn.value++,Wn.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,O,R,J,M;if(Po.value){let we=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var N,E;return((N=y==null?void 0:y.key)==null?void 0:N.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{we[y.key.pageKey]?we[y.key.pageKey]=[...we[y.key.pageKey],y]:we[y.key.pageKey]=[y]});let K=ft.value;(s=Jt.value)!=null&&s.compData&&((r=Jt.value)==null?void 0:r.compData)!==ft.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(b=ft.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=ft.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=ft.value)==null?void 0:_[0];let D=await Ve.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!pt.value){let y=(R=(O=le==null?void 0:le.split("/"))==null?void 0:O.filter((N,E)=>{var ge;return E!==((ge=le==null?void 0:le.split("/"))==null?void 0:ge.length)-1}))==null?void 0:R.join("/");D=await Ve.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,we),$=(M=le==null?void 0:le.split("/"))==null?void 0:M[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var N;return y!=null&&y.isShow&&(y.compData=(N=y==null?void 0:y.compData)==null?void 0:N.map(E=>{var ge,Ye,it,Le,We;if((E==null?void 0:E.key)==="tableContents"){let _e=[],V="";V=(Le=(it=(Ye=(ge=y==null?void 0:y.compData)==null?void 0:ge.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Ye.contents)==null?void 0:it[0])==null?void 0:Le.prop,_e=(We=E.contents)==null?void 0:We.filter(ee=>(ee==null?void 0:ee[V])===$||(ee==null?void 0:ee[1])===$),E.contents=_e}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=Ve.getDeepDiffItems(D),Lt.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,O;jt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Vn.value)==null?void 0:d.account)||((u=Vn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Vn.value)==null?void 0:b.account)||((g=Vn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(O=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:O.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await Aa.setLogRecordAsync({type:"删除",data:s},ft.value)),jt.setActiveMenuPath(Xu.value),pt.value=null,Lt.setRouteToChildPath(""),jt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&jt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Lr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),zr=(n,i)=>{var f,x,_,O,R;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),b=u===-1?0:u,g=(R=(O=r==null?void 0:r.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=zr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=zr(i);g?(un.index=i,un.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=pt.value)==null?void 0:b[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let O=0;const R=[];if(x=x.map(J=>{const M=J.span;return M?(J.span=Number(M),O=O+J.span):R.push(J),J}),O<24){const J=Math.floor((24-O)/_);R.forEach(M=>{M.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const O=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(M,we)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Wn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(M.comp)),{key:e.unref(pn),compName:M.name,index:(M==null?void 0:M.id)??we,height:(X=u.value)==null?void 0:X.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=zt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{we()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),O=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),J=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="baseConfig"});return N==null?void 0:N.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="children"});return N==null?void 0:N.contents}),we=()=>{var y;d.value=R.value||{},x.value=(M==null?void 0:M.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(N=>{var ge;const{prop:E}=N;return N.value=(ge=J.value)==null?void 0:ge[E],N})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;x.value=(M==null?void 0:M.value)||[],_.value=(y=M.value)==null?void 0:y.map(N=>O(N))},{immediate:!0});const X=(y,N)=>{const E=v.cloneDeep(M==null?void 0:M.value);E[N].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),le=(y,N,E)=>{if(!y)return;const ge=v.cloneDeep(M==null?void 0:M.value);ge[E]&&(ge[E].compData=y,x.value=ge,r("change",$(),!0))},D=y=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let N=v.cloneDeep(M==null?void 0:M.value);N=N==null?void 0:N.filter((E,ge)=>y!==ge),x.value=N,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,N)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[N[1]||(N[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:N[0]||(N[0]=ge=>f(ge))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:ge,index:Ye})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ge.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(it=>D(Ye),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ge,index:Ye})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Ye],key:Ye,isEnableWrap:!0,onChange:it=>X(it,Ye)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ge.comp+"Operate")),{itemContents:ge==null?void 0:ge.compData,originalItemContents:ge.compData,onChange:it=>le(it,ge,Ye)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=zt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Uo;Od&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Md)));function Ld(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function zd(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const Dn=new Set,$r=new WeakMap;function Fd(){Dn.forEach(n=>{n(...$r.get(n))}),Dn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!Dn.has(n)&&(Dn.add(n),Dn.size===1&&Promise.resolve().then(Fd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Cn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Cn(n,i);)i.y--}let d;for(;d=Cn(n,i);)i.y=d.y+d.h;return i}function Kd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Cn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Cn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let O=0,R=_.length;O<R;O++){const J=_[O];J.moved||i.y>J.y&&i.y-J.y>J.h/4||(J.static?n=qo(n,J,i,d):n=qo(n,i,J,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Cn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function jd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,O=x.length;_<O;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(Kd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Yo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var kn={exports:{}},tp=kn.exports,Jo;function ap(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,we(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=we(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&O(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function O(a,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},O(a,t)}function R(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,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},M.apply(this,arguments)}function we(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function $(a){return X(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},N=function(a){return typeof a=="function"},E={window:function(a){return a===le||X(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:N,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&N(a.splice)}};function ge(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 Ye(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var it={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=it.draggable,t.map.drag=it,t.methodDict.drag="draggable",l.actions.drag=it.defaults},listeners:{"interactions:before-action-move":ge,"interactions:action-resume":ge,"interactions:action-move":Ye,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.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):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ge,move:Ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Le=it,We={init:function(a){var t=a;We.document=t.document,We.DocumentFragment=t.DocumentFragment||_e,We.SVGElement=t.SVGElement||_e,We.SVGSVGElement=t.SVGSVGElement||_e,We.SVGElementInstance=t.SVGElementInstance||_e,We.Element=t.Element||_e,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||_e,We.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 _e(){}var V=We,ee={init:function(a){var t=V.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!V.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?V.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=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function fe(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Je(a,t){for(;E.element(a);){if(Q(a,t))return a;a=at(a)}return null}function at(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Q(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var L=function(a){return a.parentNode||a.host};function ye(a,t){for(var o,l=[],c=a;(o=L(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function De(a,t,o){for(;E.element(a);){if(Q(a,t))return!0;if((a=at(a))===o)return Q(a,t)}return!1}function Ke(a){return a.correspondingUseElement||a}function Re(a){var t=a instanceof V.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 Qe(a){var t,o=Re(a);if(!se.isIOS7&&o){var l={x:(t=(t=$(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function Ge(a){for(var t=[];a;)t.push(a),a=at(a);return t}function ve(a){return!!E.string(a)&&(V.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?at(o):a==="self"?t.getRect(o):Je(o,a)}function pe(a,t,o,l){var c=a;return E.string(c)?c=Y(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Qe(c)),c}function de(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Z(a){return!a||"x"in a&&"y"in a||((a=F({},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 oe(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 te(a,t,o){var l=o&&a.options[o];return de(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function ie(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Pe(a)),E.array(a))return a.forEach(function(T){return ie(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];ie(a,m,o,l)}else if(E.object(t))for(var k in t)ie(Pe(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Pe(a){return a.trim().split(/ +/)}var nt=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(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 W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof V.Event||a instanceof V.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function q(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function z(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function ue(a,t,o){var l=t.length>1?P(t):t[0];q(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function H(a){var t=[];return E.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 P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Be(a){if(!a.length)return null;var t=H(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return nt(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ae(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof V.Touch?"touch":"mouse"}function ce(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[Ke(t?t[0]:a.target),Ke(a.currentTarget)]}var xe=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(xe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Te=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Ne=function(a){return Te([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Oe=function(a,t){return a[U(a,t)]},me=function(a){x(o,a);var t=J(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,j=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=j,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=U(p,function(T){var j=T.dropzone,A=T.element;return j===l.dropzone&&A===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(xe);function je(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function lt(a,t){for(var o=function(p,m){for(var k=[],T=0,j=p.interactables.list;T<j.length;T++){var A=j[T];if(A.options.drop.enabled){var re=A.options.drop.accept;if(!(E.element(re)&&re!==m||E.string(re)&&!Q(m,re)||E.func(re)&&!re({dropzone:A,draggableElement:m})))for(var Ce=0,He=A.getAllElements();Ce<He.length;Ce++){var Ue=He[Ce];Ue!==m&&k.push({dropzone:A,element:Ue,rect:A.getRect(Ue)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function qe(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var j=T[k],A=j.dropzone,re=j.element,Ce=j.rect,He=A.dropCheck(t,o,c,p,re,Ce);m.push(He?re:null)}var Ue=function(Ze){for(var ct,rt,gt,Dt=[],It=0;It<Ze.length;It++){var kt=Ze[It],Ct=Ze[ct];if(kt&&It!==ct)if(Ct){var ta=L(kt),Kt=L(Ct);if(ta!==kt.ownerDocument)if(Kt!==kt.ownerDocument)if(ta!==Kt){Dt=Dt.length?Dt:ye(Ct);var da=void 0;if(Ct instanceof V.HTMLElement&&kt instanceof V.SVGElement&&!(kt instanceof V.SVGSVGElement)){if(kt===Kt)continue;da=kt.ownerSVGElement}else da=kt;for(var ya=ye(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var An=[ya[Sa-1],ya[Sa],Dt[Sa]];if(An[0])for(var mn=An[0].lastChild;mn;){if(mn===An[1]){ct=It,Dt=ya;break}if(mn===An[2])break;mn=mn.previousSibling}}else gt=Ct,(parseInt($(rt=kt).getComputedStyle(rt).zIndex,10)||0)>=(parseInt($(gt).getComputedStyle(gt).zIndex,10)||0)&&(ct=It);else ct=It}else ct=It}return ct}(m);return l.activeDrops[Ue]||null}function ot(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new me(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new me(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new me(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new me(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new me(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new me(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function $e(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&je(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function ht(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=lt(t,o.element));var m=l,k=qe(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=ot(o,0,m)}}var et={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Le),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=ie(k.listeners),j=Object.keys(T).reduce(function(re,Ce){return re[/^(enter|leave)/.test(Ce)?"drag".concat(Ce):/^(activate|deactivate|move)/.test(Ce)?"drop".concat(Ce):Ce]=T[Ce],re},{}),A=m.options.drop.listeners;A&&m.off(A),m.on(j),m.options.drop.listeners=j}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,j,A){return function(re,Ce,He,Ue,Ze,ct,rt){var gt=!1;if(!(rt=rt||re.getRect(ct)))return!!re.options.drop.checker&&re.options.drop.checker(Ce,He,gt,re,ct,Ue,Ze);var Dt=re.options.drop.overlap;if(Dt==="pointer"){var It=te(Ue,Ze,"drag"),kt=q(Ce);kt.x+=It.x,kt.y+=It.y;var Ct=kt.x>rt.left&&kt.x<rt.right,ta=kt.y>rt.top&&kt.y<rt.bottom;gt=Ct&&ta}var Kt=Ue.getRect(Ze);if(Kt&&Dt==="center"){var da=Kt.left+Kt.width/2,ya=Kt.top+Kt.height/2;gt=da>=rt.left&&da<=rt.right&&ya>=rt.top&&ya<=rt.bottom}return Kt&&E.number(Dt)&&(gt=Math.max(0,Math.min(rt.right,Kt.right)-Math.max(rt.left,Kt.left))*Math.max(0,Math.min(rt.bottom,Kt.bottom)-Math.max(rt.top,Kt.top))/(Kt.width*Kt.height)>=Dt),re.options.drop.checker&&(gt=re.options.drop.checker(Ce,He,gt,re,ct,Ue,Ze)),gt}(this,p,m,k,T,j,A)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=et.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,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=lt(t,o.element),c.events=ot(o,0,l),c.events.activate&&(je(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":ht,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;$e(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;ht(a,t),$e(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:lt,getDrop:qe,getDropEvents:ot,fireDropEvents:$e,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=et;function he(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,k),o.box=Be(c),o.scale=1,o.ds=0,o.angle=G(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,k),o.box=Be(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Ae={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ae,t.methodDict.gesture="gesturable",l.actions.gesture=Ae.defaults},listeners:{"interactions:action-start":he,"interactions:action-move":he,"interactions:action-end":he,"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}},mt=Ae;function ke(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=k>=0?p.left:p.right;return o.x<j+m}if(a==="top"){var A=T>=0?p.top:p.bottom;return o.y<A+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:De(l,t,c))}function Ee(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var be,Se,B={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;B.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),B.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=B,t.methodDict.resize="resizable",c.actions.resize=B.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),Ee(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,j=T.start,A=T.corrected,re=T.delta,Ce=T.previous;if(F(Ce,A),m){if(F(A,k),p==="reposition"){if(A.top>A.bottom){var He=A.top;A.top=A.bottom,A.bottom=He}if(A.left>A.right){var Ue=A.left;A.left=A.right,A.right=Ue}}}else A.top=Math.min(k.top,j.bottom),A.bottom=Math.max(k.bottom,j.top),A.left=Math.min(k.left,j.right),A.right=Math.max(k.right,j.left);for(var Ze in A.width=A.right-A.left,A.height=A.bottom-A.top,A)re[Ze]=A[Ze]-Ce[Ze];c.edges=l.prepared.edges,c.rect=A,c.deltaRect=re}})(a),Ee(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var j in T)T[j]=ke(j,k.edges[j],m,t._latestPointer.eventTarget,l,c,k.margin||B.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var A=k.axis!=="y"&&m.x>c.right-B.defaultMargin,re=k.axis!=="x"&&m.y>c.bottom-B.defaultMargin;(A||re)&&(a.action={name:"resize",axes:(A?"x":"")+(re?"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,l=a.name,c=B.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var j=T[k];t[j]&&(m+=j)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Ie=B,tt={id:"actions",install:function(a){a.usePlugin(mt),a.usePlugin(Ie),a.usePlugin(Le),a.usePlugin(ze)}},Fe=0,Xe={request:function(a){return be(a)},cancel:function(a){return Se(a)},init:function(a){if(be=a.requestAnimationFrame,Se=a.cancelAnimationFrame,!be)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];be=a["".concat(l,"RequestAnimationFrame")],Se=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}be=be&&be.bind(a),Se=Se&&Se.bind(a),be||(be=function(c){var p=Date.now(),m=Math.max(0,16-(p-Fe)),k=a.setTimeout(function(){c(p+m)},m);return Fe=p+m,k},Se=function(c){return clearTimeout(c)})}},Me={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){Me.isScrolling=!0,Xe.cancel(Me.i),a.autoScroll=Me,Me.interaction=a,Me.prevTime=Me.now(),Me.i=Xe.request(Me.scroll)},stop:function(){Me.isScrolling=!1,Me.interaction&&(Me.interaction.autoScroll=null),Xe.cancel(Me.i)},scroll:function(){var a=Me.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=dt(c.container,t,o),m=Me.now(),k=(m-Me.prevTime)/1e3,T=c.speed*k;if(T>=1){var j={x:Me.x*T,y:Me.y*T};if(j.x||j.y){var A=ut(p);E.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var re=ut(p),Ce={x:re.x-A.x,y:re.y-A.y};(Ce.x||Ce.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ce,interaction:a,container:p})}Me.prevTime=m}Me.isScrolling&&(Xe.cancel(Me.i),Me.i=Xe.request(Me.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Me.check(t.interactable,t.prepared.name))if(t.simulation)Me.x=Me.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,j=t.prepared.name,A=k.options[j].autoScroll,re=dt(A.container,k,T);if(E.window(re))m=o.clientX<Me.margin,l=o.clientY<Me.margin,c=o.clientX>re.innerWidth-Me.margin,p=o.clientY>re.innerHeight-Me.margin;else{var Ce=Re(re);m=o.clientX<Ce.left+Me.margin,l=o.clientY<Ce.top+Me.margin,c=o.clientX>Ce.right-Me.margin,p=o.clientY>Ce.bottom-Me.margin}Me.x=c?1:m?-1:0,Me.y=p?1:l?-1:0,Me.isScrolling||(Me.margin=A.margin,Me.speed=A.speed,Me.start(t))}}};function dt(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function ut(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var st={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Me,Me.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Me.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Me.stop(),Me.interaction&&(Me.interaction=null)},"interactions:stop":Me.stop,"interactions:action-move":function(a){return Me.onInteractionMove(a)}}},vt=st;function bt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Nt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Pt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,j,A,re){var Ce=k.getRect(A),He=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Ue={action:null,interactable:k,interaction:j,element:A,rect:Ce,buttons:He};return re.fire("auto-start:check",Ue),Ue.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=bt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=bt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Pt}};function Ft(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function xt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var j=l[k],A=c[k],re=j.getAction(t,o,a,A);if(re){var Ce=Ft(re,j,A,p,m);if(Ce)return{action:Ce,interactable:j,element:A}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(A){p.push(A),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var j=xt(a,t,o,p,m,l,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;k=at(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Nt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Oa(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,j=0,A=0;if(!(p&&m&&k))return!1;for(var re=0,Ce=l.interactions.list;re<Ce.length;re++){var He=Ce[re],Ue=He.prepared.name;if(He.interacting()&&(++T>=k||He.interactable===a&&((j+=Ue===o.name?1:0)>=p||He.element===t&&(A++,Ue===o.name&&A>=m))))return!1}return k>0}function Va(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Oa(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var Ka={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Va(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Oa(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Va,withinInteractionLimit:Ot,validateAction:Ft},Da=Ka,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,j=T.startAxis,A=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?A[0]:T.lockAxis,A!=="xy"&&j!=="xy"&&j!==A){o.prepared.name=null;for(var re=l,Ce=function(Ue){if(Ue!==o.interactable){var Ze=o.interactable.options.drag;if(!Ze.manualStart&&Ue.testIgnoreAllow(Ze,re,l)){var ct=Ue.getAction(o.downPointer,o.downEvent,o,re);if(ct&&ct.name==="drag"&&function(rt,gt){if(!gt)return!1;var Dt=gt.options.drag.startAxis;return rt==="xy"||Dt==="xy"||Dt===rt}(A,Ue)&&Da.validateAction(ct,Ue,re,l,t))return Ue}}};E.element(re);){var He=t.interactables.forEachMatch(re,Ce);if(He){o.prepared.name="drag",o.interactable=He,o.element=re;break}re=at(re)}}}}}};function Ca(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(Da),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=Ca(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;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(ja)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Ma={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Q(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||fe(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(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 l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=Ne(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(j){var A=j.interactable.options[j.prepared.name],re=A.modifiers;return re&&re.length?re:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ce){var He=A[Ce];return He&&He.enabled&&{options:He,methods:He._methods}}).filter(function(Ce){return!!Ce})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{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,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),j=0;j<k.length;j++){var A,re=k[j],Ce=re.options,He=F({},t.coords),Ue=null;(A=re.methods)!=null&&A.set&&this.shouldDo(Ce,l,o)&&(t.state=re,Ue=re.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-He.x,y:t.coords.y-He.y})),T.eventProps.push(Ue)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Ze=this.result.coords,ct=this.result.rect;if(Ze&&ct){var rt=T.rect.left!==ct.left||T.rect.right!==ct.right||T.rect.top!==ct.top||T.rect.bottom!==ct.bottom;T.changed=rt||Ze.x!==T.coords.x||Ze.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var j=0,A=[[p,k],[c,T]];j<A.length;j++){var re=A[j],Ce=re[0],He=re[1];Ce.page.x+=He.x,Ce.page.y+=He.y,Ce.client.x+=He.x,Ce.client.y+=He.y}var Ue=this.result.rectDelta,Ze=t.rect||o.rect;Ze.left+=Ue.left,Ze.right+=Ue.right,Ze.top+=Ue.top,Ze.bottom+=Ue.bottom,Ze.width=Ze.right-Ze.left,Ze.height=Ze.bottom-Ze.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,j=k.methods,A=j.beforeEnd&&j.beforeEnd(t);if(A)return this.endResult=A,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,j=k.rectDelta,A=0,re=[[l.start,m],[l.cur,T]];A<re.length;A++){var Ce=re[A],He=Ce[0],Ue=Ce[1];He.page.x-=Ue.x,He.page.y-=Ue.y,He.client.x-=Ue.x,He.client.y-=Ue.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="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=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(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,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"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)}}},wt=Xa,Zt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T,j){var A;u(this,o),(A=t.call(this,l)).relatedTarget=null,A.screenX=void 0,A.screenY=void 0,A.button=void 0,A.buttons=void 0,A.ctrlKey=void 0,A.shiftKey=void 0,A.altKey=void 0,A.metaKey=void 0,A.page=void 0,A.client=void 0,A.delta=void 0,A.rect=void 0,A.x0=void 0,A.y0=void 0,A.t0=void 0,A.dt=void 0,A.duration=void 0,A.clientX0=void 0,A.clientY0=void 0,A.velocity=void 0,A.speed=void 0,A.swipe=void 0,A.axes=void 0,A.preEnd=void 0,k=k||l.element;var re=l.interactable,Ce=(re&&re.options||Zt).deltaSource,He=te(re,k,p),Ue=m==="start",Ze=m==="end",ct=Ue?R(A):l.prevEvent,rt=Ue?l.coords.start:Ze?{page:ct.page,client:ct.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return A.page=F({},rt.page),A.client=F({},rt.client),A.rect=F({},l.rect),A.timeStamp=rt.timeStamp,Ze||(A.page.x-=He.x,A.page.y-=He.y,A.client.x-=He.x,A.client.y-=He.y),A.ctrlKey=c.ctrlKey,A.altKey=c.altKey,A.shiftKey=c.shiftKey,A.metaKey=c.metaKey,A.button=c.button,A.buttons=c.buttons,A.target=k,A.currentTarget=k,A.preEnd=T,A.type=j||p+(m||""),A.interactable=re,A.t0=Ue?l.pointers[l.pointers.length-1].downTime:ct.t0,A.x0=l.coords.start.page.x-He.x,A.y0=l.coords.start.page.y-He.y,A.clientX0=l.coords.start.client.x-He.x,A.clientY0=l.coords.start.client.y-He.y,A.delta=Ue||Ze?{x:0,y:0}:{x:A[Ce].x-ct[Ce].x,y:A[Ce].y-ct[Ce].y},A.dt=l.coords.delta.timeStamp,A.duration=A.timeStamp-A.t0,A.velocity=F({},l.coords.velocity[Ce]),A.speed=nt(A.velocity.x,A.velocity.y),A.swipe=Ze||m==="inertiastart"?A.getSwipe():null,A}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(xe);Object.defineProperties(yt.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 fn=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=bt(function(A){this.move(A)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(A){Object.defineProperty(o._proxy,A,{get:function(){return p[A]}})};for(var k in Mt)m(k);var T=function(A){Object.defineProperty(o._proxy,A,{value:function(){return p[A].apply(p,arguments)}})};for(var j in ca)T(j);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Nt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=nt(c,p)>this.pointerMoveTolerance);var k,T,j,A=this.getPointerIndex(t),re={pointer:t,pointerIndex:A,pointerInfo:this.pointers[A],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,j=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/j,k.page.y=T.page.y/j,k.client.x=T.client.x/j,k.client.y=T.client.y/j,k.timeStamp=j),this._scopeFire("interactions:move",re),m||this.simulation||(this.interacting()&&(re.type=null,this.move(re)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=F({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:U(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=z(t),j=this.getPointerIndex(t),A=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),A?A.pointer=t:(A=new fn(T,t,o,null,null),j=this.pointers.length,this.pointers.push(A)),ue(this.coords.cur,this.pointers.map(function(re){return re.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,A.downTime=this.coords.cur.timeStamp,A.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:A,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new yt(this,t,this.prepared.name,o,this.element,l,c)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(oe(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Tt(a.coords.cur,t),Tt(a.coords.delta,t),oe(a.edges,a.rect,t),t.x=0,t.y=0,!0}function La(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 Tt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=La},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&&(Tt(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(Qt(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}}},ra=qt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=At(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=nt(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,l=At(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Xe.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,j=this.interaction,A=At(j).resistance,re=(j._now()-this.t0)/1e3;if(re<this.te){var Ce,He=1-(Math.exp(-A*re)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Ce={x:Wt(k=He,t,l,p),y:Wt(k,o,c,m)}):Ce={x:this.targetOffset.x*He,y:this.targetOffset.y*He};var Ue={x:Ce.x-this.currentOffset.x,y:Ce.y-this.currentOffset.y};this.currentOffset.x+=Ue.x,this.currentOffset.y+=Ue.y,j.offsetBy(Ue),j.move(),this.onNextFrame(function(){return T.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=At(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Xe.cancel(this.timeout)}}]),a}();function At(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=at(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"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 Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=ie(t,o);for(t in l)this.types[t]=Te(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=ie(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Fa(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Sn={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(A,re,Ce,He,Ue){var Ze=Fa(Ue);if(!l[Ce]){l[Ce]=[];for(var ct=0;ct<c.length;ct++){var rt=c[ct];m(rt,Ce,T),m(rt,Ce,j,!0)}}var gt=l[Ce],Dt=Oe(gt,function(It){return It.selector===A&&It.context===re});Dt||(Dt={selector:A,context:re,listeners:[]},gt.push(Dt)),Dt.listeners.push({func:He,options:Ze})},removeDelegate:function(A,re,Ce,He,Ue){var Ze,ct=Fa(Ue),rt=l[Ce],gt=!1;if(rt)for(Ze=rt.length-1;Ze>=0;Ze--){var Dt=rt[Ze];if(Dt.selector===A&&Dt.context===re){for(var It=Dt.listeners,kt=It.length-1;kt>=0;kt--){var Ct=It[kt];if(Ct.func===He&&Ja(Ct.options,ct)){It.splice(kt,1),It.length||(rt.splice(Ze,1),k(re,Ce,T),k(re,Ce,j,!0)),gt=!0;break}}if(gt)break}}},delegateListener:T,delegateUseCapture:j,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(A,re,Ce,He){if(A.addEventListener){var Ue=Fa(He),Ze=Oe(o,function(ct){return ct.eventTarget===A});Ze||(Ze={eventTarget:A,events:{}},o.push(Ze)),Ze.events[re]||(Ze.events[re]=[]),Oe(Ze.events[re],function(ct){return ct.func===Ce&&Ja(ct.options,Ue)})||(A.addEventListener(re,Ce,p.supportsOptions?Ue:Ue.capture),Ze.events[re].push({func:Ce,options:Ue}))}}function k(A,re,Ce,He){if(A.addEventListener&&A.removeEventListener){var Ue=U(o,function(ta){return ta.eventTarget===A}),Ze=o[Ue];if(Ze&&Ze.events)if(re!=="all"){var ct=!1,rt=Ze.events[re];if(rt){if(Ce==="all"){for(var gt=rt.length-1;gt>=0;gt--){var Dt=rt[gt];k(A,re,Dt.func,Dt.options)}return}for(var It=Fa(He),kt=0;kt<rt.length;kt++){var Ct=rt[kt];if(Ct.func===Ce&&Ja(Ct.options,It)){A.removeEventListener(re,Ce,p.supportsOptions?It:It.capture),rt.splice(kt,1),rt.length===0&&(delete Ze.events[re],ct=!0);break}}}ct&&!Object.keys(Ze.events).length&&o.splice(Ue,1)}else for(re in Ze.events)Ze.events.hasOwnProperty(re)&&k(A,re,"all")}}function T(A,re){for(var Ce=Fa(re),He=new Ya(A),Ue=l[A.type],Ze=ce(A)[0],ct=Ze;E.element(ct);){for(var rt=0;rt<Ue.length;rt++){var gt=Ue[rt],Dt=gt.selector,It=gt.context;if(Q(ct,Dt)&&fe(It,Ze)&&fe(It,ct)){var kt=gt.listeners;He.currentTarget=ct;for(var Ct=0;Ct<kt.length;Ct++){var ta=kt[Ct];Ja(ta.options,Ce)&&ta.func(He)}}}ct=at(ct)}}function j(A){return T(A,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=at(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var j=0,A=p.interactions.list;j<A.length;j++){var re=A[j];if(!(re.pointerType!==l||/down/i.test(c)&&re.simulation))return re}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ae(o),p=ce(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,A=o.changedTouches;j<A.length;j++){var re=A[j],Ce={pointer:re,pointerId:z(re),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},He=sn(Ce);T.push([Ce.pointer,Ce.eventTarget,Ce.curEventTarget,He])}}else{var Ue=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ze=0;Ze<l.length&&!Ue;Ze++)Ue=l[Ze].pointerType!=="mouse"&&l[Ze].pointerIsDown;Ue=Ue||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Ue){var ct={pointer:o,pointerId:z(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},rt=sn(ct);T.push([ct.pointer,ct.eventTarget,ct.curEventTarget,rt])}}for(var gt=0;gt<T.length;gt++){var Dt=T[gt],It=Dt[0],kt=Dt[1],Ct=Dt[2];Dt[3][a](It,o,kt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var j=c&&c.events,A=0;A<p.length;A++){var re=p[A];k(o,re.type,re.listener,j)}}var Tn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=se.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var j=T[k];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var A=function(){var He=Ce[re];a.documents.some(function(Ue){return fe(Ue.doc,He.downTarget)})||j.removePointer(He.pointer,He.event)},re=0,Ce=j.pointers;re<Ce.length;re++)A()}}(c=V.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,j=a.interactions.list;T<j.length;T++)j[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(j,k);var T=J(j);function j(){return u(this,j),T.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(A){a.interactions.pointerMoveTolerance=A}},{key:"_now",value:function(){return a.now()}}]),j}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(j,A){return a.fire(j,A)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Ma)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Ra=Tn,Pa=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Pa||{}),ll=function(){function a(t,o,l,c){u(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||l,this._win=$(ve(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Pa.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Pa.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=Ne(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Qe(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ve(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||fe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?De(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?De(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=ie(o,l,p);for(var k in m){k==="wheel"&&(k=se.wheelEvent);for(var T=0,j=m[k];T<j.length;T++){var A=j[T];ba(k,this._actions)?this.events[t===Pa.On?"on":"off"](k,A):E.string(this.target)?this._scopeEvents[t===Pa.On?"addDelegate":"removeDelegate"](this.target,this._context,k,A,c):this._scopeEvents[t===Pa.On?"add":"remove"](this.target,k,A,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Pa.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Pa.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=U(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Oe(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&Q(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=fa(Zt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Be,c.getTouchDistance=ne,c.getTouchAngle=G,c.getElementRect=Qe,c.getElementClientRect=Re,c.matchesSelector=Q,c.closest=Je,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.on(A,m,k)}return this}if(E.object(p)){for(var re in p)this.on(re,p[re],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.off(A,m,k)}return this}if(E.object(p)){for(var re in p)this.off(re,p[re],m);return this}var Ce;return ba(p,this.scope.actions)?p in this.globalEvents&&(Ce=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Ce,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=yt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=J(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return M(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){M(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),V.init(l),se.init(l),Xe.init(l),o.window=l,o.document=l.document,o.usePlugin(Ra),o.usePlugin(Sn),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[xo(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,ea=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,j=T===void 0?{x:0,y:0}:T,A={range:p,grid:a,x:null,y:null},re=0;re<t.length;re++){var Ce=t[re],He=Ce[0],Ue=Ce[1],Ze=Math.round((l-j.x)/a[He]),ct=Math.round((c-j.y)/a[Ue]);A[He]=Math.max(k.left,Math.min(k.right,Ze*a[He]+j.x)),A[Ue]=Math.max(k.top,Math.min(k.bottom,ct*a[Ue]+j.y))}return A};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,j=T.equalDelta,A=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=j;var re=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Ce=(re.left?1:-1)*(re.top?1:-1);t.edgeSign={x:Ce,y:Ce}}else t.edgeSign={x:re.left?-1:1,y:re.top?-1:1};if(k!==!1&&F(l,re),A!=null&&A.length){var He=new _a(a.interaction);He.copyFrom(a.interaction.modification),He.prepareStates(A),t.subModification=He,He.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);oe(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),j=T.delta;return T.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var j=l.height*m;o.x=p.x+(j-c.width)*k.x}}var gl=na(fl,"aspectRatio"),Do=function(){};Do._defaults={};var In=Do;function Qa(a,t,o){return E.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var Bn={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var j=Qa(m.restriction,c,p);if(j){var A=j.right-j.left-t.width,re=j.bottom-j.top-t.height;A<0&&(T.left+=A,T.right+=A),re<0&&(T.top+=re,T.bottom+=re)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(Bn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=de(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},j=Qa(m.outer,l,k)||{};Eo(T,Co),Eo(j,_o),o.top?t.y=Math.min(Math.max(j.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(hn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Bn.defaults),kl=na({start:Bn.start,set:Bn.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Z(Qa(p.min,t,a.coords))||xl,k=Z(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},hn.noInner),outer:F({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,j=T.offsetWithOrigin?function(Ce){var He=Ce.interaction.element,Ue=de(pe(Ce.state.options.origin,null,null,[He])),Ze=Ue||te(Ce.interactable,He,Ce.interaction.prepared.name);return Ze}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var A=pe(T.offset,l,c,[o]);(t=de(A)||{x:0,y:0}).x+=j.x,t.y+=j.y}var re=T.relativePoints;m.offsets=p&&re&&re.length?re.map(function(Ce,He){return{index:He,relativePoint:Ce,x:k.left-p.width*Ce.x+t.x,y:k.top-p.height*Ce.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=te(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var j=0,A=p;j<A.length;j++)for(var re=A[j],Ce=k.x-re.x,He=k.y-re.y,Ue=0,Ze=c.targets.length;Ue<Ze;Ue++){var ct=c.targets[Ue],rt=void 0;(rt=E.func(ct)?ct(Ce,He,t._proxy,re,Ue):ct)&&T.push({x:(E.number(rt.x)?rt.x:Ce)+re.x,y:(E.number(rt.y)?rt.y:He)+re.y,range:E.number(rt.range)?rt.range:c.range,source:ct,index:Ue,offset:re})}for(var gt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var It=T[Dt],kt=It.range,Ct=It.x-k.x,ta=It.y-k.y,Kt=nt(Ct,ta),da=Kt<=kt;kt===1/0&&gt.inRange&&gt.range!==1/0&&(da=!1),gt.target&&!(da?gt.inRange&&kt!==1/0?Kt/kt<gt.distance/gt.range:kt===1/0&&gt.range!==1/0||Kt<gt.distance:!gt.inRange&&Kt<gt.distance)||(gt.target=It,gt.distance=Kt,gt.range=kt,gt.inRange=da,gt.delta.x=Ct,gt.delta.y=ta)}return gt.inRange&&(o.x=gt.target.x,o.y=gt.target.y),l.closest=gt,gt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(ao,"snap"),Nn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var j=T[k],A=void 0;if(A=E.func(j)?j(m.x,m.y,t):j){for(var re=0,Ce=o.targetFields;re<Ce.length;re++){var He=Ce[re],Ue=He[0],Ze=He[1];if(Ue in A||Ze in A){A.x=A[Ue],A.y=A[Ze];break}}o.options.targets.push(A)}}var ct=ao.set(a);return o.options=c,ct},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Nn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Nn.start(a)):null},set:Nn.set,defaults:F(fa(Nn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:In,avoid:In,transform:In,rubberband:In},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T){var j;if(u(this,o),C(R(j=t.call(this,k)),p),p!==c&&C(R(j),c),j.timeStamp=T,j.originalEvent=p,j.type=l,j.pointerId=z(c),j.pointerType=ae(c),j.target=m,j.currentTarget=null,l==="tap"){var A=k.getPointerIndex(c);j.dt=j.timeStamp-k.pointers[A].downTime;var re=j.timeStamp-k.tapTime;j.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===j.target&&re<500}else l==="doubletap"&&(j.dt=c.timeStamp-k.tapTime,j.double=!0);return j}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(xe),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,F(a.actions.phaselessTypes,gn.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,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,j=c.pointers[T].hold,A=Ge(k),re={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:A,node:null},Ce=0;Ce<A.length;Ce++){var He=A[Ce];re.node=He,l.fire("pointerEvents:collect-targets",re)}if(re.targets.length){for(var Ue=1/0,Ze=0,ct=re.targets;Ze<ct.length;Ze++){var rt=ct[Ze].eventable.options.holdDuration;rt<Ue&&(Ue=rt)}j.duration=Ue,j.timeout=setTimeout(function(){$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},Ue)}})(a,t),$a(a,t)},"interactions:up":function(a,t){oo(a),$a(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),$a(a,t)}},PointerEvent:So,fire:$a,collectEventTargets:To,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,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?To(a,t):k,j=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var A={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:j},re=0;re<T.length;re++){var Ce=T[re];for(var He in Ce.props||{})j[He]=Ce.props[He];var Ue=te(Ce.eventable,Ce.node);if(j._subtractOrigin(Ue),j.eventable=Ce.eventable,j.currentTarget=Ce.node,Ce.eventable.fire(j),j._addOrigin(Ue),j.immediatePropagationStopped||j.propagationStopped&&re+1<T.length&&T[re+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",A),m==="tap"){var Ze=j.double?$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=Ze,o.tapTime=Ze.timeStamp}return j}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var j=Ge(p),A={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:j,targets:[],node:null},re=0;re<j.length;re++){var Ce=j[re];A.node=Ce,t.fire("pointerEvents:collect-targets",A)}return m==="hold"&&(A.targets=A.targets.filter(function(He){var Ue,Ze;return He.eventable.options.holdDuration===((Ue=o.pointers[k])==null||(Ze=Ue.hold)==null?void 0:Ze.duration)})),A.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);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)]=Il,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,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"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,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,Ll={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,j=function(){var re=m[A],Ce=l.getRect(re);if(!Ce)return 1;var He,Ue=Oe(p.interactions.list,function(rt){return rt.interacting()&&rt.interactable===l&&rt.element===re&&rt.prepared.name===c.name});if(Ue)Ue.move(),T&&(He=Ue._reflowPromise||new k(function(rt){Ue._reflowResolve=rt}));else{var Ze=Z(Ce),ct=function(rt){return{coords:rt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ze.x,y:Ze.y},client:{x:Ze.x,y:Ze.y},timeStamp:p.now()});He=function(rt,gt,Dt,It,kt){var Ct=rt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:kt,pointer:kt,eventTarget:Dt,phase:"reflow"};Ct.interactable=gt,Ct.element=Dt,Ct.prevEvent=kt,Ct.updatePointer(kt,kt,Dt,!0),W(Ct.coords.delta),Nt(Ct.prepared,It),Ct._doPhase(ta);var Kt=rt.window,da=Kt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(It,gt,Dt),Ct._interacting?(Ct.move(ta),Ct.end(kt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(kt,kt),ya}(p,l,re,c,ct)}T&&T.push(He)},A=0;A<m.length&&!j();A++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},zl=Ll;if(ea.use(Ma),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(tt),ea.use(vt),ea.use(zl),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(kn,kn.exports)),kn.exports}var np=ap();const Zo=Ve.getDefaultExportFromCjs(np),Jn=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:i,emit:s}){const r=n,d=s,u=e.inject(Kr),b=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,O=NaN,R=NaN,J=NaN,M=NaN,we=-1,X=-1,K=-1,le=-1,D=r.x,$=r.y,y=r.w,N=r.h;const E=e.ref(),ge=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:pe});function Ye(w){ie(w)}function it(){Pe()}function Le(w){pa(r.isDraggable)&&(f.draggable=w)}function We(w){pa(r.isResizable)&&(f.resizable=w)}function _e(w){pa(r.isBounded)&&(f.bounded=w)}function V(w){f.transformScale=w}function ee(w){f.rowHeight=w}function se(w){f.maxRows=w}function fe(){f.rtl=Yo()==="rtl",Pe()}function Je(w){f.cols=Math.floor(w)}u.increaseItem(ge),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,N=r.h,y=r.w,aa(Qe)}),b.on("updateWidth",Ye),b.on("compact",it),b.on("setDraggable",Le),b.on("setResizable",We),b.on("setBounded",_e),b.on("setTransformScale",V),b.on("setRowHeight",ee),b.on("setMaxRows",se),b.on("directionchange",fe),b.on("setColNum",Je)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Ye),b.off("compact",it),b.off("setDraggable",Le),b.off("setResizable",We),b.off("setBounded",_e),b.off("setTransformScale",V),b.off("setRowHeight",ee),b.off("setMaxRows",se),b.off("directionchange",fe),b.off("setColNum",Je),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ge)}),i({state:f,wrapper:E});const at=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>f.resizable&&!r.static),L=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ye=e.computed(()=>(f.draggable||f.resizable)&&!r.static),De=Gd("item"),Ke=e.computed(()=>({[De.b()]:!0,[De.bm("resizable")]:Q.value,[De.bm("static")]:r.static,[De.bm("resizing")]:f.isResizing,[De.bm("dragging")]:f.isDragging,[De.bm("transform")]:f.useCssTransforms,[De.bm("rtl")]:L.value,[De.bm("no-touch")]:at&&ye.value})),Re=e.computed(()=>[De.be("resizer"),L.value&&De.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(W)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(W)}),e.watch(()=>f.rowHeight,()=>{aa(Qe),aa(Ge)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(W),aa(Qe),aa(Ge)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(W)}),e.watch(L,()=>{aa(W),aa(Qe)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Qe),aa(Ge))});function Qe(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=Y(D,$,y,N);f.isDragging&&(w.top=f.dragging.top,L.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?L.value?S=Ud(w.top,w.right,w.width,w.height):S=jd(w.top,w.left,w.width,w.height):L.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function Ge(){const w={};for(const S of["width","height"]){const q=f.style[S].match(/^(\d+)px$/);if(!q)return;w[S]=q[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function ve(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H={width:0,height:0};let P;switch(S){case"resizestart":{W(),we=y,X=N,P=Y(D,$,y,N),H.width=P.width,H.height=P.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=z),!w.edges.top&&!w.edges.bottom&&(M=ue);const Be=Xo(J,M,z,ue);L.value?H.width=f.resizing.width-Be.deltaX/f.transformScale:H.width=f.resizing.width+Be.deltaX/f.transformScale,H.height=f.resizing.height+Be.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{P=Y(D,$,y,N),H.width=P.width,H.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=te(H.height,H.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),J=z,M=ue,(y!==P.w||N!==P.h)&&d("resize",r.i,P.h,P.w,H.height,H.width),w.type==="resizeend"&&(we!==y||X!==N)&&d("resized",r.i,P.h,P.w,H.height,H.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H=w.target;if(!H.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,le=$;const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,xe=G.right/f.transformScale,Te=ne.right/f.transformScale,Ne=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(xe-Te)*-1:P.left=ae-ce,P.top=Ne-U,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Xo(O,R,z,ue);if(L.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const G=H.offsetParent.clientHeight-Z(r.h,f.rowHeight,f.margin[1]);P.top=oe(P.top,0,G);const ae=de(),ce=f.containerWidth-Z(r.w,ae,f.margin[0]);P.left=oe(P.left,0,ce)}f.dragging=P;break}case"dragend":{const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,xe=G.right/f.transformScale,Te=ne.right/f.transformScale,Ne=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(xe-Te)*-1:P.left=ae-ce,P.top=Ne-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Be;L.value,Be=pe(P.top,P.left),O=z,R=ue,(D!==Be.x||$!==Be.y)&&d("move",r.i,Be.x,Be.y),w.type==="dragend"&&(K!==D||le!==$)&&d("moved",r.i,Be.x,Be.y),b.emit("dragEvent",w.type,r.i,Be.x,Be.y,N,y)}function Y(w,S,q,z){const ue=de();let H;return L.value?H={right:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])}:H={left:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])},H}function pe(w,S){const q=de();let z=Math.round((S-f.margin[0])/(q+f.margin[0])),ue=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return z=Math.max(Math.min(z,f.cols-y),0),ue=Math.max(Math.min(ue,f.maxRows-N),0),{x:z,y:ue}}function de(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Z(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function oe(w,S,q){return Math.max(Math.min(w,q),S)}function te(w,S,q=!1){const z=de();let ue=Math.round((S+f.margin[0])/(z+f.margin[0])),H=0;return q?H=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ue=Math.max(Math.min(ue,f.cols-D),0),H=Math.max(Math.min(H,f.maxRows-$),0),{w:ue,h:H}}function ie(w,S){f.containerWidth=w}function Pe(){Qe()}function nt(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(F);function C(){if(nt(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Wo(ve);function W(){if(nt(),!!g.value)if(f.resizable&&!r.static){const w=Y(0,0,r.maxW,r.maxH),S=Y(0,0,r.minW,r.minH),q={edges:{left:L.value?`.${Re.value[0]}`:!1,right:L.value?!1:`.${Re.value[0]}`,bottom:`.${Re.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(q.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(q),_||(_=!0,g.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?I(z):ve(z)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass(Ke.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Re.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var Qo;nn&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const op=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(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["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 Pn;if(nn){for(const n of dp)if(n[1]in document){Pn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Pn){const n=Pn[2],i=Pn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},En;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(En||(En={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=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},_n=typeof window<"u"?window:{},Mn=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(_n.navigator&&_n.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},dn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},rr=an({devicePixelContentBoxSize:dn(),borderBoxSize:dn(),contentBoxSize:dn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),Mn.has(n)&&!i)return Mn.get(n);if(Zr(n))return Mn.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),O=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),J=r?0:xa(s.borderRightWidth),M=r?0:xa(s.borderBottomWidth),we=r?0:xa(s.borderLeftWidth),X=O+x,K=f+_,le=we+J,D=R+M,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-le-n.clientWidth:0,N=d?X+le:0,E=d?K+D:0,ge=r?r.width:xa(s.width)-N-y,Ye=r?r.height:xa(s.height)-E-$,it=ge+X+y+le,Le=Ye+K+$+D,We=an({devicePixelContentBoxSize:dn(Math.round(ge*devicePixelRatio),Math.round(Ye*devicePixelRatio),u),borderBoxSize:dn(it,Le,u),contentBoxSize:dn(ge,Ye,u),contentRect:new Jr(O,f,ge,Ye)});return Mn.set(n,We),We},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case En.DEVICE_PIXEL_CONTENT_BOX:return b;case En.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(lr(n);vp();)n=wp(),lr(n);return hp()&&gp(),n>0},io,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},$n=0,Sp=function(){return!!$n},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!so){so=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(so=!1,i=r-sr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():_n.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return _n.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return _n.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!$n&&n>0&&fo.start(),$n+=n,!$n&&fo.stop()},Np=function(n){return!ko(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||En.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Ln=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Ln.set(i,r)},n.observe=function(i,s,r){var d=Ln.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Ln.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Ln.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function Lp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const zp=e.ref(!1);e.computed(()=>zp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!nn)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,b]]of vr.entries())s+=` html.${u} .${co}, .${b} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=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:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=Lp(),O=Ld();O.on("resizeEvent",R),O.on("dragEvent",J),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Ye(),f.value&&x(f.value,zd(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),D()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&_(f.value)});function R(Le,We,_e,V,ee,se){E(Le,We,_e,V,ee,se)}function J(Le,We,_e,V,ee,se){N(Le,We,_e,V,ee,se)}e.watch(()=>u.width,(Le,We)=>{e.nextTick(()=>{O.emit("updateWidth",Le),We===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Le=>{O.emit("setColNum",Le)}),e.watch(()=>r.rowHeight,Le=>{O.emit("setRowHeight",Le)}),e.watch(()=>r.isDraggable,Le=>{O.emit("setDraggable",Le)}),e.watch(()=>r.isResizable,Le=>{O.emit("setResizable",Le)}),e.watch(()=>r.isBounded,Le=>{O.emit("setBounded",Le)}),e.watch(()=>r.transformScale,Le=>{O.emit("setTransformScale",Le)}),e.watch(()=>r.responsive,Le=>{Le||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,Le=>{O.emit("setMaxRows",Le)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:we})),e.provide(jr,O),i({state:u,getItem:X,resizeEvent:E,dragEvent:N,layoutUpdate:K});function M(Le){b.set(Le.i,Le)}function we(Le){b.delete(Le.i)}function X(Le){return b.get(Le)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Le=it(g.value,u.originalLayout);if(Le.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Le);else{const We=new Set(Le.map(_e=>_e.i));u.originalLayout=u.originalLayout.filter(_e=>!We.has(_e.i))}u.lastLayoutLength=g.value.length,Ye()}cn(g.value,r.verticalCompact),O.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function $(){if(!r.autoSize)return;const Le=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+Le)+Le+"px"}let y;function N(Le,We,_e,V,ee,se){let fe=Ho(g.value,We);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),Le==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Je,{i:at,x:Q,y:L})=>({...Je,[at]:{x:Q,y:L}}),{})),Le==="dragmove"||Le==="dragstart"?(u.placeholder.i=We,u.placeholder.x=fe.x,u.placeholder.y=fe.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,fe,_e,V,!0,r.preventCollision),r.restoreOnDrag?(fe.static=!0,cn(g.value,r.verticalCompact,y),fe.static=!1):cn(g.value,r.verticalCompact),O.emit("compact"),le(),Le==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(Le,We,_e,V,ee,se){let fe=Ho(g.value,We);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let Je;if(r.preventCollision){const at=Wr(g.value,{...fe,w:se,h:ee}).filter(Q=>Q.i!==fe.i);if(Je=at.length>0,Je){let Q=1/0,L=1/0;at.forEach(ye=>{ye.x>fe.x&&(Q=Math.min(Q,ye.x)),ye.y>fe.y&&(L=Math.min(L,ye.y))}),Number.isFinite(Q)&&(fe.w=Q-fe.x),Number.isFinite(L)&&(fe.h=L-fe.y)}}Je||(fe.w=se,fe.h=ee),Le==="resizestart"||Le==="resizemove"?(u.placeholder.i=We,u.placeholder.x=_e,u.placeholder.y=V,u.placeholder.w=fe.w,u.placeholder.h=fe.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):Le&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ge(),cn(g.value,r.verticalCompact),O.emit("compact"),le(),Le==="resizeend"&&d("layout-updated",g.value)}function ge(){const Le=Jd(r.breakpoints,u.width);if(Le===u.lastBreakpoint)return;const We=Gr(Le,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const _e=Zd(u.originalLayout,u.layouts,r.breakpoints,Le,u.lastBreakpoint,We,r.verticalCompact);u.layouts[Le]=_e,u.lastBreakpoint!==Le&&d("breakpoint-changed",Le,_e),g.value=_e,d("update:layout",_e),u.lastBreakpoint=Le,O.emit("setColNum",We)}function Ye(){u.layouts=Object.assign({},r.responsiveLayouts)}function it(Le,We){const _e=new Set(We.map(fe=>fe.i)),V=new Set(Le.map(fe=>fe.i)),ee=Le.filter(fe=>!_e.has(fe.i)),se=We.filter(fe=>!V.has(fe.i));return ee.concat(se)}return(Le,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Le.$slots.default?e.renderSlot(Le.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,_e=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:_e.i,ref_for:!0},_e),{default:e.withCtx(()=>[e.renderSlot(Le.$slots,"item",{item:_e})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=$t.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,J,M,we;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(we=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:we.layout:"vertical"}),f=e.computed(()=>{var R,J;return((J=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},O=(R,J)=>{d("routeUrl",R,J)};return(R,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":J[0]||(J[0]=M=>b.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(M,we)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var X,K,le,D,$,y,N,E,ge,Ye,it,Le,We;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:we===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(K=M==null?void 0:M.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((D=M==null?void 0:M.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=M==null?void 0:M.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(N=e.unref(pt)[we])==null?void 0:N.showIndex,allowMove:(E=e.unref(pt)[we])==null?void 0:E.allowMove,viewport:(ge=e.unref(pt)[we])==null?void 0:ge.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(yo),itemData:(Ye=M==null?void 0:M.component)==null?void 0:Ye.compData,childItemData:(it=M==null?void 0:M.component)==null?void 0:it.itemChildData,key:e.unref(pn),cacheNewData:e.unref(wn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Le=M==null?void 0:M.component)==null?void 0:Le.tableId,allMapContents:e.unref(Hn),children:(We=M==null?void 0:M.component)==null?void 0:We.children,level:x.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(Lr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,we)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(we)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=M==null?void 0:M.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(pn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Hn),children:M==null?void 0:M.children,level:x.value,onRowClick:_,onRouteUrl:O},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=zt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=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"}]),Kp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return Kp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.addSelectMenu=eo;exports.affixItems=rd;exports.allMapContents=Hn;exports.cacheNewData=wn;exports.clickMainKey=Lr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=pn;exports.compNames=yo;exports.compShow=Wn;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=qn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Jt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toolBar=Ba;exports.verifyButton=md;
1
+ "use strict";const bn=require("./index-DBj1VTrx.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),St=require("./index-DjA4WahR.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C-Z-yYuH.cjs"),Xt=require("./index-C5Y11t9J.cjs"),Io=require("./threeViewerHost-BjJ4CzrA.cjs"),$t=require("./index-CXC0u8pm.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-Dq-QTXZW.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-DDG4LYuA.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,O=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(_=!!s.leading,O="maxWait"in s,u=O?Yl(Oo(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function J(N){var E=r,ge=d;return r=d=void 0,x=N,b=n.apply(ge,E),b}function M(N){return x=N,g=setTimeout(K,i),_?J(N):b}function we(N){var E=N-f,ge=N-x,Ye=i-E;return O?Jl(Ye,u-ge):Ye}function X(N){var E=N-f,ge=N-x;return f===void 0||E>=i||E<0||O&&ge>=u}function K(){var N=ro();if(X(N))return le(N);g=setTimeout(K,we(N))}function le(N){return g=void 0,R&&r?J(N):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:le(ro())}function y(){var N=ro(),E=X(N);if(r=arguments,d=this,f=N,E){if(g===void 0)return M(f);if(O)return clearTimeout(g),g=setTimeout(K,i),J(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__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:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var z;const S=(z=at.value)==null?void 0:z.split("/");return(S==null?void 0:S.some(ue=>(ue==null?void 0:ue.includes("updateLoading"))||(ue==null?void 0:ue.includes("loading"))))?!1:We.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Io.useThreeSystem(),_=e.ref(),O=e.ref(!1),R=e.ref(!1),J=e.ref([]),M=e.ref(),we=e.ref(!1),X=e.ref([]),K=bn.useFormToTableComp(v.pinia),le=bn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:N}=v.storeToRefs(y),E=e.ref(),ge=e.ref(!0),Ye=$t.useModelComp(v.pinia),{tableViewContents:it,itemData:Le,isEdit:We,routeToChildPath:_e,lockingPage:V}=v.storeToRefs(Ye),ee=e.ref(null),se=e.ref(!1),fe=e.ref(!1),Je=$t.useMenuState(),{activeMenuPath:at}=v.storeToRefs(Je),Q=Ve.useOriginalState(v.pinia),{originalPath:L}=v.storeToRefs(Q),ye=e.ref([]),De=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ke=async S=>{fe.value=S,await pe("disabled",null,S,!0)},Re=async S=>{await pe("operable",null,S,!0)};e.watch(()=>at.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Qe=()=>{e.nextTick(()=>{Y()})},Ge=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(z=>({...z,isFormColHidden:!(S!=null&&S.includes(z.label))}))};e.onUnmounted(()=>{ee.value=null});const ve=S=>{d("clickTrigger",S)},F=async S=>{var q,z,ue,H,P,Be;if(S===""){let ne="";(q=u.value)==null||q.forEach(xe=>{xe!=null&&xe.isMain&&(ne=xe==null?void 0:xe.value)});let G=await Ve.getItemData(_e.value,sessionStorage.getItem("systemKey"),"");ne=((Be=(P=(H=(ue=(z=G==null?void 0:G[0])==null?void 0:z.compData)==null?void 0:ue.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:P[0])==null?void 0:Be.routerContent)+L.value+ne;let ce=await Ve.getItemData(ne,sessionStorage.getItem("systemKey"),"");we.value=!0,X.value=ce==null?void 0:ce.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=ee.value)==null?void 0:q.$el;S&&Ve.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:ue,newIndex:H}=z;if(ue===H)return;const P=u.value.splice(ue,1)[0];u.value.splice(H,0,P)}})},pe=async(S,q,z,ue=!1)=>{var H,P,Be,ne,G,ae,ce,xe;try{Ye.setRefreshCurStructure(!1);const Te=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((H=Te==null?void 0:Te.data)==null?void 0:H.code)===200){let Ne=(G=(ne=(Be=(P=Te==null?void 0:Te.data)==null?void 0:P.result)==null?void 0:Be[0])==null?void 0:ne.value)==null?void 0:G.pageData;ue?Ne={...Ne,compData:(ce=Ne==null?void 0:Ne.compData)==null?void 0:ce.map(Oe=>{var me;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(me=Oe==null?void 0:Oe.contents)==null?void 0:me.map(je=>({...je,[S]:z}))}:Oe})}:Ne={...Ne,compData:(ae=Ne==null?void 0:Ne.compData)==null?void 0:ae.map(Oe=>{var me;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(me=Oe==null?void 0:Oe.contents)==null?void 0:me.map(je=>(je==null?void 0:je.prop)===(q==null?void 0:q.prop)?{...je,[S]:z}:je)}:Oe})};const U=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Ne}});((xe=U==null?void 0:U.data)==null?void 0:xe.code)===200?(v.ElMessage.success("编辑成功"),Ye.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},de=async(S,q)=>{await pe("label",q,S)},Z=async(S,q)=>{S&&await pe("type",q,S)},oe=async(S,q,z)=>{await pe(q,z,S,!1)},te=(S,q)=>{E.value===q?ge.value=!1:ge.value=!0,E.value=q==null?void 0:q.changeProp},ie=async S=>{var z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;let q=[];if((z=S==null?void 0:S.toString())!=null&&z.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((ue=S==null?void 0:S.toString())!=null&&ue.includes(".stl")||(H=S==null?void 0:S.toString())!=null&&H.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Be=S==null?void 0:S.toString())!=null&&Be.includes(".mtl")){const lt=((ne=S==null?void 0:S.toString())==null?void 0:ne.split(",")).map(qe=>({url:qe,extension:x(qe)}));f.value=lt,g.value=!1,b.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".STL")||(ce=S==null?void 0:S.toString())!=null&&ce.includes(".obj")||(xe=S==null?void 0:S.toString())!=null&&xe.includes(".mtl")){let je,lt=[],qe={};if(Array.isArray(S)?je=S:je=S==null?void 0:S.split(","),je==null||je.forEach(ot=>{ot.includes(".mtl")?lt.push(ot):qe.blob=qe.blob?qe.blob+","+ot:ot}),(lt==null?void 0:lt.length)>0&&(qe.mtlBlobs=lt),(Ne=(Te=Object.values(qe))==null?void 0:Te[0])!=null&&Ne.includes("http:"))q.push(qe);else{const ot=new Blob([qe.blob],{type:"application/octet-stream;charset=UTF-8"});let $e=URL.createObjectURL(ot),ht="";(U=S==null?void 0:S.split("/"))==null||U.forEach((et,ze)=>{var he;ze===((he=S==null?void 0:S.split("/"))==null?void 0:he.length)-1&&(ht=et)}),(Oe=qe.blob)!=null&&Oe.includes(".stl")&&(ht=(ht==null?void 0:ht.replaceAll(">",""))+".urdf"),M.value=[{name:ht,blobUrl:$e}],R.value=!0}}else{const je=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),lt=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{je.close()}),qe=new Blob([lt.data],{type:"application/octet-stream;charset=UTF-8"});let ot=URL.createObjectURL(qe),$e="";(me=S==null?void 0:S.split("/"))==null||me.forEach((ht,et)=>{var ze;et===((ze=S==null?void 0:S.split("/"))==null?void 0:ze.length)-1&&($e=ht)}),M.value=[{name:$e,blobUrl:ot}],R.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Pe=()=>{R.value=!1},nt=S=>{var P,Be,ne,G;const q=(Be=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Be.contents,z=v.cloneDeep(S.content);let ue={};z&&((ne=Object.values(z))==null?void 0:ne.length)>0&&((G=Object.values(z))==null||G.forEach((ae,ce)=>{ue[q[ce].key]=ae}));const H={content:ue,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",H)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt;if(!S)return;(Ne=(Te=r==null?void 0:r.itemData)==null?void 0:Te.find(ke=>(ke==null?void 0:ke.key)==="parentFormPath"))==null||Ne.contents;let q=it.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(ke=>{var be,Se,B,Ie;let Ee=(be=ke==null?void 0:ke.key)==null?void 0:be.split("/");return(r==null?void 0:r.compName)===(Ee==null?void 0:Ee[0])&&(Se=u.value)!=null&&Se.find(tt=>(tt==null?void 0:tt.prop)===(Ee==null?void 0:Ee[1]))&&(ke.value=(Ie=(B=u.value)==null?void 0:B.find(tt=>(tt==null?void 0:tt.prop)===(Ee==null?void 0:Ee[1])))==null?void 0:Ie.value),ke}),Ye.setTableViewContents(q));const z=v.cloneDeep(r.itemData);let ue=z==null?void 0:z.map(ke=>{var Ee;return(ke==null?void 0:ke.key)==="formContent"&&((Ee=ke.contents)==null||Ee.map((be,Se)=>{var B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt;return be.type=(Ie=(B=u.value)==null?void 0:B.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Ie.type,be.options=be!=null&&be.options?be.options:((Xe=(Fe=(tt=be==null?void 0:be.key)==null?void 0:tt.split("$"))==null?void 0:Fe[1])==null?void 0:Xe.length)>0?(st=(ut=bn.formGetOptions((dt=(Me=be==null?void 0:be.key)==null?void 0:Me.split("$"))==null?void 0:dt[1]))==null?void 0:ut.split(","))==null?void 0:st.map(Ot=>({label:Ot,value:Ot})):[],(vt=be==null?void 0:be.key)!=null&&vt.includes("$")&&(be.key=(Nt=(bt=be==null?void 0:be.key)==null?void 0:bt.split("$"))==null?void 0:Nt[0]),be.signature=(Vt=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Vt.signature,be.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Ft.isLoginUser,be.value=(xt=Object.values(S))==null?void 0:xt[Se],be.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(be==null?void 0:be.prop)))==null?void 0:Yt.isFormColHidden,be})),ke}),H=u.value,P=(Oe=(U=v.cloneDeep(ue))==null?void 0:U.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:Oe.contents;if(H=H==null?void 0:H.map(ke=>{var Ee;return ke.value=(Ee=P==null?void 0:P.find((be,Se)=>((be==null?void 0:be.id)??Se)===(ke==null?void 0:ke.id)))==null?void 0:Ee.value,ke}),!ge.value){d("contentChange",{contents:ue,index:r.index});return}let Be="",ne=(lt=(je=(me=v.cloneDeep(ue))==null?void 0:me.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:je.contents)==null?void 0:lt.find((ke,Ee)=>{var be,Se,B;return(ke==null?void 0:ke.label)===E.value||Ee.toString()===((B=(Se=(be=E.value)==null?void 0:be.split("t"))==null?void 0:Se[1])==null?void 0:B.toString())}),G=(qe=ne==null?void 0:ne.optionUrl)==null?void 0:qe.menuSelect,ae=!0;if((ht=($e=(ot=v.cloneDeep(ue))==null?void 0:ot.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:$e.contents)==null||ht.forEach(ke=>{var Ee,be,Se,B,Ie,tt;ae&&((Se=(be=(Ee=ke==null?void 0:ke.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:be[1])!=null&&Se.includes("["))&&(Be=(Ie=(B=ke==null?void 0:ke.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ie[1],JSON.stringify(G)===JSON.stringify((tt=ke==null?void 0:ke.optionUrl)==null?void 0:tt.menuSelect)&&(ae=!1))}),(et=ne==null?void 0:ne.optionUrl)!=null&&et.menuSelect&&ge.value){let ke=await bn.getSelectRow(ne),Ee,be=(ze=ne==null?void 0:ne.optionUrl)==null?void 0:ze.menuSelect;if(ke==null||ke.forEach(Se=>{var B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt;Be===((Ie=(B=ne==null?void 0:ne.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ie[1])&&((Xe=(Fe=(tt=ne==null?void 0:ne.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Fe[1])!=null&&Xe.includes("["))&&((vt=v.cloneDeep(Se))==null?void 0:vt[(st=(ut=(dt=(Me=ne==null?void 0:ne.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:dt[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(ne==null?void 0:ne.value)&&(Ee=Se)}),Ee){let Se=v.cloneDeep(H);Se=Se==null?void 0:Se.map(Ie=>{var tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt;return(Ee!=null&&Ee[Ie==null?void 0:Ie.label]||Ee!=null&&Ee[(Me=(Xe=(Fe=(tt=Ie==null?void 0:Ie.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Fe[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:Me.replaceAll("]","")])&&((st=(ut=(dt=Ie==null?void 0:Ie.optionUrl)==null?void 0:dt.groupSelect)==null?void 0:ut[1])!=null&&st.includes("["))&&be!=null&&be.every(Vt=>{var _t,Ft;return(Ft=(_t=Ie==null?void 0:Ie.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(Vt)})&&(Ie.value=(Ee==null?void 0:Ee[Ie==null?void 0:Ie.label])||(Ee==null?void 0:Ee[(Pt=(Nt=(bt=(vt=Ie==null?void 0:Ie.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:bt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(Ie.value)&&Ie.value.every(Vt=>(Vt==null?void 0:Vt.url)&&(Vt==null?void 0:Vt.name))&&(Ie.type="Upload")),Ie}),Se=Se==null?void 0:Se.map(Ie=>{var tt,Fe,Xe;return(tt=Ie==null?void 0:Ie.optionUrl)!=null&&tt.oldMenuSelect&&(Ie.optionUrl.menuSelect=(Xe=(Fe=v.cloneDeep(Ie))==null?void 0:Fe.optionUrl)==null?void 0:Xe.oldMenuSelect),Ie}),u.value=v.cloneDeep(Se);let B=v.cloneDeep(Se);B=B==null?void 0:B.map(Ie=>{var tt,Fe,Xe,Me,dt,ut;return(Fe=(tt=Ie==null?void 0:Ie.optionUrl)==null?void 0:tt.menuSelect)!=null&&Fe.some(st=>st==null?void 0:st.includes("["))&&(Ie.optionUrl.oldMenuSelect=(Me=(Xe=v.cloneDeep(Ie))==null?void 0:Xe.optionUrl)==null?void 0:Me.menuSelect,Ie.optionUrl.menuSelect=(ut=(dt=Ie==null?void 0:Ie.optionUrl)==null?void 0:dt.menuSelect)==null?void 0:ut.map(st=>{var vt,bt,Nt,Pt;if(st!=null&&st.includes("[")){let Vt=(bt=(vt=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:bt[1];st=(Pt=(Nt=v.cloneDeep(Se))==null?void 0:Nt.find(_t=>(_t==null?void 0:_t.label)===Vt))==null?void 0:Pt.value}return st})),Ie}),u.value=B}else u.value=H;ue=ue==null?void 0:ue.map(Se=>{var B;return(Se==null?void 0:Se.key)==="formContent"&&(Se.contents=(B=Se.contents)==null?void 0:B.map(Ie=>{var tt,Fe,Xe,Me;return Ie.value=((Fe=(tt=u.value)==null?void 0:tt.find(dt=>(dt==null?void 0:dt.label)===(Ie==null?void 0:Ie.key)))==null?void 0:Fe.value)??(Ie==null?void 0:Ie.value),Ie.type=((Me=(Xe=u.value)==null?void 0:Xe.find(dt=>(dt==null?void 0:dt.prop)===(Ie==null?void 0:Ie.key)))==null?void 0:Me.type)??(Ie==null?void 0:Ie.type),Ie})),Se})}ge.value=!1,d("contentChange",{contents:ue,index:r.index});let ce=[],xe=[];if((Ae=v.cloneDeep((he=ue==null?void 0:ue.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:he.contents))==null||Ae.forEach(ke=>{var Ee;Array.isArray(ke==null?void 0:ke.value)&&((Ee=ke==null?void 0:ke.value)!=null&&Ee.find(be=>{var Se;return(Se=be==null?void 0:be.url)==null?void 0:Se.includes(".obj")}))&&(xe=ke==null?void 0:ke.value)}),(xe==null?void 0:xe.length)>0){const ke=(mt=v.cloneDeep(xe))==null?void 0:mt.filter(Ee=>{var be;return(be=Ee==null?void 0:Ee.url)==null?void 0:be.includes(".obj")});ke==null||ke.forEach(Ee=>{var Se,B,Ie,tt;const be=(Se=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:Se.map(Fe=>Fe==null?void 0:Fe.url);ce.push({objUrl:Ee==null?void 0:Ee.url,mtlUrls:((B=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:B.length)===1?(tt=(Ie=xe==null?void 0:xe.filter(Fe=>{var Xe;return(Fe==null?void 0:Fe.name)===(Ee==null?void 0:Ee.name)&&((Xe=Fe==null?void 0:Fe.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:tt.url:be})}),le.setObjUrl(ce)}},I=S=>{if(!S)return;const q=[];let z="";for(let ue of S)(ue.includes("[")||z.includes("["))&&(z+=ue.trim(),v.cloneDeep(z).split("【").length-1===v.cloneDeep(z).split("】").length-1&&v.cloneDeep(z).split("[").length-1===v.cloneDeep(z).split("]").length-1&&(q.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return q},W=(S,q,z)=>{let ue="";const H=q==null?void 0:q.map(P=>{var Be;return(Be=P==null?void 0:P.value)==null?void 0:Be.pageData});return H==null||H.forEach(P=>{var Be;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Be=P==null?void 0:P.compData)==null||Be.forEach(ne=>{var G;(ne==null?void 0:ne.key)==="formContent"&&((G=ne==null?void 0:ne.contents)==null||G.forEach(ae=>{var ce;(ae==null?void 0:ae.prop)===(S==null?void 0:S[1])&&(ue=(ae==null?void 0:ae.value)===""?Ve.judgeContents((ce=v.cloneDeep(ae))==null?void 0:ce.optionUrl,z):ae==null?void 0:ae.value)}))}))}),ue},w=(S,q,z,ue)=>{var ne,G;let H="",P="";(ne=v.cloneDeep(q))==null||ne.forEach((ae,ce)=>{ae!=null&&ae.includes("[")?P=P+L.value+S[ce]:P=P===""?P+ae:P+"/"+ae});let Be=(G=ue[P])==null?void 0:G.map(ae=>{var ce;return(ce=ae==null?void 0:ae.value)==null?void 0:ce.pageData});return Be==null||Be.forEach(ae=>{var ce;(ae==null?void 0:ae.name)===(z==null?void 0:z[0])&&((ce=ae==null?void 0:ae.compData)==null||ce.forEach(xe=>{var Te;(xe==null?void 0:xe.key)==="formContent"&&((Te=xe==null?void 0:xe.contents)==null||Te.forEach(Ne=>{(Ne==null?void 0:Ne.prop)===(z==null?void 0:z[1])&&(H=Ne==null?void 0:Ne.value)}))}))}),H};return e.watch(()=>r.itemData,async()=>{var Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze;const S=(Be=r.itemData)==null?void 0:Be.find(he=>(he==null?void 0:he.key)==="formContent"),q=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(he=>(he==null?void 0:he.key)==="formButton"),z=(G=v.cloneDeep(r.itemData))==null?void 0:G.find(he=>(he==null?void 0:he.key)==="formFlex"),ue=(ae=v.cloneDeep(r.itemData))==null?void 0:ae.find(he=>(he==null?void 0:he.key)==="formWrap"),H=(ce=v.cloneDeep(r.itemData))==null?void 0:ce.find(he=>(he==null?void 0:he.key)==="enableWrap");if((ue==null?void 0:ue.contents)==="纵向"?O.value=!1:O.value=!0,D.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,$.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((xe=z==null?void 0:z.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((Te=S==null?void 0:S.contents)==null?void 0:Te.length)>0&&Array.isArray(S==null?void 0:S.contents)){let he=r.allMapContents;const Ae=(U=(Ne=v.cloneDeep(S))==null?void 0:Ne.contents)==null?void 0:U.map((B,Ie)=>{var Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa;let tt=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",Fe=(B==null?void 0:B.type)??"",Xe=(B==null?void 0:B.options)??[];if((Vt=B==null?void 0:B.key)!=null&&Vt.includes("$")&&(tt=(_t=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:_t[0],((xt=(Ft=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ft[1])==null?void 0:xt.length)>0)){const[wt,Zt]=(Yt=(Ht=v.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Fe=((Ot=Ve.FormType.find(yt=>(yt==null?void 0:yt.key)===wt))==null?void 0:Ot.value)??"",((Va=Zt==null?void 0:Zt.split(","))==null?void 0:Va.length)>0&&(Xe=(wa=Zt==null?void 0:Zt.split(","))==null?void 0:wa.map(yt=>({label:yt,value:yt})))}let Me=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(Me=(Ka=(Oa=B==null?void 0:B.contents)==null?void 0:Oa.split(","))==null?void 0:Ka.map(wt=>({label:wt,value:wt}))),((Da=B==null?void 0:B.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Me=(Ca=(ja=B==null?void 0:B.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let dt=!1,ut=(B==null?void 0:B.isFormColHidden)??!1,st=Ve.judgeContents((Ua=v.cloneDeep(B))==null?void 0:Ua.optionUrl,he),vt=st!==void 0&&st!==""?st:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(Xe==null?void 0:Xe.length)>0?(Wa=Xe==null?void 0:Xe[0])==null?void 0:Wa.value:(B==null?void 0:B.value)??"",bt=!1,Nt=st!==void 0||Fe===""?"Input":Fe;if((Array.isArray(st)&&(st!=null&&st.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Nt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.isLoginUser)dt=!0,vt=((Ha=N.value)==null?void 0:Ha.姓名)||((qa=N.value)==null?void 0:qa.account)||((Ga=N.value)==null?void 0:Ga.账号)||((Ma=N.value)==null?void 0:Ma.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(bt=!0,(B==null?void 0:B.isShow)==="originalSignature")Nt="image",vt=h.value+"/"+((ba=N.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(B.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=Le.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var La;(Qt==null?void 0:Qt.key)==="formContent"&&((La=Qt==null?void 0:Qt.contents)==null||La.forEach(Tt=>{(Tt==null?void 0:Tt.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=Tt==null?void 0:Tt.value)}))}))})});let Zt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),yt=B==null?void 0:B.isShow;Zt==null||Zt.forEach(Mt=>{Mt!=null&&Mt.value?yt=yt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):yt=yt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((_a=yt==null?void 0:yt.split("==="))==null?void 0:_a[0])+"==='"+((ka=yt==null?void 0:yt.split("==="))==null?void 0:ka[1])+"'":yt=((na=yt==null?void 0:yt.split("="))==null?void 0:na[0])+"='"+((ga=yt==null?void 0:yt.split("="))==null?void 0:ga[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(ut=!1,Nt="image",vt=h.value+"/"+((Xa=N.value)==null?void 0:Xa.signature)):vt=""}return Array.isArray(vt)&&vt.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Nt="Url"),{label:tt??"",name:"t"+Ie,prop:v.cloneDeep(B==null?void 0:B.key),type:Nt,value:B!=null&&B.isNewDate&&vt===""?new Date:vt,id:(B==null?void 0:B.id)??Ie,contents:(Me==null?void 0:Me.length)>0?Me:Xe??[],width:(B==null?void 0:B.width)??1,isLoginUser:dt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:ut,signature:bt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}}),mt=Ae==null?void 0:Ae.map(B=>B==null?void 0:B.value);let ke="";mt==null||mt.forEach(B=>{B!==""&&B!==void 0&&(ke=ke===""?B:ke+"/"+B)}),K.setSelectArray(mt),K.setSelectString(ke);let Ee=(Oe=v.cloneDeep(Ae))==null?void 0:Oe.map(B=>(B!=null&&B.value&&Ve.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));Ee=Ee==null?void 0:Ee.map(B=>{var Ie,tt,Fe,Xe,Me,dt,ut,st;if((tt=(Ie=B==null?void 0:B.optionUrl)==null?void 0:Ie.menuSelect)!=null&&tt.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";B.optionUrl.oldMenuSelect=(Xe=(Fe=v.cloneDeep(B))==null?void 0:Fe.optionUrl)==null?void 0:Xe.menuSelect,B.optionUrl.menuSelect=(dt=(Me=B==null?void 0:B.optionUrl)==null?void 0:Me.menuSelect)==null?void 0:dt.map(bt=>{var Nt,Pt,Vt,_t,Ft,xt;if(bt!=null&&bt.includes("[")){let Ht=(Pt=(Nt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:Pt[1];vt=W((Vt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Vt.split(":"),he==null?void 0:he[at.value],he),bt=((Ft=(_t=v.cloneDeep(Ee))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Ft.value)||W((xt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),he==null?void 0:he[at.value],he)}return bt}),vt!==""&&B.value===""&&(B.value=w(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(ut=B==null?void 0:B.optionUrl)==null?void 0:ut.groupSelect,he),Array.isArray(B.value)&&((st=B.value)!=null&&st.every(bt=>bt==null?void 0:bt.url))&&(B.type="UPLOAD"))}return B}),u.value=Ee,fe.value=((me=u.value)==null?void 0:me.every(B=>B==null?void 0:B.disabled))||V.value===at.value,se.value=(je=u.value)==null?void 0:je.every(B=>B==null?void 0:B.operable),ye.value=(lt=u.value)==null?void 0:lt.map(B=>B==null?void 0:B.label);let be=[],Se=[];if((qe=v.cloneDeep(u.value))==null||qe.forEach(B=>{var Ie;Array.isArray(B==null?void 0:B.value)&&((Ie=B==null?void 0:B.value)!=null&&Ie.find(tt=>{var Fe;return(Fe=tt==null?void 0:tt.url)==null?void 0:Fe.includes(".obj")}))&&(Se=B==null?void 0:B.value)}),(Se==null?void 0:Se.length)>0){const B=(ot=v.cloneDeep(Se))==null?void 0:ot.filter(Ie=>{var tt;return(tt=Ie==null?void 0:Ie.url)==null?void 0:tt.includes(".obj")});B==null||B.forEach(Ie=>{var Fe,Xe,Me,dt;const tt=(Fe=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Fe.map(ut=>ut==null?void 0:ut.url);be.push({objUrl:Ie==null?void 0:Ie.url,mtlUrls:((Xe=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Xe.length)===1?(dt=(Me=Se==null?void 0:Se.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Ie==null?void 0:Ie.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Me[0])==null?void 0:dt.url:tt})}),le.setObjUrl(be)}($e=v.cloneDeep(u.value))==null||$e.forEach(B=>{var Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt;if((tt=(Ie=B==null?void 0:B.value)==null?void 0:Ie.toString())!=null&&tt.includes(".stl")||(Xe=(Fe=B==null?void 0:B.value)==null?void 0:Fe.toString())!=null&&Xe.includes(".STL")||(dt=(Me=B==null?void 0:B.value)==null?void 0:Me.toString())!=null&&dt.includes(".obj")||(st=(ut=B==null?void 0:B.value)==null?void 0:ut.toString())!=null&&st.includes(".mtl")||(bt=(vt=B==null?void 0:B.value)==null?void 0:vt.toString())!=null&&bt.includes(".urdf")){let _t={},Ft=[],xt;Array.isArray(B==null?void 0:B.value)?xt=B==null?void 0:B.value:xt=(Nt=B==null?void 0:B.value)==null?void 0:Nt.split(","),xt==null||xt.forEach(Ht=>{Ht.includes(".mtl")?Ft.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Ft==null?void 0:Ft.length)>0&&(_t.mtlBlobs=Ft),(Vt=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&Vt.includes("http:")}})}else u.value=[];let P=it.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(he=>{var mt,ke,Ee,be;let Ae=(mt=he==null?void 0:he.key)==null?void 0:mt.split("/");return(r==null?void 0:r.compName)===(Ae==null?void 0:Ae[0])&&(ke=u.value)!=null&&ke.find(Se=>(Se==null?void 0:Se.prop)===(Ae==null?void 0:Ae[1]))&&(he.value=(be=(Ee=u.value)==null?void 0:Ee.find(Se=>(Se==null?void 0:Se.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:be.value),he}),Ye.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let he={};(ht=v.cloneDeep(u).value)==null||ht.forEach(Ae=>{(Ae==null?void 0:Ae.isMain)===!0&&(he[(Ae==null?void 0:Ae.prop)??(Ae==null?void 0:Ae.name)]=[{required:!0,message:`${(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.name)}不能为空`}])}),_.value=he}if(((et=q==null?void 0:q.contents)==null?void 0:et.length)>0){const he=[];(ze=q==null?void 0:q.contents)==null||ze.forEach((Ae,mt)=>{(Ae==null?void 0:Ae.label)!==""&&he.push({label:(Ae==null?void 0:Ae.label)??"",id:(Ae==null?void 0:Ae.id)??mt,type:(Ae==null?void 0:Ae.type)??"",background:Ae==null?void 0:Ae.background})}),J.value=he}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,S=>{fe.value=S===at.value},{immediate:!0}),(S,q)=>{const z=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Be=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(St.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:nt,onChange:C,formDisabled:fe.value,formLabelsOperable:se.value,isButtonRow:O.value,onPreview:ie,onBlurChange:te,onHandleColEditChange:de,onHandleColTypeChange:Z,onRouteUrl:F,onClickTrigger:ve},{operateCol:e.withCtx(({renderColumns:ne,formDisabled:G,formLabelsOperable:ae})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Qe},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ue,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:Ke,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ue,{"model-value":ae,"active-text":"编辑所有标签","inactive-text":"",onChange:Re},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Be,{modelValue:ye.value,"onUpdate:modelValue":q[0]||(q[0]=ce=>ye.value=ce),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ee,onChange:Ge},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne,ce=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ce.label},[e.createVNode(H,{value:ce.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ce.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var xe;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xe=Object.keys(ce))==null?void 0:xe.filter(Te=>{var Ne;return(Ne=De.value)==null?void 0:Ne.find(U=>(U==null?void 0:U.value)===Te)}),Te=>{var Ne,U;return e.openBlock(),e.createElementBlock("div",{key:Te},[e.createVNode(St._sfc_main$1,{value:ce==null?void 0:ce[Te],"active-text":(U=(Ne=De.value)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.value)===Te))==null?void 0:U.label,inactiveText:"",onChange:Oe=>oe(Oe,Te,ce)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(z,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Pe},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),Kn=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Bt=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},J=D=>{r("deleteChange",v.cloneDeep(D))},M=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},we=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(N,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(N.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>M(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>O(N)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>le(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:N==null?void 0:N.children,onDeleteChange:J,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ve.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),O=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(N=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:D[N.key],id:g.value,contents:N==null?void 0:N.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},J=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},M=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},we=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(N=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(N==null?void 0:N.label));E?D[E.key]=N.value:N!=null&&N.children&&N.children.length>0&&(D.children=N.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let N=v.cloneDeep(g.value)+1;b.setTableIndex(N),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),N=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ge)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>J(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(N,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(N,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=zt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},Li={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),O=e.ref([]),R=e.ref(""),J=e.ref(""),M=e.ref([]),we=e.ref([]),X=e.ref([]),K=e.ref([]),le=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),N=e.ref([]),E=e.ref([]),ge=e.ref([]),Ye=()=>{le.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},it=()=>{var C,I,W;b.value=!0;let h=[];(W=(I=(C=Ve.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||W.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),N.value=h,E.value=h},Le=h=>{h||(N.value=E.value)},We=async h=>{var C,I,W,w,S,q,z,ue,H,P,Be,ne;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:I.value)){let G=[],ae=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ve.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ve.FormContent)==null?void 0:q.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:z.value;if(ae==null||ae.forEach(ce=>{y.value++,G.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[ce.label])??"",id:y.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),h!=null&&h.菜单选项&&((Be=h==null?void 0:h.菜单选项)==null?void 0:Be.length)>0){const ce=await Ve.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=ce),xe))}E.value=await Ve.selectToBase(v.cloneDeep(G)),N.value=await Ve.selectToBase(v.cloneDeep(G))}else{let G=v.cloneDeep(N.value);if(G=G==null?void 0:G.map(ae=>(ae.value=h==null?void 0:h[ae.name],ae)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const ae=await Ve.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=ae),ce))}G=Ve.formToOptionsContents(G),E.value=await Ve.selectToBase(v.cloneDeep(G))}},_e=async h=>{await We(h),N.value=E.value},V=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},ee=async h=>{var W,w,S,q,z,ue,H,P,Be;b.value=!0;let C=[];const I=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ve.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ve.FormContent)==null?void 0:q.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:z.value;if(I==null||I.forEach(ne=>{y.value++,C.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):V(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Be=h==null?void 0:h.menuSelect)==null?void 0:Be.length)>0){const ne=await Ve.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ne),G))}R.value=h==null?void 0:h.id,N.value=await Ve.selectToBase(Ve.formToOptionsContents(C)),E.value=await Ve.selectToBase(Ve.formToOptionsContents(C))},se=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ge.value=(C=v.cloneDeep(ge.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ge.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{b.value=!1,N.value=[],R.value=""},Je=async()=>{var W,w,S,q,z,ue,H,P,Be,ne;N.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(W=Ve.FormContent)==null?void 0:W.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((z=(q=Ve.FormContent)==null?void 0:q.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=N.value)==null?void 0:ae.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:z.value);if((ue=N.value)==null||ue.forEach(G=>{const ae=C==null?void 0:C.find(ce=>(ce==null?void 0:ce.label)===(G==null?void 0:G.label));ae&&(h[ae.key]=G.value)}),h.name=h.label,(H=ge.value)!=null&&H.find(G=>G.id===h.id))ge.value=(P=ge.value)==null?void 0:P.map(G=>(G.id===h.id&&(G=h),G));else{let G=v.cloneDeep(ge.value);ge.value||(ge.value=[]),G.push(h),ge.value=G}ge.value=ge.value.map(({id:G,...ae})=>ae),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Be=v.cloneDeep(s.originalItemContents))!=null&&Be.find(G=>(G==null?void 0:G.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=ge.value),G)):I.push({key:"tableToForm",contents:ge.value}),r("change",I)},at=h=>{le.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=_.value),W)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const Q=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;we.value=(C=v.cloneDeep(we.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=we.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>{var I,W,w,S,q;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(z=>{const ue=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=we.value)!=null&&W.find(z=>z.id===h.id))we.value=(w=we.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(we.value)??[];z.push(h),we.value=z}le.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=we.value),z)):C.push({key:"extraButton",contents:we.value}),r("change",C)},ye=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},De=()=>{le.value=!1,D.value=[],R.value=""},Ke=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,X.value=C,K.value=C},Re=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;M.value=(C=v.cloneDeep(M.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=M.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Qe=()=>{u.value=!0;let h=[];Bt==null||Bt.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,O.value=h},Ge=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),X.value=h,K.value=h},ve=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,W,w,S,q;X.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=X.value)==null||I.forEach(z=>{const ue=Ia==null?void 0:Ia.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=M.value)!=null&&W.find(z=>z.id===h.id))M.value=(w=M.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(M.value);z.push(h),M.value=z}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=M.value),z)):C.push({key:"rowButton",contents:M.value}),r("change",C)},Y=()=>{f.value=!1,R.value="",K.value=[],X.value=[]},pe=h=>{u.value=!0;let C=[];Bt==null||Bt.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,J.value=h==null?void 0:h.id,O.value=C},de=h=>{var C;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Z=h=>{var I,W,w;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},oe=h=>{var I;u.value=!0;let C=[];Bt==null||Bt.forEach(W=>{y.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,J.value="",x.value=C,O.value=C},te=h=>{let C=v.cloneDeep(O.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),O.value=C},ie=()=>{u.value=!1,R.value="",J.value="",O.value=[]},Pe=()=>{var I,W,w,S,q,z;x.value=O.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(ue=>{const H=Bt==null?void 0:Bt.find(P=>(P==null?void 0:P.label)===(ue==null?void 0:ue.label));H?h[H.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(h.children=ue.children)}),(W=g.value)!=null&&W.find(ue=>ue.id===h.id))g.value=(w=g.value)==null?void 0:w.map(ue=>(ue.id===h.id&&(ue=h),ue));else{let ue=v.cloneDeep(g.value)??[];J.value===""?ue.push(h):ue=ue==null?void 0:ue.map(H=>(H.id===J.value&&(H.children||(H.children=[]),H.children.push(h)),H)),g.value=ue}g.value=(S=g.value)!=null&&S.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,u.value=!1,R.value="",J.value="";let C=v.cloneDeep(s.originalItemContents);(q=v.cloneDeep(s.originalItemContents))!=null&&q.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(z=v.cloneDeep(s.originalItemContents))==null?void 0:z.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),r("change",C)},nt=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var w;return(W==null?void 0:W.key)==="header"&&(W.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:C.contents,M.value=(W=(I=d.value)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:W.contents,we.value=(S=(w=d.value)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="extraButton"))==null?void 0:S.contents,_.value=(z=(q=d.value)==null?void 0:q.find(U=>(U==null?void 0:U.key)==="page"))!=null&&z.contents?!!((H=(ue=d.value)==null?void 0:ue.find(U=>(U==null?void 0:U.key)==="page"))!=null&&H.contents):!1,ge.value=(Be=(P=d.value)==null?void 0:P.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Be.contents,g.value=(ne=g.value)==null?void 0:ne.map((U,Oe)=>(Array.isArray(U)?U=ri(U):U={label:(U==null?void 0:U.label)??"",prop:(U==null?void 0:U.label)==="操作"?"operate":U==null?void 0:U.prop,width:U!=null&&U.width?parseInt(U.width):"",fixed:(U==null?void 0:U.fixed)??void 0,sortable:(U==null?void 0:U.sortable)??!1,align:(U==null?void 0:U.align)??"left",showOverflowTooltip:(U==null?void 0:U.showOverflowTooltip)??!0,isNotDrag:(U==null?void 0:U.isNotDrag)??!1,isEditCol:(U==null?void 0:U.isEditCol)??!1,isOperate:(U==null?void 0:U.isOperate)??!1,id:(U==null?void 0:U.id)??Oe,formMenuSelect:(U==null?void 0:U.formMenuSelect)??void 0,groupSelect:(U==null?void 0:U.groupSelect)??void 0},U)),g.value=(G=g.value)!=null&&G.every(U=>Array.isArray(U))?(ae=g.value)==null?void 0:ae[0]:g.value,M.value=(ce=M.value)==null?void 0:ce.map((U,Oe)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",textColor:(U==null?void 0:U.textColor)??"#000000",id:(U==null?void 0:U.id)??Oe}),we.value=(xe=we.value)==null?void 0:xe.map((U,Oe)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",background:(U==null?void 0:U.background)??"var(--ssComponent-primary-color)",id:(U==null?void 0:U.id)??Oe}),ge.value)ge.value=(Ne=ge.value)==null?void 0:Ne.map(U=>{y.value++;let Oe=U;return Oe.id=y.value,Oe});else{let U=[];const Oe=(Te=Ve.getColumnChild(v.cloneDeep(g.value)))==null?void 0:Te.filter(me=>(me==null?void 0:me.prop)!=="operate");Oe==null||Oe.forEach(me=>{var je;y.value++,U.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.prop)||(me==null?void 0:me.label),type:me!=null&&me.groupSelect?"Select":"Input",value:"",id:y.value,contents:me==null?void 0:me.options,menuSelect:me==null?void 0:me.formMenuSelect,groupSelect:(je=me==null?void 0:me.groupSelect)==null?void 0:je.split(":"),selectRelateType:"关联绑定列"})}),ge.value=U}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:Qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>pe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>oe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>nt(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:de,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ge},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Li,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>Ke(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Re(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ye},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>at(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Q(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:it},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>ee(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Pe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:le.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:L,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:We,onChangeVisible:Le,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=zt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=$t.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=$t.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((O=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:O.h)||s,minW:((J=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:J.minW)||ps.value,minH:((we=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:we.minH)||vs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,O;return((O=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:O.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=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}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(O=>{for(const[R,J]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===R)return{...O,value:J};return O})},{immediate:!0});const u=g=>St.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,O=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(O.type)),{modelValue:O.value,"onUpdate:modelValue":R=>O.value=R,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:R=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=zt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=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:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((le,D)=>(le[D==null?void 0:D.prop]=D==null?void 0:D.rule,le),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,le,D)=>{var N;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{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:(N=s==null?void 0:s.relatedData)==null?void 0:N.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...O(K,le,D)]:y=$,y},O=(K,le,D)=>{const $=[{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 D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,le)=>{var E,ge,Ye,it,Le,We,_e,V,ee;const D=((Le=(it=(Ye=(ge=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ge.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Ye.contents)==null?void 0:it.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:Le.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((ee=(V=(_e=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:_e.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:V.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],N=_(D,y,K);f.value=le?ks(N,le):N,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const J=K=>{const le=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const D=le==null?void 0:le.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},M=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},we=(K,le)=>{x.value=le==null?void 0:le.changeProp,J(K)},X=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:we,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=zt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},Ls={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),O=e.ref(!1),R=e.ref(0),J=e.ref([]),M=e.ref([]),we=(V,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[V.key]}if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[V.key];if((ee==null?void 0:ee.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const se=ee[V.key];return mr(se)?se:V.default}return(V==null?void 0:V.label)==="类型"&&ee[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!ee[V.key]?!1:ee[V.key]},X=async V=>{var fe,Je,at,Q,L,ye;d.value=!0;let ee=[];const se=await((at=(Je=(fe=Ve.FormContent)==null?void 0:fe.find(De=>(De==null?void 0:De.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Je.value)==null?void 0:at.value)??((L=(Q=Ve.FormContent)==null?void 0:Q.find(De=>(De==null?void 0:De.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:L.value);if(se==null||se.forEach(De=>{R.value++,ee.push({label:De==null?void 0:De.label,name:De==null?void 0:De.label,type:De.type,prop:De==null?void 0:De.prop,value:we(De,V),id:R.value,contents:De==null?void 0:De.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((ye=V==null?void 0:V.menuSelect)==null?void 0:ye.length)>0){const De=await Ve.menuToContentType(V==null?void 0:V.menuSelect);ee=ee==null?void 0:ee.map(Ke=>((Ke==null?void 0:Ke.name)==="组信息选项"&&(Ke.contents=De),Ke))}_.value=V==null?void 0:V.id,u.value=await Ve.selectToBase(Ve.formToOptionsContents(ee)),b.value=await Ve.selectToBase(Ve.formToOptionsContents(ee))},K=V=>{var se;g.value=!0;let ee=[];(se=Ve.FormButton)==null||se.forEach(fe=>{R.value++,ee.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"&&V[fe.key]===""?"normal":V[fe.key],id:R.value,contents:fe==null?void 0:fe.options})}),J.value=ee,M.value=ee,_.value=V==null?void 0:V.id};e.watch(()=>O.value,()=>{var ee,se;let V=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?V=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!O.value),fe)):V.push({key:"enableWrap",contents:!O.value}),r("change",V)},{deep:!0});const le=()=>{var se,fe,Je,at,Q;J.value=M.value;let V={};if(_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value),(se=J.value)==null||se.forEach(L=>{var De;const ye=(De=Ve.FormButton)==null?void 0:De.find(Ke=>(Ke==null?void 0:Ke.label)===(L==null?void 0:L.label));ye&&(V[ye.key]=L.value)}),(fe=f.value)!=null&&fe.find(L=>L.id===V.id))f.value=(Je=f.value)==null?void 0:Je.map(L=>(L.id===V.id&&(L=V),L));else{let L=v.cloneDeep(f.value);f.value||(f.value=[]),L.push(V),f.value=L}g.value=!1,_.value="";let ee=v.cloneDeep(s.originalItemContents);(at=v.cloneDeep(s.originalItemContents))!=null&&at.find(L=>(L==null?void 0:L.key)==="formButton")?ee=(Q=v.cloneDeep(s.originalItemContents))==null?void 0:Q.map(L=>((L==null?void 0:L.key)==="formButton"&&(L.contents=f.value),L)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},D=V=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;x.value=(ee=v.cloneDeep(x.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=x.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=V=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=f.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let V=[];(ee=Ve.FormButton)==null||ee.forEach(se=>{R.value++,V.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:R.value,contents:se==null?void 0:se.options})}),J.value=V,M.value=V},N=()=>{var ee,se,fe;d.value=!0;let V=[];(fe=(se=(ee=Ve.FormContent)==null?void 0:ee.find(Je=>(Je==null?void 0:Je.key)==="Input"))==null?void 0:se.value)==null||fe.forEach(Je=>{R.value++,V.push({label:Je==null?void 0:Je.label,name:Je==null?void 0:Je.label,type:Je.type,value:(Je==null?void 0:Je.label)==="类型"?"Input":"",id:R.value,contents:Je==null?void 0:Je.options})}),u.value=V,b.value=V},E=V=>{let ee=v.cloneDeep(M.value);ee=ee==null?void 0:ee.map(se=>(se.value=V==null?void 0:V[se.name],se)),M.value=ee},ge=V=>{const ee=V.find(Je=>(Je==null?void 0:Je.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=V.find(Je=>(Je==null?void 0:Je.name)==="多选"),fe=V.find(Je=>(Je==null?void 0:Je.name)==="初始值");se!=null&&se.value&&Bo.isString(fe.value)&&(fe.value=[fe.value]),!(se!=null&&se.value)&&!Bo.isString(fe.value)&&(fe.value="")},Ye=async V=>{var ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe;if((V==null?void 0:V.类型)!==((se=(ee=b.value)==null?void 0:ee.find(Ge=>(Ge==null?void 0:Ge.label)==="类型"))==null?void 0:se.value)){let Ge=[];const ve=await((at=(Je=(fe=Ve.FormContent)==null?void 0:fe.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Je.value)==null?void 0:at.value)?await((Ke=(De=(ye=Ve.FormContent)==null?void 0:ye.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:De.value)==null?void 0:Ke.value):(L=(Q=Ve.FormContent)==null?void 0:Q.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:L.value;if(ve==null||ve.forEach(F=>{var pe,de;R.value++;const Y=yr(F==null?void 0:F.default)?(V==null?void 0:V[F.label])??F.value??"":F==null?void 0:F.default;Ge.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:Y,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((de=(pe=b.value)==null?void 0:pe[0])==null?void 0:de.width)??1})}),V!=null&&V.菜单选项&&((Re=V==null?void 0:V.菜单选项)==null?void 0:Re.length)>0){const F=await Ve.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=F),Y))}ge(Ge),b.value=await Ve.selectToBase(v.cloneDeep(Ge)),u.value=await Ve.selectToBase(v.cloneDeep(Ge))}else{let Ge=v.cloneDeep(b.value);if(Ge=Ge==null?void 0:Ge.map(ve=>(ve.value=V==null?void 0:V[ve.name],ve)),V!=null&&V.菜单选项&&((Qe=V==null?void 0:V.菜单选项)==null?void 0:Qe.length)>0){const ve=await Ve.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=ve),F))}Ge=Ve.formToOptionsContents(Ge),ge(Ge),b.value=await Ve.selectToBase(v.cloneDeep(Ge))}},it=V=>{V||(u.value=b.value)},Le=async V=>{await Ye(V),u.value=b.value},We=vo(async()=>{var fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve;u.value=b.value;let V={};V.width=((Je=(fe=u.value)==null?void 0:fe[0])==null?void 0:Je.width)??1,_.value!==""?V.id=_.value:(R.value++,V.id="id"+R.value);let ee=await((L=(Q=(at=Ve.FormContent)==null?void 0:at.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Q.value)==null?void 0:L.value)??((De=(ye=Ve.FormContent)==null?void 0:ye.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:De.value);if((Ke=u.value)==null||Ke.forEach(F=>{const Y=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(F==null?void 0:F.label));Y&&(V[Y.key]=F.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Re=x.value)!=null&&Re.find(F=>F.id===V.id))x.value=(Qe=x.value)==null?void 0:Qe.map(F=>(F.id===V.id&&(F=V),F));else{let F=v.cloneDeep(x.value);F.push(V),x.value=F}x.value=x.value.map(({id:F,...Y})=>Y),d.value=!1,_.value="";let se=v.cloneDeep(s.originalItemContents);(Ge=v.cloneDeep(s.originalItemContents))!=null&&Ge.find(F=>(F==null?void 0:F.key)==="formContent")?se=(ve=v.cloneDeep(s.originalItemContents))==null?void 0:ve.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),_e=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,fe,Je,at,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=v.cloneDeep(s.originalItemContents);x.value=((ee=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="formButton"))==null?void 0:se.contents)??[],O.value=(fe=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&fe.contents?!((Je=V==null?void 0:V.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&Je.contents):!0,x.value=(at=v.cloneDeep(x.value))==null?void 0:at.map((L,ye)=>{var Ke;let De=L;return De.id=(L==null?void 0:L.id)??ye,L!=null&&L.label||(L.label=(L==null?void 0:L.key)??(L==null?void 0:L.label)??""),L!=null&&L.type||(L.type=(L==null?void 0:L.type)??""),L.contents=((Ke=L==null?void 0:L.options)==null?void 0:Ke.length)===0?(L==null?void 0:L.contents)??"":L==null?void 0:L.options,De}),x.value=Ve.formToOptionsContents(x.value),f.value=(Q=f.value)==null?void 0:Q.map((L,ye)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(V,ee)=>{const se=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:N},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Je,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Je.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>D(Je)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Je,at)=>(e.openBlock(),e.createElementBlock("div",{key:at},[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,e.toDisplayString(Je.label),1),e.createElementVNode("div",zs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>$(Je)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:O.value,"onUpdate:modelValue":ee[0]||(ee[0]=Je=>O.value=Je)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ye,onChangeVisible:it,onBlurChange:Le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(fe,{onClick:_e,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=zt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),O=X=>{var K;x.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},J=X=>{var K,le,D;if((X==null?void 0:X.buttonName)==="确认"){const $=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(le=_.value)==null?void 0:le.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=M())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),we=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:we,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=zt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=X=>{var K;u.value=X,r("change",(K=M())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},J=X=>{var K,le,D,$;if((X==null?void 0:X.buttonName)==="确认"){const y=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(N=>{y[N]===""&&delete y[N]}),d.value){case"create":(le=b.value)==null||le.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(N=>N.index===(y==null?void 0:y.index)?{...N,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:N);break}r("change",($=M())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),we=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(u.value=((K=X==null?void 0:X.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((le=X==null?void 0:X.find(D=>D.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:we,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=zt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=zt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var N;if(y.key==="extra"){let E=[];(N=y.value)==null||N.forEach(ge=>{var Ye;E.push((Ye=Object.values(ge))==null?void 0:Ye[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const O=(D,$,y,N)=>{var ge;let E={};((ge=D==null?void 0:D[0])==null?void 0:ge.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Ye=>(Ye==null?void 0:Ye.key)!=="tableContentName"),f.value=E,x.value=y,_.value=N.id)},R=D=>{var Ye,it,Le,We;const $=(it=(Ye=Object.values(v.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=(We=(Le=Object.values(v.cloneDeep(f.value)))==null?void 0:Le[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=y==null?void 0:y.map((_e,V)=>{var ee;return V===D.index&&(_e==null?void 0:_e.comp)==="Table"&&(_e.compData=(ee=_e.compData)==null?void 0:ee.map(se=>{var fe,Je;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Je=(fe=D.content)==null?void 0:fe.map(at=>{let Q={};for(let L in at)L!=="id"&&(Q[L]=at[L]);return Q}))==null?void 0:Je.map(at=>Object.values(at))),se})),_e});N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let _e in E)ge[_e]=N;f.value=ge},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},M=D=>{var Ye,it,Le,We;const $=(it=(Ye=Object.values(v.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=(We=(Le=Object.values(v.cloneDeep(f.value)))==null?void 0:Le[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=y==null?void 0:y.map((_e,V)=>(V===D.index&&(_e.compData=D.contents),_e));N.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let _e in E)ge[_e]=N;f.value=ge},we=()=>{var $,y;let D={};for(let N in x.value)N===(($=Object.keys(f.value))==null?void 0:$[0])?D[N]=(y=Object.values(f.value))==null?void 0:y[0]:D[N]=x.value[N];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},le=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(N==null?void 0:N.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:E,index:(N==null?void 0:N.id)??E,onContentClick:O,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(N.comp)),{itemData:N==null?void 0:N.compData,onChange:R,childItemData:N==null?void 0:N.itemChildData,key:E,onContentChange:M,index:(N==null?void 0:N.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=zt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Ve.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Ve.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=$t.useModelComp(v.pinia),_=e.ref(!1),O=$t.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:J,isEdit:M,routeToChildPath:we,tableViewContents:X,lockingPage:K,payloadTypes:le}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(O),{loginUserInfo:N}=v.storeToRefs(R),E=e.ref(!1),ge=async()=>{var Q,L;(Q=i.value)!=null&&Q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await se((L=i.value)==null?void 0:L.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!E.value&&await at(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Ye=()=>{u.value=!1,b.value=void 0},it=Q=>Q.map(L=>{const ye={};for(const De in L){const Ke=L[De];if(De.includes(f.value)){const Re=De.split(f.value);let Qe=ye;Re.forEach((Ge,ve)=>{ve===Re.length-1?Qe[Ge]=Ke:(Qe[Ge]||(Qe[Ge]={}),Qe=Qe[Ge])})}else ye[De]=Ke}return ye}),Le=async(Q,L,ye=[])=>{var Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt;let De=(Ke=v.cloneDeep(L))==null?void 0:Ke.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let h=(F=(ve=(Ge=(Qe=(Re=v.cloneDeep(Q))==null?void 0:Re.split("["))==null?void 0:Qe[1])==null?void 0:Ge.split("]"))==null?void 0:ve[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(Y=De==null?void 0:De.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:Y.compData;if(!I){let W=(pe=Q==null?void 0:Q.split("["))==null?void 0:pe[0],w=await Ve.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",ye);I=(de=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:de.compData}I==null||I.forEach(W=>{var w,S,q,z,ue,H;if((W==null?void 0:W.key)==="formContent")(w=W==null?void 0:W.contents)==null||w.forEach(P=>{var Be;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Be=P==null?void 0:P.value)==null?void 0:Be.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Be=(S=I==null?void 0:I.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,ne=(h==null?void 0:h[1])??"";if(Be!=null&&Be.every(G=>Array.isArray(G))){let G=Ve.getColumnChild((ue=Be==null?void 0:Be[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(H=W.contents)==null||H.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(xe=>!(xe!=null&&xe.id)),G==null||G.forEach((xe,Te)=>{let Ne=ae[Te];typeof ae[Te]=="number"&&(Ne=ae[Te].toString()),(ne===""||ne===xe.prop)&&(ce[xe.prop]=Ne)}),P.push(ce)}),P=it(P)}else{let G=(q=Be==null?void 0:Be.map(ae=>ae==null?void 0:ae.label))==null?void 0:q.filter(ae=>ae!=="操作");(z=W.contents)==null||z.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(xe=>!(xe!=null&&xe.id)),G==null||G.forEach((xe,Te)=>{let Ne=ae[Te];typeof ae[Te]=="number"&&(Ne=ae[Te].toString()),(ne===""||ne===xe)&&(ce[xe]=Ne)}),P.push(ce)})}C=P}})}return C}else if(Q!=null&&Q.includes("/")){let h={};return(Z=v.cloneDeep(De))==null||Z.forEach((C,I)=>{var W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;if((C==null?void 0:C.comp)==="Table"){let je=Array.isArray((S=(w=(W=C==null?void 0:C.compData)==null?void 0:W.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(H=(ue=(z=(q=C==null?void 0:C.compData)==null?void 0:q.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:z.contents)==null?void 0:ue[0])==null?void 0:H.some($e=>$e==null?void 0:$e.children):[],lt=(ne=(Be=(P=C==null?void 0:C.compData)==null?void 0:P.find($e=>($e==null?void 0:$e.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:ne.map($e=>($e!=null&&$e.find(ht=>ht==null?void 0:ht.id)&&($e=$e.slice(1)),$e)),qe=(Te=(xe=(ce=(ae=(G=C==null?void 0:C.compData)==null?void 0:G.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:ae.contents)==null?void 0:ce[0])==null?void 0:xe[0])==null?void 0:Te.label,ot=(U=(Ne=C==null?void 0:C.compData)==null?void 0:Ne.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:U.contents;if(je)(je==null?void 0:je.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Ve.tableToForm(lt,ot):h[qe]=Ve.tableToForm(lt,ot);else{const $e=[];ot=ot.slice(1,ot.length-1),ot==null||ot.forEach((ht,et)=>{lt==null||lt.forEach(ze=>{$e.push({key:ht.label+ze[0],value:ze[et+1]})})}),h["form"+I]=$e}}else{const je=(me=(Oe=C.compData)==null?void 0:Oe.find(qe=>(qe==null?void 0:qe.key)==="formContent"))==null?void 0:me.contents;h!=null&&h.form||(h.form=[]);const lt=[];je==null||je.forEach(qe=>{qe.key!==""&&(qe={key:(qe==null?void 0:qe.key)??(qe==null?void 0:qe.label),value:qe==null?void 0:qe.value},lt.push(qe))}),h.form=[...lt,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(Q==="createInsofDataApi"){let h=(oe=v.cloneDeep(L))==null?void 0:oe[0];return h={comp:(te=v.cloneDeep(h))==null?void 0:te.comp,compData:(ie=v.cloneDeep(h))==null?void 0:ie.compData,name:(Pe=v.cloneDeep(h))==null?void 0:Pe.name,isShow:(nt=v.cloneDeep(h))==null?void 0:nt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return Q}},We=async(Q,L,ye)=>{var Re,Qe,Ge;let De=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Ke=De==null?void 0:De.find(ve=>(ve==null?void 0:ve.name)===(ye==null?void 0:ye[0]));if(Ke){if((Ke==null?void 0:Ke.comp)==="Table"){let ve={};for(let te in v.cloneDeep(Q))v.cloneDeep(Q)[te]!=="loginUser"?ve[te]=v.cloneDeep(Q)[te]:ve[te]=((Re=N.value)==null?void 0:Re.account)||((Qe=N.value)==null?void 0:Qe.账号);let F=[],Y=ve;Array.isArray(Q)||(Y=[ve]),Y==null||Y.forEach(te=>{F.push({[te[ye[1]]]:te})});let pe=[],de=F==null?void 0:F.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]});De==null||De.forEach(te=>{var ie;(te==null?void 0:te.name)===(ye==null?void 0:ye[0])&&((ie=te==null?void 0:te.compData)==null||ie.forEach(Pe=>{var nt;(Pe==null?void 0:Pe.key)==="tableContents"&&((nt=Pe==null?void 0:Pe.contents)==null||nt.forEach(h=>{h!=null&&h.some(C=>de.includes(C))&&pe.push({[h.find(C=>C.id).id]:h.find(C=>de.includes(C))})}))}))});let Z=pe==null?void 0:pe.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]}),oe=[];if(Z==null||Z.forEach(te=>{var nt;let ie=(nt=pe==null?void 0:pe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:nt[te],Pe=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===ie});oe.push({id:parseInt(te),value:{tableData:Pe[ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((Ke==null?void 0:Ke.comp)==="Form"){let ve=v.cloneDeep(Ke);ve.compData=(Ge=ve.compData)==null?void 0:Ge.map(pe=>{var de;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(de=pe.contents)==null?void 0:de.map(Z=>((Z==null?void 0:Z.key)===(ye==null?void 0:ye[1])&&(Z.value=(Q==null?void 0:Q[Z==null?void 0:Z.prop])||Q),Z))),pe});let F={};for(let pe in ve)pe!=="id"&&(F[pe]=ve[pe]);let Y=[];if(Y.push({id:Ke==null?void 0:Ke.id,keyType:ye==null?void 0:ye[1],value:{pageData:F}}),(Y==null?void 0:Y.length)>0)return Y}}},_e=async(Q,L,ye)=>{var Re,Qe,Ge,ve,F,Y,pe,de,Z,oe;let De=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Ke=De==null?void 0:De.find(te=>(te==null?void 0:te.name)===(ye==null?void 0:ye[0]));if(Ke){if((Ke==null?void 0:Ke.comp)==="Table"){let te={};for(let ie in v.cloneDeep(Q))v.cloneDeep(Q)[ie]!=="loginUser"?te[ie]=v.cloneDeep(Q)[ie]:te[ie]=((Re=N.value)==null?void 0:Re.account)||((Qe=N.value)==null?void 0:Qe.账号);await v.createInsofDataApi({key:{type:"data",pageKey:L,tableId:Ke==null?void 0:Ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if((Ke==null?void 0:Ke.comp)==="Form"){let te=v.cloneDeep(Ke),ie=Object.keys(Q),Pe="";(ve=(Ge=v.cloneDeep(te))==null?void 0:Ge.compData)==null||ve.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(z=>{var ue;ie.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((ue=N.value)==null?void 0:ue.姓名)&&(Pe=z==null?void 0:z.key)}))});let nt=[];(F=Object.values(Q[Pe]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&nt.push(w)}),nt=[...new Set(nt)];const h=nt==null?void 0:nt.map(async w=>{var H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe;let S="";(ae=(G=(ne=(Be=(P=(H=v.cloneDeep(w))==null?void 0:H.split("("))==null?void 0:P[1])==null?void 0:Be.split(")"))==null?void 0:ne[0])==null?void 0:G.split(":"))==null||ae.forEach(me=>{S=S===""?S+me.replaceAll("'",""):S+"/"+me.replaceAll("'","")});let q=[];(Oe=(U=(Ne=(Te=(xe=(ce=v.cloneDeep(w))==null?void 0:ce.split("<"))==null?void 0:xe[1])==null?void 0:Te.split(">"))==null?void 0:Ne[0])==null?void 0:U.split(":"))==null||Oe.forEach(me=>{q.push(me.replaceAll("'",""))});const z=await Ve.getItemData(S,sessionStorage.getItem("systemKey"),"");let ue="";return z==null||z.forEach(me=>{var je;me.name===(q==null?void 0:q[0])&&((je=me==null?void 0:me.compData)==null||je.forEach(lt=>{var qe;(lt==null?void 0:lt.key)==="formContent"&&((qe=lt.contents)==null||qe.forEach(ot=>{(ot==null?void 0:ot.key)===(q==null?void 0:q[1])&&(ue=ot==null?void 0:ot.value)}))}))}),{[w]:ue}}),C=await Promise.all(h);te.compData=(pe=(Y=v.cloneDeep(te))==null?void 0:Y.compData)==null?void 0:pe.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(z=>{var ue,H,P,Be;return(ue=Q[Pe])!=null&&ue[z==null?void 0:z.key]&&(Q[Pe][z==null?void 0:z.key].includes("(")?z.value=(H=C==null?void 0:C.find(ne=>{var G;return((G=Object.keys(ne))==null?void 0:G[0])===Q[Pe][z==null?void 0:z.key]}))==null?void 0:H[Q[Pe][z==null?void 0:z.key]]:z.value=(Be=(P=v.cloneDeep(Q))==null?void 0:P[Pe])==null?void 0:Be[z==null?void 0:z.key]),z})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let W="";((de=I==null?void 0:I.data)==null?void 0:de.type)==="success"&&((oe=(Z=I==null?void 0:I.data)==null?void 0:Z.result)==null||oe.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(ye==null?void 0:ye[0])&&(W=w.id)}),await v.updateInsofDataApi({id:W,value:{pageData:te}}))}}},V=(Q,L="",ye={})=>{for(const[De,Ke]of Object.entries(Q)){const Re=L?`${L}.${De}`:De;Ke!==null&&typeof Ke=="object"&&!Array.isArray(Ke)&&Object.prototype.toString.call(Ke)!=="[object Date]"?V(Ke,Re,ye):ye[Re]=Ke}return ye},ee=async(Q,L,ye,De)=>{var Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be;let Ke=await Ve.getItemData(L,sessionStorage.getItem("systemKey"),""),Re=Ke==null?void 0:Ke.find(ne=>(ne==null?void 0:ne.name)===(ye==null?void 0:ye[0]));if(Re){if(!(ye!=null&&ye[1])&&(Re==null?void 0:Re.comp)==="Table"){let ne={},G=[],ae=(Ge=(Qe=Re==null?void 0:Re.compData)==null?void 0:Qe.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:Ge.contents;ae!=null&&ae.every(Te=>Array.isArray(Te))?G=(F=Ve.getColumnChild((ve=ae==null?void 0:ae[0])==null?void 0:ve.filter(Te=>(Te==null?void 0:Te.label)!=="操作")))==null?void 0:F.map(Te=>Te==null?void 0:Te.prop):G=ae==null?void 0:ae.map(Te=>Te==null?void 0:Te.label);for(let Te in v.cloneDeep(Q))if(v.cloneDeep(Q)[Te]!=="loginUser"){let Ne=V(v.cloneDeep(Q)[Te]),U={};for(let Oe in Ne)if(G!=null&&G.find(me=>me===Oe))U[Oe]=Ne[Oe];else if(G!=null&&G.find(me=>(me==null?void 0:me.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()))){let me=G==null?void 0:G.find(je=>(je==null?void 0:je.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()));U[me]=Ne[Oe]}ne[Te]=U}else ne[Te]=((Y=N.value)==null?void 0:Y.account)||((pe=N.value)==null?void 0:pe.账号);let ce=await v.getInsofDataApi({keyLikes:{tableId:Re==null?void 0:Re.id}});if(((Z=(de=ce==null?void 0:ce.data)==null?void 0:de.result)==null?void 0:Z.length)>0){let Te=(te=(oe=ce==null?void 0:ce.data)==null?void 0:oe.result)==null?void 0:te.map(Ne=>Ne==null?void 0:Ne.id);(Te==null?void 0:Te.length)>0&&await v.batchDeleteInsofDataApi({ids:Te})}let xe=[];if((ie=Re==null?void 0:Re.compData)!=null&&ie.find(Te=>(Te==null?void 0:Te.key)==="pageColumn")&&((h=(nt=(Pe=Re==null?void 0:Re.compData)==null?void 0:Pe.find(Te=>(Te==null?void 0:Te.key)==="pageColumn"))==null?void 0:nt.contents)!=null&&h.includes("["))){const Te=await v.getInsofDataApi({id:Re==null?void 0:Re.tableId});let Ne=((w=(W=(I=(C=Te==null?void 0:Te.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:w.pageKey)??"";(S=Object.values(ne))==null||S.forEach(U=>{xe.push({key:{type:"data",pageKey:Ne,tableId:Re==null?void 0:Re.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(ne))==null||q.forEach(Te=>{xe.push({key:{type:"data",pageKey:L,tableId:Re==null?void 0:Re.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Te}})});(xe==null?void 0:xe.length)>0&&await v.batchAddInsofDataApi({dataList:xe})}else if(!(ye!=null&&ye[1])&&(Re==null?void 0:Re.comp)==="Form"){let ne=v.cloneDeep(Re);ne.compData=(ue=(z=v.cloneDeep(ne))==null?void 0:z.compData)==null?void 0:ue.map(ce=>{var xe,Te;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Te=(xe=v.cloneDeep(ce))==null?void 0:xe.contents)==null?void 0:Te.map(Ne=>{var U,Oe;return(U=v.cloneDeep(Q))!=null&&U[Ne==null?void 0:Ne.key]&&(Ne.value=(Oe=v.cloneDeep(Q))==null?void 0:Oe[Ne==null?void 0:Ne.key]),Ne})),ce});const G=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((H=G==null?void 0:G.data)==null?void 0:H.type)==="success"&&((Be=(P=G==null?void 0:G.data)==null?void 0:P.result)==null||Be.forEach(ce=>{var xe,Te;((Te=(xe=ce==null?void 0:ce.value)==null?void 0:xe.pageData)==null?void 0:Te.name)===(ye==null?void 0:ye[0])&&(ae=ce.id)}),await v.updateInsofDataApi({id:ae,value:{pageData:ne}}))}}},se=async Q=>{var L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie;O.setImportLoading(!0);try{if(Q.api){let Pe=new WeakMap;(ye=(L=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:L.filter(H=>{var P,Be;return((P=H==null?void 0:H.key)==null?void 0:P.pageKey)!=="menu"&&((Be=H==null?void 0:H.key)==null?void 0:Be.pageKey)!=="secret"}))==null||ye.forEach(H=>{Pe[H.key.pageKey]?Pe[H.key.pageKey]=[...Pe[H.key.pageKey],H]:Pe[H.key.pageKey]=[H]});let h=await Ve.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Pe),C="";if(h=h==null?void 0:h.map(H=>{var P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me;if((H==null?void 0:H.comp)==="Form")H.compData=(P=H.compData)==null?void 0:P.map(je=>{var lt;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(lt=je.contents)==null?void 0:lt.map(qe=>{var ot;if((qe==null?void 0:qe.value)===""&&(qe==null?void 0:qe.type)==="Select"){let $e=Ve.judgeContents((ot=v.cloneDeep(qe))==null?void 0:ot.optionUrl,Pe);qe.value=qe.value||$e}return qe})),je});else if((H==null?void 0:H.comp)==="Table"&&(Be=H.compData)!=null&&Be.find(je=>(je==null?void 0:je.key)==="pageColumn")){let je=(G=(ne=H.compData)==null?void 0:ne.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:G.contents,lt=((ce=(ae=H.compData)==null?void 0:ae.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:ce.contents)??"",qe=(Ne=(Te=(xe=je==null?void 0:je.split("["))==null?void 0:xe[1])==null?void 0:Te.split("]"))==null?void 0:Ne[0];C=((U=je==null?void 0:je.split("["))==null?void 0:U[0])+((me=(Oe=X.value)==null?void 0:Oe.find($e=>($e==null?void 0:$e.key)===qe))==null?void 0:me.value)}return H}),!(C===""||C==="")){const H=await Ve.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);h=h==null?void 0:h.map(P=>{var Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt;if((P==null?void 0:P.comp)==="Table"&&(Be=P.compData)!=null&&Be.find(qe=>(qe==null?void 0:qe.key)==="pageColumn")){let qe=(G=(ne=P.compData)==null?void 0:ne.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:G.contents,ot=((ce=(ae=P.compData)==null?void 0:ae.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:ce.contents)??"",$e=(Ne=(Te=(xe=qe==null?void 0:qe.split("["))==null?void 0:xe[1])==null?void 0:Te.split("]"))==null?void 0:Ne[0],ht=((U=qe==null?void 0:qe.split("["))==null?void 0:U[0])+((me=(Oe=X.value)==null?void 0:Oe.find(ze=>(ze==null?void 0:ze.key)===$e))==null?void 0:me.value),et=(je=H==null?void 0:H.find(ze=>(ze==null?void 0:ze.name)===(ot===""?d==null?void 0:d.compName:ot)))==null?void 0:je.compData;P.compData=(lt=P.compData)==null?void 0:lt.map(ze=>{var he;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(he=et==null?void 0:et.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:he.contents),ze})}return P})}let I={};if(((Ke=(De=Q==null?void 0:Q.extraValues)==null?void 0:De.input)==null?void 0:Ke.length)>0){const H=(Qe=(Re=Q==null?void 0:Q.extraValues)==null?void 0:Re.input)==null?void 0:Qe.map(async P=>{var Be;fe!=null&&fe.find(ne=>ne===P)?I=await Le(P,h):I[Object.keys(P)[0]]=await Le((Be=Object.values(P))==null?void 0:Be[0],h,Pe)});await Promise.all(H)}else I=await Le("/",h);let W=!1;(ve=(Ge=Q==null?void 0:Q.extraValues)==null?void 0:Ge.output)==null||ve.forEach(H=>{var P,Be;(Be=(P=Object.values(H))==null?void 0:P[0])!=null&&Be.includes(".doc")&&(W=!0)});let w;if(W){const H=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(Q.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else w=await v.axios.post(Q.api,I,{headers:{"Content-Type":"application/json"}});let S=(de=(pe=(Y=(F=v.cloneDeep(Q))==null?void 0:F.extraValues)==null?void 0:Y.output)==null?void 0:pe.map(H=>{var P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot;if(!((Be=(P=Object.values(H))==null?void 0:P[0])!=null&&Be.includes(".doc"))){let $e=(U=(Ne=(Te=(G=v.cloneDeep((ne=Object.values(H))==null?void 0:ne[0]))==null?void 0:G.split("["))==null?void 0:Te[((xe=(ce=v.cloneDeep((ae=Object.values(H))==null?void 0:ae[0]))==null?void 0:ce.split("["))==null?void 0:xe.length)-1])==null?void 0:Ne.split("]"))==null?void 0:U[0],ht=$e==null?void 0:$e.split(":"),et=(je=v.cloneDeep((Oe=Object.values(H))==null?void 0:Oe[0]))==null?void 0:je.substring(0,v.cloneDeep((me=Object.values(H))==null?void 0:me[0]).lastIndexOf("["));if(et=(qe=v.cloneDeep(et))==null?void 0:qe.slice(0,((lt=v.cloneDeep(et))==null?void 0:lt.length)-1),et!=null&&et.includes("[")){let ze="";if((ot=Ve.contentTransArrayToAll(et,"/"))==null||ot.forEach(he=>{var Ae,mt,ke,Ee,be,Se,B;if(!(he!=null&&he.includes("[")))ze=ze===""?ze+he.replaceAll("/",""):ze+"/"+he.replaceAll("/","");else{let Ie=v.cloneDeep(he).slice(1,((Ae=v.cloneDeep(he))==null?void 0:Ae.length)-1),tt=(Se=(be=(Ee=(ke=(mt=v.cloneDeep(Ie))==null?void 0:mt.split("["))==null?void 0:ke[1])==null?void 0:Ee.split("]"))==null?void 0:be[0])==null?void 0:Se.split(":"),Fe="",Xe=(B=h==null?void 0:h.find(Me=>(Me==null?void 0:Me.name)===(tt==null?void 0:tt[0])))==null?void 0:B.compData;Xe==null||Xe.forEach(Me=>{var dt;(Me==null?void 0:Me.key)==="formContent"&&((dt=Me==null?void 0:Me.contents)==null||dt.forEach(ut=>{(ut==null?void 0:ut.key)===(tt==null?void 0:tt[1])&&(Fe=ut==null?void 0:ut.value)}))}),ze=ze===""?ze+Fe.replaceAll("/",""):ze+"/"+Fe.replaceAll("/","")}}),et=ze,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:de.filter(H=>H);S=[...new Set(v.cloneDeep(S))];let q=S==null?void 0:S.map(async H=>{let P=await Ve.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);if((P==null?void 0:P.length)===0)return await Ve.getParentContents(H)});await Promise.all(q);let z=[],ue=(te=(oe=(Z=v.cloneDeep(Q))==null?void 0:Z.extraValues)==null?void 0:oe.output)==null?void 0:te.map(async H=>{var Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt,ke,Ee,be,Se,B,Ie,tt,Fe,Xe,Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa,wt,Zt,yt,fn,Mt,ca,Ea,oa,ma,Qt;if((Ne=(Te=Object.values(H))==null?void 0:Te[0])!=null&&Ne.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Be=w.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ne.exec(Be),ae=G==null?void 0:G[1],ce=document.createElement("a"),xe=window.URL.createObjectURL(P);b.value=[{name:ae,blobUrl:xe}],u.value=!0}else{let La=($e=(ot=(qe=(Oe=v.cloneDeep((U=Object.values(H))==null?void 0:U[0]))==null?void 0:Oe.split("["))==null?void 0:qe[((lt=(je=v.cloneDeep((me=Object.values(H))==null?void 0:me[0]))==null?void 0:je.split("["))==null?void 0:lt.length)-1])==null?void 0:ot.split("]"))==null?void 0:$e[0],Tt=La==null?void 0:La.split(":"),qt=(ze=v.cloneDeep((ht=Object.values(H))==null?void 0:ht[0]))==null?void 0:ze.substring(0,v.cloneDeep((et=Object.values(H))==null?void 0:et[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ae=v.cloneDeep(qt))==null?void 0:Ae.slice(0,((he=v.cloneDeep(qt))==null?void 0:he.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(mt=Ve.contentTransArrayToAll(qt,"/"))==null||mt.forEach((At,Ut)=>{var Wt,Rt,ua,la,za,Ya,Fa,Ja,Sn,rn,vn;if(!(At!=null&&At.includes("[")))Et=Et===""?Et+At.replaceAll("/",""):Et+"/"+At.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(At))!=null&&Wt.includes("]")?(ln=v.cloneDeep(At).slice(1,((Rt=v.cloneDeep(At))==null?void 0:Rt.length)-1),va=(Fa=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:Fa.split(":")):(ln=v.cloneDeep(At).slice(1,(Ja=v.cloneDeep(At))==null?void 0:Ja.length),va=(Sn=v.cloneDeep(ln))==null?void 0:Sn.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Tn;(ia==null?void 0:ia.key)==="formContent"&&((Tn=ia==null?void 0:ia.contents)==null||Tn.forEach(Ra=>{(Ra==null?void 0:Ra.key)===(va==null?void 0:va[1])&&(Za=Ra==null?void 0:Ra.value)}))}),((vn=Ve.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(ke=D.value)!=null&&ke.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((Ee=Object.keys(H))==null?void 0:Ee[0]);if(((be=w==null?void 0:w.data)==null?void 0:be.statusCode)===200||((Se=w==null?void 0:w.data)==null?void 0:Se.code)===200){if(((Ie=(B=w==null?void 0:w.data)==null?void 0:B.data)!=null&&Ie[ra]||(Fe=(tt=w==null?void 0:w.data)==null?void 0:tt.result)!=null&&Fe[ra])&&(Tt==null?void 0:Tt.length)===1)return await ee(((Me=(Xe=w==null?void 0:w.data)==null?void 0:Xe.data)==null?void 0:Me[ra])||((ut=(dt=w==null?void 0:w.data)==null?void 0:dt.result)==null?void 0:ut[ra]),v.cloneDeep(qt),Tt,C);if((vt=(st=w==null?void 0:w.data)==null?void 0:st.data)!=null&&vt[ra]||(Nt=(bt=w==null?void 0:w.data)==null?void 0:bt.result)!=null&&Nt[ra]){let Et=await We(((Vt=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:Vt[ra])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[ra]),v.cloneDeep(qt),Tt);return Et&&(z=[...z,...Et]),Et}else{if(!((xt=w==null?void 0:w.data)!=null&&xt.data)){let Et=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Pe);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(Tt==null?void 0:Tt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Rt=>{var ua;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(ua=Rt.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(Tt==null?void 0:Tt[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Rt})),Ut});let At=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Rt in Ut)Rt!=="id"&&(Wt[Rt]=Ut[Rt]);At.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(At==null?void 0:At.length)>0&&await v.batchUpdateInsofDataApi({dataList:At});return}if((Tt==null?void 0:Tt.length)===1){const Et=(Va=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Va.path;let At="";(ja=(Da=(Ka=(Oa=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Oa.split(")"))==null?void 0:Ka[0])==null?void 0:Da.split(":"))==null||ja.forEach(Rt=>{var ua,la;At=At===""?At+((ua=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:ua.trim()):At+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Ma=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Ma.data)!=null&&ba[Tt==null?void 0:Tt[0]]?Wt=await ee((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[Tt==null?void 0:Tt[0]],At,Tt,C):Wt=await _e((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,At,Ut,Pe),Wt}else{const Et=(Zt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Zt.path;let At="";return(Ea=(ca=(Mt=(fn=(yt=Et==null?void 0:Et.split("("))==null?void 0:yt[1])==null?void 0:fn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Rt,ua;At=At===""?At+((Rt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Rt.trim()):At+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await We((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[Tt==null?void 0:Tt[0]],At,Tt)}}}}});if(await Promise.all(ue),(z==null?void 0:z.length)>0){let H=[];z==null||z.forEach(ne=>{H!=null&&H.find(G=>{var ae,ce,xe,Te;return((ce=(ae=G==null?void 0:G.value)==null?void 0:ae.pageData)==null?void 0:ce.name)===((Te=(xe=ne==null?void 0:ne.value)==null?void 0:xe.pageData)==null?void 0:Te.name)})||H.push(ne)});let P=[];H==null||H.forEach(ne=>{var ce,xe,Te,Ne;let G=v.cloneDeep(ne);G.value.pageData.compData=(ce=G.value.pageData.compData)==null?void 0:ce.map(U=>{var Oe;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Oe=U.contents)==null?void 0:Oe.map(me=>{var lt,qe,ot,$e;let je=(lt=v.cloneDeep(z))==null?void 0:lt.find(ht=>(ht==null?void 0:ht.keyType)===(me==null?void 0:me.key));if(je){let ht=($e=(ot=(qe=je.value.pageData.compData)==null?void 0:qe.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:ot.contents)==null?void 0:$e.find(et=>(et==null?void 0:et.key)===(me==null?void 0:me.key));me.value=ht==null?void 0:ht.value}return me})),U}),P.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ae=[];(Ne=(Te=(xe=G==null?void 0:G.value)==null?void 0:xe.pageData)==null?void 0:Te.compData)==null||Ne.forEach(U=>{var Oe;(U==null?void 0:U.key)==="formContent"&&((Oe=U==null?void 0:U.contents)==null||Oe.forEach(me=>{var je,lt,qe,ot,$e,ht;if((lt=(je=me==null?void 0:me.optionUrl)==null?void 0:je.menuSelect)!=null&&lt.find(et=>et==null?void 0:et.includes("[")))if(ae!=null&&ae.find(et=>{var ze,he,Ae;return((ze=et==null?void 0:et.key)==null?void 0:ze.join(","))===((Ae=(he=me==null?void 0:me.optionUrl)==null?void 0:he.menuSelect)==null?void 0:Ae.join(","))})){let et=(qe=ae==null?void 0:ae.find(ze=>{var he,Ae,mt;return((he=ze==null?void 0:ze.key)==null?void 0:he.join(","))===((mt=(Ae=me==null?void 0:me.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:mt.join(","))}))==null?void 0:qe.value;et.push({key:me==null?void 0:me.prop,groups:(ot=me==null?void 0:me.optionUrl)==null?void 0:ot.groupSelect,value:me==null?void 0:me.value}),ae=ae==null?void 0:ae.map(ze=>{var he,Ae,mt;return((he=ze==null?void 0:ze.key)==null?void 0:he.join(","))===((mt=(Ae=me==null?void 0:me.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:mt.join(","))&&(ze.value=et),ze})}else ae.push({key:($e=me==null?void 0:me.optionUrl)==null?void 0:$e.menuSelect,value:[{key:me==null?void 0:me.prop,groups:(ht=me==null?void 0:me.optionUrl)==null?void 0:ht.groupSelect,value:me==null?void 0:me.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(U=>{var me;let Oe="";return(me=U==null?void 0:U.key)==null||me.forEach(je=>{var lt;if(!(je!=null&&je.includes("[")))Oe=Oe===""?Oe+je:Oe+"/"+je;else{let qe="",ot=(lt=je==null?void 0:je.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":");h==null||h.forEach($e=>{var ht;($e==null?void 0:$e.name)===(ot==null?void 0:ot[0])&&((ht=$e==null?void 0:$e.compData)==null||ht.forEach(et=>{var ze;(et==null?void 0:et.key)==="formContent"&&((ze=et==null?void 0:et.contents)==null||ze.forEach(he=>{(he==null?void 0:he.prop)===(ot==null?void 0:ot[1])&&(qe=he==null?void 0:he.value)}))}))}),Oe=Oe+r.value+qe}}),U.key=Oe,U})),ae==null||ae.forEach(U=>{var lt,qe,ot;let Oe=(lt=Pe[U.key])==null?void 0:lt.find($e=>{var ht,et,ze,he,Ae,mt,ke;return((et=(ht=$e==null?void 0:$e.value)==null?void 0:ht.pageData)==null?void 0:et.name)===((Ae=(he=(ze=U==null?void 0:U.value)==null?void 0:ze[0])==null?void 0:he.groups)==null?void 0:Ae[0])&&((ke=(mt=$e==null?void 0:$e.value)==null?void 0:mt.pageData)==null?void 0:ke.name)!==void 0}),me=Oe==null?void 0:Oe.id,je=(qe=Oe==null?void 0:Oe.value)==null?void 0:qe.pageData;je.compData=(ot=je.compData)==null?void 0:ot.map($e=>{var ht;return($e==null?void 0:$e.key)==="formContent"&&($e.contents=(ht=$e.contents)==null?void 0:ht.map(et=>{var he;let ze=(he=U.value)==null?void 0:he.find(Ae=>(Ae==null?void 0:Ae.key)===(et==null?void 0:et.prop));return ze&&(et.value=ze.value),et})),$e}),P.push({id:me,value:{pageData:je}})})});let Be=(ie=v.cloneDeep(z))==null?void 0:ie[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}E.value=!0},fe=["createInsofDataApi"],Je=vo(async Q=>{se(Q)},100),at=async Q=>{var Ge,ve,F,Y,pe;const L=v.cloneDeep(Q);let ye,De=new WeakMap,Ke=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(ve=(Ge=Ke.data.result)==null?void 0:Ge.filter(de=>{var Z,oe;return((Z=de==null?void 0:de.key)==null?void 0:Z.pageKey)!=="menu"&&((oe=de==null?void 0:de.key)==null?void 0:oe.pageKey)!=="secret"}))==null||ve.forEach(de=>{De[de.key.pageKey]?De[de.key.pageKey]=[...De[de.key.pageKey],de]:De[de.key.pageKey]=[de]}),Q!=null&&Q[0].path&&(ye=await(L==null?void 0:L.map(async(de,Z)=>{var I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te;const te=(I=De[de==null?void 0:de.path])==null?void 0:I.filter(Ne=>{var U;return((U=Ne==null?void 0:Ne.key)==null?void 0:U.type)==="data"});let ie="";const Pe=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,De);te==null||te.forEach(Ne=>{var U,Oe,me,je,lt;((Oe=(U=Ne==null?void 0:Ne.value)==null?void 0:U.tableData)==null?void 0:Oe.算法名称)===((me=L==null?void 0:L[Z])==null?void 0:me.method)&&(ie=(lt=(je=Ne==null?void 0:Ne.value)==null?void 0:je.tableData)==null?void 0:lt.算法体)});const nt=await Ve.getItemData(de==null?void 0:de.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,De);let h="",C=(q=(S=(w=(W=nt==null?void 0:nt[0])==null?void 0:W.compData)==null?void 0:w.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Ne=>(Ne==null?void 0:Ne.prop)==="算法体");return(ue=(z=nt==null?void 0:nt[0])==null?void 0:z.compData)==null||ue.forEach(Ne=>{var U;(Ne==null?void 0:Ne.key)==="tableContents"&&((U=Ne==null?void 0:Ne.contents)==null||U.forEach(Oe=>{Oe!=null&&Oe.find(me=>me===(de==null?void 0:de.method))&&(h=Oe[C])}))}),{buttonName:((H=L==null?void 0:L[Z])==null?void 0:H.method)||((ne=(Be=(P=te==null?void 0:te[0])==null?void 0:P.value)==null?void 0:Be.tableData)==null?void 0:ne.算法名称),api:(ie===""?(ce=(ae=(G=te==null?void 0:te[0])==null?void 0:G.value)==null?void 0:ae.tableData)==null?void 0:ce.算法体:ie)||h,content:Pe==null?void 0:Pe.filter(Ne=>Ne.comp!=="methodButton"),extraContent:(xe=v.cloneDeep(de.value))==null?void 0:xe.slice(1),methodName:(de==null?void 0:de.path)??"",extraValues:(Te=L==null?void 0:L[Z])==null?void 0:Te.data}})));const Re=L==null?void 0:L.map(async de=>{var nt,h,C,I,W,w;const Z=(nt=Ke.data.result)==null?void 0:nt.filter(S=>{var q,z,ue;return((q=S==null?void 0:S.key)==null?void 0:q.parentTable)===""&&((z=S==null?void 0:S.key)==null?void 0:z.type)==="method"&&((ue=S==null?void 0:S.key)==null?void 0:ue.methodName)===S.method}),oe=Z==null?void 0:Z[0],te=(h=Ke.data.result)==null?void 0:h.filter(S=>{var q,z;return((q=S==null?void 0:S.key)==null?void 0:q.type)==="methodData"&&((z=S==null?void 0:S.key)==null?void 0:z.tableId)===(oe==null?void 0:oe.id)}),ie=await Ve.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,De),Pe=te==null?void 0:te[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(W=(I=Pe==null?void 0:Pe.value)==null?void 0:I.tableData)==null?void 0:W[0],content:ie==null?void 0:ie.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(de.value))==null?void 0:w.slice(1),methodName:(de==null?void 0:de.method)??""}}),Qe=(F=Q==null?void 0:Q[0])!=null&&F.path&&((Y=Q==null?void 0:Q[0])==null?void 0:Y.path)!==""?await Promise.all(ye):await Promise.all(Re);i.value=Qe==null?void 0:Qe.filter(de=>de==null?void 0:de.extraContent),(pe=i.value)==null||pe.forEach(de=>{var Z;de.api===""&&((Z=de.content)==null||Z.forEach(oe=>{var te;oe.comp=="Table"&&x.setExtraContents(Ve.methodTableToContent(oe.compData,(te=de.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!E.value&&await at(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Q,L)=>{var ye,De,Ke;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=i.value)==null?void 0:ye.filter(Re=>(Re==null?void 0:Re.buttonName)!=="保存"),Re=>{var Qe;return e.openBlock(),e.createElementBlock("div",null,[Re.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Qe=Re==null?void 0:Re.buttonName)!=null&&Qe.includes("预览")),class:"calculator-content",modelValue:Re.buttonName,onClickTrigger:Ge=>e.unref(Je)(Re),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(we)!==""&&((Ke=e.unref(D))==null?void 0:Ke[((De=e.unref(D))==null?void 0:De.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ge,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Ye},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=zt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=zt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=X=>{var K;x.value=v.cloneDeep(X),r("change",(K=O())==null?void 0:K.compData)},J=X=>{var K,le;if((X==null?void 0:X.buttonName)==="确认"){const D=v.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(le=O())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},M=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},we=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:N=>M("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:N=>M("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:we,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=zt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var O,R;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(O,R)=>{d.value=R,r("clickStep",O,R)},g=O=>St.getComponent(O),f=()=>{var R;const O=(R=s==null?void 0:s.stepList)==null?void 0:R.find((J,M)=>M+1===u.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},x=O=>{r("clickTrigger",O)},_=O=>{r("changeTrigger",O)};return(O,R)=>{var we,X,K,le,D;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(we=n.stepConfig)==null?void 0:we.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(J,{key:y,class:"step-item",onClick:N=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":N=>$.value=N,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(O.$slots,(N,E)=>({name:E,fn:e.withCtx(ge=>[e.renderSlot(O.$slots,E,e.mergeProps({ref_for:!0},ge||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=zt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=zt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=zt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=zt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.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}}}),Oc={class:"type-select"},Mc=["onClick"],Lc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",Lc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=zt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=J=>{var we;let M=(we=v.cloneDeep(b.value))==null?void 0:we.map((X,K)=>(J===K&&(X.content=!0),X));b.value=M},f=J=>{var we;let M=(we=v.cloneDeep(b.value))==null?void 0:we.map((X,K)=>(J===K&&(X.content=!1),X));b.value=M,d.value=v.cloneDeep(s.value)},x=(J,M)=>{var le;let we=(le=v.cloneDeep(b.value))==null?void 0:le.map((D,$)=>(J===$&&(D.content=!1),D));b.value=we;const X=v.cloneDeep(s.value),K=X==null?void 0:X.filter((D,$)=>($===J&&(D.name=M),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var J,M,we;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(M=v.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,b.value=(we=v.cloneDeep(u.value))==null?void 0:we.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),O=(J,M,we)=>{var K,le;if(!J)return;let X=v.cloneDeep(s.value);X=(K=X==null?void 0:X.map((D,$)=>($===we&&(D.compData=J),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(le=v.cloneDeep(X))==null?void 0:le.map((D,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},R=J=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=v.cloneDeep(s.value),we=M==null?void 0:M.filter((X,K)=>K!==J);i.setOriginalData(we),i.setItemData(we),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const we=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:K})=>{var le,D,$,y,N,E,ge,Ye,it,Le;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(D=(le=b.value)==null?void 0:le.find(We=>We.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(y=($=b.value)==null?void 0:$.find(We=>We.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(St._sfc_main$2,{modelValue:X.name,"onUpdate:modelValue":We=>X.name=We,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(N=b.value)==null?void 0:N.find(We=>We.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Ye=(ge=b.value)==null?void 0:ge.find(We=>We.id===K))!=null&&Ye.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(we,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(we,{name:"Save",onClick:e.withModifiers(We=>x(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Le=(it=b.value)==null?void 0:it.find(We=>We.id===K))!=null&&Le.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>R(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:X,index:K})=>{var le,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(D=(le=u.value)==null?void 0:le.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>O($,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=zt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=zt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),R=e.ref(null),J=Qn(v.pinia),{itemData:M}=v.storeToRefs(J),we=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Q=>{b.value="修改标签页",g.value.title=d.value[Q].title,f.value=Q,u.value=!0},K=Q=>{const L=$(Q);O.value.delete(L),d.value.splice(Q,1),at()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(Q)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,at()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Q=>{const L=d.value[Q];return L.id||(L.id=D()),L.id},y=Q=>{var De;_.value=Q;const L=$(Q);R.value=v.cloneDeep(M.value);let ye=O.value.get(L);!ye&&((De=d.value[Q].children)==null?void 0:De.length)>0&&(ye=Ye(d.value[Q].children)),ye?J.setItemData(v.cloneDeep(ye)):J.setItemData([]),x.value=!0},N=e.computed(()=>{const Q=$t.useModelComp(v.pinia),L=v.storeToRefs(Q).itemData.value;return console.log("可用组件数据",L),!L||!Array.isArray(L)?[]:L.filter(ye=>{var De;if(ye.comp==="Tabs"&&_.value>=0){const Ke=$(_.value);if((De=ye.compData)==null?void 0:De.some(Qe=>{var Ge;return Qe.key==="stepList"&&((Ge=Qe.contents)==null?void 0:Ge.some(ve=>ve.id===Ke))}))return!1}return!0})}),E=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,ge=Q=>{var L;try{const ye=v.cloneDeep(Q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((L=ye.compData)==null||L.forEach(Ke=>{Ke.key==="stepList"&&Ke.contents&&Ke.contents.forEach(Re=>{Re.id=D()})}));const De=v.cloneDeep(M.value);De.push(ye),J.setItemData(De)}catch(ye){console.error("添加组件失败:",ye)}},Ye=Q=>Q.map(L=>{var ye;switch(L.type){case"form":return{comp:"Form",name:L.value||"表单",compData:it(L.content)};case"table":return{comp:"Table",name:L.value||"表格",compData:Le(L.content)};default:return{comp:"Unknown",name:L.value||"",compData:((ye=L.content)==null?void 0:ye.originalData)||[]}}}),it=Q=>{if(!Q)return[];const L=[];return Q.rowContents&&L.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&L.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&L.push({key:"enableWrap",contents:Q.isEnableWrap}),L},Le=Q=>[],We=()=>{if(_.value>=0&&_.value<d.value.length){const Q=$(_.value);O.value.set(Q,v.cloneDeep(M.value)),d.value[_.value].children=ee(M.value),console.log("保存后的数据",ee(M.value))}x.value=!1,_.value=-1,R.value=null,at()},_e=()=>{R.value&&J.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},V=()=>{x.value&&_e()},ee=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((L,ye)=>{if(!L||typeof L!="object")return L;const{comp:De,name:Ke,compData:Re}=L;switch(De){case"Form":return{type:"form",content:se(Re||[]),value:"表单"};case"Table":return{type:"table",content:fe(Re||[]),value:"表格"};default:return{type:"xxx",content:Je(Re||[]),value:""}}})},se=Q=>{const L={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((De,Ke)=>{if(!De||typeof De!="object"){console.warn(`Invalid config at index ${Ke}:`,De);return}const{key:Re,contents:Qe}=De,Ge=ye[Re];if(!Ge){console.warn(`Unknown Form config key: ${Re}`);return}Re==="enableWrap"?L[Ge]=!!Qe:L[Ge]=Array.isArray(Qe)?Qe:[]}),L},fe=Q=>{const L={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return Q.forEach((De,Ke)=>{if(!De||typeof De!="object"){console.warn(`Invalid config at index ${Ke}:`,De);return}const{key:Re,contents:Qe}=De,Ge=ye[Re];if(!Ge){console.warn(`Unknown Table config key: ${Re}`);return}L[Ge]=Array.isArray(Qe)?Qe:[]}),L},Je=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),at=()=>{const Q=[{key:"stepList",contents:d.value}];r("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const L=Q.find(ye=>ye.key==="stepList");L&&L.contents&&(d.value=L.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||D()})))}},{immediate:!0,deep:!0}),(Q,L)=>{const ye=e.resolveComponent("svg-icon"),De=e.resolveComponent("el-input"),Ke=e.resolveComponent("el-form-item"),Re=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[L[6]||(L[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:we},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),L[5]||(L[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Qe,Ge)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ge},[e.createElementVNode("span",nu,e.toDisplayString(Qe.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:ve=>X(Ge)},"修改标题",8,ru),e.createElementVNode("button",{onClick:ve=>y(Ge)},"布局调整",8,lu),e.createElementVNode("button",{onClick:ve=>K(Ge)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":L[2]||(L[2]=Qe=>u.value=Qe),title:b.value,onBeforeDestroy:L[3]||(L[3]=Qe=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:L[1]||(L[1]=Qe=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Re,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Ke,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(De,{modelValue:g.value.title,"onUpdate:modelValue":L[0]||(L[0]=Qe=>g.value.title=Qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":L[4]||(L[4]=Qe=>x.value=Qe),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:_e},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[L[8]||(L[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Qe=>(e.openBlock(),e.createElementBlock("div",{key:Qe.id,class:"component-item",onClick:Ge=>ge(Qe)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Qe.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Qe.name),1)]),L[7]||(L[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=zt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},zo=$t.useMenuState(v.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(O=>{const{name:R}=O;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(O=>{const{key:R}=O;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const R=O==null?void 0:O[0];let J=!1;v.isObject(R)&&(R!=null&&R.id)&&(J=!0);let M=u,we=b;J&&(M=M+1,we=we+1);const X=O==null?void 0:O[M],K=O==null?void 0:O[we];s.push(X),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&zo.activeMenuPath&&(g=await Ve.getItemData(`${zo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Ve.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Ve.getItemData(u,b,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:O}=i||{};return g&&f&&St.isNumber(x)&&St.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:O}):St.isNumber(u)&&St.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const O=[];for(let J=0;J<x.length;J++){const M=x[J],we=_[J];O.push({name:M,value:we})}const R=g({data:O});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=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 i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=zt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},Lu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Z;u.value=b(),(Z=u.value)==null||Z.forEach(oe=>{var ie;const te=oe==null?void 0:oe.prop;oe.value=(ie=g==null?void 0:g.value)==null?void 0:ie[te]}),d.visible=!0},x=Z=>{g.value=Z},_=()=>{var Z;d.visible=!1,r("change",(Z=pe())==null?void 0:Z.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=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:[]}],M=e.ref({}),we=()=>{const Z=R.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=M.value)==null?void 0:Pe[ie]}),oe},X=Z=>{var te;M.value=Z;const oe=we();R.value=oe,r("change",(te=pe())==null?void 0:te.compData)},K=async()=>{const Z=await Ve.getMenusContent(),oe=we();oe==null||oe.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=Z)}),R.value=oe,O.visible=!0,await Qe(M.value.menu),await F(M.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),N=()=>{const Z=D.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=y.value)==null?void 0:Pe[ie]}),oe},E=Z=>{var te;y.value=Z;const oe=N();D.value=oe,r("change",(te=pe())==null?void 0:te.compData)},ge=async()=>{await V();const Z=v.cloneDeep(Ye.value),oe=N();oe==null||oe.forEach(te=>{var Pe;const ie=te==null?void 0:te.prop;te.value=(Pe=y==null?void 0:y.value)==null?void 0:Pe[ie],ie==="mainKey"&&(te.contents=Z)}),D.value=oe,le.visible=!0},Ye=e.ref([]),it=e.ref([]),Le=e.ref({}),We=e.ref({}),_e=()=>{const{compData:Z}=De.value||{},oe=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="header"}),te=(oe==null?void 0:oe.contents)||[],ie=te==null?void 0:te.filter((I,W)=>{const{label:w}=I;return w!=="操作"}),Pe=ie==null?void 0:ie.findIndex((I,W)=>{const{isMainKey:w}=I;return w});if(Pe<0)return[];const nt=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(nt==null?void 0:nt.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let w=Pe;v.isObject(W)&&(W!=null&&W.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},V=async()=>{const Z=await _e();Ye.value=Z},ee=async Z=>{const oe=sessionStorage.getItem("systemKey");return await Ve.getItemData(Z,oe,"")},se=async Z=>{const oe=Z;it.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return Le.value[ie]=te,{label:ie,value:ie}})},fe=Z=>{const{comp:oe,compData:te}=We.value||{};if(oe==="Table"){let ie=N();ie=ie.filter(Pe=>{const{prop:nt}=Pe;return nt!=="formItems"}),Ge(ie,te),D.value=ie}},Je=async()=>{var te,ie;const Z=(te=y==null?void 0:y.value)==null?void 0:te.mainKey,oe=(ie=M==null?void 0:M.value)==null?void 0:ie.menu;if(Z){const nt=`${oe==null?void 0:oe.join("/")}^${Z}`,h=await ee(nt);await se(h);const C=N();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=it.value)}),D.value=C}};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey},async(Z,oe)=>{Z!=oe&&Z&&await Je()});const at=async Z=>{const oe=Le.value[Z];We.value=oe,await fe()};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&Z&&at(Z)});const Q=async()=>{var oe;await Je();const Z=(oe=y.value)==null?void 0:oe.group;await at(Z)},L=e.ref([]),ye=e.ref({}),De=e.ref({}),Ke=async Z=>{const oe=Z==null?void 0:Z.join("/"),te=sessionStorage.getItem("systemKey");return await Ve.getItemData(oe,te,"")},Re=async Z=>{const oe=await Ke(Z);L.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return ye.value[ie]=te,{label:ie,value:ie}})},Qe=async(Z,oe)=>{await Re(Z);const te=we();te==null||te.forEach(ie=>{(ie==null?void 0:ie.prop)==="group"&&(ie.contents=L.value)}),R.value=te};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.menu},async(Z,oe)=>{const te=Z==null?void 0:Z.join("/"),ie=oe==null?void 0:oe.join("/");te!=ie&&await Qe(Z)});const Ge=(Z,oe)=>{const te=oe==null?void 0:oe.find(h=>{const{key:C}=h;return C==="header"}),ie=(te==null?void 0:te.contents)||[],Pe=ie==null?void 0:ie.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),nt=Pe==null?void 0:Pe.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Z==null||Z.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=nt)})},ve=Z=>{const{comp:oe,compData:te}=De.value||{};if(oe==="Table"){M.value.formItems=[];let ie=we();ie=ie.filter(Pe=>{const{prop:nt}=Pe;return nt!=="formItems"}),Ge(ie,te),R.value=ie}},F=async Z=>{const oe=ye.value[Z];De.value=oe,await ve()};e.watch(()=>{var Z;return(Z=M==null?void 0:M.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&F(Z)});const Y=async()=>{var te,ie;const Z=(te=M.value)==null?void 0:te.menu;await Qe(Z);const oe=(ie=M.value)==null?void 0:ie.group;await F(oe)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),de=()=>{d.visible=!1,O.visible=!1,le.visible=!1};return e.onMounted(async()=>{var oe,te,ie;R.value=J(),D.value=$();const Z=s==null?void 0:s.itemContents;g.value=((oe=Z==null?void 0:Z.find(Pe=>Pe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},M.value=((te=Z==null?void 0:Z.find(Pe=>Pe.key==="chartDataConfig"))==null?void 0:te.contents)??{},await Y(),y.value=((ie=Z==null?void 0:Z.find(Pe=>Pe.key==="chartDetailConfig"))==null?void 0:ie.contents)??{},await Q()}),(Z,oe)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[0]||(oe[0]=ie=>f())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[1]||(oe[1]=ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[2]||(oe[2]=ie=>ge())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:de,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:de,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:de,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=zt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Uu=Fn.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,O){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,O)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ve.commonjsGlobal=="object"&&Ve.commonjsGlobal.global===Ve.commonjsGlobal?Ve.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,O){var R=b.URL||b.webkitURL,J=document.createElement("a");_=_||x.name||"download",J.download=_,J.rel="noopener",typeof x=="string"?(J.href=x,J.origin===location.origin?u(J):d(J.href)?r(x,_,O):u(J,J.target="_blank")):(J.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,O){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,O),_);else if(d(x))r(x,_,O);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,O,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,O);var J=x.type==="application/octet-stream",M=/constructor/i.test(b.HTMLElement)||b.safari,we=/CriOS\/[\d]+/.test(navigator.userAgent);if((we||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var D=X.result;D=we?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},X.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,le=K.createObjectURL(x);R?R.location=le:location.href=le,R=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DjA4WahR.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=Tr(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(O=>O!==(b==null?void 0:b[r])),f=r+1,x=eo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(O=>{_.push(O)}),u=_}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=go(f,g,s,r,x),O=[];O.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{O.push(R)}),b=O}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Xt.ssDialog,ssInput:St._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=$t.useMenuState(),b=$t.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),O=e.ref(),{asideMenus:R,menuTriggerType:J,platform:M}=v.storeToRefs(u),{fixMenuStatus:we}=v.storeToRefs(b),X=e.computed(()=>r==null?void 0:r.mode),K=ve=>ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),le=e.computed(()=>{let ve=[...R.value];if((ve==null?void 0:ve.length)===0)return _.push("/"),[];const F=Ye(ve,E.value);return F.isFlag||(ve=F==null?void 0:F.data),ve=ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),ve}),D=async(ve,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ve==null?void 0:ve.path),u.setActiveAsideMenu(ve),ve.isRouter?_.push(ve.path):_.push("/"),s("node-click",ve,F)},$=async ve=>{const F=v.findNodeByPropInTree(le.value,"path",ve);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),we.value?b.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ve):(u.setMenuTriggerType("click"),u.setActiveMenuPath(ve)),ve!=null&&ve.startsWith("/")?_.push(ve):_.push("/"),x.value++},y=ve=>{u.setActiveMenuPath(ve)},N=ve=>{const F=document.documentElement;ve==null||ve.forEach(Y=>{F.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const ve=sessionStorage.getItem("authority");return ve?JSON.parse(ve):[]});e.watch(()=>M.value,ve=>{ve==="browser"?N(yn.browserVerticalMenuClasses):ve==="client"?(N(yn.clientHorizontalMenuClasses),N(yn.clientVerticalMenuClasses)):ve==="three"&&(N(yn.threeHorizontalMenuClasses),N(yn.threeVerticalMenuClasses))},{immediate:!0});const ge=(ve,F)=>{function Y(pe){pe==null||pe.forEach(de=>{var oe,te;const Z=(oe=de==null?void 0:de.path)!=null&&oe.startsWith("/")?(te=de==null?void 0:de.path)==null?void 0:te.substring(1):de==null?void 0:de.path;de.show=F==null?void 0:F.some(ie=>ie==null?void 0:ie.includes(Z)),de.children&&Y(de.children)})}return Y(ve),ve},Ye=(ve,F)=>{if(Array.isArray(F)){const Y=Array.from(new Set(F==null?void 0:F.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:ge(ve,Y),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},it=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Le=ve=>on(ve),We=e.ref({}),_e=e.ref([]),V=e.ref({}),ee=e.ref({}),se=ve=>{switch(ve){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},fe=e.ref({}),Je=ve=>{u.setCacheInputMenu({type:it.type,data:ve}),u.setIsRefreshMenus(!0)},at=async(ve,F,Y)=>{var pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze,he,Ae,mt,ke;if(F==="create"){let Ee=(Y==null?void 0:Y.title)+"(1)",be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(de=(pe=be==null?void 0:be.data)==null?void 0:pe.result)==null?void 0:de[0],B=(Z=Se==null?void 0:Se.value)==null?void 0:Z.pageData;B.compData=(oe=B.compData)==null?void 0:oe.map(Fe=>{var Xe;return(Fe==null?void 0:Fe.key)==="menuContents"&&(Fe.contents=eo(Fe.contents,(Xe=Y==null?void 0:Y.path)==null?void 0:Xe.split("/"),Ee)),Fe}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:B}});let Ie=(ie=(te=Y==null?void 0:Y.path)==null?void 0:te.split("/"))==null?void 0:ie.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}),tt=await Ve.getItemData((h=(nt=(Pe=Y==null?void 0:Y.path)==null?void 0:Pe.split("/"))==null?void 0:nt.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Ie.push(Ee),Ie=Ie==null?void 0:Ie.join("/"),(tt==null?void 0:tt.length)>0){let Fe=tt==null?void 0:tt[0],Xe=(I=(C=Fe==null?void 0:Fe.compData)==null?void 0:C.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:I.contents;if(((W=Xe==null?void 0:Xe[0])==null?void 0:W.directiveLabel)==="#isMain"){let Me=(w=Xe==null?void 0:Xe[0])==null?void 0:w.prop,dt=(q=(S=Fe==null?void 0:Fe.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:q.contents,ut;dt==null||dt.forEach(st=>{var vt,bt;if(st.length===1)((vt=st==null?void 0:st[0])==null?void 0:vt[Me])===(Y==null?void 0:Y.title)&&(ut=st==null?void 0:st[0],ut[Me]=Ee);else{let Nt=(bt=Xe==null?void 0:Xe.filter(_t=>_t!=="操作"))==null?void 0:bt.map(_t=>_t==null?void 0:_t.prop),Pt=st==null?void 0:st.filter(_t=>!(_t!=null&&_t.id)),Vt=Ve.getValueToObjectValue(Pt,Nt);Vt[Me]=Ee,ut=Vt}}),await v.createInsofDataApi({key:{type:"data",pageKey:(H=(ue=(z=Y==null?void 0:Y.path)==null?void 0:z.split("/"))==null?void 0:ue.filter((st,vt)=>{var bt,Nt;return vt!==((Nt=(bt=Y==null?void 0:Y.path)==null?void 0:bt.split("/"))==null?void 0:Nt.length)-1}))==null?void 0:H.join("/"),tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Be=f.value)==null?void 0:Be.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:ut}})}}await Ve.newLoadingConstruct(Y==null?void 0:Y.path,Ie),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((ce=(ae=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ae.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:ce.join("/")),u.setActiveTopMenuPath((Te=(xe=Y==null?void 0:Y.path)==null?void 0:xe.split("/"))==null?void 0:Te[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")O.value=Y;else if(F==="delete"){let Ee=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(U=(Ne=be==null?void 0:be.data)==null?void 0:Ne.result)==null?void 0:U[0],B=(Oe=Se==null?void 0:Se.value)==null?void 0:Oe.pageData;if(B.compData=(me=B.compData)==null?void 0:me.map(Fe=>{var Xe;return(Fe==null?void 0:Fe.key)==="menuContents"&&(Fe.contents=Tr(Fe.contents,(Xe=Y==null?void 0:Y.path)==null?void 0:Xe.split("/"))),Fe}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:B}}),((lt=(je=Ee==null?void 0:Ee.data)==null?void 0:je.result)==null?void 0:lt.length)>0){let Fe=(ot=(qe=Ee==null?void 0:Ee.data)==null?void 0:qe.result)==null?void 0:ot.map(Xe=>Xe==null?void 0:Xe.id);(Fe==null?void 0:Fe.length)>0&&await v.batchDeleteInsofDataApi({ids:Fe})}let Ie=await Ve.getItemData((et=(ht=($e=Y==null?void 0:Y.path)==null?void 0:$e.split("/"))==null?void 0:ht.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:et.join("/"),sessionStorage.getItem("systemKey"),""),tt=[];(Ie==null?void 0:Ie.length)>0&&(Ie==null||Ie.forEach(Fe=>{var Me,dt,ut,st,vt,bt,Nt,Pt,Vt,_t,Ft;let Xe=(st=(ut=(dt=(Me=Fe==null?void 0:Fe.compData)==null?void 0:Me.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ut[0])==null?void 0:st.prop;((Pt=(Nt=(bt=(vt=Fe==null?void 0:Fe.compData)==null?void 0:vt.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:bt.contents)==null?void 0:Nt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(Vt=Fe==null?void 0:Fe.compData)==null?void 0:Vt.find(xt=>(xt==null?void 0:xt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(xt=>{var Ht,Yt,Ot;(xt==null?void 0:xt.length)>1?(xt==null?void 0:xt[1])===(Y==null?void 0:Y.title)&&tt.push((Ht=xt==null?void 0:xt[0])==null?void 0:Ht.id):((Yt=xt==null?void 0:xt[0])==null?void 0:Yt[Xe])===(Y==null?void 0:Y.title)&&tt.push((Ot=xt==null?void 0:xt[0])==null?void 0:Ot.id)}))})),(tt==null?void 0:tt.length)>0&&await v.batchDeleteInsofDataApi({ids:tt}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((Ae=(he=(ze=Y==null?void 0:Y.path)==null?void 0:ze.split("/"))==null?void 0:he.filter((Fe,Xe)=>{var Me,dt;return Xe!==((dt=(Me=Y==null?void 0:Y.path)==null?void 0:Me.split("/"))==null?void 0:dt.length)-1}))==null?void 0:Ae.join("/")),u.setActiveTopMenuPath((ke=(mt=Y==null?void 0:Y.path)==null?void 0:mt.split("/"))==null?void 0:ke[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(ve,F)=>{var nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et,ze;let Y=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(nt=Y==null?void 0:Y.data)==null?void 0:nt.result)==null?void 0:h[0],de=(C=pe==null?void 0:pe.value)==null?void 0:C.pageData;de.compData=(I=de.compData)==null?void 0:I.map(he=>{var Ae,mt;return(he==null?void 0:he.key)==="menuContents"&&(he.contents=go(he.contents,(Ae=F==null?void 0:F.path)==null?void 0:Ae.split("/"),F==null?void 0:F.title,(mt=ve==null?void 0:ve.target)==null?void 0:mt.value)),he}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:de}});let Z=(w=(W=F==null?void 0:F.path)==null?void 0:W.split("/"))==null?void 0:w.filter((he,Ae)=>{var mt,ke;return Ae!==((ke=(mt=F==null?void 0:F.path)==null?void 0:mt.split("/"))==null?void 0:ke.length)-1}),oe=Z==null?void 0:Z.join("/");Z.push((S=ve==null?void 0:ve.target)==null?void 0:S.value),Z=Z==null?void 0:Z.join("/");let te=await Ve.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((P=(H=(ue=(z=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:z.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:ue.contents)==null?void 0:H[0])==null?void 0:P.directiveLabel)==="#isMain"){let he=(ce=(ae=(G=(ne=(Be=te==null?void 0:te[0])==null?void 0:Be.compData)==null?void 0:ne.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:G.contents)==null?void 0:ae[0])==null?void 0:ce.prop,Ae=(Ne=(Te=(xe=te==null?void 0:te[0])==null?void 0:xe.compData)==null?void 0:Te.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:Ne.contents,mt=(je=(me=(Oe=(U=te==null?void 0:te[0])==null?void 0:U.compData)==null?void 0:Oe.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:me.contents)==null?void 0:je.map(Ee=>Ee==null?void 0:Ee.prop),ke;if(Ae==null||Ae.forEach(Ee=>{var Se;let be=Ve.getValueToObjectValue(Ee,mt);(be==null?void 0:be[he])===F.title&&(ke=be,ke[he]=(Se=ve==null?void 0:ve.target)==null?void 0:Se.value)}),ke){let Ee={};for(let Se in ke)Se!=="id"&&(Ee[Se]=ke==null?void 0:ke[Se]);let be=[{id:ke==null?void 0:ke.id,value:{tableData:Ee}}];await v.batchUpdateInsofDataApi({dataList:be})}}let ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Pe=(qe=(lt=ie==null?void 0:ie.data)==null?void 0:lt.result)==null?void 0:qe.map(he=>({id:he==null?void 0:he.id,key:he==null?void 0:he.key}));Pe=Pe==null?void 0:Pe.map(he=>(he.key.pageKey=Z,he)),(Pe==null?void 0:Pe.length)>0&&await v.batchUpdateInsofDataApi({dataList:Pe}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((ht=($e=(ot=F==null?void 0:F.path)==null?void 0:ot.split("/"))==null?void 0:$e.filter((he,Ae)=>{var mt,ke;return Ae!==((ke=(mt=F==null?void 0:F.path)==null?void 0:mt.split("/"))==null?void 0:ke.length)-1}))==null?void 0:ht.join("/")),u.setActiveTopMenuPath((ze=(et=F==null?void 0:F.path)==null?void 0:et.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},L=async(ve,F)=>{it.type=se(F==null?void 0:F.operateType),await at(F,it.type,ve),ee.value=ve,fe.value=F},ye=()=>{it.show=!1},De=ve=>ve==null?void 0:ve.filter(F=>F.allowInherit),Ke=()=>{var Y,pe,de,Z,oe;let ve;it.type==="create"&&(ve=((Y=ee.value)==null?void 0:Y.path)+"/"+V.value[(pe=V.value)==null?void 0:pe.prop]),it.type==="update"&&(ve=(de=ee.value)==null?void 0:de.path);const F={...ee.value,config:De((Z=ee.value)==null?void 0:Z.config),children:[],childMenus:[],title:V.value[(oe=V.value)==null?void 0:oe.prop],path:ve};console.log("clickSubmitForm",fe.value,ee.value,F),Je(F),it.show=!1},Re=ve=>{var Y,pe;const F=(Y=ve==null?void 0:ve.contents)==null?void 0:Y.find(de=>de.key==="formContent");F&&(V.value=(pe=F==null?void 0:F.contents)==null?void 0:pe.reduce((de,Z)=>(de[Z.key]=Z.value,de.prop=Z.key,de),{}))},Qe=e.ref(!1);return{isCollapse:Qe,handleMenuCollapse:()=>{Qe.value=!Qe.value},handleCompChange:Re,dialogForm:We,dialogRenderComps:_e,getComponents:Le,clickSubmitForm:Ke,dialogInfo:it,beforeDialogDestroy:ye,clickMenuIcon:L,mode:X,renderMenuList:le,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:N,fixElement:O,onBlur:Q}}}}e.defineComponent(Ir());const Aa=v.useLoginState(),{loginUserInfo:Vn}=v.storeToRefs(Aa),Lt=$t.useModelComp(v.pinia),Rn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Un,itemExtendData:On}=v.storeToRefs(Lt),jt=$t.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:ft,platform:jp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(jt),ha=Ve.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Ve.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Jt=e.ref(),$o=$t.useAuthorityState(v.pinia),Wn=e.ref(!0),pn=e.ref(0),Hn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=ft.value)!=null&&i.startsWith("/")?(s=ft.value)==null?void 0:s.substring(1):ft.value;return(n==null?void 0:n.includes(to.value))||await ud(n)}),td=()=>{Lt.setItemGridData([]),Lt.setIsEdit("edit"),Lt.setSubmitCurStructure(ft.value!=="/平台管理/菜单管理")},ad=()=>{Lt.setIsEdit("view"),Lt.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),jt.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},Ko=async(n,i,s,r)=>{var d,u,b,g,f,x,_,O,R,J,M;try{const we=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),X=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(O=(_=(x=Un.value)==null?void 0:x[ft.value])==null?void 0:_.filter(y=>{var N,E,ge;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i&&((ge=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ge.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):D=(M=(J=(R=Un.value)==null?void 0:R[ft.value])==null?void 0:J.filter(y=>{var N;return((N=y==null?void 0:y.key)==null?void 0:N.type)===i}))==null?void 0:M.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we}),(X==null?void 0:X.length)>0&&await v.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(we){throw new Error(we)}},od=async n=>{var x,_,O,R,J,M,we,X,K,le;jt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return jt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Ro.value)!=null&&$.includes(D))}),d=(x=Ro.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(lo(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(O=en.value)==null?void 0:O.results)==null?void 0:R.length)>0&&((M=(J=en.value)==null?void 0:J.results)!=null&&M.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(we=en.value)==null?void 0:we.results}):(console.log("itemGridData.value",en.value),f.push(await Ko(en.value,"gridLayout")))),On.value)for(const D in On.value)f.push(await Ko((X=On.value)==null?void 0:X[D],"extend",{target:D,compId:(le=(K=On.value)==null?void 0:K[D])==null?void 0:le.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Lt.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),jt.setContentLoading(!1)},qn=n=>on(n),pt=e.ref([]),rd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(ft).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(O=>O==null?void 0:O.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Lt.setTableLoading(!1)}},jo=async n=>{var i,s;try{let r=v.cloneDeep(ft).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Lt.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:ft.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),wn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt,h,C,I,W,w,S,q,z,ue,H,P,Be,ne,G,ae,ce,xe,Te,Ne,U,Oe,me,je,lt,qe,ot,$e,ht,et;wn.value=null;let r=ft.value;if((d=Jt.value)!=null&&d.compData&&((u=Jt.value)==null?void 0:u.compData)!==ft.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await jo(n):await Ve.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),await Aa.setLogRecordAsync({type:"删除",data:n},ft.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((_=n==null?void 0:n.selectItems)!=null&&_.every(ze=>typeof(ze==null?void 0:ze.id)=="string")){const ze=(O=n==null?void 0:n.selectItems)==null?void 0:O.map(he=>({content:n==null?void 0:n.content,singleContent:he,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await jo(ze)}else{const ze=(R=n==null?void 0:n.selectItems)==null?void 0:R.map(he=>he==null?void 0:he.id);await v.batchDeleteInsofDataApi({ids:ze}),await Aa.setLogRecordAsync({type:"删除",data:ze},ft.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((J=n==null?void 0:n.ocrRows)==null?void 0:J.length)>0){Lt.setTableLoading(n==null?void 0:n.index);const ze=sessionStorage.getItem("systemKey"),he=[],Ae=[];let mt=r,ke=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const Ee=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId}),be=(we=(M=Ee==null?void 0:Ee.data)==null?void 0:M.result)==null?void 0:we[0];(X=be==null?void 0:be.key)!=null&&X.pageKey&&(mt=be.key.pageKey),ke=n==null?void 0:n.parentTableId}for(const Ee of n.ocrRows){const be={};for(const Se in Ee)Se!=="id"&&Se!=="index"&&!(typeof Se=="string"&&Se.startsWith("_"))&&(be[Se]=Ee[Se]);try{const Se=await v.createInsofDataApi({key:{type:i,pageKey:mt,tableId:ke,systemKey:ze},value:{tableData:be}});if(((K=Se==null?void 0:Se.data)==null?void 0:K.code)===200){const B=(le=Se==null?void 0:Se.data)==null?void 0:le.result;he.push({resId:B,compId:n==null?void 0:n.index,data:Ee}),Ae.push(B)}}catch(Se){console.error("OCR数据保存失败:",Se)}}wn.value=he,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(Ae)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:mt,tableId:ke,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),Ae.length>0?v.ElMessage.success(`成功保存 ${Ae.length} 条OCR识别数据`):v.ElMessage.warning("OCR数据保存失败,请重试"),await Aa.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},ft.value)}Lt.setCacheUpdatingData(null),Lt.setTableLoading(!1),Lt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let ze={};for(let Ae in n==null?void 0:n.singleContent)Ae!=="id"&&Ae!=="index"&&(ze[Ae]=n==null?void 0:n.singleContent[Ae]);const he=await Ve.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(ze),n==null?void 0:n.column,n,{param:s});if(wn.value={resId:he,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},(($=(D=n==null?void 0:n.column)==null?void 0:D[0])==null?void 0:$.directiveLabel)==="#isMain"&&((N=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:N.directiveColor)!==!0){let Ae=(Ye=n==null?void 0:n.singleContent)==null?void 0:Ye[(ge=(E=n==null?void 0:n.column)==null?void 0:E[0])==null?void 0:ge.prop],mt=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ke=ft.value+"/"+(Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-3)),Ee=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke}}),be=(Le=(it=mt==null?void 0:mt.data)==null?void 0:it.result)==null?void 0:Le[0],Se=(We=be==null?void 0:be.value)==null?void 0:We.pageData;if(Se.compData=(_e=Se.compData)==null?void 0:_e.map(B=>((B==null?void 0:B.key)==="menuContents"&&(B.contents=eo(B.contents,ke==null?void 0:ke.split("/"),Ae)),B)),await v.updateInsofDataApi({id:be==null?void 0:be.id,value:{pageData:Se}}),((ee=(V=Ee==null?void 0:Ee.data)==null?void 0:V.result)==null?void 0:ee.length)>0)await Ve.newLoadingConstruct(ke,ft.value+"/"+Ae);else{let B=await v.getInsofDataApi({key:{pageKey:ft.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((fe=(se=B==null?void 0:B.data)==null?void 0:se.result)==null?void 0:fe.length)>=1?await Ve.newLoadingCutFirstConstruct(ft.value+"/",ft.value+"/"+Ae):await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+Ae)}jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((at=(Je=ke==null?void 0:ke.split("/"))==null?void 0:Je.filter((B,Ie)=>{var tt;return Ie!==((tt=ke==null?void 0:ke.split("/"))==null?void 0:tt.length)-1}))==null?void 0:at.join("/"))}Lt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((L=(Q=n==null?void 0:n.column)==null?void 0:Q[0])==null?void 0:L.directiveLabel)==="#isMain"&&((De=(ye=n==null?void 0:n.column)==null?void 0:ye[0])==null?void 0:De.directiveColor)!==!0){let ze=(Qe=n==null?void 0:n.singleContent)==null?void 0:Qe[(Re=(Ke=n==null?void 0:n.column)==null?void 0:Ke[0])==null?void 0:Re.prop];if(St.isNumber((Ge=n==null?void 0:n.singleContent)==null?void 0:Ge.id)){let he=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ae=await v.getInsofDataApi({id:(ve=n==null?void 0:n.singleContent)==null?void 0:ve.id}),mt=(te=(de=(pe=(Y=(F=Ae==null?void 0:Ae.data)==null?void 0:F.result)==null?void 0:Y[0])==null?void 0:pe.value)==null?void 0:de.tableData)==null?void 0:te[(oe=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:oe.prop],ke=ft.value+"/"+mt,Ee=(Pe=(ie=he==null?void 0:he.data)==null?void 0:ie.result)==null?void 0:Pe[0],be=(nt=Ee==null?void 0:Ee.value)==null?void 0:nt.pageData;be.compData=(h=be.compData)==null?void 0:h.map(Se=>((Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=go(Se.contents,ke==null?void 0:ke.split("/"),mt,ze)),Se)),await v.updateInsofDataApi({id:Ee==null?void 0:Ee.id,value:{pageData:be}}),jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((I=(C=ke==null?void 0:ke.split("/"))==null?void 0:C.filter((Se,B)=>{var Ie;return B!==((Ie=ke==null?void 0:ke.split("/"))==null?void 0:Ie.length)-1}))==null?void 0:I.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let ze=[],he=[],Ae=((w=(W=n==null?void 0:n.content)==null?void 0:W[0])==null?void 0:w.id)??"",mt=s==null?void 0:s.url,ke="",Ee="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const be=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId});ke=((ue=(z=(q=(S=be==null?void 0:be.data)==null?void 0:S.result)==null?void 0:q[0])==null?void 0:z.key)==null?void 0:ue.tableId)??(n==null?void 0:n.parentTableId),Ee=((ne=(Be=(P=(H=be==null?void 0:be.data)==null?void 0:H.result)==null?void 0:P[0])==null?void 0:Be.key)==null?void 0:ne.pageKey)??""}else if(Ae!==""&&((G=n==null?void 0:n.content)==null?void 0:G.length)>1&&typeof((ce=(ae=n==null?void 0:n.content)==null?void 0:ae[0])==null?void 0:ce.id)!="string"){const be=await v.getInsofDataApi({id:Ae});ke=((U=(Ne=(Te=(xe=be==null?void 0:be.data)==null?void 0:xe.result)==null?void 0:Te[0])==null?void 0:Ne.key)==null?void 0:U.tableId)??"",Ee=((lt=(je=(me=(Oe=be==null?void 0:be.data)==null?void 0:Oe.result)==null?void 0:me[0])==null?void 0:je.key)==null?void 0:lt.pageKey)??""}(qe=n==null?void 0:n.singleContent)==null||qe.forEach(be=>{let Se={};for(let B in be)B!=="id"&&B!=="index"&&(Se[B]=be[B]);typeof(be==null?void 0:be.id)=="number"?ze.push({id:be==null?void 0:be.id,value:{tableData:Se}}):he.push({key:{type:i,pageKey:mt||Ee||ft.value,tableId:ke||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Se}})}),(he==null?void 0:he.length)>0&&await v.batchAddInsofDataApi({dataList:he}),(ze==null?void 0:ze.length)>0&&await v.batchUpdateInsofDataApi({dataList:ze})}else{let ze={},he=(ot=n==null?void 0:n.singleContent)==null?void 0:ot.id;for(let Ae in n==null?void 0:n.singleContent)Ae!=="id"&&Ae!=="index"&&(ze[Ae]=n==null?void 0:n.singleContent[Ae]);await Ve.fixTableContents(i,r,n==null?void 0:n.index,he,sessionStorage.getItem("systemKey"),Object.values(ze),n==null?void 0:n.column,n)}Lt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);Lt.setTableLoading(!1),($e=n==null?void 0:n.column)!=null&&$e.some(ze=>ze==null?void 0:ze.isMainKey),pt.value=await Ve.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(ht=pt.value)==null?void 0:ht.filter(ze=>{var he;return((he=ze==null?void 0:ze.compData)==null?void 0:he.length)>0}),pt.value=(et=pt.value)==null?void 0:et.filter(ze=>(ze==null?void 0:ze.comp)!==""),pt.value=Ve.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Lt.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Rn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ve.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(jt.setActiveMenuPath(null),jt.setActiveMenuPath(i))},Yn=async n=>{pt.value=Ve.getDeepDiffItems(n),Lt.setItemData(pt.value),Lt.setOriginalData(pt.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>R&&(i=i===""?i+O:i+"/"+O)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((O,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>R&&(s=s===""?s+O:s+"/"+O)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We;const i=(_=(x=Un.value)==null?void 0:x[n])==null?void 0:_.filter(_e=>{var V;return((V=_e==null?void 0:_e.key)==null?void 0:V.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(O=i==null?void 0:i.find(_e=>{var V,ee,se;return(se=(ee=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:O.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(we=(M=(J=i==null?void 0:i.find(_e=>{var V,ee,se;return(se=(ee=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:we.compId,d=(X=pt.value)==null?void 0:X.find(_e=>(_e==null?void 0:_e.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(_e=>(_e==null?void 0:_e.prop)===u),g=(Ye=(ge=(E=(N=d==null?void 0:d.compData)==null?void 0:N.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(_e=>_e==null?void 0:_e.isMainKey))==null?void 0:Ye.prop,f=(We=(Le=(it=d==null?void 0:d.compData)==null?void 0:it.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Le.contents)==null?void 0:We[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),$t.ElMessageBox.alert(`超时未提交,【${(i=(n=ft.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=ft.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Lt.setLockingPage(ft.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=Un.value)==null?void 0:n[ft.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y;if(((r=Jt.value)==null?void 0:r.compData)===ft.value||((d=Gt.value)==null?void 0:d.length)===0)return;jt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(pe=>{var de,Z;return((de=pe==null?void 0:pe.key)==null?void 0:de.pageKey)!=="menu"&&((Z=pe==null?void 0:pe.key)==null?void 0:Z.pageKey)!=="secret"}))==null||b.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),pt.value=await Ve.getItemData(ft.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Jt.value=(f=pt.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((x=Jt.value)==null?void 0:x.compData)===ft.value){let pe=(_=ft.value)==null?void 0:_.split("/").map(de=>({value:de.trim()}));pe=[...pe,...Gt.value??[]]}else{let pe=(R=(O=Jt.value)==null?void 0:O.compData)==null?void 0:R.split("/").map(de=>({value:de.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let de=await Ve.getItemData((J=Jt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);de=de==null?void 0:de.filter(ie=>{var Pe,nt,h;return Array.isArray(ie==null?void 0:ie.compData)&&((h=(nt=(Pe=ie==null?void 0:ie.compData)==null?void 0:Pe.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:nt.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Z=(le=(K=(X=(we=(M=de==null?void 0:de[0])==null?void 0:M.compData)==null?void 0:we.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"))==null?void 0:le.prop,oe=(N=(y=($=(D=de==null?void 0:de[0])==null?void 0:D.compData)==null?void 0:$.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:y.contents)==null?void 0:N.findIndex(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"),te=(it=(Ye=(ge=(E=de==null?void 0:de[0])==null?void 0:E.compData)==null?void 0:ge.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:Ye.contents)==null?void 0:it.map(ie=>{var Pe;return(ie==null?void 0:ie.length)>1?ie==null?void 0:ie[oe+1]:(Pe=ie==null?void 0:ie[0])==null?void 0:Pe[Z]});if(te=te==null?void 0:te.map(ie=>({label:ie,value:ie})),(Le=Gt.value)==null||Le.length,((_e=(We=Gt.value)==null?void 0:We[0])==null?void 0:_e.value)!==""){let ie=await Ve.getItemData(ft.value+"/"+((ee=(V=Gt.value)==null?void 0:V[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);ie||(await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+((fe=(se=Gt.value)==null?void 0:se[0])==null?void 0:fe.value)),ie=await Ve.getItemData(ft.value+"/"+((at=(Je=Gt.value)==null?void 0:Je[0])==null?void 0:at.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=ie}}(pe==null?void 0:pe.length)>0&&((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)===""&&(pt.value=[])}pt.value=(ye=pt.value)==null?void 0:ye.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!pt.value){let pe=(Re=(Ke=(De=ft.value)==null?void 0:De.split("/"))==null?void 0:Ke.filter((de,Z)=>{var oe,te;return Z!==((te=(oe=ft.value)==null?void 0:oe.split("/"))==null?void 0:te.length)-1}))==null?void 0:Re.join("/");pt.value=await Ve.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Qe=ft.value)==null?void 0:Qe.split("/"))==null?void 0:F[((ve=(Ge=ft.value)==null?void 0:Ge.split("/"))==null?void 0:ve.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:pt.value},ft.value),s!==""&&(pt.value=(Y=pt.value)==null?void 0:Y.map(pe=>{var de;return pe!=null&&pe.isShow&&(pe.compData=(de=pe==null?void 0:pe.compData)==null?void 0:de.map(Z=>{var oe,te,ie,Pe,nt;if((Z==null?void 0:Z.key)==="tableContents"){let h=[],C="";C=(Pe=(ie=(te=(oe=pe==null?void 0:pe.compData)==null?void 0:oe.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:te.contents)==null?void 0:ie[0])==null?void 0:Pe.prop,h=(nt=Z.contents)==null?void 0:nt.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Z.contents=h}return Z})),pe})),pt.value=Ve.getDeepDiffItems(pt.value),jt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[ft.value,Gu.value],async n=>{var u,b,g,f,x,_,O,R,J,M,we,X,K,le,D,$,y,N,E,ge,Ye,it,Le,We,_e,V,ee,se,fe,Je,at,Q,L,ye,De,Ke,Re,Qe,Ge,ve,F,Y,pe,de,Z,oe,te,ie,Pe,nt;if(!ft.value)return;Lt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Wn.value=!1,Rn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Hn.value=r,s){jt.setContentLoading(!0),sessionStorage.setItem("pageKey",ft.value),ha.setSelectTitle([]),pt.value=await Ve.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=pt.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Jt.value=(O=pt.value)==null?void 0:O.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Jt.value)!=null&&R.compData)){let I=hd(Zu.value,(J=ft.value)==null?void 0:J.split("/")),W=await Ve.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(w=>(w==null?void 0:w.comp)==="")?h=(we=(M=W==null?void 0:W.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:M.compData)==null?void 0:we.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((X=Jt.value)==null?void 0:X.compData)===ft.value){let I=(K=ft.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],W=(D=(le=Jt.value)==null?void 0:le.compData)==null?void 0:D.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Jt.value={compData:ft.value});else{let q=await Ve.getItemData(($=Jt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);q=q==null?void 0:q.filter(P=>{var Be,ne,G;return Array.isArray(P==null?void 0:P.compData)&&((G=(ne=(Be=P==null?void 0:P.compData)==null?void 0:Be.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ne.contents)==null?void 0:G.find(ae=>(ae==null?void 0:ae.directiveLabel)==="#isMain"))});let z=(Ye=(ge=(E=(N=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Ye.prop,ue=(_e=(We=(Le=(it=q==null?void 0:q[0])==null?void 0:it.compData)==null?void 0:Le.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:We.contents)==null?void 0:_e.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),H=(fe=(se=(ee=(V=q==null?void 0:q[0])==null?void 0:V.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:fe.map(P=>{var Be;return(P==null?void 0:P.length)>1?P==null?void 0:P[ue+1]:(Be=P==null?void 0:P[0])==null?void 0:Be[z]});if(H=H==null?void 0:H.map(P=>({label:P,value:P})),((Je=Gt.value)==null?void 0:Je.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:H,parentContent:(at=Jt.value)==null?void 0:at.compData}]),((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)!==""){let P=await Ve.getItemData(ft.value+"/"+((De=(ye=Gt.value)==null?void 0:ye[0])==null?void 0:De.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Ve.newLoadingCutFirstConstruct(ft.value,ft.value+"/"+((Re=(Ke=Gt.value)==null?void 0:Ke[0])==null?void 0:Re.value)),P=await Ve.getItemData(ft.value+"/"+((Ge=(Qe=Gt.value)==null?void 0:Qe[0])==null?void 0:Ge.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((F=(ve=Gt.value)==null?void 0:ve[0])==null?void 0:F.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Gt.value??[]];let w=(Y=ft.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(I!=null&&I.find(z=>(z==null?void 0:z.value)===(q==null?void 0:q.value))));I=[...I,...S??[]],ha.setSelectTitle(I)}pt.value=(pe=pt.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!pt.value){let I=(Z=(de=s==null?void 0:s.split("/"))==null?void 0:de.filter((W,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Z.join("/");pt.value=await Ve.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(te=s==null?void 0:s.split("/"))==null?void 0:te[((oe=s==null?void 0:s.split("/"))==null?void 0:oe.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:pt.value},ft.value),C!==""&&(pt.value=(ie=pt.value)==null?void 0:ie.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(w=>{var S,q,z,ue,H;if((w==null?void 0:w.key)==="tableContents"){let P=[],Be="";Be=(ue=(z=(q=(S=I==null?void 0:I.compData)==null?void 0:S.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0])==null?void 0:ue.prop,P=(H=w.contents)==null?void 0:H.filter(ne=>(ne==null?void 0:ne[Be])===C||(ne==null?void 0:ne[1])===C),w.contents=P}return w})),I})),pt.value=Ve.getDeepDiffItems(pt.value),await cd(pt.value),Or(),pd(s),yo.value=(Pe=pt.value)==null?void 0:Pe.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Lt.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),Lt.setItemData(pt.value),Lt.setOriginalData(pt.value),Lt.setCurStructureCompIds((nt=pt.value)==null?void 0:nt.map(I=>I==null?void 0:I.id)),Lt.setRefreshCurStructure(!1),jt.setChildMenu(""),jt.setContentLoading(!1),Lt.setTableLoading(!1),Rn.value=!1}else pt.value=[],Rn.value=!1;e.nextTick(()=>{pn.value=pn.value++,Wn.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,O,R,J,M;if(Po.value){let we=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var N,E;return((N=y==null?void 0:y.key)==null?void 0:N.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{we[y.key.pageKey]?we[y.key.pageKey]=[...we[y.key.pageKey],y]:we[y.key.pageKey]=[y]});let K=ft.value;(s=Jt.value)!=null&&s.compData&&((r=Jt.value)==null?void 0:r.compData)!==ft.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(b=ft.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=ft.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=ft.value)==null?void 0:_[0];let D=await Ve.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!pt.value){let y=(R=(O=le==null?void 0:le.split("/"))==null?void 0:O.filter((N,E)=>{var ge;return E!==((ge=le==null?void 0:le.split("/"))==null?void 0:ge.length)-1}))==null?void 0:R.join("/");D=await Ve.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,we),$=(M=le==null?void 0:le.split("/"))==null?void 0:M[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var N;return y!=null&&y.isShow&&(y.compData=(N=y==null?void 0:y.compData)==null?void 0:N.map(E=>{var ge,Ye,it,Le,We;if((E==null?void 0:E.key)==="tableContents"){let _e=[],V="";V=(Le=(it=(Ye=(ge=y==null?void 0:y.compData)==null?void 0:ge.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Ye.contents)==null?void 0:it[0])==null?void 0:Le.prop,_e=(We=E.contents)==null?void 0:We.filter(ee=>(ee==null?void 0:ee[V])===$||(ee==null?void 0:ee[1])===$),E.contents=_e}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=Ve.getDeepDiffItems(D),Lt.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,O;jt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Vn.value)==null?void 0:d.account)||((u=Vn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Vn.value)==null?void 0:b.account)||((g=Vn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(O=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:O.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await Aa.setLogRecordAsync({type:"删除",data:s},ft.value)),jt.setActiveMenuPath(Xu.value),pt.value=null,Lt.setRouteToChildPath(""),jt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&jt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Lr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),zr=(n,i)=>{var f,x,_,O,R;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),b=u===-1?0:u,g=(R=(O=r==null?void 0:r.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=zr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=zr(i);g?(un.index=i,un.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=pt.value)==null?void 0:b[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:R}=O;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let O=0;const R=[];if(x=x.map(J=>{const M=J.span;return M?(J.span=Number(M),O=O+J.span):R.push(J),J}),O<24){const J=Math.floor((24-O)/_);R.forEach(M=>{M.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const O=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(M,we)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Wn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(M.comp)),{key:e.unref(pn),compName:M.name,index:(M==null?void 0:M.id)??we,height:(X=u.value)==null?void 0:X.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=zt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{we()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),O=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),J=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="baseConfig"});return N==null?void 0:N.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,N=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="children"});return N==null?void 0:N.contents}),we=()=>{var y;d.value=R.value||{},x.value=(M==null?void 0:M.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(N=>{var ge;const{prop:E}=N;return N.value=(ge=J.value)==null?void 0:ge[E],N})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;x.value=(M==null?void 0:M.value)||[],_.value=(y=M.value)==null?void 0:y.map(N=>O(N))},{immediate:!0});const X=(y,N)=>{const E=v.cloneDeep(M==null?void 0:M.value);E[N].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),le=(y,N,E)=>{if(!y)return;const ge=v.cloneDeep(M==null?void 0:M.value);ge[E]&&(ge[E].compData=y,x.value=ge,r("change",$(),!0))},D=y=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let N=v.cloneDeep(M==null?void 0:M.value);N=N==null?void 0:N.filter((E,ge)=>y!==ge),x.value=N,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,N)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[N[1]||(N[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:N[0]||(N[0]=ge=>f(ge))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:ge,index:Ye})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ge.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(it=>D(Ye),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ge,index:Ye})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Ye],key:Ye,isEnableWrap:!0,onChange:it=>X(it,Ye)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ge.comp+"Operate")),{itemContents:ge==null?void 0:ge.compData,originalItemContents:ge.compData,onChange:it=>le(it,ge,Ye)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=zt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Uo;Od&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Md)));function Ld(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function zd(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const Dn=new Set,$r=new WeakMap;function Fd(){Dn.forEach(n=>{n(...$r.get(n))}),Dn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!Dn.has(n)&&(Dn.add(n),Dn.size===1&&Promise.resolve().then(Fd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Cn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Cn(n,i);)i.y--}let d;for(;d=Cn(n,i);)i.y=d.y+d.h;return i}function Kd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Cn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Cn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let O=0,R=_.length;O<R;O++){const J=_[O];J.moved||i.y>J.y&&i.y-J.y>J.h/4||(J.static?n=qo(n,J,i,d):n=qo(n,i,J,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Cn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function jd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,O=x.length;_<O;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(Kd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Yo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var kn={exports:{}},tp=kn.exports,Jo;function ap(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,we(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=we(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&O(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function O(a,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},O(a,t)}function R(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,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},M.apply(this,arguments)}function we(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function $(a){return X(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},N=function(a){return typeof a=="function"},E={window:function(a){return a===le||X(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:N,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&N(a.splice)}};function ge(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 Ye(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var it={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=it.draggable,t.map.drag=it,t.methodDict.drag="draggable",l.actions.drag=it.defaults},listeners:{"interactions:before-action-move":ge,"interactions:action-resume":ge,"interactions:action-move":Ye,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.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):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ge,move:Ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Le=it,We={init:function(a){var t=a;We.document=t.document,We.DocumentFragment=t.DocumentFragment||_e,We.SVGElement=t.SVGElement||_e,We.SVGSVGElement=t.SVGSVGElement||_e,We.SVGElementInstance=t.SVGElementInstance||_e,We.Element=t.Element||_e,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||_e,We.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 _e(){}var V=We,ee={init:function(a){var t=V.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!V.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?V.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=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function fe(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Je(a,t){for(;E.element(a);){if(Q(a,t))return a;a=at(a)}return null}function at(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Q(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var L=function(a){return a.parentNode||a.host};function ye(a,t){for(var o,l=[],c=a;(o=L(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function De(a,t,o){for(;E.element(a);){if(Q(a,t))return!0;if((a=at(a))===o)return Q(a,t)}return!1}function Ke(a){return a.correspondingUseElement||a}function Re(a){var t=a instanceof V.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 Qe(a){var t,o=Re(a);if(!se.isIOS7&&o){var l={x:(t=(t=$(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function Ge(a){for(var t=[];a;)t.push(a),a=at(a);return t}function ve(a){return!!E.string(a)&&(V.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?at(o):a==="self"?t.getRect(o):Je(o,a)}function pe(a,t,o,l){var c=a;return E.string(c)?c=Y(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Qe(c)),c}function de(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Z(a){return!a||"x"in a&&"y"in a||((a=F({},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 oe(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 te(a,t,o){var l=o&&a.options[o];return de(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function ie(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Pe(a)),E.array(a))return a.forEach(function(T){return ie(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];ie(a,m,o,l)}else if(E.object(t))for(var k in t)ie(Pe(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Pe(a){return a.trim().split(/ +/)}var nt=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(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 W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof V.Event||a instanceof V.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function q(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function z(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function ue(a,t,o){var l=t.length>1?P(t):t[0];q(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function H(a){var t=[];return E.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 P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Be(a){if(!a.length)return null;var t=H(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return nt(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ae(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof V.Touch?"touch":"mouse"}function ce(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[Ke(t?t[0]:a.target),Ke(a.currentTarget)]}var xe=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(xe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Te=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Ne=function(a){return Te([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Oe=function(a,t){return a[U(a,t)]},me=function(a){x(o,a);var t=J(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,j=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=j,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=U(p,function(T){var j=T.dropzone,A=T.element;return j===l.dropzone&&A===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(xe);function je(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function lt(a,t){for(var o=function(p,m){for(var k=[],T=0,j=p.interactables.list;T<j.length;T++){var A=j[T];if(A.options.drop.enabled){var re=A.options.drop.accept;if(!(E.element(re)&&re!==m||E.string(re)&&!Q(m,re)||E.func(re)&&!re({dropzone:A,draggableElement:m})))for(var Ce=0,He=A.getAllElements();Ce<He.length;Ce++){var Ue=He[Ce];Ue!==m&&k.push({dropzone:A,element:Ue,rect:A.getRect(Ue)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function qe(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var j=T[k],A=j.dropzone,re=j.element,Ce=j.rect,He=A.dropCheck(t,o,c,p,re,Ce);m.push(He?re:null)}var Ue=function(Ze){for(var ct,rt,gt,Dt=[],It=0;It<Ze.length;It++){var kt=Ze[It],Ct=Ze[ct];if(kt&&It!==ct)if(Ct){var ta=L(kt),Kt=L(Ct);if(ta!==kt.ownerDocument)if(Kt!==kt.ownerDocument)if(ta!==Kt){Dt=Dt.length?Dt:ye(Ct);var da=void 0;if(Ct instanceof V.HTMLElement&&kt instanceof V.SVGElement&&!(kt instanceof V.SVGSVGElement)){if(kt===Kt)continue;da=kt.ownerSVGElement}else da=kt;for(var ya=ye(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var An=[ya[Sa-1],ya[Sa],Dt[Sa]];if(An[0])for(var mn=An[0].lastChild;mn;){if(mn===An[1]){ct=It,Dt=ya;break}if(mn===An[2])break;mn=mn.previousSibling}}else gt=Ct,(parseInt($(rt=kt).getComputedStyle(rt).zIndex,10)||0)>=(parseInt($(gt).getComputedStyle(gt).zIndex,10)||0)&&(ct=It);else ct=It}else ct=It}return ct}(m);return l.activeDrops[Ue]||null}function ot(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new me(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new me(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new me(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new me(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new me(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new me(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function $e(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&je(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function ht(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=lt(t,o.element));var m=l,k=qe(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=ot(o,0,m)}}var et={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Le),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=ie(k.listeners),j=Object.keys(T).reduce(function(re,Ce){return re[/^(enter|leave)/.test(Ce)?"drag".concat(Ce):/^(activate|deactivate|move)/.test(Ce)?"drop".concat(Ce):Ce]=T[Ce],re},{}),A=m.options.drop.listeners;A&&m.off(A),m.on(j),m.options.drop.listeners=j}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,j,A){return function(re,Ce,He,Ue,Ze,ct,rt){var gt=!1;if(!(rt=rt||re.getRect(ct)))return!!re.options.drop.checker&&re.options.drop.checker(Ce,He,gt,re,ct,Ue,Ze);var Dt=re.options.drop.overlap;if(Dt==="pointer"){var It=te(Ue,Ze,"drag"),kt=q(Ce);kt.x+=It.x,kt.y+=It.y;var Ct=kt.x>rt.left&&kt.x<rt.right,ta=kt.y>rt.top&&kt.y<rt.bottom;gt=Ct&&ta}var Kt=Ue.getRect(Ze);if(Kt&&Dt==="center"){var da=Kt.left+Kt.width/2,ya=Kt.top+Kt.height/2;gt=da>=rt.left&&da<=rt.right&&ya>=rt.top&&ya<=rt.bottom}return Kt&&E.number(Dt)&&(gt=Math.max(0,Math.min(rt.right,Kt.right)-Math.max(rt.left,Kt.left))*Math.max(0,Math.min(rt.bottom,Kt.bottom)-Math.max(rt.top,Kt.top))/(Kt.width*Kt.height)>=Dt),re.options.drop.checker&&(gt=re.options.drop.checker(Ce,He,gt,re,ct,Ue,Ze)),gt}(this,p,m,k,T,j,A)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=et.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,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=lt(t,o.element),c.events=ot(o,0,l),c.events.activate&&(je(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":ht,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;$e(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;ht(a,t),$e(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:lt,getDrop:qe,getDropEvents:ot,fireDropEvents:$e,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=et;function he(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,k),o.box=Be(c),o.scale=1,o.ds=0,o.angle=G(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,k),o.box=Be(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Ae={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ae,t.methodDict.gesture="gesturable",l.actions.gesture=Ae.defaults},listeners:{"interactions:action-start":he,"interactions:action-move":he,"interactions:action-end":he,"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}},mt=Ae;function ke(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=k>=0?p.left:p.right;return o.x<j+m}if(a==="top"){var A=T>=0?p.top:p.bottom;return o.y<A+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:De(l,t,c))}function Ee(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var be,Se,B={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;B.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),B.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=B,t.methodDict.resize="resizable",c.actions.resize=B.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),Ee(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,j=T.start,A=T.corrected,re=T.delta,Ce=T.previous;if(F(Ce,A),m){if(F(A,k),p==="reposition"){if(A.top>A.bottom){var He=A.top;A.top=A.bottom,A.bottom=He}if(A.left>A.right){var Ue=A.left;A.left=A.right,A.right=Ue}}}else A.top=Math.min(k.top,j.bottom),A.bottom=Math.max(k.bottom,j.top),A.left=Math.min(k.left,j.right),A.right=Math.max(k.right,j.left);for(var Ze in A.width=A.right-A.left,A.height=A.bottom-A.top,A)re[Ze]=A[Ze]-Ce[Ze];c.edges=l.prepared.edges,c.rect=A,c.deltaRect=re}})(a),Ee(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var j in T)T[j]=ke(j,k.edges[j],m,t._latestPointer.eventTarget,l,c,k.margin||B.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var A=k.axis!=="y"&&m.x>c.right-B.defaultMargin,re=k.axis!=="x"&&m.y>c.bottom-B.defaultMargin;(A||re)&&(a.action={name:"resize",axes:(A?"x":"")+(re?"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,l=a.name,c=B.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var j=T[k];t[j]&&(m+=j)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Ie=B,tt={id:"actions",install:function(a){a.usePlugin(mt),a.usePlugin(Ie),a.usePlugin(Le),a.usePlugin(ze)}},Fe=0,Xe={request:function(a){return be(a)},cancel:function(a){return Se(a)},init:function(a){if(be=a.requestAnimationFrame,Se=a.cancelAnimationFrame,!be)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];be=a["".concat(l,"RequestAnimationFrame")],Se=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}be=be&&be.bind(a),Se=Se&&Se.bind(a),be||(be=function(c){var p=Date.now(),m=Math.max(0,16-(p-Fe)),k=a.setTimeout(function(){c(p+m)},m);return Fe=p+m,k},Se=function(c){return clearTimeout(c)})}},Me={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){Me.isScrolling=!0,Xe.cancel(Me.i),a.autoScroll=Me,Me.interaction=a,Me.prevTime=Me.now(),Me.i=Xe.request(Me.scroll)},stop:function(){Me.isScrolling=!1,Me.interaction&&(Me.interaction.autoScroll=null),Xe.cancel(Me.i)},scroll:function(){var a=Me.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=dt(c.container,t,o),m=Me.now(),k=(m-Me.prevTime)/1e3,T=c.speed*k;if(T>=1){var j={x:Me.x*T,y:Me.y*T};if(j.x||j.y){var A=ut(p);E.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var re=ut(p),Ce={x:re.x-A.x,y:re.y-A.y};(Ce.x||Ce.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ce,interaction:a,container:p})}Me.prevTime=m}Me.isScrolling&&(Xe.cancel(Me.i),Me.i=Xe.request(Me.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Me.check(t.interactable,t.prepared.name))if(t.simulation)Me.x=Me.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,j=t.prepared.name,A=k.options[j].autoScroll,re=dt(A.container,k,T);if(E.window(re))m=o.clientX<Me.margin,l=o.clientY<Me.margin,c=o.clientX>re.innerWidth-Me.margin,p=o.clientY>re.innerHeight-Me.margin;else{var Ce=Re(re);m=o.clientX<Ce.left+Me.margin,l=o.clientY<Ce.top+Me.margin,c=o.clientX>Ce.right-Me.margin,p=o.clientY>Ce.bottom-Me.margin}Me.x=c?1:m?-1:0,Me.y=p?1:l?-1:0,Me.isScrolling||(Me.margin=A.margin,Me.speed=A.speed,Me.start(t))}}};function dt(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function ut(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var st={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Me,Me.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Me.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Me.stop(),Me.interaction&&(Me.interaction=null)},"interactions:stop":Me.stop,"interactions:action-move":function(a){return Me.onInteractionMove(a)}}},vt=st;function bt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Nt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Pt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,j,A,re){var Ce=k.getRect(A),He=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Ue={action:null,interactable:k,interaction:j,element:A,rect:Ce,buttons:He};return re.fire("auto-start:check",Ue),Ue.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=bt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=bt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Pt}};function Ft(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function xt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var j=l[k],A=c[k],re=j.getAction(t,o,a,A);if(re){var Ce=Ft(re,j,A,p,m);if(Ce)return{action:Ce,interactable:j,element:A}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(A){p.push(A),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var j=xt(a,t,o,p,m,l,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;k=at(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Nt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Oa(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,j=0,A=0;if(!(p&&m&&k))return!1;for(var re=0,Ce=l.interactions.list;re<Ce.length;re++){var He=Ce[re],Ue=He.prepared.name;if(He.interacting()&&(++T>=k||He.interactable===a&&((j+=Ue===o.name?1:0)>=p||He.element===t&&(A++,Ue===o.name&&A>=m))))return!1}return k>0}function Va(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Oa(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var Ka={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Va(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Oa(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Va,withinInteractionLimit:Ot,validateAction:Ft},Da=Ka,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,j=T.startAxis,A=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?A[0]:T.lockAxis,A!=="xy"&&j!=="xy"&&j!==A){o.prepared.name=null;for(var re=l,Ce=function(Ue){if(Ue!==o.interactable){var Ze=o.interactable.options.drag;if(!Ze.manualStart&&Ue.testIgnoreAllow(Ze,re,l)){var ct=Ue.getAction(o.downPointer,o.downEvent,o,re);if(ct&&ct.name==="drag"&&function(rt,gt){if(!gt)return!1;var Dt=gt.options.drag.startAxis;return rt==="xy"||Dt==="xy"||Dt===rt}(A,Ue)&&Da.validateAction(ct,Ue,re,l,t))return Ue}}};E.element(re);){var He=t.interactables.forEachMatch(re,Ce);if(He){o.prepared.name="drag",o.interactable=He,o.element=re;break}re=at(re)}}}}}};function Ca(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(Da),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=Ca(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;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(ja)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Ma={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Q(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||fe(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(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 l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=Ne(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(j){var A=j.interactable.options[j.prepared.name],re=A.modifiers;return re&&re.length?re:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ce){var He=A[Ce];return He&&He.enabled&&{options:He,methods:He._methods}}).filter(function(Ce){return!!Ce})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{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,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),j=0;j<k.length;j++){var A,re=k[j],Ce=re.options,He=F({},t.coords),Ue=null;(A=re.methods)!=null&&A.set&&this.shouldDo(Ce,l,o)&&(t.state=re,Ue=re.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-He.x,y:t.coords.y-He.y})),T.eventProps.push(Ue)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Ze=this.result.coords,ct=this.result.rect;if(Ze&&ct){var rt=T.rect.left!==ct.left||T.rect.right!==ct.right||T.rect.top!==ct.top||T.rect.bottom!==ct.bottom;T.changed=rt||Ze.x!==T.coords.x||Ze.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var j=0,A=[[p,k],[c,T]];j<A.length;j++){var re=A[j],Ce=re[0],He=re[1];Ce.page.x+=He.x,Ce.page.y+=He.y,Ce.client.x+=He.x,Ce.client.y+=He.y}var Ue=this.result.rectDelta,Ze=t.rect||o.rect;Ze.left+=Ue.left,Ze.right+=Ue.right,Ze.top+=Ue.top,Ze.bottom+=Ue.bottom,Ze.width=Ze.right-Ze.left,Ze.height=Ze.bottom-Ze.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,j=k.methods,A=j.beforeEnd&&j.beforeEnd(t);if(A)return this.endResult=A,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,j=k.rectDelta,A=0,re=[[l.start,m],[l.cur,T]];A<re.length;A++){var Ce=re[A],He=Ce[0],Ue=Ce[1];He.page.x-=Ue.x,He.page.y-=Ue.y,He.client.x-=Ue.x,He.client.y-=Ue.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="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=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(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,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"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)}}},wt=Xa,Zt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T,j){var A;u(this,o),(A=t.call(this,l)).relatedTarget=null,A.screenX=void 0,A.screenY=void 0,A.button=void 0,A.buttons=void 0,A.ctrlKey=void 0,A.shiftKey=void 0,A.altKey=void 0,A.metaKey=void 0,A.page=void 0,A.client=void 0,A.delta=void 0,A.rect=void 0,A.x0=void 0,A.y0=void 0,A.t0=void 0,A.dt=void 0,A.duration=void 0,A.clientX0=void 0,A.clientY0=void 0,A.velocity=void 0,A.speed=void 0,A.swipe=void 0,A.axes=void 0,A.preEnd=void 0,k=k||l.element;var re=l.interactable,Ce=(re&&re.options||Zt).deltaSource,He=te(re,k,p),Ue=m==="start",Ze=m==="end",ct=Ue?R(A):l.prevEvent,rt=Ue?l.coords.start:Ze?{page:ct.page,client:ct.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return A.page=F({},rt.page),A.client=F({},rt.client),A.rect=F({},l.rect),A.timeStamp=rt.timeStamp,Ze||(A.page.x-=He.x,A.page.y-=He.y,A.client.x-=He.x,A.client.y-=He.y),A.ctrlKey=c.ctrlKey,A.altKey=c.altKey,A.shiftKey=c.shiftKey,A.metaKey=c.metaKey,A.button=c.button,A.buttons=c.buttons,A.target=k,A.currentTarget=k,A.preEnd=T,A.type=j||p+(m||""),A.interactable=re,A.t0=Ue?l.pointers[l.pointers.length-1].downTime:ct.t0,A.x0=l.coords.start.page.x-He.x,A.y0=l.coords.start.page.y-He.y,A.clientX0=l.coords.start.client.x-He.x,A.clientY0=l.coords.start.client.y-He.y,A.delta=Ue||Ze?{x:0,y:0}:{x:A[Ce].x-ct[Ce].x,y:A[Ce].y-ct[Ce].y},A.dt=l.coords.delta.timeStamp,A.duration=A.timeStamp-A.t0,A.velocity=F({},l.coords.velocity[Ce]),A.speed=nt(A.velocity.x,A.velocity.y),A.swipe=Ze||m==="inertiastart"?A.getSwipe():null,A}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(xe);Object.defineProperties(yt.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 fn=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=bt(function(A){this.move(A)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(A){Object.defineProperty(o._proxy,A,{get:function(){return p[A]}})};for(var k in Mt)m(k);var T=function(A){Object.defineProperty(o._proxy,A,{value:function(){return p[A].apply(p,arguments)}})};for(var j in ca)T(j);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Nt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=nt(c,p)>this.pointerMoveTolerance);var k,T,j,A=this.getPointerIndex(t),re={pointer:t,pointerIndex:A,pointerInfo:this.pointers[A],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,j=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/j,k.page.y=T.page.y/j,k.client.x=T.client.x/j,k.client.y=T.client.y/j,k.timeStamp=j),this._scopeFire("interactions:move",re),m||this.simulation||(this.interacting()&&(re.type=null,this.move(re)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=F({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:U(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=z(t),j=this.getPointerIndex(t),A=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),A?A.pointer=t:(A=new fn(T,t,o,null,null),j=this.pointers.length,this.pointers.push(A)),ue(this.coords.cur,this.pointers.map(function(re){return re.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,A.downTime=this.coords.cur.timeStamp,A.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:A,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new yt(this,t,this.prepared.name,o,this.element,l,c)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(oe(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Tt(a.coords.cur,t),Tt(a.coords.delta,t),oe(a.edges,a.rect,t),t.x=0,t.y=0,!0}function La(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 Tt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=La},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&&(Tt(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(Qt(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}}},ra=qt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=At(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=nt(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,l=At(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Xe.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,j=this.interaction,A=At(j).resistance,re=(j._now()-this.t0)/1e3;if(re<this.te){var Ce,He=1-(Math.exp(-A*re)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Ce={x:Wt(k=He,t,l,p),y:Wt(k,o,c,m)}):Ce={x:this.targetOffset.x*He,y:this.targetOffset.y*He};var Ue={x:Ce.x-this.currentOffset.x,y:Ce.y-this.currentOffset.y};this.currentOffset.x+=Ue.x,this.currentOffset.y+=Ue.y,j.offsetBy(Ue),j.move(),this.onNextFrame(function(){return T.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=At(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Xe.cancel(this.timeout)}}]),a}();function At(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=at(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"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 Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=ie(t,o);for(t in l)this.types[t]=Te(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=ie(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Fa(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Sn={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(A,re,Ce,He,Ue){var Ze=Fa(Ue);if(!l[Ce]){l[Ce]=[];for(var ct=0;ct<c.length;ct++){var rt=c[ct];m(rt,Ce,T),m(rt,Ce,j,!0)}}var gt=l[Ce],Dt=Oe(gt,function(It){return It.selector===A&&It.context===re});Dt||(Dt={selector:A,context:re,listeners:[]},gt.push(Dt)),Dt.listeners.push({func:He,options:Ze})},removeDelegate:function(A,re,Ce,He,Ue){var Ze,ct=Fa(Ue),rt=l[Ce],gt=!1;if(rt)for(Ze=rt.length-1;Ze>=0;Ze--){var Dt=rt[Ze];if(Dt.selector===A&&Dt.context===re){for(var It=Dt.listeners,kt=It.length-1;kt>=0;kt--){var Ct=It[kt];if(Ct.func===He&&Ja(Ct.options,ct)){It.splice(kt,1),It.length||(rt.splice(Ze,1),k(re,Ce,T),k(re,Ce,j,!0)),gt=!0;break}}if(gt)break}}},delegateListener:T,delegateUseCapture:j,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(A,re,Ce,He){if(A.addEventListener){var Ue=Fa(He),Ze=Oe(o,function(ct){return ct.eventTarget===A});Ze||(Ze={eventTarget:A,events:{}},o.push(Ze)),Ze.events[re]||(Ze.events[re]=[]),Oe(Ze.events[re],function(ct){return ct.func===Ce&&Ja(ct.options,Ue)})||(A.addEventListener(re,Ce,p.supportsOptions?Ue:Ue.capture),Ze.events[re].push({func:Ce,options:Ue}))}}function k(A,re,Ce,He){if(A.addEventListener&&A.removeEventListener){var Ue=U(o,function(ta){return ta.eventTarget===A}),Ze=o[Ue];if(Ze&&Ze.events)if(re!=="all"){var ct=!1,rt=Ze.events[re];if(rt){if(Ce==="all"){for(var gt=rt.length-1;gt>=0;gt--){var Dt=rt[gt];k(A,re,Dt.func,Dt.options)}return}for(var It=Fa(He),kt=0;kt<rt.length;kt++){var Ct=rt[kt];if(Ct.func===Ce&&Ja(Ct.options,It)){A.removeEventListener(re,Ce,p.supportsOptions?It:It.capture),rt.splice(kt,1),rt.length===0&&(delete Ze.events[re],ct=!0);break}}}ct&&!Object.keys(Ze.events).length&&o.splice(Ue,1)}else for(re in Ze.events)Ze.events.hasOwnProperty(re)&&k(A,re,"all")}}function T(A,re){for(var Ce=Fa(re),He=new Ya(A),Ue=l[A.type],Ze=ce(A)[0],ct=Ze;E.element(ct);){for(var rt=0;rt<Ue.length;rt++){var gt=Ue[rt],Dt=gt.selector,It=gt.context;if(Q(ct,Dt)&&fe(It,Ze)&&fe(It,ct)){var kt=gt.listeners;He.currentTarget=ct;for(var Ct=0;Ct<kt.length;Ct++){var ta=kt[Ct];Ja(ta.options,Ce)&&ta.func(He)}}}ct=at(ct)}}function j(A){return T(A,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=at(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var j=0,A=p.interactions.list;j<A.length;j++){var re=A[j];if(!(re.pointerType!==l||/down/i.test(c)&&re.simulation))return re}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ae(o),p=ce(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,A=o.changedTouches;j<A.length;j++){var re=A[j],Ce={pointer:re,pointerId:z(re),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},He=sn(Ce);T.push([Ce.pointer,Ce.eventTarget,Ce.curEventTarget,He])}}else{var Ue=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ze=0;Ze<l.length&&!Ue;Ze++)Ue=l[Ze].pointerType!=="mouse"&&l[Ze].pointerIsDown;Ue=Ue||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Ue){var ct={pointer:o,pointerId:z(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},rt=sn(ct);T.push([ct.pointer,ct.eventTarget,ct.curEventTarget,rt])}}for(var gt=0;gt<T.length;gt++){var Dt=T[gt],It=Dt[0],kt=Dt[1],Ct=Dt[2];Dt[3][a](It,o,kt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var j=c&&c.events,A=0;A<p.length;A++){var re=p[A];k(o,re.type,re.listener,j)}}var Tn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=se.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var j=T[k];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var A=function(){var He=Ce[re];a.documents.some(function(Ue){return fe(Ue.doc,He.downTarget)})||j.removePointer(He.pointer,He.event)},re=0,Ce=j.pointers;re<Ce.length;re++)A()}}(c=V.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,j=a.interactions.list;T<j.length;T++)j[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(j,k);var T=J(j);function j(){return u(this,j),T.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(A){a.interactions.pointerMoveTolerance=A}},{key:"_now",value:function(){return a.now()}}]),j}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(j,A){return a.fire(j,A)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Ma)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Ra=Tn,Pa=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Pa||{}),ll=function(){function a(t,o,l,c){u(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||l,this._win=$(ve(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Pa.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Pa.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=Ne(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Qe(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ve(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||fe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?De(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?De(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=ie(o,l,p);for(var k in m){k==="wheel"&&(k=se.wheelEvent);for(var T=0,j=m[k];T<j.length;T++){var A=j[T];ba(k,this._actions)?this.events[t===Pa.On?"on":"off"](k,A):E.string(this.target)?this._scopeEvents[t===Pa.On?"addDelegate":"removeDelegate"](this.target,this._context,k,A,c):this._scopeEvents[t===Pa.On?"add":"remove"](this.target,k,A,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Pa.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Pa.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=U(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Oe(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&Q(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=fa(Zt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Be,c.getTouchDistance=ne,c.getTouchAngle=G,c.getElementRect=Qe,c.getElementClientRect=Re,c.matchesSelector=Q,c.closest=Je,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.on(A,m,k)}return this}if(E.object(p)){for(var re in p)this.on(re,p[re],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var A=j[T];this.off(A,m,k)}return this}if(E.object(p)){for(var re in p)this.off(re,p[re],m);return this}var Ce;return ba(p,this.scope.actions)?p in this.globalEvents&&(Ce=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Ce,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=yt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=J(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return M(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){M(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),V.init(l),se.init(l),Xe.init(l),o.window=l,o.document=l.document,o.usePlugin(Ra),o.usePlugin(Sn),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[xo(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,ea=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,j=T===void 0?{x:0,y:0}:T,A={range:p,grid:a,x:null,y:null},re=0;re<t.length;re++){var Ce=t[re],He=Ce[0],Ue=Ce[1],Ze=Math.round((l-j.x)/a[He]),ct=Math.round((c-j.y)/a[Ue]);A[He]=Math.max(k.left,Math.min(k.right,Ze*a[He]+j.x)),A[Ue]=Math.max(k.top,Math.min(k.bottom,ct*a[Ue]+j.y))}return A};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,j=T.equalDelta,A=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=j;var re=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Ce=(re.left?1:-1)*(re.top?1:-1);t.edgeSign={x:Ce,y:Ce}}else t.edgeSign={x:re.left?-1:1,y:re.top?-1:1};if(k!==!1&&F(l,re),A!=null&&A.length){var He=new _a(a.interaction);He.copyFrom(a.interaction.modification),He.prepareStates(A),t.subModification=He,He.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);oe(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),j=T.delta;return T.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var j=l.height*m;o.x=p.x+(j-c.width)*k.x}}var gl=na(fl,"aspectRatio"),Do=function(){};Do._defaults={};var In=Do;function Qa(a,t,o){return E.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var Bn={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var j=Qa(m.restriction,c,p);if(j){var A=j.right-j.left-t.width,re=j.bottom-j.top-t.height;A<0&&(T.left+=A,T.right+=A),re<0&&(T.top+=re,T.bottom+=re)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(Bn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=de(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},j=Qa(m.outer,l,k)||{};Eo(T,Co),Eo(j,_o),o.top?t.y=Math.min(Math.max(j.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(hn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Bn.defaults),kl=na({start:Bn.start,set:Bn.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Z(Qa(p.min,t,a.coords))||xl,k=Z(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},hn.noInner),outer:F({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,j=T.offsetWithOrigin?function(Ce){var He=Ce.interaction.element,Ue=de(pe(Ce.state.options.origin,null,null,[He])),Ze=Ue||te(Ce.interactable,He,Ce.interaction.prepared.name);return Ze}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var A=pe(T.offset,l,c,[o]);(t=de(A)||{x:0,y:0}).x+=j.x,t.y+=j.y}var re=T.relativePoints;m.offsets=p&&re&&re.length?re.map(function(Ce,He){return{index:He,relativePoint:Ce,x:k.left-p.width*Ce.x+t.x,y:k.top-p.height*Ce.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=te(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var j=0,A=p;j<A.length;j++)for(var re=A[j],Ce=k.x-re.x,He=k.y-re.y,Ue=0,Ze=c.targets.length;Ue<Ze;Ue++){var ct=c.targets[Ue],rt=void 0;(rt=E.func(ct)?ct(Ce,He,t._proxy,re,Ue):ct)&&T.push({x:(E.number(rt.x)?rt.x:Ce)+re.x,y:(E.number(rt.y)?rt.y:He)+re.y,range:E.number(rt.range)?rt.range:c.range,source:ct,index:Ue,offset:re})}for(var gt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var It=T[Dt],kt=It.range,Ct=It.x-k.x,ta=It.y-k.y,Kt=nt(Ct,ta),da=Kt<=kt;kt===1/0&&gt.inRange&&gt.range!==1/0&&(da=!1),gt.target&&!(da?gt.inRange&&kt!==1/0?Kt/kt<gt.distance/gt.range:kt===1/0&&gt.range!==1/0||Kt<gt.distance:!gt.inRange&&Kt<gt.distance)||(gt.target=It,gt.distance=Kt,gt.range=kt,gt.inRange=da,gt.delta.x=Ct,gt.delta.y=ta)}return gt.inRange&&(o.x=gt.target.x,o.y=gt.target.y),l.closest=gt,gt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(ao,"snap"),Nn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var j=T[k],A=void 0;if(A=E.func(j)?j(m.x,m.y,t):j){for(var re=0,Ce=o.targetFields;re<Ce.length;re++){var He=Ce[re],Ue=He[0],Ze=He[1];if(Ue in A||Ze in A){A.x=A[Ue],A.y=A[Ze];break}}o.options.targets.push(A)}}var ct=ao.set(a);return o.options=c,ct},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Nn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Nn.start(a)):null},set:Nn.set,defaults:F(fa(Nn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:In,avoid:In,transform:In,rubberband:In},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T){var j;if(u(this,o),C(R(j=t.call(this,k)),p),p!==c&&C(R(j),c),j.timeStamp=T,j.originalEvent=p,j.type=l,j.pointerId=z(c),j.pointerType=ae(c),j.target=m,j.currentTarget=null,l==="tap"){var A=k.getPointerIndex(c);j.dt=j.timeStamp-k.pointers[A].downTime;var re=j.timeStamp-k.tapTime;j.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===j.target&&re<500}else l==="doubletap"&&(j.dt=c.timeStamp-k.tapTime,j.double=!0);return j}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(xe),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,F(a.actions.phaselessTypes,gn.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,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,j=c.pointers[T].hold,A=Ge(k),re={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:A,node:null},Ce=0;Ce<A.length;Ce++){var He=A[Ce];re.node=He,l.fire("pointerEvents:collect-targets",re)}if(re.targets.length){for(var Ue=1/0,Ze=0,ct=re.targets;Ze<ct.length;Ze++){var rt=ct[Ze].eventable.options.holdDuration;rt<Ue&&(Ue=rt)}j.duration=Ue,j.timeout=setTimeout(function(){$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},Ue)}})(a,t),$a(a,t)},"interactions:up":function(a,t){oo(a),$a(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),$a(a,t)}},PointerEvent:So,fire:$a,collectEventTargets:To,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,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?To(a,t):k,j=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var A={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:j},re=0;re<T.length;re++){var Ce=T[re];for(var He in Ce.props||{})j[He]=Ce.props[He];var Ue=te(Ce.eventable,Ce.node);if(j._subtractOrigin(Ue),j.eventable=Ce.eventable,j.currentTarget=Ce.node,Ce.eventable.fire(j),j._addOrigin(Ue),j.immediatePropagationStopped||j.propagationStopped&&re+1<T.length&&T[re+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",A),m==="tap"){var Ze=j.double?$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=Ze,o.tapTime=Ze.timeStamp}return j}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var j=Ge(p),A={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:j,targets:[],node:null},re=0;re<j.length;re++){var Ce=j[re];A.node=Ce,t.fire("pointerEvents:collect-targets",A)}return m==="hold"&&(A.targets=A.targets.filter(function(He){var Ue,Ze;return He.eventable.options.holdDuration===((Ue=o.pointers[k])==null||(Ze=Ue.hold)==null?void 0:Ze.duration)})),A.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);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)]=Il,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,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"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,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,Ll={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,j=function(){var re=m[A],Ce=l.getRect(re);if(!Ce)return 1;var He,Ue=Oe(p.interactions.list,function(rt){return rt.interacting()&&rt.interactable===l&&rt.element===re&&rt.prepared.name===c.name});if(Ue)Ue.move(),T&&(He=Ue._reflowPromise||new k(function(rt){Ue._reflowResolve=rt}));else{var Ze=Z(Ce),ct=function(rt){return{coords:rt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ze.x,y:Ze.y},client:{x:Ze.x,y:Ze.y},timeStamp:p.now()});He=function(rt,gt,Dt,It,kt){var Ct=rt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:kt,pointer:kt,eventTarget:Dt,phase:"reflow"};Ct.interactable=gt,Ct.element=Dt,Ct.prevEvent=kt,Ct.updatePointer(kt,kt,Dt,!0),W(Ct.coords.delta),Nt(Ct.prepared,It),Ct._doPhase(ta);var Kt=rt.window,da=Kt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(It,gt,Dt),Ct._interacting?(Ct.move(ta),Ct.end(kt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(kt,kt),ya}(p,l,re,c,ct)}T&&T.push(He)},A=0;A<m.length&&!j();A++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},zl=Ll;if(ea.use(Ma),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(tt),ea.use(vt),ea.use(zl),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(kn,kn.exports)),kn.exports}var np=ap();const Zo=Ve.getDefaultExportFromCjs(np),Jn=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:i,emit:s}){const r=n,d=s,u=e.inject(Kr),b=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,O=NaN,R=NaN,J=NaN,M=NaN,we=-1,X=-1,K=-1,le=-1,D=r.x,$=r.y,y=r.w,N=r.h;const E=e.ref(),ge=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:pe});function Ye(w){ie(w)}function it(){Pe()}function Le(w){pa(r.isDraggable)&&(f.draggable=w)}function We(w){pa(r.isResizable)&&(f.resizable=w)}function _e(w){pa(r.isBounded)&&(f.bounded=w)}function V(w){f.transformScale=w}function ee(w){f.rowHeight=w}function se(w){f.maxRows=w}function fe(){f.rtl=Yo()==="rtl",Pe()}function Je(w){f.cols=Math.floor(w)}u.increaseItem(ge),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,N=r.h,y=r.w,aa(Qe)}),b.on("updateWidth",Ye),b.on("compact",it),b.on("setDraggable",Le),b.on("setResizable",We),b.on("setBounded",_e),b.on("setTransformScale",V),b.on("setRowHeight",ee),b.on("setMaxRows",se),b.on("directionchange",fe),b.on("setColNum",Je)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Ye),b.off("compact",it),b.off("setDraggable",Le),b.off("setResizable",We),b.off("setBounded",_e),b.off("setTransformScale",V),b.off("setRowHeight",ee),b.off("setMaxRows",se),b.off("directionchange",fe),b.off("setColNum",Je),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ge)}),i({state:f,wrapper:E});const at=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>f.resizable&&!r.static),L=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ye=e.computed(()=>(f.draggable||f.resizable)&&!r.static),De=Gd("item"),Ke=e.computed(()=>({[De.b()]:!0,[De.bm("resizable")]:Q.value,[De.bm("static")]:r.static,[De.bm("resizing")]:f.isResizing,[De.bm("dragging")]:f.isDragging,[De.bm("transform")]:f.useCssTransforms,[De.bm("rtl")]:L.value,[De.bm("no-touch")]:at&&ye.value})),Re=e.computed(()=>[De.be("resizer"),L.value&&De.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(W)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(W)}),e.watch(()=>f.rowHeight,()=>{aa(Qe),aa(Ge)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(W),aa(Qe),aa(Ge)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(W)}),e.watch(L,()=>{aa(W),aa(Qe)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Qe),aa(Ge))});function Qe(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=Y(D,$,y,N);f.isDragging&&(w.top=f.dragging.top,L.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?L.value?S=Ud(w.top,w.right,w.width,w.height):S=jd(w.top,w.left,w.width,w.height):L.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function Ge(){const w={};for(const S of["width","height"]){const q=f.style[S].match(/^(\d+)px$/);if(!q)return;w[S]=q[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function ve(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H={width:0,height:0};let P;switch(S){case"resizestart":{W(),we=y,X=N,P=Y(D,$,y,N),H.width=P.width,H.height=P.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=z),!w.edges.top&&!w.edges.bottom&&(M=ue);const Be=Xo(J,M,z,ue);L.value?H.width=f.resizing.width-Be.deltaX/f.transformScale:H.width=f.resizing.width+Be.deltaX/f.transformScale,H.height=f.resizing.height+Be.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{P=Y(D,$,y,N),H.width=P.width,H.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=te(H.height,H.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),J=z,M=ue,(y!==P.w||N!==P.h)&&d("resize",r.i,P.h,P.w,H.height,H.width),w.type==="resizeend"&&(we!==y||X!==N)&&d("resized",r.i,P.h,P.w,H.height,H.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H=w.target;if(!H.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,le=$;const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,xe=G.right/f.transformScale,Te=ne.right/f.transformScale,Ne=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(xe-Te)*-1:P.left=ae-ce,P.top=Ne-U,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Xo(O,R,z,ue);if(L.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const G=H.offsetParent.clientHeight-Z(r.h,f.rowHeight,f.margin[1]);P.top=oe(P.top,0,G);const ae=de(),ce=f.containerWidth-Z(r.w,ae,f.margin[0]);P.left=oe(P.left,0,ce)}f.dragging=P;break}case"dragend":{const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,xe=G.right/f.transformScale,Te=ne.right/f.transformScale,Ne=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(xe-Te)*-1:P.left=ae-ce,P.top=Ne-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Be;L.value,Be=pe(P.top,P.left),O=z,R=ue,(D!==Be.x||$!==Be.y)&&d("move",r.i,Be.x,Be.y),w.type==="dragend"&&(K!==D||le!==$)&&d("moved",r.i,Be.x,Be.y),b.emit("dragEvent",w.type,r.i,Be.x,Be.y,N,y)}function Y(w,S,q,z){const ue=de();let H;return L.value?H={right:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])}:H={left:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])},H}function pe(w,S){const q=de();let z=Math.round((S-f.margin[0])/(q+f.margin[0])),ue=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return z=Math.max(Math.min(z,f.cols-y),0),ue=Math.max(Math.min(ue,f.maxRows-N),0),{x:z,y:ue}}function de(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Z(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function oe(w,S,q){return Math.max(Math.min(w,q),S)}function te(w,S,q=!1){const z=de();let ue=Math.round((S+f.margin[0])/(z+f.margin[0])),H=0;return q?H=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ue=Math.max(Math.min(ue,f.cols-D),0),H=Math.max(Math.min(H,f.maxRows-$),0),{w:ue,h:H}}function ie(w,S){f.containerWidth=w}function Pe(){Qe()}function nt(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(F);function C(){if(nt(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Wo(ve);function W(){if(nt(),!!g.value)if(f.resizable&&!r.static){const w=Y(0,0,r.maxW,r.maxH),S=Y(0,0,r.minW,r.minH),q={edges:{left:L.value?`.${Re.value[0]}`:!1,right:L.value?!1:`.${Re.value[0]}`,bottom:`.${Re.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(q.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(q),_||(_=!0,g.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?I(z):ve(z)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass(Ke.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Re.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var Qo;nn&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const op=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(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["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 Pn;if(nn){for(const n of dp)if(n[1]in document){Pn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Pn){const n=Pn[2],i=Pn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},En;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(En||(En={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=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},_n=typeof window<"u"?window:{},Mn=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(_n.navigator&&_n.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},dn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},rr=an({devicePixelContentBoxSize:dn(),borderBoxSize:dn(),contentBoxSize:dn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),Mn.has(n)&&!i)return Mn.get(n);if(Zr(n))return Mn.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),O=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),J=r?0:xa(s.borderRightWidth),M=r?0:xa(s.borderBottomWidth),we=r?0:xa(s.borderLeftWidth),X=O+x,K=f+_,le=we+J,D=R+M,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-le-n.clientWidth:0,N=d?X+le:0,E=d?K+D:0,ge=r?r.width:xa(s.width)-N-y,Ye=r?r.height:xa(s.height)-E-$,it=ge+X+y+le,Le=Ye+K+$+D,We=an({devicePixelContentBoxSize:dn(Math.round(ge*devicePixelRatio),Math.round(Ye*devicePixelRatio),u),borderBoxSize:dn(it,Le,u),contentBoxSize:dn(ge,Ye,u),contentRect:new Jr(O,f,ge,Ye)});return Mn.set(n,We),We},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case En.DEVICE_PIXEL_CONTENT_BOX:return b;case En.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(lr(n);vp();)n=wp(),lr(n);return hp()&&gp(),n>0},io,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},$n=0,Sp=function(){return!!$n},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!so){so=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(so=!1,i=r-sr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():_n.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return _n.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return _n.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!$n&&n>0&&fo.start(),$n+=n,!$n&&fo.stop()},Np=function(n){return!ko(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||En.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Ln=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Ln.set(i,r)},n.observe=function(i,s,r){var d=Ln.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Ln.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Ln.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function Lp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const zp=e.ref(!1);e.computed(()=>zp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!nn)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,b]]of vr.entries())s+=` html.${u} .${co}, .${b} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=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:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=Lp(),O=Ld();O.on("resizeEvent",R),O.on("dragEvent",J),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Ye(),f.value&&x(f.value,zd(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),D()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&_(f.value)});function R(Le,We,_e,V,ee,se){E(Le,We,_e,V,ee,se)}function J(Le,We,_e,V,ee,se){N(Le,We,_e,V,ee,se)}e.watch(()=>u.width,(Le,We)=>{e.nextTick(()=>{O.emit("updateWidth",Le),We===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Le=>{O.emit("setColNum",Le)}),e.watch(()=>r.rowHeight,Le=>{O.emit("setRowHeight",Le)}),e.watch(()=>r.isDraggable,Le=>{O.emit("setDraggable",Le)}),e.watch(()=>r.isResizable,Le=>{O.emit("setResizable",Le)}),e.watch(()=>r.isBounded,Le=>{O.emit("setBounded",Le)}),e.watch(()=>r.transformScale,Le=>{O.emit("setTransformScale",Le)}),e.watch(()=>r.responsive,Le=>{Le||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,Le=>{O.emit("setMaxRows",Le)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:we})),e.provide(jr,O),i({state:u,getItem:X,resizeEvent:E,dragEvent:N,layoutUpdate:K});function M(Le){b.set(Le.i,Le)}function we(Le){b.delete(Le.i)}function X(Le){return b.get(Le)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Le=it(g.value,u.originalLayout);if(Le.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Le);else{const We=new Set(Le.map(_e=>_e.i));u.originalLayout=u.originalLayout.filter(_e=>!We.has(_e.i))}u.lastLayoutLength=g.value.length,Ye()}cn(g.value,r.verticalCompact),O.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function $(){if(!r.autoSize)return;const Le=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+Le)+Le+"px"}let y;function N(Le,We,_e,V,ee,se){let fe=Ho(g.value,We);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),Le==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Je,{i:at,x:Q,y:L})=>({...Je,[at]:{x:Q,y:L}}),{})),Le==="dragmove"||Le==="dragstart"?(u.placeholder.i=We,u.placeholder.x=fe.x,u.placeholder.y=fe.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,fe,_e,V,!0,r.preventCollision),r.restoreOnDrag?(fe.static=!0,cn(g.value,r.verticalCompact,y),fe.static=!1):cn(g.value,r.verticalCompact),O.emit("compact"),le(),Le==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(Le,We,_e,V,ee,se){let fe=Ho(g.value,We);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let Je;if(r.preventCollision){const at=Wr(g.value,{...fe,w:se,h:ee}).filter(Q=>Q.i!==fe.i);if(Je=at.length>0,Je){let Q=1/0,L=1/0;at.forEach(ye=>{ye.x>fe.x&&(Q=Math.min(Q,ye.x)),ye.y>fe.y&&(L=Math.min(L,ye.y))}),Number.isFinite(Q)&&(fe.w=Q-fe.x),Number.isFinite(L)&&(fe.h=L-fe.y)}}Je||(fe.w=se,fe.h=ee),Le==="resizestart"||Le==="resizemove"?(u.placeholder.i=We,u.placeholder.x=_e,u.placeholder.y=V,u.placeholder.w=fe.w,u.placeholder.h=fe.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):Le&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ge(),cn(g.value,r.verticalCompact),O.emit("compact"),le(),Le==="resizeend"&&d("layout-updated",g.value)}function ge(){const Le=Jd(r.breakpoints,u.width);if(Le===u.lastBreakpoint)return;const We=Gr(Le,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const _e=Zd(u.originalLayout,u.layouts,r.breakpoints,Le,u.lastBreakpoint,We,r.verticalCompact);u.layouts[Le]=_e,u.lastBreakpoint!==Le&&d("breakpoint-changed",Le,_e),g.value=_e,d("update:layout",_e),u.lastBreakpoint=Le,O.emit("setColNum",We)}function Ye(){u.layouts=Object.assign({},r.responsiveLayouts)}function it(Le,We){const _e=new Set(We.map(fe=>fe.i)),V=new Set(Le.map(fe=>fe.i)),ee=Le.filter(fe=>!_e.has(fe.i)),se=We.filter(fe=>!V.has(fe.i));return ee.concat(se)}return(Le,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Le.$slots.default?e.renderSlot(Le.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,_e=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:_e.i,ref_for:!0},_e),{default:e.withCtx(()=>[e.renderSlot(Le.$slots,"item",{item:_e})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=$t.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,J,M,we;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(we=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:we.layout:"vertical"}),f=e.computed(()=>{var R,J;return((J=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},O=(R,J)=>{d("routeUrl",R,J)};return(R,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":J[0]||(J[0]=M=>b.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(M,we)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var X,K,le,D,$,y,N,E,ge,Ye,it,Le,We;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:we===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(K=M==null?void 0:M.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((D=M==null?void 0:M.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=M==null?void 0:M.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(N=e.unref(pt)[we])==null?void 0:N.showIndex,allowMove:(E=e.unref(pt)[we])==null?void 0:E.allowMove,viewport:(ge=e.unref(pt)[we])==null?void 0:ge.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(yo),itemData:(Ye=M==null?void 0:M.component)==null?void 0:Ye.compData,childItemData:(it=M==null?void 0:M.component)==null?void 0:it.itemChildData,key:e.unref(pn),cacheNewData:e.unref(wn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Le=M==null?void 0:M.component)==null?void 0:Le.tableId,allMapContents:e.unref(Hn),children:(We=M==null?void 0:M.component)==null?void 0:We.children,level:x.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(Lr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,we)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(we)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=M==null?void 0:M.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(pn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Hn),children:M==null?void 0:M.children,level:x.value,onRowClick:_,onRouteUrl:O},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=zt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=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"}]),Kp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return Kp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.addSelectMenu=eo;exports.affixItems=rd;exports.allMapContents=Hn;exports.cacheNewData=wn;exports.clickMainKey=Lr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=pn;exports.compNames=yo;exports.compShow=Wn;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=qn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Jt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toolBar=Ba;exports.verifyButton=md;