ss-component-new 1.2.157 → 1.2.158
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.
- package/dist/index-BI189L9f.js +12451 -0
- package/dist/{index-D-KmkWON.js → index-BN6q1mp6.js} +2 -2
- package/dist/{index-BZ8dVq9e.js → index-BuGSZUdn.js} +5 -5
- package/dist/{index-0VmT6NTQ.cjs → index-CCv3E1hu.cjs} +1 -1
- package/dist/{index-ChEYPVLw.js → index-CTdsm8Ah.js} +3 -3
- package/dist/{index-Be46NApR.cjs → index-DnR6vlBp.cjs} +1 -1
- package/dist/{index-3ObhKDQk.cjs → index-Dt8SqpFR.cjs} +1 -1
- package/dist/index-dEOKYtTi.cjs +1 -0
- package/dist/{index-BDnkp7Dt.js → index-fPZS6D_6.js} +1 -1
- package/dist/{index-BMDI-P3d.cjs → index-hVoewZt8.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BE3hooPx.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BJy6SUjH.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-3Rjpklkh.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CCTfS1Zw.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CaBx_tsr.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-B-zgpxeQ.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-3cwCIRaO.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BP0Tacbw.cjs} +1 -1
- package/dist/{main-BBuE_qnM.js → main-ClisO4tc.js} +2 -2
- package/dist/{main-y7xxaKyn.cjs → main-Eaaucypj.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +3 -3
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-HKpbTQLq.js +0 -12381
- package/dist/index-rC0ZXewZ.cjs +0 -1
package/dist/index-rC0ZXewZ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const kn=require("./index-jUDIs3Ya.cjs"),e=require("vue"),h=require("./index-C8qRkCgn.cjs"),Vt=require("./index-BNUNEmtk.cjs"),Be=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CttArv-I.cjs"),Gt=require("./index-GDtT6HPL.cjs"),Bo=require("./threeViewerHost-Drc-zri7.cjs"),jt=require("./index-DOCHgBta.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),No=require("./isString--eJE54G5.cjs"),Ao=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Vo=require("./index-DBArZP7q.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-CoQ92yGS.cjs"),Ll=require("./index-BpPyaNFa.cjs"),Rl=require("vue-router"),bn=require("./index-9hspBVrQ.cjs"),dn=require("./index-D_tbgi5B.cjs");var Pl=/\s/;function $l(n){for(var i=n.length;i--&&Pl.test(n.charAt(i)););return i}var jl=/^\s+/;function Kl(n){return n&&n.slice(0,$l(n)+1).replace(jl,"")}var Oo=NaN,Ul=/^[-+]0x[0-9a-f]+$/i,Wl=/^0b[01]+$/i,Hl=/^0o[0-7]+$/i,ql=parseInt;function co(n){if(typeof n=="number")return n;if(h.isSymbol(n))return Oo;if(h.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=h.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Kl(n);var s=Wl.test(n);return s||Hl.test(n)?ql(n.slice(2),s?2:8):Ul.test(n)?Oo:+n}var oo=function(){return h.root.Date.now()},Gl="Expected a function",Xl=Math.max,Yl=Math.min;function ho(n,i,s){var r,d,u,k,g,f,x=0,_=!1,O=!1,P=!0;if(typeof n!="function")throw new TypeError(Gl);i=co(i)||0,h.isObject(s)&&(_=!!s.leading,O="maxWait"in s,u=O?Xl(co(s.maxWait)||0,i):u,P="trailing"in s?!!s.trailing:P);function J(B){var E=r,ve=d;return r=d=void 0,x=B,k=n.apply(ve,E),k}function M(B){return x=B,g=setTimeout(j,i),_?J(B):k}function xe(B){var E=B-f,ve=B-x,Ye=i-E;return O?Yl(Ye,u-ve):Ye}function X(B){var E=B-f,ve=B-x;return f===void 0||E>=i||E<0||O&&ve>=u}function j(){var B=oo();if(X(B))return le(B);g=setTimeout(j,xe(B))}function le(B){return g=void 0,P&&r?J(B):(r=d=void 0,k)}function C(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?k:le(oo())}function y(){var B=oo(),E=X(B);if(r=arguments,d=this,f=B,E){if(g===void 0)return M(f);if(O)return clearTimeout(g),g=setTimeout(j,i),J(f)}return g===void 0&&(g=setTimeout(j,i)),k}return y.cancel=C,y.flush=$,y}var Jl="[object Boolean]";function mr(n){return n===!0||n===!1||h.isObjectLike(n)&&h.baseGetTag(n)==Jl}function yr(n){return n===void 0}const Zl={class:"form-content"},Ql={title:"选择标签"},ei={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ti={class:"col-operate-wrap"},ai={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:i}){const s=()=>{k.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var z;const S=(z=rt.value)==null?void 0:z.split("/");return(S==null?void 0:S.some(ce=>(ce==null?void 0:ce.includes("updateLoading"))||(ce==null?void 0:ce.includes("loading"))))?!1:We.value==="view"});const d=i,u=e.ref([]),k=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Bo.useThreeSystem(),_=e.ref(),O=e.ref(!1),P=e.ref(!1),J=e.ref([]),M=e.ref(),xe=e.ref(!1),X=e.ref([]),j=kn.useFormToTableComp(h.pinia),le=kn.useFormComp(h.pinia),C=e.ref(!1),$=e.ref(),y=h.useLoginState(h.pinia),{loginUserInfo:B}=h.storeToRefs(y),E=e.ref(),ve=e.ref(!0),Ye=jt.useModelComp(h.pinia),{tableViewContents:ct,itemData:ze,isEdit:We,routeToChildPath:De,lockingPage:V}=h.storeToRefs(Ye),Q=e.ref(null),se=e.ref(!1),de=e.ref(!1),Je=jt.useMenuState(),{activeMenuPath:rt}=h.storeToRefs(Je),Z=Be.useOriginalState(h.pinia),{originalPath:F}=h.storeToRefs(Z),me=e.ref([]),we=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$e=async S=>{de.value=S,await Re("disabled",null,S,!0)},Le=async S=>{await Re("operable",null,S,!0)};e.watch(()=>rt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ze=()=>{e.nextTick(()=>{Y()})},Xe=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(z=>({...z,isFormColHidden:!(S!=null&&S.includes(z.label))}))};e.onUnmounted(()=>{Q.value=null});const pe=S=>{d("clickTrigger",S)},R=async S=>{var q,z,ce,W,L,Ee;if(S===""){let te="";(q=u.value)==null||q.forEach(be=>{be!=null&&be.isMain&&(te=be==null?void 0:be.value)});let G=await Be.getItemData(De.value,sessionStorage.getItem("systemKey"),"");te=((Ee=(L=(W=(ce=(z=G==null?void 0:G[0])==null?void 0:z.compData)==null?void 0:ce.find(be=>(be==null?void 0:be.key)==="mainRouters"))==null?void 0:W.contents)==null?void 0:L[0])==null?void 0:Ee.routerContent)+F.value+te;let ie=await Be.getItemData(te,sessionStorage.getItem("systemKey"),"");xe.value=!0,X.value=ie==null?void 0:ie.filter(be=>(be==null?void 0:be.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=Q.value)==null?void 0:q.$el;S&&Be.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:ce,newIndex:W}=z;if(ce===W)return;const L=u.value.splice(ce,1)[0];u.value.splice(W,0,L)}})},Re=async(S,q,z,ce=!1)=>{var W,L,Ee,te,G,ee,ie,be;try{Ye.setRefreshCurStructure(!1);const _e=await h.getInsofDataApi({id:r==null?void 0:r.index});if(((W=_e==null?void 0:_e.data)==null?void 0:W.code)===200){let Se=(G=(te=(Ee=(L=_e==null?void 0:_e.data)==null?void 0:L.result)==null?void 0:Ee[0])==null?void 0:te.value)==null?void 0:G.pageData;ce?Se={...Se,compData:(ie=Se==null?void 0:Se.compData)==null?void 0:ie.map(Ne=>{var he;return(Ne==null?void 0:Ne.key)==="formContent"?{...Ne,contents:(he=Ne==null?void 0:Ne.contents)==null?void 0:he.map(Pe=>({...Pe,[S]:z}))}:Ne})}:Se={...Se,compData:(ee=Se==null?void 0:Se.compData)==null?void 0:ee.map(Ne=>{var he;return(Ne==null?void 0:Ne.key)==="formContent"?{...Ne,contents:(he=Ne==null?void 0:Ne.contents)==null?void 0:he.map(Pe=>(Pe==null?void 0:Pe.prop)===(q==null?void 0:q.prop)?{...Pe,[S]:z}:Pe)}:Ne})};const U=await h.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Se}});((be=U==null?void 0:U.data)==null?void 0:be.code)===200?(h.ElMessage.success("编辑成功"),Ye.setRefreshCurStructure(!0)):h.ElMessage.error("编辑响应失败")}}catch{h.ElMessage.error("编辑处理失败")}},ke=async(S,q)=>{await Re("label",q,S)},oe=async(S,q)=>{S&&await Re("type",q,S)},re=async(S,q,z)=>{await Re(q,z,S,!1)},ne=(S,q)=>{E.value===q?ve.value=!1:ve.value=!0,E.value=q==null?void 0:q.changeProp},Te=async S=>{var z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he;let q=[];if((z=S==null?void 0:S.toString())!=null&&z.includes(".urdf")){if(S.includes(",")){h.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,k.value=!0;return}if((ce=S==null?void 0:S.toString())!=null&&ce.includes(".stl")||(W=S==null?void 0:S.toString())!=null&&W.includes(".STL")||(L=S==null?void 0:S.toString())!=null&&L.includes(".obj")||(Ee=S==null?void 0:S.toString())!=null&&Ee.includes(".mtl")){const lt=((te=S==null?void 0:S.toString())==null?void 0:te.split(",")).map(He=>({url:He,extension:x(He)}));f.value=lt,g.value=!1,k.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ee=S==null?void 0:S.toString())!=null&&ee.includes(".STL")||(ie=S==null?void 0:S.toString())!=null&&ie.includes(".obj")||(be=S==null?void 0:S.toString())!=null&&be.includes(".mtl")){let Pe,lt=[],He={};if(Array.isArray(S)?Pe=S:Pe=S==null?void 0:S.split(","),Pe==null||Pe.forEach(nt=>{nt.includes(".mtl")?lt.push(nt):He.blob=He.blob?He.blob+","+nt:nt}),(lt==null?void 0:lt.length)>0&&(He.mtlBlobs=lt),(Se=(_e=Object.values(He))==null?void 0:_e[0])!=null&&Se.includes("http:"))q.push(He);else{const nt=new Blob([He.blob],{type:"application/octet-stream;charset=UTF-8"});let Fe=URL.createObjectURL(nt),ht="";(U=S==null?void 0:S.split("/"))==null||U.forEach((at,et)=>{var ue;et===((ue=S==null?void 0:S.split("/"))==null?void 0:ue.length)-1&&(ht=at)}),(Ne=He.blob)!=null&&Ne.includes(".stl")&&(ht=(ht==null?void 0:ht.replaceAll(">",""))+".urdf"),M.value=[{name:ht,blobUrl:Fe}],P.value=!0}}else{const Pe=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),lt=await h.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Pe.close()}),He=new Blob([lt.data],{type:"application/octet-stream;charset=UTF-8"});let nt=URL.createObjectURL(He),Fe="";(he=S==null?void 0:S.split("/"))==null||he.forEach((ht,at)=>{var et;at===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(Fe=ht)}),M.value=[{name:Fe,blobUrl:nt}],P.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Ke=()=>{P.value=!1},ut=S=>{var L,Ee,te,G;const q=(Ee=(L=h.cloneDeep(r.itemData))==null?void 0:L.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ee.contents,z=h.cloneDeep(S.content);let ce={};z&&((te=Object.values(z))==null?void 0:te.length)>0&&((G=Object.values(z))==null||G.forEach((ee,ie)=>{ce[q[ie].key]=ee}));const W={content:ce,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",W)},v=e.computed(()=>"http://222.92.178.198:62001"),D=async S=>{var _e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et,ue,Ae,Qe;if(!S)return;(Se=(_e=r==null?void 0:r.itemData)==null?void 0:_e.find(Ie=>(Ie==null?void 0:Ie.key)==="parentFormPath"))==null||Se.contents;let q=ct.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(Ie=>{var Oe,ye,I,fe;let ge=(Oe=Ie==null?void 0:Ie.key)==null?void 0:Oe.split("/");return(r==null?void 0:r.compName)===(ge==null?void 0:ge[0])&&(ye=u.value)!=null&&ye.find(tt=>(tt==null?void 0:tt.prop)===(ge==null?void 0:ge[1]))&&(Ie.value=(fe=(I=u.value)==null?void 0:I.find(tt=>(tt==null?void 0:tt.prop)===(ge==null?void 0:ge[1])))==null?void 0:fe.value),Ie}),Ye.setTableViewContents(q));const z=h.cloneDeep(r.itemData);let ce=z==null?void 0:z.map(Ie=>{var ge;return(Ie==null?void 0:Ie.key)==="formContent"&&((ge=Ie.contents)==null||ge.map((Oe,ye)=>{var I,fe,tt,Me,qe,Ve,pt,dt,it,ft,mt,Bt,Pt,At,_t,Ft,bt,Ht,Xt;return Oe.type=(fe=(I=u.value)==null?void 0:I.find(Ot=>(Ot==null?void 0:Ot.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:fe.type,Oe.options=Oe!=null&&Oe.options?Oe.options:((qe=(Me=(tt=Oe==null?void 0:Oe.key)==null?void 0:tt.split("$"))==null?void 0:Me[1])==null?void 0:qe.length)>0?(it=(dt=kn.formGetOptions((pt=(Ve=Oe==null?void 0:Oe.key)==null?void 0:Ve.split("$"))==null?void 0:pt[1]))==null?void 0:dt.split(","))==null?void 0:it.map(Ot=>({label:Ot,value:Ot})):[],(ft=Oe==null?void 0:Oe.key)!=null&&ft.includes("$")&&(Oe.key=(Bt=(mt=Oe==null?void 0:Oe.key)==null?void 0:mt.split("$"))==null?void 0:Bt[0]),Oe.signature=(At=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:At.signature,Oe.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Ft.isLoginUser,Oe.value=(bt=Object.values(S))==null?void 0:bt[ye],Oe.isFormColHidden=(Xt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Xt.isFormColHidden,Oe})),Ie}),W=u.value,L=(Ne=(U=h.cloneDeep(ce))==null?void 0:U.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Ne.contents;if(W=W==null?void 0:W.map(Ie=>{var ge;return Ie.value=(ge=L==null?void 0:L.find((Oe,ye)=>((Oe==null?void 0:Oe.id)??ye)===(Ie==null?void 0:Ie.id)))==null?void 0:ge.value,Ie}),!ve.value){d("contentChange",{contents:ce,index:r.index});return}let Ee="",te=(lt=(Pe=(he=h.cloneDeep(ce))==null?void 0:he.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Pe.contents)==null?void 0:lt.find((Ie,ge)=>{var Oe,ye,I;return(Ie==null?void 0:Ie.label)===E.value||ge.toString()===((I=(ye=(Oe=E.value)==null?void 0:Oe.split("t"))==null?void 0:ye[1])==null?void 0:I.toString())}),G=(He=te==null?void 0:te.optionUrl)==null?void 0:He.menuSelect,ee=!0;if((ht=(Fe=(nt=h.cloneDeep(ce))==null?void 0:nt.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Fe.contents)==null||ht.forEach(Ie=>{var ge,Oe,ye,I,fe,tt;ee&&((ye=(Oe=(ge=Ie==null?void 0:Ie.optionUrl)==null?void 0:ge.groupSelect)==null?void 0:Oe[1])!=null&&ye.includes("["))&&(Ee=(fe=(I=Ie==null?void 0:Ie.optionUrl)==null?void 0:I.groupSelect)==null?void 0:fe[1],JSON.stringify(G)===JSON.stringify((tt=Ie==null?void 0:Ie.optionUrl)==null?void 0:tt.menuSelect)&&(ee=!1))}),(at=te==null?void 0:te.optionUrl)!=null&&at.menuSelect&&ve.value){let Ie=await kn.getSelectRow(te),ge,Oe=(et=te==null?void 0:te.optionUrl)==null?void 0:et.menuSelect;if(Ie==null||Ie.forEach(ye=>{var I,fe,tt,Me,qe,Ve,pt,dt,it,ft;Ee===((fe=(I=te==null?void 0:te.optionUrl)==null?void 0:I.groupSelect)==null?void 0:fe[1])&&((qe=(Me=(tt=te==null?void 0:te.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Me[1])!=null&&qe.includes("["))&&((ft=h.cloneDeep(ye))==null?void 0:ft[(it=(dt=(pt=(Ve=te==null?void 0:te.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:pt[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:it.replaceAll("]","")])===(te==null?void 0:te.value)&&(ge=ye)}),ge){let ye=h.cloneDeep(W);ye=ye==null?void 0:ye.map(fe=>{var tt,Me,qe,Ve,pt,dt,it,ft,mt,Bt,Pt;return(ge!=null&&ge[fe==null?void 0:fe.label]||ge!=null&&ge[(Ve=(qe=(Me=(tt=fe==null?void 0:fe.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:Me[1])==null?void 0:qe.replaceAll("[",""))==null?void 0:Ve.replaceAll("]","")])&&((it=(dt=(pt=fe==null?void 0:fe.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:dt[1])!=null&&it.includes("["))&&Oe!=null&&Oe.every(At=>{var _t,Ft;return(Ft=(_t=fe==null?void 0:fe.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(At)})&&(fe.value=(ge==null?void 0:ge[fe==null?void 0:fe.label])||(ge==null?void 0:ge[(Pt=(Bt=(mt=(ft=fe==null?void 0:fe.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:mt[1])==null?void 0:Bt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(fe.value)&&fe.value.every(At=>(At==null?void 0:At.url)&&(At==null?void 0:At.name))&&(fe.type="Upload")),fe}),ye=ye==null?void 0:ye.map(fe=>{var tt,Me,qe;return(tt=fe==null?void 0:fe.optionUrl)!=null&&tt.oldMenuSelect&&(fe.optionUrl.menuSelect=(qe=(Me=h.cloneDeep(fe))==null?void 0:Me.optionUrl)==null?void 0:qe.oldMenuSelect),fe}),u.value=h.cloneDeep(ye);let I=h.cloneDeep(ye);I=I==null?void 0:I.map(fe=>{var tt,Me,qe,Ve,pt,dt;return(Me=(tt=fe==null?void 0:fe.optionUrl)==null?void 0:tt.menuSelect)!=null&&Me.some(it=>it==null?void 0:it.includes("["))&&(fe.optionUrl.oldMenuSelect=(Ve=(qe=h.cloneDeep(fe))==null?void 0:qe.optionUrl)==null?void 0:Ve.menuSelect,fe.optionUrl.menuSelect=(dt=(pt=fe==null?void 0:fe.optionUrl)==null?void 0:pt.menuSelect)==null?void 0:dt.map(it=>{var ft,mt,Bt,Pt;if(it!=null&&it.includes("[")){let At=(mt=(ft=it==null?void 0:it.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:mt[1];it=(Pt=(Bt=h.cloneDeep(ye))==null?void 0:Bt.find(_t=>(_t==null?void 0:_t.label)===At))==null?void 0:Pt.value}return it})),fe}),u.value=I}else u.value=W;ce=ce==null?void 0:ce.map(ye=>{var I;return(ye==null?void 0:ye.key)==="formContent"&&(ye.contents=(I=ye.contents)==null?void 0:I.map(fe=>{var tt,Me,qe,Ve;return fe.value=((Me=(tt=u.value)==null?void 0:tt.find(pt=>(pt==null?void 0:pt.label)===(fe==null?void 0:fe.key)))==null?void 0:Me.value)??(fe==null?void 0:fe.value),fe.type=((Ve=(qe=u.value)==null?void 0:qe.find(pt=>(pt==null?void 0:pt.prop)===(fe==null?void 0:fe.key)))==null?void 0:Ve.type)??(fe==null?void 0:fe.type),fe})),ye})}ve.value=!1,d("contentChange",{contents:ce,index:r.index});let ie=[],be=[];if((Ae=h.cloneDeep((ue=ce==null?void 0:ce.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:ue.contents))==null||Ae.forEach(Ie=>{var ge;Array.isArray(Ie==null?void 0:Ie.value)&&((ge=Ie==null?void 0:Ie.value)!=null&&ge.find(Oe=>{var ye;return(ye=Oe==null?void 0:Oe.url)==null?void 0:ye.includes(".obj")}))&&(be=Ie==null?void 0:Ie.value)}),(be==null?void 0:be.length)>0){const Ie=(Qe=h.cloneDeep(be))==null?void 0:Qe.filter(ge=>{var Oe;return(Oe=ge==null?void 0:ge.url)==null?void 0:Oe.includes(".obj")});Ie==null||Ie.forEach(ge=>{var ye,I,fe,tt;const Oe=(ye=be==null?void 0:be.filter(Me=>{var qe;return(Me==null?void 0:Me.name)===(ge==null?void 0:ge.name)&&((qe=Me==null?void 0:Me.url)==null?void 0:qe.includes(".mtl"))}))==null?void 0:ye.map(Me=>Me==null?void 0:Me.url);ie.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((I=be==null?void 0:be.filter(Me=>{var qe;return(Me==null?void 0:Me.name)===(ge==null?void 0:ge.name)&&((qe=Me==null?void 0:Me.url)==null?void 0:qe.includes(".mtl"))}))==null?void 0:I.length)===1?(tt=(fe=be==null?void 0:be.filter(Me=>{var qe;return(Me==null?void 0:Me.name)===(ge==null?void 0:ge.name)&&((qe=Me==null?void 0:Me.url)==null?void 0:qe.includes(".mtl"))}))==null?void 0:fe[0])==null?void 0:tt.url:Oe})}),le.setObjUrl(ie)}},A=S=>{if(!S)return;const q=[];let z="";for(let ce of S)(ce.includes("[")||z.includes("["))&&(z+=ce.trim(),h.cloneDeep(z).split("【").length-1===h.cloneDeep(z).split("】").length-1&&h.cloneDeep(z).split("[").length-1===h.cloneDeep(z).split("]").length-1&&(q.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return q},H=(S,q,z)=>{let ce="";const W=q==null?void 0:q.map(L=>{var Ee;return(Ee=L==null?void 0:L.value)==null?void 0:Ee.pageData});return W==null||W.forEach(L=>{var Ee;(L==null?void 0:L.name)===(S==null?void 0:S[0])&&((Ee=L==null?void 0:L.compData)==null||Ee.forEach(te=>{var G;(te==null?void 0:te.key)==="formContent"&&((G=te==null?void 0:te.contents)==null||G.forEach(ee=>{var ie;(ee==null?void 0:ee.prop)===(S==null?void 0:S[1])&&(ce=(ee==null?void 0:ee.value)===""?Be.judgeContents((ie=h.cloneDeep(ee))==null?void 0:ie.optionUrl,z):ee==null?void 0:ee.value)}))}))}),ce},w=(S,q,z,ce)=>{var te,G;let W="",L="";(te=h.cloneDeep(q))==null||te.forEach((ee,ie)=>{ee!=null&&ee.includes("[")?L=L+F.value+S[ie]:L=L===""?L+ee:L+"/"+ee});let Ee=(G=ce[L])==null?void 0:G.map(ee=>{var ie;return(ie=ee==null?void 0:ee.value)==null?void 0:ie.pageData});return Ee==null||Ee.forEach(ee=>{var ie;(ee==null?void 0:ee.name)===(z==null?void 0:z[0])&&((ie=ee==null?void 0:ee.compData)==null||ie.forEach(be=>{var _e;(be==null?void 0:be.key)==="formContent"&&((_e=be==null?void 0:be.contents)==null||_e.forEach(Se=>{(Se==null?void 0:Se.prop)===(z==null?void 0:z[1])&&(W=Se==null?void 0:Se.value)}))}))}),W};return e.watch(()=>r.itemData,async()=>{var Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et;const S=(Ee=r.itemData)==null?void 0:Ee.find(ue=>(ue==null?void 0:ue.key)==="formContent"),q=(te=h.cloneDeep(r.itemData))==null?void 0:te.find(ue=>(ue==null?void 0:ue.key)==="formButton"),z=(G=h.cloneDeep(r.itemData))==null?void 0:G.find(ue=>(ue==null?void 0:ue.key)==="formFlex"),ce=(ee=h.cloneDeep(r.itemData))==null?void 0:ee.find(ue=>(ue==null?void 0:ue.key)==="formWrap"),W=(ie=h.cloneDeep(r.itemData))==null?void 0:ie.find(ue=>(ue==null?void 0:ue.key)==="enableWrap");if((ce==null?void 0:ce.contents)==="纵向"?O.value=!1:O.value=!0,C.value=(W==null?void 0:W.contents)===void 0?!1:W==null?void 0:W.contents,$.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((be=z==null?void 0:z.contents)==null?void 0:be.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((_e=S==null?void 0:S.contents)==null?void 0:_e.length)>0&&Array.isArray(S==null?void 0:S.contents)){let ue=r.allMapContents;const Ae=(U=(Se=h.cloneDeep(S))==null?void 0:Se.contents)==null?void 0:U.map((I,fe)=>{var At,_t,Ft,bt,Ht,Xt,Ot,Aa,xa,Va,$a,wa,ja,Ca,Ka,Ua,Wa,Ha,qa,Oa,ma,ua,Da,ya,ta,fa,Ga;let tt=(I==null?void 0:I.label)??(I==null?void 0:I.key)??"",Me=(I==null?void 0:I.type)??"",qe=(I==null?void 0:I.options)??[];if((At=I==null?void 0:I.key)!=null&&At.includes("$")&&(tt=(_t=h.cloneDeep(I==null?void 0:I.key).split("$"))==null?void 0:_t[0],((bt=(Ft=h.cloneDeep(I==null?void 0:I.key).split("$"))==null?void 0:Ft[1])==null?void 0:bt.length)>0)){const[wt,Yt]=(Xt=(Ht=h.cloneDeep(I==null?void 0:I.key).split("$"))==null?void 0:Ht[1])==null?void 0:Xt.split(/[()]/);Me=((Ot=Be.FormType.find(gt=>(gt==null?void 0:gt.key)===wt))==null?void 0:Ot.value)??"",((Aa=Yt==null?void 0:Yt.split(","))==null?void 0:Aa.length)>0&&(qe=(xa=Yt==null?void 0:Yt.split(","))==null?void 0:xa.map(gt=>({label:gt,value:gt})))}let Ve=[];I!=null&&I.contents&&!Array.isArray(I==null?void 0:I.contents)&&(Ve=($a=(Va=I==null?void 0:I.contents)==null?void 0:Va.split(","))==null?void 0:$a.map(wt=>({label:wt,value:wt}))),((wa=I==null?void 0:I.optionUrl)==null?void 0:wa.selectRelateType)==="自定义绑定"&&(Ve=(Ca=(ja=I==null?void 0:I.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let pt=!1,dt=(I==null?void 0:I.isFormColHidden)??!1,it=Be.judgeContents((Ka=h.cloneDeep(I))==null?void 0:Ka.optionUrl,ue),ft=it!==void 0&&it!==""?it:I!=null&&I.originalContent&&(I==null?void 0:I.originalContent)!==""?I.originalContent:I!=null&&I.value?I.value:(qe==null?void 0:qe.length)>0?(Ua=qe==null?void 0:qe[0])==null?void 0:Ua.value:(I==null?void 0:I.value)??"",mt=!1,Bt=it!==void 0||Me===""?"Input":Me;if((Array.isArray(it)&&(it!=null&&it.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Bt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||I!=null&&I.isLoginUser)pt=!0,ft=((Wa=B.value)==null?void 0:Wa.姓名)||((Ha=B.value)==null?void 0:Ha.account)||((qa=B.value)==null?void 0:qa.账号)||((Oa=B.value)==null?void 0:Oa.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||I!=null&&I.signature||I!=null&&I.isShow)if(mt=!0,(I==null?void 0:I.isShow)==="originalSignature")Bt="image",ft=v.value+"/"+((ma=B.value)==null?void 0:ma.signature);else{let wt=[...new Set(A(I.isShow))].map(Mt=>{var _a,aa,ha,Jt;return{key:(Jt=(ha=(aa=(_a=Mt==null?void 0:Mt.split("["))==null?void 0:_a[1])==null?void 0:aa.split("]"))==null?void 0:ha[0])==null?void 0:Jt.split(":"),value:""}});(ua=ze.value)==null||ua.forEach(Mt=>{wt==null||wt.forEach((la,_a)=>{var ha;let aa=la==null?void 0:la.key;(Mt==null?void 0:Mt.name)===(aa==null?void 0:aa[0].replaceAll("'",""))&&((ha=Mt==null?void 0:Mt.compData)==null||ha.forEach(Jt=>{var Ma;(Jt==null?void 0:Jt.key)==="formContent"&&((Ma=Jt==null?void 0:Jt.contents)==null||Ma.forEach(St=>{(St==null?void 0:St.prop)===(aa==null?void 0:aa[1].replaceAll("'",""))&&(wt[_a].value=St==null?void 0:St.value)}))}))})});let Yt=wt==null?void 0:wt.map(Mt=>{var la;return Mt.key="["+((la=Mt.key)==null?void 0:la.join(":"))+"]",Mt}),gt=I==null?void 0:I.isShow;Yt==null||Yt.forEach(Mt=>{Mt!=null&&Mt.value?gt=gt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):gt=gt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),gt!=null&>.includes("(")||(gt!=null&>.includes("==")?gt=((Da=gt==null?void 0:gt.split("==="))==null?void 0:Da[0])+"==='"+((ya=gt==null?void 0:gt.split("==="))==null?void 0:ya[1])+"'":gt=((ta=gt==null?void 0:gt.split("="))==null?void 0:ta[0])+"='"+((fa=gt==null?void 0:gt.split("="))==null?void 0:fa[1])+"'"),gt!=null&>.includes("=")&&!(gt!=null&>.includes("=="))&&!(gt!=null&>.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(dt=!1,Bt="image",ft=v.value+"/"+((Ga=B.value)==null?void 0:Ga.signature)):ft=""}return Array.isArray(ft)&&ft.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(I.type="Upload"),I!=null&&I.isMainUrl&&(Bt="Url"),{label:tt??"",name:"t"+fe,prop:h.cloneDeep(I==null?void 0:I.key),type:Bt,value:I!=null&&I.isNewDate&&ft===""?new Date:ft,id:(I==null?void 0:I.id)??fe,contents:(Ve==null?void 0:Ve.length)>0?Ve:qe??[],width:(I==null?void 0:I.width)??1,isLoginUser:pt,config:I==null?void 0:I.config,optionUrl:(I==null?void 0:I.optionUrl)??I,isFormColHidden:dt,signature:mt,isMain:I==null?void 0:I.isMain,isMainUrl:I==null?void 0:I.isMainUrl,operable:(I==null?void 0:I.operable)??!1,disabled:(I==null?void 0:I.disabled)??!1}}),Qe=Ae==null?void 0:Ae.map(I=>I==null?void 0:I.value);let Ie="";Qe==null||Qe.forEach(I=>{I!==""&&I!==void 0&&(Ie=Ie===""?I:Ie+"/"+I)}),j.setSelectArray(Qe),j.setSelectString(Ie);let ge=(Ne=h.cloneDeep(Ae))==null?void 0:Ne.map(I=>(I!=null&&I.value&&Be.IsJson(I==null?void 0:I.value)&&Array.isArray(JSON.parse(I==null?void 0:I.value))&&(I.value=JSON.parse(I.value)),I));ge=ge==null?void 0:ge.map(I=>{var fe,tt,Me,qe,Ve,pt,dt,it;if((tt=(fe=I==null?void 0:I.optionUrl)==null?void 0:fe.menuSelect)!=null&&tt.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";I.optionUrl.oldMenuSelect=(qe=(Me=h.cloneDeep(I))==null?void 0:Me.optionUrl)==null?void 0:qe.menuSelect,I.optionUrl.menuSelect=(pt=(Ve=I==null?void 0:I.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:pt.map(mt=>{var Bt,Pt,At,_t,Ft,bt;if(mt!=null&&mt.includes("[")){let Ht=(Pt=(Bt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"))==null?void 0:Pt[1];ft=H((At=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),ue==null?void 0:ue[rt.value],ue),mt=((Ft=(_t=h.cloneDeep(ge))==null?void 0:_t.find(Xt=>(Xt==null?void 0:Xt.label)===Ht))==null?void 0:Ft.value)||H((bt=mt==null?void 0:mt.replaceAll("[","").replaceAll("]",""))==null?void 0:bt.split(":"),ue==null?void 0:ue[rt.value],ue)}return mt}),ft!==""&&I.value===""&&(I.value=w(I.optionUrl.menuSelect,I.optionUrl.oldMenuSelect,(dt=I==null?void 0:I.optionUrl)==null?void 0:dt.groupSelect,ue),Array.isArray(I.value)&&((it=I.value)!=null&&it.every(mt=>mt==null?void 0:mt.url))&&(I.type="UPLOAD"))}return I}),u.value=ge,de.value=((he=u.value)==null?void 0:he.every(I=>I==null?void 0:I.disabled))||V.value===rt.value,se.value=(Pe=u.value)==null?void 0:Pe.every(I=>I==null?void 0:I.operable),me.value=(lt=u.value)==null?void 0:lt.map(I=>I==null?void 0:I.label);let Oe=[],ye=[];if((He=h.cloneDeep(u.value))==null||He.forEach(I=>{var fe;Array.isArray(I==null?void 0:I.value)&&((fe=I==null?void 0:I.value)!=null&&fe.find(tt=>{var Me;return(Me=tt==null?void 0:tt.url)==null?void 0:Me.includes(".obj")}))&&(ye=I==null?void 0:I.value)}),(ye==null?void 0:ye.length)>0){const I=(nt=h.cloneDeep(ye))==null?void 0:nt.filter(fe=>{var tt;return(tt=fe==null?void 0:fe.url)==null?void 0:tt.includes(".obj")});I==null||I.forEach(fe=>{var Me,qe,Ve,pt;const tt=(Me=ye==null?void 0:ye.filter(dt=>{var it;return(dt==null?void 0:dt.name)===(fe==null?void 0:fe.name)&&((it=dt==null?void 0:dt.url)==null?void 0:it.includes(".mtl"))}))==null?void 0:Me.map(dt=>dt==null?void 0:dt.url);Oe.push({objUrl:fe==null?void 0:fe.url,mtlUrls:((qe=ye==null?void 0:ye.filter(dt=>{var it;return(dt==null?void 0:dt.name)===(fe==null?void 0:fe.name)&&((it=dt==null?void 0:dt.url)==null?void 0:it.includes(".mtl"))}))==null?void 0:qe.length)===1?(pt=(Ve=ye==null?void 0:ye.filter(dt=>{var it;return(dt==null?void 0:dt.name)===(fe==null?void 0:fe.name)&&((it=dt==null?void 0:dt.url)==null?void 0:it.includes(".mtl"))}))==null?void 0:Ve[0])==null?void 0:pt.url:tt})}),le.setObjUrl(Oe)}(Fe=h.cloneDeep(u.value))==null||Fe.forEach(I=>{var fe,tt,Me,qe,Ve,pt,dt,it,ft,mt,Bt,Pt,At;if((tt=(fe=I==null?void 0:I.value)==null?void 0:fe.toString())!=null&&tt.includes(".stl")||(qe=(Me=I==null?void 0:I.value)==null?void 0:Me.toString())!=null&&qe.includes(".STL")||(pt=(Ve=I==null?void 0:I.value)==null?void 0:Ve.toString())!=null&&pt.includes(".obj")||(it=(dt=I==null?void 0:I.value)==null?void 0:dt.toString())!=null&&it.includes(".mtl")||(mt=(ft=I==null?void 0:I.value)==null?void 0:ft.toString())!=null&&mt.includes(".urdf")){let _t={},Ft=[],bt;Array.isArray(I==null?void 0:I.value)?bt=I==null?void 0:I.value:bt=(Bt=I==null?void 0:I.value)==null?void 0:Bt.split(","),bt==null||bt.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),(At=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&At.includes("http:")}})}else u.value=[];let L=ct.value;if((L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(ue=>{var Qe,Ie,ge,Oe;let Ae=(Qe=ue==null?void 0:ue.key)==null?void 0:Qe.split("/");return(r==null?void 0:r.compName)===(Ae==null?void 0:Ae[0])&&(Ie=u.value)!=null&&Ie.find(ye=>(ye==null?void 0:ye.prop)===(Ae==null?void 0:Ae[1]))&&(ue.value=(Oe=(ge=u.value)==null?void 0:ge.find(ye=>(ye==null?void 0:ye.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:Oe.value),ue}),Ye.setTableViewContents(L)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let ue={};(ht=h.cloneDeep(u).value)==null||ht.forEach(Ae=>{(Ae==null?void 0:Ae.isMain)===!0&&(ue[(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=ue}if(((at=q==null?void 0:q.contents)==null?void 0:at.length)>0){const ue=[];(et=q==null?void 0:q.contents)==null||et.forEach((Ae,Qe)=>{(Ae==null?void 0:Ae.label)!==""&&ue.push({label:(Ae==null?void 0:Ae.label)??"",id:(Ae==null?void 0:Ae.id)??Qe,type:(Ae==null?void 0:Ae.type)??"",background:Ae==null?void 0:Ae.background})}),J.value=ue}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,S=>{de.value=S===rt.value},{immediate:!0}),(S,q)=>{const z=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-switch"),W=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-popover"),Ee=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Zl,[e.createVNode(Vt.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:C.value,onOnButtonClick:ut,onChange:D,formDisabled:de.value,formLabelsOperable:se.value,isButtonRow:O.value,onPreview:Te,onBlurChange:ne,onHandleColEditChange:ke,onHandleColTypeChange:oe,onRouteUrl:R,onClickTrigger:pe},{operateCol:e.withCtx(({renderColumns:te,formDisabled:G,formLabelsOperable:ee})=>[e.createVNode(L,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ze},{reference:e.withCtx(()=>[e.createElementVNode("span",Ql,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ei,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ce,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:$e,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ce,{"model-value":ee,"active-text":"编辑所有标签","inactive-text":"",onChange:Le},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ee,{modelValue:me.value,"onUpdate:modelValue":q[0]||(q[0]=ie=>me.value=ie),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:Q,onChange:Xe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te,ie=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ie.label},[e.createVNode(W,{value:ie.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ie.label),1)]),_:2},1032,["value"]),e.createVNode(L,{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 be;return[e.createElementVNode("div",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=Object.keys(ie))==null?void 0:be.filter(_e=>{var Se;return(Se=we.value)==null?void 0:Se.find(U=>(U==null?void 0:U.value)===_e)}),_e=>{var Se,U;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(Vt._sfc_main$2,{value:ie==null?void 0:ie[_e],"active-text":(U=(Se=we.value)==null?void 0:Se.find(Ne=>(Ne==null?void 0:Ne.value)===_e))==null?void 0:U.label,inactiveText:"",onChange:Ne=>re(Ne,_e,ie)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ai,[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"]),P.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Ke},null,8,["fileDataList"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:1,visible:k.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(ni,[["__scopeId","data-v-e237c271"]]),$n=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=h.cloneDeep(n))==null?void 0:i.map(r=>($n.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)??$n.value,children:br(r==null?void 0:r.children)},r))},oi=n=>{var s;return(s=h.cloneDeep(n))==null?void 0:s.map(r=>($n.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)??$n.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=h.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=h.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=h.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)},Cr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=h.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=Cr(r==null?void 0:r.children,i),r)),n)},It=[{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"}],ri=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ri},{key:"textColor",label:"按钮颜色",type:"Color"}],ii={class:"table-header-child"},si={class:"table-header-child-main"},ci={class:"table-header-child-content"},ui={class:"table-header-child-content-item"},di={class:"fix-button"},pi={key:0},fi={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(""),k=Be.useTableComp(h.pinia),{tableIndex:g}=h.storeToRefs(k);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),O=C=>{var y;d.value=!0;let $=[];It==null||It.forEach(B=>{let E=h.cloneDeep(g.value)+1;k.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:C[B.key],id:g.value,contents:B==null?void 0:B.options})}),C!=null&&C.children&&((y=C==null?void 0:C.children)==null?void 0:y.length)>0&&$.push({children:C==null?void 0:C.children,isFormColHidden:!0}),f.value=C==null?void 0:C.id,x.value=$,_.value=$},P=C=>{r("fixChange",h.cloneDeep(C))},J=C=>{r("deleteChange",h.cloneDeep(C))},M=C=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let B=h.cloneDeep(g.value)+1;k.setTableIndex(B),$.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=C==null?void 0:C.id,x.value=$,_.value=$},xe=C=>{let $=h.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=C==null?void 0:C[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let C={};if(f.value!=="")C.id=f.value,($=x.value)==null||$.forEach(B=>{const E=It==null?void 0:It.find(ve=>(ve==null?void 0:ve.label)===(B==null?void 0:B.label));E?C[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(C.children=B.children)}),d.value=!1,r("fixChange",{contents:h.cloneDeep(C),id:u.value,type:"fix"});else{let B=h.cloneDeep(g.value)+1;k.setTableIndex(B),C.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ve=It==null?void 0:It.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ve?C[ve.key]=E.value:E!=null&&E.children&&E.children.length>0&&(C.children=E.children)}),d.value=!1,r("fixChange",{contents:h.cloneDeep(C),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},j=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=C=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",C),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,E)=>(e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",ui,e.toDisplayString(B.label),1),e.createElementVNode("div",di,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>M(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>O(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>le(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Dr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:J,onFixChange:P},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:d.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",fi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},vi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),gi={class:"table-header-child"},mi={class:"table-header-child-main"},yi={class:"table-header-child-content"},bi={class:"table-header-child-content-item"},ki={class:"fix-button"},xi={key:0},wi={class:"form-content"},Ci={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),k=Be.useTableComp(h.pinia),{tableIndex:g}=h.storeToRefs(k),f=e.ref(""),x=e.ref([]),_=e.ref([]),O=C=>{r("fixChange",h.cloneDeep(C))},P=C=>{var y;d.value=!0;let $=[];It==null||It.forEach(B=>{let E=h.cloneDeep(g.value)+1;k.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:C[B.key],id:g.value,contents:B==null?void 0:B.options})}),C!=null&&C.children&&((y=C==null?void 0:C.children)==null?void 0:y.length)>0&&$.push({children:C==null?void 0:C.children,isFormColHidden:!0}),f.value=C==null?void 0:C.id,x.value=$,_.value=$},J=C=>{d.value=!0;let $=[];It==null||It.forEach(y=>{let B=h.cloneDeep(g.value)+1;k.setTableIndex(B),$.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=C==null?void 0:C.id,x.value=$,_.value=$},M=C=>{let $=h.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=C==null?void 0:C[y.name]),y)),_.value=$},xe=()=>{var $,y;x.value=_.value;let C={};if(f.value!=="")C.id=f.value,($=x.value)==null||$.forEach(B=>{const E=It==null?void 0:It.find(ve=>(ve==null?void 0:ve.label)===(B==null?void 0:B.label));E?C[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(C.children=B.children)}),d.value=!1,r("fixChange",{contents:h.cloneDeep(C),id:u.value,type:"fix"});else{let B=h.cloneDeep(g.value)+1;k.setTableIndex(B),C.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ve=It==null?void 0:It.find(Ye=>(Ye==null?void 0:Ye.label)===(E==null?void 0:E.label));ve?C[ve.key]=E.value:E!=null&&E.children&&E.children.length>0&&(C.children=E.children)}),d.value=!1,r("fixChange",{contents:h.cloneDeep(C),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},j=C=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",C),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=C=>{r("deleteChange",C)};return(C,$)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ve)=>(e.openBlock(),e.createElementBlock("div",mi,[e.createElementVNode("div",yi,[e.createElementVNode("div",bi,e.toDisplayString(E.label),1),e.createElementVNode("div",ki,[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=>P(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ye=>j(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",xi,[e.createVNode(vi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",wi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:xe,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Dr=zt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),_i={class:"table-operate-content"},Ei={class:"table-operate-item"},Si={class:"operate-title"},Ti={class:"operate-content"},Ii={class:"fix-content"},Bi={class:"fix-content-label"},Ni={class:"fix-button"},Ai={key:0},Vi={class:"operate-title"},Oi={class:"operate-content"},Mi={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Li={class:"operate-title"},Ri={class:"operate-content"},Pi={class:"fix-content"},$i={class:"fix-content-label"},ji={class:"fix-button"},Ki={class:"operate-title"},Ui={class:"operate-content"},Wi={class:"fix-content"},Hi={class:"fix-content-label"},qi={class:"fix-button"},Gi={class:"operate-content"},Xi={style:{display:"flex","justify-content":"space-between"}},Yi={class:"form-content"},Ji={class:"dialog-footer"},Zi={class:"form-content"},Qi={class:"dialog-footer"},es={class:"form-content"},ts={class:"dialog-footer"},as={class:"form-content"},ns={class:"dialog-footer"},os={__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),k=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),O=e.ref([]),P=e.ref(""),J=e.ref(""),M=e.ref([]),xe=e.ref([]),X=e.ref([]),j=e.ref([]),le=e.ref(!1),C=e.ref([]),$=e.ref([]),y=e.ref(0),B=e.ref([]),E=e.ref([]),ve=e.ref([]),Ye=()=>{le.value=!0;let v=[];Sa==null||Sa.forEach(D=>{y.value++,v.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:(D==null?void 0:D.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:D==null?void 0:D.options})}),C.value=v,$.value=v},ct=()=>{var D,A,H;k.value=!0;let v=[];(H=(A=(D=Be.FormContent)==null?void 0:D.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:A.value)==null||H.forEach(w=>{y.value++,v.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})}),B.value=v,E.value=v},ze=v=>{v||(B.value=E.value)},We=async v=>{var D,A,H,w,S,q,z,ce,W,L,Ee,te;if((v==null?void 0:v.类型)!==((A=(D=E.value)==null?void 0:D.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:A.value)){let G=[],ee=await((S=(w=(H=Be.FormContent)==null?void 0:H.find(ie=>(ie==null?void 0:ie.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((L=(W=(ce=Be.FormContent)==null?void 0:ce.find(ie=>(ie==null?void 0:ie.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:W.value)==null?void 0:L.value):(z=(q=Be.FormContent)==null?void 0:q.find(ie=>(ie==null?void 0:ie.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:z.value;if(ee==null||ee.forEach(ie=>{y.value++,G.push({label:ie==null?void 0:ie.label,name:(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label),type:ie.type,value:ie!=null&&ie.属性名?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):(v==null?void 0:v[ie.label])??"",id:y.value,contents:ie==null?void 0:ie.options,prop:(ie==null?void 0:ie.prop)||(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label)})}),v!=null&&v.菜单选项&&((Ee=v==null?void 0:v.菜单选项)==null?void 0:Ee.length)>0){const ie=await Be.menuToContentType(v==null?void 0:v.菜单选项);G=G==null?void 0:G.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=ie),be))}E.value=await Be.selectToBase(h.cloneDeep(G)),B.value=await Be.selectToBase(h.cloneDeep(G))}else{let G=h.cloneDeep(B.value);if(G=G==null?void 0:G.map(ee=>(ee.value=v==null?void 0:v[ee.name],ee)),v!=null&&v.菜单选项&&((te=v==null?void 0:v.菜单选项)==null?void 0:te.length)>0){const ee=await Be.menuToContentType(v==null?void 0:v.菜单选项);G=G==null?void 0:G.map(ie=>((ie==null?void 0:ie.name)==="组信息选项"&&(ie.contents=ee),ie))}G=Be.formToOptionsContents(G),E.value=await Be.selectToBase(h.cloneDeep(G))}},De=async v=>{await We(v),B.value=E.value},V=(v,D)=>{if((D==null?void 0:D.type)=="Select"&&(v==null?void 0:v.key)==="selectRelateType"){const A=D==null?void 0:D.optionUrl;return(A==null?void 0:A.selectRelateType)||D[v.key]}if((D==null?void 0:D.type)=="Select"&&(v==null?void 0:v.key)==="menuSelect"){const A=D==null?void 0:D.optionUrl;return(A==null?void 0:A.menuSelect)||D[v.key]}if((D==null?void 0:D.type)=="Select"&&(v==null?void 0:v.key)==="groupSelect"){const A=D==null?void 0:D.optionUrl;return(A==null?void 0:A.groupSelect)||D[v.key]}if((D==null?void 0:D.type)=="Select"&&(v==null?void 0:v.key)==="originalContent")return(D==null?void 0:D.value)||D[v.key];if((D==null?void 0:D.type)=="Select"&&(v==null?void 0:v.key)==="multiple"){const A=D[v.key];return mr(A)?A:v.default}return(v==null?void 0:v.label)==="类型"&&D[v.key]===""?"Input":(v==null?void 0:v.key)==="isFormColHidden"&&!D[v.key]?!1:D[v.key]},Q=async v=>{var H,w,S,q,z,ce,W,L,Ee;k.value=!0;let D=[];const A=await((S=(w=(H=Be.FormContent)==null?void 0:H.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:w.value)==null?void 0:S.value)?await((L=(W=(ce=Be.FormContent)==null?void 0:ce.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:W.value)==null?void 0:L.value):(z=(q=Be.FormContent)==null?void 0:q.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:z.value;if(A==null||A.forEach(te=>{y.value++,D.push({label:te==null?void 0:te.label,name:(te==null?void 0:te.name)||(te==null?void 0:te.label),type:te.type,value:(te==null?void 0:te.label)==="属性名"?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):V(te,v),id:y.value,contents:te==null?void 0:te.options})}),v!=null&&v.menuSelect&&((Ee=v==null?void 0:v.menuSelect)==null?void 0:Ee.length)>0){const te=await Be.menuToContentType(v==null?void 0:v.menuSelect);D=D==null?void 0:D.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=te),G))}P.value=v==null?void 0:v.id,B.value=await Be.selectToBase(Be.formToOptionsContents(D)),E.value=await Be.selectToBase(Be.formToOptionsContents(D))},se=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,A;ve.value=(D=h.cloneDeep(ve.value))==null?void 0:D.filter(H=>(H==null?void 0:H.id)!==(v==null?void 0:v.id)),r("change",(A=h.cloneDeep(s.originalItemContents))==null?void 0:A.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=ve.value),H))),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{k.value=!1,B.value=[],P.value=""},Je=async()=>{var H,w,S,q,z,ce,W,L,Ee,te;B.value=E.value;let v={};P.value!==""?v.id=P.value:(y.value++,v.id="id"+y.value);let D=await((S=(w=(H=Be.FormContent)==null?void 0:H.find(G=>{var ee,ie;return(G==null?void 0:G.key)===(((ie=(ee=B.value)==null?void 0:ee.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ie.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((z=(q=Be.FormContent)==null?void 0:q.find(G=>{var ee,ie;return(G==null?void 0:G.key)===(((ie=(ee=B.value)==null?void 0:ee.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ie.value)??"label")}))==null?void 0:z.value);if((ce=B.value)==null||ce.forEach(G=>{const ee=D==null?void 0:D.find(ie=>(ie==null?void 0:ie.label)===(G==null?void 0:G.label));ee&&(v[ee.key]=G.value)}),v.name=v.label,(W=ve.value)!=null&&W.find(G=>G.id===v.id))ve.value=(L=ve.value)==null?void 0:L.map(G=>(G.id===v.id&&(G=v),G));else{let G=h.cloneDeep(ve.value);ve.value||(ve.value=[]),G.push(v),ve.value=G}ve.value=ve.value.map(({id:G,...ee})=>ee),k.value=!1,P.value="";let A=h.cloneDeep(s.originalItemContents);(Ee=h.cloneDeep(s.originalItemContents))!=null&&Ee.find(G=>(G==null?void 0:G.key)==="tableToForm")?A=(te=h.cloneDeep(s.originalItemContents))==null?void 0:te.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=ve.value),G)):A.push({key:"tableToForm",contents:ve.value}),r("change",A)},rt=v=>{le.value=!0;let D=[];Sa==null||Sa.forEach(A=>{y.value++,D.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:v[A.key],id:y.value,contents:A==null?void 0:A.options})}),P.value=v==null?void 0:v.id,C.value=D,$.value=D};e.watch(()=>_.value,()=>{var D,A;let v=h.cloneDeep(s.originalItemContents);(D=h.cloneDeep(s.originalItemContents))!=null&&D.find(H=>(H==null?void 0:H.key)==="page")?v=(A=h.cloneDeep(s.originalItemContents))==null?void 0:A.map(H=>((H==null?void 0:H.key)==="page"&&(H.contents=_.value),H)):v.push({key:"page",contents:_.value}),r("change",v)},{deep:!0});const Z=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,A;xe.value=(D=h.cloneDeep(xe.value))==null?void 0:D.filter(H=>(H==null?void 0:H.id)!==(v==null?void 0:v.id)),r("change",(A=h.cloneDeep(s.originalItemContents))==null?void 0:A.map(H=>((H==null?void 0:H.key)==="extraButton"&&(H.contents=xe.value),H))),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=()=>{var A,H,w,S,q;C.value=$.value;let v={};if(P.value!==""?v.id=P.value:(y.value++,v.id="id"+y.value),(A=C.value)==null||A.forEach(z=>{const ce=Sa==null?void 0:Sa.find(W=>(W==null?void 0:W.label)===(z==null?void 0:z.label));ce?v[ce.key]=z.value:z!=null&&z.children&&z.children.length>0&&(v.children=z.children)}),(H=xe.value)!=null&&H.find(z=>z.id===v.id))xe.value=(w=xe.value)==null?void 0:w.map(z=>(z.id===v.id&&(z=v),z));else{let z=h.cloneDeep(xe.value)??[];z.push(v),xe.value=z}le.value=!1,P.value="";let D=h.cloneDeep(s.originalItemContents);(S=h.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="extraButton")?D=(q=h.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=xe.value),z)):D.push({key:"extraButton",contents:xe.value}),r("change",D)},me=v=>{let D=h.cloneDeep($.value);D=D==null?void 0:D.map(A=>(A.children||(A.value=v==null?void 0:v[A.name]),A)),$.value=D},we=()=>{le.value=!1,C.value=[],P.value=""},$e=v=>{f.value=!0;let D=[];Ta==null||Ta.forEach(A=>{y.value++,D.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:v[A.key],id:y.value,contents:A==null?void 0:A.options})}),P.value=v==null?void 0:v.id,X.value=D,j.value=D},Le=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,A;M.value=(D=h.cloneDeep(M.value))==null?void 0:D.filter(H=>(H==null?void 0:H.id)!==(v==null?void 0:v.id)),r("change",(A=h.cloneDeep(s.originalItemContents))==null?void 0:A.map(H=>((H==null?void 0:H.key)==="rowButton"&&(H.contents=M.value),H))),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let v=[];It==null||It.forEach(D=>{y.value++,v.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:y.value,contents:D==null?void 0:D.options})}),x.value=v,O.value=v},Xe=()=>{f.value=!0;let v=[];Ta==null||Ta.forEach(D=>{y.value++,v.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:y.value,contents:D==null?void 0:D.options})}),X.value=v,j.value=v},pe=v=>{let D=h.cloneDeep(j.value);D=D==null?void 0:D.map(A=>(A.children||(A.value=v==null?void 0:v[A.name]),A)),j.value=D},R=()=>{var A,H,w,S,q;X.value=j.value;let v={};if(P.value!==""?v.id=P.value:(y.value++,v.id="id"+y.value),(A=X.value)==null||A.forEach(z=>{const ce=Ta==null?void 0:Ta.find(W=>(W==null?void 0:W.label)===(z==null?void 0:z.label));ce?v[ce.key]=z.value:z!=null&&z.children&&z.children.length>0&&(v.children=z.children)}),(H=M.value)!=null&&H.find(z=>z.id===v.id))M.value=(w=M.value)==null?void 0:w.map(z=>(z.id===v.id&&(z=v),z));else{let z=h.cloneDeep(M.value);z.push(v),M.value=z}f.value=!1,P.value="";let D=h.cloneDeep(s.originalItemContents);(S=h.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="rowButton")?D=(q=h.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=M.value),z)):D.push({key:"rowButton",contents:M.value}),r("change",D)},Y=()=>{f.value=!1,P.value="",j.value=[],X.value=[]},Re=v=>{u.value=!0;let D=[];It==null||It.forEach(A=>{y.value++,D.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:y.value,contents:A==null?void 0:A.options})}),x.value=D,J.value=v==null?void 0:v.id,O.value=D},ke=v=>{var D;g.value=kr(h.cloneDeep(g.value),v==null?void 0:v.id),r("change",(D=h.cloneDeep(s.originalItemContents))==null?void 0:D.map(A=>{var H;return(A==null?void 0:A.key)==="header"&&(A.contents=(H=g.value)!=null&&H.some(w=>w==null?void 0:w.children)?[g.value]:g.value),A}))},oe=v=>{var A,H,w;v.type==="fix"?v.id!==""?g.value=wr(g.value,v):g.value=xr(g.value,v==null?void 0:v.contents):g.value=Cr(g.value,v),g.value=(A=g.value)!=null&&A.some(S=>S==null?void 0:S.children)?[g.value]:g.value,P.value="";let D=h.cloneDeep(s.originalItemContents);(H=h.cloneDeep(s.originalItemContents))!=null&&H.find(S=>(S==null?void 0:S.key)==="header")?D=(w=h.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):D.push({key:"header",contents:g.value}),r("change",D)},re=v=>{var A;u.value=!0;let D=[];It==null||It.forEach(H=>{y.value++,D.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:v[H.key],id:y.value,contents:H==null?void 0:H.options})}),v!=null&&v.children&&((A=v==null?void 0:v.children)==null?void 0:A.length)>0&&D.push({children:v==null?void 0:v.children,isFormColHidden:!0}),P.value=v==null?void 0:v.id,J.value="",x.value=D,O.value=D},ne=v=>{let D=h.cloneDeep(O.value);D=D==null?void 0:D.map(A=>(A.children||(A.value=v==null?void 0:v[A.name]),A)),O.value=D},Te=()=>{u.value=!1,P.value="",J.value="",O.value=[]},Ke=()=>{var A,H,w,S,q,z;x.value=O.value;let v={};if(P.value!==""?v.id=P.value:(y.value++,v.id="id"+y.value),(A=x.value)==null||A.forEach(ce=>{const W=It==null?void 0:It.find(L=>(L==null?void 0:L.label)===(ce==null?void 0:ce.label));W?v[W.key]=ce.value:ce!=null&&ce.children&&ce.children.length>0&&(v.children=ce.children)}),(H=g.value)!=null&&H.find(ce=>ce.id===v.id))g.value=(w=g.value)==null?void 0:w.map(ce=>(ce.id===v.id&&(ce=v),ce));else{let ce=h.cloneDeep(g.value)??[];J.value===""?ce.push(v):ce=ce==null?void 0:ce.map(W=>(W.id===J.value&&(W.children||(W.children=[]),W.children.push(v)),W)),g.value=ce}g.value=(S=g.value)!=null&&S.some(ce=>ce==null?void 0:ce.children)?[g.value]:g.value,u.value=!1,P.value="",J.value="";let D=h.cloneDeep(s.originalItemContents);(q=h.cloneDeep(s.originalItemContents))!=null&&q.find(ce=>(ce==null?void 0:ce.key)==="header")?D=(z=h.cloneDeep(s.originalItemContents))==null?void 0:z.map(ce=>((ce==null?void 0:ce.key)==="header"&&(ce.contents=g.value),ce)):D.push({key:"header",contents:g.value}),r("change",D)},ut=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,A;g.value=(D=h.cloneDeep(g.value))==null?void 0:D.filter(H=>(H==null?void 0:H.id)!==(v==null?void 0:v.id)),r("change",(A=h.cloneDeep(s.originalItemContents))==null?void 0:A.map(H=>{var w;return(H==null?void 0:H.key)==="header"&&(H.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),H})),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var v,D,A,H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=h.cloneDeep(s.originalItemContents),g.value=(D=(v=d.value)==null?void 0:v.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:D.contents,M.value=(H=(A=d.value)==null?void 0:A.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:H.contents,xe.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?!!((W=(ce=d.value)==null?void 0:ce.find(U=>(U==null?void 0:U.key)==="page"))!=null&&W.contents):!1,ve.value=(Ee=(L=d.value)==null?void 0:L.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Ee.contents,g.value=(te=g.value)==null?void 0:te.map((U,Ne)=>(Array.isArray(U)?U=oi(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)??Ne,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))?(ee=g.value)==null?void 0:ee[0]:g.value,M.value=(ie=M.value)==null?void 0:ie.map((U,Ne)=>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)??Ne}),xe.value=(be=xe.value)==null?void 0:be.map((U,Ne)=>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)??Ne}),ve.value)ve.value=(Se=ve.value)==null?void 0:Se.map(U=>{y.value++;let Ne=U;return Ne.id=y.value,Ne});else{let U=[];const Ne=(_e=Be.getColumnChild(h.cloneDeep(g.value)))==null?void 0:_e.filter(he=>(he==null?void 0:he.prop)!=="operate");Ne==null||Ne.forEach(he=>{var Pe;y.value++,U.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.prop)||(he==null?void 0:he.label),type:he!=null&&he.groupSelect?"Select":"Input",value:"",id:y.value,contents:he==null?void 0:he.options,menuSelect:he==null?void 0:he.formMenuSelect,groupSelect:(Pe=he==null?void 0:he.groupSelect)==null?void 0:Pe.split(":"),selectRelateType:"关联绑定列"})}),ve.value=U}},{deep:!0,immediate:!0}),(v,D)=>{const A=e.resolveComponent("svg-icon"),H=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("div",Ei,[e.createElementVNode("div",Si,[D[2]||(D[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(H,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[1]||(D[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Ii,[e.createElementVNode("div",Bi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ni,[e.createVNode(A,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Re(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>re(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>ut(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Dr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:ke,onFixChange:oe},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Vi,[D[4]||(D[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[3]||(D[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Mi,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>$e(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Le(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Li,[D[6]||(D[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:Ye},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[5]||(D[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Pi,[e.createElementVNode("div",$i,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>rt(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Z(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ki,[D[8]||(D[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(H,{class:"icon-content",id:"themeButton",onClick:ct},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[7]||(D[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Wi,[e.createElementVNode("div",Hi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",qi,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>Q(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),D[10]||(D[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Gi,[e.createElementVNode("div",Xi,[D[9]||(D[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:_.value,"onUpdate:modelValue":D[0]||(D[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:u.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(H,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[11]||(D[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(H,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:e.withCtx(()=>D[12]||(D[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:pe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(H,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[13]||(D[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(H,{class:"ok-button button",onClick:R,id:"themeButton"},{default:e.withCtx(()=>D[14]||(D[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:le.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",es,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ts,[e.createVNode(H,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[15]||(D[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(H,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>D[16]||(D[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:k.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",as,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:We,onChangeVisible:ze,onBlurChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(H,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[17]||(D[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(H,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>D[18]||(D[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},rs=zt._export_sfc(os,[["__scopeId","data-v-7a6b87b5"]]),ls=jt.useModelComp(h.pinia),{pageMapState:is}=h.storeToRefs(ls),ss=jt.useMenuState(h.pinia),{activeMenuPath:cs}=h.storeToRefs(ss),us=e.ref(24),ds=e.ref(6),ps=e.ref(70),fs=e.ref(.18),hs=e.ref(45),vs=(n,i,s,r)=>{var d,u,k,g,f,x,_,O,P,J,M,xe,X,j,le,C;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=(k=n==null?void 0:n.value)==null?void 0:k.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)||us.value,h:((O=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:O.h)||s,minW:((J=(P=n==null?void 0:n.value)==null?void 0:P.tableData)==null?void 0:J.minW)||ds.value,minH:((xe=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:xe.minH)||fs.value,maxH:((j=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:j.maxH)||hs.value,i:((C=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:C.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},gs=(n,i)=>{var r,d,u,k,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(((k=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:k.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(P=>(P==null?void 0:P.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var k,g;const r=(g=(k=is.value)==null?void 0:k[cs.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=gs(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...vs(d,i,u,n)}},ms=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=h.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},ys=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}]}]}}),bs=(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}),ks=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=ys(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[P,J]of Object.entries((s==null?void 0:s.comp)||{}))if((O==null?void 0:O.prop)===P)return{...O,value:J};return O})},{immediate:!0});const u=g=>Vt.getComponent(g),k=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(P=>({...P,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(P=>({...P,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":P=>O.value=P,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:P=>k(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),xs=zt._export_sfc(ks,[["__scopeId","data-v-6c233914"]]),ws=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),k=j=>j==null?void 0:j.reduce((le,C)=>(le[C==null?void 0:C.prop]=C==null?void 0:C.rule,le),{}),g=e.computed(()=>({formRules:k(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(""),_=(j,le,C)=>{var B;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:j},{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:(B=s==null?void 0:s.relatedData)==null?void 0:B.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 C&&(C==null?void 0:C.length)>0?y=[...$,...O(j,le,C)]:y=$,y},O=(j,le,C)=>{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 C?$==null?void 0:$.filter(y=>C==null?void 0:C.includes(y==null?void 0:y.prop)):$},P=(j,le)=>{var E,ve,Ye,ct,ze,We,De,V,Q;const C=((ze=(ct=(Ye=(ve=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ve.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Ye.contents)==null?void 0:ct.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:ze.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((Q=(V=(De=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:De.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:V.flatMap(se=>se==null?void 0:se.contents))==null?void 0:Q.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],B=_(C,y,j);f.value=le?bs(B,le):B,j&&(j==null?void 0:j.length)>0&&u.value.push(...j==null?void 0:j.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{P(null,s==null?void 0:s.extendItem)});const J=j=>{const le=j==null?void 0:j[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const C=le==null?void 0:le.join("/");P(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,j)}},M=j=>{r("change",{target:s==null?void 0:s.target,extendConfigs:j})},xe=(j,le)=>{x.value=le==null?void 0:le.changeProp,J(j)},X=j=>{r("onButtonClick",j)};return(j,le)=>(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:xe,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(ws,[["__scopeId","data-v-7c660c1f"]]),Ds={};function _s(n,i){return null}const Es=zt._export_sfc(Ds,[["render",_s]]),Ss={class:"form-operate-content"},Ts={class:"form-operate-item"},Is={class:"operate-title"},Bs={class:"operate-content"},Ns={class:"fix-content"},As={class:"fix-button"},Vs={class:"operate-title"},Os={class:"operate-content"},Ms={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Ls={class:"form-content"},Rs={class:"dialog-footer"},Ps={class:"form-content"},$s={__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([]),k=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),O=e.ref(!1),P=e.ref(0),J=e.ref([]),M=e.ref([]),xe=(V,Q)=>{if((Q==null?void 0:Q.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const se=Q==null?void 0:Q.optionUrl;return(se==null?void 0:se.selectRelateType)||Q[V.key]}if((Q==null?void 0:Q.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const se=Q==null?void 0:Q.optionUrl;return(se==null?void 0:se.menuSelect)||Q[V.key]}if((Q==null?void 0:Q.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const se=Q==null?void 0:Q.optionUrl;return(se==null?void 0:se.groupSelect)||Q[V.key]}if((Q==null?void 0:Q.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(Q==null?void 0:Q.value)||Q[V.key];if((Q==null?void 0:Q.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const se=Q[V.key];return mr(se)?se:V.default}return(V==null?void 0:V.label)==="类型"&&Q[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!Q[V.key]?!1:Q[V.key]},X=async V=>{var de,Je,rt,Z,F,me;d.value=!0;let Q=[];const se=await((rt=(Je=(de=Be.FormContent)==null?void 0:de.find(we=>(we==null?void 0:we.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Je.value)==null?void 0:rt.value)??((F=(Z=Be.FormContent)==null?void 0:Z.find(we=>(we==null?void 0:we.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:F.value);if(se==null||se.forEach(we=>{P.value++,Q.push({label:we==null?void 0:we.label,name:we==null?void 0:we.label,type:we.type,prop:we==null?void 0:we.prop,value:xe(we,V),id:P.value,contents:we==null?void 0:we.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((me=V==null?void 0:V.menuSelect)==null?void 0:me.length)>0){const we=await Be.menuToContentType(V==null?void 0:V.menuSelect);Q=Q==null?void 0:Q.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=we),$e))}_.value=V==null?void 0:V.id,u.value=await Be.selectToBase(Be.formToOptionsContents(Q)),k.value=await Be.selectToBase(Be.formToOptionsContents(Q))},j=V=>{var se;g.value=!0;let Q=[];(se=Be.FormButton)==null||se.forEach(de=>{P.value++,Q.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&V[de.key]===""?"normal":V[de.key],id:P.value,contents:de==null?void 0:de.options})}),J.value=Q,M.value=Q,_.value=V==null?void 0:V.id};e.watch(()=>O.value,()=>{var Q,se;let V=h.cloneDeep(s.originalItemContents);(Q=h.cloneDeep(s.originalItemContents))!=null&&Q.find(de=>(de==null?void 0:de.key)==="enableWrap")?V=(se=h.cloneDeep(s.originalItemContents))==null?void 0:se.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!O.value),de)):V.push({key:"enableWrap",contents:!O.value}),r("change",V)},{deep:!0});const le=()=>{var se,de,Je,rt,Z;J.value=M.value;let V={};if(_.value!==""?V.id=_.value:(P.value++,V.id="id"+P.value),(se=J.value)==null||se.forEach(F=>{var we;const me=(we=Be.FormButton)==null?void 0:we.find($e=>($e==null?void 0:$e.label)===(F==null?void 0:F.label));me&&(V[me.key]=F.value)}),(de=f.value)!=null&&de.find(F=>F.id===V.id))f.value=(Je=f.value)==null?void 0:Je.map(F=>(F.id===V.id&&(F=V),F));else{let F=h.cloneDeep(f.value);f.value||(f.value=[]),F.push(V),f.value=F}g.value=!1,_.value="";let Q=h.cloneDeep(s.originalItemContents);(rt=h.cloneDeep(s.originalItemContents))!=null&&rt.find(F=>(F==null?void 0:F.key)==="formButton")?Q=(Z=h.cloneDeep(s.originalItemContents))==null?void 0:Z.map(F=>((F==null?void 0:F.key)==="formButton"&&(F.contents=f.value),F)):Q.push({key:"formButton",contents:f.value}),r("change",Q)},C=V=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Q,se;x.value=(Q=h.cloneDeep(x.value))==null?void 0:Q.filter(de=>(de==null?void 0:de.id)!==(V==null?void 0:V.id)),r("change",(se=h.cloneDeep(s.originalItemContents))==null?void 0:se.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=x.value),de))),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=V=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Q,se;f.value=(Q=h.cloneDeep(f.value))==null?void 0:Q.filter(de=>(de==null?void 0:de.id)!==(V==null?void 0:V.id)),r("change",(se=h.cloneDeep(s.originalItemContents))==null?void 0:se.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=f.value),de))),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var Q;g.value=!0;let V=[];(Q=Be.FormButton)==null||Q.forEach(se=>{P.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:P.value,contents:se==null?void 0:se.options})}),J.value=V,M.value=V},B=()=>{var Q,se,de;d.value=!0;let V=[];(de=(se=(Q=Be.FormContent)==null?void 0:Q.find(Je=>(Je==null?void 0:Je.key)==="Input"))==null?void 0:se.value)==null||de.forEach(Je=>{P.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:P.value,contents:Je==null?void 0:Je.options})}),u.value=V,k.value=V},E=V=>{let Q=h.cloneDeep(M.value);Q=Q==null?void 0:Q.map(se=>(se.value=V==null?void 0:V[se.name],se)),M.value=Q},ve=V=>{const Q=V.find(Je=>(Je==null?void 0:Je.name)==="类型");if((Q==null?void 0:Q.value)!="Select")return;const se=V.find(Je=>(Je==null?void 0:Je.name)==="多选"),de=V.find(Je=>(Je==null?void 0:Je.name)==="初始值");se!=null&&se.value&&No.isString(de.value)&&(de.value=[de.value]),!(se!=null&&se.value)&&!No.isString(de.value)&&(de.value="")},Ye=async V=>{var Q,se,de,Je,rt,Z,F,me,we,$e,Le,Ze;if((V==null?void 0:V.类型)!==((se=(Q=k.value)==null?void 0:Q.find(Xe=>(Xe==null?void 0:Xe.label)==="类型"))==null?void 0:se.value)){let Xe=[];const pe=await((rt=(Je=(de=Be.FormContent)==null?void 0:de.find(R=>(R==null?void 0:R.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Je.value)==null?void 0:rt.value)?await(($e=(we=(me=Be.FormContent)==null?void 0:me.find(R=>(R==null?void 0:R.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:we.value)==null?void 0:$e.value):(F=(Z=Be.FormContent)==null?void 0:Z.find(R=>(R==null?void 0:R.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:F.value;if(pe==null||pe.forEach(R=>{var Re,ke;P.value++;const Y=yr(R==null?void 0:R.default)?(V==null?void 0:V[R.label])??R.value??"":R==null?void 0:R.default;Xe.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:Y,prop:R==null?void 0:R.prop,id:P.value,contents:R==null?void 0:R.options,width:((ke=(Re=k.value)==null?void 0:Re[0])==null?void 0:ke.width)??1})}),V!=null&&V.菜单选项&&((Le=V==null?void 0:V.菜单选项)==null?void 0:Le.length)>0){const R=await Be.menuToContentType(V==null?void 0:V.菜单选项);Xe=Xe==null?void 0:Xe.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=R),Y))}ve(Xe),k.value=await Be.selectToBase(h.cloneDeep(Xe)),u.value=await Be.selectToBase(h.cloneDeep(Xe))}else{let Xe=h.cloneDeep(k.value);if(Xe=Xe==null?void 0:Xe.map(pe=>(pe.value=V==null?void 0:V[pe.name],pe)),V!=null&&V.菜单选项&&((Ze=V==null?void 0:V.菜单选项)==null?void 0:Ze.length)>0){const pe=await Be.menuToContentType(V==null?void 0:V.菜单选项);Xe=Xe==null?void 0:Xe.map(R=>((R==null?void 0:R.name)==="组信息选项"&&(R.contents=pe),R))}Xe=Be.formToOptionsContents(Xe),ve(Xe),k.value=await Be.selectToBase(h.cloneDeep(Xe))}},ct=V=>{V||(u.value=k.value)},ze=async V=>{await Ye(V),u.value=k.value},We=ho(async()=>{var de,Je,rt,Z,F,me,we,$e,Le,Ze,Xe,pe;u.value=k.value;let V={};V.width=((Je=(de=u.value)==null?void 0:de[0])==null?void 0:Je.width)??1,_.value!==""?V.id=_.value:(P.value++,V.id="id"+P.value);let Q=await((F=(Z=(rt=Be.FormContent)==null?void 0:rt.find(R=>{var Y,Re;return(R==null?void 0:R.key)===(((Re=(Y=u.value)==null?void 0:Y.find(ke=>(ke==null?void 0:ke.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:Z.value)==null?void 0:F.value)??((we=(me=Be.FormContent)==null?void 0:me.find(R=>{var Y,Re;return(R==null?void 0:R.key)===(((Re=(Y=u.value)==null?void 0:Y.find(ke=>(ke==null?void 0:ke.label)==="类型"))==null?void 0:Re.value)??"label")}))==null?void 0:we.value);if(($e=u.value)==null||$e.forEach(R=>{const Y=Q==null?void 0:Q.find(Re=>(Re==null?void 0:Re.label)===(R==null?void 0:R.label));Y&&(V[Y.key]=R.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Le=x.value)!=null&&Le.find(R=>R.id===V.id))x.value=(Ze=x.value)==null?void 0:Ze.map(R=>(R.id===V.id&&(R=V),R));else{let R=h.cloneDeep(x.value);R.push(V),x.value=R}x.value=x.value.map(({id:R,...Y})=>Y),d.value=!1,_.value="";let se=h.cloneDeep(s.originalItemContents);(Xe=h.cloneDeep(s.originalItemContents))!=null&&Xe.find(R=>(R==null?void 0:R.key)==="formContent")?se=(pe=h.cloneDeep(s.originalItemContents))==null?void 0:pe.map(R=>((R==null?void 0:R.key)==="formContent"&&(R.contents=x.value),R)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),De=()=>{d.value=!1,g.value=!1,_.value="",k.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var Q,se,de,Je,rt,Z;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=h.cloneDeep(s.originalItemContents);x.value=((Q=V==null?void 0:V.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:Q.contents)??[],f.value=((se=V==null?void 0:V.find(F=>(F==null?void 0:F.key)==="formButton"))==null?void 0:se.contents)??[],O.value=(de=V==null?void 0:V.find(F=>(F==null?void 0:F.key)==="enableWrap"))!=null&&de.contents?!((Je=V==null?void 0:V.find(F=>(F==null?void 0:F.key)==="enableWrap"))!=null&&Je.contents):!0,x.value=(rt=h.cloneDeep(x.value))==null?void 0:rt.map((F,me)=>{var $e;let we=F;return we.id=(F==null?void 0:F.id)??me,F!=null&&F.label||(F.label=(F==null?void 0:F.key)??(F==null?void 0:F.label)??""),F!=null&&F.type||(F.type=(F==null?void 0:F.type)??""),F.contents=(($e=F==null?void 0:F.options)==null?void 0:$e.length)===0?(F==null?void 0:F.contents)??"":F==null?void 0:F.options,we}),x.value=Be.formToOptionsContents(x.value),f.value=(Z=f.value)==null?void 0:Z.map((F,me)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",background:(F==null?void 0:F.background)??"var(--ssComponent-primary-color)",id:me})},{deep:!0,immediate:!0}),(V,Q)=>{const se=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ss,[e.createElementVNode("div",Ts,[e.createElementVNode("div",Is,[Q[2]||(Q[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[Q[1]||(Q[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Je,rt)=>(e.openBlock(),e.createElementBlock("div",{key:rt},[e.createElementVNode("div",Ns,[e.createElementVNode("div",null,e.toDisplayString(Je.label),1),e.createElementVNode("div",As,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>X(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>C(Je)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Vs,[Q[4]||(Q[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[Q[3]||(Q[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Je,rt)=>(e.openBlock(),e.createElementBlock("div",{key:rt},[e.createElementVNode("div",Ms,[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:Z=>j(Je)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>$(Je)},null,8,["onClick"])])])]))),128))]),Q[6]||(Q[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[Q[5]||(Q[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Vt._sfc_main$2,{modelValue:O.value,"onUpdate:modelValue":Q[0]||(Q[0]=Je=>O.value=Je)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:d.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ye,onChangeVisible:ct,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(de,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(de,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>Q[8]||(Q[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Vt.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:De,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},zo=zt._export_sfc($s,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Ks={class:"module-data"},Us={class:"step-module layout"},Ws={class:"form-content"},Hs=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:""}]),k=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 j;x.value=X,r("change",(j=M())==null?void 0:j.compData)},P=(X,j)=>{var le,C;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(C=u.value)==null||C.forEach($=>{$.value=j[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(j,1),f.value="delete";break}},J=X=>{var j,le,C;if((X==null?void 0:X.buttonName)==="确认"){const $=h.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((j=_.value)==null?void 0:j.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",(C=M())==null?void 0:C.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),xe=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var j,le;X&&(x.value=((j=X==null?void 0:X.find(C=>C.key==="stepConfig"))==null?void 0:j.contents)??{},_.value=((le=X==null?void 0:X.find(C=>C.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,j)=>{const le=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=$=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(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(C,{type:"primary",size:"small",onClick:B=>P("update",{...$,index:y+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:B=>P("delete",y)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:d.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:xe,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),qs=zt._export_sfc(Hs,[["__scopeId","data-v-7dbd17f2"]]),Gs={class:"step-module content"},Xs={class:"module-data"},Ys={class:"step-module layout"},Js={class:"form-content"},Zs=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({}),k=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 j;u.value=X,r("change",(j=M())==null?void 0:j.compData)},P=(X,j)=>{var le,C;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(C=f.value)==null||C.forEach($=>{$.value=j[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":k.value.splice(j,1),d.value="delete";break}},J=X=>{var j,le,C,$;if((X==null?void 0:X.buttonName)==="确认"){const y=h.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(le=k.value)==null||le.push({...y,index:((j=k.value)==null?void 0:j.length)+1});break;case"update":k.value=(C=k.value)==null?void 0:C.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",($=M())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:k.value},{key:"timeLineConfig",contents:u.value}]}),xe=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var j,le;X&&(u.value=((j=X==null?void 0:X.find(C=>C.key==="timeLineConfig"))==null?void 0:j.contents)??{},k.value=((le=X==null?void 0:X.find(C=>C.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,j)=>{const le=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Gs,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=$=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(C,{type:"primary",size:"small",onClick:B=>P("update",{...$,index:y+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:B=>P("delete",y)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ys,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:xe,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Js,[(e.openBlock(),e.createBlock(Vt.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)}}}),Qs=zt._export_sfc(Zs,[["__scopeId","data-v-39ffc861"]]),ec={};function tc(n,i){return e.openBlock(),e.createElementBlock("div")}const ac=zt._export_sfc(ec,[["render",tc]]),nc={class:"extra-content"},oc={key:0},rc={key:1},lc={class:"dialog-footer"},ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),k=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const C=h.cloneDeep(s.itemData);d.value=($=h.cloneDeep(C))==null?void 0:$.map(y=>{var B;if(y.key==="extra"){let E=[];(B=y.value)==null||B.forEach(ve=>{var Ye;E.push((Ye=Object.values(ve))==null?void 0:Ye[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const O=(C,$,y,B)=>{var ve;let E={};((ve=C==null?void 0:C[0])==null?void 0:ve.contents)==="详情"&&(g.value=!0,E[$]=C,u.value=C==null?void 0:C.filter(Ye=>(Ye==null?void 0:Ye.key)!=="tableContentName"),f.value=E,x.value=y,_.value=B.id)},P=C=>{var Ye,ct,ze,We;const $=(ct=(Ye=Object.values(h.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:ct.filter(De=>(De==null?void 0:De.key)==="tableContentName"),y=(We=(ze=Object.values(h.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),B=y==null?void 0:y.map((De,V)=>{var Q;return V===C.index&&(De==null?void 0:De.comp)==="Table"&&(De.compData=(Q=De.compData)==null?void 0:Q.map(se=>{var de,Je;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Je=(de=C.content)==null?void 0:de.map(rt=>{let Z={};for(let F in rt)F!=="id"&&(Z[F]=rt[F]);return Z}))==null?void 0:Je.map(rt=>Object.values(rt))),se})),De});B.unshift($==null?void 0:$[0]);let E=h.cloneDeep(f.value),ve={};for(let De in E)ve[De]=B;f.value=ve},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},M=C=>{var Ye,ct,ze,We;const $=(ct=(Ye=Object.values(h.cloneDeep(f.value)))==null?void 0:Ye[0])==null?void 0:ct.filter(De=>(De==null?void 0:De.key)==="tableContentName"),y=(We=(ze=Object.values(h.cloneDeep(f.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),B=y==null?void 0:y.map((De,V)=>(V===C.index&&(De.compData=C.contents),De));B.unshift($==null?void 0:$[0]);let E=h.cloneDeep(f.value),ve={};for(let De in E)ve[De]=B;f.value=ve},xe=()=>{var $,y;let C={};for(let B in x.value)B===(($=Object.keys(f.value))==null?void 0:$[0])?C[B]=(y=Object.values(f.value))==null?void 0:y[0]:C[B]=x.value[B];k("change",{buttonName:"编辑",index:_.value,singleContent:C},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},j=C=>{k("change",C,"methodData")},le=C=>on(C);return(C,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",oc)):(e.openBlock(),e.createElementBlock("div",rc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:E,index:(B==null?void 0:B.id)??E,onContentClick:O,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,onChange:P,childItemData:B==null?void 0:B.itemChildData,key:E,onContentChange:M,index:(B==null?void 0:B.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[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:xe,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},sc=zt._export_sfc(ic,[["__scopeId","data-v-2d9c5ab2"]]),cc={key:0,class:"method-content"},uc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Be.useOriginalState(h.pinia),{originalPath:r}=h.storeToRefs(s),d=n,u=e.ref(!1),k=e.ref(),g=Be.useTableComp(h.pinia),{multipleTableConst:f}=h.storeToRefs(g),x=jt.useModelComp(h.pinia),_=e.ref(!1),O=jt.useMenuState(h.pinia),P=h.useLoginState(h.pinia),{itemData:J,isEdit:M,routeToChildPath:xe,tableViewContents:X,lockingPage:j,payloadTypes:le}=h.storeToRefs(x),{activeMenuPath:C,platform:$,childMenu:y}=h.storeToRefs(O),{loginUserInfo:B}=h.storeToRefs(P),E=e.ref(!1),ve=async()=>{var Z,F;(Z=i.value)!=null&&Z.find(me=>(me==null?void 0:me.buttonName)==="保存")&&await se((F=i.value)==null?void 0:F.find(me=>(me==null?void 0:me.buttonName)==="保存")),await Be.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!E.value&&await rt(h.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Ye=()=>{u.value=!1,k.value=void 0},ct=Z=>Z.map(F=>{const me={};for(const we in F){const $e=F[we];if(we.includes(f.value)){const Le=we.split(f.value);let Ze=me;Le.forEach((Xe,pe)=>{pe===Le.length-1?Ze[Xe]=$e:(Ze[Xe]||(Ze[Xe]={}),Ze=Ze[Xe])})}else me[we]=$e}return me}),ze=async(Z,F,me=[])=>{var $e,Le,Ze,Xe,pe,R,Y,Re,ke,oe,re,ne,Te,Ke,ut;let we=($e=h.cloneDeep(F))==null?void 0:$e.filter(v=>(v==null?void 0:v.comp)!=="methodButton");if(Z!=null&&Z.includes("[")){let v=(R=(pe=(Xe=(Ze=(Le=h.cloneDeep(Z))==null?void 0:Le.split("["))==null?void 0:Ze[1])==null?void 0:Xe.split("]"))==null?void 0:pe[0])==null?void 0:R.split(":"),D="";if(v!=null&&v[0]){let A=(Y=we==null?void 0:we.find(H=>(H==null?void 0:H.name)===(v==null?void 0:v[0])))==null?void 0:Y.compData;if(!A){let H=(Re=Z==null?void 0:Z.split("["))==null?void 0:Re[0],w=await Be.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",me);A=(ke=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(v==null?void 0:v[0])))==null?void 0:ke.compData}A==null||A.forEach(H=>{var w,S,q,z,ce,W;if((H==null?void 0:H.key)==="formContent")(w=H==null?void 0:H.contents)==null||w.forEach(L=>{var Ee;(L==null?void 0:L.key)===(v==null?void 0:v[1])&&(Array.isArray(L==null?void 0:L.value)?D=L==null?void 0:L.value:D=(Ee=L==null?void 0:L.value)==null?void 0:Ee.toString())});else if((H==null?void 0:H.key)==="tableContents"){let L=[],Ee=(S=A==null?void 0:A.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,te=(v==null?void 0:v[1])??"";if(Ee!=null&&Ee.every(G=>Array.isArray(G))){let G=Be.getColumnChild((ce=Ee==null?void 0:Ee[0])==null?void 0:ce.filter(ee=>(ee==null?void 0:ee.label)!=="操作"));(W=H.contents)==null||W.forEach(ee=>{let ie={};ee=ee==null?void 0:ee.filter(be=>!(be!=null&&be.id)),G==null||G.forEach((be,_e)=>{let Se=ee[_e];typeof ee[_e]=="number"&&(Se=ee[_e].toString()),(te===""||te===be.prop)&&(ie[be.prop]=Se)}),L.push(ie)}),L=ct(L)}else{let G=(q=Ee==null?void 0:Ee.map(ee=>ee==null?void 0:ee.label))==null?void 0:q.filter(ee=>ee!=="操作");(z=H.contents)==null||z.forEach(ee=>{let ie={};ee=ee==null?void 0:ee.filter(be=>!(be!=null&&be.id)),G==null||G.forEach((be,_e)=>{let Se=ee[_e];typeof ee[_e]=="number"&&(Se=ee[_e].toString()),(te===""||te===be)&&(ie[be]=Se)}),L.push(ie)})}D=L}})}return D}else if(Z!=null&&Z.includes("/")){let v={};return(oe=h.cloneDeep(we))==null||oe.forEach((D,A)=>{var H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he;if((D==null?void 0:D.comp)==="Table"){let Pe=Array.isArray((S=(w=(H=D==null?void 0:D.compData)==null?void 0:H.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(W=(ce=(z=(q=D==null?void 0:D.compData)==null?void 0:q.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:z.contents)==null?void 0:ce[0])==null?void 0:W.some(Fe=>Fe==null?void 0:Fe.children):[],lt=(te=(Ee=(L=D==null?void 0:D.compData)==null?void 0:L.find(Fe=>(Fe==null?void 0:Fe.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:te.map(Fe=>(Fe!=null&&Fe.find(ht=>ht==null?void 0:ht.id)&&(Fe=Fe.slice(1)),Fe)),He=(_e=(be=(ie=(ee=(G=D==null?void 0:D.compData)==null?void 0:G.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:ee.contents)==null?void 0:ie[0])==null?void 0:be[0])==null?void 0:_e.label,nt=(U=(Se=D==null?void 0:D.compData)==null?void 0:Se.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:U.contents;if(Pe)(Pe==null?void 0:Pe.length)===0?v[D.name]=v!=null&&v[D.name]?v[D.name]:Be.tableToForm(lt,nt):v[He]=Be.tableToForm(lt,nt);else{const Fe=[];nt=nt.slice(1,nt.length-1),nt==null||nt.forEach((ht,at)=>{lt==null||lt.forEach(et=>{Fe.push({key:ht.label+et[0],value:et[at+1]})})}),v["form"+A]=Fe}}else{const Pe=(he=(Ne=D.compData)==null?void 0:Ne.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:he.contents;v!=null&&v.form||(v.form=[]);const lt=[];Pe==null||Pe.forEach(He=>{He.key!==""&&(He={key:(He==null?void 0:He.key)??(He==null?void 0:He.label),value:He==null?void 0:He.value},lt.push(He))}),v.form=[...lt,...h.cloneDeep(v==null?void 0:v.form)]}}),v}else{if(Z==="createInsofDataApi"){let v=(re=h.cloneDeep(F))==null?void 0:re[0];return v={comp:(ne=h.cloneDeep(v))==null?void 0:ne.comp,compData:(Te=h.cloneDeep(v))==null?void 0:Te.compData,name:(Ke=h.cloneDeep(v))==null?void 0:Ke.name,isShow:(ut=h.cloneDeep(v))==null?void 0:ut.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:C.value},value:{pageData:v}}}return Z}},We=async(Z,F,me)=>{var Le,Ze,Xe;let we=await Be.getItemData(F,sessionStorage.getItem("systemKey"),""),$e=we==null?void 0:we.find(pe=>(pe==null?void 0:pe.name)===(me==null?void 0:me[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let pe={};for(let ne in h.cloneDeep(Z))h.cloneDeep(Z)[ne]!=="loginUser"?pe[ne]=h.cloneDeep(Z)[ne]:pe[ne]=((Le=B.value)==null?void 0:Le.account)||((Ze=B.value)==null?void 0:Ze.账号);let R=[],Y=pe;Array.isArray(Z)||(Y=[pe]),Y==null||Y.forEach(ne=>{R.push({[ne[me[1]]]:ne})});let Re=[],ke=R==null?void 0:R.map(ne=>{var Te;return(Te=Object.keys(ne))==null?void 0:Te[0]});we==null||we.forEach(ne=>{var Te;(ne==null?void 0:ne.name)===(me==null?void 0:me[0])&&((Te=ne==null?void 0:ne.compData)==null||Te.forEach(Ke=>{var ut;(Ke==null?void 0:Ke.key)==="tableContents"&&((ut=Ke==null?void 0:Ke.contents)==null||ut.forEach(v=>{v!=null&&v.some(D=>ke.includes(D))&&Re.push({[v.find(D=>D.id).id]:v.find(D=>ke.includes(D))})}))}))});let oe=Re==null?void 0:Re.map(ne=>{var Te;return(Te=Object.keys(ne))==null?void 0:Te[0]}),re=[];if(oe==null||oe.forEach(ne=>{var ut;let Te=(ut=Re==null?void 0:Re.find(v=>{var D;return((D=Object.keys(v))==null?void 0:D[0].toString())===ne.toString()}))==null?void 0:ut[ne],Ke=R==null?void 0:R.find(v=>{var D;return((D=Object.keys(v))==null?void 0:D[0])===Te});re.push({id:parseInt(ne),value:{tableData:Ke[Te]}})}),(re==null?void 0:re.length)>0)return re}else if(($e==null?void 0:$e.comp)==="Form"){let pe=h.cloneDeep($e);pe.compData=(Xe=pe.compData)==null?void 0:Xe.map(Re=>{var ke;return(Re==null?void 0:Re.key)==="formContent"&&(Re.contents=(ke=Re.contents)==null?void 0:ke.map(oe=>((oe==null?void 0:oe.key)===(me==null?void 0:me[1])&&(oe.value=(Z==null?void 0:Z[oe==null?void 0:oe.prop])||Z),oe))),Re});let R={};for(let Re in pe)Re!=="id"&&(R[Re]=pe[Re]);let Y=[];if(Y.push({id:$e==null?void 0:$e.id,keyType:me==null?void 0:me[1],value:{pageData:R}}),(Y==null?void 0:Y.length)>0)return Y}}},De=async(Z,F,me)=>{var Le,Ze,Xe,pe,R,Y,Re,ke,oe,re;let we=await Be.getItemData(F,sessionStorage.getItem("systemKey"),""),$e=we==null?void 0:we.find(ne=>(ne==null?void 0:ne.name)===(me==null?void 0:me[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let ne={};for(let Te in h.cloneDeep(Z))h.cloneDeep(Z)[Te]!=="loginUser"?ne[Te]=h.cloneDeep(Z)[Te]:ne[Te]=((Le=B.value)==null?void 0:Le.account)||((Ze=B.value)==null?void 0:Ze.账号);await h.createInsofDataApi({key:{type:"data",pageKey:F,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ne}})}else if(($e==null?void 0:$e.comp)==="Form"){let ne=h.cloneDeep($e),Te=Object.keys(Z),Ke="";(pe=(Xe=h.cloneDeep(ne))==null?void 0:Xe.compData)==null||pe.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=h.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(z=>{var ce;Te.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((ce=B.value)==null?void 0:ce.姓名)&&(Ke=z==null?void 0:z.key)}))});let ut=[];(R=Object.values(Z[Ke]))==null||R.forEach(w=>{w!=null&&w.includes("(")&&ut.push(w)}),ut=[...new Set(ut)];const v=ut==null?void 0:ut.map(async w=>{var W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne;let S="";(ee=(G=(te=(Ee=(L=(W=h.cloneDeep(w))==null?void 0:W.split("("))==null?void 0:L[1])==null?void 0:Ee.split(")"))==null?void 0:te[0])==null?void 0:G.split(":"))==null||ee.forEach(he=>{S=S===""?S+he.replaceAll("'",""):S+"/"+he.replaceAll("'","")});let q=[];(Ne=(U=(Se=(_e=(be=(ie=h.cloneDeep(w))==null?void 0:ie.split("<"))==null?void 0:be[1])==null?void 0:_e.split(">"))==null?void 0:Se[0])==null?void 0:U.split(":"))==null||Ne.forEach(he=>{q.push(he.replaceAll("'",""))});const z=await Be.getItemData(S,sessionStorage.getItem("systemKey"),"");let ce="";return z==null||z.forEach(he=>{var Pe;he.name===(q==null?void 0:q[0])&&((Pe=he==null?void 0:he.compData)==null||Pe.forEach(lt=>{var He;(lt==null?void 0:lt.key)==="formContent"&&((He=lt.contents)==null||He.forEach(nt=>{(nt==null?void 0:nt.key)===(q==null?void 0:q[1])&&(ce=nt==null?void 0:nt.value)}))}))}),{[w]:ce}}),D=await Promise.all(v);ne.compData=(Re=(Y=h.cloneDeep(ne))==null?void 0:Y.compData)==null?void 0:Re.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=h.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(z=>{var ce,W,L,Ee;return(ce=Z[Ke])!=null&&ce[z==null?void 0:z.key]&&(Z[Ke][z==null?void 0:z.key].includes("(")?z.value=(W=D==null?void 0:D.find(te=>{var G;return((G=Object.keys(te))==null?void 0:G[0])===Z[Ke][z==null?void 0:z.key]}))==null?void 0:W[Z[Ke][z==null?void 0:z.key]]:z.value=(Ee=(L=h.cloneDeep(Z))==null?void 0:L[Ke])==null?void 0:Ee[z==null?void 0:z.key]),z})),w});const A=await h.getInsofDataApi({key:{type:"structure",pageKey:F,systemKey:sessionStorage.getItem("systemKey")}});let H="";((ke=A==null?void 0:A.data)==null?void 0:ke.type)==="success"&&((re=(oe=A==null?void 0:A.data)==null?void 0:oe.result)==null||re.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(me==null?void 0:me[0])&&(H=w.id)}),await h.updateInsofDataApi({id:H,value:{pageData:ne}}))}}},V=(Z,F="",me={})=>{for(const[we,$e]of Object.entries(Z)){const Le=F?`${F}.${we}`:we;$e!==null&&typeof $e=="object"&&!Array.isArray($e)&&Object.prototype.toString.call($e)!=="[object Date]"?V($e,Le,me):me[Le]=$e}return me},Q=async(Z,F,me,we)=>{var Ze,Xe,pe,R,Y,Re,ke,oe,re,ne,Te,Ke,ut,v,D,A,H,w,S,q,z,ce,W,L,Ee;let $e=await Be.getItemData(F,sessionStorage.getItem("systemKey"),""),Le=$e==null?void 0:$e.find(te=>(te==null?void 0:te.name)===(me==null?void 0:me[0]));if(Le){if(!(me!=null&&me[1])&&(Le==null?void 0:Le.comp)==="Table"){let te={},G=[],ee=(Xe=(Ze=Le==null?void 0:Le.compData)==null?void 0:Ze.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Xe.contents;ee!=null&&ee.every(_e=>Array.isArray(_e))?G=(R=Be.getColumnChild((pe=ee==null?void 0:ee[0])==null?void 0:pe.filter(_e=>(_e==null?void 0:_e.label)!=="操作")))==null?void 0:R.map(_e=>_e==null?void 0:_e.prop):G=ee==null?void 0:ee.map(_e=>_e==null?void 0:_e.label);for(let _e in h.cloneDeep(Z))if(h.cloneDeep(Z)[_e]!=="loginUser"){let Se=V(h.cloneDeep(Z)[_e]),U={};for(let Ne in Se)if(G!=null&&G.find(he=>he===Ne))U[Ne]=Se[Ne];else if(G!=null&&G.find(he=>(he==null?void 0:he.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()))){let he=G==null?void 0:G.find(Pe=>(Pe==null?void 0:Pe.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()));U[he]=Se[Ne]}te[_e]=U}else te[_e]=((Y=B.value)==null?void 0:Y.account)||((Re=B.value)==null?void 0:Re.账号);let ie=await h.getInsofDataApi({keyLikes:{tableId:Le==null?void 0:Le.id}});if(((oe=(ke=ie==null?void 0:ie.data)==null?void 0:ke.result)==null?void 0:oe.length)>0){let _e=(ne=(re=ie==null?void 0:ie.data)==null?void 0:re.result)==null?void 0:ne.map(Se=>Se==null?void 0:Se.id);(_e==null?void 0:_e.length)>0&&await h.batchDeleteInsofDataApi({ids:_e})}let be=[];if((Te=Le==null?void 0:Le.compData)!=null&&Te.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")&&((v=(ut=(Ke=Le==null?void 0:Le.compData)==null?void 0:Ke.find(_e=>(_e==null?void 0:_e.key)==="pageColumn"))==null?void 0:ut.contents)!=null&&v.includes("["))){const _e=await h.getInsofDataApi({id:Le==null?void 0:Le.tableId});let Se=((w=(H=(A=(D=_e==null?void 0:_e.data)==null?void 0:D.result)==null?void 0:A[0])==null?void 0:H.key)==null?void 0:w.pageKey)??"";(S=Object.values(te))==null||S.forEach(U=>{be.push({key:{type:"data",pageKey:Se,tableId:Le==null?void 0:Le.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(te))==null||q.forEach(_e=>{be.push({key:{type:"data",pageKey:F,tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})});(be==null?void 0:be.length)>0&&await h.batchAddInsofDataApi({dataList:be})}else if(!(me!=null&&me[1])&&(Le==null?void 0:Le.comp)==="Form"){let te=h.cloneDeep(Le);te.compData=(ce=(z=h.cloneDeep(te))==null?void 0:z.compData)==null?void 0:ce.map(ie=>{var be,_e;return(ie==null?void 0:ie.key)==="formContent"&&(ie.contents=(_e=(be=h.cloneDeep(ie))==null?void 0:be.contents)==null?void 0:_e.map(Se=>{var U,Ne;return(U=h.cloneDeep(Z))!=null&&U[Se==null?void 0:Se.key]&&(Se.value=(Ne=h.cloneDeep(Z))==null?void 0:Ne[Se==null?void 0:Se.key]),Se})),ie});const G=await h.getInsofDataApi({key:{type:"structure",pageKey:F,systemKey:sessionStorage.getItem("systemKey")}});let ee="";((W=G==null?void 0:G.data)==null?void 0:W.type)==="success"&&((Ee=(L=G==null?void 0:G.data)==null?void 0:L.result)==null||Ee.forEach(ie=>{var be,_e;((_e=(be=ie==null?void 0:ie.value)==null?void 0:be.pageData)==null?void 0:_e.name)===(me==null?void 0:me[0])&&(ee=ie.id)}),await h.updateInsofDataApi({id:ee,value:{pageData:te}}))}}},se=async Z=>{var F,me,we,$e,Le,Ze,Xe,pe,R,Y,Re,ke,oe,re,ne,Te;O.setImportLoading(!0);try{if(Z.api){let Ke=new WeakMap;(me=(F=(await h.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:F.filter(W=>{var L,Ee;return((L=W==null?void 0:W.key)==null?void 0:L.pageKey)!=="menu"&&((Ee=W==null?void 0:W.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||me.forEach(W=>{Ke[W.key.pageKey]?Ke[W.key.pageKey]=[...Ke[W.key.pageKey],W]:Ke[W.key.pageKey]=[W]});let v=await Be.getItemData((y==null?void 0:y.value)===""?C.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ke),D="";if(v=v==null?void 0:v.map(W=>{var L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he;if((W==null?void 0:W.comp)==="Form")W.compData=(L=W.compData)==null?void 0:L.map(Pe=>{var lt;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(lt=Pe.contents)==null?void 0:lt.map(He=>{var nt;if((He==null?void 0:He.value)===""&&(He==null?void 0:He.type)==="Select"){let Fe=Be.judgeContents((nt=h.cloneDeep(He))==null?void 0:nt.optionUrl,Ke);He.value=He.value||Fe}return He})),Pe});else if((W==null?void 0:W.comp)==="Table"&&(Ee=W.compData)!=null&&Ee.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn")){let Pe=(G=(te=W.compData)==null?void 0:te.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn"))==null?void 0:G.contents,lt=((ie=(ee=W.compData)==null?void 0:ee.find(Fe=>(Fe==null?void 0:Fe.key)==="pageGroup"))==null?void 0:ie.contents)??"",He=(Se=(_e=(be=Pe==null?void 0:Pe.split("["))==null?void 0:be[1])==null?void 0:_e.split("]"))==null?void 0:Se[0];D=((U=Pe==null?void 0:Pe.split("["))==null?void 0:U[0])+((he=(Ne=X.value)==null?void 0:Ne.find(Fe=>(Fe==null?void 0:Fe.key)===He))==null?void 0:he.value)}return W}),!(D===""||D==="")){const W=await Be.getItemData(D,sessionStorage.getItem("systemKey"),"",!1,"","",Ke);v=v==null?void 0:v.map(L=>{var Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt;if((L==null?void 0:L.comp)==="Table"&&(Ee=L.compData)!=null&&Ee.find(He=>(He==null?void 0:He.key)==="pageColumn")){let He=(G=(te=L.compData)==null?void 0:te.find(et=>(et==null?void 0:et.key)==="pageColumn"))==null?void 0:G.contents,nt=((ie=(ee=L.compData)==null?void 0:ee.find(et=>(et==null?void 0:et.key)==="pageGroup"))==null?void 0:ie.contents)??"",Fe=(Se=(_e=(be=He==null?void 0:He.split("["))==null?void 0:be[1])==null?void 0:_e.split("]"))==null?void 0:Se[0],ht=((U=He==null?void 0:He.split("["))==null?void 0:U[0])+((he=(Ne=X.value)==null?void 0:Ne.find(et=>(et==null?void 0:et.key)===Fe))==null?void 0:he.value),at=(Pe=W==null?void 0:W.find(et=>(et==null?void 0:et.name)===(nt===""?d==null?void 0:d.compName:nt)))==null?void 0:Pe.compData;L.compData=(lt=L.compData)==null?void 0:lt.map(et=>{var ue;return(et==null?void 0:et.key)==="tableContents"&&(et.contents=(ue=at==null?void 0:at.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:ue.contents),et})}return L})}let A={};if((($e=(we=Z==null?void 0:Z.extraValues)==null?void 0:we.input)==null?void 0:$e.length)>0){const W=(Ze=(Le=Z==null?void 0:Z.extraValues)==null?void 0:Le.input)==null?void 0:Ze.map(async L=>{var Ee;de!=null&&de.find(te=>te===L)?A=await ze(L,v):A[Object.keys(L)[0]]=await ze((Ee=Object.values(L))==null?void 0:Ee[0],v,Ke)});await Promise.all(W)}else A=await ze("/",v);let H=!1;(pe=(Xe=Z==null?void 0:Z.extraValues)==null?void 0:Xe.output)==null||pe.forEach(W=>{var L,Ee;(Ee=(L=Object.values(W))==null?void 0:L[0])!=null&&Ee.includes(".doc")&&(H=!0)});let w;if(H){const W=Vt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await h.axios.post(Z.api,A,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{W.close()})}else w=await h.axios.post(Z.api,A,{headers:{"Content-Type":"application/json"}});let S=(ke=(Re=(Y=(R=h.cloneDeep(Z))==null?void 0:R.extraValues)==null?void 0:Y.output)==null?void 0:Re.map(W=>{var L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt,He,nt;if(!((Ee=(L=Object.values(W))==null?void 0:L[0])!=null&&Ee.includes(".doc"))){let Fe=(U=(Se=(_e=(G=h.cloneDeep((te=Object.values(W))==null?void 0:te[0]))==null?void 0:G.split("["))==null?void 0:_e[((be=(ie=h.cloneDeep((ee=Object.values(W))==null?void 0:ee[0]))==null?void 0:ie.split("["))==null?void 0:be.length)-1])==null?void 0:Se.split("]"))==null?void 0:U[0],ht=Fe==null?void 0:Fe.split(":"),at=(Pe=h.cloneDeep((Ne=Object.values(W))==null?void 0:Ne[0]))==null?void 0:Pe.substring(0,h.cloneDeep((he=Object.values(W))==null?void 0:he[0]).lastIndexOf("["));if(at=(He=h.cloneDeep(at))==null?void 0:He.slice(0,((lt=h.cloneDeep(at))==null?void 0:lt.length)-1),at!=null&&at.includes("[")){let et="";if((nt=Be.contentTransArrayToAll(at,"/"))==null||nt.forEach(ue=>{var Ae,Qe,Ie,ge,Oe,ye,I;if(!(ue!=null&&ue.includes("[")))et=et===""?et+ue.replaceAll("/",""):et+"/"+ue.replaceAll("/","");else{let fe=h.cloneDeep(ue).slice(1,((Ae=h.cloneDeep(ue))==null?void 0:Ae.length)-1),tt=(ye=(Oe=(ge=(Ie=(Qe=h.cloneDeep(fe))==null?void 0:Qe.split("["))==null?void 0:Ie[1])==null?void 0:ge.split("]"))==null?void 0:Oe[0])==null?void 0:ye.split(":"),Me="",qe=(I=v==null?void 0:v.find(Ve=>(Ve==null?void 0:Ve.name)===(tt==null?void 0:tt[0])))==null?void 0:I.compData;qe==null||qe.forEach(Ve=>{var pt;(Ve==null?void 0:Ve.key)==="formContent"&&((pt=Ve==null?void 0:Ve.contents)==null||pt.forEach(dt=>{(dt==null?void 0:dt.key)===(tt==null?void 0:tt[1])&&(Me=dt==null?void 0:dt.value)}))}),et=et===""?et+Me.replaceAll("/",""):et+"/"+Me.replaceAll("/","")}}),at=et,at[(at==null?void 0:at.length)-1]!=="/")return at}}}))==null?void 0:ke.filter(W=>W);S=[...new Set(h.cloneDeep(S))];let q=S==null?void 0:S.map(async W=>{let L=await Be.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",Ke);if((L==null?void 0:L.length)===0)return await Be.getParentContents(W)});await Promise.all(q);let z=[],ce=(ne=(re=(oe=h.cloneDeep(Z))==null?void 0:oe.extraValues)==null?void 0:re.output)==null?void 0:ne.map(async W=>{var _e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et,ue,Ae,Qe,Ie,ge,Oe,ye,I,fe,tt,Me,qe,Ve,pt,dt,it,ft,mt,Bt,Pt,At,_t,Ft,bt,Ht,Xt,Ot,Aa,xa,Va,$a,wa,ja,Ca,Ka,Ua,Wa,Ha,qa,Oa,ma,ua,Da,ya,ta,fa,Ga,wt,Yt,gt,hn,Mt,la,_a,aa,ha,Jt;if((Se=(_e=Object.values(W))==null?void 0:_e[0])!=null&&Se.includes(".doc")){var L=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=w.headers["content-disposition"],te=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=te.exec(Ee),ee=G==null?void 0:G[1],ie=document.createElement("a"),be=window.URL.createObjectURL(L);k.value=[{name:ee,blobUrl:be}],u.value=!0}else{let Ma=(Fe=(nt=(He=(Ne=h.cloneDeep((U=Object.values(W))==null?void 0:U[0]))==null?void 0:Ne.split("["))==null?void 0:He[((lt=(Pe=h.cloneDeep((he=Object.values(W))==null?void 0:he[0]))==null?void 0:Pe.split("["))==null?void 0:lt.length)-1])==null?void 0:nt.split("]"))==null?void 0:Fe[0],St=Ma==null?void 0:Ma.split(":"),qt=(et=h.cloneDeep((ht=Object.values(W))==null?void 0:ht[0]))==null?void 0:et.substring(0,h.cloneDeep((at=Object.values(W))==null?void 0:at[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ae=h.cloneDeep(qt))==null?void 0:Ae.slice(0,((ue=h.cloneDeep(qt))==null?void 0:ue.length)-1):qt===""&&(qt=C.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(Qe=Be.contentTransArrayToAll(qt,"/"))==null||Qe.forEach((Nt,Ut)=>{var Wt,Lt,ia,oa,za,Xa,Fa,Ya,En,rn,vn;if(!(Nt!=null&&Nt.includes("[")))Et=Et===""?Et+Nt.replaceAll("/",""):Et+"/"+Nt.replaceAll("/","");else{let ln="",da="";(Wt=h.cloneDeep(Nt))!=null&&Wt.includes("]")?(ln=h.cloneDeep(Nt).slice(1,((Lt=h.cloneDeep(Nt))==null?void 0:Lt.length)-1),da=(Fa=(Xa=(za=(oa=(ia=h.cloneDeep(ln))==null?void 0:ia.split("["))==null?void 0:oa[1])==null?void 0:za.split("]"))==null?void 0:Xa[0])==null?void 0:Fa.split(":")):(ln=h.cloneDeep(Nt).slice(1,(Ya=h.cloneDeep(Nt))==null?void 0:Ya.length),da=(En=h.cloneDeep(ln))==null?void 0:En.split("/"));let Ja="",sn=(rn=v==null?void 0:v.find(ra=>(ra==null?void 0:ra.name)===(da==null?void 0:da[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ra=>{var Sn;(ra==null?void 0:ra.key)==="formContent"&&((Sn=ra==null?void 0:ra.contents)==null||Sn.forEach(La=>{(La==null?void 0:La.key)===(da==null?void 0:da[1])&&(Ja=La==null?void 0:La.value)}))}),((vn=Be.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Ja.replaceAll("/",""):Et+"/"+Ja.replaceAll("/",""):Et=Et+r.value+Ja.replaceAll("/","")}}),(Ie=C.value)!=null&&Ie.includes(Et)?qt=C.value:qt=Et}let na=h.cloneDeep((ge=Object.keys(W))==null?void 0:ge[0]);if(((Oe=w==null?void 0:w.data)==null?void 0:Oe.statusCode)===200||((ye=w==null?void 0:w.data)==null?void 0:ye.code)===200){if(((fe=(I=w==null?void 0:w.data)==null?void 0:I.data)!=null&&fe[na]||(Me=(tt=w==null?void 0:w.data)==null?void 0:tt.result)!=null&&Me[na])&&(St==null?void 0:St.length)===1)return await Q(((Ve=(qe=w==null?void 0:w.data)==null?void 0:qe.data)==null?void 0:Ve[na])||((dt=(pt=w==null?void 0:w.data)==null?void 0:pt.result)==null?void 0:dt[na]),h.cloneDeep(qt),St,D);if((ft=(it=w==null?void 0:w.data)==null?void 0:it.data)!=null&&ft[na]||(Bt=(mt=w==null?void 0:w.data)==null?void 0:mt.result)!=null&&Bt[na]){let Et=await We(((At=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:At[na])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[na]),h.cloneDeep(qt),St);return Et&&(z=[...z,...Et]),Et}else{if(!((bt=w==null?void 0:w.data)!=null&&bt.data)){let Et=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ke);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(St==null?void 0:St[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Lt=>{var ia;return(Lt==null?void 0:Lt.key)==="formContent"&&(Lt.contents=(ia=Lt.contents)==null?void 0:ia.map(oa=>{var za,Xa;return(oa==null?void 0:oa.key)===(St==null?void 0:St[1])&&(oa.value=(Xa=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Xa[na==null?void 0:na.replaceAll(":","")]),oa})),Lt})),Ut});let Nt=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Lt in Ut)Lt!=="id"&&(Wt[Lt]=Ut[Lt]);Nt.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(Nt==null?void 0:Nt.length)>0&&await h.batchUpdateInsofDataApi({dataList:Nt});return}if((St==null?void 0:St.length)===1){const Et=(Aa=(Ot=(Xt=w==null?void 0:w.data)==null?void 0:Xt.data)==null?void 0:Ot.path)==null?void 0:Aa.path;let Nt="";(ja=(wa=($a=(Va=(xa=Et==null?void 0:Et.split("("))==null?void 0:xa[1])==null?void 0:Va.split(")"))==null?void 0:$a[0])==null?void 0:wa.split(":"))==null||ja.forEach(Lt=>{var ia,oa;Nt=Nt===""?Nt+((ia=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:ia.trim()):Nt+"/"+((oa=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:oa.trim())});let Ut=[(Ha=(Wa=(Ua=(Ka=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ka.split(">"))==null?void 0:Ua[0])==null?void 0:Wa.replaceAll("'",""))==null?void 0:Ha.trim()],Wt;return(ma=(Oa=(qa=w==null?void 0:w.data)==null?void 0:qa.data)==null?void 0:Oa.data)!=null&&ma[St==null?void 0:St[0]]?Wt=await Q((ya=(Da=(ua=w==null?void 0:w.data)==null?void 0:ua.data)==null?void 0:Da.data)==null?void 0:ya[St==null?void 0:St[0]],Nt,St,D):Wt=await De((fa=(ta=w==null?void 0:w.data)==null?void 0:ta.data)==null?void 0:fa.data,Nt,Ut,Ke),Wt}else{const Et=(Yt=(wt=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:wt.path)==null?void 0:Yt.path;let Nt="";return(_a=(la=(Mt=(hn=(gt=Et==null?void 0:Et.split("("))==null?void 0:gt[1])==null?void 0:hn.split(")"))==null?void 0:Mt[0])==null?void 0:la.split(":"))==null||_a.forEach(Wt=>{var Lt,ia;Nt=Nt===""?Nt+((Lt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Lt.trim()):Nt+"/"+((ia=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ia.trim())}),await We((Jt=(ha=(aa=w==null?void 0:w.data)==null?void 0:aa.data)==null?void 0:ha.data)==null?void 0:Jt[St==null?void 0:St[0]],Nt,St)}}}}});if(await Promise.all(ce),(z==null?void 0:z.length)>0){let W=[];z==null||z.forEach(te=>{W!=null&&W.find(G=>{var ee,ie,be,_e;return((ie=(ee=G==null?void 0:G.value)==null?void 0:ee.pageData)==null?void 0:ie.name)===((_e=(be=te==null?void 0:te.value)==null?void 0:be.pageData)==null?void 0:_e.name)})||W.push(te)});let L=[];W==null||W.forEach(te=>{var ie,be,_e,Se;let G=h.cloneDeep(te);G.value.pageData.compData=(ie=G.value.pageData.compData)==null?void 0:ie.map(U=>{var Ne;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Ne=U.contents)==null?void 0:Ne.map(he=>{var lt,He,nt,Fe;let Pe=(lt=h.cloneDeep(z))==null?void 0:lt.find(ht=>(ht==null?void 0:ht.keyType)===(he==null?void 0:he.key));if(Pe){let ht=(Fe=(nt=(He=Pe.value.pageData.compData)==null?void 0:He.find(at=>(at==null?void 0:at.key)==="formContent"))==null?void 0:nt.contents)==null?void 0:Fe.find(at=>(at==null?void 0:at.key)===(he==null?void 0:he.key));he.value=ht==null?void 0:ht.value}return he})),U}),L.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ee=[];(Se=(_e=(be=G==null?void 0:G.value)==null?void 0:be.pageData)==null?void 0:_e.compData)==null||Se.forEach(U=>{var Ne;(U==null?void 0:U.key)==="formContent"&&((Ne=U==null?void 0:U.contents)==null||Ne.forEach(he=>{var Pe,lt,He,nt,Fe,ht;if((lt=(Pe=he==null?void 0:he.optionUrl)==null?void 0:Pe.menuSelect)!=null&<.find(at=>at==null?void 0:at.includes("[")))if(ee!=null&&ee.find(at=>{var et,ue,Ae;return((et=at==null?void 0:at.key)==null?void 0:et.join(","))===((Ae=(ue=he==null?void 0:he.optionUrl)==null?void 0:ue.menuSelect)==null?void 0:Ae.join(","))})){let at=(He=ee==null?void 0:ee.find(et=>{var ue,Ae,Qe;return((ue=et==null?void 0:et.key)==null?void 0:ue.join(","))===((Qe=(Ae=he==null?void 0:he.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:Qe.join(","))}))==null?void 0:He.value;at.push({key:he==null?void 0:he.prop,groups:(nt=he==null?void 0:he.optionUrl)==null?void 0:nt.groupSelect,value:he==null?void 0:he.value}),ee=ee==null?void 0:ee.map(et=>{var ue,Ae,Qe;return((ue=et==null?void 0:et.key)==null?void 0:ue.join(","))===((Qe=(Ae=he==null?void 0:he.optionUrl)==null?void 0:Ae.menuSelect)==null?void 0:Qe.join(","))&&(et.value=at),et})}else ee.push({key:(Fe=he==null?void 0:he.optionUrl)==null?void 0:Fe.menuSelect,value:[{key:he==null?void 0:he.prop,groups:(ht=he==null?void 0:he.optionUrl)==null?void 0:ht.groupSelect,value:he==null?void 0:he.value}]})}))}),(ee==null?void 0:ee.length)>0&&(ee=ee==null?void 0:ee.map(U=>{var he;let Ne="";return(he=U==null?void 0:U.key)==null||he.forEach(Pe=>{var lt;if(!(Pe!=null&&Pe.includes("[")))Ne=Ne===""?Ne+Pe:Ne+"/"+Pe;else{let He="",nt=(lt=Pe==null?void 0:Pe.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":");v==null||v.forEach(Fe=>{var ht;(Fe==null?void 0:Fe.name)===(nt==null?void 0:nt[0])&&((ht=Fe==null?void 0:Fe.compData)==null||ht.forEach(at=>{var et;(at==null?void 0:at.key)==="formContent"&&((et=at==null?void 0:at.contents)==null||et.forEach(ue=>{(ue==null?void 0:ue.prop)===(nt==null?void 0:nt[1])&&(He=ue==null?void 0:ue.value)}))}))}),Ne=Ne+r.value+He}}),U.key=Ne,U})),ee==null||ee.forEach(U=>{var lt,He,nt;let Ne=(lt=Ke[U.key])==null?void 0:lt.find(Fe=>{var ht,at,et,ue,Ae,Qe,Ie;return((at=(ht=Fe==null?void 0:Fe.value)==null?void 0:ht.pageData)==null?void 0:at.name)===((Ae=(ue=(et=U==null?void 0:U.value)==null?void 0:et[0])==null?void 0:ue.groups)==null?void 0:Ae[0])&&((Ie=(Qe=Fe==null?void 0:Fe.value)==null?void 0:Qe.pageData)==null?void 0:Ie.name)!==void 0}),he=Ne==null?void 0:Ne.id,Pe=(He=Ne==null?void 0:Ne.value)==null?void 0:He.pageData;Pe.compData=(nt=Pe.compData)==null?void 0:nt.map(Fe=>{var ht;return(Fe==null?void 0:Fe.key)==="formContent"&&(Fe.contents=(ht=Fe.contents)==null?void 0:ht.map(at=>{var ue;let et=(ue=U.value)==null?void 0:ue.find(Ae=>(Ae==null?void 0:Ae.key)===(at==null?void 0:at.prop));return et&&(at.value=et.value),at})),Fe}),L.push({id:he,value:{pageData:Pe}})})});let Ee=(Te=h.cloneDeep(z))==null?void 0:Te[0];(L==null?void 0:L.length)>0&&await h.batchUpdateInsofDataApi({dataList:L})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{h.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}E.value=!0},de=["createInsofDataApi"],Je=ho(async Z=>{se(Z)},100),rt=async Z=>{var Xe,pe,R,Y,Re;const F=h.cloneDeep(Z);let me,we=new WeakMap,$e=await h.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(pe=(Xe=$e.data.result)==null?void 0:Xe.filter(ke=>{var oe,re;return((oe=ke==null?void 0:ke.key)==null?void 0:oe.pageKey)!=="menu"&&((re=ke==null?void 0:ke.key)==null?void 0:re.pageKey)!=="secret"}))==null||pe.forEach(ke=>{we[ke.key.pageKey]?we[ke.key.pageKey]=[...we[ke.key.pageKey],ke]:we[ke.key.pageKey]=[ke]}),Z!=null&&Z[0].path&&(me=await(F==null?void 0:F.map(async(ke,oe)=>{var A,H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e;const ne=(A=we[ke==null?void 0:ke.path])==null?void 0:A.filter(Se=>{var U;return((U=Se==null?void 0:Se.key)==null?void 0:U.type)==="data"});let Te="";const Ke=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);ne==null||ne.forEach(Se=>{var U,Ne,he,Pe,lt;((Ne=(U=Se==null?void 0:Se.value)==null?void 0:U.tableData)==null?void 0:Ne.算法名称)===((he=F==null?void 0:F[oe])==null?void 0:he.method)&&(Te=(lt=(Pe=Se==null?void 0:Se.value)==null?void 0:Pe.tableData)==null?void 0:lt.算法体)});const ut=await Be.getItemData(ke==null?void 0:ke.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);let v="",D=(q=(S=(w=(H=ut==null?void 0:ut[0])==null?void 0:H.compData)==null?void 0:w.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Se=>(Se==null?void 0:Se.prop)==="算法体");return(ce=(z=ut==null?void 0:ut[0])==null?void 0:z.compData)==null||ce.forEach(Se=>{var U;(Se==null?void 0:Se.key)==="tableContents"&&((U=Se==null?void 0:Se.contents)==null||U.forEach(Ne=>{Ne!=null&&Ne.find(he=>he===(ke==null?void 0:ke.method))&&(v=Ne[D])}))}),{buttonName:((W=F==null?void 0:F[oe])==null?void 0:W.method)||((te=(Ee=(L=ne==null?void 0:ne[0])==null?void 0:L.value)==null?void 0:Ee.tableData)==null?void 0:te.算法名称),api:(Te===""?(ie=(ee=(G=ne==null?void 0:ne[0])==null?void 0:G.value)==null?void 0:ee.tableData)==null?void 0:ie.算法体:Te)||v,content:Ke==null?void 0:Ke.filter(Se=>Se.comp!=="methodButton"),extraContent:(be=h.cloneDeep(ke.value))==null?void 0:be.slice(1),methodName:(ke==null?void 0:ke.path)??"",extraValues:(_e=F==null?void 0:F[oe])==null?void 0:_e.data}})));const Le=F==null?void 0:F.map(async ke=>{var ut,v,D,A,H,w;const oe=(ut=$e.data.result)==null?void 0:ut.filter(S=>{var q,z,ce;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"&&((ce=S==null?void 0:S.key)==null?void 0:ce.methodName)===S.method}),re=oe==null?void 0:oe[0],ne=(v=$e.data.result)==null?void 0:v.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)===(re==null?void 0:re.id)}),Te=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we),Ke=ne==null?void 0:ne[0];return{buttonName:(D=re==null?void 0:re.key)==null?void 0:D.methodKey,api:(H=(A=Ke==null?void 0:Ke.value)==null?void 0:A.tableData)==null?void 0:H[0],content:Te==null?void 0:Te.filter(S=>S.comp!=="methodButton"),extraContent:(w=h.cloneDeep(ke.value))==null?void 0:w.slice(1),methodName:(ke==null?void 0:ke.method)??""}}),Ze=(R=Z==null?void 0:Z[0])!=null&&R.path&&((Y=Z==null?void 0:Z[0])==null?void 0:Y.path)!==""?await Promise.all(me):await Promise.all(Le);i.value=Ze==null?void 0:Ze.filter(ke=>ke==null?void 0:ke.extraContent),(Re=i.value)==null||Re.forEach(ke=>{var oe;ke.api===""&&((oe=ke.content)==null||oe.forEach(re=>{var ne;re.comp=="Table"&&x.setExtraContents(Be.methodTableToContent(re.compData,(ne=ke.extraContent)==null?void 0:ne[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!E.value&&await rt(h.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Z,F)=>{var me,we,$e;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=i.value)==null?void 0:me.filter(Le=>(Le==null?void 0:Le.buttonName)!=="保存"),Le=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Le.api!==""?(e.openBlock(),e.createBlock(e.unref(Ao._sfc_main),{key:0,disabled:e.unref(j)===e.unref(C)&&!((Ze=Le==null?void 0:Le.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Le.buttonName,onClickTrigger:Xe=>e.unref(Je)(Le),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(xe)!==""&&(($e=e.unref(C))==null?void 0:$e[((we=e.unref(C))==null?void 0:we.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(Ao._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ve,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Vt.ssFilePreview,{key:0,fileDataList:k.value,onDestroy:Ye},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},dc=zt._export_sfc(uc,[["__scopeId","data-v-11fca7e0"]]),pc={};function fc(n,i){return" 567 "}const hc=zt._export_sfc(pc,[["render",fc]]),vc={class:"module content"},gc={class:"module data"},mc={class:"module layout"},yc={class:"form-content"},bc=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"),k=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}]}),P=X=>{var j;x.value=h.cloneDeep(X),r("change",(j=O())==null?void 0:j.compData)},J=X=>{var j,le;if((X==null?void 0:X.buttonName)==="确认"){const C=h.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...C,index:((j=_.value)==null?void 0:j.length)+1});break}r("change",(le=O())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},M=(X,j)=>{var le,C;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(C=f.value)==null||C.forEach($=>{$.value=j[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(j,1),u.value="delete";break}},xe=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var j,le;X&&(x.value=((j=X==null?void 0:X.find(C=>C.key==="signConfig"))==null?void 0:j.contents)??{},_.value=((le=X==null?void 0:X.find(C=>C.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,j)=>{const le=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",vc,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=$=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",gc,[(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(C,{type:"primary",size:"small",onClick:B=>M("update",{...$,index:y+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:B=>M("delete",y)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",mc,[e.createVNode(Vt.ssForm,{rowContents:g.value,onChange:P},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:xe,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",yc,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),kc=zt._export_sfc(bc,[["__scopeId","data-v-487e0536"]]),xc=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,P;return(O=s==null?void 0:s.stepConfig)!=null&&O.allowTrigger?d.value:(P=s==null?void 0:s.stepConfig)==null?void 0:P.active}),k=(O,P)=>{d.value=P,r("clickStep",O,P)},g=O=>Vt.getComponent(O),f=()=>{var P;const O=(P=s==null?void 0:s.stepList)==null?void 0:P.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,P)=>{var xe,X,j,le,C;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(xe=n.stepConfig)==null?void 0:xe.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((j=n.stepConfig)==null?void 0:j.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:B=>k($,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&&((C=n.stepConfig)!=null&&C.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":B=>$.value=B,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(O.$slots,(B,E)=>({name:E,fn:e.withCtx(ve=>[e.renderSlot(O.$slots,E,e.mergeProps({ref_for:!0},ve||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),wc=zt._export_sfc(xc,[["__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([]),k=(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(wc,{stepConfig:d.value,stepList:u.value,onClickStep:k},{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"])}}}),Dc=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,k)=>(e.openBlock(),e.createBlock(r,{key:k,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})}}}),_c=zt._export_sfc(Dc,[["__scopeId","data-v-4172a886"]]),Ec={class:"line-content"},Sc={class:"line-time"},Tc=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,k;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(k=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:k.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(_c,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:k,timestamp:g})=>[e.createElementVNode("span",Ec,e.toDisplayString(k),1),e.createElementVNode("span",Sc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Ic=zt._export_sfc(Tc,[["__scopeId","data-v-b4d9deed"]]),Bc={class:"tabs-content"},Nc={__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",Bc,[e.createVNode(Vt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Ac=zt._export_sfc(Nc,[["__scopeId","data-v-40865f68"]]),Qn=h.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}}}),Vc={class:"type-select"},Oc=["onClick"],Mc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(h.pinia),{itemData:s}=h.storeToRefs(i),r=d=>{const u=h.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ol),(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",Mc,[e.createVNode(k,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Oc)]))),128))])}}},Fc=zt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Lc={class:"fill-content"},Rc={class:"operate-content"},Pc={class:"collapse-title-content"},$c={class:"collapse-title-item"},jc={key:1},Kc=["onClick"],Uc={class:"icon-content"},Wc={key:0,class:"edit-content"},Hc=["onClick"],qc={class:"comp-child"},Gc={__name:"modelFill",setup(n){const i=Qn(h.pinia),{itemData:s,originalData:r}=h.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),k=e.ref([]),g=J=>{var xe;let M=(xe=h.cloneDeep(k.value))==null?void 0:xe.map((X,j)=>(J===j&&(X.content=!0),X));k.value=M},f=J=>{var xe;let M=(xe=h.cloneDeep(k.value))==null?void 0:xe.map((X,j)=>(J===j&&(X.content=!1),X));k.value=M,d.value=h.cloneDeep(s.value)},x=(J,M)=>{var le;let xe=(le=h.cloneDeep(k.value))==null?void 0:le.map((C,$)=>(J===$&&(C.content=!1),C));k.value=xe;const X=h.cloneDeep(s.value),j=X==null?void 0:X.filter((C,$)=>($===J&&(C.name=M),C));i.setOriginalData(j),i.setItemData(j)};e.watch(()=>s.value,()=>{var J,M,xe;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(M=h.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,k.value=(xe=h.cloneDeep(u.value))==null?void 0:xe.map((X,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),O=(J,M,xe)=>{var j,le;if(!J)return;let X=h.cloneDeep(s.value);X=(j=X==null?void 0:X.map((C,$)=>($===xe&&(C.compData=J),C)))==null?void 0:j.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),k.value=(le=h.cloneDeep(X))==null?void 0:le.map((C,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},P=J=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=h.cloneDeep(s.value),xe=M==null?void 0:M.filter((X,j)=>j!==J);i.setOriginalData(xe),i.setItemData(xe),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const xe=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Lc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Rc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:j})=>{var le,C,$,y,B,E,ve,Ye,ct,ze;return[e.createElementVNode("div",Pc,[e.createElementVNode("div",$c,[(C=(le=k.value)==null?void 0:le.find(We=>We.id===j))!=null&&C.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=($=k.value)==null?void 0:$.find(We=>We.id===j))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Vt._sfc_main$3,{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=(B=k.value)==null?void 0:B.find(We=>We.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(j),["stop"]),class:"icon-content"},[e.createVNode(xe,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Kc))]),e.createElementVNode("div",Uc,[(Ye=(ve=k.value)==null?void 0:ve.find(We=>We.id===j))!=null&&Ye.content?(e.openBlock(),e.createElementBlock("div",Wc,[e.createVNode(xe,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>f(j),["stop"])},null,8,["onClick"]),e.createVNode(xe,{name:"Save",onClick:e.withModifiers(We=>x(j,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ze=(ct=k.value)==null?void 0:ct.find(We=>We.id===j))!=null&&ze.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>P(j),["stop"]),class:"icon-content"},[e.createVNode(xe,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Hc))])])]}),content:e.withCtx(({item:X,index:j})=>{var le,C;return[e.createElementVNode("div",qc,[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:(C=(le=u.value)==null?void 0:le.find(($,y)=>y===j))==null?void 0:C.compData,onChange:$=>O($,X,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Xc=zt._export_sfc(Gc,[["__scopeId","data-v-a46a44b9"]]),Yc={key:0,class:"show-content"},Jc={style:{display:"flex"}},Zc={__name:"modelShow",setup(n){const i=Qn(h.pinia),{itemData:s}=h.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=h.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,k)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Yc,[(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",Jc,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)}}},Qc=zt._export_sfc(Zc,[["__scopeId","data-v-3f3e863e"]]),eu={class:"tabs-header"},tu={class:"tabs-list"},au={class:"tab-name"},nu={class:"tab-actions"},ou=["onClick"],ru=["onClick"],lu=["onClick"],iu={class:"model-operate"},su={class:"model-select",style:{display:"unset"}},cu={class:"existing-components"},uu={class:"component-list"},du=["onClick"],pu={class:"component-info"},fu={class:"component-type"},hu={class:"component-name"},vu={class:"model-fill"},gu={__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),k=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),P=e.ref(null),J=Qn(h.pinia),{itemData:M}=h.storeToRefs(J),xe=()=>{k.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Z=>{k.value="修改标签页",g.value.title=d.value[Z].title,f.value=Z,u.value=!0},j=Z=>{const F=$(Z);O.value.delete(F),d.value.splice(Z,1),rt()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Z={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:C()};d.value.push(Z)}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,rt()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Z=>{const F=d.value[Z];return F.id||(F.id=C()),F.id},y=Z=>{var we;_.value=Z;const F=$(Z);P.value=h.cloneDeep(M.value);let me=O.value.get(F);!me&&((we=d.value[Z].children)==null?void 0:we.length)>0&&(me=Ye(d.value[Z].children)),me?J.setItemData(h.cloneDeep(me)):J.setItemData([]),x.value=!0},B=e.computed(()=>{const Z=jt.useModelComp(h.pinia),F=h.storeToRefs(Z).itemData.value;return console.log("可用组件数据",F),!F||!Array.isArray(F)?[]:F.filter(me=>{var we;if(me.comp==="Tabs"&&_.value>=0){const $e=$(_.value);if((we=me.compData)==null?void 0:we.some(Ze=>{var Xe;return Ze.key==="stepList"&&((Xe=Ze.contents)==null?void 0:Xe.some(pe=>pe.id===$e))}))return!1}return!0})}),E=Z=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Z]||Z,ve=Z=>{var F;try{const me=h.cloneDeep(Z);me.id=Date.now()+Math.random(),me.comp==="Tabs"&&((F=me.compData)==null||F.forEach($e=>{$e.key==="stepList"&&$e.contents&&$e.contents.forEach(Le=>{Le.id=C()})}));const we=h.cloneDeep(M.value);we.push(me),J.setItemData(we)}catch(me){console.error("添加组件失败:",me)}},Ye=Z=>Z.map(F=>{var me;switch(F.type){case"form":return{comp:"Form",name:F.value||"表单",compData:ct(F.content)};case"table":return{comp:"Table",name:F.value||"表格",compData:ze(F.content)};default:return{comp:"Unknown",name:F.value||"",compData:((me=F.content)==null?void 0:me.originalData)||[]}}}),ct=Z=>{if(!Z)return[];const F=[];return Z.rowContents&&F.push({key:"formContent",contents:Z.rowContents}),Z.buttonValue&&F.push({key:"formButton",contents:Z.buttonValue}),typeof Z.isEnableWrap<"u"&&F.push({key:"enableWrap",contents:Z.isEnableWrap}),F},ze=Z=>[],We=()=>{if(_.value>=0&&_.value<d.value.length){const Z=$(_.value);O.value.set(Z,h.cloneDeep(M.value)),d.value[_.value].children=Q(M.value),console.log("保存后的数据",Q(M.value))}x.value=!1,_.value=-1,P.value=null,rt()},De=()=>{P.value&&J.setItemData(h.cloneDeep(P.value)),x.value=!1,_.value=-1,P.value=null},V=()=>{x.value&&De()},Q=Z=>{if(!Array.isArray(Z))throw new Error("sourceData must be an array");return Z.map((F,me)=>{if(!F||typeof F!="object")return F;const{comp:we,name:$e,compData:Le}=F;switch(we){case"Form":return{type:"form",content:se(Le||[]),value:"表单"};case"Table":return{type:"table",content:de(Le||[]),value:"表格"};default:return{type:"xxx",content:Je(Le||[]),value:""}}})},se=Z=>{const F={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},me={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Z.forEach((we,$e)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${$e}:`,we);return}const{key:Le,contents:Ze}=we,Xe=me[Le];if(!Xe){console.warn(`Unknown Form config key: ${Le}`);return}Le==="enableWrap"?F[Xe]=!!Ze:F[Xe]=Array.isArray(Ze)?Ze:[]}),F},de=Z=>{const F={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},me={header:"columns",tableContents:"tableData"};return Z.forEach((we,$e)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${$e}:`,we);return}const{key:Le,contents:Ze}=we,Xe=me[Le];if(!Xe){console.warn(`Unknown Table config key: ${Le}`);return}F[Xe]=Array.isArray(Ze)?Ze:[]}),F},Je=Z=>(console.log("Default conversion logic - to be implemented"),{originalData:Z,processed:!1,componentType:"unknown"}),rt=()=>{const Z=[{key:"stepList",contents:d.value}];r("change",Z)};return e.watch(()=>s.itemContents,Z=>{if(Z&&Z.length>0){const F=Z.find(me=>me.key==="stepList");F&&F.contents&&(d.value=F.contents.map(me=>({title:me.title||"",value:me.value||me.title||"",label:me.label||me.title||"",children:me.children||[],id:me.id||C()})))}},{immediate:!0,deep:!0}),(Z,F)=>{const me=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-input"),$e=e.resolveComponent("el-form-item"),Le=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",eu,[F[6]||(F[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:xe},[e.createVNode(me,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),F[5]||(F[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Ze,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Xe},[e.createElementVNode("span",au,e.toDisplayString(Ze.title),1),e.createElementVNode("div",nu,[e.createElementVNode("button",{onClick:pe=>X(Xe)},"修改标题",8,ou),e.createElementVNode("button",{onClick:pe=>y(Xe)},"布局调整",8,ru),e.createElementVNode("button",{onClick:pe=>j(Xe)},"删除",8,lu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":F[2]||(F[2]=Ze=>u.value=Ze),title:k.value,onBeforeDestroy:F[3]||(F[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:F[1]||(F[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Le,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode($e,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(we,{modelValue:g.value.title,"onUpdate:modelValue":F[0]||(F[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":F[4]||(F[4]=Ze=>x.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:De},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",iu,[e.createElementVNode("div",su,[e.createVNode(Fc),e.createElementVNode("div",cu,[F[8]||(F[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:Xe=>ve(Ze)},[e.createElementVNode("div",pu,[e.createElementVNode("span",fu,e.toDisplayString(E(Ze.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Ze.name),1)]),F[7]||(F[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,du))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Z.innerWidth},[e.createVNode(Qc)])),e.createElementVNode("div",vu,[e.createVNode(Xc)])])]),_:1},8,["modelValue"])])}}},mu=zt._export_sfc(gu,[["__scopeId","data-v-9096ed0d"]]);function yu(){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 bu(n){return{type:"line",...n}}function ku(){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 xu(n){return{type:"bar",barWidth:"60%",...n}}function wu(){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:yu,initSeries:bu},bar:{initBaseoptions:ku,initSeries:xu},pie:{initBaseoptions:wu,initSeries:Cu}},Fo=jt.useMenuState(h.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:k}=i||{},g=n==null?void 0:n.find(O=>{const{name:P}=O;return P===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(O=>{const{key:P}=O;return P==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(O=>{const P=O==null?void 0:O[0];let J=!1;h.isObject(P)&&(P!=null&&P.id)&&(J=!0);let M=u,xe=k;J&&(M=M+1,xe=xe+1);const X=O==null?void 0:O[M],j=O==null?void 0:O[xe];s.push(X),r.push(j)}),{names:s,values:r}},Du=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:k}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(k&&Fo.activeMenuPath&&(g=await Be.getItemData(`${Fo.activeMenuPath}`,f,"")),!k){const x=i==null?void 0:i.join("/");g=await Be.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},_u=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),k=sessionStorage.getItem("systemKey"),g=await Be.getItemData(u,k,"");return Er(g,{group:s,nameCol:r,valueCol:d})},vo=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:k}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:O}=i||{};return g&&f&&Be.isNumber(x)&&Be.isNumber(_)?await Du({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:O}):Be.isNumber(u)&&Be.isNumber(k)?await _u({menu:r,group:d,nameCol:u,valueCol:k}):s},Eu=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:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:x,values:_}=await vo(i,s);if(!x||!_)return f;f.xAxis.data=x;const O=g({data:_});return f.series.push(O),f},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:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:x,values:_}=await vo(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:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:x,values:_}=await vo(i,s);if(!x||!_)return f;const O=[];for(let J=0;J<x.length;J++){const M=x[J],xe=_[J];O.push({name:M,value:xe})}const P=g({data:O});return f.series.push(P),f},Iu=async(n=[])=>{var k,g,f;const i=((k=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:k.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 Eu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Bu=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 Iu(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))}}),Nu=zt._export_sfc(Bu,[["__scopeId","data-v-d4c081e8"]]),Au={class:"chart-module layout"},Vu={class:"chart-module content"},Ou={class:"chart-module content"},Mu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Lu={class:"dialog-footer"},Ru={class:"form-content"},Pu={class:"dialog-footer"},$u=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([]),k=()=>[{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 oe;u.value=k(),(oe=u.value)==null||oe.forEach(re=>{var Te;const ne=re==null?void 0:re.prop;re.value=(Te=g==null?void 0:g.value)==null?void 0:Te[ne]}),d.visible=!0},x=oe=>{g.value=oe},_=()=>{var oe;d.visible=!1,r("change",(oe=Re())==null?void 0:oe.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),P=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({}),xe=()=>{const oe=P.value,re=h.cloneDeep(oe);return re==null||re.forEach(ne=>{var Ke;const Te=ne==null?void 0:ne.prop;ne.value=(Ke=M.value)==null?void 0:Ke[Te]}),re},X=oe=>{var ne;M.value=oe;const re=xe();P.value=re,r("change",(ne=Re())==null?void 0:ne.compData)},j=async()=>{const oe=await Be.getMenusContent(),re=xe();re==null||re.forEach(ne=>{(ne==null?void 0:ne.prop)==="menu"&&(ne.contents=oe)}),P.value=re,O.visible=!0,await Ze(M.value.menu),await R(M.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),C=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({}),B=()=>{const oe=C.value,re=h.cloneDeep(oe);return re==null||re.forEach(ne=>{var Ke;const Te=ne==null?void 0:ne.prop;ne.value=(Ke=y.value)==null?void 0:Ke[Te]}),re},E=oe=>{var ne;y.value=oe;const re=B();C.value=re,r("change",(ne=Re())==null?void 0:ne.compData)},ve=async()=>{await V();const oe=h.cloneDeep(Ye.value),re=B();re==null||re.forEach(ne=>{var Ke;const Te=ne==null?void 0:ne.prop;ne.value=(Ke=y==null?void 0:y.value)==null?void 0:Ke[Te],Te==="mainKey"&&(ne.contents=oe)}),C.value=re,le.visible=!0},Ye=e.ref([]),ct=e.ref([]),ze=e.ref({}),We=e.ref({}),De=()=>{const{compData:oe}=we.value||{},re=oe==null?void 0:oe.find(A=>{const{key:H}=A;return H==="header"}),ne=(re==null?void 0:re.contents)||[],Te=ne==null?void 0:ne.filter((A,H)=>{const{label:w}=A;return w!=="操作"}),Ke=Te==null?void 0:Te.findIndex((A,H)=>{const{isMainKey:w}=A;return w});if(Ke<0)return[];const ut=oe==null?void 0:oe.find(A=>{const{key:H}=A;return H==="tableContents"}),v=(ut==null?void 0:ut.contents)||[];return v==null?void 0:v.map(A=>{const H=A==null?void 0:A[0];let w=Ke;h.isObject(H)&&(H!=null&&H.id)&&(w=w+1);const S=A==null?void 0:A[w];return{label:S,value:S}})},V=async()=>{const oe=await De();Ye.value=oe},Q=async oe=>{const re=sessionStorage.getItem("systemKey");return await Be.getItemData(oe,re,"")},se=async oe=>{const re=oe;ct.value=re==null?void 0:re.map(ne=>{const{name:Te}=ne;return ze.value[Te]=ne,{label:Te,value:Te}})},de=oe=>{const{comp:re,compData:ne}=We.value||{};if(re==="Table"){let Te=B();Te=Te.filter(Ke=>{const{prop:ut}=Ke;return ut!=="formItems"}),Xe(Te,ne),C.value=Te}},Je=async()=>{var ne,Te;const oe=(ne=y==null?void 0:y.value)==null?void 0:ne.mainKey,re=(Te=M==null?void 0:M.value)==null?void 0:Te.menu;if(oe){const ut=`${re==null?void 0:re.join("/")}^${oe}`,v=await Q(ut);await se(v);const D=B();D==null||D.forEach(A=>{(A==null?void 0:A.prop)==="group"&&(A.contents=ct.value)}),C.value=D}};e.watch(()=>{var oe;return(oe=y==null?void 0:y.value)==null?void 0:oe.mainKey},async(oe,re)=>{oe!=re&&oe&&await Je()});const rt=async oe=>{const re=ze.value[oe];We.value=re,await de()};e.watch(()=>{var oe;return(oe=y==null?void 0:y.value)==null?void 0:oe.group},async(oe,re)=>{oe!=re&&oe&&rt(oe)});const Z=async()=>{var re;await Je();const oe=(re=y.value)==null?void 0:re.group;await rt(oe)},F=e.ref([]),me=e.ref({}),we=e.ref({}),$e=async oe=>{const re=oe==null?void 0:oe.join("/"),ne=sessionStorage.getItem("systemKey");return await Be.getItemData(re,ne,"")},Le=async oe=>{const re=await $e(oe);F.value=re==null?void 0:re.map(ne=>{const{name:Te}=ne;return me.value[Te]=ne,{label:Te,value:Te}})},Ze=async(oe,re)=>{await Le(oe);const ne=xe();ne==null||ne.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=F.value)}),P.value=ne};e.watch(()=>{var oe;return(oe=M==null?void 0:M.value)==null?void 0:oe.menu},async(oe,re)=>{const ne=oe==null?void 0:oe.join("/"),Te=re==null?void 0:re.join("/");ne!=Te&&await Ze(oe)});const Xe=(oe,re)=>{const ne=re==null?void 0:re.find(v=>{const{key:D}=v;return D==="header"}),Te=(ne==null?void 0:ne.contents)||[],Ke=Te==null?void 0:Te.filter((v,D)=>{const{label:A}=v;return A!=="操作"}),ut=Ke==null?void 0:Ke.map((v,D)=>{const{label:A}=v;return{label:A,value:D}});oe==null||oe.forEach(v=>{const D=v==null?void 0:v.prop;(D==="nameCol"||D==="valueCol")&&(v.contents=ut)})},pe=oe=>{const{comp:re,compData:ne}=we.value||{};if(re==="Table"){M.value.formItems=[];let Te=xe();Te=Te.filter(Ke=>{const{prop:ut}=Ke;return ut!=="formItems"}),Xe(Te,ne),P.value=Te}},R=async oe=>{const re=me.value[oe];we.value=re,await pe()};e.watch(()=>{var oe;return(oe=M==null?void 0:M.value)==null?void 0:oe.group},async(oe,re)=>{oe!=re&&R(oe)});const Y=async()=>{var ne,Te;const oe=(ne=M.value)==null?void 0:ne.menu;await Ze(oe);const re=(Te=M.value)==null?void 0:Te.group;await R(re)},Re=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),ke=()=>{d.visible=!1,O.visible=!1,le.visible=!1};return e.onMounted(async()=>{var re,ne,Te;P.value=J(),C.value=$();const oe=s==null?void 0:s.itemContents;g.value=((re=oe==null?void 0:oe.find(Ke=>Ke.key==="chartBaseConfig"))==null?void 0:re.contents)??{},M.value=((ne=oe==null?void 0:oe.find(Ke=>Ke.key==="chartDataConfig"))==null?void 0:ne.contents)??{},await Y(),y.value=((Te=oe==null?void 0:oe.find(Ke=>Ke.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await Z()}),(oe,re)=>{const ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Au,[re[4]||(re[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ne,{id:"themeButton",onClick:re[0]||(re[0]=Te=>f())},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Vu,[re[6]||(re[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ne,{id:"themeButton",onClick:re[1]||(re[1]=Te=>j())},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Ou,[re[8]||(re[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ne,{id:"themeButton",onClick:re[2]||(re[2]=Te=>ve())},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ke,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Mu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(ne,{class:"cancel-button button",onClick:ke,id:"themeBorderButton"},{default:e.withCtx(()=>re[9]||(re[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ne,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>re[10]||(re[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:ke,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:P.value,key:P.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lu,[e.createVNode(ne,{class:"cancel-button button",onClick:ke,id:"themeBorderButton"},{default:e.withCtx(()=>re[11]||(re[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ne,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>re[12]||(re[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:ke,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ru,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Pu,[e.createVNode(ne,{class:"cancel-button button",onClick:ke,id:"themeBorderButton"},{default:e.withCtx(()=>re[13]||(re[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ne,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>re[14]||(re[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=zt._export_sfc($u,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Ku=Fn.exports,Lo;function Uu(){return Lo||(Lo=1,function(n,i){(function(s,r){r()})(Ku,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 P=new XMLHttpRequest;P.open("GET",x),P.responseType="blob",P.onload=function(){f(P.response,_,O)},P.onerror=function(){console.error("could not download file")},P.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 k=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Be.commonjsGlobal=="object"&&Be.commonjsGlobal.global===Be.commonjsGlobal?Be.commonjsGlobal:void 0,g=k.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=k.saveAs||(typeof window!="object"||window!==k?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,O){var P=k.URL||k.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=P.createObjectURL(x),setTimeout(function(){P.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 P=document.createElement("a");P.href=x,P.target="_blank",setTimeout(function(){u(P)})}}:function(x,_,O,P){if(P=P||open("","_blank"),P&&(P.document.title=P.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,O);var J=x.type==="application/octet-stream",M=/constructor/i.test(k.HTMLElement)||k.safari,xe=/CriOS\/[\d]+/.test(navigator.userAgent);if((xe||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var C=X.result;C=xe?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),P?P.location.href=C:location=C,P=null},X.readAsDataURL(x)}else{var j=k.URL||k.webkitURL,le=j.createObjectURL(x);P?P.location=le:location.href=le,P=null,setTimeout(function(){j.revokeObjectURL(le)},4e4)}});k.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Uu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BNUNEmtk.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(()=>h.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})}}},go=(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=h.cloneDeep(i),k=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=go(k,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},mo=(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(k=>k===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let k=h.cloneDeep(i),g=u==null?void 0:u.filter(O=>O!==(k==null?void 0:k[r])),f=r+1,x=mo(g,k,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(O=>{_.push(O)}),u=_}return u})),d},yo=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(k=>Array.isArray(k))&&(u!=null&&u.every(k=>Array.isArray(k)&&k.length===1)?u=u==null?void 0:u.map(k=>((k==null?void 0:k[0])===s&&(k=[r]),k)):u=u==null?void 0:u.map(k=>{if(k!=null&&k.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=h.cloneDeep(i),f=k==null?void 0:k.filter(P=>P!==(g==null?void 0:g[d])),x=d+1,_=yo(f,g,s,r,x),O=[];O.push(k==null?void 0:k[0]),_==null||_.forEach(P=>{O.push(P)}),k=O}return k})),u};function Tr(n="menu"){return{name:n,components:{SvgIcon:Ll.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Gt.ssDialog,ssInput:Vt._sfc_main$3},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=jt.useMenuState(),k=jt.useModelComp(h.pinia),g=h.useLoginState(h.pinia),{loginUserInfo:f}=h.storeToRefs(g),x=e.ref(0),_=Rl.useRouter(),O=e.ref(),{asideMenus:P,menuTriggerType:J,platform:M}=h.storeToRefs(u),{fixMenuStatus:xe}=h.storeToRefs(k),X=e.computed(()=>r==null?void 0:r.mode),j=pe=>pe==null?void 0:pe.map(Y=>{var Re,ke;return!(Y!=null&&Y.children)||((Re=Y==null?void 0:Y.children)==null?void 0:Re.length)===0?Y.config=d.value:Y!=null&&Y.children&&((ke=Y==null?void 0:Y.children)==null?void 0:ke.length)>0&&(Y.children=j(Y.children)),Y}),le=e.computed(()=>{let pe=[...P.value];if((pe==null?void 0:pe.length)===0)return _.push("/"),[];const R=Ye(pe,E.value);return R.isFlag||(pe=R==null?void 0:R.data),pe=pe==null?void 0:pe.map(Y=>{var Re,ke;return!(Y!=null&&Y.children)||((Re=Y==null?void 0:Y.children)==null?void 0:Re.length)===0?Y.config=d.value:Y!=null&&Y.children&&((ke=Y==null?void 0:Y.children)==null?void 0:ke.length)>0&&(Y.children=j(Y.children)),Y}),pe}),C=async(pe,R)=>{k.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(pe==null?void 0:pe.path),u.setActiveAsideMenu(pe),pe.isRouter?_.push(pe.path):_.push("/"),s("node-click",pe,R)},$=async pe=>{const R=h.findNodeByPropInTree(le.value,"path",pe);u.setActiveAsideMenu(R),k.setRouteToChildPath(""),xe.value?k.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(pe):(u.setMenuTriggerType("click"),u.setActiveMenuPath(pe)),pe!=null&&pe.startsWith("/")?_.push(pe):_.push("/"),x.value++},y=pe=>{u.setActiveMenuPath(pe)},B=pe=>{const R=document.documentElement;pe==null||pe.forEach(Y=>{R.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const pe=sessionStorage.getItem("authority");return pe?JSON.parse(pe):[]});e.watch(()=>M.value,pe=>{pe==="browser"?B(bn.browserVerticalMenuClasses):pe==="client"?(B(bn.clientHorizontalMenuClasses),B(bn.clientVerticalMenuClasses)):pe==="three"&&(B(bn.threeHorizontalMenuClasses),B(bn.threeVerticalMenuClasses))},{immediate:!0});const ve=(pe,R)=>{function Y(Re){Re==null||Re.forEach(ke=>{var re,ne;const oe=(re=ke==null?void 0:ke.path)!=null&&re.startsWith("/")?(ne=ke==null?void 0:ke.path)==null?void 0:ne.substring(1):ke==null?void 0:ke.path;ke.show=R==null?void 0:R.some(Te=>Te==null?void 0:Te.includes(oe)),ke.children&&Y(ke.children)})}return Y(pe),pe},Ye=(pe,R)=>{if(Array.isArray(R)){const Y=Array.from(new Set(R==null?void 0:R.map(Re=>Re.substring(0,Re.lastIndexOf("/")))));return{data:ve(pe,Y),isFlag:!1}}else return{isFlag:(R==null?void 0:R.toUpperCase())==="SUPERADMIN"}},ct=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),ze=pe=>on(pe),We=e.ref({}),De=e.ref([]),V=e.ref({}),Q=e.ref({}),se=pe=>{switch(pe){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},de=e.ref({}),Je=pe=>{u.setCacheInputMenu({type:ct.type,data:pe}),u.setIsRefreshMenus(!0)},rt=async(pe,R,Y)=>{var Re,ke,oe,re,ne,Te,Ke,ut,v,D,A,H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et,ue,Ae,Qe,Ie;if(R==="create"){let ge=(Y==null?void 0:Y.title)+"(1)",Oe=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ye=(ke=(Re=Oe==null?void 0:Oe.data)==null?void 0:Re.result)==null?void 0:ke[0],I=(oe=ye==null?void 0:ye.value)==null?void 0:oe.pageData;I.compData=(re=I.compData)==null?void 0:re.map(Me=>{var qe;return(Me==null?void 0:Me.key)==="menuContents"&&(Me.contents=mo(Me.contents,(qe=Y==null?void 0:Y.path)==null?void 0:qe.split("/"),ge)),Me}),await h.updateInsofDataApi({id:ye==null?void 0:ye.id,value:{pageData:I}});let fe=(Te=(ne=Y==null?void 0:Y.path)==null?void 0:ne.split("/"))==null?void 0:Te.filter((Me,qe)=>{var Ve,pt;return qe!==((pt=(Ve=Y==null?void 0:Y.path)==null?void 0:Ve.split("/"))==null?void 0:pt.length)-1}),tt=await Be.getItemData((v=(ut=(Ke=Y==null?void 0:Y.path)==null?void 0:Ke.split("/"))==null?void 0:ut.filter((Me,qe)=>{var Ve,pt;return qe!==((pt=(Ve=Y==null?void 0:Y.path)==null?void 0:Ve.split("/"))==null?void 0:pt.length)-1}))==null?void 0:v.join("/"),sessionStorage.getItem("systemKey"),"");if(fe.push(ge),fe=fe==null?void 0:fe.join("/"),(tt==null?void 0:tt.length)>0){let Me=tt==null?void 0:tt[0],qe=(A=(D=Me==null?void 0:Me.compData)==null?void 0:D.find(Ve=>(Ve==null?void 0:Ve.key)==="header"))==null?void 0:A.contents;if(((H=qe==null?void 0:qe[0])==null?void 0:H.directiveLabel)==="#isMain"){let Ve=(w=qe==null?void 0:qe[0])==null?void 0:w.prop,pt=(q=(S=Me==null?void 0:Me.compData)==null?void 0:S.find(it=>(it==null?void 0:it.key)==="tableContents"))==null?void 0:q.contents,dt;pt==null||pt.forEach(it=>{var ft,mt;if(it.length===1)((ft=it==null?void 0:it[0])==null?void 0:ft[Ve])===(Y==null?void 0:Y.title)&&(dt=it==null?void 0:it[0],dt[Ve]=ge);else{let Bt=(mt=qe==null?void 0:qe.filter(_t=>_t!=="操作"))==null?void 0:mt.map(_t=>_t==null?void 0:_t.prop),Pt=it==null?void 0:it.filter(_t=>!(_t!=null&&_t.id)),At=Be.getValueToObjectValue(Pt,Bt);At[Ve]=ge,dt=At}}),await h.createInsofDataApi({key:{type:"data",pageKey:(W=(ce=(z=Y==null?void 0:Y.path)==null?void 0:z.split("/"))==null?void 0:ce.filter((it,ft)=>{var mt,Bt;return ft!==((Bt=(mt=Y==null?void 0:Y.path)==null?void 0:mt.split("/"))==null?void 0:Bt.length)-1}))==null?void 0:W.join("/"),tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(L=f.value)==null?void 0:L.id,createUserLayer:((Ee=f.value)==null?void 0:Ee.dept)||((te=f.value)==null?void 0:te.部门名称)},value:{tableData:dt}})}}await Be.newLoadingConstruct(Y==null?void 0:Y.path,fe),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((ie=(ee=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ee.filter((Me,qe)=>{var Ve,pt;return qe!==((pt=(Ve=Y==null?void 0:Y.path)==null?void 0:Ve.split("/"))==null?void 0:pt.length)-1}))==null?void 0:ie.join("/")),u.setActiveTopMenuPath((_e=(be=Y==null?void 0:Y.path)==null?void 0:be.split("/"))==null?void 0:_e[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(R==="update")O.value=Y;else if(R==="delete"){let ge=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),Oe=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ye=(U=(Se=Oe==null?void 0:Oe.data)==null?void 0:Se.result)==null?void 0:U[0],I=(Ne=ye==null?void 0:ye.value)==null?void 0:Ne.pageData;if(I.compData=(he=I.compData)==null?void 0:he.map(Me=>{var qe;return(Me==null?void 0:Me.key)==="menuContents"&&(Me.contents=go(Me.contents,(qe=Y==null?void 0:Y.path)==null?void 0:qe.split("/"))),Me}),await h.updateInsofDataApi({id:ye==null?void 0:ye.id,value:{pageData:I}}),((lt=(Pe=ge==null?void 0:ge.data)==null?void 0:Pe.result)==null?void 0:lt.length)>0){let Me=(nt=(He=ge==null?void 0:ge.data)==null?void 0:He.result)==null?void 0:nt.map(qe=>qe==null?void 0:qe.id);(Me==null?void 0:Me.length)>0&&await h.batchDeleteInsofDataApi({ids:Me})}let fe=await Be.getItemData((at=(ht=(Fe=Y==null?void 0:Y.path)==null?void 0:Fe.split("/"))==null?void 0:ht.filter((Me,qe)=>{var Ve,pt;return qe!==((pt=(Ve=Y==null?void 0:Y.path)==null?void 0:Ve.split("/"))==null?void 0:pt.length)-1}))==null?void 0:at.join("/"),sessionStorage.getItem("systemKey"),""),tt=[];(fe==null?void 0:fe.length)>0&&(fe==null||fe.forEach(Me=>{var Ve,pt,dt,it,ft,mt,Bt,Pt,At,_t,Ft;let qe=(it=(dt=(pt=(Ve=Me==null?void 0:Me.compData)==null?void 0:Ve.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:pt.contents)==null?void 0:dt[0])==null?void 0:it.prop;((Pt=(Bt=(mt=(ft=Me==null?void 0:Me.compData)==null?void 0:ft.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:mt.contents)==null?void 0:Bt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(At=Me==null?void 0:Me.compData)==null?void 0:At.find(bt=>(bt==null?void 0:bt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(bt=>{var Ht,Xt,Ot;(bt==null?void 0:bt.length)>1?(bt==null?void 0:bt[1])===(Y==null?void 0:Y.title)&&tt.push((Ht=bt==null?void 0:bt[0])==null?void 0:Ht.id):((Xt=bt==null?void 0:bt[0])==null?void 0:Xt[qe])===(Y==null?void 0:Y.title)&&tt.push((Ot=bt==null?void 0:bt[0])==null?void 0:Ot.id)}))})),(tt==null?void 0:tt.length)>0&&await h.batchDeleteInsofDataApi({ids:tt}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((Ae=(ue=(et=Y==null?void 0:Y.path)==null?void 0:et.split("/"))==null?void 0:ue.filter((Me,qe)=>{var Ve,pt;return qe!==((pt=(Ve=Y==null?void 0:Y.path)==null?void 0:Ve.split("/"))==null?void 0:pt.length)-1}))==null?void 0:Ae.join("/")),u.setActiveTopMenuPath((Ie=(Qe=Y==null?void 0:Y.path)==null?void 0:Qe.split("/"))==null?void 0:Ie[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Z=async(pe,R)=>{var ut,v,D,A,H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et;let Y=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Re=(v=(ut=Y==null?void 0:Y.data)==null?void 0:ut.result)==null?void 0:v[0],ke=(D=Re==null?void 0:Re.value)==null?void 0:D.pageData;ke.compData=(A=ke.compData)==null?void 0:A.map(ue=>{var Ae,Qe;return(ue==null?void 0:ue.key)==="menuContents"&&(ue.contents=yo(ue.contents,(Ae=R==null?void 0:R.path)==null?void 0:Ae.split("/"),R==null?void 0:R.title,(Qe=pe==null?void 0:pe.target)==null?void 0:Qe.value)),ue}),Re!=null&&Re.id&&await h.updateInsofDataApi({id:Re==null?void 0:Re.id,value:{pageData:ke}});let oe=(w=(H=R==null?void 0:R.path)==null?void 0:H.split("/"))==null?void 0:w.filter((ue,Ae)=>{var Qe,Ie;return Ae!==((Ie=(Qe=R==null?void 0:R.path)==null?void 0:Qe.split("/"))==null?void 0:Ie.length)-1}),re=oe==null?void 0:oe.join("/");oe.push((S=pe==null?void 0:pe.target)==null?void 0:S.value),oe=oe==null?void 0:oe.join("/");let ne=await Be.getItemData(re,sessionStorage.getItem("systemKey"),"");if(((L=(W=(ce=(z=(q=ne==null?void 0:ne[0])==null?void 0:q.compData)==null?void 0:z.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:ce.contents)==null?void 0:W[0])==null?void 0:L.directiveLabel)==="#isMain"){let ue=(ie=(ee=(G=(te=(Ee=ne==null?void 0:ne[0])==null?void 0:Ee.compData)==null?void 0:te.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:G.contents)==null?void 0:ee[0])==null?void 0:ie.prop,Ae=(Se=(_e=(be=ne==null?void 0:ne[0])==null?void 0:be.compData)==null?void 0:_e.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:Se.contents,Qe=(Pe=(he=(Ne=(U=ne==null?void 0:ne[0])==null?void 0:U.compData)==null?void 0:Ne.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:he.contents)==null?void 0:Pe.map(ge=>ge==null?void 0:ge.prop),Ie;if(Ae==null||Ae.forEach(ge=>{var ye;let Oe=Be.getValueToObjectValue(ge,Qe);(Oe==null?void 0:Oe[ue])===R.title&&(Ie=Oe,Ie[ue]=(ye=pe==null?void 0:pe.target)==null?void 0:ye.value)}),Ie){let ge={};for(let ye in Ie)ye!=="id"&&(ge[ye]=Ie==null?void 0:Ie[ye]);let Oe=[{id:Ie==null?void 0:Ie.id,value:{tableData:ge}}];await h.batchUpdateInsofDataApi({dataList:Oe})}}let Te=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:R==null?void 0:R.path}}),Ke=(He=(lt=Te==null?void 0:Te.data)==null?void 0:lt.result)==null?void 0:He.map(ue=>({id:ue==null?void 0:ue.id,key:ue==null?void 0:ue.key}));Ke=Ke==null?void 0:Ke.map(ue=>(ue.key.pageKey=oe,ue)),(Ke==null?void 0:Ke.length)>0&&await h.batchUpdateInsofDataApi({dataList:Ke}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((ht=(Fe=(nt=R==null?void 0:R.path)==null?void 0:nt.split("/"))==null?void 0:Fe.filter((ue,Ae)=>{var Qe,Ie;return Ae!==((Ie=(Qe=R==null?void 0:R.path)==null?void 0:Qe.split("/"))==null?void 0:Ie.length)-1}))==null?void 0:ht.join("/")),u.setActiveTopMenuPath((et=(at=R==null?void 0:R.path)==null?void 0:at.split("/"))==null?void 0:et[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),O.value=void 0},F=async(pe,R)=>{ct.type=se(R==null?void 0:R.operateType),await rt(R,ct.type,pe),Q.value=pe,de.value=R},me=()=>{ct.show=!1},we=pe=>pe==null?void 0:pe.filter(R=>R.allowInherit),$e=()=>{var Y,Re,ke,oe,re;let pe;ct.type==="create"&&(pe=((Y=Q.value)==null?void 0:Y.path)+"/"+V.value[(Re=V.value)==null?void 0:Re.prop]),ct.type==="update"&&(pe=(ke=Q.value)==null?void 0:ke.path);const R={...Q.value,config:we((oe=Q.value)==null?void 0:oe.config),children:[],childMenus:[],title:V.value[(re=V.value)==null?void 0:re.prop],path:pe};console.log("clickSubmitForm",de.value,Q.value,R),Je(R),ct.show=!1},Le=pe=>{var Y,Re;const R=(Y=pe==null?void 0:pe.contents)==null?void 0:Y.find(ke=>ke.key==="formContent");R&&(V.value=(Re=R==null?void 0:R.contents)==null?void 0:Re.reduce((ke,oe)=>(ke[oe.key]=oe.value,ke.prop=oe.key,ke),{}))},Ze=e.ref(!1);return{isCollapse:Ze,handleMenuCollapse:()=>{Ze.value=!Ze.value},handleCompChange:Le,dialogForm:We,dialogRenderComps:De,getComponents:ze,clickSubmitForm:$e,dialogInfo:ct,beforeDialogDestroy:me,clickMenuIcon:F,mode:X,renderMenuList:le,clickMenu:C,openMenu:$,closeMenu:y,changeMenuStyle:B,fixElement:O,onBlur:Z}}}}e.defineComponent(Tr());const an=h.useLoginState(),{loginUserInfo:An}=h.storeToRefs(an),$t=jt.useModelComp(h.pinia),Ln=e.ref(!1),{itemData:Wu,itemGridData:Qa,curStructureCompIds:Ro,isSubmitCurStructure:Hu,isRefreshCurStructure:qu,freshContent:Po,routeToChildPath:Gu,payloadTypes:Ir,pageMapState:Kn,itemExtendData:Vn}=h.storeToRefs($t),Rt=jt.useMenuState(h.pinia),{activeTopMenuPath:Br,activeMenuPath:xt,platform:Kp,activeAsideMenu:Xu,buttonTriggerType:Yu,menus:Ju}=h.storeToRefs(Rt),pa=Be.useUnit(h.pinia),{selectTitle:Zu,chooseTitle:ka}=h.storeToRefs(pa),Qu=Be.useOriginalState(h.pinia),{originalPath:eo}=h.storeToRefs(Qu),ga=e.ref(),$o=jt.useAuthorityState(h.pinia),Un=e.ref(!0),fn=e.ref(0),Wn=e.ref([]),ed=e.ref(!1),Ia=e.computed(async()=>{var i,s;const n=(i=xt.value)!=null&&i.startsWith("/")?(s=xt.value)==null?void 0:s.substring(1):xt.value;return(n==null?void 0:n.includes(eo.value))||await ud(n)}),td=()=>{$t.setItemGridData([]),$t.setIsEdit("edit"),$t.setSubmitCurStructure(xt.value!=="/平台管理/菜单管理")},ad=()=>{$t.setIsEdit("view"),$t.setRefreshCurStructure(!0)},nd=async n=>{var k,g,f;let i=Zu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(k=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:k.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"),pa.setSelectTitle(i),pa.setChooseTitle([])),Rt.setActiveMenuPath(d)},ro=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,k;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")}}}})},k=h.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")}}}})},k=h.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},k=h.batchDeleteInsofDataApi);const g=await k(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw h.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{h.ElMessage.error("保存响应失败")}},jo=async(n,i,s,r)=>{var d,u,k,g,f,x,_,O,P,J,M;try{const xe=(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=(k=n==null?void 0:n.results)==null?void 0:k.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}})),j=JSON.parse(h.cloneDeep(JSON.stringify(n))),le=(f=j==null?void 0:j.results)==null?void 0:f.map(y=>y.id);let C;s?C=(O=(_=(x=Kn.value)==null?void 0:x[xt.value])==null?void 0:_.filter(y=>{var B,E,ve;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ve=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ve.target)===r}))==null?void 0:O.map(y=>y==null?void 0:y.id):C=(M=(J=(P=Kn.value)==null?void 0:P[xt.value])==null?void 0:J.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:M.map(y=>y==null?void 0:y.id);const $=C==null?void 0:C.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(xe==null?void 0:xe.length)>0&&await h.batchAddInsofDataApi({dataList:xe}),(X==null?void 0:X.length)>0&&await h.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await h.batchDeleteInsofDataApi({ids:$})}catch(xe){throw new Error(xe)}},od=async n=>{var x,_,O,P,J,M,xe,X,j,le;Rt.setContentLoading(!0);const i=JSON.parse(h.cloneDeep(JSON.stringify(Wu.value)));if(!Hu.value)return Rt.setCacheStructures({key:Yu.value,data:i}),h.ElMessage.success("已暂存");const s=i==null?void 0:i.map(C=>C.id),r=s.filter(C=>{var $;return!(($=Ro.value)!=null&&$.includes(C))}),d=(x=Ro.value)==null?void 0:x.filter(C=>!s.includes(C)),u=[...r,...d].filter(C=>typeof C!==null&&typeof C<"u"),k=i==null?void 0:i.filter(C=>!C.id),g=i==null?void 0:i.filter(C=>C.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(ro(u,"delete",n)),k&&(k==null?void 0:k.length)>0&&f.push(ro(k,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(ro(g,"update",n)),Qa.value&&((_=Qa.value)!=null&&_.isDelete&&((P=(O=Qa.value)==null?void 0:O.results)==null?void 0:P.length)>0&&((M=(J=Qa.value)==null?void 0:J.results)!=null&&M.every(C=>typeof C=="number"))?await h.batchDeleteInsofDataApi({ids:(xe=Qa.value)==null?void 0:xe.results}):(console.log("itemGridData.value",Qa.value),f.push(await jo(Qa.value,"gridLayout")))),Vn.value)for(const C in Vn.value)f.push(await jo((X=Vn.value)==null?void 0:X[C],"extend",{target:C,compId:(le=(j=Vn.value)==null?void 0:j[C])==null?void 0:le.compId},C));await Promise.all(f).then(()=>{h.ElMessage.success("保存成功"),$t.setRefreshCurStructure(!0)}).catch(C=>{h.ElMessage.success(C)}),Rt.setContentLoading(!1)},Hn=n=>on(n),kt=e.ref([]),rd=e.computed(()=>{var n;return(n=kt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nr=e.computed(()=>{var n;return(n=kt.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,k,g,f;let i=h.cloneDeep(xt).value;i=i+eo.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await h.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=(k=s==null?void 0:s.data)==null?void 0:k.result)==null?void 0:g.map(O=>O==null?void 0:O.id),_=await h.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(h.ElMessage.success("删除成功"),await an.setLogRecordAsync({type:"删除",data:n},i)):h.ElMessage.error("删除响应失败"),$t.setTableLoading(!1)}},Ko=async n=>{var i,s;try{let r=h.cloneDeep(xt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(k=>{var g;d.push(h.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+eo.value+((g=Object.values(k==null?void 0:k.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(k=>{var g;return((g=k==null?void 0:k.data)==null?void 0:g.code)===200}))){const k=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 h.batchDeleteInsofDataApi({ids:k});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(h.ElMessage.success("删除成功"),await an.setLogRecordAsync({type:"删除",data:n},r)):h.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{h.ElMessage.error("删除数据时处理失败")}finally{$t.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=h.cloneDeep(n==null?void 0:n.data),u=await h.createInsofDataApi({key:{type:"data",pageKey:xt.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 k=await Promise.all([u]);(k==null?void 0:k.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?h.ElMessage.success("迁移成功"):h.ElMessage.error("迁移响应失败")}catch(r){throw h.ElMessage.error(r),new Error(r)}},Ar=e.ref(0),qn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,k,g,f,x,_,O,P,J,M,xe,X,j,le,C,$,y,B,E,ve,Ye,ct,ze,We,De,V,Q,se,de,Je,rt,Z,F,me,we,$e,Le,Ze,Xe,pe,R,Y,Re,ke,oe,re,ne,Te,Ke,ut,v,D,A,H,w,S,q,z,ce,W,L,Ee,te,G,ee,ie,be,_e,Se,U,Ne,he,Pe,lt,He,nt,Fe,ht,at,et;qn.value=null;let r=xt.value;if((d=ga.value)!=null&&d.compData&&((u=ga.value)==null?void 0:u.compData)!==xt.value&&(r=r+"/"+((g=(k=ka.value)==null?void 0:k[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除"){if(typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Ko(n):await Be.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),((O=(_=n==null?void 0:n.column)==null?void 0:_[0])==null?void 0:O.directiveLabel)==="#isMain"){let ue=(M=n==null?void 0:n.singleContent)==null?void 0:M[(J=(P=n==null?void 0:n.column)==null?void 0:P[0])==null?void 0:J.prop],Ae=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=xt.value+"/"+ue,Ie=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Qe}}),ge=(X=(xe=Ae==null?void 0:Ae.data)==null?void 0:xe.result)==null?void 0:X[0],Oe=(j=ge==null?void 0:ge.value)==null?void 0:j.pageData;if(Oe.compData=(le=Oe.compData)==null?void 0:le.map(ye=>((ye==null?void 0:ye.key)==="menuContents"&&(ye.contents=go(ye.contents,Qe==null?void 0:Qe.split("/"))),ye)),await h.updateInsofDataApi({id:ge==null?void 0:ge.id,value:{pageData:Oe}}),(($=(C=Ie==null?void 0:Ie.data)==null?void 0:C.result)==null?void 0:$.length)>0){let ye=(B=(y=Ie==null?void 0:Ie.data)==null?void 0:y.result)==null?void 0:B.map(I=>I==null?void 0:I.id);(ye==null?void 0:ye.length)>0&&await h.batchDeleteInsofDataApi({ids:ye})}Rt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Rt.setIsRefreshMenus(!1),Rt.setIsRefreshMenus(!0),Rt.setActiveMenuPath((ve=(E=Qe==null?void 0:Qe.split("/"))==null?void 0:E.filter((ye,I)=>{var fe;return I!==((fe=Qe==null?void 0:Qe.split("/"))==null?void 0:fe.length)-1}))==null?void 0:ve.join("/"))}await an.setLogRecordAsync({type:"删除",data:n},xt.value)}else if((n==null?void 0:n.buttonName)==="批量删除")if((Ye=n==null?void 0:n.selectItems)!=null&&Ye.every(ue=>typeof(ue==null?void 0:ue.id)=="string")){const ue=(ct=n==null?void 0:n.selectItems)==null?void 0:ct.map(Ae=>({content:n==null?void 0:n.content,singleContent:Ae,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 Ko(ue)}else{const ue=(ze=n==null?void 0:n.selectItems)==null?void 0:ze.map(Ae=>Ae==null?void 0:Ae.id);await h.batchDeleteInsofDataApi({ids:ue}),await an.setLogRecordAsync({type:"删除",data:ue},xt.value)}else if((n==null?void 0:n.buttonName)==="新增"){let ue={};for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(ue[Qe]=n==null?void 0:n.singleContent[Qe]);const Ae=await Be.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(ue),n==null?void 0:n.column,n,{param:s});if(qn.value={resId:Ae,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((De=(We=n==null?void 0:n.column)==null?void 0:We[0])==null?void 0:De.directiveLabel)==="#isMain"&&((Q=(V=n==null?void 0:n.column)==null?void 0:V[0])==null?void 0:Q.directiveColor)!==!0){let Qe=(Je=n==null?void 0:n.singleContent)==null?void 0:Je[(de=(se=n==null?void 0:n.column)==null?void 0:se[0])==null?void 0:de.prop],Ie=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ge=xt.value+"/"+(Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-3)),Oe=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ge}}),ye=(Z=(rt=Ie==null?void 0:Ie.data)==null?void 0:rt.result)==null?void 0:Z[0],I=(F=ye==null?void 0:ye.value)==null?void 0:F.pageData;if(I.compData=(me=I.compData)==null?void 0:me.map(fe=>((fe==null?void 0:fe.key)==="menuContents"&&(fe.contents=mo(fe.contents,ge==null?void 0:ge.split("/"),Qe)),fe)),await h.updateInsofDataApi({id:ye==null?void 0:ye.id,value:{pageData:I}}),(($e=(we=Oe==null?void 0:Oe.data)==null?void 0:we.result)==null?void 0:$e.length)>0)await Be.newLoadingConstruct(ge,xt.value+"/"+Qe);else{let fe=await h.getInsofDataApi({key:{pageKey:xt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Ze=(Le=fe==null?void 0:fe.data)==null?void 0:Le.result)==null?void 0:Ze.length)>=1?await Be.newLoadingCutFirstConstruct(xt.value+"/",xt.value+"/"+Qe):await Be.newLoadingCutFirstConstruct(xt.value,xt.value+"/"+Qe)}Rt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Rt.setIsRefreshMenus(!1),Rt.setIsRefreshMenus(!0),Rt.setActiveMenuPath((pe=(Xe=ge==null?void 0:ge.split("/"))==null?void 0:Xe.filter((fe,tt)=>{var Me;return tt!==((Me=ge==null?void 0:ge.split("/"))==null?void 0:Me.length)-1}))==null?void 0:pe.join("/"))}$t.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((Y=(R=n==null?void 0:n.column)==null?void 0:R[0])==null?void 0:Y.directiveLabel)==="#isMain"&&((ke=(Re=n==null?void 0:n.column)==null?void 0:Re[0])==null?void 0:ke.directiveColor)!==!0){let ue=(ne=n==null?void 0:n.singleContent)==null?void 0:ne[(re=(oe=n==null?void 0:n.column)==null?void 0:oe[0])==null?void 0:re.prop];if(Be.isNumber((Te=n==null?void 0:n.singleContent)==null?void 0:Te.id)){let Ae=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=await h.getInsofDataApi({id:(Ke=n==null?void 0:n.singleContent)==null?void 0:Ke.id}),Ie=(S=(A=(D=(v=(ut=Qe==null?void 0:Qe.data)==null?void 0:ut.result)==null?void 0:v[0])==null?void 0:D.value)==null?void 0:A.tableData)==null?void 0:S[(w=(H=n==null?void 0:n.column)==null?void 0:H[0])==null?void 0:w.prop],ge=xt.value+"/"+Ie,Oe=(z=(q=Ae==null?void 0:Ae.data)==null?void 0:q.result)==null?void 0:z[0],ye=(ce=Oe==null?void 0:Oe.value)==null?void 0:ce.pageData;ye.compData=(W=ye.compData)==null?void 0:W.map(I=>((I==null?void 0:I.key)==="menuContents"&&(I.contents=yo(I.contents,ge==null?void 0:ge.split("/"),Ie,ue)),I)),await h.updateInsofDataApi({id:Oe==null?void 0:Oe.id,value:{pageData:ye}}),Rt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Rt.setIsRefreshMenus(!1),Rt.setIsRefreshMenus(!0),Rt.setActiveMenuPath((Ee=(L=ge==null?void 0:ge.split("/"))==null?void 0:L.filter((I,fe)=>{var tt;return fe!==((tt=ge==null?void 0:ge.split("/"))==null?void 0:tt.length)-1}))==null?void 0:Ee.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let ue=[],Ae=[],Qe=((G=(te=n==null?void 0:n.content)==null?void 0:te[0])==null?void 0:G.id)??"",Ie=s==null?void 0:s.url,ge="",Oe="";if(Qe!==""&&((ee=n==null?void 0:n.content)==null?void 0:ee.length)>1&&typeof((be=(ie=n==null?void 0:n.content)==null?void 0:ie[0])==null?void 0:be.id)!="string"){const ye=await h.getInsofDataApi({id:Qe});ge=((Ne=(U=(Se=(_e=ye==null?void 0:ye.data)==null?void 0:_e.result)==null?void 0:Se[0])==null?void 0:U.key)==null?void 0:Ne.tableId)??"",Oe=((He=(lt=(Pe=(he=ye==null?void 0:ye.data)==null?void 0:he.result)==null?void 0:Pe[0])==null?void 0:lt.key)==null?void 0:He.pageKey)??""}(nt=n==null?void 0:n.singleContent)==null||nt.forEach(ye=>{let I={};for(let fe in ye)fe!=="id"&&fe!=="index"&&(I[fe]=ye[fe]);typeof(ye==null?void 0:ye.id)=="number"?ue.push({id:ye==null?void 0:ye.id,value:{tableData:I}}):Ae.push({key:{type:i,pageKey:Ie||Oe||xt.value,tableId:ge||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:I}})}),(Ae==null?void 0:Ae.length)>0&&await h.batchAddInsofDataApi({dataList:Ae}),(ue==null?void 0:ue.length)>0&&await h.batchUpdateInsofDataApi({dataList:ue})}else{let ue={},Ae=(Fe=n==null?void 0:n.singleContent)==null?void 0:Fe.id;for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(ue[Qe]=n==null?void 0:n.singleContent[Qe]);await Be.fixTableContents(i,r,n==null?void 0:n.index,Ae,sessionStorage.getItem("systemKey"),Object.values(ue),n==null?void 0:n.column,n)}$t.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);$t.setTableLoading(!1),(ht=n==null?void 0:n.column)!=null&&ht.some(ue=>ue==null?void 0:ue.isMainKey)||(kt.value=await Be.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value),kt.value=(at=kt.value)==null?void 0:at.filter(ue=>{var Ae;return((Ae=ue==null?void 0:ue.compData)==null?void 0:Ae.length)>0}),kt.value=(et=kt.value)==null?void 0:et.filter(ue=>(ue==null?void 0:ue.comp)!==""),kt.value=Be.getDeepDiffItems(kt.value)),ko.value&&(n==null?void 0:n.buttonName)!=="删除"&&$t.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await h.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,k;if(Ln.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 Be.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(k=s==null?void 0:s.pageData)==null?void 0:k.isShow}),i&&(Rt.setActiveMenuPath(null),Rt.setActiveMenuPath(i))},Yn=async n=>{kt.value=Be.getDeepDiffItems(n),$t.setItemData(kt.value),$t.setOriginalData(kt.value)},cd=async n=>{var i;await e.nextTick(),(i=Xu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,k,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((O,P)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>P&&(i=i===""?i+O:i+"/"+O)}),(k=n==null?void 0:n.split("/"))==null||k.forEach((O,P)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>P&&(s=s===""?s+O:s+"/"+O)}),i=i+"/",s=s+"/";let r=await h.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await h.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,P,J,M,xe,X,j,le,C,$,y,B,E,ve,Ye,ct,ze,We;const i=(_=(x=Kn.value)==null?void 0:x[n])==null?void 0:_.filter(De=>{var V;return((V=De==null?void 0:De.key)==null?void 0:V.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(P=(O=i==null?void 0:i.find(De=>{var V,Q,se;return(se=(Q=(V=De==null?void 0:De.value)==null?void 0:V.tableData)==null?void 0:Q.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:O.value)==null?void 0:P.tableData;if(!s)return Ba.value=null;const r=(xe=(M=(J=i==null?void 0:i.find(De=>{var V,Q,se;return(se=(Q=(V=De==null?void 0:De.value)==null?void 0:V.tableData)==null?void 0:Q.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:xe.compId,d=(X=kt.value)==null?void 0:X.find(De=>(De==null?void 0:De.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((j=s==null?void 0:s.任务关键词)==null?void 0:j.length)-1],k=(y=($=(C=d==null?void 0:d.compData)==null?void 0:C.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(De=>(De==null?void 0:De.prop)===u),g=(Ye=(ve=(E=(B=d==null?void 0:d.compData)==null?void 0:B.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:E.contents)==null?void 0:ve.find(De=>De==null?void 0:De.isMainKey))==null?void 0:Ye.prop,f=(We=(ze=(ct=d==null?void 0:d.compData)==null?void 0:ct.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:ze.contents)==null?void 0:We[k];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("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(i=(n=xt.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Vr=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=xt.value)!=null&&n.includes(eo.value)))return;const d=(i=kt.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:"编制中"},k=(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=k==null?void 0:k.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)&&$t.setLockingPage(xt.value)}catch(d){throw h.ElMessage.error(d),new Error(d)}},bo=e.ref([]),hd=e.computed(()=>{var n,i;return(i=(n=Kn.value)==null?void 0:n[xt.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],()=>{pa.setSelectTitle([]),pa.setChooseTitle([])},{deep:!0});const vd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(k=>{var g,f,x;if((k==null?void 0:k.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(k==null?void 0:k.childMenus)&&((g=k==null?void 0:k.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(k==null?void 0:k.childMenus,_):s=(x=(f=k==null?void 0:k.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(()=>[xt.value,qu.value],async n=>{var u,k,g,f,x,_,O,P,J,M,xe,X,j,le,C,$,y,B,E,ve,Ye,ct,ze,We,De,V,Q,se,de,Je,rt,Z,F,me,we,$e,Le,Ze,Xe,pe,R,Y,Re,ke,oe,re,ne,Te,Ke,ut;if(!xt.value)return;$t.setLockingPage(""),kt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Un.value=!1,Ln.value=!0;const s=(k=n==null?void 0:n[0])!=null&&k.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 h.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Ir.value})).data.result)==null?void 0:f.filter(v=>{var D,A;return((D=v==null?void 0:v.key)==null?void 0:D.pageKey)!=="menu"&&((A=v==null?void 0:v.key)==null?void 0:A.pageKey)!=="secret"}))==null||x.forEach(v=>{r[v.key.pageKey]?r[v.key.pageKey]=[...r[v.key.pageKey],v]:r[v.key.pageKey]=[v]}),Wn.value=r,s){Rt.setContentLoading(!0),sessionStorage.setItem("pageKey",xt.value),pa.setSelectTitle([]),kt.value=await Be.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,r),ed.value=!!((_=kt.value)!=null&&_.find(A=>(A==null?void 0:A.comp)==="")),ga.value=(O=kt.value)==null?void 0:O.find(A=>(A==null?void 0:A.comp)==="");let v=[];if(!((P=ga.value)!=null&&P.compData)){let A=vd(Ju.value,(J=xt.value)==null?void 0:J.split("/")),H=await Be.getItemData(s+"/"+A,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,r);H!=null&&H.find(w=>(w==null?void 0:w.comp)==="")?v=(xe=(M=H==null?void 0:H.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:M.compData)==null?void 0:xe.split("/").map(w=>({value:w.trim(),condition:"parent"})):pa.setChooseTitle([])}if(((X=ga.value)==null?void 0:X.compData)===xt.value){let A=(j=xt.value)==null?void 0:j.split("/").map(H=>({value:H.trim()}));A=[...A,...ka.value??[]],pa.setSelectTitle(A)}else{let A=[],H=(C=(le=ga.value)==null?void 0:le.compData)==null?void 0:C.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!H||(H==null?void 0:H.length)===0)H=v;else{let q=await Be.getItemData(($=ga.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,r);q=q==null?void 0:q.filter(L=>{var Ee,te,G;return Array.isArray(L==null?void 0:L.compData)&&((G=(te=(Ee=L==null?void 0:L.compData)==null?void 0:Ee.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:te.contents)==null?void 0:G.find(ee=>(ee==null?void 0:ee.directiveLabel)==="#isMain"))});let z=(Ye=(ve=(E=(B=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:B.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:E.contents)==null?void 0:ve.find(L=>(L==null?void 0:L.directiveLabel)==="#isMain"))==null?void 0:Ye.prop,ce=(De=(We=(ze=(ct=q==null?void 0:q[0])==null?void 0:ct.compData)==null?void 0:ze.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:We.contents)==null?void 0:De.findIndex(L=>(L==null?void 0:L.directiveLabel)==="#isMain"),W=(de=(se=(Q=(V=q==null?void 0:q[0])==null?void 0:V.compData)==null?void 0:Q.find(L=>(L==null?void 0:L.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:de.map(L=>{var Ee;return(L==null?void 0:L.length)>1?L==null?void 0:L[ce+1]:(Ee=L==null?void 0:L[0])==null?void 0:Ee[z]});if(W=W==null?void 0:W.map(L=>({label:L,value:L})),((Je=ka.value)==null?void 0:Je.length)===0&&pa.setChooseTitle([{value:"",condition:"child",options:W,parentContent:(rt=ga.value)==null?void 0:rt.compData}]),((F=(Z=ka.value)==null?void 0:Z[0])==null?void 0:F.value)!==""){let L=await Be.getItemData(xt.value+"/"+((we=(me=ka.value)==null?void 0:me[0])==null?void 0:we.value),sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,r);L||(await Be.newLoadingCutFirstConstruct(xt.value,xt.value+"/"+((Le=($e=ka.value)==null?void 0:$e[0])==null?void 0:Le.value)),L=await Be.getItemData(xt.value+"/"+((Xe=(Ze=ka.value)==null?void 0:Ze[0])==null?void 0:Xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value)),kt.value=L}}(H==null?void 0:H.length)>0&&((R=(pe=ka.value)==null?void 0:pe[0])==null?void 0:R.value)===""&&(kt.value=[]),A=[...A,...H??[]],A=[...A,...ka.value??[]];let w=(Y=xt.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(A!=null&&A.find(z=>(z==null?void 0:z.value)===(q==null?void 0:q.value))));A=[...A,...S],pa.setSelectTitle(A)}kt.value=(Re=kt.value)==null?void 0:Re.filter(A=>(A==null?void 0:A.comp)!=="");let D="";if(!kt.value){let A=(oe=(ke=s==null?void 0:s.split("/"))==null?void 0:ke.filter((H,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:oe.join("/");kt.value=await Be.getItemData(A,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,r),D=(ne=s==null?void 0:s.split("/"))==null?void 0:ne[((re=s==null?void 0:s.split("/"))==null?void 0:re.length)-1]}await an.setLogRecordAsync({type:"查询",data:kt.value},xt.value),D!==""&&(kt.value=(Te=kt.value)==null?void 0:Te.map(A=>{var H;return A!=null&&A.isShow&&(A.compData=(H=A==null?void 0:A.compData)==null?void 0:H.map(w=>{var S,q,z,ce,W;if((w==null?void 0:w.key)==="tableContents"){let L=[],Ee="";Ee=(ce=(z=(q=(S=A==null?void 0:A.compData)==null?void 0:S.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0])==null?void 0:ce.prop,L=(W=w.contents)==null?void 0:W.filter(te=>(te==null?void 0:te[Ee])===D||(te==null?void 0:te[1])===D),w.contents=L}return w})),A})),kt.value=Be.getDeepDiffItems(kt.value),await cd(kt.value),Vr(),pd(s),bo.value=(Ke=kt.value)==null?void 0:Ke.map(A=>({label:A==null?void 0:A.name,value:A==null?void 0:A.id})),$t.setExtraContents([]),pa.setSelectIndex(""),pa.setSelectMenu(""),$t.setItemData(kt.value),$t.setOriginalData(kt.value),$t.setCurStructureCompIds((ut=kt.value)==null?void 0:ut.map(A=>A==null?void 0:A.id)),$t.setRefreshCurStructure(!1),Rt.setChildMenu(""),Rt.setContentLoading(!1),$t.setTableLoading(!1),Ln.value=!1}else kt.value=[],Ln.value=!1;e.nextTick(()=>{fn.value=fn.value++,Un.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,k,g,f,x,_,O,P,J,M;if(Po.value){let xe=new WeakMap;(i=(n=(await h.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Ir.value})).data.result)==null?void 0:n.filter(y=>{var B,E;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{xe[y.key.pageKey]?xe[y.key.pageKey]=[...xe[y.key.pageKey],y]:xe[y.key.pageKey]=[y]});let j=xt.value;(s=ga.value)!=null&&s.compData&&((r=ga.value)==null?void 0:r.compData)!==xt.value&&(j=j+"/"+((u=(d=ka.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(k=xt.value)==null?void 0:k[0])!=null&&g.startsWith("/")?(x=(f=xt.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=xt.value)==null?void 0:_[0];let C=await Be.getItemData(j,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value),$="";if(!kt.value){let y=(P=(O=le==null?void 0:le.split("/"))==null?void 0:O.filter((B,E)=>{var ve;return E!==((ve=le==null?void 0:le.split("/"))==null?void 0:ve.length)-1}))==null?void 0:P.join("/");C=await Be.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,xe),$=(M=le==null?void 0:le.split("/"))==null?void 0:M[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(C=C==null?void 0:C.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(E=>{var ve,Ye,ct,ze,We;if((E==null?void 0:E.key)==="tableContents"){let De=[],V="";V=(ze=(ct=(Ye=(ve=y==null?void 0:y.compData)==null?void 0:ve.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Ye.contents)==null?void 0:ct[0])==null?void 0:ze.prop,De=(We=E.contents)==null?void 0:We.filter(Q=>(Q==null?void 0:Q[V])===$||(Q==null?void 0:Q[1])===$),E.contents=De}return E})),y})),C=C==null?void 0:C.filter(y=>(y==null?void 0:y.comp)!==""),kt.value=Be.getDeepDiffItems(C),$t.setFreshContent(!1),Vr()}},{deep:!0});const gd=async()=>{var d,u,k,g,f,x,_,O;Rt.setLinkMenuInfo(null);const n=await h.getInsofDataApi({keyLikes:{pageKey:`loading${((d=An.value)==null?void 0:d.account)||((u=An.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await h.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((k=An.value)==null?void 0:k.account)||((g=An.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(P=>P==null?void 0:P.id);const r=(O=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:O.map(P=>P==null?void 0:P.id);s=[...h.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(P=>P!==null&&P))&&(await h.batchDeleteInsofDataApi({ids:s}),await an.setLogRecordAsync({type:"删除",data:s},xt.value)),Rt.setActiveMenuPath(Gu.value),kt.value=null,$t.setRouteToChildPath(""),Rt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Or=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Rt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Mr=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=>{Ar.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=kt.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,P;const s=i?n:n-2,r=(f=kt.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)!=="操作"),k=u===-1?0:u,g=(P=(O=r==null?void 0:r.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:P.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[k+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,k;const i=n+1;if(i>1&&((d=(r=(s=kt.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=kt.value)==null?void 0:u[n]):h.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(k=kt.value)==null?void 0:k[n]},ko=e.computed(()=>{var n,i;return(i=(n=Nr.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>ko.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Cd=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(()=>h.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:P}=O;return P==="baseConfig"});return x==null?void 0:x.contents}),k=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(O=>{const{key:P}=O;return P==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=h.cloneDeep(k.value)||[];const _=x.length;let O=0;const P=[];if(x=x.map(J=>{const M=J.span;return M?(J.span=Number(M),O=O+J.span):P.push(J),J}),O<24){const J=Math.floor((24-O)/_);P.forEach(M=>{M.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const O=e.resolveComponent("el-col"),P=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(P,{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,xe)=>(e.openBlock(),e.createBlock(O,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(M.comp)),{key:e.unref(fn),compName:M.name,index:(M==null?void 0:M.id)??xe,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"])])}}}),Dd=zt._export_sfc(Cd,[["__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(()=>{xe()});const d=e.ref({}),u=e.ref({}),k=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}],P=e.computed(()=>{const y=s==null?void 0:s.itemContents;return h.cloneDeep(y)}),J=e.computed(()=>{const y=P==null?void 0:P.value,B=y==null?void 0:y.find(E=>{const{key:ve}=E;return ve==="baseConfig"});return B==null?void 0:B.contents}),M=e.computed(()=>{const y=P==null?void 0:P.value,B=y==null?void 0:y.find(E=>{const{key:ve}=E;return ve==="children"});return B==null?void 0:B.contents}),xe=()=>{var y;d.value=P.value||{},x.value=(M==null?void 0:M.value)||[],k.value=g(),k.value=(y=k.value)==null?void 0:y.map(B=>{var ve;const{prop:E}=B;return B.value=(ve=J.value)==null?void 0:ve[E],B})};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(B=>O(B))},{immediate:!0});const X=(y,B)=>{const E=h.cloneDeep(M==null?void 0:M.value);E[B].span=y.span,x.value=E,r("change",$(),!0)},j=y=>on(y),le=(y,B,E)=>{if(!y)return;const ve=h.cloneDeep(M==null?void 0:M.value);ve[E]&&(ve[E].compData=y,x.value=ve,r("change",$(),!0))},C=y=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=h.cloneDeep(M==null?void 0:M.value);B=B==null?void 0:B.filter((E,ve)=>y!==ve),x.value=B,r("change",$(),!0),h.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,B)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Vt.ssForm,{rowContents:k.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ve=>f(ve))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:ve,index:Ye})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ve.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(ct=>C(Ye),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ve,index:Ye})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Vt.ssForm,{rowContents:_.value[Ye],key:Ye,isEnableWrap:!0,onChange:ct=>X(ct,Ye)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(ve.comp+"Operate")),{itemContents:ve==null?void 0:ve.compData,originalItemContents:ve.compData,onChange:ct=>le(ct,ve,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 ca(n){return n==null}function Lr(){}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 zd(){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 Lr;const s=(...u)=>{n(...u)};if(i<=0)return Rr(s);let r=0,d;return function(...u){const k=Date.now(),g=k-r;clearTimeout(d),g>=i?(r=k,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Fd(n,i=100){if(typeof n!="function")return Lr;const s=(...d)=>{n(...d)};if(i<=0)return Rr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Rr(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 wn=new Set,Pr=new WeakMap;function Ld(){wn.forEach(n=>{n(...Pr.get(n))}),wn.clear()}function ea(n,...i){if(typeof n!="function")return n;Pr.set(n,i),!wn.has(n)&&(wn.add(n),wn.size===1&&Promise.resolve().then(Ld))}const $r=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 Kr(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=Wr(n),d=Hr(n),u=Array(n.length);for(let k=0,g=d.length;k<g;k++){let f=d[k];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 jd(n,i){const s=Wr(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(Kr(n[s],i))return n[s]}function Ur(n,i){return n.filter(s=>Kr(s,i))}function Wr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const k=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=Hr(n);f&&(x=x.reverse());const _=Ur(x,i);if(u&&_.length)return i.x=k,i.y=g,i.moved=!1,n;for(let O=0,P=_.length;O<P;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 Kd(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 Hr(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 k=n[d];for(let g=0;g<s.length;g++)if(typeof k[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(k.i===void 0||k.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof k.i!="number"&&typeof k.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(k.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(k.i),k.static!==void 0&&typeof k.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=Gr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const k=s[d];i>n[k]&&(r=k)}return r}function qr(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,k){if(i[r])return uo(i[r]);let g=n;const f=Gr(s),x=f.slice(f.indexOf(r));for(let _=0,O=x.length;_<O;_++){const P=x[_];if(i[P]){g=i[P];break}}return g=uo(g||[]),cn(jd(g,{cols:u}),k)}function Gr(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 xn={exports:{}},tp=xn.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 k(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,xe(l.key),l)}}function g(a,t,o){return t&&k(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=xe(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 P(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 P(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 xe(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},j=void 0,le=void 0;function C(a){j=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&&C(window);var y=function(a){return!!a&&d(a)==="object"},B=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:B,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&&B(a.splice)}};function ve(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 ct={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=ct.draggable,t.map.drag=ct,t.methodDict.drag="draggable",l.actions.drag=ct.defaults},listeners:{"interactions:before-action-move":ve,"interactions:action-resume":ve,"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:ve,move:Ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},ze=ct,We={init:function(a){var t=a;We.document=t.document,We.DocumentFragment=t.DocumentFragment||De,We.SVGElement=t.SVGElement||De,We.SVGSVGElement=t.SVGSVGElement||De,We.SVGElementInstance=t.SVGElementInstance||De,We.Element=t.Element||De,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||De,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 De(){}var V=We,Q={init:function(a){var t=V.Element,o=a.navigator||{};Q.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,Q.supportsPointerEvent=o.pointerEnabled!==!1&&!!V.PointerEvent,Q.isIOS=/iP(hone|od|ad)/.test(o.platform),Q.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),Q.isIe9=/MSIE 9/.test(o.userAgent),Q.isOperaMobile=o.appName==="Opera"&&Q.supportsTouch&&/Presto/.test(o.userAgent),Q.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",Q.pEventTypes=Q.supportsPointerEvent?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,Q.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=Q;function de(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(Z(a,t))return a;a=rt(a)}return null}function rt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Z(a,t){return le!==j&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var F=function(a){return a.parentNode||a.host};function me(a,t){for(var o,l=[],c=a;(o=F(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function we(a,t,o){for(;E.element(a);){if(Z(a,t))return!0;if((a=rt(a))===o)return Z(a,t)}return!1}function $e(a){return a.correspondingUseElement||a}function Le(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 Ze(a){var t,o=Le(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 Xe(a){for(var t=[];a;)t.push(a),a=rt(a);return t}function pe(a){return!!E.string(a)&&(V.document.querySelector(a),!0)}function R(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?rt(o):a==="self"?t.getRect(o):Je(o,a)}function Re(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=Ze(c)),c}function ke(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function oe(a){return!a||"x"in a&&"y"in a||((a=R({},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 re(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 ne(a,t,o){var l=o&&a.options[o];return ke(Re(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Te(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Ke(a)),E.array(a))return a.forEach(function(T){return Te(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];Te(a,m,o,l)}else if(E.object(t))for(var b in t)Te(Ke(b).map(function(T){return"".concat(a).concat(T)}),t[b],o,l);return l}function Ke(a){return a.trim().split(/ +/)}var ut=function(a,t){return Math.sqrt(a*a+t*t)},v=["webkit","moz"];function D(a,t){a.__set||(a.__set={});var o=function(c){if(v.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function A(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 H(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 ce(a,t,o){var l=t.length>1?L(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 W(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 L(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 Ee(a){if(!a.length)return null;var t=W(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 te(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ut(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=W(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ee(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 ie(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[$e(t?t[0]:a.target),$e(a.currentTarget)]}var be=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(be.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _e=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Se=function(a){return _e([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ne=function(a,t){return a[U(a,t)]},he=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 b=p==="dragleave"?l.prev:l.cur,T=b.element,K=b.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=K,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 K=T.dropzone,N=T.element;return K===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var b=new o(c,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}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}(be);function Pe(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 b=[],T=0,K=p.interactables.list;T<K.length;T++){var N=K[T];if(N.options.drop.enabled){var ae=N.options.drop.accept;if(!(E.element(ae)&&ae!==m||E.string(ae)&&!Z(m,ae)||E.func(ae)&&!ae({dropzone:N,draggableElement:m})))for(var Ce=0,Ue=N.getAllElements();Ce<Ue.length;Ce++){var je=Ue[Ce];je!==m&&b.push({dropzone:N,element:je,rect:N.getRect(je)})}}}return b}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function He(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],b=0,T=l.activeDrops;b<T.length;b++){var K=T[b],N=K.dropzone,ae=K.element,Ce=K.rect,Ue=N.dropCheck(t,o,c,p,ae,Ce);m.push(Ue?ae:null)}var je=function(Ge){for(var st,ot,vt,Ct=[],Tt=0;Tt<Ge.length;Tt++){var yt=Ge[Tt],Dt=Ge[st];if(yt&&Tt!==st)if(Dt){var Qt=F(yt),Kt=F(Dt);if(Qt!==yt.ownerDocument)if(Kt!==yt.ownerDocument)if(Qt!==Kt){Ct=Ct.length?Ct:me(Dt);var sa=void 0;if(Dt instanceof V.HTMLElement&&yt instanceof V.SVGElement&&!(yt instanceof V.SVGSVGElement)){if(yt===Kt)continue;sa=yt.ownerSVGElement}else sa=yt;for(var va=me(sa,Dt.ownerDocument),Ea=0;va[Ea]&&va[Ea]===Ct[Ea];)Ea++;var Nn=[va[Ea-1],va[Ea],Ct[Ea]];if(Nn[0])for(var yn=Nn[0].lastChild;yn;){if(yn===Nn[1]){st=Tt,Ct=va;break}if(yn===Nn[2])break;yn=yn.previousSibling}}else vt=Dt,(parseInt($(ot=yt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt($(vt).getComputedStyle(vt).zIndex,10)||0)&&(st=Tt);else st=Tt}else st=Tt}return st}(m);return l.activeDrops[je]||null}function nt(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 he(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new he(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 he(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 he(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new he(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new he(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Fe(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&&Pe(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,b=He(o,m,c);p.rejected=p.rejected&&!!b&&b.dropzone===p.cur.dropzone&&b.element===p.cur.element,p.cur.dropzone=b&&b.dropzone,p.cur.element=b&&b.element,p.events=nt(o,0,m)}}var at={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(ze),l.prototype.dropzone=function(p){return function(m,b){if(E.object(b)){if(m.options.drop.enabled=b.enabled!==!1,b.listeners){var T=Te(b.listeners),K=Object.keys(T).reduce(function(ae,Ce){return ae[/^(enter|leave)/.test(Ce)?"drag".concat(Ce):/^(activate|deactivate|move)/.test(Ce)?"drop".concat(Ce):Ce]=T[Ce],ae},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(K),m.options.drop.listeners=K}return E.func(b.ondrop)&&m.on("drop",b.ondrop),E.func(b.ondropactivate)&&m.on("dropactivate",b.ondropactivate),E.func(b.ondropdeactivate)&&m.on("dropdeactivate",b.ondropdeactivate),E.func(b.ondragenter)&&m.on("dragenter",b.ondragenter),E.func(b.ondragleave)&&m.on("dragleave",b.ondragleave),E.func(b.ondropmove)&&m.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?m.options.drop.overlap=b.overlap:E.number(b.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(m.options.drop.accept=b.accept),"checker"in b&&(m.options.drop.checker=b.checker),m}return E.bool(b)?(m.options.drop.enabled=b,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,b,T,K,N){return function(ae,Ce,Ue,je,Ge,st,ot){var vt=!1;if(!(ot=ot||ae.getRect(st)))return!!ae.options.drop.checker&&ae.options.drop.checker(Ce,Ue,vt,ae,st,je,Ge);var Ct=ae.options.drop.overlap;if(Ct==="pointer"){var Tt=ne(je,Ge,"drag"),yt=q(Ce);yt.x+=Tt.x,yt.y+=Tt.y;var Dt=yt.x>ot.left&&yt.x<ot.right,Qt=yt.y>ot.top&&yt.y<ot.bottom;vt=Dt&&Qt}var Kt=je.getRect(Ge);if(Kt&&Ct==="center"){var sa=Kt.left+Kt.width/2,va=Kt.top+Kt.height/2;vt=sa>=ot.left&&sa<=ot.right&&va>=ot.top&&va<=ot.bottom}return Kt&&E.number(Ct)&&(vt=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=Ct),ae.options.drop.checker&&(vt=ae.options.drop.checker(Ce,Ue,vt,ae,st,je,Ge)),vt}(this,p,m,b,T,K,N)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},R(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=at.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=nt(o,0,l),c.events.activate&&(Pe(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;Fe(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),Fe(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:He,getDropEvents:nt,fireDropEvents:Fe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},et=at;function ue(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(K){return K.pointer}),p=l==="start",m=l==="end",b=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=te(c,b),o.box=Ee(c),o.scale=1,o.ds=0,o.angle=G(c,b),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=te(c,b),o.box=Ee(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,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":ue,"interactions:action-move":ue,"interactions:action-end":ue,"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}},Qe=Ae;function Ie(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var b=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"?b:T)/2)),b<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var K=b>=0?p.left:p.right;return o.x<K+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(b>=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:we(l,t,c))}function ge(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 Oe,ye,I={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;I.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),I.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,b,T){return E.object(b)?(m.options.resize.enabled=b.enabled!==!1,m.setPerAction("resize",b),m.setOnEvents("resize",b),E.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?m.options.resize.axis=b.axis:b.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(b.preserveAspectRatio)?m.options.resize.preserveAspectRatio=b.preserveAspectRatio:E.bool(b.square)&&(m.options.resize.square=b.square),m):E.bool(b)?(m.options.resize.enabled=b,m):m.options.resize}(this,p,a)},t.map.resize=I,t.methodDict.resize="resizable",c.actions.resize=I.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:R({},p),corrected:R({},p),previous:R({},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),ge(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",b=l.rect,T=l._rects,K=T.start,N=T.corrected,ae=T.delta,Ce=T.previous;if(R(Ce,N),m){if(R(N,b),p==="reposition"){if(N.top>N.bottom){var Ue=N.top;N.top=N.bottom,N.bottom=Ue}if(N.left>N.right){var je=N.left;N.left=N.right,N.right=je}}}else N.top=Math.min(b.top,K.bottom),N.bottom=Math.max(b.bottom,K.top),N.left=Math.min(b.left,K.right),N.right=Math.max(b.right,K.left);for(var Ge in N.width=N.right-N.left,N.height=N.bottom-N.top,N)ae[Ge]=N[Ge]-Ce[Ge];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=ae}})(a),ge(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=R({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&b.mouseButtons)!=0)){if(E.object(b.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var K in T)T[K]=Ie(K,b.edges[K],m,t._latestPointer.eventTarget,l,c,b.margin||I.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 N=b.axis!=="y"&&m.x>c.right-I.defaultMargin,ae=b.axis!=="x"&&m.y>c.bottom-I.defaultMargin;(N||ae)&&(a.action={name:"resize",axes:(N?"x":"")+(ae?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=I.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",b=0,T=["top","bottom","left","right"];b<T.length;b++){var K=T[b];t[K]&&(m+=K)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},fe=I,tt={id:"actions",install:function(a){a.usePlugin(Qe),a.usePlugin(fe),a.usePlugin(ze),a.usePlugin(et)}},Me=0,qe={request:function(a){return Oe(a)},cancel:function(a){return ye(a)},init:function(a){if(Oe=a.requestAnimationFrame,ye=a.cancelAnimationFrame,!Oe)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];Oe=a["".concat(l,"RequestAnimationFrame")],ye=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}Oe=Oe&&Oe.bind(a),ye=ye&&ye.bind(a),Oe||(Oe=function(c){var p=Date.now(),m=Math.max(0,16-(p-Me)),b=a.setTimeout(function(){c(p+m)},m);return Me=p+m,b},ye=function(c){return clearTimeout(c)})}},Ve={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){Ve.isScrolling=!0,qe.cancel(Ve.i),a.autoScroll=Ve,Ve.interaction=a,Ve.prevTime=Ve.now(),Ve.i=qe.request(Ve.scroll)},stop:function(){Ve.isScrolling=!1,Ve.interaction&&(Ve.interaction.autoScroll=null),qe.cancel(Ve.i)},scroll:function(){var a=Ve.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=pt(c.container,t,o),m=Ve.now(),b=(m-Ve.prevTime)/1e3,T=c.speed*b;if(T>=1){var K={x:Ve.x*T,y:Ve.y*T};if(K.x||K.y){var N=dt(p);E.window(p)?p.scrollBy(K.x,K.y):p&&(p.scrollLeft+=K.x,p.scrollTop+=K.y);var ae=dt(p),Ce={x:ae.x-N.x,y:ae.y-N.y};(Ce.x||Ce.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ce,interaction:a,container:p})}Ve.prevTime=m}Ve.isScrolling&&(qe.cancel(Ve.i),Ve.i=qe.request(Ve.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()&&Ve.check(t.interactable,t.prepared.name))if(t.simulation)Ve.x=Ve.y=0;else{var l,c,p,m,b=t.interactable,T=t.element,K=t.prepared.name,N=b.options[K].autoScroll,ae=pt(N.container,b,T);if(E.window(ae))m=o.clientX<Ve.margin,l=o.clientY<Ve.margin,c=o.clientX>ae.innerWidth-Ve.margin,p=o.clientY>ae.innerHeight-Ve.margin;else{var Ce=Le(ae);m=o.clientX<Ce.left+Ve.margin,l=o.clientY<Ce.top+Ve.margin,c=o.clientX>Ce.right-Ve.margin,p=o.clientY>Ce.bottom-Ve.margin}Ve.x=c?1:m?-1:0,Ve.y=p?1:l?-1:0,Ve.isScrolling||(Ve.margin=N.margin,Ve.speed=N.speed,Ve.start(t))}}};function pt(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function dt(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var it={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Ve,Ve.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ve.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Ve.stop(),Ve.interaction&&(Ve.interaction=null)},"interactions:stop":Ve.stop,"interactions:action-move":function(a){return Ve.onInteractionMove(a)}}},ft=it;function mt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Bt(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 At(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(b,T,K,N,ae){var Ce=b.getRect(N),Ue=T.buttons||{0:1,1:4,3:8,4:16}[T.button],je={action:null,interactable:b,interaction:K,element:N,rect:Ce,buttons:Ue};return ae.fire("auto-start:check",je),je.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=mt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=mt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=At,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 bt(a,t,o,l,c,p,m){for(var b=0,T=l.length;b<T;b++){var K=l[b],N=c[b],ae=K.getAction(t,o,a,N);if(ae){var Ce=Ft(ae,K,N,p,m);if(Ce)return{action:Ce,interactable:K,element:N}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],b=l;function T(N){p.push(N),m.push(b)}for(;E.element(b);){p=[],m=[],c.interactables.forEachMatch(b,T);var K=bt(a,t,o,p,m,l,c);if(K.action&&!K.interactable.options[K.action.name].manualStart)return K;b=rt(b)}return{action:null,interactable:null,element:null}}function Xt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Bt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Va(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,b=l.autoStart.maxInteractions,T=0,K=0,N=0;if(!(p&&m&&b))return!1;for(var ae=0,Ce=l.interactions.list;ae<Ce.length;ae++){var Ue=Ce[ae],je=Ue.prepared.name;if(Ue.interacting()&&(++T>=b||Ue.interactable===a&&((K+=je===o.name?1:0)>=p||Ue.element===t&&(N++,je===o.name&&N>=m))))return!1}return b>0}function Aa(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function xa(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 Va(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)}xa(a.element,p||"",t)}else t.autoStart.cursorElement&&xa(t.autoStart.cursorElement,"",t)}var $a={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,R(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Aa(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()||Xt(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,b=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Xt(c,Ht(c,p,m,b,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),Va(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&xa(o.element,"",t)}},maxInteractions:Aa,withinInteractionLimit:Ot,validateAction:Ft},wa=$a,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),b=Math.abs(p),T=o.interactable.options.drag,K=T.startAxis,N=m>b?"x":m<b?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&K!=="xy"&&K!==N){o.prepared.name=null;for(var ae=l,Ce=function(je){if(je!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&je.testIgnoreAllow(Ge,ae,l)){var st=je.getAction(o.downPointer,o.downEvent,o,ae);if(st&&st.name==="drag"&&function(ot,vt){if(!vt)return!1;var Ct=vt.options.drag.startAxis;return ot==="xy"||Ct==="xy"||Ct===ot}(N,je)&&wa.validateAction(st,je,ae,l,t))return je}}};E.element(ae);){var Ue=t.interactables.forEachMatch(ae,Ce);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=ae;break}ae=rt(ae)}}}}}};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 Ka={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(wa),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=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},Ua=Ka,Wa={id:"auto-start",install:function(a){a.usePlugin(wa),a.usePlugin(Ua),a.usePlugin(ja)}},Ha=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 qa(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Oa={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Ha,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 b=$(p.target).document,T=c.getDocOptions(b);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Z(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||de(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=qa,a},{})};function ma(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 ua(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=ua(l):E.array(l)?t[o]=Se(l):t[o]=l}return t}var Da=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=ya(),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,b=function(K){var N=K.interactable.options[K.prepared.name],ae=N.modifiers;return ae&&ae.length?ae:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ce){var Ue=N[Ce];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(Ce){return!!Ce})}(m);this.prepareStates(b),this.startEdges=R({},m.edges),this.edges=R({},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=ya(),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=R({},t.pageCoords),t.rect=R({},p),t.edges=R({},m);for(var b=c?this.states.slice(c):this.states,T=ya(t.coords,t.rect),K=0;K<b.length;K++){var N,ae=b[K],Ce=ae.options,Ue=R({},t.coords),je=null;(N=ae.methods)!=null&&N.set&&this.shouldDo(Ce,l,o)&&(t.state=ae,je=ae.methods.set(t),re(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),T.eventProps.push(je)}R(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 Ge=this.result.coords,st=this.result.rect;if(Ge&&st){var ot=T.rect.left!==st.left||T.rect.right!==st.right||T.rect.top!==st.top||T.rect.bottom!==st.bottom;T.changed=ot||Ge.x!==T.coords.x||Ge.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,b=this.startDelta,T=m.delta;l==="start"&&R(this.startDelta,m.delta);for(var K=0,N=[[p,b],[c,T]];K<N.length;K++){var ae=N[K],Ce=ae[0],Ue=ae[1];Ce.page.x+=Ue.x,Ce.page.y+=Ue.y,Ce.client.x+=Ue.x,Ce.client.y+=Ue.y}var je=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=je.left,Ge.right+=je.right,Ge.top+=je.top,Ge.bottom+=je.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.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 b=o.coords.cur.page,T={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.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 b=c[m];t.state=b;var T=b.options,K=b.methods,N=K.beforeEnd&&K.beforeEnd(t);if(N)return this.endResult=N,!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=R({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,b=p.result,T=b.delta,K=b.rectDelta,N=0,ae=[[l.start,m],[l.cur,T]];N<ae.length;N++){var Ce=ae[N],Ue=Ce[0],je=Ce[1];Ue.page.x-=je.x,Ue.page.y-=je.y,Ue.client.x-=je.x,Ue.client.y-=je.y}c.left-=K.left,c.right-=K.right,c.top-=K.top,c.bottom-=K.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 ua(o)}),this.result=ya(R({},t.result.coords),R({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ya(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ta(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 b in m.enabled=m.enabled!==!1,o)b in m||(m[b]=o[b]);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 fa(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Ga={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new Da(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,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":fa,"interactions:action-move":fa,"interactions:action-end":fa,"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=Ga,Yt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},gt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,b,T,K){var N;u(this,o),(N=t.call(this,l)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,b=b||l.element;var ae=l.interactable,Ce=(ae&&ae.options||Yt).deltaSource,Ue=ne(ae,b,p),je=m==="start",Ge=m==="end",st=je?P(N):l.prevEvent,ot=je?l.coords.start:Ge?{page:st.page,client:st.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=R({},ot.page),N.client=R({},ot.client),N.rect=R({},l.rect),N.timeStamp=ot.timeStamp,Ge||(N.page.x-=Ue.x,N.page.y-=Ue.y,N.client.x-=Ue.x,N.client.y-=Ue.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=b,N.currentTarget=b,N.preEnd=T,N.type=K||p+(m||""),N.interactable=ae,N.t0=je?l.pointers[l.pointers.length-1].downTime:st.t0,N.x0=l.coords.start.page.x-Ue.x,N.y0=l.coords.start.page.y-Ue.y,N.clientX0=l.coords.start.client.x-Ue.x,N.clientY0=l.coords.start.client.y-Ue.y,N.delta=je||Ge?{x:0,y:0}:{x:N[Ce].x-st[Ce].x,y:N[Ce].y-st[Ce].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=R({},l.coords.velocity[Ce]),N.speed=ut(N.velocity.x,N.velocity.y),N.swipe=Ge||m==="inertiastart"?N.getSwipe():null,N}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}(be);Object.defineProperties(gt.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 hn=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}({}),la=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),_a=0,aa=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=mt(function(N){this.move(N)},"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=_a++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var b in Mt)m(b);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var K in la)T(K);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)&&(Bt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?R({},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=ut(c,p)>this.pointerMoveTolerance);var b,T,K,N=this.getPointerIndex(t),ae={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(b=this.coords.velocity,T=this.coords.delta,K=Math.max(T.timeStamp/1e3,.001),b.page.x=T.page.x/K,b.page.y=T.page.y/K,b.client.x=T.client.x/K,b.client.y=T.client.y/K,b.timeStamp=K),this._scopeFire("interactions:move",ae),m||this.simulation||(this.interacting()&&(ae.type=null,this.move(ae)),this.pointerWasMoved&&A(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||H(this.coords.delta),(t=R({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,b,T=z(t),K=this.getPointerIndex(t),N=this.pointers[K];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new hn(T,t,o,null,null),K=this.pointers.length,this.pointers.push(N)),ce(this.coords.cur,this.pointers.map(function(ae){return ae.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,b=this.coords.cur,p.page.x=b.page.x-m.page.x,p.page.y=b.page.y-m.page.y,p.client.x=b.client.x-m.client.x,p.client.y=b.client.y-m.client.y,p.timeStamp=b.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,D(this.downPointer,t),this.interacting()||(A(this.coords.start,this.coords.cur),A(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:N,pointerIndex:K,interaction:this}),K}},{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 gt(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"&&(re(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 b=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ha(a){Jt(a.interaction)}function Jt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return St(a.coords.cur,t),St(a.coords.delta,t),re(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Ma(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 St(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}la.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Ma},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&&(St(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ha,"interactions:before-action-move":ha,"interactions:before-action-end":function(a){var t=a.interaction;if(Jt(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}}},na=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=Nt(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ut(c.x,c.y),m=this.modification||(this.modification=new Da(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=Nt(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,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(b),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=qe.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,b,T=this,K=this.interaction,N=Nt(K).resistance,ae=(K._now()-this.t0)/1e3;if(ae<this.te){var Ce,Ue=1-(Math.exp(-N*ae)-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(b=Ue,t,l,p),y:Wt(b,o,c,m)}):Ce={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var je={x:Ce.x-this.currentOffset.x,y:Ce.y-this.currentOffset.y};this.currentOffset.x+=je.x,this.currentOffset.y+=je.y,K.offsetBy(je),K.move(),this.onNextFrame(function(){return T.inertiaTick()})}else K.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=Nt(o).smoothEndDuration;if(l<c){var p={x:Lt(l,0,this.targetOffset.x,c),y:Lt(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"}),A(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,qe.cancel(this.timeout)}}]),a}();function Nt(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(na),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=rt(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":fa,"interactions:action-inertiastart":fa,"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 Lt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ia=Ut;function oa(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=R({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&oa(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&oa(t,o)}},{key:"on",value:function(t,o){var l=Te(t,o);for(t in l)this.types[t]=_e(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=Te(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 b=m[p],T=c.indexOf(b);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Xa=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,D(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 Ya(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var En={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:b,addDelegate:function(N,ae,Ce,Ue,je){var Ge=Fa(je);if(!l[Ce]){l[Ce]=[];for(var st=0;st<c.length;st++){var ot=c[st];m(ot,Ce,T),m(ot,Ce,K,!0)}}var vt=l[Ce],Ct=Ne(vt,function(Tt){return Tt.selector===N&&Tt.context===ae});Ct||(Ct={selector:N,context:ae,listeners:[]},vt.push(Ct)),Ct.listeners.push({func:Ue,options:Ge})},removeDelegate:function(N,ae,Ce,Ue,je){var Ge,st=Fa(je),ot=l[Ce],vt=!1;if(ot)for(Ge=ot.length-1;Ge>=0;Ge--){var Ct=ot[Ge];if(Ct.selector===N&&Ct.context===ae){for(var Tt=Ct.listeners,yt=Tt.length-1;yt>=0;yt--){var Dt=Tt[yt];if(Dt.func===Ue&&Ya(Dt.options,st)){Tt.splice(yt,1),Tt.length||(ot.splice(Ge,1),b(ae,Ce,T),b(ae,Ce,K,!0)),vt=!0;break}}if(vt)break}}},delegateListener:T,delegateUseCapture:K,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,ae,Ce,Ue){if(N.addEventListener){var je=Fa(Ue),Ge=Ne(o,function(st){return st.eventTarget===N});Ge||(Ge={eventTarget:N,events:{}},o.push(Ge)),Ge.events[ae]||(Ge.events[ae]=[]),Ne(Ge.events[ae],function(st){return st.func===Ce&&Ya(st.options,je)})||(N.addEventListener(ae,Ce,p.supportsOptions?je:je.capture),Ge.events[ae].push({func:Ce,options:je}))}}function b(N,ae,Ce,Ue){if(N.addEventListener&&N.removeEventListener){var je=U(o,function(Qt){return Qt.eventTarget===N}),Ge=o[je];if(Ge&&Ge.events)if(ae!=="all"){var st=!1,ot=Ge.events[ae];if(ot){if(Ce==="all"){for(var vt=ot.length-1;vt>=0;vt--){var Ct=ot[vt];b(N,ae,Ct.func,Ct.options)}return}for(var Tt=Fa(Ue),yt=0;yt<ot.length;yt++){var Dt=ot[yt];if(Dt.func===Ce&&Ya(Dt.options,Tt)){N.removeEventListener(ae,Ce,p.supportsOptions?Tt:Tt.capture),ot.splice(yt,1),ot.length===0&&(delete Ge.events[ae],st=!0);break}}}st&&!Object.keys(Ge.events).length&&o.splice(je,1)}else for(ae in Ge.events)Ge.events.hasOwnProperty(ae)&&b(N,ae,"all")}}function T(N,ae){for(var Ce=Fa(ae),Ue=new Xa(N),je=l[N.type],Ge=ie(N)[0],st=Ge;E.element(st);){for(var ot=0;ot<je.length;ot++){var vt=je[ot],Ct=vt.selector,Tt=vt.context;if(Z(st,Ct)&&de(Tt,Ge)&&de(Tt,st)){var yt=vt.listeners;Ue.currentTarget=st;for(var Dt=0;Dt<yt.length;Dt++){var Qt=yt[Dt];Ya(Qt.options,Ce)&&Qt.func(Ue)}}}st=rt(st)}}function K(N){return T(N,!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 b=m[p],T=l;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;T;){if(T===b.element)return b;T=rt(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,b=p.interactions.list;m<b.length;m++){var T=b[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 K=0,N=p.interactions.list;K<N.length;K++){var ae=N[K];if(!(ae.pointerType!==l||/down/i.test(c)&&ae.simulation))return ae}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,da=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Ja(a,t){return function(o){var l=t.interactions.list,c=ee(o),p=ie(o),m=p[0],b=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var K=0,N=o.changedTouches;K<N.length;K++){var ae=N[K],Ce={pointer:ae,pointerId:z(ae),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:b,scope:t},Ue=sn(Ce);T.push([Ce.pointer,Ce.eventTarget,Ce.curEventTarget,Ue])}}else{var je=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<l.length&&!je;Ge++)je=l[Ge].pointerType!=="mouse"&&l[Ge].pointerIsDown;je=je||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!je){var st={pointer:o,pointerId:z(o),pointerType:c,eventType:o.type,curEventTarget:b,eventTarget:m,scope:t},ot=sn(st);T.push([st.pointer,st.eventTarget,st.curEventTarget,ot])}}for(var vt=0;vt<T.length;vt++){var Ct=T[vt],Tt=Ct[0],yt=Ct[1],Dt=Ct[2];Ct[3][a](Tt,o,yt,Dt)}}}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 ra(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,b=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)b(o,T,m.delegateListener),b(o,T,m.delegateUseCapture,!0);for(var K=c&&c.events,N=0;N<p.length;N++){var ae=p[N];b(o,ae.type,ae.listener,K)}}var Sn={id:"core/interactions",install:function(a){for(var t={},o=0;o<da.length;o++){var l=da[o];t[l]=Ja(l,a)}var c,p=se.pEventTypes;function m(){for(var b=0,T=a.interactions.list;b<T.length;b++){var K=T[b];if(K.pointerIsDown&&K.pointerType==="touch"&&!K._interacting)for(var N=function(){var Ue=Ce[ae];a.documents.some(function(je){return de(je.doc,Ue.downTarget)})||K.removePointer(Ue.pointer,Ue.event)},ae=0,Ce=K.pointers;ae<Ce.length;ae++)N()}}(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(b){for(var T=0,K=a.interactions.list;T<K.length;T++)K[T].documentBlur(b)}}),a.prevTouchTime=0,a.Interaction=function(b){x(K,b);var T=J(K);function K(){return u(this,K),T.apply(this,arguments)}return g(K,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),K}(aa),a.interactions={list:[],new:function(b){b.scopeFire=function(K,N){return a.fire(K,N)};var T=new a.Interaction(b);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Oa)},listeners:{"scope:add-document":function(a){return ra(a,"add")},"scope:remove-document":function(a){return ra(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,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:ra,doOnInteractions:Ja,methodNames:da},La=Sn,Ra=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ra||{}),rl=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=$(pe(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,b=function(T){return(m==null||m(T))&&ma(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Ra.Off,t,o,void 0,b),(E.array(l)||E.object(l))&&this._onOff(Ra.On,t,l,void 0,b)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],b=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,b),E.array(b)?m[p]=Se(b):E.plainObject(b)?(m[p]=R(m[p]||{},ua(b)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=b.enabled!==!1)):E.bool(b)&&E.object(l.perAction[p])?m[p].enabled=b:m[p]=b}}},{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)),Ze(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=R({},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(pe(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||de(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)?we(l,t,o):!!E.element(t)&&de(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?we(l,t,o):!!E.element(t)&&de(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=Te(o,l,p);for(var b in m){b==="wheel"&&(b=se.wheelEvent);for(var T=0,K=m[b];T<K.length;T++){var N=K[T];ma(b,this._actions)?this.events[t===Ra.On?"on":"off"](b,N):E.string(this.target)?this._scopeEvents[t===Ra.On?"addDelegate":"removeDelegate"](this.target,this._context,b,N,c):this._scopeEvents[t===Ra.On?"add":"remove"](this.target,b,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Ra.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Ra.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=ua(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,R(R({},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,b=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=b.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[T][0],b[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),ll=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],b=U(m,function(T){return T===c});m.splice(b,1)}})}return g(a,[{key:"new",value:function(t,o){o=R(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 Ne(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)&&Z(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),il=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=ua(Yt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,b){var T=l.interactables.getExisting(m,b);return T||((T=l.interactables.new(m,b)).events.global=p.globalEvents),T};return c.getPointerAverage=L,c.getTouchBBox=Ee,c.getTouchDistance=te,c.getTouchAngle=G,c.getElementRect=Ze,c.getElementClientRect=Le,c.matchesSelector=Z,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=mt(function(p,m,b){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,K=p;T<K.length;T++){var N=K[T];this.on(N,m,b)}return this}if(E.object(p)){for(var ae in p)this.on(ae,p[ae],m);return this}return ma(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:b}),this},"The interact.on() method is being deprecated"),c.off=mt(function(p,m,b){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,K=p;T<K.length;T++){var N=K[T];this.off(N,m,b)}return this}if(E.object(p)){for(var ae in p)this.off(ae,p[ae],m);return this}var Ce;return ma(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,b),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=gt,this.Interactable=void 0,this.interactables=new ll(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}(rl)}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)&&C(l),V.init(l),se.init(l),qe.init(l),o.window=l,o.document=l.document,o.usePlugin(La),o.usePlugin(En),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(b,T){return b[T]=!0,b[wo(T)]=!0,b},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[wo(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?R({},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 wo(a){return a&&a.replace(/\/.*$/,"")}var Co=new il,Zt=Co.interactStatic,sl=typeof globalThis<"u"?globalThis:window;Co.init(sl);var cl=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,b=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,K=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},ae=0;ae<t.length;ae++){var Ce=t[ae],Ue=Ce[0],je=Ce[1],Ge=Math.round((l-K.x)/a[Ue]),st=Math.round((c-K.y)/a[je]);N[Ue]=Math.max(b.left,Math.min(b.right,Ge*a[Ue]+K.x)),N[je]=Math.max(b.top,Math.min(b.bottom,st*a[je]+K.y))}return N};return o.grid=a,o.coordFields=t,o}}),ul={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=R(t.snappers||{},cl),t.createSnapGrid=t.snappers.grid}},dl=ul,pl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,b=p.enabled,T=t.options,K=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=R({},c),t.startRect=R({},o),t.ratio=m,t.equalDelta=K;var ae=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=(ae.left?1:-1)*(ae.top?1:-1);t.edgeSign={x:Ce,y:Ce}}else t.edgeSign={x:ae.left?-1:1,y:ae.top?-1:1};if(b!==!1&&R(l,ae),N!=null&&N.length){var Ue=new Da(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(N),t.subModification=Ue,Ue.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=R({},l),m=t.equalDelta?fl:hl;if(R(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var b=R({},o);re(c,b,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:b,edges:c,pageCoords:l,prevCoords:l,prevRect:b})),K=T.delta;return T.changed&&(m(t,Math.abs(K.x)>Math.abs(K.y),T.coords,T.rect),R(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function fl(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,b=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*b.y}else{var K=l.height*m;o.x=p.x+(K-c.width)*b.x}}var vl=ta(pl,"aspectRatio"),Do=function(){};Do._defaults={};var Tn=Do;function Za(a,t,o){return E.func(a)?Re(a,t.interactable,t.element,[o.x,o.y,t]):Re(a,t.interactable,t.element)}var In={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,b=m.elementRect,T=R({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&b){var K=Za(m.restriction,c,p);if(K){var N=K.right-K.left-t.width,ae=K.bottom-K.top-t.height;N<0&&(T.left+=N,T.right+=N),ae<0&&(T.top+=ae,T.bottom+=ae)}T.left+=o.left-t.width*b.left,T.top+=o.top-t.height*b.top,T.right+=o.right-t.width*(1-b.right),T.bottom+=o.bottom-t.height*(1-b.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Za(c.restriction,o,t);if(m){var b=function(T){return!T||"left"in T&&"top"in T||((T=R({},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(b.right-p.right,t.x),b.left+p.left),t.y=Math.max(Math.min(b.bottom-p.bottom,t.y),b.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},gl=ta(In,"restrict"),_o={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Eo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function So(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 gn={noInner:_o,noOuter:Eo,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=ke(Za(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 b=R({},t),T=Za(m.inner,l,b)||{},K=Za(m.outer,l,b)||{};So(T,_o),So(K,Eo),o.top?t.y=Math.min(Math.max(K.top+p.top,b.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(K.bottom+p.bottom,b.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(K.left+p.left,b.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(K.right+p.right,b.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ml=ta(gn,"restrictEdges"),yl=R({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},In.defaults),bl=ta({start:In.start,set:In.set,defaults:yl},"restrictRect"),kl={width:-1/0,height:-1/0},xl={width:1/0,height:1/0},wl=ta({start:function(a){return gn.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=oe(Za(p.min,t,a.coords))||kl,b=oe(Za(p.max,t,a.coords))||xl;o.options={endOnly:p.endOnly,inner:R({},gn.noInner),outer:R({},gn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-b.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+b.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-b.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+b.width),gn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),to={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,b=a.startOffset,T=m.options,K=T.offsetWithOrigin?function(Ce){var Ue=Ce.interaction.element,je=ke(Re(Ce.state.options.origin,null,null,[Ue])),Ge=je||ne(Ce.interactable,Ue,Ce.interaction.prepared.name);return Ge}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=Re(T.offset,l,c,[o]);(t=ke(N)||{x:0,y:0}).x+=K.x,t.y+=K.y}var ae=T.relativePoints;m.offsets=p&&ae&&ae.length?ae.map(function(Ce,Ue){return{index:Ue,relativePoint:Ce,x:b.left-p.width*Ce.x+t.x,y:b.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=ne(t.interactable,t.element,t.prepared.name),b=R({},o),T=[];c.offsetWithOrigin||(b.x-=m.x,b.y-=m.y);for(var K=0,N=p;K<N.length;K++)for(var ae=N[K],Ce=b.x-ae.x,Ue=b.y-ae.y,je=0,Ge=c.targets.length;je<Ge;je++){var st=c.targets[je],ot=void 0;(ot=E.func(st)?st(Ce,Ue,t._proxy,ae,je):st)&&T.push({x:(E.number(ot.x)?ot.x:Ce)+ae.x,y:(E.number(ot.y)?ot.y:Ue)+ae.y,range:E.number(ot.range)?ot.range:c.range,source:st,index:je,offset:ae})}for(var vt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ct=0;Ct<T.length;Ct++){var Tt=T[Ct],yt=Tt.range,Dt=Tt.x-b.x,Qt=Tt.y-b.y,Kt=ut(Dt,Qt),sa=Kt<=yt;yt===1/0&&vt.inRange&&vt.range!==1/0&&(sa=!1),vt.target&&!(sa?vt.inRange&&yt!==1/0?Kt/yt<vt.distance/vt.range:yt===1/0&&vt.range!==1/0||Kt<vt.distance:!vt.inRange&&Kt<vt.distance)||(vt.target=Tt,vt.distance=Kt,vt.range=yt,vt.inRange=sa,vt.delta.x=Dt,vt.delta.y=Qt)}return vt.inRange&&(o.x=vt.target.x,o.y=vt.target.y),l.closest=vt,vt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=ta(to,"snap"),Bn={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"]],to.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=R({},c),o.options.targets=[];for(var b=0,T=c.targets||[];b<T.length;b++){var K=T[b],N=void 0;if(N=E.func(K)?K(m.x,m.y,t):K){for(var ae=0,Ce=o.targetFields;ae<Ce.length;ae++){var Ue=Ce[ae],je=Ue[0],Ge=Ue[1];if(je in N||Ge in N){N.x=N[je],N.y=N[Ge];break}}o.options.targets.push(N)}}var st=to.set(a);return o.options=c,st},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Dl=ta(Bn,"snapSize"),ao={aspectRatio:vl,restrictEdges:ml,restrict:gl,restrictRect:bl,restrictSize:wl,snapEdges:ta({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Bn.start(a)):null},set:Bn.set,defaults:R(ua(Bn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:Dl,spring:Tn,avoid:Tn,transform:Tn,rubberband:Tn},_l={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(dl),t.modifiers=ao,ao){var l=ao[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},El=_l,To=function(a){x(o,a);var t=J(o);function o(l,c,p,m,b,T){var K;if(u(this,o),D(P(K=t.call(this,b)),p),p!==c&&D(P(K),c),K.timeStamp=T,K.originalEvent=p,K.type=l,K.pointerId=z(c),K.pointerType=ee(c),K.target=m,K.currentTarget=null,l==="tap"){var N=b.getPointerIndex(c);K.dt=K.timeStamp-b.pointers[N].downTime;var ae=K.timeStamp-b.tapTime;K.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===K.target&&ae<500}else l==="doubletap"&&(K.dt=c.timeStamp-b.tapTime,K.double=!0);return K}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}(be),mn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=mn,a.defaults.actions.pointerEvents=mn.defaults,R(a.actions.phaselessTypes,mn.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&&no(a),Pa({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,b=o.eventTarget,T=o.pointerIndex,K=c.pointers[T].hold,N=Xe(b),ae={interaction:c,pointer:p,event:m,eventTarget:b,type:"hold",targets:[],path:N,node:null},Ce=0;Ce<N.length;Ce++){var Ue=N[Ce];ae.node=Ue,l.fire("pointerEvents:collect-targets",ae)}if(ae.targets.length){for(var je=1/0,Ge=0,st=ae.targets;Ge<st.length;Ge++){var ot=st[Ge].eventable.options.holdDuration;ot<je&&(je=ot)}K.duration=je,K.timeout=setTimeout(function(){Pa({interaction:c,eventTarget:b,pointer:p,event:m,type:"hold"},l)},je)}})(a,t),Pa(a,t)},"interactions:up":function(a,t){no(a),Pa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget;c.pointerWasMoved||Pa({interaction:c,eventTarget:b,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){no(a),Pa(a,t)}},PointerEvent:To,fire:Pa,collectEventTargets:Io,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Pa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=a.targets,T=b===void 0?Io(a,t):b,K=new To(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:K});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:K},ae=0;ae<T.length;ae++){var Ce=T[ae];for(var Ue in Ce.props||{})K[Ue]=Ce.props[Ue];var je=ne(Ce.eventable,Ce.node);if(K._subtractOrigin(je),K.eventable=Ce.eventable,K.currentTarget=Ce.node,Ce.eventable.fire(K),K._addOrigin(je),K.immediatePropagationStopped||K.propagationStopped&&ae+1<T.length&&T[ae+1].node!==K.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var Ge=K.double?Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):K;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return K}function Io(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=o.getPointerIndex(l),T=o.pointers[b];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var K=Xe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:K,targets:[],node:null},ae=0;ae<K.length;ae++){var Ce=K[ae];N.node=Ce,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(Ue){var je,Ge;return Ue.eventable.options.holdDuration===((je=o.pointers[b])==null||(Ge=je.hold)==null?void 0:Ge.duration)})),N.targets}function no(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Sl=Object.freeze({__proto__:null,default:mn});function Tl(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Il={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(mn);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)]=Tl,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))}}})},Bl=Il,Nl={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return R(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 b=m.events,T=b.options;b.types[c]&&b.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:b,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;R(o.events.options,t.pointerEvents.defaults),R(o.events.options,l.pointerEvents||{})}}},Al=Nl,Vl={id:"pointer-events",install:function(a){a.usePlugin(Sl),a.usePlugin(Bl),a.usePlugin(Al)}},Ol=Vl,Ml={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(),b=p.window.Promise,T=b?[]:null,K=function(){var ae=m[N],Ce=l.getRect(ae);if(!Ce)return 1;var Ue,je=Ne(p.interactions.list,function(ot){return ot.interacting()&&ot.interactable===l&&ot.element===ae&&ot.prepared.name===c.name});if(je)je.move(),T&&(Ue=je._reflowPromise||new b(function(ot){je._reflowResolve=ot}));else{var Ge=oe(Ce),st=function(ot){return{coords:ot,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:p.now()});Ue=function(ot,vt,Ct,Tt,yt){var Dt=ot.interactions.new({pointerType:"reflow"}),Qt={interaction:Dt,event:yt,pointer:yt,eventTarget:Ct,phase:"reflow"};Dt.interactable=vt,Dt.element=Ct,Dt.prevEvent=yt,Dt.updatePointer(yt,yt,Ct,!0),H(Dt.coords.delta),Bt(Dt.prepared,Tt),Dt._doPhase(Qt);var Kt=ot.window,sa=Kt.Promise,va=sa?new sa(function(Ea){Dt._reflowResolve=Ea}):void 0;return Dt._reflowPromise=va,Dt.start(Tt,vt,Ct),Dt._interacting?(Dt.move(Qt),Dt.end(yt)):(Dt.stop(),Dt._reflowResolve()),Dt.removePointer(yt,yt),va}(p,l,ae,c,st)}T&&T.push(Ue)},N=0;N<m.length&&!K();N++);return T&&b.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=Ml;if(Zt.use(Oa),Zt.use(na),Zt.use(Ol),Zt.use(ia),Zt.use(El),Zt.use(Wa),Zt.use(tt),Zt.use(ft),Zt.use(zl),Zt.default=Zt,d(n)==="object"&&n)try{n.exports=Zt}catch{}return Zt.default=Zt,Zt})}(xn,xn.exports)),xn.exports}var np=ap();const Zo=Be.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($r),k=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,P=NaN,J=NaN,M=NaN,xe=-1,X=-1,j=-1,le=-1,C=r.x,$=r.y,y=r.w,B=r.h;const E=e.ref(),ve=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:Re});function Ye(w){Te(w)}function ct(){Ke()}function ze(w){ca(r.isDraggable)&&(f.draggable=w)}function We(w){ca(r.isResizable)&&(f.resizable=w)}function De(w){ca(r.isBounded)&&(f.bounded=w)}function V(w){f.transformScale=w}function Q(w){f.rowHeight=w}function se(w){f.maxRows=w}function de(){f.rtl=Yo()==="rtl",Ke()}function Je(w){f.cols=Math.floor(w)}u.increaseItem(ve),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=qr(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,ca(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,ca(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,ca(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{C=r.x,$=r.y,B=r.h,y=r.w,ea(Ze)}),k.on("updateWidth",Ye),k.on("compact",ct),k.on("setDraggable",ze),k.on("setResizable",We),k.on("setBounded",De),k.on("setTransformScale",V),k.on("setRowHeight",Q),k.on("setMaxRows",se),k.on("directionchange",de),k.on("setColNum",Je)}),e.onBeforeUnmount(()=>{k.off("updateWidth",Ye),k.off("compact",ct),k.off("setDraggable",ze),k.off("setResizable",We),k.off("setBounded",De),k.off("setTransformScale",V),k.off("setRowHeight",Q),k.off("setMaxRows",se),k.off("directionchange",de),k.off("setColNum",Je),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ve)}),i({state:f,wrapper:E});const rt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Z=e.computed(()=>f.resizable&&!r.static),F=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),me=e.computed(()=>(f.draggable||f.resizable)&&!r.static),we=Gd("item"),$e=e.computed(()=>({[we.b()]:!0,[we.bm("resizable")]:Z.value,[we.bm("static")]:r.static,[we.bm("resizing")]:f.isResizing,[we.bm("dragging")]:f.isDragging,[we.bm("transform")]:f.useCssTransforms,[we.bm("rtl")]:F.value,[we.bm("no-touch")]:rt&&me.value})),Le=e.computed(()=>[we.be("resizer"),F.value&&we.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{ea(D),ea(H)}),e.watch(()=>f.draggable,()=>{ea(D)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{ea(H)}),e.watch(()=>f.rowHeight,()=>{ea(Ze),ea(Xe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{ea(H),ea(Ze),ea(Xe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{ea(H)}),e.watch(F,()=>{ea(H),ea(Ze)}),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),ea(Ze),ea(Xe))});function Ze(){r.x+r.w>f.cols?(C=0,y=r.w>f.cols?f.cols:r.w):(C=r.x,y=r.w);const w=Y(C,$,y,B);f.isDragging&&(w.top=f.dragging.top,F.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?F.value?S=Ud(w.top,w.right,w.width,w.height):S=Kd(w.top,w.left,w.width,w.height):F.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 Xe(){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 pe(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Go(w);if(ca(q))return;const{x:z,y:ce}=q,W={width:0,height:0};let L;switch(S){case"resizestart":{H(),xe=y,X=B,L=Y(C,$,y,B),W.width=L.width,W.height=L.height,f.resizing=W,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=z),!w.edges.top&&!w.edges.bottom&&(M=ce);const Ee=Xo(J,M,z,ce);F.value?W.width=f.resizing.width-Ee.deltaX/f.transformScale:W.width=f.resizing.width+Ee.deltaX/f.transformScale,W.height=f.resizing.height+Ee.deltaY/f.transformScale,f.resizing=W;break}case"resizeend":{L=Y(C,$,y,B),W.width=L.width,W.height=L.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}L=ne(W.height,W.width),L.w<r.minW&&(L.w=r.minW),L.w>r.maxW&&(L.w=r.maxW),L.h<r.minH&&(L.h=r.minH),L.h>r.maxH&&(L.h=r.maxH),L.h<1&&(L.h=1),L.w<1&&(L.w=1),J=z,M=ce,(y!==L.w||B!==L.h)&&d("resize",r.i,L.h,L.w,W.height,W.width),w.type==="resizeend"&&(xe!==y||X!==B)&&d("resized",r.i,L.h,L.w,W.height,W.width),k.emit("resizeEvent",w.type,r.i,C,$,L.h,L.w)}function R(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(ca(q))return;const{x:z,y:ce}=q,W=w.target;if(!W.offsetParent)return;const L={top:0,left:0};switch(S){case"dragstart":{j=C,le=$;const te=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ee=G.left/f.transformScale,ie=te.left/f.transformScale,be=G.right/f.transformScale,_e=te.right/f.transformScale,Se=G.top/f.transformScale,U=te.top/f.transformScale;F.value?L.left=(be-_e)*-1:L.left=ee-ie,L.top=Se-U,f.dragging=L,f.isDragging=!0;break}case"dragmove":{const te=Xo(O,P,z,ce);if(F.value?L.left=f.dragging.left-te.deltaX/f.transformScale:L.left=f.dragging.left+te.deltaX/f.transformScale,L.top=f.dragging.top+te.deltaY/f.transformScale,f.bounded){const G=W.offsetParent.clientHeight-oe(r.h,f.rowHeight,f.margin[1]);L.top=re(L.top,0,G);const ee=ke(),ie=f.containerWidth-oe(r.w,ee,f.margin[0]);L.left=re(L.left,0,ie)}f.dragging=L;break}case"dragend":{const te=W.offsetParent.getBoundingClientRect(),G=W.getBoundingClientRect(),ee=G.left/f.transformScale,ie=te.left/f.transformScale,be=G.right/f.transformScale,_e=te.right/f.transformScale,Se=G.top/f.transformScale,U=te.top/f.transformScale;F.value?L.left=(be-_e)*-1:L.left=ee-ie,L.top=Se-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ee;F.value,Ee=Re(L.top,L.left),O=z,P=ce,(C!==Ee.x||$!==Ee.y)&&d("move",r.i,Ee.x,Ee.y),w.type==="dragend"&&(j!==C||le!==$)&&d("moved",r.i,Ee.x,Ee.y),k.emit("dragEvent",w.type,r.i,Ee.x,Ee.y,B,y)}function Y(w,S,q,z){const ce=ke();let W;return F.value?W={right:Math.round(ce*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ce*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])}:W={left:Math.round(ce*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ce*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])},W}function Re(w,S){const q=ke();let z=Math.round((S-f.margin[0])/(q+f.margin[0])),ce=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return z=Math.max(Math.min(z,f.cols-y),0),ce=Math.max(Math.min(ce,f.maxRows-B),0),{x:z,y:ce}}function ke(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function oe(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function re(w,S,q){return Math.max(Math.min(w,q),S)}function ne(w,S,q=!1){const z=ke();let ce=Math.round((S+f.margin[0])/(z+f.margin[0])),W=0;return q?W=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):W=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ce=Math.max(Math.min(ce,f.cols-C),0),W=Math.max(Math.min(W,f.maxRows-$),0),{w:ce,h:W}}function Te(w,S){f.containerWidth=w}function Ke(){Ze()}function ut(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const v=Wo(R);function D(){if(ut(),!!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"?v(S):R(S)}))}else g.value.draggable({enabled:!1})}const A=Wo(pe);function H(){if(ut(),!!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:F.value?`.${Le.value[0]}`:!1,right:F.value?!1:`.${Le.value[0]}`,bottom:`.${Le.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"?A(z):pe(z)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass($e.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Z.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Le.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,...k}=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,k),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 Rn;if(nn){for(const n of dp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Rn){const n=Rn[2],i=Rn[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 Xr=new Map;Xr.set("x",0);Xr.set("y",0);var en=[],hp=function(){return en.some(function(n){return n.activeTargets.length>0})},vp=function(){return en.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)},_n;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_n||(_n={}));var tn=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,tn(this)}return n}(),Yr=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,tn(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,k=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:k,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),xo=function(n){return n instanceof SVGElement&&"getBBox"in n},Jr=function(n){if(xo(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,k=d.offsetHeight;return!(u||k||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},Dn=typeof window<"u"?window:{},On=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(Dn.navigator&&Dn.navigator.userAgent),ba=function(n){return parseFloat(n||"0")},pn=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=tn({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new Yr(0,0,0,0)}),Zr=function(n,i){if(i===void 0&&(i=!1),On.has(n)&&!i)return On.get(n);if(Jr(n))return On.set(n,rr),rr;var s=getComputedStyle(n),r=xo(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),k=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:ba(s.paddingTop),x=r?0:ba(s.paddingRight),_=r?0:ba(s.paddingBottom),O=r?0:ba(s.paddingLeft),P=r?0:ba(s.borderTopWidth),J=r?0:ba(s.borderRightWidth),M=r?0:ba(s.borderBottomWidth),xe=r?0:ba(s.borderLeftWidth),X=O+x,j=f+_,le=xe+J,C=P+M,$=g?n.offsetHeight-C-n.clientHeight:0,y=k?n.offsetWidth-le-n.clientWidth:0,B=d?X+le:0,E=d?j+C:0,ve=r?r.width:ba(s.width)-B-y,Ye=r?r.height:ba(s.height)-E-$,ct=ve+X+y+le,ze=Ye+j+$+C,We=tn({devicePixelContentBoxSize:pn(Math.round(ve*devicePixelRatio),Math.round(Ye*devicePixelRatio),u),borderBoxSize:pn(ct,ze,u),contentBoxSize:pn(ve,Ye,u),contentRect:new Yr(O,f,ve,Ye)});return On.set(n,We),We},Qr=function(n,i,s){var r=Zr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,k=r.devicePixelContentBoxSize;switch(i){case _n.DEVICE_PIXEL_CONTENT_BOX:return k;case _n.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Zr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=tn([s.borderBoxSize]),this.contentBoxSize=tn([s.contentBoxSize]),this.devicePixelContentBoxSize=tn([s.devicePixelContentBoxSize])}return n}(),el=function(n){if(Jr(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=[];en.forEach(function(u){if(u.activeTargets.length!==0){var k=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=el(g.target);k.push(f),g.lastReportedSize=Qr(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,k,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){en.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(el(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Cp=function(){var n=0;for(lr(n);hp();)n=wp(),lr(n);return vp()&&gp(),n>0},lo,tl=[],Dp=function(){return tl.splice(0).forEach(function(n){return n()})},_p=function(n){if(!lo){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Dp()}).observe(s,r),lo=function(){s.textContent="".concat(i?i--:i++)}}tl.push(n),lo()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},Pn=0,Sp=function(){return!!Pn},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},io=!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),!io){io=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Cp()}finally{if(io=!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():Dn.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 Dn.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return Dn.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!Pn&&n>0&&fo.start(),Pn+=n,!Pn&&fo.stop()},Np=function(n){return!xo(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||_n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=Qr(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}(),Mn=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);Mn.set(i,r)},n.observe=function(i,s,r){var d=Mn.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&en.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Mn.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&en.splice(en.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Mn.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:k,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:k??f,height:g??x}))}}}const al=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),al.observe(n)}function pr(n){Zn.has(n)&&(al.unobserve(n),Zn.delete(n))}function zp(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 Fp=e.ref(!1);e.computed(()=>Fp.value);const fr="__theme_style__",so="__theme_observer__",hr=e.reactive(new Map),vr=new Map;e.watch(hr,()=>{if(!nn)return;vr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${so} { width: 1px }`,r=1;for(const[d,[u,k]]of hr.entries())s+=` html.${u} .${so}, .${k} .${so} { width: ${++r}px }`,vr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const nl=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}),k=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=zp(),O=zd();O.on("resizeEvent",P),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,Fd(C,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),C()})})}),e.onBeforeUnmount(()=>{O.clearAll(),f.value&&_(f.value)});function P(ze,We,De,V,Q,se){E(ze,We,De,V,Q,se)}function J(ze,We,De,V,Q,se){B(ze,We,De,V,Q,se)}e.watch(()=>u.width,(ze,We)=>{e.nextTick(()=>{O.emit("updateWidth",ze),We===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,j()}),e.watch(()=>r.colNum,ze=>{O.emit("setColNum",ze)}),e.watch(()=>r.rowHeight,ze=>{O.emit("setRowHeight",ze)}),e.watch(()=>r.isDraggable,ze=>{O.emit("setDraggable",ze)}),e.watch(()=>r.isResizable,ze=>{O.emit("setResizable",ze)}),e.watch(()=>r.isBounded,ze=>{O.emit("setBounded",ze)}),e.watch(()=>r.transformScale,ze=>{O.emit("setTransformScale",ze)}),e.watch(()=>r.responsive,ze=>{ze||(d("update:layout",u.originalLayout),O.emit("setColNum",r.colNum)),C()}),e.watch(()=>r.maxRows,ze=>{O.emit("setMaxRows",ze)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide($r,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:xe})),e.provide(jr,O),i({state:u,getItem:X,resizeEvent:E,dragEvent:B,layoutUpdate:j});function M(ze){k.set(ze.i,ze)}function xe(ze){k.delete(ze.i)}function X(ze){return k.get(ze)}function j(){if(!ca(g.value)&&!ca(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const ze=ct(g.value,u.originalLayout);if(ze.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(ze);else{const We=new Set(ze.map(De=>De.i));u.originalLayout=u.originalLayout.filter(De=>!We.has(De.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 C(){f.value&&(u.width=f.value.offsetWidth),O.emit("resizeEvent")}function $(){if(!r.autoSize)return;const ze=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+ze)+ze+"px"}let y;function B(ze,We,De,V,Q,se){let de=Ho(g.value,We);ca(de)&&(de={h:0,w:0,x:0,y:0,i:""}),ze==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Je,{i:rt,x:Z,y:F})=>({...Je,[rt]:{x:Z,y:F}}),{})),ze==="dragmove"||ze==="dragstart"?(u.placeholder.i=We,u.placeholder.x=de.x,u.placeholder.y=de.y,u.placeholder.w=se,u.placeholder.h=Q,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,de,De,V,!0,r.preventCollision),r.restoreOnDrag?(de.static=!0,cn(g.value,r.verticalCompact,y),de.static=!1):cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(ze,We,De,V,Q,se){let de=Ho(g.value,We);ca(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Je;if(r.preventCollision){const rt=Ur(g.value,{...de,w:se,h:Q}).filter(Z=>Z.i!==de.i);if(Je=rt.length>0,Je){let Z=1/0,F=1/0;rt.forEach(me=>{me.x>de.x&&(Z=Math.min(Z,me.x)),me.y>de.y&&(F=Math.min(F,me.y))}),Number.isFinite(Z)&&(de.w=Z-de.x),Number.isFinite(F)&&(de.h=F-de.y)}}Je||(de.w=se,de.h=Q),ze==="resizestart"||ze==="resizemove"?(u.placeholder.i=We,u.placeholder.x=De,u.placeholder.y=V,u.placeholder.w=de.w,u.placeholder.h=de.h,e.nextTick(()=>{u.isDragging=!0}),O.emit("updateWidth",u.width)):ze&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ve(),cn(g.value,r.verticalCompact),O.emit("compact"),le(),ze==="resizeend"&&d("layout-updated",g.value)}function ve(){const ze=Jd(r.breakpoints,u.width);if(ze===u.lastBreakpoint)return;const We=qr(ze,r.cols);!ca(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const De=Zd(u.originalLayout,u.layouts,r.breakpoints,ze,u.lastBreakpoint,We,r.verticalCompact);u.layouts[ze]=De,u.lastBreakpoint!==ze&&d("breakpoint-changed",ze,De),g.value=De,d("update:layout",De),u.lastBreakpoint=ze,O.emit("setColNum",We)}function Ye(){u.layouts=Object.assign({},r.responsiveLayouts)}function ct(ze,We){const De=new Set(We.map(de=>de.i)),V=new Set(ze.map(de=>de.i)),Q=ze.filter(de=>!De.has(de.i)),se=We.filter(de=>!V.has(de.i));return Q.concat(se)}return(ze,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[ze.$slots.default?e.renderSlot(ze.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,De=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:De.i,ref_for:!0},De),{default:e.withCtx(()=>[e.renderSlot(ze.$slots,"item",{item:De})]),_: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 Lp={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=jt.useModelComp(h.pinia),{isEdit:r}=h.storeToRefs(s),d=i,u=n,k=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var P,J,M,xe;return((P=u==null?void 0:u.children)==null?void 0:P.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(xe=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:xe.layout:"vertical"}),f=e.computed(()=>{var P,J;return((J=(P=u==null?void 0:u.children)==null?void 0:P[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=P=>{d("rowClick",P)},O=(P,J)=>{d("routeUrl",P,J)};return(P,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(nl),{key:0,layout:k.value,"onUpdate:layout":J[0]||(J[0]=M=>k.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(k.value,(M,xe)=>(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,j,le,C,$,y,B,E,ve,Ye,ct,ze,We;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:xe===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(j=M==null?void 0:M.component)==null?void 0:j.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((C=M==null?void 0:M.component)!=null&&C.name)?(e.openBlock(),e.createElementBlock("div",Lp,[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(Hn)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(kt)[xe])==null?void 0:B.showIndex,allowMove:(E=e.unref(kt)[xe])==null?void 0:E.allowMove,viewport:(ve=e.unref(kt)[xe])==null?void 0:ve.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(bo),itemData:(Ye=M==null?void 0:M.component)==null?void 0:Ye.compData,childItemData:(ct=M==null?void 0:M.component)==null?void 0:ct.itemChildData,key:e.unref(fn),cacheNewData:e.unref(qn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??xe,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(ze=M==null?void 0:M.component)==null?void 0:ze.tableId,allMapContents:e.unref(Wn),children:(We=M==null?void 0:M.component)==null?void 0:We.children,level:x.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Or),onClickMainKey:e.unref(Mr)},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,xe)=>{var X,j;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(xe)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((j=M==null?void 0:M.comp)==null?void 0:j.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(Hn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(fn),onChange:e.unref(Gn),index:(M==null?void 0:M.id)??xe,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Wn),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"]]),ol=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"}]),jp={TABLE:kn.ssTable,FORM:Mo,TABLEOPERATE:rs,TABLESTYLE:xs,TABLEEXTEND:Cs,TABLEINTERACTION:Es,FORMOPERATE:zo,FOLD:ac,CALCULATOR:sc,METHODBUTTON:dc,AVATARUPLOAD:Vo.ssAvatar,SIGNATURE:Vo.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:qs,TIMELINE:Ic,TIMELINEOPERATE:Qs,FORMTOPOPERATE:zo,SIGNATUREOPERATE:kc,AVATARUPLOADOPERATE:hc,TABS:Ac,TABSOPERATE:mu,CHART:Nu,CHARTOPERATE:ju,LAYOUT:Dd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return jp[n==null?void 0:n.toUpperCase()]||null}exports.De=nl;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.affixItems=rd;exports.allMapContents=Wn;exports.cacheNewData=qn;exports.clickMainKey=Mr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Or;exports.compId=fn;exports.compNames=bo;exports.compShow=Un;exports.debounce=ho;exports.existLayouts=hd;exports.generateLayouts=ms;exports.getComponent=on;exports.getComponents=Hn;exports.getSliceContLength=bd;exports.gridRowHeight=ps;exports.isStepLayout=ko;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=Nr;exports.selectFilterItem=ga;exports.setComponent=Tr;exports.showItems=kt;exports.sliceTableLength=Ar;exports.slotContent=ol;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toNumber=co;exports.toolBar=Ba;exports.verifyButton=md;
|