ss-component-new 1.2.44 → 1.2.45
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/{MTLLoader-S0-tgcId.js → MTLLoader-Bp_zXJHj.js} +1 -1
- package/dist/{MTLLoader-z5-t3xJP.cjs → MTLLoader-CP_pjCVi.cjs} +1 -1
- package/dist/{OrbitControls-BV-VucZ-.cjs → OrbitControls-B5zHPgTk.cjs} +1 -1
- package/dist/{OrbitControls-neGlLp4U.js → OrbitControls-QeoZHu0O.js} +1 -1
- package/dist/{animationData-DGlw1Pwm.js → animationData-B5eOmRnz.js} +3 -3
- package/dist/{animationData-BI3PXunj.cjs → animationData-Ba6obiMd.cjs} +1 -1
- package/dist/{array-BzXzat0I.cjs → array-CXTr_u8T.cjs} +1 -1
- package/dist/{array-B0sVMejm.js → array-CpD9GkZu.js} +1 -1
- package/dist/{dataUtil-BMiqO5iF.cjs → dataUtil-BxHv9-qc.cjs} +1 -1
- package/dist/{dataUtil-yN0F9IZh.js → dataUtil-iQRU-HFQ.js} +1 -1
- package/dist/{fileUtil-CLjIZqTr.cjs → fileUtil-DOKmUgX6.cjs} +1 -1
- package/dist/{fileUtil-Bev09uzf.js → fileUtil-DtFX4qSS.js} +1 -1
- package/dist/{iconfont-DCNS3tUf.js → iconfont-BI4Uo8yP.js} +2 -2
- package/dist/{iconfont-DIct6CCo.cjs → iconfont-nIq9TlPr.cjs} +1 -1
- package/dist/{index-Dn9nE8Eq.cjs → index-AosP55-j.cjs} +1 -1
- package/dist/{index-Cy7dhIjv.cjs → index-B-ErCfWs.cjs} +1 -1
- package/dist/{index-CmPg86RO.js → index-B4ekORH0.js} +1 -1
- package/dist/{index-DuQEB-MM.cjs → index-B5ElOuGg.cjs} +1 -1
- package/dist/{index-CB9fhGS6.js → index-B8iVe_eb.js} +17 -17
- package/dist/{index-CbbcH5oq.js → index-B9sOWZWH.js} +5 -5
- package/dist/{index-Cx2uJNrm.cjs → index-BDur1jFN.cjs} +1 -1
- package/dist/index-BJu7m-Nr.cjs +1 -0
- package/dist/{index-BobtqupC.cjs → index-Bb0GRmmB.cjs} +1 -1
- package/dist/{index-CLfSP16a.cjs → index-BfP_DVsu.cjs} +1 -1
- package/dist/{index-XI2Rvi0q.js → index-BiXsFita.js} +1 -1
- package/dist/{index-DLOY0GPB.js → index-BtQRcdm8.js} +2 -2
- package/dist/{index-DsELssZh.cjs → index-By2szESa.cjs} +1 -1
- package/dist/{index-BA3EBTs5.cjs → index-C7enRklE.cjs} +1 -1
- package/dist/{index-BhBoXLgm.cjs → index-C8peX_zn.cjs} +1 -1
- package/dist/{index-bwwqrQDH.js → index-C9jcqjv8.js} +1 -1
- package/dist/{index-lMKlyOCK.js → index-CB31dswD.js} +4 -4
- package/dist/{index-Bl_wu7Ce.js → index-CG_g2ziw.js} +1 -1
- package/dist/{index-CbXglzHn.cjs → index-CIasmB1I.cjs} +1 -1
- package/dist/{index-_hpntJ68.js → index-CLtZ8LSX.js} +1 -1
- package/dist/{index-_R_mDcr0.cjs → index-CRSHYsls.cjs} +1 -1
- package/dist/{index-DVFTyM4M.js → index-CXXjdjCc.js} +4 -4
- package/dist/{index-r1aE58w0.cjs → index-CaCpfXzA.cjs} +1 -1
- package/dist/{index-Da7Akok4.js → index-CeXS_yjh.js} +4 -4
- package/dist/{index-Dbkrv2wN.cjs → index-Cgo-pHHk.cjs} +1 -1
- package/dist/{index-CsCIkw9R.cjs → index-ChzT-uN5.cjs} +1 -1
- package/dist/{index-B_Tkvppm.js → index-CjlgPPLu.js} +7 -7
- package/dist/{index-DL6qIAmS.cjs → index-CqYwvSb1.cjs} +1 -1
- package/dist/{index-DIPySh01.cjs → index-Cxu7w2E_.cjs} +1 -1
- package/dist/{index-DwJ_KFIl.js → index-DDz2Uaa6.js} +1 -1
- package/dist/{index-Doph8iRz.js → index-DFgo_-tB.js} +1 -1
- package/dist/{index-6PGBoTBs.cjs → index-DIqmyCXw.cjs} +1 -1
- package/dist/{index-D86mE5bR.js → index-DNTETHco.js} +1 -1
- package/dist/{index-D2pDrujp.cjs → index-DZrrnLsD.cjs} +1 -1
- package/dist/{index-DpBque0B.js → index-DaNkpB7i.js} +8 -8
- package/dist/{index-BgFjc2to.js → index-DerJOgVr.js} +3 -3
- package/dist/index-Dl_nOM4w.js +602 -0
- package/dist/{index-DAQyshAW.js → index-Hsfgg6Jr.js} +1 -1
- package/dist/{index-CY-dTAL6.js → index-QsfFZ239.js} +3 -3
- package/dist/{index-B0cPiCrJ.cjs → index-Rn_5RMYO.cjs} +1 -1
- package/dist/{index-cZUdQLs9.cjs → index-W04qB42v.cjs} +1 -1
- package/dist/{index-DJ9hDOV8.js → index-Yj-fe5Fq.js} +2 -2
- package/dist/{index-Cm0sETei.js → index-ntjMJGUe.js} +1 -1
- package/dist/{index-BoXz8LQd.js → index-s5__Qjzi.js} +1 -1
- package/dist/{index-3HHIJyYz.cjs → index-xnnwo0kC.cjs} +1 -1
- package/dist/{index-Hznc1RHv.cjs → index-ytX2FVZK.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BI9sR6fB.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bj08IQ8o.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-HDmb-6aI.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D1qJ0WdA.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bmw4uN_h.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BHN6MuWN.js} +2095 -2110
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-JMLqADEE.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BnVF9mg-.cjs} +51 -51
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-wyjrIVAw.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BYGwQPjD.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DsySz2Q6.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dp-hCMfv.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Cu2BshsL.js → index.vue_vue_type_style_index_1_lang-CU-2e_BS.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_1_lang-HFKqIlIz.cjs → index.vue_vue_type_style_index_1_lang-Ckqvc1oN.cjs} +1 -1
- package/dist/{main-DnoUlIhf.cjs → main-Cu9JHgqK.cjs} +1 -1
- package/dist/{main-CZ7ecnlE.js → main-Dr4DzkFw.js} +3 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-DoiYcvs4.js → threeModel-BxSAmes5.js} +4 -4
- package/dist/{threeModel-SJkYCRZG.cjs → threeModel-CfE4qItC.cjs} +1 -1
- package/dist/{threePreview-CJ3vTE2P.js → threePreview-Bo7UlxmA.js} +3 -3
- package/dist/{threePreview-UGPvJ0Kr.cjs → threePreview-Do2o5OBN.cjs} +1 -1
- package/dist/{threeSceneView-4qe_PpyY.cjs → threeSceneView-D7n8nPfy.cjs} +1 -1
- package/dist/{threeSceneView-CWbDj-33.js → threeSceneView-DZs6WyDt.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-GISXOGMC.js → threeSceneViewForCPMPIP-BlOqsiB_.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-YOScA2Ku.cjs → threeSceneViewForCPMPIP-jBfAtm1G.cjs} +1 -1
- package/dist/{threeTrackPathView-SikIkQ4h.js → threeTrackPathView-DVHETbx3.js} +4 -4
- package/dist/{threeTrackPathView-C7GA97Vy.cjs → threeTrackPathView-D_mOz7ZU.cjs} +1 -1
- package/dist/{threeViewerHost-CbmFGUtP.js → threeViewerHost-B4_JNQvE.js} +2 -2
- package/dist/{threeViewerHost-DNfmRw6a.cjs → threeViewerHost-CSVMxHgm.cjs} +1 -1
- package/dist/{urdfTree-bqnyp0ks.cjs → urdfTree-77wdErmJ.cjs} +1 -1
- package/dist/{urdfTree-DfcawAzu.js → urdfTree-C6zY5_p4.js} +1 -1
- package/dist/{workpieceTreePanel-DtlsVo1q.js → workpieceTreePanel-27hu7whF.js} +5 -5
- package/dist/{workpieceTreePanel-XHkn5qFT.cjs → workpieceTreePanel-CMwRzaFj.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-e1IN0g06.js +0 -577
- package/dist/index-zo_7oW0G.cjs +0 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const fa=require("./index-6PGBoTBs.cjs"),e=require("vue"),p=require("./index-C8qRkCgn.cjs"),Tt=require("./index-D2pDrujp.cjs"),Re=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-JMLqADEE.cjs"),Yt=require("./index-Cx2uJNrm.cjs"),Vo=require("./threeViewerHost-DNfmRw6a.cjs"),jt=require("./index-H18D4EBa.cjs"),Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oo=require("./isString--eJE54G5.cjs"),Mo=require("./index-DIPySh01.cjs"),kl=require("./index-BVaHwt5f.cjs"),Rr=require("./index-BhBoXLgm.cjs");var Lr=/\s/;function Fr(a){for(var i=a.length;i--&&Lr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Fr(a)+1).replace($r,"")}var zo=NaN,Kr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function go(a){if(typeof a=="number")return a;if(p.isSymbol(a))return zo;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=jr(a);var s=Ur.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Kr.test(a)?zo:+a}var uo=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function ko(a,i,s){var l,c,d,x,g,h,D=0,E=!1,_=!1,N=!0;if(typeof a!="function")throw new TypeError(qr);i=go(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Gr(go(s.maxWait)||0,i):d,N="trailing"in s?!!s.trailing:N);function $(A){var T=l,le=c;return l=c=void 0,D=A,x=a.apply(le,T),x}function V(A){return D=A,g=setTimeout(j,i),E?$(A):x}function ye(A){var T=A-h,le=A-D,Fe=i-T;return _?Xr(Fe,d-le):Fe}function H(A){var T=A-h,le=A-D;return h===void 0||T>=i||T<0||_&&le>=d}function j(){var A=uo();if(H(A))return ie(A);g=setTimeout(j,ye(A))}function ie(A){return g=void 0,N&&l?$(A):(l=c=void 0,x)}function w(){g!==void 0&&clearTimeout(g),D=0,l=h=c=g=void 0}function z(){return g===void 0?x:ie(uo())}function k(){var A=uo(),T=H(A);if(l=arguments,c=this,h=A,T){if(g===void 0)return V(h);if(_)return clearTimeout(g),g=setTimeout(j,i),$(h)}return g===void 0&&(g=setTimeout(j,i)),x}return k.cancel=w,k.flush=z,k}var Yr="[object Boolean]";function xl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function wl(a){return a===void 0}const Jr={class:"form-content"},Qr={title:"选择标签"},Zr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={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(a,{emit:i}){const s=()=>{x.value=!1,g.value=!1,h.value=[]},l=a;e.computed(()=>{var Z;const v=(Z=Ue.value)==null?void 0:Z.split("/");return(v==null?void 0:v.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:Ie.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),g=e.ref(!1),h=e.ref([]);Vo.useThreeSystem();const D=e.ref(),E=e.ref(!1),_=e.ref(!1),N=e.ref([]),$=e.ref(),V=e.ref(!1),ye=e.ref([]),H=fa.useFormToTableComp(p.pinia),j=fa.useFormComp(p.pinia),ie=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),T=e.ref(!0),le=jt.useModelComp(p.pinia),{tableViewContents:Fe,itemData:ot,isEdit:Ie,routeToChildPath:je,lockingPage:we}=p.storeToRefs(le),I=e.ref(null),te=e.ref(!1),ee=e.ref(!1),he=jt.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(he),st=Re.useOriginalState(p.pinia),{originalPath:q}=p.storeToRefs(st),M=e.ref([]),me=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ke=async v=>{ee.value=v,await tt("disabled",null,v,!0)},Me=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Ve=()=>{e.nextTick(()=>{Q()})},Ye=v=>{var F;d.value=(F=d.value)==null?void 0:F.map(Z=>({...Z,isFormColHidden:!(v!=null&&v.includes(Z.label))}))};e.onUnmounted(()=>{I.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var F,Z,P,ue,R,X;if(v===""){let se="";(F=d.value)==null||F.forEach(G=>{G!=null&&G.isMain&&(se=G==null?void 0:G.value)});let ve=await Re.getItemData(je.value,sessionStorage.getItem("systemKey"),"");se=((X=(R=(ue=(P=(Z=ve==null?void 0:ve[0])==null?void 0:Z.compData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="mainRouters"))==null?void 0:ue.contents)==null?void 0:R[0])==null?void 0:X.routerContent)+q.value+se;let ae=await Re.getItemData(se,sessionStorage.getItem("systemKey"),"");V.value=!0,ye.value=ae==null?void 0:ae.filter(G=>(G==null?void 0:G.comp)!=="methodButton"),c("routeUrl",ye.value)}},Q=()=>{var F;const v=(F=I.value)==null?void 0:F.$el;v&&Re.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Z=>{const{oldIndex:P,newIndex:ue}=Z;if(P===ue)return;const R=d.value.splice(P,1)[0];d.value.splice(ue,0,R)}})},tt=async(v,F,Z,P=!1)=>{var ue,R,X,se,ve,K,ae,G;try{le.setRefreshCurStructure(!1);const _e=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((ue=_e==null?void 0:_e.data)==null?void 0:ue.code)===200){let de=(ve=(se=(X=(R=_e==null?void 0:_e.data)==null?void 0:R.result)==null?void 0:X[0])==null?void 0:se.value)==null?void 0:ve.pageData;P?de={...de,compData:(ae=de==null?void 0:de.compData)==null?void 0:ae.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"?{...L,contents:(fe=L==null?void 0:L.contents)==null?void 0:fe.map(ne=>({...ne,[v]:Z}))}:L})}:de={...de,compData:(K=de==null?void 0:de.compData)==null?void 0:K.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"?{...L,contents:(fe=L==null?void 0:L.contents)==null?void 0:fe.map(ne=>(ne==null?void 0:ne.prop)===(F==null?void 0:F.prop)?{...ne,[v]:Z}:ne)}:L})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:de}});((G=Ee==null?void 0:Ee.data)==null?void 0:G.code)===200?(p.ElMessage.success("编辑成功"),le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},nt=async(v,F)=>{await tt("label",F,v)},ze=async(v,F)=>{v&&await tt("type",F,v)},ce=async(v,F,Z)=>{await tt(F,Z,v,!1)},oe=(v,F)=>{A.value===F?T.value=!1:T.value=!0,A.value=F==null?void 0:F.changeProp},re=async v=>{var Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe;let F=[];if((Z=v==null?void 0:v.toString())!=null&&Z.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],g.value=!0,x.value=!0;return}if((P=v==null?void 0:v.toString())!=null&&P.includes(".stl")||(ue=v==null?void 0:v.toString())!=null&&ue.includes(".STL")||(R=v==null?void 0:v.toString())!=null&&R.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){h.value=(se=v==null?void 0:v.toString())==null?void 0:se.split(","),g.value=!1,x.value=!0;return}if((ve=v==null?void 0:v.toString())!=null&&ve.includes(".stl")||(K=v==null?void 0:v.toString())!=null&&K.includes(".STL")||(ae=v==null?void 0:v.toString())!=null&&ae.includes(".obj")||(G=v==null?void 0:v.toString())!=null&&G.includes(".mtl")){let ne,Be=[],Je={};if(Array.isArray(v)?ne=v:ne=v==null?void 0:v.split(","),ne==null||ne.forEach(Oe=>{Oe.includes(".mtl")?Be.push(Oe):Je.blob=Je.blob?Je.blob+","+Oe:Oe}),(Be==null?void 0:Be.length)>0&&(Je.mtlBlobs=Be),(de=(_e=Object.values(Je))==null?void 0:_e[0])!=null&&de.includes("http:"))F.push(Je);else{const Oe=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ne=URL.createObjectURL(Oe),ge="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,Ke)=>{var be;Ke===((be=v==null?void 0:v.split("/"))==null?void 0:be.length)-1&&(ge=ct)}),(L=Je.blob)!=null&&L.includes(".stl")&&(ge=(ge==null?void 0:ge.replaceAll(">",""))+".urdf"),$.value=[{name:ge,blobUrl:Ne}],_.value=!0}}else{const ne=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Be=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ne.close()}),Je=new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"});let Oe=URL.createObjectURL(Je),Ne="";(fe=v==null?void 0:v.split("/"))==null||fe.forEach((ge,ct)=>{var Ke;ct===((Ke=v==null?void 0:v.split("/"))==null?void 0:Ke.length)-1&&(Ne=ge)}),$.value=[{name:Ne,blobUrl:Oe}],_.value=!0}(F==null?void 0:F.length)>0&&j.setBlobUrls(F)},Te=()=>{_.value=!1},Xe=v=>{var R,X,se,ve;const F=(X=(R=p.cloneDeep(l.itemData))==null?void 0:R.find(K=>(K==null?void 0:K.key)==="formContent"))==null?void 0:X.contents,Z=p.cloneDeep(v.content);let P={};Z&&((se=Object.values(Z))==null?void 0:se.length)>0&&((ve=Object.values(Z))==null||ve.forEach((K,ae)=>{P[F[ae].key]=K}));const ue={content:P,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",ue)},dt=e.computed(()=>"http://222.92.178.198:62001"),m=async v=>{var _e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe;if(!v)return;(de=(_e=l==null?void 0:l.itemData)==null?void 0:_e.find(pe=>(pe==null?void 0:pe.key)==="parentFormPath"))==null||de.contents;let F=Fe.value;(F==null?void 0:F.length)>0&&(F=F==null?void 0:F.map(pe=>{var Le,We,O,Ce;let Ae=(Le=pe==null?void 0:pe.key)==null?void 0:Le.split("/");return(l==null?void 0:l.compName)===(Ae==null?void 0:Ae[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1]))&&(pe.value=(Ce=(O=d.value)==null?void 0:O.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:Ce.value),pe}),le.setTableViewContents(F));const Z=p.cloneDeep(l.itemData);let P=Z==null?void 0:Z.map(pe=>{var Ae;return(pe==null?void 0:pe.key)==="formContent"&&((Ae=pe.contents)==null||Ae.map((Le,We)=>{var O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Ut,Lt;return Le.type=(Ce=(O=d.value)==null?void 0:O.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ce.type,Le.options=Le!=null&&Le.options?Le.options:((ft=(et=(ut=Le==null?void 0:Le.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=fa.formGetOptions((Se=(rt=Le==null?void 0:Le.key)==null?void 0:rt.split("$"))==null?void 0:Se[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Le==null?void 0:Le.key)!=null&&pt.includes("$")&&(Le.key=(It=(vt=Le==null?void 0:Le.key)==null?void 0:vt.split("$"))==null?void 0:It[0]),Le.signature=(xt=(Bt=d.value)==null?void 0:Bt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:xt.signature,Le.isLoginUser=(Ot=(wt=d.value)==null?void 0:wt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ot.isLoginUser,Le.value=(At=Object.values(v))==null?void 0:At[We],Le.isFormColHidden=(Lt=(Ut=d.value)==null?void 0:Ut.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Lt.isFormColHidden,Le})),pe}),ue=d.value,R=(L=(Ee=p.cloneDeep(P))==null?void 0:Ee.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:L.contents;if(ue=ue==null?void 0:ue.map(pe=>{var Ae;return pe.value=(Ae=R==null?void 0:R.find((Le,We)=>((Le==null?void 0:Le.id)??We)===(pe==null?void 0:pe.id)))==null?void 0:Ae.value,pe}),!T.value){c("contentChange",{contents:P,index:l.index});return}let X="",se=(Be=(ne=(fe=p.cloneDeep(P))==null?void 0:fe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ne.contents)==null?void 0:Be.find((pe,Ae)=>{var Le,We,O;return(pe==null?void 0:pe.label)===A.value||Ae.toString()===((O=(We=(Le=A.value)==null?void 0:Le.split("t"))==null?void 0:We[1])==null?void 0:O.toString())}),ve=(Je=se==null?void 0:se.optionUrl)==null?void 0:Je.menuSelect,K=!0;if((ge=(Ne=(Oe=p.cloneDeep(P))==null?void 0:Oe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:Ne.contents)==null||ge.forEach(pe=>{var Ae,Le,We,O,Ce,ut;K&&((We=(Le=(Ae=pe==null?void 0:pe.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:Le[1])!=null&&We.includes("["))&&(X=(Ce=(O=pe==null?void 0:pe.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ce[1],JSON.stringify(ve)===JSON.stringify((ut=pe==null?void 0:pe.optionUrl)==null?void 0:ut.menuSelect)&&(K=!1))}),(ct=se==null?void 0:se.optionUrl)!=null&&ct.menuSelect&&T.value){let pe=await fa.getSelectRow(se),Ae,Le=(Ke=se==null?void 0:se.optionUrl)==null?void 0:Ke.menuSelect;if(pe==null||pe.forEach(We=>{var O,Ce,ut,et,ft,rt,Se,Ze,He,pt;X===((Ce=(O=se==null?void 0:se.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=se==null?void 0:se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Se=(rt=se==null?void 0:se.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Se[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(se==null?void 0:se.value)&&(Ae=We)}),Ae){let We=p.cloneDeep(ue);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt;return(Ae!=null&&Ae[Ce==null?void 0:Ce.label]||Ae!=null&&Ae[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Le!=null&&Le.every(xt=>{var wt,Ot;return(Ot=(wt=Ce==null?void 0:Ce.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:Ot.includes(xt)})&&(Ce.value=(Ae==null?void 0:Ae[Ce==null?void 0:Ce.label])||(Ae==null?void 0:Ae[(Bt=(It=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(xt=>(xt==null?void 0:xt.url)&&(xt==null?void 0:xt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let O=p.cloneDeep(We);O=O==null?void 0:O.map(Ce=>{var ut,et,ft,rt,Se,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,It,Bt;if(He!=null&&He.includes("[")){let xt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(Bt=(It=p.cloneDeep(We))==null?void 0:It.find(wt=>(wt==null?void 0:wt.label)===xt))==null?void 0:Bt.value}return He})),Ce}),d.value=O}else d.value=ue;P=P==null?void 0:P.map(We=>{var O;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(O=We.contents)==null?void 0:O.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Se=>(Se==null?void 0:Se.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Se=>(Se==null?void 0:Se.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}T.value=!1,c("contentChange",{contents:P,index:l.index});let ae=[],G=[];if((De=p.cloneDeep((be=P==null?void 0:P.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:be.contents))==null||De.forEach(pe=>{var Ae;Array.isArray(pe==null?void 0:pe.value)&&((Ae=pe==null?void 0:pe.value)!=null&&Ae.find(Le=>{var We;return(We=Le==null?void 0:Le.url)==null?void 0:We.includes(".obj")}))&&(G=pe==null?void 0:pe.value)}),(G==null?void 0:G.length)>0){const pe=(Qe=p.cloneDeep(G))==null?void 0:Qe.filter(Ae=>{var Le;return(Le=Ae==null?void 0:Ae.url)==null?void 0:Le.includes(".obj")});pe==null||pe.forEach(Ae=>{var We,O,Ce,ut;const Le=(We=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);ae.push({objUrl:Ae==null?void 0:Ae.url,mtlUrls:((O=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:O.length)===1?(ut=(Ce=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Le})}),j.setObjUrl(ae)}},C=v=>{if(!v)return;const F=[];let Z="";for(let P of v)(P.includes("[")||Z.includes("["))&&(Z+=P.trim(),p.cloneDeep(Z).split("【").length-1===p.cloneDeep(Z).split("】").length-1&&p.cloneDeep(Z).split("[").length-1===p.cloneDeep(Z).split("]").length-1&&(F.push(Z.replace(/\/\*[\s\S]*?\*\//g,"")),Z=""));return F},W=(v,F,Z)=>{let P="";const ue=F==null?void 0:F.map(R=>{var X;return(X=R==null?void 0:R.value)==null?void 0:X.pageData});return ue==null||ue.forEach(R=>{var X;(R==null?void 0:R.name)===(v==null?void 0:v[0])&&((X=R==null?void 0:R.compData)==null||X.forEach(se=>{var ve;(se==null?void 0:se.key)==="formContent"&&((ve=se==null?void 0:se.contents)==null||ve.forEach(K=>{var ae;(K==null?void 0:K.prop)===(v==null?void 0:v[1])&&(P=(K==null?void 0:K.value)===""?Re.judgeContents((ae=p.cloneDeep(K))==null?void 0:ae.optionUrl,Z):K==null?void 0:K.value)}))}))}),P},Y=(v,F,Z,P)=>{var se,ve;let ue="",R="";(se=p.cloneDeep(F))==null||se.forEach((K,ae)=>{K!=null&&K.includes("[")?R=R+q.value+v[ae]:R=R===""?R+K:R+"/"+K});let X=(ve=P[R])==null?void 0:ve.map(K=>{var ae;return(ae=K==null?void 0:K.value)==null?void 0:ae.pageData});return X==null||X.forEach(K=>{var ae;(K==null?void 0:K.name)===(Z==null?void 0:Z[0])&&((ae=K==null?void 0:K.compData)==null||ae.forEach(G=>{var _e;(G==null?void 0:G.key)==="formContent"&&((_e=G==null?void 0:G.contents)==null||_e.forEach(de=>{(de==null?void 0:de.prop)===(Z==null?void 0:Z[1])&&(ue=de==null?void 0:de.value)}))}))}),ue};return e.watch(()=>l.itemData,async()=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke;const v=(X=l.itemData)==null?void 0:X.find(be=>(be==null?void 0:be.key)==="formContent"),F=(se=p.cloneDeep(l.itemData))==null?void 0:se.find(be=>(be==null?void 0:be.key)==="formButton"),Z=(ve=p.cloneDeep(l.itemData))==null?void 0:ve.find(be=>(be==null?void 0:be.key)==="formFlex"),P=(K=p.cloneDeep(l.itemData))==null?void 0:K.find(be=>(be==null?void 0:be.key)==="formWrap"),ue=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(be=>(be==null?void 0:be.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?E.value=!1:E.value=!0,ie.value=(ue==null?void 0:ue.contents)===void 0?!1:ue==null?void 0:ue.contents,w.value=typeof(Z==null?void 0:Z.contents)!="boolean"?!(!(Z!=null&&Z.contents)===""||((G=Z==null?void 0:Z.contents)==null?void 0:G.toUpperCase())==="VERTICAL"):Z==null?void 0:Z.contents,((_e=v==null?void 0:v.contents)==null?void 0:_e.length)>0&&Array.isArray(v==null?void 0:v.contents)){let be=l.allMapContents;const De=(Ee=(de=p.cloneDeep(v))==null?void 0:de.contents)==null?void 0:Ee.map((O,Ce)=>{var xt,wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn;let ut=(O==null?void 0:O.label)??(O==null?void 0:O.key)??"",et=(O==null?void 0:O.type)??"",ft=(O==null?void 0:O.options)??[];if((xt=O==null?void 0:O.key)!=null&&xt.includes("$")&&(ut=(wt=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:wt[0],((At=(Ot=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ot[1])==null?void 0:At.length)>0)){const[bt,Jt]=(Lt=(Ut=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ut[1])==null?void 0:Lt.split(/[()]/);et=((Vt=Re.FormType.find(gt=>(gt==null?void 0:gt.key)===bt))==null?void 0:Vt.value)??"",((qt=Jt==null?void 0:Jt.split(","))==null?void 0:qt.length)>0&&(ft=(wn=Jt==null?void 0:Jt.split(","))==null?void 0:wn.map(gt=>({label:gt,value:gt})))}let rt=[];O!=null&&O.contents&&!Array.isArray(O==null?void 0:O.contents)&&(rt=(Dn=(fn=O==null?void 0:O.contents)==null?void 0:fn.split(","))==null?void 0:Dn.map(bt=>({label:bt,value:bt}))),((Sn=O==null?void 0:O.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(rt=(Tn=(hn=O==null?void 0:O.optionUrl)==null?void 0:hn.defaultSelect)==null?void 0:Tn.map(bt=>({label:bt,value:bt})));let Se=!1,Ze=(O==null?void 0:O.isFormColHidden)??!1,He=Re.judgeContents((vn=p.cloneDeep(O))==null?void 0:vn.optionUrl,be),pt=He!==void 0&&He!==""?He:O!=null&&O.originalContent&&(O==null?void 0:O.originalContent)!==""?O.originalContent:O!=null&&O.value?O.value:(ft==null?void 0:ft.length)>0?(In=ft==null?void 0:ft[0])==null?void 0:In.value:(O==null?void 0:O.value)??"",vt=!1,It=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url))))&&(It="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||O!=null&&O.isLoginUser)Se=!0,pt=((gn=k.value)==null?void 0:gn.姓名)||((Xn=k.value)==null?void 0:Xn.account)||((Yn=k.value)==null?void 0:Yn.账号)||((Jn=k.value)==null?void 0:Jn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||O!=null&&O.signature||O!=null&&O.isShow)if(vt=!0,(O==null?void 0:O.isShow)==="originalSignature")It="image",pt=dt.value+"/"+((jn=k.value)==null?void 0:jn.signature);else{let bt=[...new Set(C(O.isShow))].map(Mt=>{var Nn,on,Vn,Zt;return{key:(Zt=(Vn=(on=(Nn=Mt==null?void 0:Mt.split("["))==null?void 0:Nn[1])==null?void 0:on.split("]"))==null?void 0:Vn[0])==null?void 0:Zt.split(":"),value:""}});(Bn=ot.value)==null||Bn.forEach(Mt=>{bt==null||bt.forEach((yn,Nn)=>{var Vn;let on=yn==null?void 0:yn.key;(Mt==null?void 0:Mt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Vn=Mt==null?void 0:Mt.compData)==null||Vn.forEach(Zt=>{var Kn;(Zt==null?void 0:Zt.key)==="formContent"&&((Kn=Zt==null?void 0:Zt.contents)==null||Kn.forEach(bn=>{(bn==null?void 0:bn.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(bt[Nn].value=bn==null?void 0:bn.value)}))}))})});let Jt=bt==null?void 0:bt.map(Mt=>{var yn;return Mt.key="["+((yn=Mt.key)==null?void 0:yn.join(":"))+"]",Mt}),gt=O==null?void 0:O.isShow;Jt==null||Jt.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=((mn=gt==null?void 0:gt.split("==="))==null?void 0:mn[0])+"==='"+((zn=gt==null?void 0:gt.split("==="))==null?void 0:zn[1])+"'":gt=((An=gt==null?void 0:gt.split("="))==null?void 0:An[0])+"='"+((an=gt==null?void 0:gt.split("="))==null?void 0:an[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 }`)()?(Ze=!1,It="image",pt=dt.value+"/"+((Cn=k.value)==null?void 0:Cn.signature)):pt=""}return Array.isArray(pt)&&pt.every(bt=>(bt==null?void 0:bt.url)&&(bt==null?void 0:bt.name))&&(O.type="Upload"),O!=null&&O.isMainUrl&&(It="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(O==null?void 0:O.key),type:It,value:O!=null&&O.isNewDate&&pt===""?new Date:pt,id:(O==null?void 0:O.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(O==null?void 0:O.width)??1,isLoginUser:Se,config:O==null?void 0:O.config,optionUrl:(O==null?void 0:O.optionUrl)??O,isFormColHidden:Ze,signature:vt,isMain:O==null?void 0:O.isMain,isMainUrl:O==null?void 0:O.isMainUrl,operable:(O==null?void 0:O.operable)??!1,disabled:(O==null?void 0:O.disabled)??!1}}),Qe=De==null?void 0:De.map(O=>O==null?void 0:O.value);let pe="";Qe==null||Qe.forEach(O=>{O!==""&&O!==void 0&&(pe=pe===""?O:pe+"/"+O)}),H.setSelectArray(Qe),H.setSelectString(pe);let Ae=(L=p.cloneDeep(De))==null?void 0:L.map(O=>(O!=null&&O.value&&Re.IsJson(O==null?void 0:O.value)&&Array.isArray(JSON.parse(O==null?void 0:O.value))&&(O.value=JSON.parse(O.value)),O));Ae=Ae==null?void 0:Ae.map(O=>{var Ce,ut,et,ft,rt,Se,Ze,He;if((ut=(Ce=O==null?void 0:O.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";O.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(O))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,O.optionUrl.menuSelect=(Se=(rt=O==null?void 0:O.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Se.map(vt=>{var It,Bt,xt,wt,Ot,At;if(vt!=null&&vt.includes("[")){let Ut=(Bt=(It=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Bt[1];pt=W((xt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),be==null?void 0:be[Ue.value],be),vt=((Ot=(wt=p.cloneDeep(Ae))==null?void 0:wt.find(Lt=>(Lt==null?void 0:Lt.label)===Ut))==null?void 0:Ot.value)||W((At=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),be==null?void 0:be[Ue.value],be)}return vt}),pt!==""&&O.value===""&&(O.value=Y(O.optionUrl.menuSelect,O.optionUrl.oldMenuSelect,(Ze=O==null?void 0:O.optionUrl)==null?void 0:Ze.groupSelect,be),Array.isArray(O.value)&&((He=O.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(O.type="UPLOAD"))}return O}),d.value=Ae,ee.value=((fe=d.value)==null?void 0:fe.every(O=>O==null?void 0:O.disabled))||we.value===Ue.value,te.value=(ne=d.value)==null?void 0:ne.every(O=>O==null?void 0:O.operable),M.value=(Be=d.value)==null?void 0:Be.map(O=>O==null?void 0:O.label);let Le=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(O=>{var Ce;Array.isArray(O==null?void 0:O.value)&&((Ce=O==null?void 0:O.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=O==null?void 0:O.value)}),(We==null?void 0:We.length)>0){const O=(Oe=p.cloneDeep(We))==null?void 0:Oe.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});O==null||O.forEach(Ce=>{var et,ft,rt,Se;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Le.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Se=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Se.url:ut})}),j.setObjUrl(Le)}(Ne=p.cloneDeep(d.value))==null||Ne.forEach(O=>{var Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt;if((ut=(Ce=O==null?void 0:O.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=O==null?void 0:O.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Se=(rt=O==null?void 0:O.value)==null?void 0:rt.toString())!=null&&Se.includes(".obj")||(He=(Ze=O==null?void 0:O.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=O==null?void 0:O.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let wt={},Ot=[],At;Array.isArray(O==null?void 0:O.value)?At=O==null?void 0:O.value:At=(It=O==null?void 0:O.value)==null?void 0:It.split(","),At==null||At.forEach(Ut=>{Ut.includes(".mtl")?Ot.push(Ut):wt.blob=wt.blob==="undefined"?Ut:wt.blob+","+Ut}),(Ot==null?void 0:Ot.length)>0&&(wt.mtlBlobs=Ot),(xt=(Bt=Object.values(wt))==null?void 0:Bt[0])!=null&&xt.includes("http:")}})}else d.value=[];let R=Fe.value;if((R==null?void 0:R.length)>0&&(R=R==null?void 0:R.map(be=>{var Qe,pe,Ae,Le;let De=(Qe=be==null?void 0:be.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(De==null?void 0:De[0])&&(pe=d.value)!=null&&pe.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1]))&&(be.value=(Le=(Ae=d.value)==null?void 0:Ae.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1])))==null?void 0:Le.value),be}),le.setTableViewContents(R)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let be={};(ge=p.cloneDeep(d).value)==null||ge.forEach(De=>{(De==null?void 0:De.isMain)===!0&&(be[(De==null?void 0:De.prop)??(De==null?void 0:De.name)]=[{required:!0,message:`${(De==null?void 0:De.prop)||(De==null?void 0:De.name)}不能为空`}])}),D.value=be}if(((ct=F==null?void 0:F.contents)==null?void 0:ct.length)>0){const be=[];(Ke=F==null?void 0:F.contents)==null||Ke.forEach((De,Qe)=>{(De==null?void 0:De.label)!==""&&be.push({label:(De==null?void 0:De.label)??"",id:(De==null?void 0:De.id)??Qe,type:(De==null?void 0:De.type)??"",background:De==null?void 0:De.background})}),N.value=be}else N.value=[]},{deep:!0,immediate:!0}),e.watch(()=>we.value,v=>{ee.value=v===Ue.value},{immediate:!0}),(v,F)=>{const Z=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),ue=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-popover"),X=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Tt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:N.value,isRowFlex:!1,isEnableWrap:ie.value,onOnButtonClick:Xe,onChange:m,formDisabled:ee.value,formLabelsOperable:te.value,isButtonRow:E.value,onPreview:re,onBlurChange:oe,onHandleColEditChange:nt,onHandleColTypeChange:ze,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:se,formDisabled:ve,formLabelsOperable:K})=>[e.createVNode(R,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ve},{reference:e.withCtx(()=>[e.createElementVNode("span",Qr,[e.createVNode(Z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Zr,[F[1]||(F[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":ve,"active-text":"禁用","inactive-text":"",onChange:ke,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":K,"active-text":"编辑所有标签","inactive-text":"",onChange:Me},null,8,["model-value"]),F[2]||(F[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(X,{modelValue:M.value,"onUpdate:modelValue":F[0]||(F[0]=ae=>M.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:I,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(ue,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(R,{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 G;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=Object.keys(ae))==null?void 0:G.filter(_e=>{var de;return(de=me.value)==null?void 0:de.find(Ee=>(Ee==null?void 0:Ee.value)===_e)}),_e=>{var de,Ee;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(Tt._sfc_main$1,{value:ae==null?void 0:ae[_e],"active-text":(Ee=(de=me.value)==null?void 0:de.find(L=>(L==null?void 0:L.value)===_e))==null?void 0:Ee.label,inactiveText:"",onChange:L=>ce(L,_e,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[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"]),_.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:$.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Vo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:g.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Po=Rt._export_sfc(ni,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),Dl=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},ai=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},Cl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,i),l)),a)},El=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,i),l)),a)},_l=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,i),l)),a)},Sl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,i),l)),a)},St=[{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"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=Re.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},N=w=>{l("fixChange",p.cloneDeep(w))},$=w=>{l("deleteChange",p.cloneDeep(w))},V=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},ye=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},H=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="id"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Fe=>(Fe==null?void 0:Fe.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},j=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},ie=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(A.label),1),e.createElementVNode("div",ui,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>ie(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Tl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:$,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ye},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:H},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Rt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=Re.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{l("fixChange",p.cloneDeep(w))},N=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},$=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},ye=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="idChild"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Fe=>(Fe==null?void 0:Fe.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},H=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},j=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,le)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(T.label),1),e.createElementVNode("div",bi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>$(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>N(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>j(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:ie,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:H,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(A,{onClick:H,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ye,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Rt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},zi={class:"fix-button"},Pi={class:"operate-title"},Ri={class:"operate-content"},Li={class:"fix-content"},Fi={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ki={class:"operate-content"},Ui={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Qi={class:"dialog-footer"},Zi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),g=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),N=e.ref(""),$=e.ref(""),V=e.ref([]),ye=e.ref([]),H=e.ref([]),j=e.ref([]),ie=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),le=e.ref([]),Fe=()=>{ie.value=!0;let m=[];Rn==null||Rn.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:k.value,contents:C==null?void 0:C.options})}),w.value=m,z.value=m},ot=()=>{var C,W,Y;x.value=!0;let m=[];(Y=(W=(C=Re.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:W.value)==null||Y.forEach(v=>{k.value++,m.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=m,T.value=m},Ie=m=>{m||(A.value=T.value)},je=async m=>{var C,W,Y,v,F,Z,P,ue,R,X,se,ve;if((m==null?void 0:m.类型)!==((W=(C=T.value)==null?void 0:C.find(K=>(K==null?void 0:K.label)==="类型"))==null?void 0:W.value)){let K=[],ae=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:v.value)==null?void 0:F.value)?await((X=(R=(ue=Re.FormContent)==null?void 0:ue.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=Re.FormContent)==null?void 0:Z.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:P.value;if(ae==null||ae.forEach(G=>{k.value++,K.push({label:G==null?void 0:G.label,name:(G==null?void 0:G.name)||(G==null?void 0:G.label),type:G.type,value:G!=null&&G.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[G.label])??"",id:k.value,contents:G==null?void 0:G.options,prop:(G==null?void 0:G.prop)||(G==null?void 0:G.name)||(G==null?void 0:G.label)})}),m!=null&&m.菜单选项&&((se=m==null?void 0:m.菜单选项)==null?void 0:se.length)>0){const G=await Re.menuToContentType(m==null?void 0:m.菜单选项);K=K==null?void 0:K.map(_e=>((_e==null?void 0:_e.name)==="组信息选项"&&(_e.contents=G),_e))}T.value=await Re.selectToBase(p.cloneDeep(K)),A.value=await Re.selectToBase(p.cloneDeep(K))}else{let K=p.cloneDeep(A.value);if(K=K==null?void 0:K.map(ae=>(ae.value=m==null?void 0:m[ae.name],ae)),m!=null&&m.菜单选项&&((ve=m==null?void 0:m.菜单选项)==null?void 0:ve.length)>0){const ae=await Re.menuToContentType(m==null?void 0:m.菜单选项);K=K==null?void 0:K.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ae),G))}K=Re.formToOptionsContents(K),T.value=await Re.selectToBase(p.cloneDeep(K))}},we=async m=>{await je(m),A.value=T.value},I=(m,C)=>{if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.selectRelateType)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.menuSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.groupSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(C==null?void 0:C.value)||C[m.key];if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const W=C[m.key];return xl(W)?W:m.default}return(m==null?void 0:m.label)==="类型"&&C[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!C[m.key]?!1:C[m.key]},te=async m=>{var Y,v,F,Z,P,ue,R,X,se;x.value=!0;let C=[];const W=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:v.value)==null?void 0:F.value)?await((X=(R=(ue=Re.FormContent)==null?void 0:ue.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=Re.FormContent)==null?void 0:Z.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:P.value;if(W==null||W.forEach(ve=>{k.value++,C.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):I(ve,m),id:k.value,contents:ve==null?void 0:ve.options})}),m!=null&&m.menuSelect&&((se=m==null?void 0:m.menuSelect)==null?void 0:se.length)>0){const ve=await Re.menuToContentType(m==null?void 0:m.menuSelect);C=C==null?void 0:C.map(K=>((K==null?void 0:K.name)==="组信息选项"&&(K.contents=ve),K))}N.value=m==null?void 0:m.id,A.value=await Re.selectToBase(Re.formToOptionsContents(C)),T.value=await Re.selectToBase(Re.formToOptionsContents(C))},ee=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;le.value=(C=p.cloneDeep(le.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=le.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{x.value=!1,A.value=[],N.value=""},Ue=async()=>{var Y,v,F,Z,P,ue,R,X,se,ve;A.value=T.value;let m={};N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value);let C=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(K=>{var ae,G;return(K==null?void 0:K.key)===(((G=(ae=A.value)==null?void 0:ae.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:v.value)==null?void 0:F.value)??((P=(Z=Re.FormContent)==null?void 0:Z.find(K=>{var ae,G;return(K==null?void 0:K.key)===(((G=(ae=A.value)==null?void 0:ae.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:P.value);if((ue=A.value)==null||ue.forEach(K=>{const ae=C==null?void 0:C.find(G=>(G==null?void 0:G.label)===(K==null?void 0:K.label));ae&&(m[ae.key]=K.value)}),m.name=m.label,(R=le.value)!=null&&R.find(K=>K.id===m.id))le.value=(X=le.value)==null?void 0:X.map(K=>(K.id===m.id&&(K=m),K));else{let K=p.cloneDeep(le.value);le.value||(le.value=[]),K.push(m),le.value=K}le.value=le.value.map(({id:K,...ae})=>ae),x.value=!1,N.value="";let W=p.cloneDeep(s.originalItemContents);(se=p.cloneDeep(s.originalItemContents))!=null&&se.find(K=>(K==null?void 0:K.key)==="tableToForm")?W=(ve=p.cloneDeep(s.originalItemContents))==null?void 0:ve.map(K=>((K==null?void 0:K.key)==="tableToForm"&&(K.contents=le.value),K)):W.push({key:"tableToForm",contents:le.value}),l("change",W)},st=m=>{ie.value=!0;let C=[];Rn==null||Rn.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:m[W.key],id:k.value,contents:W==null?void 0:W.options})}),N.value=m==null?void 0:m.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,W;let m=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?m=(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):m.push({key:"page",contents:E.value}),l("change",m)},{deep:!0});const q=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;ye.value=(C=p.cloneDeep(ye.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=ye.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var W,Y,v,F,Z;w.value=z.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=w.value)==null||W.forEach(P=>{const ue=Rn==null?void 0:Rn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=ye.value)!=null&&Y.find(P=>P.id===m.id))ye.value=(v=ye.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(ye.value)??[];P.push(m),ye.value=P}ie.value=!1,N.value="";let C=p.cloneDeep(s.originalItemContents);(F=p.cloneDeep(s.originalItemContents))!=null&&F.find(P=>(P==null?void 0:P.key)==="extraButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="extraButton"&&(P.contents=ye.value),P)):C.push({key:"extraButton",contents:ye.value}),l("change",C)},me=m=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),z.value=C},ke=()=>{ie.value=!1,w.value=[],N.value=""},Me=m=>{h.value=!0;let C=[];Ln==null||Ln.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:m[W.key],id:k.value,contents:W==null?void 0:W.options})}),N.value=m==null?void 0:m.id,H.value=C,j.value=C},Ve=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=V.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let m=[];St==null||St.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=m,_.value=m},qe=()=>{h.value=!0;let m=[];Ln==null||Ln.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),H.value=m,j.value=m},lt=m=>{let C=p.cloneDeep(j.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),j.value=C},Q=()=>{var W,Y,v,F,Z;H.value=j.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=H.value)==null||W.forEach(P=>{const ue=Ln==null?void 0:Ln.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=V.value)!=null&&Y.find(P=>P.id===m.id))V.value=(v=V.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(V.value);P.push(m),V.value=P}h.value=!1,N.value="";let C=p.cloneDeep(s.originalItemContents);(F=p.cloneDeep(s.originalItemContents))!=null&&F.find(P=>(P==null?void 0:P.key)==="rowButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="rowButton"&&(P.contents=V.value),P)):C.push({key:"rowButton",contents:V.value}),l("change",C)},tt=()=>{h.value=!1,N.value="",j.value=[],H.value=[]},nt=m=>{d.value=!0;let C=[];St==null||St.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:"",id:k.value,contents:W==null?void 0:W.options})}),D.value=C,$.value=m==null?void 0:m.id,_.value=C},ze=m=>{var C;g.value=Cl(p.cloneDeep(g.value),m==null?void 0:m.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(W=>{var Y;return(W==null?void 0:W.key)==="header"&&(W.contents=(Y=g.value)!=null&&Y.some(v=>v==null?void 0:v.children)?[g.value]:g.value),W}))},ce=m=>{var W,Y,v;m.type==="fix"?m.id!==""?g.value=_l(g.value,m):g.value=El(g.value,m==null?void 0:m.contents):g.value=Sl(g.value,m),g.value=(W=g.value)!=null&&W.some(F=>F==null?void 0:F.children)?[g.value]:g.value,N.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(F=>(F==null?void 0:F.key)==="header")?C=(v=p.cloneDeep(s.originalItemContents))==null?void 0:v.map(F=>((F==null?void 0:F.key)==="header"&&(F.contents=g.value),F)):C.push({key:"header",contents:g.value}),l("change",C)},oe=m=>{var W;d.value=!0;let C=[];St==null||St.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:m[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),m!=null&&m.children&&((W=m==null?void 0:m.children)==null?void 0:W.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),N.value=m==null?void 0:m.id,$.value="",D.value=C,_.value=C},re=m=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),_.value=C},Te=()=>{d.value=!1,N.value="",$.value="",_.value=[]},Xe=()=>{var W,Y,v,F,Z,P;D.value=_.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=D.value)==null||W.forEach(ue=>{const R=St==null?void 0:St.find(X=>(X==null?void 0:X.label)===(ue==null?void 0:ue.label));R?m[R.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(m.children=ue.children)}),(Y=g.value)!=null&&Y.find(ue=>ue.id===m.id))g.value=(v=g.value)==null?void 0:v.map(ue=>(ue.id===m.id&&(ue=m),ue));else{let ue=p.cloneDeep(g.value)??[];$.value===""?ue.push(m):ue=ue==null?void 0:ue.map(R=>(R.id===$.value&&(R.children||(R.children=[]),R.children.push(m)),R)),g.value=ue}g.value=(F=g.value)!=null&&F.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,d.value=!1,N.value="",$.value="";let C=p.cloneDeep(s.originalItemContents);(Z=p.cloneDeep(s.originalItemContents))!=null&&Z.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(P=p.cloneDeep(s.originalItemContents))==null?void 0:P.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),l("change",C)},dt=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;g.value=(C=p.cloneDeep(g.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>{var v;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(v=g.value)!=null&&v.some(F=>F==null?void 0:F.children)?[g.value]:g.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),g.value=(C=(m=c.value)==null?void 0:m.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:C.contents,V.value=(Y=(W=c.value)==null?void 0:W.find(L=>(L==null?void 0:L.key)==="rowButton"))==null?void 0:Y.contents,ye.value=(F=(v=c.value)==null?void 0:v.find(L=>(L==null?void 0:L.key)==="extraButton"))==null?void 0:F.contents,E.value=(P=(Z=c.value)==null?void 0:Z.find(L=>(L==null?void 0:L.key)==="page"))!=null&&P.contents?!!((R=(ue=c.value)==null?void 0:ue.find(L=>(L==null?void 0:L.key)==="page"))!=null&&R.contents):!1,le.value=(se=(X=c.value)==null?void 0:X.find(L=>(L==null?void 0:L.key)==="tableToForm"))==null?void 0:se.contents,g.value=(ve=g.value)==null?void 0:ve.map((L,fe)=>(Array.isArray(L)?L=ai(L):L={label:(L==null?void 0:L.label)??"",prop:(L==null?void 0:L.label)==="操作"?"operate":L==null?void 0:L.prop,width:L!=null&&L.width?parseInt(L.width):"",fixed:(L==null?void 0:L.fixed)??void 0,sortable:(L==null?void 0:L.sortable)??!1,align:(L==null?void 0:L.align)??"left",showOverflowTooltip:(L==null?void 0:L.showOverflowTooltip)??!0,isNotDrag:(L==null?void 0:L.isNotDrag)??!1,isEditCol:(L==null?void 0:L.isEditCol)??!1,isOperate:(L==null?void 0:L.isOperate)??!1,id:(L==null?void 0:L.id)??fe,formMenuSelect:(L==null?void 0:L.formMenuSelect)??void 0,groupSelect:(L==null?void 0:L.groupSelect)??void 0},L)),g.value=(K=g.value)!=null&&K.every(L=>Array.isArray(L))?(ae=g.value)==null?void 0:ae[0]:g.value,V.value=(G=V.value)==null?void 0:G.map((L,fe)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",textColor:(L==null?void 0:L.textColor)??"#000000",id:(L==null?void 0:L.id)??fe}),ye.value=(_e=ye.value)==null?void 0:_e.map((L,fe)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:(L==null?void 0:L.id)??fe}),le.value)le.value=(Ee=le.value)==null?void 0:Ee.map(L=>{k.value++;let fe=L;return fe.id=k.value,fe});else{let L=[];const fe=(de=Re.getColumnChild(p.cloneDeep(g.value)))==null?void 0:de.filter(ne=>(ne==null?void 0:ne.prop)!=="operate");fe==null||fe.forEach(ne=>{var Be;k.value++,L.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.label),type:ne!=null&&ne.groupSelect?"Select":"Input",value:"",id:k.value,contents:ne==null?void 0:ne.options,menuSelect:ne==null?void 0:ne.formMenuSelect,groupSelect:(Be=ne==null?void 0:ne.groupSelect)==null?void 0:Be.split(":"),selectRelateType:"关联绑定列"})}),le.value=L}},{deep:!0,immediate:!0}),(m,C)=>{const W=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(W,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>nt(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>oe(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Tl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:ze,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",zi,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>Me(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>Ve(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Fe},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Li,[e.createElementVNode("div",Fi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",$i,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>st(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>q(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ot},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Wi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Hi,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>te(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>ee(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(Y,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(Y,{onClick:tt,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:Q,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:ie.value,onBeforeDestroy:ke,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(Y,{onClick:ke,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:je,onChangeVisible:Ie,onBlurChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(Y,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Rt._export_sfc(as,[["__scopeId","data-v-7a6b87b5"]]),ls=jt.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=jt.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((g=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:g.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||cs.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:(($=(N=a==null?void 0:a.value)==null?void 0:N.tableData)==null?void 0:$.minW)||us.value,minH:((ye=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ye.minH)||ds.value,maxH:((j=(H=a==null?void 0:a.value)==null?void 0:H.tableData)==null?void 0:j.maxH)||fs.value,i:((w=(ie=a==null?void 0:a.value)==null?void 0:ie.tableData)==null?void 0:w.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,x,g,h,D,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((g=a==null?void 0:a.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Il=(a,i,s)=>{var x,g;const l=(g=(x=rs.value)==null?void 0:x[ss.value])==null?void 0:g.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,_;return((_=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:_.id)===a.id}),d=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Il(h,D))),{...hs(c,i,d,a)}},gs=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Il(l,c)):[]},ms=a=>({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}]}]}}),ys=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),bs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,g=>{var E;const h=ms(s==null?void 0:s.optionItems),D=g?(E=h[g==null?void 0:g.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[N,$]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===N)return{..._,value:$};return _})},{immediate:!0});const d=g=>Tt.getComponent(g),x=g=>{var h,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(N=>({...N,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(N=>({...N,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:g==null?void 0:g.prop})};return(g,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(_.type)),{modelValue:_.value,"onUpdate:modelValue":N=>_.value=N,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:N=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Rt._export_sfc(bs,[["__scopeId","data-v-6c233914"]]),xs=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(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=j=>j==null?void 0:j.reduce((ie,w)=>(ie[w==null?void 0:w.prop]=w==null?void 0:w.rule,ie),{}),g=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(j,ie,w)=>{var A;let z=[];(s==null?void 0:s.activeTabName)==="任务配置"?(z=[{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:ie}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(z=[{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:(A=s==null?void 0:s.relatedData)==null?void 0:A.map(T=>({label:T==null?void 0:T.任务名称,value:T==null?void 0:T.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return w&&(w==null?void 0:w.length)>0?k=[...z,..._(j,ie,w)]:k=z,k},_=(j,ie,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},N=(j,ie)=>{var T,le,Fe,ot,Ie,je,we,I,te;const w=((Ie=(ot=(Fe=(le=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Fe.contents)==null?void 0:ot.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:Ie.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],z=/button/i,k=((te=(I=(we=(je=s==null?void 0:s.comp)==null?void 0:je.compData)==null?void 0:we.filter(ee=>z.test(ee==null?void 0:ee.key)))==null?void 0:I.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:te.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],A=E(w,k,j);h.value=ie?ys(A,ie):A,j&&(j==null?void 0:j.length)>0&&d.value.push(...j==null?void 0:j.map(ee=>({prop:ee,rule:c})))};e.onMounted(()=>{N(null,s==null?void 0:s.extendItem)});const $=j=>{const ie=j==null?void 0:j[D.value];if(D.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const w=ie==null?void 0:ie.join("/");N(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,j)}},V=j=>{l("change",{target:s==null?void 0:s.target,extendConfigs:j})},ye=(j,ie)=>{D.value=ie==null?void 0:ie.changeProp,$(j)},H=j=>{l("onButtonClick",j)};return(j,ie)=>(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:V,onBlurChange:ye,onOnButtonClick:H},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Rt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Rt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},zs={style:{display:"flex","justify-content":"space-between"}},Ps={class:"form-content"},Rs={class:"dialog-footer"},Ls={class:"form-content"},Fs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),x=e.ref([]),g=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),N=e.ref(0),$=e.ref([]),V=e.ref([]),ye=(I,te)=>{if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.selectRelateType)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.menuSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.groupSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(te==null?void 0:te.value)||te[I.key];if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const ee=te[I.key];return xl(ee)?ee:I.default}return(I==null?void 0:I.label)==="类型"&&te[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!te[I.key]?!1:te[I.key]},H=async I=>{var he,Ue,st,q,M,me;c.value=!0;let te=[];const ee=await((st=(Ue=(he=Re.FormContent)==null?void 0:he.find(ke=>(ke==null?void 0:ke.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(q=Re.FormContent)==null?void 0:q.find(ke=>(ke==null?void 0:ke.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:M.value);if(ee==null||ee.forEach(ke=>{N.value++,te.push({label:ke==null?void 0:ke.label,name:ke==null?void 0:ke.label,type:ke.type,prop:ke==null?void 0:ke.prop,value:ye(ke,I),id:N.value,contents:ke==null?void 0:ke.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((me=I==null?void 0:I.menuSelect)==null?void 0:me.length)>0){const ke=await Re.menuToContentType(I==null?void 0:I.menuSelect);te=te==null?void 0:te.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=ke),Me))}E.value=I==null?void 0:I.id,d.value=await Re.selectToBase(Re.formToOptionsContents(te)),x.value=await Re.selectToBase(Re.formToOptionsContents(te))},j=I=>{var ee;g.value=!0;let te=[];(ee=Re.FormButton)==null||ee.forEach(he=>{N.value++,te.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&I[he.key]===""?"normal":I[he.key],id:N.value,contents:he==null?void 0:he.options})}),$.value=te,V.value=te,E.value=I==null?void 0:I.id};e.watch(()=>_.value,()=>{var te,ee;let I=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(he=>(he==null?void 0:he.key)==="enableWrap")?I=(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!_.value),he)):I.push({key:"enableWrap",contents:!_.value}),l("change",I)},{deep:!0});const ie=()=>{var ee,he,Ue,st,q;$.value=V.value;let I={};if(E.value!==""?I.id=E.value:(N.value++,I.id="id"+N.value),(ee=$.value)==null||ee.forEach(M=>{var ke;const me=(ke=Re.FormButton)==null?void 0:ke.find(Me=>(Me==null?void 0:Me.label)===(M==null?void 0:M.label));me&&(I[me.key]=M.value)}),(he=h.value)!=null&&he.find(M=>M.id===I.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===I.id&&(M=I),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(I),h.value=M}g.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(st=p.cloneDeep(s.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?te=(q=p.cloneDeep(s.originalItemContents))==null?void 0:q.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):te.push({key:"formButton",contents:h.value}),l("change",te)},w=I=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=I=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=h.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;g.value=!0;let I=[];(te=Re.FormButton)==null||te.forEach(ee=>{N.value++,I.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"?"normal":"",id:N.value,contents:ee==null?void 0:ee.options})}),$.value=I,V.value=I},A=()=>{var te,ee,he;c.value=!0;let I=[];(he=(ee=(te=Re.FormContent)==null?void 0:te.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:ee.value)==null||he.forEach(Ue=>{N.value++,I.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:N.value,contents:Ue==null?void 0:Ue.options})}),d.value=I,x.value=I},T=I=>{let te=p.cloneDeep(V.value);te=te==null?void 0:te.map(ee=>(ee.value=I==null?void 0:I[ee.name],ee)),V.value=te},le=I=>{const te=I.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ee=I.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),he=I.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");ee!=null&&ee.value&&Oo.isString(he.value)&&(he.value=[he.value]),!(ee!=null&&ee.value)&&!Oo.isString(he.value)&&(he.value="")},Fe=async I=>{var te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye;if((I==null?void 0:I.类型)!==((ee=(te=x.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ee.value)){let qe=[];const lt=await((st=(Ue=(he=Re.FormContent)==null?void 0:he.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((Me=(ke=(me=Re.FormContent)==null?void 0:me.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:ke.value)==null?void 0:Me.value):(M=(q=Re.FormContent)==null?void 0:q.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Q=>{var nt,ze;N.value++;const tt=wl(Q==null?void 0:Q.default)?(I==null?void 0:I[Q.label])??Q.value??"":Q==null?void 0:Q.default;qe.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:tt,prop:Q==null?void 0:Q.prop,id:N.value,contents:Q==null?void 0:Q.options,width:((ze=(nt=x.value)==null?void 0:nt[0])==null?void 0:ze.width)??1})}),I!=null&&I.菜单选项&&((Ve=I==null?void 0:I.菜单选项)==null?void 0:Ve.length)>0){const Q=await Re.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Q),tt))}le(qe),x.value=await Re.selectToBase(p.cloneDeep(qe)),d.value=await Re.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=I==null?void 0:I[lt.name],lt)),I!=null&&I.菜单选项&&((Ye=I==null?void 0:I.菜单选项)==null?void 0:Ye.length)>0){const lt=await Re.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(Q=>((Q==null?void 0:Q.name)==="组信息选项"&&(Q.contents=lt),Q))}qe=Re.formToOptionsContents(qe),le(qe),x.value=await Re.selectToBase(p.cloneDeep(qe))}},ot=I=>{I||(d.value=x.value)},Ie=async I=>{await Fe(I),d.value=x.value},je=ko(async()=>{var he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt;d.value=x.value;let I={};I.width=((Ue=(he=d.value)==null?void 0:he[0])==null?void 0:Ue.width)??1,E.value!==""?I.id=E.value:(N.value++,I.id="id"+N.value);let te=await((M=(q=(st=Re.FormContent)==null?void 0:st.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(ze=>(ze==null?void 0:ze.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:q.value)==null?void 0:M.value)??((ke=(me=Re.FormContent)==null?void 0:me.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(ze=>(ze==null?void 0:ze.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:ke.value);if((Me=d.value)==null||Me.forEach(Q=>{const tt=te==null?void 0:te.find(nt=>(nt==null?void 0:nt.label)===(Q==null?void 0:Q.label));tt&&(I[tt.key]=Q.value)}),I.width=I.width?I.width:1,I.key=I==null?void 0:I.label,I.isFormColHidden=I==null?void 0:I.isFormColHidden,(Ve=D.value)!=null&&Ve.find(Q=>Q.id===I.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Q=>(Q.id===I.id&&(Q=I),Q));else{let Q=p.cloneDeep(D.value);Q.push(I),D.value=Q}D.value=D.value.map(({id:Q,...tt})=>tt),c.value=!1,E.value="";let ee=p.cloneDeep(s.originalItemContents);(qe=p.cloneDeep(s.originalItemContents))!=null&&qe.find(Q=>(Q==null?void 0:Q.key)==="formContent")?ee=(lt=p.cloneDeep(s.originalItemContents))==null?void 0:lt.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=D.value),Q)):ee.push({key:"formContent",contents:D.value}),l("change",ee)},300),we=()=>{c.value=!1,g.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ee,he,Ue,st,q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const I=p.cloneDeep(s.originalItemContents);D.value=((te=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ee=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:ee.contents)??[],_.value=(he=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ue=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,me)=>{var Me;let ke=M;return ke.id=(M==null?void 0:M.id)??me,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Me=M==null?void 0:M.options)==null?void 0:Me.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,ke}),D.value=Re.formToOptionsContents(D.value),h.value=(q=h.value)==null?void 0:q.map((M,me)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:me})},{deep:!0,immediate:!0}),(I,te)=>{const ee=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",As,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>H(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",Ms,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>j(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(Ue)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",zs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Ue=>_.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Fe,onChangeVisible:ot,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(he,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(je),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:$.value,key:$.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:we,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ro=Rt._export_sfc(Fs,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Ks={class:"step-module layout"},Us={class:"form-content"},Ws=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=H=>{var j;D.value=H,l("change",(j=V())==null?void 0:j.compData)},N=(H,j)=>{var ie,w;switch(H){case"create":(ie=d.value)==null||ie.forEach(z=>{z.value=""}),h.value="create",g.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),h.value="update",g.visible=!0;break;case"delete":E.value.splice(j,1),h.value="delete";break}},$=H=>{var j,ie,w;if((H==null?void 0:H.buttonName)==="确认"){const z=p.cloneDeep(H==null?void 0:H.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((j=E.value)==null?void 0:j.length)+1});break;case"update":E.value=(ie=E.value)==null?void 0:ie.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=V())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ye=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(D.value=((j=H==null?void 0:H.find(w=>w.key==="stepConfig"))==null?void 0:j.contents)??{},E.value=((ie=H==null?void 0:H.find(w=>w.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>N("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>N("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ks,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ye,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Rt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),x=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}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=H=>{var j;d.value=H,l("change",(j=V())==null?void 0:j.compData)},N=(H,j)=>{var ie,w;switch(H){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(j,1),c.value="delete";break}},$=H=>{var j,ie,w,z;if((H==null?void 0:H.buttonName)==="确认"){const k=p.cloneDeep(H==null?void 0:H.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(ie=x.value)==null||ie.push({...k,index:((j=x.value)==null?void 0:j.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(z=V())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ye=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(d.value=((j=H==null?void 0:H.find(w=>w.key==="timeLineConfig"))==null?void 0:j.contents)??{},x.value=((ie=H==null?void 0:H.find(w=>w.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>N("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>N("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ye,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Qs=Rt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Zs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Rt._export_sfc(Zs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=i,g=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var z;const w=p.cloneDeep(s.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(le=>{var Fe;T.push((Fe=Object.values(le))==null?void 0:Fe[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(w,z,k,A)=>{var le;let T={};((le=w==null?void 0:w[0])==null?void 0:le.contents)==="详情"&&(g.value=!0,T[z]=w,d.value=w==null?void 0:w.filter(Fe=>(Fe==null?void 0:Fe.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},N=w=>{var Fe,ot,Ie,je;const z=(ot=(Fe=Object.values(p.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:ot.filter(we=>(we==null?void 0:we.key)==="tableContentName"),k=(je=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:je.filter(we=>(we==null?void 0:we.key)!=="tableContentName"),A=k==null?void 0:k.map((we,I)=>{var te;return I===w.index&&(we==null?void 0:we.comp)==="Table"&&(we.compData=(te=we.compData)==null?void 0:te.map(ee=>{var he,Ue;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ue=(he=w.content)==null?void 0:he.map(st=>{let q={};for(let M in st)M!=="id"&&(q[M]=st[M]);return q}))==null?void 0:Ue.map(st=>Object.values(st))),ee})),we});A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let we in T)le[we]=A;h.value=le},$=()=>{g.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=w=>{var Fe,ot,Ie,je;const z=(ot=(Fe=Object.values(p.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:ot.filter(we=>(we==null?void 0:we.key)==="tableContentName"),k=(je=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:je.filter(we=>(we==null?void 0:we.key)!=="tableContentName"),A=k==null?void 0:k.map((we,I)=>(I===w.index&&(we.compData=w.contents),we));A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let we in T)le[we]=A;h.value=le},ye=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),g.value=!1,h.value={},D.value={},E.value=void 0},H=()=>{g.value=!1,h.value={},D.value={},E.value=void 0},j=w=>{x("change",w,"methodData")},ie=w=>ma(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:T,index:(A==null?void 0:A.id)??T,onContentClick:_,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:H},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(A.comp)),{itemData:A==null?void 0:A.compData,onChange:N,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:V,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ye,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Rt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Ct="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=a=>{var s,l;let i=a.trim();if((i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"){let c=(l=(s=i==null?void 0:i.replace(":",Ct))==null?void 0:s.split(Ct))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},uc=a=>{var s;let i=a.trim();return(i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"&&((s=Ga(i,","))==null?void 0:s.length)===1},pc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),dc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),fc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),wa=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Ea=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},hc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Lo=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},Ga=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Lo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Lo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},vc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),gc=a=>{var i,s,l,c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct;if(fc(a)){let Ke={},be=(l=(s=(i=a==null?void 0:a.replace(":",Ct))==null?void 0:i.split(Ct))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),De="",Qe="",pe=(d=(c=a==null?void 0:a.replace(":",Ct))==null?void 0:c.split(Ct))==null?void 0:d[1];if((pe==null?void 0:pe[0])==="("&&(Qe=(h=(g=(x=pe==null?void 0:pe.split("("))==null?void 0:x[1])==null?void 0:g.split(")"))==null?void 0:h[0],pe=(E=(D=pe==null?void 0:pe.replace(")",Ct))==null?void 0:D.split(Ct))==null?void 0:E[1]),((_=Ga(pe,"/"))==null?void 0:_.length)>1)De=(N=Ga(pe,"/"))==null?void 0:N.map(Ae=>Ae==null?void 0:Ae.replaceAll("/","").replaceAll("'",""));else if(pe.includes("{")||pe.includes("("))if(pe.includes("{")?De=De+((ie=(j=(H=(ye=(V=($=pe==null?void 0:pe.split("{"))==null?void 0:$[1])==null?void 0:V.split("}"))==null?void 0:ye[0])==null?void 0:H.replaceAll(":","/").replaceAll("'",""))==null?void 0:j.replaceAll("[","(["))==null?void 0:ie.replaceAll("]","])"))+"[":De=De+((le=(T=(A=(k=(z=(w=pe==null?void 0:pe.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:le.replaceAll("]","])"))+"[",!((Fe=pe==null?void 0:pe.split(")"))!=null&&Fe[1]))De=De+((je=(Ie=(ot=pe==null?void 0:pe.split("["))==null?void 0:ot[1])==null?void 0:Ie.split("]"))==null?void 0:je[0])+"]";else{const Ae=(ee=(te=(I=(we=pe==null?void 0:pe.split(")"))==null?void 0:we[1])==null?void 0:I.replace("[",Ct))==null?void 0:te.split(Ct))==null?void 0:ee[1];if(pe!=null&&pe.includes("?"))De=((he=pe==null?void 0:pe.split("?"))==null?void 0:he[1])+"&&"+((st=(Ue=pe==null?void 0:pe.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ae){const Le=Ae.lastIndexOf("]"),We=Ae.substring(0,Le)+Ct+Ae.substring(Le+1);De=De+((q=We==null?void 0:We.split(Ct))==null?void 0:q[0])+"]"}else De=(ke=(me=(M=a==null?void 0:a.replace(":",Ct))==null?void 0:M.split(Ct))==null?void 0:me[1])==null?void 0:ke.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Ye=(Ve=(Me=a==null?void 0:a.replace(":",Ct))==null?void 0:Me.split(Ct))==null?void 0:Ve[1])==null?void 0:Ye.replaceAll("'","");else{let Ae=(Q=(lt=(qe=a==null?void 0:a.replace(":",Ct))==null?void 0:qe.split(Ct))==null?void 0:lt[1])==null?void 0:Q.replaceAll("'","");De=((ze=(nt=(tt=Ae==null?void 0:Ae.split("?"))==null?void 0:tt[1])==null?void 0:nt.split(":"))==null?void 0:ze[0])+"&&"+((ce=Ae==null?void 0:Ae.split("?"))==null?void 0:ce[0])}return Ke[be]=Qe!==""?Qe+"$##"+De:De,{groupName:"",formContents:[[Ke]]}}else{let Ke={},be="",De="";if(a.includes("#")){be=(re=(oe=a==null?void 0:a.split("#"))==null?void 0:oe[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?De=De+((W=(C=(m=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:m.split("}"))==null?void 0:C[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((Z=(F=(v=(Y=Qe==null?void 0:Qe.split("("))==null?void 0:Y[1])==null?void 0:v.split(")"))==null?void 0:F[0])==null?void 0:Z.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((ve=(ue=(P=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:P.split(Ct))==null?void 0:ue[1])==null?void 0:ve.slice(0,((se=(X=(R=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:R.split(Ct))==null?void 0:X[1])==null?void 0:se.length)-1))}else{let Qe=(G=(ae=(K=a==null?void 0:a.split("]"))==null?void 0:K[0])==null?void 0:ae.split("["))==null?void 0:G[1];if((_e=Qe==null?void 0:Qe.split(":"))==null||_e.forEach((pe,Ae)=>{var Le;((Le=Qe==null?void 0:Qe.split(":"))==null?void 0:Le.length)-1===Ae&&(be=pe==null?void 0:pe.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((fe=(L=(Ee=(de=a==null?void 0:a.split("]"))==null?void 0:de[1])==null?void 0:Ee.replace(":",Ct).split(Ct))==null?void 0:L[1])==null?void 0:fe.replaceAll("'",""))??"";else{let pe=(ge=(Ne=(Oe=(Je=(Be=(ne=p.cloneDeep(a))==null?void 0:ne.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Oe[0])==null?void 0:Ne.replaceAll("{","").replaceAll("}",""))==null?void 0:ge.replaceAll("'","").replaceAll(":","/"),Ae="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Le=>{Ae=Ae===""?Ae+(Le==null?void 0:Le.replaceAll("'","")):Ae+":"+(Le==null?void 0:Le.replaceAll("'",""))}),De=pe+"["+Ae+"]"}}return Ke[be]=De,{groupName:"",formContents:[[Ke]]}}},mc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),yc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},bc=a=>{var d,x,g,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=wa(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(g=wa(p.cloneDeep(i)))==null?void 0:g.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(D=p.cloneDeep(s))==null?void 0:D.map(E=>{var _,N;return E=(N=(_=E.replace(")",Ct))==null?void 0:_.split(Ct))==null?void 0:N[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var $,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F;let _=(V=($=p.cloneDeep(E))==null?void 0:$.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",Ct).split(Ct);if(((H=(ye=p.cloneDeep(_))==null?void 0:ye[0])==null?void 0:H.replaceAll("'",""))==="输入"){if(!((ie=(j=p.cloneDeep(_))==null?void 0:j[1])!=null&&ie.includes("["))&&!((z=(w=p.cloneDeep(_))==null?void 0:w[1])!=null&&z.includes("("))){Re.IsJson((k=p.cloneDeep(_))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(_))==null?void 0:A[1].replaceAll("'",'"')));return}if(((le=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:le[0])==="["){let Z=(je=(Fe=p.cloneDeep(_))==null?void 0:Fe[1])==null?void 0:je.slice(1,((Ie=(ot=p.cloneDeep(_))==null?void 0:ot[1])==null?void 0:Ie.length)-1);(I=(we=wa(Z))==null?void 0:we.filter(P=>P!==","))==null||I.forEach(P=>{var ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae;let ue={},R=(ae=(K=p.cloneDeep(P))==null?void 0:K.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;(_e=R==null?void 0:R[1])!=null&&_e.includes("(")?(se=(Ne=(Oe=(Je=(Be=(ne=(fe=(L=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:L.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Oe[0])==null?void 0:Ne.replaceAll(":","/").replaceAll("'",""),(ct=(ge=p.cloneDeep(R))==null?void 0:ge[1])!=null&&ct.includes("[")&&(se=p.cloneDeep(se)+"["+((Ae=(pe=(Qe=(De=(be=(Ke=p.cloneDeep(R))==null?void 0:Ke[1])==null?void 0:be.split("["))==null?void 0:De[1])==null?void 0:Qe.split("]"))==null?void 0:pe[0])==null?void 0:Ae.replaceAll("'",""))+"]")):se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'",""),ue[X]=se,c.push(ue)})}}else{if(!((ee=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ee.includes("["))&&!((Ue=(he=p.cloneDeep(_))==null?void 0:he[1])!=null&&Ue.includes("("))){Re.IsJson((st=p.cloneDeep(_))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((q=p.cloneDeep(_))==null?void 0:q[1].replaceAll("'",'"')));return}if(((me=(M=p.cloneDeep(_))==null?void 0:M[1])==null?void 0:me[0])==="["){let Z=(Ye=(ke=p.cloneDeep(_))==null?void 0:ke[1])==null?void 0:Ye.slice(1,((Ve=(Me=p.cloneDeep(_))==null?void 0:Me[1])==null?void 0:Ve.length)-1);(lt=(qe=wa(Z))==null?void 0:qe.filter(P=>P!==","))==null||lt.forEach(P=>{var ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It;let ue={},R=(ae=(K=p.cloneDeep(P))==null?void 0:K.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;if(!((_e=R==null?void 0:R[1])!=null&&_e.includes("(")))se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'","");else if(se=(Je=(Be=(ne=(fe=(L=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:L.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.replace("(",Ct))==null?void 0:Be.split(Ct))==null?void 0:Je[1],se=(Ne=(Oe=yc(p.cloneDeep(se),Ct))==null?void 0:Oe.split(Ct))==null?void 0:Ne[0],!(se!=null&&se.includes("(")))se=(ge=p.cloneDeep(se))==null?void 0:ge.replaceAll(":","/").replaceAll("'",""),(Ke=(ct=p.cloneDeep(R))==null?void 0:ct[1])!=null&&Ke.includes("[")&&(se=p.cloneDeep(se)+"["+((Ce=(O=(We=(Le=(De=(be=p.cloneDeep(R))==null?void 0:be[1])==null?void 0:De.split("["))==null?void 0:Le[((Ae=(pe=(Qe=p.cloneDeep(R))==null?void 0:Qe[1])==null?void 0:pe.split("["))==null?void 0:Ae.length)-1])==null?void 0:We.split("]"))==null?void 0:O[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let Bt="";(ut=Ea(se,":"))==null||ut.forEach(xt=>{var wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In;if(!(xt!=null&&xt.includes("(")))Bt=Bt===""?Bt+((wt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:wt.replaceAll("'","")):Bt+"/"+((Ot=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let gn=(Dn=(fn=(wn=(qt=(Vt=(Lt=(Ut=(At=p.cloneDeep(xt))==null?void 0:At.replaceAll("{",""))==null?void 0:Ut.replaceAll("}",""))==null?void 0:Lt.replace("(",Ct))==null?void 0:Vt.split(Ct))==null?void 0:qt[1])==null?void 0:wn.split(")"))==null?void 0:fn[0])==null?void 0:Dn.replaceAll(":","/").replaceAll("'","");gn=gn+"["+((In=(vn=(Tn=(hn=(Sn=p.cloneDeep(xt))==null?void 0:Sn.split("["))==null?void 0:hn[1])==null?void 0:Tn.split("]"))==null?void 0:vn[0])==null?void 0:In.replaceAll("'",""))+"]",Bt=Bt===""?Bt+"["+gn+"]":Bt+"/["+gn+"]"}}),se=Bt+"["+((It=(vt=(pt=(He=(ft=(et=p.cloneDeep(R))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Se=(rt=p.cloneDeep(R))==null?void 0:rt[1])==null?void 0:Se.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:It.replaceAll("'",""))+"]"}ue[X]=se,l.push(ue)})}else{let Z=(ze=(Q=p.cloneDeep(_))==null?void 0:Q[1])==null?void 0:ze.slice(1,((nt=(tt=p.cloneDeep(_))==null?void 0:tt[1])==null?void 0:nt.length)-1),P={},ue=(W=(C=(re=(oe=(ce=p.cloneDeep(Z))==null?void 0:ce.split("]"))==null?void 0:oe[0])==null?void 0:re.split(":"))==null?void 0:C[((m=(dt=(Xe=(Te=p.cloneDeep(Z))==null?void 0:Te.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:m.length)-1])==null?void 0:W.replaceAll("'",""),R=((F=(v=(Y=p.cloneDeep(Z))==null?void 0:Y.split("]"))==null?void 0:v[0])==null?void 0:F.replaceAll("'",""))+"]";P[ue]=R,l.push(P)}}}),{output:l,input:c}},kc=jt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(kc),Mn=jt.useMenuState(p.pinia),{activeMenuPath:aa}=p.storeToRefs(Mn),Da=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Da),xc=Re.useOriginalState(p.pinia),{originalPath:wc}=p.storeToRefs(xc),Qt=wc.value,Dc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const g=x.match(i);g&&d.push({idx:Number(g[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,g)=>x.idx-g.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],g=[];c.forEach(_=>{var N;return(((N=_.names)==null?void 0:N.length)>d?x:g).push(_)});const h=g.map(_=>_.item),D=new Map;for(const _ of x){const N=_.names[_.names.length-d-1].value;D.has(N)||D.set(N,[]),D.get(N).push(_)}return[...Array.from(D.entries()).map(([_,N])=>{var $;return N[0].names.length===1&&(($=N[0].names[0])==null?void 0:$.idx)===-1?N[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(N,d+1)}}),...h]}if(s)return l(s,0)},Aa=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:Dc(a),Bl=async()=>{var d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e;Mn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:x.length)>0){let de=($=(N=(_=(E=(D=(h=(g=i==null?void 0:i.data)==null?void 0:g.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:N.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:$.contents;a=(ye=(V=p.cloneDeep(de))==null?void 0:V[0])==null?void 0:ye.label}let s=aa.value;(ie=aa.value)!=null&&ie.includes(`updateLoading${((H=Xt.value)==null?void 0:H.account)||((j=Xt.value)==null?void 0:j.账号)}`)?s=p.cloneDeep(aa).value:(k=aa.value)!=null&&k.includes(`loading${((w=Xt.value)==null?void 0:w.account)||((z=Xt.value)==null?void 0:z.账号)}`)&&(s=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((T=Xt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Fe=(le=l==null?void 0:l.data)==null?void 0:le.result)==null?void 0:Fe.length)>0){let de="",Ee=[];(Ie=(ot=l==null?void 0:l.data)==null?void 0:ot.result)==null||Ie.forEach(fe=>{var ne,Be,Je,Oe,Ne;((Be=(ne=fe==null?void 0:fe.value)==null?void 0:ne.pageData)==null?void 0:Be.comp)==="Form"&&((Ne=(Oe=(Je=fe==null?void 0:fe.value)==null?void 0:Je.pageData)==null?void 0:Oe.compData)==null||Ne.forEach(ge=>{(ge==null?void 0:ge.key)==="formContent"&&(Ee=[...Ee,...ge==null?void 0:ge.contents])}))});let L=Ee==null?void 0:Ee.find(fe=>(fe==null?void 0:fe.isMain)===!0);if(L?(de=L==null?void 0:L.value,a=L==null?void 0:L.key):de=(q=(st=(Ue=(he=(ee=(te=(I=(we=(je=l==null?void 0:l.data)==null?void 0:je.result)==null?void 0:we[0])==null?void 0:I.value)==null?void 0:te.pageData)==null?void 0:ee.compData)==null?void 0:he.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(fe=>{var ne,Be;return(fe==null?void 0:fe.key)===a||((Be=(ne=fe==null?void 0:fe.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:Be[1])===a}))==null?void 0:q.value,(ke=aa.value)!=null&&ke.includes(`updateLoading${((M=Xt.value)==null?void 0:M.account)||((me=Xt.value)==null?void 0:me.账号)}`)){let fe=[],ne=[];const Be=await p.getInsofDataApi({key:{pageKey:(oe=aa.value.split(Qt+`updateLoading${((ze=Xt.value)==null?void 0:ze.account)||((ce=Xt.value)==null?void 0:ce.账号)}`))==null?void 0:oe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(re=Be==null?void 0:Be.data)==null?void 0:re.result)==null?void 0:Te.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Oe=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ne=>{var ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et;if(((ge=Ne==null?void 0:Ne.key)==null?void 0:ge.type)==="structure"){let ft=(De=(be=(Ke=(ct=Ne==null?void 0:Ne.value)==null?void 0:ct.pageData)==null?void 0:Ke.compData)==null?void 0:be.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:De.contents;if(ft){let rt=await Re.getItemData(ft,sessionStorage.getItem("systemKey"),""),Se=(Le=(Ae=(pe=(Qe=Ne==null?void 0:Ne.value)==null?void 0:Qe.pageData)==null?void 0:pe.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Le.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var It,Bt;if((vt==null?void 0:vt.key)==="formContent"&&((It=vt==null?void 0:vt.contents)==null?void 0:It.some(wt=>Se==null?void 0:Se.find(Ot=>(Ot==null?void 0:Ot.prop)===(wt==null?void 0:wt.prop))))){let wt=He;wt.compData=(Bt=wt.compData)==null?void 0:Bt.map(At=>{var Ut;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(Ut=At.contents)==null?void 0:Ut.map(Lt=>{var Vt;return Se!=null&&Se.find(qt=>(qt==null?void 0:qt.prop)===(Lt==null?void 0:Lt.prop))&&(Lt.value=(Vt=Se==null?void 0:Se.find(qt=>(qt==null?void 0:qt.prop)===(Lt==null?void 0:Lt.prop)))==null?void 0:Vt.value),Lt})),At});let Ot={};for(let At in wt)At!=="id"&&(Ot[At]=wt[At]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((O=(We=Be==null?void 0:Be.data)==null?void 0:We.result)!=null&&O.find(rt=>{var Se,Ze,He,pt;return((Ze=(Se=rt==null?void 0:rt.value)==null?void 0:Se.pageData)==null?void 0:Ze.name)===((pt=(He=Ne==null?void 0:Ne.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ne==null?void 0:Ne.key;rt.pageKey=p.cloneDeep(_n).value+Qt+de,c.push({id:(et=(ut=(Ce=Be==null?void 0:Be.data)==null?void 0:Ce.result)==null?void 0:ut.find(Se=>{var Ze,He,pt,vt;return((He=(Ze=Se==null?void 0:Se.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ne==null?void 0:Ne.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ne==null?void 0:Ne.value})}else{let rt=Ne==null?void 0:Ne.key;rt.pageKey=p.cloneDeep(_n).value+Qt+de,fe.push({key:rt,value:Ne==null?void 0:Ne.value})}}});await Promise.all(Oe),(C=(m=l==null?void 0:l.data)==null?void 0:m.result)==null||C.forEach(Ne=>{var ct,Ke,be;let ge=(ct=p.cloneDeep(Ne))==null?void 0:ct.key;ge.pageKey=p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((be=Xt.value)==null?void 0:be.账号)}`,Mn.setChildMenu(ge.pageKey),c.push({id:Ne==null?void 0:Ne.id,key:ge})})}if(de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(W=c==null?void 0:c[0])!=null&&W.key&&await Da.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(fe==null?void 0:fe.length)>0&&(await p.batchAddInsofDataApi({dataList:fe}),(v=fe==null?void 0:fe[0])!=null&&v.key&&await Da.setLogRecordAsync({type:"保存",data:fe},(F=fe==null?void 0:fe[0])==null?void 0:F.key));const Je=await p.getInsofDataApi({key:{pageKey:(ue=aa.value.split(Qt+`updateLoading${((Z=Xt.value)==null?void 0:Z.account)||((P=Xt.value)==null?void 0:P.账号)}`))==null?void 0:ue[0],systemKey:sessionStorage.getItem("systemKey")}});if(((X=(R=Je==null?void 0:Je.data)==null?void 0:R.result)==null?void 0:X.length)>0){let Oe=[],Ne=(se=l==null?void 0:l.data)==null?void 0:se.result;(ve=p.cloneDeep(Ne))==null||ve.forEach(ge=>{var ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut;if(((ct=ge==null?void 0:ge.key)==null?void 0:ct.type)!=="structure"){let et=(De=(be=(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.result)==null?void 0:be.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:De.map(Ze=>Ze==null?void 0:Ze.id);Oe=[...Oe,...et];let ft=(Le=(Ae=(pe=(Qe=p.cloneDeep(Ne))==null?void 0:Qe.find(Ze=>{var He;return((He=ge==null?void 0:ge.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:pe.value)==null?void 0:Ae.pageData)==null?void 0:Le.name,rt=(Ce=(O=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:O.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Se=(ut=p.cloneDeep(ge))==null?void 0:ut.key;Se.tableId=rt,Se.pageKey=p.cloneDeep(_n).value+Qt+de,ne.push({key:Se,value:ge==null?void 0:ge.value})}}),(Oe==null?void 0:Oe.length)>0&&(Oe=[...new Set(Oe)],await p.batchDeleteInsofDataApi({ids:Oe})),(ae=(K=l==null?void 0:l.data)==null?void 0:K.result)==null||ae.forEach(ge=>{var Ke,be,De;let ct=(Ke=p.cloneDeep(ge))==null?void 0:Ke.key;ct.pageKey=p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((be=Xt.value)==null?void 0:be.account)||((De=Xt.value)==null?void 0:De.账号)}`,Mn.setChildMenu(ct.pageKey),c.push({id:ge==null?void 0:ge.id,key:ct})})}(ne==null?void 0:ne.length)>0&&(await p.batchAddInsofDataApi({dataList:ne}),(G=fe==null?void 0:fe[0])!=null&&G.key&&await Da.setLogRecordAsync({type:"保存",data:ne},(_e=ne==null?void 0:ne[0])==null?void 0:_e.key)),p.ElMessage.success("保存成功")}}else{if((Ve=(Me=l==null?void 0:l.data)==null?void 0:Me.result)==null||Ve.forEach(fe=>{var Be;let ne=(Be=p.cloneDeep(fe))==null?void 0:Be.key;ne.pageKey=p.cloneDeep(_n).value+Qt+de,Mn.setChildMenu(ne.pageKey),c.push({id:fe==null?void 0:fe.id,key:ne})}),de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1),Mn.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Da.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await Re.loadingConstruct(p.cloneDeep(_n).value+Qt+de,p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((lt=Xt.value)==null?void 0:lt.account)||((Q=Xt.value)==null?void 0:Q.账号)}`),Mn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((tt=Xt.value)==null?void 0:tt.account)||((nt=Xt.value)==null?void 0:nt.账号)}`),p.ElMessage.success("保存成功")}}Mn.setImportLoading(!1)},Cc={key:0,class:"method-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=Re.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),g=Re.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(g),D=jt.useModelComp(p.pinia),E=e.ref(!1),_=jt.useMenuState(p.pinia),N=p.useLoginState(p.pinia),{itemData:$,isEdit:V,routeToChildPath:ye,tableViewContents:H,lockingPage:j,payloadTypes:ie}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(N),T=e.ref(!1),le=async()=>{var q,M;(q=i.value)!=null&&q.find(me=>(me==null?void 0:me.buttonName)==="保存")&&await ee((M=i.value)==null?void 0:M.find(me=>(me==null?void 0:me.buttonName)==="保存")),await Bl()};e.watch(()=>$.value,async()=>{V.value==="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Fe=()=>{d.value=!1,x.value=void 0},ot=q=>q.map(M=>{const me={};for(const ke in M){const Me=M[ke];if(ke.includes(h.value)){const Ve=ke.split(h.value);let Ye=me;Ve.forEach((qe,lt)=>{lt===Ve.length-1?Ye[qe]=Me:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else me[ke]=Me}return me}),Ie=async(q,M,me=[])=>{var Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt;let ke=(Me=p.cloneDeep(M))==null?void 0:Me.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(q!=null&&q.includes("[")){let m=(Q=(lt=(qe=(Ye=(Ve=p.cloneDeep(q))==null?void 0:Ve.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Q.split(":"),C="";if(m!=null&&m[0]){let W=(tt=ke==null?void 0:ke.find(Y=>(Y==null?void 0:Y.name)===(m==null?void 0:m[0])))==null?void 0:tt.compData;if(!W){let Y=(nt=q==null?void 0:q.split("["))==null?void 0:nt[0],v=await Re.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",me);W=(ze=v==null?void 0:v.find(F=>(F==null?void 0:F.name)===(m==null?void 0:m[0])))==null?void 0:ze.compData}W==null||W.forEach(Y=>{var v,F,Z,P,ue,R;if((Y==null?void 0:Y.key)==="formContent")(v=Y==null?void 0:Y.contents)==null||v.forEach(X=>{var se;(X==null?void 0:X.key)===(m==null?void 0:m[1])&&(Array.isArray(X==null?void 0:X.value)?C=X==null?void 0:X.value:C=(se=X==null?void 0:X.value)==null?void 0:se.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let X=[],se=(F=W==null?void 0:W.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:F.contents,ve=(m==null?void 0:m[1])??"";if(se!=null&&se.every(K=>Array.isArray(K))){let K=Re.getColumnChild((ue=se==null?void 0:se[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(R=Y.contents)==null||R.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(_e=>!(_e!=null&&_e.id)),K==null||K.forEach((_e,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===_e.prop)&&(G[_e.prop]=Ee)}),X.push(G)}),X=ot(X)}else{let K=(Z=se==null?void 0:se.map(ae=>ae==null?void 0:ae.label))==null?void 0:Z.filter(ae=>ae!=="操作");(P=Y.contents)==null||P.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(_e=>!(_e!=null&&_e.id)),K==null||K.forEach((_e,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===_e)&&(G[_e]=Ee)}),X.push(G)})}C=X}})}return C}else if(q!=null&&q.includes("/")){let m={};return(ce=p.cloneDeep(ke))==null||ce.forEach((C,W)=>{var Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne;if((C==null?void 0:C.comp)==="Table"){let Be=Array.isArray((F=(v=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:v.contents)==null?void 0:F[0])?(R=(ue=(P=(Z=C==null?void 0:C.compData)==null?void 0:Z.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:P.contents)==null?void 0:ue[0])==null?void 0:R.some(ge=>ge==null?void 0:ge.children):[],Je=(ve=(se=(X=C==null?void 0:C.compData)==null?void 0:X.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(ge=>(ge!=null&&ge.find(ct=>ct==null?void 0:ct.id)&&(ge=ge.slice(1)),ge)),Oe=(de=(_e=(G=(ae=(K=C==null?void 0:C.compData)==null?void 0:K.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:ae.contents)==null?void 0:G[0])==null?void 0:_e[0])==null?void 0:de.label,Ne=(L=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:L.contents;if(Be)(Be==null?void 0:Be.length)===0?m[C.name]=m!=null&&m[C.name]?m[C.name]:Re.tableToForm(Je,Ne):m[Oe]=Re.tableToForm(Je,Ne);else{const ge=[];Ne=Ne.slice(1,Ne.length-1),Ne==null||Ne.forEach((ct,Ke)=>{Je==null||Je.forEach(be=>{ge.push({key:ct.label+be[0],value:be[Ke+1]})})}),m["form"+W]=ge}}else{const Be=(ne=(fe=C.compData)==null?void 0:fe.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:ne.contents;m!=null&&m.form||(m.form=[]);const Je=[];Be==null||Be.forEach(Oe=>{Oe.key!==""&&(Oe={key:(Oe==null?void 0:Oe.key)??(Oe==null?void 0:Oe.label),value:Oe==null?void 0:Oe.value},Je.push(Oe))}),m.form=[...Je,...p.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(q==="createInsofDataApi"){let m=(oe=p.cloneDeep(M))==null?void 0:oe[0];return m={comp:(re=p.cloneDeep(m))==null?void 0:re.comp,compData:(Te=p.cloneDeep(m))==null?void 0:Te.compData,name:(Xe=p.cloneDeep(m))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:m}}}return q}},je=async(q,M,me)=>{var Ve,Ye,qe;let ke=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Me=ke==null?void 0:ke.find(lt=>(lt==null?void 0:lt.name)===(me==null?void 0:me[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let lt={};for(let re in p.cloneDeep(q))p.cloneDeep(q)[re]!=="loginUser"?lt[re]=p.cloneDeep(q)[re]:lt[re]=((Ve=A.value)==null?void 0:Ve.account)||((Ye=A.value)==null?void 0:Ye.账号);let Q=[],tt=lt;Array.isArray(q)||(tt=[lt]),tt==null||tt.forEach(re=>{Q.push({[re[me[1]]]:re})});let nt=[],ze=Q==null?void 0:Q.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]});ke==null||ke.forEach(re=>{var Te;(re==null?void 0:re.name)===(me==null?void 0:me[0])&&((Te=re==null?void 0:re.compData)==null||Te.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(m=>{m!=null&&m.some(C=>ze.includes(C))&&nt.push({[m.find(C=>C.id).id]:m.find(C=>ze.includes(C))})}))}))});let ce=nt==null?void 0:nt.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]}),oe=[];if(ce==null||ce.forEach(re=>{var dt;let Te=(dt=nt==null?void 0:nt.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Q==null?void 0:Q.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0])===Te});oe.push({id:parseInt(re),value:{tableData:Xe[Te]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((Me==null?void 0:Me.comp)==="Form"){let lt=p.cloneDeep(Me);lt.compData=(qe=lt.compData)==null?void 0:qe.map(nt=>{var ze;return(nt==null?void 0:nt.key)==="formContent"&&(nt.contents=(ze=nt.contents)==null?void 0:ze.map(ce=>((ce==null?void 0:ce.key)===(me==null?void 0:me[1])&&(ce.value=(q==null?void 0:q[ce==null?void 0:ce.prop])||q),ce))),nt});let Q={};for(let nt in lt)nt!=="id"&&(Q[nt]=lt[nt]);let tt=[];if(tt.push({id:Me==null?void 0:Me.id,keyType:me==null?void 0:me[1],value:{pageData:Q}}),(tt==null?void 0:tt.length)>0)return tt}}},we=async(q,M,me)=>{var Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe;let ke=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Me=ke==null?void 0:ke.find(re=>(re==null?void 0:re.name)===(me==null?void 0:me[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let re={};for(let Te in p.cloneDeep(q))p.cloneDeep(q)[Te]!=="loginUser"?re[Te]=p.cloneDeep(q)[Te]:re[Te]=((Ve=A.value)==null?void 0:Ve.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((Me==null?void 0:Me.comp)==="Form"){let re=p.cloneDeep(Me),Te=Object.keys(q),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var F,Z;(v==null?void 0:v.key)==="formContent"&&((Z=(F=p.cloneDeep(v))==null?void 0:F.contents)==null||Z.forEach(P=>{var ue;Te.includes(P==null?void 0:P.key)&&(P==null?void 0:P.value)===((ue=A.value)==null?void 0:ue.姓名)&&(Xe=P==null?void 0:P.key)}))});let dt=[];(Q=Object.values(q[Xe]))==null||Q.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async v=>{var R,X,se,ve,K,ae,G,_e,de,Ee,L,fe;let F="";(ae=(K=(ve=(se=(X=(R=p.cloneDeep(v))==null?void 0:R.split("("))==null?void 0:X[1])==null?void 0:se.split(")"))==null?void 0:ve[0])==null?void 0:K.split(":"))==null||ae.forEach(ne=>{F=F===""?F+ne.replaceAll("'",""):F+"/"+ne.replaceAll("'","")});let Z=[];(fe=(L=(Ee=(de=(_e=(G=p.cloneDeep(v))==null?void 0:G.split("<"))==null?void 0:_e[1])==null?void 0:de.split(">"))==null?void 0:Ee[0])==null?void 0:L.split(":"))==null||fe.forEach(ne=>{Z.push(ne.replaceAll("'",""))});const P=await Re.getItemData(F,sessionStorage.getItem("systemKey"),"");let ue="";return P==null||P.forEach(ne=>{var Be;ne.name===(Z==null?void 0:Z[0])&&((Be=ne==null?void 0:ne.compData)==null||Be.forEach(Je=>{var Oe;(Je==null?void 0:Je.key)==="formContent"&&((Oe=Je.contents)==null||Oe.forEach(Ne=>{(Ne==null?void 0:Ne.key)===(Z==null?void 0:Z[1])&&(ue=Ne==null?void 0:Ne.value)}))}))}),{[v]:ue}}),C=await Promise.all(m);re.compData=(nt=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:nt.map(v=>{var F,Z;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(Z=(F=p.cloneDeep(v))==null?void 0:F.contents)==null?void 0:Z.map(P=>{var ue,R,X,se;return(ue=q[Xe])!=null&&ue[P==null?void 0:P.key]&&(q[Xe][P==null?void 0:P.key].includes("(")?P.value=(R=C==null?void 0:C.find(ve=>{var K;return((K=Object.keys(ve))==null?void 0:K[0])===q[Xe][P==null?void 0:P.key]}))==null?void 0:R[q[Xe][P==null?void 0:P.key]]:P.value=(se=(X=p.cloneDeep(q))==null?void 0:X[Xe])==null?void 0:se[P==null?void 0:P.key]),P})),v});const W=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((ze=W==null?void 0:W.data)==null?void 0:ze.type)==="success"&&((oe=(ce=W==null?void 0:W.data)==null?void 0:ce.result)==null||oe.forEach(v=>{var F,Z;((Z=(F=v==null?void 0:v.value)==null?void 0:F.pageData)==null?void 0:Z.name)===(me==null?void 0:me[0])&&(Y=v.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:re}}))}}},I=(q,M="",me={})=>{for(const[ke,Me]of Object.entries(q)){const Ve=M?`${M}.${ke}`:ke;Me!==null&&typeof Me=="object"&&!Array.isArray(Me)&&Object.prototype.toString.call(Me)!=="[object Date]"?I(Me,Ve,me):me[Ve]=Me}return me},te=async(q,M,me,ke)=>{var Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se;let Me=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Ve=Me==null?void 0:Me.find(ve=>(ve==null?void 0:ve.name)===(me==null?void 0:me[0]));if(Ve){if(!(me!=null&&me[1])&&(Ve==null?void 0:Ve.comp)==="Table"){let ve={},K=[],ae=(qe=(Ye=Ve==null?void 0:Ve.compData)==null?void 0:Ye.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(de=>Array.isArray(de))?K=(Q=Re.getColumnChild((lt=ae==null?void 0:ae[0])==null?void 0:lt.filter(de=>(de==null?void 0:de.label)!=="操作")))==null?void 0:Q.map(de=>de==null?void 0:de.prop):K=ae==null?void 0:ae.map(de=>de==null?void 0:de.label);for(let de in p.cloneDeep(q))if(p.cloneDeep(q)[de]!=="loginUser"){let Ee=I(p.cloneDeep(q)[de]),L={};for(let fe in Ee)if(K!=null&&K.find(ne=>ne===fe))L[fe]=Ee[fe];else if(K!=null&&K.find(ne=>(ne==null?void 0:ne.toUpperCase())===(fe==null?void 0:fe.toUpperCase()))){let ne=K==null?void 0:K.find(Be=>(Be==null?void 0:Be.toUpperCase())===(fe==null?void 0:fe.toUpperCase()));L[ne]=Ee[fe]}ve[de]=L}else ve[de]=((tt=A.value)==null?void 0:tt.account)||((nt=A.value)==null?void 0:nt.账号);let G=await p.getInsofDataApi({keyLikes:{tableId:Ve==null?void 0:Ve.id}});if(((ce=(ze=G==null?void 0:G.data)==null?void 0:ze.result)==null?void 0:ce.length)>0){let de=(re=(oe=G==null?void 0:G.data)==null?void 0:oe.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(de==null?void 0:de.length)>0&&await p.batchDeleteInsofDataApi({ids:de})}let _e=[];if((Te=Ve==null?void 0:Ve.compData)!=null&&Te.find(de=>(de==null?void 0:de.key)==="pageColumn")&&((m=(dt=(Xe=Ve==null?void 0:Ve.compData)==null?void 0:Xe.find(de=>(de==null?void 0:de.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const de=await p.getInsofDataApi({id:Ve==null?void 0:Ve.tableId});let Ee=((v=(Y=(W=(C=de==null?void 0:de.data)==null?void 0:C.result)==null?void 0:W[0])==null?void 0:Y.key)==null?void 0:v.pageKey)??"";(F=Object.values(ve))==null||F.forEach(L=>{_e.push({key:{type:"data",pageKey:Ee,tableId:Ve==null?void 0:Ve.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:L}})})}else(Z=Object.values(ve))==null||Z.forEach(de=>{_e.push({key:{type:"data",pageKey:M,tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})});(_e==null?void 0:_e.length)>0&&await p.batchAddInsofDataApi({dataList:_e})}else if(!(me!=null&&me[1])&&(Ve==null?void 0:Ve.comp)==="Form"){let ve=p.cloneDeep(Ve);ve.compData=(ue=(P=p.cloneDeep(ve))==null?void 0:P.compData)==null?void 0:ue.map(G=>{var _e,de;return(G==null?void 0:G.key)==="formContent"&&(G.contents=(de=(_e=p.cloneDeep(G))==null?void 0:_e.contents)==null?void 0:de.map(Ee=>{var L,fe;return(L=p.cloneDeep(q))!=null&&L[Ee==null?void 0:Ee.key]&&(Ee.value=(fe=p.cloneDeep(q))==null?void 0:fe[Ee==null?void 0:Ee.key]),Ee})),G});const K=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((R=K==null?void 0:K.data)==null?void 0:R.type)==="success"&&((se=(X=K==null?void 0:K.data)==null?void 0:X.result)==null||se.forEach(G=>{var _e,de;((de=(_e=G==null?void 0:G.value)==null?void 0:_e.pageData)==null?void 0:de.name)===(me==null?void 0:me[0])&&(ae=G.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:ve}}))}}},ee=async q=>{var M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te;_.setImportLoading(!0);try{if(q.api){let Xe=new WeakMap;(me=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:M.filter(R=>{var X,se;return((X=R==null?void 0:R.key)==null?void 0:X.pageKey)!=="menu"&&((se=R==null?void 0:R.key)==null?void 0:se.pageKey)!=="secret"}))==null||me.forEach(R=>{Xe[R.key.pageKey]?Xe[R.key.pageKey]=[...Xe[R.key.pageKey],R]:Xe[R.key.pageKey]=[R]});let m=await Re.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(m=m==null?void 0:m.map(R=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne;if((R==null?void 0:R.comp)==="Form")R.compData=(X=R.compData)==null?void 0:X.map(Be=>{var Je;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(Je=Be.contents)==null?void 0:Je.map(Oe=>{var Ne;if((Oe==null?void 0:Oe.value)===""&&(Oe==null?void 0:Oe.type)==="Select"){let ge=Re.judgeContents((Ne=p.cloneDeep(Oe))==null?void 0:Ne.optionUrl,Xe);Oe.value=Oe.value||ge}return Oe})),Be});else if((R==null?void 0:R.comp)==="Table"&&(se=R.compData)!=null&&se.find(Be=>(Be==null?void 0:Be.key)==="pageColumn")){let Be=(K=(ve=R.compData)==null?void 0:ve.find(ge=>(ge==null?void 0:ge.key)==="pageColumn"))==null?void 0:K.contents,Je=((G=(ae=R.compData)==null?void 0:ae.find(ge=>(ge==null?void 0:ge.key)==="pageGroup"))==null?void 0:G.contents)??"",Oe=(Ee=(de=(_e=Be==null?void 0:Be.split("["))==null?void 0:_e[1])==null?void 0:de.split("]"))==null?void 0:Ee[0];C=((L=Be==null?void 0:Be.split("["))==null?void 0:L[0])+((ne=(fe=H.value)==null?void 0:fe.find(ge=>(ge==null?void 0:ge.key)===Oe))==null?void 0:ne.value)}return R}),!(C===""||C==="")){const R=await Re.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);m=m==null?void 0:m.map(X=>{var se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je;if((X==null?void 0:X.comp)==="Table"&&(se=X.compData)!=null&&se.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn")){let Oe=(K=(ve=X.compData)==null?void 0:ve.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:K.contents,Ne=((G=(ae=X.compData)==null?void 0:ae.find(be=>(be==null?void 0:be.key)==="pageGroup"))==null?void 0:G.contents)??"",ge=(Ee=(de=(_e=Oe==null?void 0:Oe.split("["))==null?void 0:_e[1])==null?void 0:de.split("]"))==null?void 0:Ee[0],ct=((L=Oe==null?void 0:Oe.split("["))==null?void 0:L[0])+((ne=(fe=H.value)==null?void 0:fe.find(be=>(be==null?void 0:be.key)===ge))==null?void 0:ne.value),Ke=(Be=R==null?void 0:R.find(be=>(be==null?void 0:be.name)===(Ne===""?c==null?void 0:c.compName:Ne)))==null?void 0:Be.compData;X.compData=(Je=X.compData)==null?void 0:Je.map(be=>{var De;return(be==null?void 0:be.key)==="tableContents"&&(be.contents=(De=Ke==null?void 0:Ke.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:De.contents),be})}return X})}let W={};if(((Me=(ke=q==null?void 0:q.extraValues)==null?void 0:ke.input)==null?void 0:Me.length)>0){const R=(Ye=(Ve=q==null?void 0:q.extraValues)==null?void 0:Ve.input)==null?void 0:Ye.map(async X=>{var se;he!=null&&he.find(ve=>ve===X)?W=await Ie(X,m):W[Object.keys(X)[0]]=await Ie((se=Object.values(X))==null?void 0:se[0],m,Xe)});await Promise.all(R)}else W=await Ie("/",m);let Y=!1;(lt=(qe=q==null?void 0:q.extraValues)==null?void 0:qe.output)==null||lt.forEach(R=>{var X,se;(se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc")&&(Y=!0)});let v;if(Y){const R=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(q.api,W,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{R.close()})}else v=await p.axios.post(q.api,W,{headers:{"Content-Type":"application/json"}});let F=(ze=(nt=(tt=(Q=p.cloneDeep(q))==null?void 0:Q.extraValues)==null?void 0:tt.output)==null?void 0:nt.map(R=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne;if(!((se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc"))){let ge=(L=(Ee=(de=(K=p.cloneDeep((ve=Object.values(R))==null?void 0:ve[0]))==null?void 0:K.split("["))==null?void 0:de[((_e=(G=p.cloneDeep((ae=Object.values(R))==null?void 0:ae[0]))==null?void 0:G.split("["))==null?void 0:_e.length)-1])==null?void 0:Ee.split("]"))==null?void 0:L[0],ct=ge==null?void 0:ge.split(":"),Ke=(Be=p.cloneDeep((fe=Object.values(R))==null?void 0:fe[0]))==null?void 0:Be.substring(0,p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]).lastIndexOf("["));if(Ke=(Oe=p.cloneDeep(Ke))==null?void 0:Oe.slice(0,((Je=p.cloneDeep(Ke))==null?void 0:Je.length)-1),Ke!=null&&Ke.includes("[")){let be="";if((Ne=Ea(Ke,"/"))==null||Ne.forEach(De=>{var Qe,pe,Ae,Le,We,O,Ce;if(!(De!=null&&De.includes("[")))be=be===""?be+De.replaceAll("/",""):be+"/"+De.replaceAll("/","");else{let ut=p.cloneDeep(De).slice(1,((Qe=p.cloneDeep(De))==null?void 0:Qe.length)-1),et=(O=(We=(Le=(Ae=(pe=p.cloneDeep(ut))==null?void 0:pe.split("["))==null?void 0:Ae[1])==null?void 0:Le.split("]"))==null?void 0:We[0])==null?void 0:O.split(":"),ft="",rt=(Ce=m==null?void 0:m.find(Se=>(Se==null?void 0:Se.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Se=>{var Ze;(Se==null?void 0:Se.key)==="formContent"&&((Ze=Se==null?void 0:Se.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),be=be===""?be+ft.replaceAll("/",""):be+"/"+ft.replaceAll("/","")}}),Ke=be,Ke[(Ke==null?void 0:Ke.length)-1]!=="/")return Ke}}}))==null?void 0:ze.filter(R=>R);F=[...new Set(p.cloneDeep(F))];let Z=F==null?void 0:F.map(async R=>{let X=await Re.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((X==null?void 0:X.length)===0)return await Re.getParentContents(R)});await Promise.all(Z);let P=[],ue=(re=(oe=(ce=p.cloneDeep(q))==null?void 0:ce.extraValues)==null?void 0:oe.output)==null?void 0:re.map(async R=>{var de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn,bt,Jt,gt,Qn,Mt,yn,Nn,on,Vn,Zt,Kn;if((Ee=(de=Object.values(R))==null?void 0:de[0])!=null&&Ee.includes(".doc")){var X=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),se=v.headers["content-disposition"],ve=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),K=ve.exec(se),ae=K==null?void 0:K[1],G=document.createElement("a"),_e=window.URL.createObjectURL(X);x.value=[{name:ae,blobUrl:_e}],d.value=!0}else{let bn=(ge=(Ne=(Oe=(fe=p.cloneDeep((L=Object.values(R))==null?void 0:L[0]))==null?void 0:fe.split("["))==null?void 0:Oe[((Je=(Be=p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]))==null?void 0:Be.split("["))==null?void 0:Je.length)-1])==null?void 0:Ne.split("]"))==null?void 0:ge[0],zt=bn==null?void 0:bn.split(":"),Gt=(be=p.cloneDeep((ct=Object.values(R))==null?void 0:ct[0]))==null?void 0:be.substring(0,p.cloneDeep((Ke=Object.values(R))==null?void 0:Ke[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(Qe=p.cloneDeep(Gt))==null?void 0:Qe.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=w.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let Dt="";(pe=Ea(Gt,"/"))==null||pe.forEach((Nt,Wt)=>{var Ht,$t,cn,rn,Un,Zn,Wn,ea,Na,ca,ya;if(!(Nt!=null&&Nt.includes("[")))Dt=Dt===""?Dt+Nt.replaceAll("/",""):Dt+"/"+Nt.replaceAll("/","");else{let ua="",kn="";(Ht=p.cloneDeep(Nt))!=null&&Ht.includes("]")?(ua=p.cloneDeep(Nt).slice(1,(($t=p.cloneDeep(Nt))==null?void 0:$t.length)-1),kn=(Wn=(Zn=(Un=(rn=(cn=p.cloneDeep(ua))==null?void 0:cn.split("["))==null?void 0:rn[1])==null?void 0:Un.split("]"))==null?void 0:Zn[0])==null?void 0:Wn.split(":")):(ua=p.cloneDeep(Nt).slice(1,(ea=p.cloneDeep(Nt))==null?void 0:ea.length),kn=(Na=p.cloneDeep(ua))==null?void 0:Na.split("/"));let ta="",pa=(ca=m==null?void 0:m.find(sn=>(sn==null?void 0:sn.name)===(kn==null?void 0:kn[0])))==null?void 0:ca.compData;pa==null||pa.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Hn=>{(Hn==null?void 0:Hn.key)===(kn==null?void 0:kn[1])&&(ta=Hn==null?void 0:Hn.value)}))}),((ya=Ea(Gt,"/"))==null?void 0:ya.length)-1!==Wt?Dt=Dt===""?Dt+ta.replaceAll("/",""):Dt+"/"+ta.replaceAll("/",""):Dt=Dt+l.value+ta.replaceAll("/","")}}),(Ae=w.value)!=null&&Ae.includes(Dt)?Gt=w.value:Gt=Dt}let ln=p.cloneDeep((Le=Object.keys(R))==null?void 0:Le[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((O=v==null?void 0:v.data)==null?void 0:O.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[ln]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[ln])&&(zt==null?void 0:zt.length)===1)return await te(((Se=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Se[ln])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[ln]),p.cloneDeep(Gt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[ln]||(Bt=(It=v==null?void 0:v.data)==null?void 0:It.result)!=null&&Bt[ln]){let Dt=await je(((wt=(xt=v==null?void 0:v.data)==null?void 0:xt.data)==null?void 0:wt[ln])||((At=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:At[ln]),p.cloneDeep(Gt),zt);return Dt&&(P=[...P,...Dt]),Dt}else{if(!((Ut=v==null?void 0:v.data)!=null&&Ut.data)){let Dt=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Dt=Dt==null?void 0:Dt.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(zt==null?void 0:zt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var cn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(cn=$t.contents)==null?void 0:cn.map(rn=>{var Un,Zn;return(rn==null?void 0:rn.key)===(zt==null?void 0:zt[1])&&(rn.value=(Zn=(Un=v==null?void 0:v.data)==null?void 0:Un.result)==null?void 0:Zn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let Nt=[];(Lt=Dt==null?void 0:Dt.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Lt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);Nt.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(Nt==null?void 0:Nt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Nt});return}if((zt==null?void 0:zt.length)===1){const Dt=(wn=(qt=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:qt.path)==null?void 0:wn.path;let Nt="";(Tn=(hn=(Sn=(Dn=(fn=Dt==null?void 0:Dt.split("("))==null?void 0:fn[1])==null?void 0:Dn.split(")"))==null?void 0:Sn[0])==null?void 0:hn.split(":"))==null||Tn.forEach($t=>{var cn,rn;Nt=Nt===""?Nt+((cn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:cn.trim()):Nt+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Yn=(Xn=(gn=(In=(vn=Dt==null?void 0:Dt.split("<"))==null?void 0:vn[1])==null?void 0:In.split(">"))==null?void 0:gn[0])==null?void 0:Xn.replaceAll("'",""))==null?void 0:Yn.trim()],Ht;return(Bn=(jn=(Jn=v==null?void 0:v.data)==null?void 0:Jn.data)==null?void 0:jn.data)!=null&&Bn[zt==null?void 0:zt[0]]?Ht=await te((An=(zn=(mn=v==null?void 0:v.data)==null?void 0:mn.data)==null?void 0:zn.data)==null?void 0:An[zt==null?void 0:zt[0]],Nt,zt,C):Ht=await we((Cn=(an=v==null?void 0:v.data)==null?void 0:an.data)==null?void 0:Cn.data,Nt,Wt,Xe),Ht}else{const Dt=(gt=(Jt=(bt=v==null?void 0:v.data)==null?void 0:bt.data)==null?void 0:Jt.path)==null?void 0:gt.path;let Nt="";return(on=(Nn=(yn=(Mt=(Qn=Dt==null?void 0:Dt.split("("))==null?void 0:Qn[1])==null?void 0:Mt.split(")"))==null?void 0:yn[0])==null?void 0:Nn.split(":"))==null||on.forEach(Ht=>{var $t,cn;Nt=Nt===""?Nt+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):Nt+"/"+((cn=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:cn.trim())}),await je((Kn=(Zt=(Vn=v==null?void 0:v.data)==null?void 0:Vn.data)==null?void 0:Zt.data)==null?void 0:Kn[zt==null?void 0:zt[0]],Nt,zt)}}}}});if(await Promise.all(ue),(P==null?void 0:P.length)>0){let R=[];P==null||P.forEach(ve=>{R!=null&&R.find(K=>{var ae,G,_e,de;return((G=(ae=K==null?void 0:K.value)==null?void 0:ae.pageData)==null?void 0:G.name)===((de=(_e=ve==null?void 0:ve.value)==null?void 0:_e.pageData)==null?void 0:de.name)})||R.push(ve)});let X=[];R==null||R.forEach(ve=>{var G,_e,de,Ee;let K=p.cloneDeep(ve);K.value.pageData.compData=(G=K.value.pageData.compData)==null?void 0:G.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"&&(L.contents=(fe=L.contents)==null?void 0:fe.map(ne=>{var Je,Oe,Ne,ge;let Be=(Je=p.cloneDeep(P))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ne==null?void 0:ne.key));if(Be){let ct=(ge=(Ne=(Oe=Be.value.pageData.compData)==null?void 0:Oe.find(Ke=>(Ke==null?void 0:Ke.key)==="formContent"))==null?void 0:Ne.contents)==null?void 0:ge.find(Ke=>(Ke==null?void 0:Ke.key)===(ne==null?void 0:ne.key));ne.value=ct==null?void 0:ct.value}return ne})),L}),X.push({id:K==null?void 0:K.id,value:K==null?void 0:K.value});let ae=[];(Ee=(de=(_e=K==null?void 0:K.value)==null?void 0:_e.pageData)==null?void 0:de.compData)==null||Ee.forEach(L=>{var fe;(L==null?void 0:L.key)==="formContent"&&((fe=L==null?void 0:L.contents)==null||fe.forEach(ne=>{var Be,Je,Oe,Ne,ge,ct;if((Je=(Be=ne==null?void 0:ne.optionUrl)==null?void 0:Be.menuSelect)!=null&&Je.find(Ke=>Ke==null?void 0:Ke.includes("[")))if(ae!=null&&ae.find(Ke=>{var be,De,Qe;return((be=Ke==null?void 0:Ke.key)==null?void 0:be.join(","))===((Qe=(De=ne==null?void 0:ne.optionUrl)==null?void 0:De.menuSelect)==null?void 0:Qe.join(","))})){let Ke=(Oe=ae==null?void 0:ae.find(be=>{var De,Qe,pe;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))}))==null?void 0:Oe.value;Ke.push({key:ne==null?void 0:ne.prop,groups:(Ne=ne==null?void 0:ne.optionUrl)==null?void 0:Ne.groupSelect,value:ne==null?void 0:ne.value}),ae=ae==null?void 0:ae.map(be=>{var De,Qe,pe;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))&&(be.value=Ke),be})}else ae.push({key:(ge=ne==null?void 0:ne.optionUrl)==null?void 0:ge.menuSelect,value:[{key:ne==null?void 0:ne.prop,groups:(ct=ne==null?void 0:ne.optionUrl)==null?void 0:ct.groupSelect,value:ne==null?void 0:ne.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(L=>{var ne;let fe="";return(ne=L==null?void 0:L.key)==null||ne.forEach(Be=>{var Je;if(!(Be!=null&&Be.includes("[")))fe=fe===""?fe+Be:fe+"/"+Be;else{let Oe="",Ne=(Je=Be==null?void 0:Be.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");m==null||m.forEach(ge=>{var ct;(ge==null?void 0:ge.name)===(Ne==null?void 0:Ne[0])&&((ct=ge==null?void 0:ge.compData)==null||ct.forEach(Ke=>{var be;(Ke==null?void 0:Ke.key)==="formContent"&&((be=Ke==null?void 0:Ke.contents)==null||be.forEach(De=>{(De==null?void 0:De.prop)===(Ne==null?void 0:Ne[1])&&(Oe=De==null?void 0:De.value)}))}))}),fe=fe+l.value+Oe}}),L.key=fe,L})),ae==null||ae.forEach(L=>{var Je,Oe,Ne;let fe=(Je=Xe[L.key])==null?void 0:Je.find(ge=>{var ct,Ke,be,De,Qe,pe,Ae;return((Ke=(ct=ge==null?void 0:ge.value)==null?void 0:ct.pageData)==null?void 0:Ke.name)===((Qe=(De=(be=L==null?void 0:L.value)==null?void 0:be[0])==null?void 0:De.groups)==null?void 0:Qe[0])&&((Ae=(pe=ge==null?void 0:ge.value)==null?void 0:pe.pageData)==null?void 0:Ae.name)!==void 0}),ne=fe==null?void 0:fe.id,Be=(Oe=fe==null?void 0:fe.value)==null?void 0:Oe.pageData;Be.compData=(Ne=Be.compData)==null?void 0:Ne.map(ge=>{var ct;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(ct=ge.contents)==null?void 0:ct.map(Ke=>{var De;let be=(De=L.value)==null?void 0:De.find(Qe=>(Qe==null?void 0:Qe.key)===(Ke==null?void 0:Ke.prop));return be&&(Ke.value=be.value),Ke})),ge}),X.push({id:ne,value:{pageData:Be}})})});let se=(Te=p.cloneDeep(P))==null?void 0:Te[0];(X==null?void 0:X.length)>0&&await p.batchUpdateInsofDataApi({dataList:X})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},he=["createInsofDataApi"],Ue=ko(async q=>{ee(q)},100),st=async q=>{var qe,lt,Q,tt,nt;const M=p.cloneDeep(q);let me,ke=new WeakMap,Me=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(lt=(qe=Me.data.result)==null?void 0:qe.filter(ze=>{var ce,oe;return((ce=ze==null?void 0:ze.key)==null?void 0:ce.pageKey)!=="menu"&&((oe=ze==null?void 0:ze.key)==null?void 0:oe.pageKey)!=="secret"}))==null||lt.forEach(ze=>{ke[ze.key.pageKey]?ke[ze.key.pageKey]=[...ke[ze.key.pageKey],ze]:ke[ze.key.pageKey]=[ze]}),q!=null&&q[0].path&&(me=await(M==null?void 0:M.map(async(ze,ce)=>{var W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de;const re=(W=ke[ze==null?void 0:ze.path])==null?void 0:W.filter(Ee=>{var L;return((L=Ee==null?void 0:Ee.key)==null?void 0:L.type)==="data"});let Te="";const Xe=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke);re==null||re.forEach(Ee=>{var L,fe,ne,Be,Je;((fe=(L=Ee==null?void 0:Ee.value)==null?void 0:L.tableData)==null?void 0:fe.算法名称)===((ne=M==null?void 0:M[ce])==null?void 0:ne.method)&&(Te=(Je=(Be=Ee==null?void 0:Ee.value)==null?void 0:Be.tableData)==null?void 0:Je.算法体)});const dt=await Re.getItemData(ze==null?void 0:ze.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke);let m="",C=(Z=(F=(v=(Y=dt==null?void 0:dt[0])==null?void 0:Y.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:F.contents)==null?void 0:Z.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(ue=(P=dt==null?void 0:dt[0])==null?void 0:P.compData)==null||ue.forEach(Ee=>{var L;(Ee==null?void 0:Ee.key)==="tableContents"&&((L=Ee==null?void 0:Ee.contents)==null||L.forEach(fe=>{fe!=null&&fe.find(ne=>ne===(ze==null?void 0:ze.method))&&(m=fe[C])}))}),{buttonName:((R=M==null?void 0:M[ce])==null?void 0:R.method)||((ve=(se=(X=re==null?void 0:re[0])==null?void 0:X.value)==null?void 0:se.tableData)==null?void 0:ve.算法名称),api:(Te===""?(G=(ae=(K=re==null?void 0:re[0])==null?void 0:K.value)==null?void 0:ae.tableData)==null?void 0:G.算法体:Te)||m,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(_e=p.cloneDeep(ze.value))==null?void 0:_e.slice(1),methodName:(ze==null?void 0:ze.path)??"",extraValues:(de=M==null?void 0:M[ce])==null?void 0:de.data}})));const Ve=M==null?void 0:M.map(async ze=>{var dt,m,C,W,Y,v;const ce=(dt=Me.data.result)==null?void 0:dt.filter(F=>{var Z,P,ue;return((Z=F==null?void 0:F.key)==null?void 0:Z.parentTable)===""&&((P=F==null?void 0:F.key)==null?void 0:P.type)==="method"&&((ue=F==null?void 0:F.key)==null?void 0:ue.methodName)===F.method}),oe=ce==null?void 0:ce[0],re=(m=Me.data.result)==null?void 0:m.filter(F=>{var Z,P;return((Z=F==null?void 0:F.key)==null?void 0:Z.type)==="methodData"&&((P=F==null?void 0:F.key)==null?void 0:P.tableId)===(oe==null?void 0:oe.id)}),Te=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke),Xe=re==null?void 0:re[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(Y=(W=Xe==null?void 0:Xe.value)==null?void 0:W.tableData)==null?void 0:Y[0],content:Te==null?void 0:Te.filter(F=>F.comp!=="methodButton"),extraContent:(v=p.cloneDeep(ze.value))==null?void 0:v.slice(1),methodName:(ze==null?void 0:ze.method)??""}}),Ye=(Q=q==null?void 0:q[0])!=null&&Q.path&&((tt=q==null?void 0:q[0])==null?void 0:tt.path)!==""?await Promise.all(me):await Promise.all(Ve);i.value=Ye==null?void 0:Ye.filter(ze=>ze==null?void 0:ze.extraContent),(nt=i.value)==null||nt.forEach(ze=>{var ce;ze.api===""&&((ce=ze.content)==null||ce.forEach(oe=>{var re;oe.comp=="Table"&&D.setExtraContents(Re.methodTableToContent(oe.compData,(re=ze.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(q,M)=>{var me,ke,Me;return e.unref(V)!=="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(Ve=>(Ve==null?void 0:Ve.buttonName)!=="保存"),Ve=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Ve.api!==""?(e.openBlock(),e.createBlock(e.unref(Yt._sfc_main),{key:0,disabled:e.unref(j)===e.unref(w)&&!((Ye=Ve==null?void 0:Ve.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Ve.buttonName,onClickTrigger:qe=>e.unref(Ue)(Ve),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ye)!==""&&((Me=e.unref(w))==null?void 0:Me[((ke=e.unref(w))==null?void 0:ke.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Yt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:le,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Fe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},_c=Rt._export_sfc(Ec,[["__scopeId","data-v-11fca7e0"]]),Sc={};function Tc(a,i){return" 567 "}const Ic=Rt._export_sfc(Sc,[["render",Tc]]),Bc={class:"module content"},Ac={class:"module data"},Nc={class:"module layout"},Vc={class:"form-content"},Oc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=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}]),h=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:""}]),D=e.ref({}),E=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),N=H=>{var j;D.value=p.cloneDeep(H),l("change",(j=_())==null?void 0:j.compData)},$=H=>{var j,ie;if((H==null?void 0:H.buttonName)==="确认"){const w=p.cloneDeep(H==null?void 0:H.content);switch(d.value){case"create":E.value.push({...w,index:((j=E.value)==null?void 0:j.length)+1});break}l("change",(ie=_())==null?void 0:ie.compData),c.visible=!1}else c.visible=!1},V=(H,j)=>{var ie,w;switch(H){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(j,1),d.value="delete";break}},ye=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(D.value=((j=H==null?void 0:H.find(w=>w.key==="signConfig"))==null?void 0:j.contents)??{},E.value=((ie=H==null?void 0:H.find(w=>w.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ye,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Vc,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Mc=Rt._export_sfc(Oc,[["__scopeId","data-v-487e0536"]]),zc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var _,N;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(N=s==null?void 0:s.stepConfig)==null?void 0:N.active}),x=(_,N)=>{c.value=N,l("clickStep",_,N)},g=_=>Tt.getComponent(_),h=()=>{var N;const _=(N=s==null?void 0:s.stepList)==null?void 0:N.find(($,V)=>V+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,N)=>{var ye,H,j,ie,w;const $=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ye=a.stepConfig)==null?void 0:ye.direction,active:d.value,"finish-status":"success",simple:(H=a.stepConfig)==null?void 0:H.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock($,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=a.stepConfig)!=null&&ie.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(le=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},le||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Pc=Rt._export_sfc(zc,[["__scopeId","data-v-d7c99969"]]),Rc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),x=(g,h)=>{l("clickStep",g,h)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var h,D;d.value=(h=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Pc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Lc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Fc=Rt._export_sfc(Lc,[["__scopeId","data-v-4172a886"]]),$c={class:"line-content"},jc={class:"line-time"},Kc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Fc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:g})=>[e.createElementVNode("span",$c,e.toDisplayString(x),1),e.createElementVNode("span",jc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Rt._export_sfc(Kc,[["__scopeId","data-v-b4d9deed"]]),Wc={class:"tabs-content"},Hc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Wc,[e.createVNode(Tt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},qc=Rt._export_sfc(Hc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Gc={class:"type-select"},Xc=["onClick"],Yc={class:"list-icon"},Jc={__name:"modelSelect",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(lr),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(g)},[e.createElementVNode("div",Yc,[e.createVNode(x,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Xc)]))),128))])}}},Qc=Rt._export_sfc(Jc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},eu={class:"operate-content"},tu={class:"collapse-title-content"},nu={class:"collapse-title-item"},au={key:1},ou=["onClick"],lu={class:"icon-content"},ru={key:0,class:"edit-content"},iu=["onClick"],su={class:"comp-child"},cu={__name:"modelFill",setup(a){const i=lo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),g=$=>{var ye;let V=(ye=p.cloneDeep(x.value))==null?void 0:ye.map((H,j)=>($===j&&(H.content=!0),H));x.value=V},h=$=>{var ye;let V=(ye=p.cloneDeep(x.value))==null?void 0:ye.map((H,j)=>($===j&&(H.content=!1),H));x.value=V,c.value=p.cloneDeep(s.value)},D=($,V)=>{var ie;let ye=(ie=p.cloneDeep(x.value))==null?void 0:ie.map((w,z)=>($===z&&(w.content=!1),w));x.value=ye;const H=p.cloneDeep(s.value),j=H==null?void 0:H.filter((w,z)=>(z===$&&(w.name=V),w));i.setOriginalData(j),i.setItemData(j)};e.watch(()=>s.value,()=>{var $,V,ye;!s.value||(($=s.value)==null?void 0:$.length)===0?c.value=[]:c.value=(V=p.cloneDeep(s.value))==null?void 0:V.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),d.value=c.value,x.value=(ye=p.cloneDeep(d.value))==null?void 0:ye.map((H,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const E=$=>ma($),_=($,V,ye)=>{var j,ie;if(!$)return;let H=p.cloneDeep(s.value);H=(j=H==null?void 0:H.map((w,z)=>(z===ye&&(w.compData=$),w)))==null?void 0:j.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(ie=p.cloneDeep(H))==null?void 0:ie.map((w,z)=>({id:z,content:!1})),i.setOriginalData(H),i.setItemData(H)},N=$=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(s.value),ye=V==null?void 0:V.filter((H,j)=>j!==$);i.setOriginalData(ye),i.setItemData(ye),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return($,V)=>{const ye=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",eu,[e.createVNode(kl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:H,index:j})=>{var ie,w,z,k,A,T,le,Fe,ot,Ie;return[e.createElementVNode("div",tu,[e.createElementVNode("div",nu,[(w=(ie=x.value)==null?void 0:ie.find(je=>je.id===j))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:H.name&&H.name!==""?"8px":"0px"})},e.toDisplayString(H.name),5)),(k=(z=x.value)==null?void 0:z.find(je=>je.id===j))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Tt._sfc_main$2,{modelValue:H.name,"onUpdate:modelValue":je=>H.name=je,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(je=>je.id===j))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(je=>g(j),["stop"]),class:"icon-content"},[e.createVNode(ye,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ou))]),e.createElementVNode("div",lu,[(Fe=(le=x.value)==null?void 0:le.find(je=>je.id===j))!=null&&Fe.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(ye,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(je=>h(j),["stop"])},null,8,["onClick"]),e.createVNode(ye,{name:"Save",onClick:e.withModifiers(je=>D(j,H.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ie=(ot=x.value)==null?void 0:ot.find(je=>je.id===j))!=null&&Ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(je=>N(j),["stop"]),class:"icon-content"},[e.createVNode(ye,{name:"Delete",style:{width:"16px",height:"16px"}})],8,iu))])])]}),content:e.withCtx(({item:H,index:j})=>{var ie,w;return[e.createElementVNode("div",su,[e.createTextVNode(e.toDisplayString(E(H.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(H.comp+"Operate")),{itemContents:H==null?void 0:H.compData,originalItemContents:(w=(ie=d.value)==null?void 0:ie.find((z,k)=>k===j))==null?void 0:w.compData,onChange:z=>_(z,H,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},uu=Rt._export_sfc(cu,[["__scopeId","data-v-a46a44b9"]]),pu={key:0,class:"show-content"},du={style:{display:"flex"}},fu={__name:"modelShow",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>ma(d);return(d,x)=>{var g;return((g=l.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",pu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",du,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},hu=Rt._export_sfc(fu,[["__scopeId","data-v-3f3e863e"]]),vu={class:"tabs-header"},gu={class:"tabs-list"},mu={class:"tab-name"},yu={class:"tab-actions"},bu=["onClick"],ku=["onClick"],xu=["onClick"],wu={class:"model-operate"},Du={class:"model-select",style:{display:"unset"}},Cu={class:"existing-components"},Eu={class:"component-list"},_u=["onClick"],Su={class:"component-info"},Tu={class:"component-type"},Iu={class:"component-name"},Bu={class:"model-fill"},Au={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(""),g=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),N=e.ref(null),$=lo(p.pinia),{itemData:V}=p.storeToRefs($),ye=()=>{x.value="新增标签页",g.value.title="",h.value=-1,d.value=!0},H=q=>{x.value="修改标签页",g.value.title=c.value[q].title,h.value=q,d.value=!0},j=q=>{const M=z(q);_.value.delete(M),c.value.splice(q,1),st()},ie=()=>{if(g.value.title.trim()){if(h.value===-1){const q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};c.value.push(q)}else c.value[h.value].title=g.value.title,c.value[h.value].value=g.value.title,c.value[h.value].label=g.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=q=>{const M=c.value[q];return M.id||(M.id=w()),M.id},k=q=>{var ke;E.value=q;const M=z(q);N.value=p.cloneDeep(V.value);let me=_.value.get(M);!me&&((ke=c.value[q].children)==null?void 0:ke.length)>0&&(me=Fe(c.value[q].children)),me?$.setItemData(p.cloneDeep(me)):$.setItemData([]),D.value=!0},A=e.computed(()=>{const q=jt.useModelComp(p.pinia),M=p.storeToRefs(q).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(me=>{var ke;if(me.comp==="Tabs"&&E.value>=0){const Me=z(E.value);if((ke=me.compData)==null?void 0:ke.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===Me))}))return!1}return!0})}),T=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,le=q=>{var M;try{const me=p.cloneDeep(q);me.id=Date.now()+Math.random(),me.comp==="Tabs"&&((M=me.compData)==null||M.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Ve=>{Ve.id=w()})}));const ke=p.cloneDeep(V.value);ke.push(me),$.setItemData(ke)}catch(me){console.error("添加组件失败:",me)}},Fe=q=>q.map(M=>{var me;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:ot(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ie(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((me=M.content)==null?void 0:me.originalData)||[]}}}),ot=q=>{if(!q)return[];const M=[];return q.rowContents&&M.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&M.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:q.isEnableWrap}),M},Ie=q=>[],je=()=>{if(E.value>=0&&E.value<c.value.length){const q=z(E.value);_.value.set(q,p.cloneDeep(V.value)),c.value[E.value].children=te(V.value),console.log("保存后的数据",te(V.value))}D.value=!1,E.value=-1,N.value=null,st()},we=()=>{N.value&&$.setItemData(p.cloneDeep(N.value)),D.value=!1,E.value=-1,N.value=null},I=()=>{D.value&&we()},te=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((M,me)=>{if(!M||typeof M!="object")return M;const{comp:ke,name:Me,compData:Ve}=M;switch(ke){case"Form":return{type:"form",content:ee(Ve||[]),value:"表单"};case"Table":return{type:"table",content:he(Ve||[]),value:"表格"};default:return{type:"xxx",content:Ue(Ve||[]),value:""}}})},ee=q=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},me={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((ke,Me)=>{if(!ke||typeof ke!="object"){console.warn(`Invalid config at index ${Me}:`,ke);return}const{key:Ve,contents:Ye}=ke,qe=me[Ve];if(!qe){console.warn(`Unknown Form config key: ${Ve}`);return}Ve==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},he=q=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},me={header:"columns",tableContents:"tableData"};return q.forEach((ke,Me)=>{if(!ke||typeof ke!="object"){console.warn(`Invalid config at index ${Me}:`,ke);return}const{key:Ve,contents:Ye}=ke,qe=me[Ve];if(!qe){console.warn(`Unknown Table config key: ${Ve}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),st=()=>{const q=[{key:"stepList",contents:c.value}];l("change",q)};return e.watch(()=>s.itemContents,q=>{if(q&&q.length>0){const M=q.find(me=>me.key==="stepList");M&&M.contents&&(c.value=M.contents.map(me=>({title:me.title||"",value:me.value||me.title||"",label:me.label||me.title||"",children:me.children||[],id:me.id||w()})))}},{immediate:!0,deep:!0}),(q,M)=>{const me=e.resolveComponent("svg-icon"),ke=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Ve=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ye},[e.createVNode(me,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",mu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",yu,[e.createElementVNode("button",{onClick:lt=>H(qe)},"修改标题",8,bu),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ku),e.createElementVNode("button",{onClick:lt=>j(qe)},"删除",8,xu)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Ve,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ke,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>g.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:we},"取消"),e.createElementVNode("button",{onClick:je},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",wu,[e.createElementVNode("div",Du,[e.createVNode(Qc),e.createElementVNode("div",Cu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>le(Ye)},[e.createElementVNode("div",Su,[e.createElementVNode("span",Tu,e.toDisplayString(T(Ye.comp)),1),e.createElementVNode("span",Iu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,_u))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(hu)])),e.createElementVNode("div",Bu,[e.createVNode(uu)])])]),_:1},8,["modelValue"])])}}},Nu=Rt._export_sfc(Au,[["__scopeId","data-v-9096ed0d"]]);function Vu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function Ou(a){return{type:"line",...a}}function Mu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function zu(a){return{type:"bar",barWidth:"60%",...a}}function Pu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const $n={line:{initBaseoptions:Vu,initSeries:Ou},bar:{initBaseoptions:Mu,initSeries:zu},pie:{initBaseoptions:Pu,initSeries:Ru}},Fo=jt.useMenuState(p.pinia),Al=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},g=a==null?void 0:a.find(_=>{const{name:N}=_;return N===c});if(!g)return{names:s,values:l};const h=(E=g==null?void 0:g.compData)==null?void 0:E.find(_=>{const{key:N}=_;return N==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const N=_==null?void 0:_[0];let $=!1;p.isObject(N)&&(N!=null&&N.id)&&($=!0);let V=d,ye=x;$&&(V=V+1,ye=ye+1);const H=_==null?void 0:_[V],j=_==null?void 0:_[ye];s.push(H),l.push(j)}),{names:s,values:l}},Lu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let g=null;const h=sessionStorage.getItem("systemKey");if(x&&Fo.activeMenuPath&&(g=await Re.getItemData(`${Fo.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");g=await Re.getItemData(`${D}^${s}`,h,"")}return Al(g,{group:l,nameCol:c,valueCol:d})},Fu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),g=await Re.getItemData(d,x,"");return Al(g,{group:s,nameCol:l,valueCol:c})},xo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:g,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return g&&h&&Tt.isNumber(D)&&Tt.isNumber(E)?await Lu({menu:l,mainKey:g,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Tt.isNumber(d)&&Tt.isNumber(x)?await Fu({menu:l,group:c,nameCol:d,valueCol:x}):s},$u=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},ju=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;const _=[];for(let $=0;$<D.length;$++){const V=D[$],ye=E[$];_.push({name:V,value:ye})}const N=g({data:_});return h.series.push(N),h},Uu=async(a=[])=>{var x,g,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((g=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:g.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await $u({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await ju({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},Wu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await Uu(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Hu=Rt._export_sfc(Wu,[["__scopeId","data-v-d4c081e8"]]),qu={class:"chart-module layout"},Gu={class:"chart-module content"},Xu={class:"chart-module content"},Yu={class:"form-content"},Ju={class:"dialog-footer"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{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({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(oe=>{var Te;const re=oe==null?void 0:oe.prop;oe.value=(Te=g==null?void 0:g.value)==null?void 0:Te[re]}),c.visible=!0},D=ce=>{g.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=nt())==null?void 0:ce.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),N=e.ref([]),$=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ye=()=>{const ce=N.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=V.value)==null?void 0:Xe[Te]}),oe},H=ce=>{var re;V.value=ce;const oe=ye();N.value=oe,l("change",(re=nt())==null?void 0:re.compData)},j=async()=>{const ce=await Re.getMenusContent(),oe=ye();oe==null||oe.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),N.value=oe,_.visible=!0,await Ye(V.value.menu),await Q(V.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{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:[]}],k=e.ref({}),A=()=>{const ce=w.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Te]}),oe},T=ce=>{var re;k.value=ce;const oe=A();w.value=oe,l("change",(re=nt())==null?void 0:re.compData)},le=async()=>{await I();const ce=p.cloneDeep(Fe.value),oe=A();oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Te],Te==="mainKey"&&(re.contents=ce)}),w.value=oe,ie.visible=!0},Fe=e.ref([]),ot=e.ref([]),Ie=e.ref({}),je=e.ref({}),we=()=>{const{compData:ce}=ke.value||{},oe=ce==null?void 0:ce.find(W=>{const{key:Y}=W;return Y==="header"}),re=(oe==null?void 0:oe.contents)||[],Te=re==null?void 0:re.filter((W,Y)=>{const{label:v}=W;return v!=="操作"}),Xe=Te==null?void 0:Te.findIndex((W,Y)=>{const{isMainKey:v}=W;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(W=>{const{key:Y}=W;return Y==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(W=>{const Y=W==null?void 0:W[0];let v=Xe;p.isObject(Y)&&(Y!=null&&Y.id)&&(v=v+1);const F=W==null?void 0:W[v];return{label:F,value:F}})},I=async()=>{const ce=await we();Fe.value=ce},te=async ce=>{const oe=sessionStorage.getItem("systemKey");return await Re.getItemData(ce,oe,"")},ee=async ce=>{const oe=ce;ot.value=oe==null?void 0:oe.map(re=>{const{name:Te}=re;return Ie.value[Te]=re,{label:Te,value:Te}})},he=ce=>{const{comp:oe,compData:re}=je.value||{};if(oe==="Table"){let Te=A();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),w.value=Te}},Ue=async()=>{var re,Te;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,oe=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(ce){const dt=`${oe==null?void 0:oe.join("/")}^${ce}`,m=await te(dt);await ee(m);const C=A();C==null||C.forEach(W=>{(W==null?void 0:W.prop)==="group"&&(W.contents=ot.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,oe)=>{ce!=oe&&ce&&await Ue()});const st=async ce=>{const oe=Ie.value[ce];je.value=oe,await he()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&ce&&st(ce)});const q=async()=>{var oe;await Ue();const ce=(oe=k.value)==null?void 0:oe.group;await st(ce)},M=e.ref([]),me=e.ref({}),ke=e.ref({}),Me=async ce=>{const oe=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await Re.getItemData(oe,re,"")},Ve=async ce=>{const oe=await Me(ce);M.value=oe==null?void 0:oe.map(re=>{const{name:Te}=re;return me.value[Te]=re,{label:Te,value:Te}})},Ye=async(ce,oe)=>{await Ve(ce);const re=ye();re==null||re.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=M.value)}),N.value=re};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.menu},async(ce,oe)=>{const re=ce==null?void 0:ce.join("/"),Te=oe==null?void 0:oe.join("/");re!=Te&&await Ye(ce)});const qe=(ce,oe)=>{const re=oe==null?void 0:oe.find(m=>{const{key:C}=m;return C==="header"}),Te=(re==null?void 0:re.contents)||[],Xe=Te==null?void 0:Te.filter((m,C)=>{const{label:W}=m;return W!=="操作"}),dt=Xe==null?void 0:Xe.map((m,C)=>{const{label:W}=m;return{label:W,value:C}});ce==null||ce.forEach(m=>{const C=m==null?void 0:m.prop;(C==="nameCol"||C==="valueCol")&&(m.contents=dt)})},lt=ce=>{const{comp:oe,compData:re}=ke.value||{};if(oe==="Table"){V.value.formItems=[];let Te=ye();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),N.value=Te}},Q=async ce=>{const oe=me.value[ce];ke.value=oe,await lt()};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&Q(ce)});const tt=async()=>{var re,Te;const ce=(re=V.value)==null?void 0:re.menu;await Ye(ce);const oe=(Te=V.value)==null?void 0:Te.group;await Q(oe)},nt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),ze=()=>{c.visible=!1,_.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var oe,re,Te;N.value=$(),w.value=z();const ce=s==null?void 0:s.itemContents;g.value=((oe=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},V.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Te=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await q()}),(ce,oe)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[0]||(oe[0]=Te=>h())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Gu,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[1]||(oe[1]=Te=>j())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[2]||(oe[2]=Te=>le())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ze,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ju,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ze,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:ze,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:ze,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:ze,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ap=Rt._export_sfc(np,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},op=Ka.exports,$o;function lp(){return $o||($o=1,function(a,i){(function(s,l){l()})(op,function(){function s(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,_){var N=new XMLHttpRequest;N.open("GET",D),N.responseType="blob",N.onload=function(){h(N.response,E,_)},N.onerror=function(){console.error("could not download file")},N.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Re.commonjsGlobal=="object"&&Re.commonjsGlobal.global===Re.commonjsGlobal?Re.commonjsGlobal:void 0,g=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(D,E,_){var N=x.URL||x.webkitURL,$=document.createElement("a");E=E||D.name||"download",$.download=E,$.rel="noopener",typeof D=="string"?($.href=D,$.origin===location.origin?d($):c($.href)?l(D,E,_):d($,$.target="_blank")):($.href=N.createObjectURL(D),setTimeout(function(){N.revokeObjectURL($.href)},4e4),setTimeout(function(){d($)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,_){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,_),E);else if(c(D))l(D,E,_);else{var N=document.createElement("a");N.href=D,N.target="_blank",setTimeout(function(){d(N)})}}:function(D,E,_,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var $=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ye=/CriOS\/[\d]+/.test(navigator.userAgent);if((ye||$&&V||g)&&typeof FileReader<"u"){var H=new FileReader;H.onloadend=function(){var w=H.result;w=ye?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=w:location=w,N=null},H.readAsDataURL(D)}else{var j=x.URL||x.webkitURL,ie=j.createObjectURL(D);N?N.location=ie:location.href=ie,N=null,setTimeout(function(){j.revokeObjectURL(ie)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}lp();const ia=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(ia),Ft=jt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:rp,itemGridData:oa,curStructureCompIds:jo,isSubmitCurStructure:ip,isRefreshCurStructure:sp,freshContent:Ko,routeToChildPath:cp,payloadTypes:up,pageMapState:Xa,itemExtendData:La}=p.storeToRefs(Ft),dn=jt.useMenuState(p.pinia),{activeTopMenuPath:pp,activeMenuPath:Pt,platform:nf,activeAsideMenu:dp,buttonTriggerType:fp}=p.storeToRefs(dn),xn=fa.useUnit(p.pinia),{selectTitle:Uo}=p.storeToRefs(xn),hp=Re.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(hp),Wo=jt.useAuthorityState(p.pinia),Ya=e.ref(!0),ga=e.ref(0),Ja=e.ref([]),Ia=e.computed(async()=>{var i,s;const a=(i=Pt.value)!=null&&i.startsWith("/")?(s=Pt.value)==null?void 0:s.substring(1):Pt.value;return(a==null?void 0:a.includes(ro.value))||await Cp(a)}),vp=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Pt.value!=="/平台管理/菜单管理")},gp=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},mp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Uo.value.length===1)Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value),xn.setSelectIndex(""),xn.setSelectMenu(""),xn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),l,!1,[],await Ia.value);let c=-1;(i=Uo.value)==null||i.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&s.push(d)}),xn.setSelectTitle(s),l!==""?xn.setSelectMenu(a==null?void 0:a.key):(xn.setSelectIndex(""),xn.setSelectMenu(""))}Et.value=Aa(Et.value),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value)},po=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const g=await x(d);if(((c=g==null?void 0:g.data)==null?void 0:c.code)===200)return g.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Ho=async(a,i,s,l)=>{var c,d,x,g,h,D,E,_,N,$,V;try{const ye=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:k}})),H=(g=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:g.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),j=JSON.parse(p.cloneDeep(JSON.stringify(a))),ie=(h=j==null?void 0:j.results)==null?void 0:h.map(k=>k.id);let w;s?w=(_=(E=(D=Xa.value)==null?void 0:D[Pt.value])==null?void 0:E.filter(k=>{var A,T,le;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((le=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:le.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):w=(V=($=(N=Xa.value)==null?void 0:N[Pt.value])==null?void 0:$.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:V.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(ie!=null&&ie.includes(k))&&typeof k=="number");(ye==null?void 0:ye.length)>0&&await p.batchAddInsofDataApi({dataList:ye}),(H==null?void 0:H.length)>0&&await p.batchUpdateInsofDataApi({dataList:H}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(ye){throw new Error(ye)}},yp=async a=>{var D,E,_,N,$,V,ye,H,j,ie;dn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(rp.value)));if(!ip.value)return dn.setCacheStructures({key:fp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),l=s.filter(w=>{var z;return!((z=jo.value)!=null&&z.includes(w))}),c=(D=jo.value)==null?void 0:D.filter(w=>!s.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(po(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(po(x,"create",a)),g&&(g==null?void 0:g.length)>0&&h.push(po(g,"update",a)),oa.value&&((E=oa.value)!=null&&E.isDelete&&((N=(_=oa.value)==null?void 0:_.results)==null?void 0:N.length)>0&&((V=($=oa.value)==null?void 0:$.results)!=null&&V.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(ye=oa.value)==null?void 0:ye.results}):(console.log("itemGridData.value",oa.value),h.push(await Ho(oa.value,"gridLayout")))),La.value)for(const w in La.value)h.push(await Ho((H=La.value)==null?void 0:H[w],"extend",{target:w,compId:(ie=(j=La.value)==null?void 0:j[w])==null?void 0:ie.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),dn.setContentLoading(!1)},Qa=a=>ma(a),Et=e.ref([]),bp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nl=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),kp=async a=>{var l,c,d,x,g,h;let i=p.cloneDeep(Pt).value;i=i+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(g=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:g.map(_=>_==null?void 0:_.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},qo=async a=>{var i,s;try{let l=p.cloneDeep(Pt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var g;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((g=Object.values(x==null?void 0:x.singleContent))==null?void 0:g[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var g;return((g=x==null?void 0:x.data)==null?void 0:g.code)===200}))){const x=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),g=await p.batchDeleteInsofDataApi({ids:x});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await kp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},xp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Pt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Vl=e.ref(0),Za=e.ref(null),eo=async(a,i="data",s)=>{var l,c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await qo(a):await Re.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ia.setLogRecordAsync({type:"删除",data:a},Pt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(le=>typeof(le==null?void 0:le.id)=="string")){const le=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Fe=>({content:a==null?void 0:a.content,singleContent:Fe,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await qo(le)}else{const le=(g=a==null?void 0:a.selectItems)==null?void 0:g.map(Fe=>Fe==null?void 0:Fe.id);await p.batchDeleteInsofDataApi({ids:le}),await ia.setLogRecordAsync({type:"删除",data:le},Pt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let le={};for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);const Fe=await Re.addTableContents(i,Pt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a,{param:s});Za.value={resId:Fe,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let le=[],Fe=[],ot=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Ie=s==null?void 0:s.url,je="",we="";if(ot!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((N=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:N.id)!="string"){const I=await p.getInsofDataApi({id:ot});je=((H=(ye=(V=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:V[0])==null?void 0:ye.key)==null?void 0:H.tableId)??"",we=((z=(w=(ie=(j=I==null?void 0:I.data)==null?void 0:j.result)==null?void 0:ie[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(I=>{let te={};for(let ee in I)ee!=="id"&&ee!=="index"&&(te[ee]=I[ee]);typeof(I==null?void 0:I.id)=="number"?le.push({id:I==null?void 0:I.id,value:{tableData:te}}):Fe.push({key:{type:i,pageKey:Ie||we||Pt.value,tableId:je||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Fe==null?void 0:Fe.length)>0&&await p.batchAddInsofDataApi({dataList:Fe}),(le==null?void 0:le.length)>0&&await p.batchUpdateInsofDataApi({dataList:le})}else{let le={},Fe=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);await Re.fixTableContents(i,Pt.value,a==null?void 0:a.index,Fe,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await xp(a==null?void 0:a.value);Ft.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(le=>le==null?void 0:le.isMainKey)||(Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value)),Et.value=Aa(Et.value),Do.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},wp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await wp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Re.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(g=>g.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(dn.setActiveMenuPath(null),dn.setActiveMenuPath(i))},no=a=>{Et.value=Aa(a),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value)},Dp=async a=>{var i;await e.nextTick(),(i=dp.value)!=null&&i.isRouter?Wo.setRouterPageStructure(a):Wo.setRouterPageStructure([])},Cp=async a=>{var d,x,g,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,N)=>{var $;(($=a==null?void 0:a.split("/"))==null?void 0:$.length)-2>N&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,N)=>{var $;(($=a==null?void 0:a.split("/"))==null?void 0:$.length)-1>N&&(s=s===""?s+_:s+"/"+_)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(g=l==null?void 0:l.data)==null?void 0:g.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},Ep=e.ref(),Fn=e.ref(null),_p=a=>{var D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(we=>{var I;return((I=we==null?void 0:we.key)==null?void 0:I.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Ep.value=i;const s=(N=(_=i==null?void 0:i.find(we=>{var I,te,ee;return(ee=(te=(I=we==null?void 0:we.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:_.value)==null?void 0:N.tableData;if(!s)return Fn.value=null;const l=(ye=(V=($=i==null?void 0:i.find(we=>{var I,te,ee;return(ee=(te=(I=we==null?void 0:we.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:$.key)==null?void 0:V.relatedInfo)==null?void 0:ye.compId,c=(H=Et.value)==null?void 0:H.find(we=>(we==null?void 0:we.id)===l);if(!c)return Fn.value=null;const d=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((j=s==null?void 0:s.任务关键词)==null?void 0:j.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(we=>(we==null?void 0:we.prop)===d),g=(Fe=(le=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:T.contents)==null?void 0:le.find(we=>we==null?void 0:we.isMainKey))==null?void 0:Fe.prop,h=(je=(Ie=(ot=c==null?void 0:c.compData)==null?void 0:ot.find(we=>(we==null?void 0:we.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:je[x];Fn.value={prop:d,value:h,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)},Sp=()=>{var a,i;console.log("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(i=(a=Pt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ol=()=>{var a,i,s,l;try{if(pp.value!=="报告中心"||!((a=Pt.value)!=null&&a.includes(ro.value)))return;const c=(i=Et.value)==null?void 0:i.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,g=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Pt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},wo=e.ref([]),Tp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Pt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Pt.value,sp.value],async a=>{var d,x,g,h,D,E,_,N;if(!Pt.value)return;Ft.setLockingPage(""),Et.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,Ya.value=!1,Ua.value=!0;const s=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(g=a==null?void 0:a[0])==null?void 0:g.substring(1):a==null?void 0:a[0];let l=new WeakMap;(D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:up.value})).data.result)==null?void 0:h.filter($=>{var V,ye;return((V=$==null?void 0:$.key)==null?void 0:V.pageKey)!=="menu"&&((ye=$==null?void 0:$.key)==null?void 0:ye.pageKey)!=="secret"}))==null||D.forEach($=>{l[$.key.pageKey]?l[$.key.pageKey]=[...l[$.key.pageKey],$]:l[$.key.pageKey]=[$]}),Ja.value=l,s?(dn.setContentLoading(!0),sessionStorage.setItem("pageKey",Pt.value),Et.value=await Re.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,l),await ia.setLogRecordAsync({type:"查询",data:Et.value},Pt.value),Et.value=Aa(Et.value),await Dp(Et.value),Ol(),_p(s),wo.value=(E=Et.value)==null?void 0:E.map($=>({label:$==null?void 0:$.name,value:$==null?void 0:$.id})),Ft.setExtraContents([]),xn.setSelectTitle([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value),Ft.setCurStructureCompIds((_=Et.value)==null?void 0:_.map($=>$==null?void 0:$.id)),Ft.setRefreshCurStructure(!1),xn.setSelectTitle((N=Pt.value)==null?void 0:N.split("/").map($=>({value:$.trim()}))),dn.setChildMenu(""),dn.setContentLoading(!1),Ft.setTableLoading(!1),Ua.value=!1):(Et.value=[],Ua.value=!1),e.nextTick(()=>{ga.value=ga.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Ko.value,async()=>{if(Ko.value){let a=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value);Et.value=Aa(a),Ft.setFreshContent(!1),Ol()}},{deep:!0});const Ip=async()=>{var c,d,x,g,h,D,E,_;dn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ra.value)==null?void 0:c.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=Ra.value)==null?void 0:x.account)||((g=Ra.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(N=>N==null?void 0:N.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(N=>N==null?void 0:N.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(N=>N!==null&&N))&&(await p.batchDeleteInsofDataApi({ids:s}),await ia.setLogRecordAsync({type:"删除",data:s},Pt.value)),dn.setActiveMenuPath(cp.value),Et.value=null,Ft.setRouteToChildPath(""),dn.setChildMenu("")},Bp=a=>new RegExp("button","i").test(a),Ap=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ml=a=>{if(Ap(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&dn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Np=a=>{Vl.value=a},ha=e.reactive({index:0,comp:null}),Vp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Op(i,s)}))}),Pl=(a,i)=>{var h,D,E,_,N;const s=i?a:a-2,l=(h=Et.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find($=>($==null?void 0:$.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex($=>($==null?void 0:$.isMainKey)&&($==null?void 0:$.label)!=="操作"),x=d===-1?0:d,g=(N=(_=l==null?void 0:l.compData)==null?void 0:_.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:N.contents;return{valid:g==null?void 0:g.every($=>$==null?void 0:$[x+1]),length:(g==null?void 0:g.length)||0}},Op=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Pl(i,!0);ha.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Rl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=Et.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:g}=Pl(i);g?(ha.index=i,ha.comp=(d=Et.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=i,ha.comp=(x=Et.value)==null?void 0:x[a]},Do=e.computed(()=>{var a,i;return(i=(a=Nl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Do.value,a=>{a&&Rl(0)},{immediate:!0});const Mp={class:"layout"},zp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:N}=_;return N==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:N}=_;return N==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const N=[];if(D=D.map($=>{const V=$.span;return V?($.span=Number(V),_=_+$.span):N.push($),$}),_<24){const $=Math.floor((24-_)/E);N.forEach(V=>{V.span=$})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var $;const _=e.resolveComponent("el-col"),N=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Mp,[e.createVNode(N,{style:e.normalizeStyle({height:($=d.value)==null?void 0:$.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(V,ye)=>(e.openBlock(),e.createBlock(_,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var H;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(ga),compName:V.name,index:(V==null?void 0:V.id)??ye,height:(H=d.value)==null?void 0:H.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Pp=Rt._export_sfc(zp,[["__scopeId","data-v-ab9a36ed"]]),Rp={class:"layout-operate"},Lp={class:"layout-module"},Fp={class:"collapse-title-item"},$p={class:"collapse-title"},jp={class:"icon-content"},Kp=["onClick"],Up={class:"comp-child"},Wp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{ye()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),g=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],N=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),$=e.computed(()=>{const k=N==null?void 0:N.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=N==null?void 0:N.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="children"});return A==null?void 0:A.contents}),ye=()=>{var k;c.value=N.value||{},D.value=(V==null?void 0:V.value)||[],x.value=g(),x.value=(k=x.value)==null?void 0:k.map(A=>{var le;const{prop:T}=A;return A.value=(le=$.value)==null?void 0:le[T],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const H=(k,A)=>{const T=p.cloneDeep(V==null?void 0:V.value);T[A].span=k.span,D.value=T,l("change",z(),!0)},j=k=>ma(k),ie=(k,A,T)=>{if(!k)return;const le=p.cloneDeep(V==null?void 0:V.value);le[T]&&(le[T].compData=k,D.value=le,l("change",z(),!0))},w=k=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((T,le)=>k!==le),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const T=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",Lp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Tt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=le=>h(le))},null,8,["rowContents"])])]),e.createVNode(kl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:le,index:Fe})=>[e.createElementVNode("div",Fp,[e.createElementVNode("div",$p,e.toDisplayString(le.name),1),e.createElementVNode("div",jp,[e.createElementVNode("div",{onClick:e.withModifiers(ot=>w(Fe),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Kp)])])]),content:e.withCtx(({item:le,index:Fe})=>[e.createElementVNode("div",Up,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:E.value[Fe],key:Fe,isEnableWrap:!0,onChange:ot=>H(ot,Fe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(le.comp+"Operate")),{itemContents:le==null?void 0:le.compData,originalItemContents:le.compData,onChange:ot=>ie(ot,le,Fe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Hp=Rt._export_sfc(Wp,[["__scopeId","data-v-ba05456e"]]),qp=typeof window<"u";var Go;qp&&((Go=window==null?void 0:window.navigator)!=null&&Go.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pn(a){return a==null}function Ll(){}const Gp=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Gp)));function Xp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function Xo(a,i=16){if(typeof a!="function")return Ll;const s=(...d)=>{a(...d)};if(i<=0)return Fl(s);let l=0,c;return function(...d){const x=Date.now(),g=x-l;clearTimeout(c),g>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-g))}}function Yp(a,i=100){if(typeof a!="function")return Ll;const s=(...c)=>{a(...c)};if(i<=0)return Fl(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Fl(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const _a=new Set,$l=new WeakMap;function Jp(){_a.forEach(a=>{a(...$l.get(a))}),_a.clear()}function nn(a,...i){if(typeof a!="function")return a;$l.set(a,i),!_a.has(a)&&(_a.add(a),_a.size===1&&Promise.resolve().then(Jp))}const jl=Symbol("LAYOUT_KEY"),Kl=Symbol("EMITTER_KEY");function Qp(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function mo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Zp(a[s]);return i}function Zp(a){return{...a}}function Ul(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function da(a,i,s){const l=Hl(a),c=ql(a),d=Array(a.length);for(let x=0,g=c.length;x<g;x++){let h=c[x];h.static||(h=ed(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function ed(a,i,s,l){if(s)for(;i.y>0&&!Sa(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Sa(a,i);)i.y--}let c;for(;c=Sa(a,i);)i.y=c.y+c.h;return i}function td(a,i){const s=Hl(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Sa(s,d);)d.y++}return a}function Yo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Sa(a,i){for(let s=0,l=a.length;s<l;s++)if(Ul(a[s],i))return a[s]}function Wl(a,i){return a.filter(s=>Ul(s,i))}function Hl(a){return a.filter(i=>i.static)}function yo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,g=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=ql(a);h&&(D=D.reverse());const E=Wl(D,i);if(d&&E.length)return i.x=x,i.y=g,i.moved=!1,a;for(let _=0,N=E.length;_<N;_++){const $=E[_];$.moved||i.y>$.y&&i.y-$.y>$.h/4||($.static?a=Jo(a,$,i,c):a=Jo(a,i,$,c))}return a}function Jo(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Sa(a,c))return yo(a,s,void 0,c.y,!1)}return yo(a,s,void 0,s.y+1,!1)}function nd(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ad(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function od(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ql(a){return Array.from(a).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 rd(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let g=0;g<s.length;g++)if(typeof x[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[g]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function id(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function Qo(a){return sd(a)}function sd(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function Zo(a,i,s,l){return cd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function cd(a){return typeof a=="number"&&!Number.isNaN(a)}function ud(a,i){const s=Xl(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const x=s[c];i>a[x]&&(l=x)}return l}function Gl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function pd(a,i,s,l,c,d,x){if(i[l])return mo(i[l]);let g=a;const h=Xl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const N=D[E];if(i[N]){g=i[N];break}}return g=mo(g||[]),da(td(g,{cols:d}),x)}function Xl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let dd="auto";function fd(){return typeof document<"u"}function el(){return fd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):dd}var Ca={exports:{}},hd=Ca.exports,tl;function vd(){return tl||(tl=1,function(a,i){(function(s,l){a.exports=l()})(hd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=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},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ye(r.key),r)}}function g(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ye(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&_(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function _(n,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},_(n,t)}function N(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function $(n){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,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ye(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var H=function(n){return!(!n||!n.Window)&&n instanceof n.Window},j=void 0,ie=void 0;function w(n){j=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),ie=n}function z(n){return H(n)?n:(n.ownerDocument||n).defaultView||ie.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===ie||H(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=z(n)||ie;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function le(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Fe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var ot={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=ot.draggable,t.map.drag=ot,t.methodDict.drag="draggable",r.actions.drag=ot.defaults},listeners:{"interactions:before-action-move":le,"interactions:action-resume":le,"interactions:action-move":Fe,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return T.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):T.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:le,move:Fe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ie=ot,je={init:function(n){var t=n;je.document=t.document,je.DocumentFragment=t.DocumentFragment||we,je.SVGElement=t.SVGElement||we,je.SVGSVGElement=t.SVGSVGElement||we,je.SVGElementInstance=t.SVGElementInstance||we,je.Element=t.Element||we,je.HTMLElement=t.HTMLElement||je.Element,je.Event=t.Event,je.Touch=t.Touch||we,je.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function we(){}var I=je,te={init:function(n){var t=I.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&I.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?I.PointerEvent===n.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,te.wheelEvent=I.document&&"onmousewheel"in I.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=te;function he(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;T.element(n);){if(q(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function q(n,t){return ie!==j&&(t=t.replace(/\/deep\//g," ")),n[ee.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function me(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function ke(n,t,o){for(;T.element(n);){if(q(n,t))return!0;if((n=st(n))===o)return q(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Ve(n){var t=n instanceof I.SVGElement?n.getBoundingClientRect():n.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 Ye(n){var t,o=Ve(n);if(!ee.isIOS7&&o){var r={x:(t=(t=z(n))||ie).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!T.string(n)&&(I.document.querySelector(n),!0)}function Q(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function nt(n,t,o,r){var u=n;return T.string(u)?u=tt(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Ye(u)),u}function ze(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Q({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function oe(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function re(n,t,o){var r=o&&n.options[o];return ze(nt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},T.string(n)&&n.search(" ")!==-1&&(n=Xe(n)),T.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(T.object(n)&&(t=n,n=""),T.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(T.array(t))for(var u=0,f=t;u<f.length;u++){var y=f[u];Te(n,y,o,r)}else if(T.object(t))for(var b in t)Te(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(m.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function W(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function Y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function v(n){return n instanceof I.Event||n instanceof I.Touch}function F(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Z(n,t){return t=t||{x:0,y:0},ee.isOperaMobile&&v(n)?(F("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):F("page",n,t),t}function P(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function ue(n,t,o){var r=t.length>1?X(t):t[0];Z(r,n.page),function(u,f){f=f||{},ee.isOperaMobile&&v(u)?F("screen",u,f):F("client",u,f)}(r,n.client),n.timeStamp=o}function R(n){var t=[];return T.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function X(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function se(n){if(!n.length)return null;var t=R(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ve(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function K(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function ae(n){return T.string(n.pointerType)?n.pointerType:T.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof I.Touch?"touch":"mouse"}function G(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var _e=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(_e.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var de=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return de([],n)},L=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},fe=function(n,t){return n[L(n,t)]},ne=function(n){D(o,n);var t=$(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,U=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=U,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return g(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,y=L(f,function(S){var U=S.dropzone,B=S.element;return U===r.dropzone&&B===r.target});u.activeDrops.splice(y,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(_e);function Be(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,U=f.interactables.list;S<U.length;S++){var B=U[S];if(B.options.drop.enabled){var J=B.options.drop.accept;if(!(T.element(J)&&J!==y||T.string(J)&&!q(y,J)||T.func(J)&&!J({dropzone:B,draggableElement:y})))for(var xe=0,$e=B.getAllElements();xe<$e.length;xe++){var Pe=$e[xe];Pe!==y&&b.push({dropzone:B,element:Pe,rect:B.getRect(Pe)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Oe(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var U=S[b],B=U.dropzone,J=U.element,xe=U.rect,$e=B.dropCheck(t,o,u,f,J,xe);y.push($e?J:null)}var Pe=function(Ge){for(var it,at,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],kt=Ge[it];if(mt&&_t!==it)if(kt){var tn=M(mt),Kt=M(kt);if(tn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(tn!==Kt){yt=yt.length?yt:me(kt);var un=void 0;if(kt instanceof I.HTMLElement&&mt instanceof I.SVGElement&&!(mt instanceof I.SVGSVGElement)){if(mt===Kt)continue;un=mt.ownerSVGElement}else un=mt;for(var En=me(un,kt.ownerDocument),Pn=0;En[Pn]&&En[Pn]===yt[Pn];)Pn++;var Pa=[En[Pn-1],En[Pn],yt[Pn]];if(Pa[0])for(var xa=Pa[0].lastChild;xa;){if(xa===Pa[1]){it=_t,yt=En;break}if(xa===Pa[2])break;xa=xa.previousSibling}}else ht=kt,(parseInt(z(at=mt).getComputedStyle(at).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Pe]||null}function Ne(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ne(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ne(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function ge(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Be(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Je(t,o.element));var y=r,b=Oe(o,y,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ne(o,0,y)}}var Ke={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ie),r.prototype.dropzone=function(f){return function(y,b){if(T.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),U=Object.keys(S).reduce(function(J,xe){return J[/^(enter|leave)/.test(xe)?"drag".concat(xe):/^(activate|deactivate|move)/.test(xe)?"drop".concat(xe):xe]=S[xe],J},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(U),y.options.drop.listeners=U}return T.func(b.ondrop)&&y.on("drop",b.ondrop),T.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:T.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return T.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,U,B){return function(J,xe,$e,Pe,Ge,it,at){var ht=!1;if(!(at=at||J.getRect(it)))return!!J.options.drop.checker&&J.options.drop.checker(xe,$e,ht,J,it,Pe,Ge);var yt=J.options.drop.overlap;if(yt==="pointer"){var _t=re(Pe,Ge,"drag"),mt=Z(xe);mt.x+=_t.x,mt.y+=_t.y;var kt=mt.x>at.left&&mt.x<at.right,tn=mt.y>at.top&&mt.y<at.bottom;ht=kt&&tn}var Kt=Pe.getRect(Ge);if(Kt&&yt==="center"){var un=Kt.left+Kt.width/2,En=Kt.top+Kt.height/2;ht=un>=at.left&&un<=at.right&&En>=at.top&&En<=at.bottom}return Kt&&T.number(yt)&&(ht=Math.max(0,Math.min(at.right,Kt.right)-Math.max(at.left,Kt.left))*Math.max(0,Math.min(at.bottom,Kt.bottom)-Math.max(at.top,Kt.top))/(Kt.width*Kt.height)>=yt),J.options.drop.checker&&(ht=J.options.drop.checker(xe,$e,ht,J,it,Pe,Ge)),ht}(this,f,y,b,S,U,B)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Q(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ke.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.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(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Je(t,o.element),u.events=Ne(o,0,r),u.events.activate&&(Be(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;ge(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;ct(n,t),ge(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.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:Je,getDrop:Oe,getDropEvents:Ne,fireDropEvents:ge,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},be=Ke;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(U){return U.pointer}),f=r==="start",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ve(u,b),o.box=se(u),o.scale=1,o.ds=0,o.angle=K(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=ve(u,b),o.box=se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=K(u,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,T.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Qe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return T.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):T.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},pe=Qe;function Ae(n,t,o,r,u,f,y){if(!t)return!1;if(t===!0){var b=T.number(f.width)?f.width:f.right-f.left,S=T.number(f.height)?f.height:f.bottom-f.top;if(y=Math.min(y,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var U=b>=0?f.left:f.right;return o.x<U+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!T.element(r)&&(T.element(t)?t===r:ke(r,t,u))}function Le(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var We,O,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return T.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(y.options.resize.square=b.square),y):T.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:Q({},f),corrected:Q({},f),previous:Q({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Le(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,U=S.start,B=S.corrected,J=S.delta,xe=S.previous;if(Q(xe,B),y){if(Q(B,b),f==="reposition"){if(B.top>B.bottom){var $e=B.top;B.top=B.bottom,B.bottom=$e}if(B.left>B.right){var Pe=B.left;B.left=B.right,B.right=Pe}}}else B.top=Math.min(b.top,U.bottom),B.bottom=Math.max(b.bottom,U.top),B.left=Math.min(b.left,U.right),B.right=Math.max(b.right,U.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)J[Ge]=B[Ge]-xe[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=J}})(n),Le(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var y=Q({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(T.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var U in S)S[U]=Ae(U,b.edges[U],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,J=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||J)&&(n.action={name:"resize",axes:(B?"x":"")+(J?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var U=S[b];t[U]&&(y+=U)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(pe),n.usePlugin(ut),n.usePlugin(Ie),n.usePlugin(be)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return O(n)},init:function(n){if(We=n.requestAnimationFrame,O=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],O=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),O=O&&O.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},O=function(u){return clearTimeout(u)})}},Se={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(n){Se.isScrolling=!0,rt.cancel(Se.i),n.autoScroll=Se,Se.interaction=n,Se.prevTime=Se.now(),Se.i=rt.request(Se.scroll)},stop:function(){Se.isScrolling=!1,Se.interaction&&(Se.interaction.autoScroll=null),rt.cancel(Se.i)},scroll:function(){var n=Se.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Se.now(),b=(y-Se.prevTime)/1e3,S=u.speed*b;if(S>=1){var U={x:Se.x*S,y:Se.y*S};if(U.x||U.y){var B=He(f);T.window(f)?f.scrollBy(U.x,U.y):f&&(f.scrollLeft+=U.x,f.scrollTop+=U.y);var J=He(f),xe={x:J.x-B.x,y:J.y-B.y};(xe.x||xe.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:xe,interaction:n,container:f})}Se.prevTime=y}Se.isScrolling&&(rt.cancel(Se.i),Se.i=rt.request(Se.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Se.check(t.interactable,t.prepared.name))if(t.simulation)Se.x=Se.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,U=t.prepared.name,B=b.options[U].autoScroll,J=Ze(B.container,b,S);if(T.window(J))y=o.clientX<Se.margin,r=o.clientY<Se.margin,u=o.clientX>J.innerWidth-Se.margin,f=o.clientY>J.innerHeight-Se.margin;else{var xe=Ve(J);y=o.clientX<xe.left+Se.margin,r=o.clientY<xe.top+Se.margin,u=o.clientX>xe.right-Se.margin,f=o.clientY>xe.bottom-Se.margin}Se.x=u?1:y?-1:0,Se.y=f?1:r?-1:0,Se.isScrolling||(Se.margin=B.margin,Se.speed=B.speed,Se.start(t))}}};function Ze(n,t,o){return(T.string(n)?tt(n,t,o):n)||z(o)}function He(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Se,Se.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Se.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Se.stop(),Se.interaction&&(Se.interaction=null)},"interactions:stop":Se.stop,"interactions:action-move":function(n){return Se.onInteractionMove(n)}}},vt=pt;function It(n,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),n.apply(this,arguments)}}function Bt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wt(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,U,B,J){var xe=b.getRect(B),$e=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Pe={action:null,interactable:b,interaction:U,element:B,rect:xe,buttons:$e};return J.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=It(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=It(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wt,t.prototype.styleCursor=xt}};function At(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&qt(t,o,n,u)?n:null}function Ut(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var U=r[b],B=u[b],J=U.getAction(t,o,n,B);if(J){var xe=At(J,U,B,f,y);if(xe)return{action:xe,interactable:U,element:B}}}return{action:null,interactable:null,element:null}}function Lt(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;T.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var U=Ut(n,t,o,f,y,r,u);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Bt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,Dn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,U=0,B=0;if(!(f&&y&&b))return!1;for(var J=0,xe=r.interactions.list;J<xe.length;J++){var $e=xe[J],Pe=$e.prepared.name;if($e.interacting()&&(++S>=b||$e.interactable===n&&((U+=Pe===o.name?1:0)>=f||$e.element===t&&(B++,Pe===o.name&&B>=y))))return!1}return b>0}function wn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function fn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Dn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var y=o.options[u.name].cursorChecker;f=T.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}fn(n.element,f||"",t)}else t.autoStart.cursorElement&&fn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Q(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return wn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Lt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Lt(u,f,y,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!qt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),Dn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&fn(o.element,"",t)}},maxInteractions:wn,withinInteractionLimit:qt,validateAction:At},hn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,U=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&U!=="xy"&&U!==B){o.prepared.name=null;for(var J=r,xe=function(Pe){if(Pe!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Pe.testIgnoreAllow(Ge,J,r)){var it=Pe.getAction(o.downPointer,o.downEvent,o,J);if(it&&it.name==="drag"&&function(at,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return at==="xy"||yt==="xy"||yt===at}(B,Pe)&&hn.validateAction(it,Pe,J,r,t))return Pe}}};T.element(J);){var $e=t.interactables.forEachMatch(J,xe);if($e){o.prepared.name="drag",o.interactable=$e,o.element=J;break}J=st(J)}}}}}};function vn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(hn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=vn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;vn(t)>0&&(t.prepared.name=null)}},getHoldDuration:vn},gn=In,Xn={id:"auto-start",install:function(n){n.usePlugin(hn),n.usePlugin(gn),n.usePlugin(Tn)}},Yn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):T.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Jn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var jn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Yn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||T.element(f.target)&&q(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||he(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Jn,n},{})};function Bn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function mn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=mn(r):T.array(r)?t[o]=Ee(r):t[o]=r}return t}var zn=function(){function n(t){d(this,n),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=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(U){var B=U.interactable.options[U.prepared.name],J=B.modifiers;return J&&J.length?J:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(xe){var $e=B[xe];return $e&&$e.enabled&&{options:$e,methods:$e._methods}}).filter(function(xe){return!!xe})}(y);this.prepareStates(b),this.startEdges=Q({},y.edges),this.edges=Q({},this.startEdges),this.startOffset=(r=y.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{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,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,y=t.edges;t.coords=Q({},t.pageCoords),t.rect=Q({},f),t.edges=Q({},y);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),U=0;U<b.length;U++){var B,J=b[U],xe=J.options,$e=Q({},t.coords),Pe=null;(B=J.methods)!=null&&B.set&&this.shouldDo(xe,r,o)&&(t.state=J,Pe=J.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-$e.x,y:t.coords.y-$e.y})),S.eventProps.push(Pe)}Q(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var at=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=at||Ge.x!==S.coords.x||Ge.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Q(this.startDelta,y.delta);for(var U=0,B=[[f,b],[u,S]];U<B.length;U++){var J=B[U],xe=J[0],$e=J[1];xe.page.x+=$e.x,xe.page.y+=$e.y,xe.client.x+=$e.x,xe.client.y+=$e.y}var Pe=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Pe.left,Ge.right+=Pe.right,Ge.top+=Pe.top,Ge.bottom+=Pe.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,U=b.methods,B=U.beforeEnd&&U.beforeEnd(t);if(B)return this.endResult=B,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=Q({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var y=f[u];r.state=y,y.methods.stop&&y.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var y=f.startDelta,b=f.result,S=b.delta,U=b.rectDelta,B=0,J=[[r.start,y],[r.cur,S]];B<J.length;B++){var xe=J[B],$e=xe[0],Pe=xe[1];$e.page.x-=Pe.x,$e.page.y-=Pe.y,$e.client.x-=Pe.x,$e.client.y-=Pe.y}u.left-=U.left,u.right-=U.right,u.top-=U.top,u.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="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 mn(o)}),this.result=An(Q({},t.result.coords),Q({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Cn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var bt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new zn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Cn,"interactions:action-move":Cn,"interactions:action-end":Cn,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},Jt=bt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Qn=function(n){D(o,n);var t=$(o);function o(r,u,f,y,b,S,U){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var J=r.interactable,xe=(J&&J.options||gt).deltaSource,$e=re(J,b,f),Pe=y==="start",Ge=y==="end",it=Pe?N(B):r.prevEvent,at=Pe?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Q({},at.page),B.client=Q({},at.client),B.rect=Q({},r.rect),B.timeStamp=at.timeStamp,Ge||(B.page.x-=$e.x,B.page.y-=$e.y,B.client.x-=$e.x,B.client.y-=$e.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=U||f+(y||""),B.interactable=J,B.t0=Pe?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-$e.x,B.y0=r.coords.start.page.y-$e.y,B.clientX0=r.coords.start.client.x-$e.x,B.clientY0=r.coords.start.client.y-$e.y,B.delta=Pe||Ge?{x:0,y:0}:{x:B[xe].x-it[xe].x,y:B[xe].y-it[xe].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Q({},r.coords.velocity[xe]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return g(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,y=202.5<=u&&u<337.5;return{up:y,down:!y&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(_e);Object.defineProperties(Qn.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var Mt=g(function n(t,o,r,u,f){d(this,n),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=r,this.downTime=u,this.downTarget=f}),yn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Nn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),on=0,Vn=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),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=It(function(B){this.move(B)},"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=on++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in yn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var U in Nn)S(U);this._scopeFire("interactions:new",{interaction:this})}return g(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){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=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Q({},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,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,y=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&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,f)>this.pointerMoveTolerance);var b,S,U,B=this.getPointerIndex(t),J={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(b=this.coords.velocity,S=this.coords.delta,U=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/U,b.page.y=S.page.y/U,b.client.x=S.client.x/U,b.client.y=S.client.y/U,b.timeStamp=U),this._scopeFire("interactions:move",J),y||this.simulation||(this.interacting()&&(J.type=null,this.move(J)),this.pointerWasMoved&&W(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=Q({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,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,curEventTarget:u,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=P(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:L(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,y,b,S=P(t),U=this.getPointerIndex(t),B=this.pointers[U];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),U=this.pointers.length,this.pointers.push(B)),ue(this.coords.cur,this.pointers.map(function(J){return J.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(W(this.coords.start,this.coords.cur),W(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:B,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Qn(this,t,this.prepared.name,o,this.element,r,u)}},{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,r=t.phase,u=t.preEnd,f=t.type,y=this.rect;if(y&&r==="move"&&(oe(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Zt(n){Kn(n.interaction)}function Kn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),oe(n.edges,n.rect,t),t.x=0,t.y=0,!0}function bn(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function zt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}Nn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=bn},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Zt,"interactions:before-action-move":Zt,"interactions:before-action-end":function(n){var t=n.interaction;if(Kn(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ln=Gt,Dt=function(){function n(t){d(this,n),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(n,[{key:"start",value:function(t){var o=this.interaction,r=Nt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new zn(o));if(y.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(y.result=y.setAll(this.modifierArg),!y.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,r=Nt(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,U=this.interaction,B=Nt(U).resistance,J=(U._now()-this.t0)/1e3;if(J<this.te){var xe,$e=1-(Math.exp(-B*J)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,y=this.modifiedOffset.y,xe={x:Ht(b=$e,t,r,f),y:Ht(b,o,u,y)}):xe={x:this.targetOffset.x*$e,y:this.targetOffset.y*$e};var Pe={x:xe.x-this.currentOffset.x,y:xe.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,U.offsetBy(Pe),U.move(),this.onNextFrame(function(){return S.inertiaTick()})}else U.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=Nt(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),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,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),W(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rt.cancel(this.timeout)}}]),n}();function Nt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(Jt),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;T.element(u);){if(u===t.element){r.resume(n);break}u=st(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Cn,"interactions:action-inertiastart":Cn,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var cn=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Un=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=Q({},t||{})}return g(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=de(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Zn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Wn(n){return T.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function ea(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:y,remove:b,addDelegate:function(B,J,xe,$e,Pe){var Ge=Wn(Pe);if(!r[xe]){r[xe]=[];for(var it=0;it<u.length;it++){var at=u[it];y(at,xe,S),y(at,xe,U,!0)}}var ht=r[xe],yt=fe(ht,function(_t){return _t.selector===B&&_t.context===J});yt||(yt={selector:B,context:J,listeners:[]},ht.push(yt)),yt.listeners.push({func:$e,options:Ge})},removeDelegate:function(B,J,xe,$e,Pe){var Ge,it=Wn(Pe),at=r[xe],ht=!1;if(at)for(Ge=at.length-1;Ge>=0;Ge--){var yt=at[Ge];if(yt.selector===B&&yt.context===J){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var kt=_t[mt];if(kt.func===$e&&ea(kt.options,it)){_t.splice(mt,1),_t.length||(at.splice(Ge,1),b(J,xe,S),b(J,xe,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:U,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,J,xe,$e){if(B.addEventListener){var Pe=Wn($e),Ge=fe(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[J]||(Ge.events[J]=[]),fe(Ge.events[J],function(it){return it.func===xe&&ea(it.options,Pe)})||(B.addEventListener(J,xe,f.supportsOptions?Pe:Pe.capture),Ge.events[J].push({func:xe,options:Pe}))}}function b(B,J,xe,$e){if(B.addEventListener&&B.removeEventListener){var Pe=L(o,function(tn){return tn.eventTarget===B}),Ge=o[Pe];if(Ge&&Ge.events)if(J!=="all"){var it=!1,at=Ge.events[J];if(at){if(xe==="all"){for(var ht=at.length-1;ht>=0;ht--){var yt=at[ht];b(B,J,yt.func,yt.options)}return}for(var _t=Wn($e),mt=0;mt<at.length;mt++){var kt=at[mt];if(kt.func===xe&&ea(kt.options,_t)){B.removeEventListener(J,xe,f.supportsOptions?_t:_t.capture),at.splice(mt,1),at.length===0&&(delete Ge.events[J],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Pe,1)}else for(J in Ge.events)Ge.events.hasOwnProperty(J)&&b(B,J,"all")}}function S(B,J){for(var xe=Wn(J),$e=new Zn(B),Pe=r[B.type],Ge=G(B)[0],it=Ge;T.element(it);){for(var at=0;at<Pe.length;at++){var ht=Pe[at],yt=ht.selector,_t=ht.context;if(q(it,yt)&&he(_t,Ge)&&he(_t,it)){var mt=ht.listeners;$e.currentTarget=it;for(var kt=0;kt<mt.length;kt++){var tn=mt[kt];ea(tn.options,xe)&&tn.func($e)}}}it=st(it)}}function U(B){return S(B,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ca={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ca.methodOrder;t<o.length;t++){var r=o[t],u=ca[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ya(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var U=0,B=f.interactions.list;U<B.length;U++){var J=B[U];if(!(J.pointerType!==r||/down/i.test(u)&&J.simulation))return J}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ya(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ya(n,t){return n.pointers.some(function(o){return o.id===t})}var ua=ca,kn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ta(n,t){return function(o){var r=t.interactions.list,u=ae(o),f=G(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,B=o.changedTouches;U<B.length;U++){var J=B[U],xe={pointer:J,pointerId:P(J),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},$e=pa(xe);S.push([xe.pointer,xe.eventTarget,xe.curEventTarget,$e])}}else{var Pe=!1;if(!ee.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Pe;Ge++)Pe=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var it={pointer:o,pointerId:P(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},at=pa(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,at])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],kt=yt[2];yt[3][n](_t,o,mt,kt)}}}function pa(n){var t=n.pointerType,o=n.scope,r={interaction:ua.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var U=u&&u.events,B=0;B<f.length;B++){var J=f[B];b(o,J.type,J.listener,U)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<kn.length;o++){var r=kn[o];t[r]=ta(r,n)}var u,f=ee.pEventTypes;function y(){for(var b=0,S=n.interactions.list;b<S.length;b++){var U=S[b];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var B=function(){var $e=xe[J];n.documents.some(function(Pe){return he(Pe.doc,$e.downTarget)})||U.removePointer($e.pointer,$e.event)},J=0,xe=U.pointers;J<xe.length;J++)B()}}(u=I.PointerEvent?[{type:f.down,listener:y},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:y},{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 S=0,U=n.interactions.list;S<U.length;S++)U[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(U,b);var S=$(U);function U(){return d(this,U),S.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),U}(Vn),n.interactions={list:[],new:function(b){b.scopeFire=function(U,B){return n.fire(U,B)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(jn)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ta,methodNames:kn},Hn=Va,qn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(qn||{}),rr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,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||r,this._win=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return g(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return T.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),T.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),T.func(o.onend)&&this.on("".concat(t,"end"),o.onend),T.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&Bn(S,f._actions)};(T.array(o)||T.object(o))&&this._onOff(qn.Off,t,o,void 0,b),(T.array(r)||T.object(r))&&this._onOff(qn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),T.array(b)?y[f]=Ee(b):T.plainObject(b)?(y[f]=Q(y[f]||{},mn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?y[f].enabled=b:y[f]=b}}},{key:"getRect",value:function(t){return t=t||(T.element(this.target)?this.target:null),T.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=Q({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(lt(o)||T.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][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 T.string(t)?Array.from(this._context.querySelectorAll(t)):T.func(t)&&t.getAllElements?t.getAllElements():T.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||he(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!T.element(r)&&(T.string(t)?ke(r,t,o):!!T.element(t)&&he(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?ke(r,t,o):!!T.element(t)&&he(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){T.object(o)&&!T.array(o)&&(u=r,r=null);var y=Te(o,r,f);for(var b in y){b==="wheel"&&(b=ee.wheelEvent);for(var S=0,U=y[b];S<U.length;S++){var B=U[S];Bn(b,this._actions)?this.events[t===qn.On?"on":"off"](b,B):T.string(this.target)?this._scopeEvents[t===qn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===qn.On?"add":"remove"](this.target,b,B,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(qn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(qn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in T.object(t)||(t={}),this.options=mn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Q(Q({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?T.func(this[y])&&this[y](t[y]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(T.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,y=u.context,b=u.listeners;f===this.target&&y===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ir=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,y=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=L(y,function(S){return S===u});y.splice(b,1)}})}return g(n,[{key:"new",value:function(t,o){o=Q(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),T.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=T.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return fe(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((T.string(f.target)?T.element(t)&&q(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),sr=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ee,this.defaults=mn(gt),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=X,u.getTouchBBox=se,u.getTouchDistance=ve,u.getTouchAngle=K,u.getElementRect=Ye,u.getElementClientRect=Ve,u.matchesSelector=q,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=It(function(f,y,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,U=f;S<U.length;S++){var B=U[S];this.on(B,y,b)}return this}if(T.object(f)){for(var J in f)this.on(J,f[J],y);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=It(function(f,y,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,U=f;S<U.length;S++){var B=U[S];this.off(B,y,b)}return this}if(T.object(f)){for(var J in f)this.off(J,f[J],y);return this}var xe;return Bn(f,this.scope.actions)?f in this.globalEvents&&(xe=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(xe,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ee.supportsTouch},u.supportsPointerEvent=function(){return ee.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[f].stop();return this},u.pointerMoveTolerance=function(f){return T.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Qn,this.Interactable=void 0,this.interactables=new ir(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=$(f);function f(){return d(this,f),u.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return V(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){V(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(rr)}return g(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,T.window(r)&&w(r),I.init(r),ee.init(r),rt.init(r),o.window=r,o.document=r.document,o.usePlugin(Hn),o.usePlugin(Na),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 r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[Eo(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[Eo(y)]))break}this.listenerMaps.splice(r,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 r=z(t);o=o?Q({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=z(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{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()}}]),n}();function Eo(n){return n&&n.replace(/\/.*$/,"")}var _o=new sr,en=_o.interactStatic,cr=typeof globalThis<"u"?globalThis:window;_o.init(cr);var ur=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,U=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},J=0;J<t.length;J++){var xe=t[J],$e=xe[0],Pe=xe[1],Ge=Math.round((r-U.x)/n[$e]),it=Math.round((u-U.y)/n[Pe]);B[$e]=Math.max(b.left,Math.min(b.right,Ge*n[$e]+U.x)),B[Pe]=Math.max(b.top,Math.min(b.bottom,it*n[Pe]+U.y))}return B};return o.grid=n,o.coordFields=t,o}}),pr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Q(t.snappers||{},ur),t.createSnapGrid=t.snappers.grid}},dr=pr,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,U=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Q({},u),t.startRect=Q({},o),t.ratio=y,t.equalDelta=U;var J=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var xe=(J.left?1:-1)*(J.top?1:-1);t.edgeSign={x:xe,y:xe}}else t.edgeSign={x:J.left?-1:1,y:J.top?-1:1};if(b!==!1&&Q(r,J),B!=null&&B.length){var $e=new zn(n.interaction);$e.copyFrom(n.interaction.modification),$e.prepareStates(B),t.subModification=$e,$e.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Q({},r),y=t.equalDelta?hr:vr;if(Q(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Q({},o);oe(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),U=S.delta;return S.changed&&(y(t,Math.abs(U.x)>Math.abs(U.y),S.coords,S.rect),Q(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function vr(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var U=r.height*y;o.x=f.x+(U-u.width)*b.x}}var gr=an(fr,"aspectRatio"),So=function(){};So._defaults={};var Oa=So;function na(n,t,o){return T.func(n)?nt(n,t.interactable,t.element,[o.x,o.y,t]):nt(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,y=r.options,b=y.elementRect,S=Q({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var U=na(y.restriction,u,f);if(U){var B=U.right-U.left-t.width,J=U.bottom-U.top-t.height;B<0&&(S.left+=B,S.right+=B),J<0&&(S.top+=J,S.bottom+=J)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,y=na(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Q({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(y);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},mr=an(Ma,"restrict"),To={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Bo(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ba={noInner:To,noOuter:Io,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=ze(na(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,y=u.options;if(o){var b=Q({},t),S=na(y.inner,r,b)||{},U=na(y.outer,r,b)||{};Bo(S,To),Bo(U,Io),o.top?t.y=Math.min(Math.max(U.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(U.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(U.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yr=an(ba,"restrictEdges"),br=Q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),kr=an({start:Ma.start,set:Ma.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=an({start:function(n){return ba.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(na(f.min,t,n.coords))||xr,b=ce(na(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:Q({},ba.noInner),outer:Q({},ba.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ba.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,U=S.offsetWithOrigin?function(xe){var $e=xe.interaction.element,Pe=ze(nt(xe.state.options.origin,null,null,[$e])),Ge=Pe||re(xe.interactable,$e,xe.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=nt(S.offset,r,u,[o]);(t=ze(B)||{x:0,y:0}).x+=U.x,t.y+=U.y}var J=S.relativePoints;y.offsets=f&&J&&J.length?J.map(function(xe,$e){return{index:$e,relativePoint:xe,x:b.left-f.width*xe.x+t.x,y:b.top-f.height*xe.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,y=re(t.interactable,t.element,t.prepared.name),b=Q({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var U=0,B=f;U<B.length;U++)for(var J=B[U],xe=b.x-J.x,$e=b.y-J.y,Pe=0,Ge=u.targets.length;Pe<Ge;Pe++){var it=u.targets[Pe],at=void 0;(at=T.func(it)?it(xe,$e,t._proxy,J,Pe):it)&&S.push({x:(T.number(at.x)?at.x:xe)+J.x,y:(T.number(at.y)?at.y:$e)+J.y,range:T.number(at.range)?at.range:u.range,source:it,index:Pe,offset:J})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,kt=_t.x-b.x,tn=_t.y-b.y,Kt=dt(kt,tn),un=Kt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(un=!1),ht.target&&!(un?ht.inRange&&mt!==1/0?Kt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=_t,ht.distance=Kt,ht.range=mt,ht.inRange=un,ht.delta.x=kt,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Q({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var U=S[b],B=void 0;if(B=T.func(U)?U(y.x,y.y,t):U){for(var J=0,xe=o.targetFields;J<xe.length;J++){var $e=xe[J],Pe=$e[0],Ge=$e[1];if(Pe in B||Ge in B){B.x=B[Pe],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=io.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=an(za,"snapSize"),so={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:Q(mn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Jt),n.usePlugin(dr),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,Ao=function(n){D(o,n);var t=$(o);function o(r,u,f,y,b,S){var U;if(d(this,o),C(N(U=t.call(this,b)),f),f!==u&&C(N(U),u),U.timeStamp=S,U.originalEvent=f,U.type=r,U.pointerId=P(u),U.pointerType=ae(u),U.target=y,U.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);U.dt=U.timeStamp-b.pointers[B].downTime;var J=U.timeStamp-b.tapTime;U.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===U.target&&J<500}else r==="doubletap"&&(U.dt=u.timeStamp-b.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(_e),ka={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ka,n.defaults.actions.pointerEvents=ka.defaults,Q(n.actions.phaselessTypes,ka.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget,S=o.pointerIndex,U=u.pointers[S].hold,B=qe(b),J={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},xe=0;xe<B.length;xe++){var $e=B[xe];J.node=$e,r.fire("pointerEvents:collect-targets",J)}if(J.targets.length){for(var Pe=1/0,Ge=0,it=J.targets;Ge<it.length;Ge++){var at=it[Ge].eventable.options.holdDuration;at<Pe&&(Pe=at)}U.duration=Pe,U.timeout=setTimeout(function(){Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Pe)}})(n,t),Gn(n,t)},"interactions:up":function(n,t){co(n),Gn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),Gn(n,t)}},PointerEvent:Ao,fire:Gn,collectEventTargets:No,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 Gn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=n.targets,S=b===void 0?No(n,t):b,U=new Ao(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:U},J=0;J<S.length;J++){var xe=S[J];for(var $e in xe.props||{})U[$e]=xe.props[$e];var Pe=re(xe.eventable,xe.node);if(U._subtractOrigin(Pe),U.eventable=xe.eventable,U.currentTarget=xe.node,xe.eventable.fire(U),U._addOrigin(Pe),U.immediatePropagationStopped||U.propagationStopped&&J+1<S.length&&S[J+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=U.double?Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):U;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return U}function No(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var U=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:U,targets:[],node:null},J=0;J<U.length;J++){var xe=U[J];B.node=xe,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function($e){var Pe,Ge;return $e.eventable.options.holdDuration===((Pe=o.pointers[b])==null||(Ge=Pe.hold)==null?void 0:Ge.duration)})),B.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ka});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ka);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Ir,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Q(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;Q(o.events.options,t.pointerEvents.defaults),Q(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,zr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,U=function(){var J=y[B],xe=r.getRect(J);if(!xe)return 1;var $e,Pe=fe(f.interactions.list,function(at){return at.interacting()&&at.interactable===r&&at.element===J&&at.prepared.name===u.name});if(Pe)Pe.move(),S&&($e=Pe._reflowPromise||new b(function(at){Pe._reflowResolve=at}));else{var Ge=ce(xe),it=function(at){return{coords:at,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});$e=function(at,ht,yt,_t,mt){var kt=at.interactions.new({pointerType:"reflow"}),tn={interaction:kt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};kt.interactable=ht,kt.element=yt,kt.prevEvent=mt,kt.updatePointer(mt,mt,yt,!0),Y(kt.coords.delta),Bt(kt.prepared,_t),kt._doPhase(tn);var Kt=at.window,un=Kt.Promise,En=un?new un(function(Pn){kt._reflowResolve=Pn}):void 0;return kt._reflowPromise=En,kt.start(_t,ht,yt),kt._interacting?(kt.move(tn),kt.end(mt)):(kt.stop(),kt._reflowResolve()),kt.removePointer(mt,mt),En}(f,r,J,u,it)}S&&S.push($e)},B=0;B<y.length&&!U();B++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Pr=zr;if(en.use(jn),en.use(ln),en.use(Mr),en.use(cn),en.use(Sr),en.use(Xn),en.use(et),en.use(vt),en.use(Pr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ca,Ca.exports)),Ca.exports}var gd=vd();const nl=Re.getDefaultExportFromCjs(gd),ao=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(jl),x=e.inject(Kl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),h=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 D=!1,E=!1,_=NaN,N=NaN,$=NaN,V=NaN,ye=-1,H=-1,j=-1,ie=-1,w=l.x,z=l.y,k=l.w,A=l.h;const T=e.ref(),le=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:nt});function Fe(v){Te(v)}function ot(){Xe()}function Ie(v){pn(l.isDraggable)&&(h.draggable=v)}function je(v){pn(l.isResizable)&&(h.resizable=v)}function we(v){pn(l.isBounded)&&(h.bounded=v)}function I(v){h.transformScale=v}function te(v){h.rowHeight=v}function ee(v){h.maxRows=v}function he(){h.rtl=el()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(le),e.onBeforeMount(()=>{h.rtl=el()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Gl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,pn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,pn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,pn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,nn(Ye)}),x.on("updateWidth",Fe),x.on("compact",ot),x.on("setDraggable",Ie),x.on("setResizable",je),x.on("setBounded",we),x.on("setTransformScale",I),x.on("setRowHeight",te),x.on("setMaxRows",ee),x.on("directionchange",he),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Fe),x.off("compact",ot),x.off("setDraggable",Ie),x.off("setResizable",je),x.off("setBounded",we),x.off("setTransformScale",I),x.off("setRowHeight",te),x.off("setMaxRows",ee),x.off("directionchange",he),x.off("setColNum",Ue),g.value&&(g.value.unset(),g.value=null),d.decreaseItem(le)}),i({state:h,wrapper:T});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),me=e.computed(()=>(h.draggable||h.resizable)&&!l.static),ke=id("item"),Me=e.computed(()=>({[ke.b()]:!0,[ke.bm("resizable")]:q.value,[ke.bm("static")]:l.static,[ke.bm("resizing")]:h.isResizing,[ke.bm("dragging")]:h.isDragging,[ke.bm("transform")]:h.useCssTransforms,[ke.bm("rtl")]:M.value,[ke.bm("no-touch")]:st&&me.value})),Ve=e.computed(()=>[ke.be("resizer"),M.value&&ke.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{nn(C),nn(Y)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{nn(Y)}),e.watch(()=>h.rowHeight,()=>{nn(Ye),nn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(Y),nn(Ye),nn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Y)}),e.watch(M,()=>{nn(Y),nn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),nn(Ye),nn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let F;h.useCssTransforms?M.value?F=ad(v.top,v.right,v.width,v.height):F=nd(v.top,v.left,v.width,v.height):M.value?F=ld(v.top,v.right,v.width,v.height):F=od(v.top,v.left,v.width,v.height),h.style=F}function qe(){const v={};for(const F of["width","height"]){const Z=h.style[F].match(/^(\d+)px$/);if(!Z)return;v[F]=Z[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const F=v.type;if(F==="resizestart"&&h.isResizing||F!=="resizestart"&&!h.isResizing)return;const Z=Qo(v);if(pn(Z))return;const{x:P,y:ue}=Z,R={width:0,height:0};let X;switch(F){case"resizestart":{Y(),ye=k,H=A,X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing=R,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&($=P),!v.edges.top&&!v.edges.bottom&&(V=ue);const se=Zo($,V,P,ue);M.value?R.width=h.resizing.width-se.deltaX/h.transformScale:R.width=h.resizing.width+se.deltaX/h.transformScale,R.height=h.resizing.height+se.deltaY/h.transformScale,h.resizing=R;break}case"resizeend":{X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}X=re(R.height,R.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),$=P,V=ue,(k!==X.w||A!==X.h)&&c("resize",l.i,X.h,X.w,R.height,R.width),v.type==="resizeend"&&(ye!==k||H!==A)&&c("resized",l.i,X.h,X.w,R.height,R.width),x.emit("resizeEvent",v.type,l.i,w,z,X.h,X.w)}function Q(v){if(l.static||h.isResizing)return;const F=v.type;if(F==="dragstart"&&h.isDragging||F!=="dragstart"&&!h.isDragging)return;const Z=Qo(v);if(pn(Z))return;const{x:P,y:ue}=Z,R=v.target;if(!R.offsetParent)return;const X={top:0,left:0};switch(F){case"dragstart":{j=w,ie=z;const ve=R.offsetParent.getBoundingClientRect(),K=R.getBoundingClientRect(),ae=K.left/h.transformScale,G=ve.left/h.transformScale,_e=K.right/h.transformScale,de=ve.right/h.transformScale,Ee=K.top/h.transformScale,L=ve.top/h.transformScale;M.value?X.left=(_e-de)*-1:X.left=ae-G,X.top=Ee-L,h.dragging=X,h.isDragging=!0;break}case"dragmove":{const ve=Zo(_,N,P,ue);if(M.value?X.left=h.dragging.left-ve.deltaX/h.transformScale:X.left=h.dragging.left+ve.deltaX/h.transformScale,X.top=h.dragging.top+ve.deltaY/h.transformScale,h.bounded){const K=R.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);X.top=oe(X.top,0,K);const ae=ze(),G=h.containerWidth-ce(l.w,ae,h.margin[0]);X.left=oe(X.left,0,G)}h.dragging=X;break}case"dragend":{const ve=R.offsetParent.getBoundingClientRect(),K=R.getBoundingClientRect(),ae=K.left/h.transformScale,G=ve.left/h.transformScale,_e=K.right/h.transformScale,de=ve.right/h.transformScale,Ee=K.top/h.transformScale,L=ve.top/h.transformScale;M.value?X.left=(_e-de)*-1:X.left=ae-G,X.top=Ee-L,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let se;M.value,se=nt(X.top,X.left),_=P,N=ue,(w!==se.x||z!==se.y)&&c("move",l.i,se.x,se.y),v.type==="dragend"&&(j!==w||ie!==z)&&c("moved",l.i,se.x,se.y),x.emit("dragEvent",v.type,l.i,se.x,se.y,A,k)}function tt(v,F,Z,P){const ue=ze();let R;return M.value?R={right:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])}:R={left:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])},R}function nt(v,F){const Z=ze();let P=Math.round((F-h.margin[0])/(Z+h.margin[0])),ue=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return P=Math.max(Math.min(P,h.cols-k),0),ue=Math.max(Math.min(ue,h.maxRows-A),0),{x:P,y:ue}}function ze(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,F,Z){return Number.isFinite(v)?Math.round(F*v+Math.max(0,v-1)*Z):v}function oe(v,F,Z){return Math.max(Math.min(v,Z),F)}function re(v,F,Z=!1){const P=ze();let ue=Math.round((F+h.margin[0])/(P+h.margin[0])),R=0;return Z?R=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):R=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),ue=Math.max(Math.min(ue,h.cols-w),0),R=Math.max(Math.min(R,h.maxRows-z),0),{w:ue,h:R}}function Te(v,F){h.containerWidth=v}function Xe(){Ye()}function dt(){!g.value&&T.value&&(g.value=nl(T.value),h.useStyleCursor||g.value.styleCursor(!1))}const m=Xo(Q);function C(){if(dt(),!!g.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};g.value.draggable(v),D||(D=!0,g.value.on("dragstart dragmove dragend",F=>{F.type==="dragmove"?m(F):Q(F)}))}else g.value.draggable({enabled:!1})}const W=Xo(lt);function Y(){if(dt(),!!g.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),F=tt(0,0,l.minW,l.minH),Z={edges:{left:M.value?`.${Ve.value[0]}`:!1,right:M.value?!1:`.${Ve.value[0]}`,bottom:`.${Ve.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:F.height*h.transformScale,width:F.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Z.modifiers=[nl.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(Z),E||(E=!0,g.value.on("resizestart resizemove resizeend",P=>{P.type==="resizemove"?W(P):lt(P)}))}else g.value.resizable({enabled:!1})}return(v,F)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(Me.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ve.value)},null,2)):e.createCommentVNode("",!0)],6))}}),sa=typeof window<"u";var al;sa&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ol(a){return a!=null}function ll(){}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)));const yd=sa&&("ontouchstart"in window||kd()>0),bd=yd?"pointerdown":"click";function kd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function xd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ol(l)||l==="")return!1;let g;return ol(s)?g=new s(l,{bubbles:c,cancelable:d}):(g=document.createEvent("HTMLEvents"),g.initEvent(l,c,d)),Object.assign(g,x),a.dispatchEvent(g)}const wd="clickoutside",Dd=new Set;sa&&document.addEventListener(bd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Dd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&xd(l,{type:wd})})},!0);const Cd=[["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 Wa;if(sa){for(const a of Cd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Ed=new Set,_d=new WeakMap;if(sa&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Ed.forEach(s=>{s.value=!1}),document[a]){const s=_d.get(document[a]);s&&(s.value=!0)}},!1)}const Yl=new Map;Yl.set("x",0);Yl.set("y",0);var la=[],Sd=function(){return la.some(function(a){return a.activeTargets.length>0})},Td=function(){return la.some(function(a){return a.skippedTargets.length>0})},rl="ResizeObserver loop completed with undelivered notifications.",Id=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:rl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=rl),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var ra=function(a){return Object.freeze(a)},Bd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,ra(this)}return a}(),Jl=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ra(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,x=i.bottom,g=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:g,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Co=function(a){return a instanceof SVGElement&&"getBBox"in a},Ql=function(a){if(Co(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},il=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Ad=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ta=typeof window<"u"?window:{},Fa=new WeakMap,sl=/auto|scroll/,Nd=/^tb|vertical/,Vd=/msie|trident/i.test(Ta.navigator&&Ta.navigator.userAgent),On=function(a){return parseFloat(a||"0")},va=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Bd((s?i:a)||0,(s?a:i)||0)},cl=ra({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Jl(0,0,0,0)}),Zl=function(a,i){if(i===void 0&&(i=!1),Fa.has(a)&&!i)return Fa.get(a);if(Ql(a))return Fa.set(a,cl),cl;var s=getComputedStyle(a),l=Co(a)&&a.ownerSVGElement&&a.getBBox(),c=!Vd&&s.boxSizing==="border-box",d=Nd.test(s.writingMode||""),x=!l&&sl.test(s.overflowY||""),g=!l&&sl.test(s.overflowX||""),h=l?0:On(s.paddingTop),D=l?0:On(s.paddingRight),E=l?0:On(s.paddingBottom),_=l?0:On(s.paddingLeft),N=l?0:On(s.borderTopWidth),$=l?0:On(s.borderRightWidth),V=l?0:On(s.borderBottomWidth),ye=l?0:On(s.borderLeftWidth),H=_+D,j=h+E,ie=ye+$,w=N+V,z=g?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-ie-a.clientWidth:0,A=c?H+ie:0,T=c?j+w:0,le=l?l.width:On(s.width)-A-k,Fe=l?l.height:On(s.height)-T-z,ot=le+H+k+ie,Ie=Fe+j+z+w,je=ra({devicePixelContentBoxSize:va(Math.round(le*devicePixelRatio),Math.round(Fe*devicePixelRatio),d),borderBoxSize:va(ot,Ie,d),contentBoxSize:va(le,Fe,d),contentRect:new Jl(_,h,le,Fe)});return Fa.set(a,je),je},er=function(a,i,s){var l=Zl(a,s),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(i){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},Od=function(){function a(i){var s=Zl(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=ra([s.borderBoxSize]),this.contentBoxSize=ra([s.contentBoxSize]),this.devicePixelContentBoxSize=ra([s.devicePixelContentBoxSize])}return a}(),tr=function(a){if(Ql(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Md=function(){var a=1/0,i=[];la.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(g){var h=new Od(g.target),D=tr(g.target);x.push(h),g.lastReportedSize=er(g.target,g.observedBox),D<a&&(a=D)}),i.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},ul=function(a){la.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},zd=function(){var a=0;for(ul(a);Sd();)a=Md(),ul(a);return Td()&&Id(),a>0},fo,nr=[],Pd=function(){return nr.splice(0).forEach(function(a){return a()})},Rd=function(a){if(!fo){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Pd()}).observe(s,l),fo=function(){s.textContent="".concat(i?i--:i++)}}nr.push(a),fo()},Ld=function(a){Rd(function(){requestAnimationFrame(a)})},Ha=0,Fd=function(){return!!Ha},$d=250,jd={attributes:!0,characterData:!0,childList:!0,subtree:!0},pl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},ho=!1,Kd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=$d),!ho){ho=!0;var l=dl(i);Ld(function(){var c=!1;try{c=zd()}finally{if(ho=!1,i=l-dl(),!Fd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,jd)};document.body?s():Ta.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),pl.forEach(function(s){return Ta.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),pl.forEach(function(s){return Ta.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),bo=new Kd,fl=function(a){!Ha&&a>0&&bo.start(),Ha+=a,!Ha&&bo.stop()},Ud=function(a){return!Co(a)&&!Ad(a)&&getComputedStyle(a).display==="inline"},Wd=function(){function a(i,s){this.target=i,this.observedBox=s||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=er(this.target,this.observedBox,!0);return Ud(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Hd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,hl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},ja=function(){function a(){}return a.connect=function(i,s){var l=new Hd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;hl(c.observationTargets,s)<0&&(d&&la.push(c),c.observationTargets.push(new Wd(s,l&&l.box)),fl(1),bo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=hl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&la.splice(la.indexOf(l),1),l.observationTargets.splice(c,1),fl(-1))},a.disconnect=function(i){var s=this,l=$a.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),qd=function(){function a(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.");ja.connect(this,i)}return a.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(!il(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,i,s)},a.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(!il(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,i)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Gd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:g}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:g??D}))}}}const ar=new(sa&&window.ResizeObserver||qd)(Gd);function vl(a,i){oo.set(a,i),ar.observe(a)}function gl(a){oo.has(a)&&(ar.unobserve(a),oo.delete(a))}function Xd(a={}){let i=ll;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(vl(c,a.onResize),i=()=>{gl(c),i=ll})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:vl,unobserveResize:gl,unobserve:l}}const Yd=e.ref(!1);e.computed(()=>Yd.value);const ml="__theme_style__",vo="__theme_observer__",yl=e.reactive(new Map),bl=new Map;e.watch(yl,()=>{if(!sa)return;bl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${vo} { width: 1px }`,l=1;for(const[c,[d,x]]of yl.entries())s+=` html.${d} .${vo}, .${x} .${vo} { width: ${++l}px }`,bl.set(l,c);i.textContent=s,i.id=ml,document.head.appendChild(i)});const or=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,g=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Xd(),_=Xp();_.on("resizeEvent",N),_.on("dragEvent",$),e.onBeforeMount(()=>{c("layout-before-mount",g.value)}),e.onMounted(()=>{c("layout-mounted",g.value),e.nextTick(()=>{rd(g.value),d.originalLayout=g.value,e.nextTick(()=>{Fe(),h.value&&D(h.value,Yp(w,16)),da(g.value,l.verticalCompact),c("layout-updated",g.value),ie(),w()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function N(Ie,je,we,I,te,ee){T(Ie,je,we,I,te,ee)}function $(Ie,je,we,I,te,ee){A(Ie,je,we,I,te,ee)}e.watch(()=>d.width,(Ie,je)=>{e.nextTick(()=>{_.emit("updateWidth",Ie),je===-1&&e.nextTick(()=>{c("layout-ready",g.value)}),ie()})}),e.watch(()=>[l.layout,l.layout.length],()=>{g.value=l.layout,j()}),e.watch(()=>l.colNum,Ie=>{_.emit("setColNum",Ie)}),e.watch(()=>l.rowHeight,Ie=>{_.emit("setRowHeight",Ie)}),e.watch(()=>l.isDraggable,Ie=>{_.emit("setDraggable",Ie)}),e.watch(()=>l.isResizable,Ie=>{_.emit("setResizable",Ie)}),e.watch(()=>l.isBounded,Ie=>{_.emit("setBounded",Ie)}),e.watch(()=>l.transformScale,Ie=>{_.emit("setTransformScale",Ie)}),e.watch(()=>l.responsive,Ie=>{Ie||(c("update:layout",d.originalLayout),_.emit("setColNum",l.colNum)),w()}),e.watch(()=>l.maxRows,Ie=>{_.emit("setMaxRows",Ie)}),e.watch([()=>l.margin,()=>l.margin[1]],ie),e.provide(jl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ye})),e.provide(Kl,_),i({state:d,getItem:H,resizeEvent:T,dragEvent:A,layoutUpdate:j});function V(Ie){x.set(Ie.i,Ie)}function ye(Ie){x.delete(Ie.i)}function H(Ie){return x.get(Ie)}function j(){if(!pn(g.value)&&!pn(d.originalLayout)){if(g.value.length!==d.originalLayout.length){const Ie=ot(g.value,d.originalLayout);if(Ie.length>0)if(g.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ie);else{const je=new Set(Ie.map(we=>we.i));d.originalLayout=d.originalLayout.filter(we=>!je.has(we.i))}d.lastLayoutLength=g.value.length,Fe()}da(g.value,l.verticalCompact),_.emit("updateWidth",d.width),ie(),c("layout-updated",g.value)}}function ie(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Ie=parseFloat(l.margin[1]);return Qp(g.value)*(l.rowHeight+Ie)+Ie+"px"}let k;function A(Ie,je,we,I,te,ee){let he=Yo(g.value,je);pn(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Ie==="dragstart"&&!l.verticalCompact&&(k=g.value.reduce((Ue,{i:st,x:q,y:M})=>({...Ue,[st]:{x:q,y:M}}),{})),Ie==="dragmove"||Ie==="dragstart"?(d.placeholder.i=je,d.placeholder.x=he.x,d.placeholder.y=he.y,d.placeholder.w=ee,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),g.value=yo(g.value,he,we,I,!0,l.preventCollision),l.restoreOnDrag?(he.static=!0,da(g.value,l.verticalCompact,k),he.static=!1):da(g.value,l.verticalCompact),_.emit("compact"),ie(),Ie==="dragend"&&(k=void 0,c("layout-updated",g.value))}function T(Ie,je,we,I,te,ee){let he=Yo(g.value,je);pn(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Wl(g.value,{...he,w:ee,h:te}).filter(q=>q.i!==he.i);if(Ue=st.length>0,Ue){let q=1/0,M=1/0;st.forEach(me=>{me.x>he.x&&(q=Math.min(q,me.x)),me.y>he.y&&(M=Math.min(M,me.y))}),Number.isFinite(q)&&(he.w=q-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ue||(he.w=ee,he.h=te),Ie==="resizestart"||Ie==="resizemove"?(d.placeholder.i=je,d.placeholder.x=we,d.placeholder.y=I,d.placeholder.w=he.w,d.placeholder.h=he.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Ie&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&le(),da(g.value,l.verticalCompact),_.emit("compact"),ie(),Ie==="resizeend"&&c("layout-updated",g.value)}function le(){const Ie=ud(l.breakpoints,d.width);if(Ie===d.lastBreakpoint)return;const je=Gl(Ie,l.cols);!pn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mo(g.value));const we=pd(d.originalLayout,d.layouts,l.breakpoints,Ie,d.lastBreakpoint,je,l.verticalCompact);d.layouts[Ie]=we,d.lastBreakpoint!==Ie&&c("breakpoint-changed",Ie,we),g.value=we,c("update:layout",we),d.lastBreakpoint=Ie,_.emit("setColNum",je)}function Fe(){d.layouts=Object.assign({},l.responsiveLayouts)}function ot(Ie,je){const we=new Set(je.map(he=>he.i)),I=new Set(Ie.map(he=>he.i)),te=Ie.filter(he=>!we.has(he.i)),ee=je.filter(he=>!I.has(he.i));return te.concat(ee)}return(Ie,je)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ie.$slots.default?e.renderSlot(Ie.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,we=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:we.i,ref_for:!0},we),{default:e.withCtx(()=>[e.renderSlot(Ie.$slots,"item",{item:we})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Jd={key:0,class:"item-view-group"},Qd={key:0,class:"item-view-group"},Zd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=jt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),g=e.computed(()=>{var N,$,V,ye;return((N=d==null?void 0:d.children)==null?void 0:N.length)>0&&(($=d==null?void 0:d.children)!=null&&$.every(H=>H==null?void 0:H.layout))?(ye=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ye.layout:"vertical"}),h=e.computed(()=>{var N,$;return(($=(N=d==null?void 0:d.children)==null?void 0:N[0])==null?void 0:$.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=N=>{c("rowClick",N)},_=(N,$)=>{c("routeUrl",N,$)};return(N,$)=>h.value?(e.openBlock(),e.createBlock(e.unref(or),{key:0,layout:x.value,"onUpdate:layout":$[0]||($[0]=V=>x.value=V),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(V,ye)=>(e.openBlock(),e.createBlock(e.unref(ao),{key:V.i,x:V.x,y:V.y,"min-h":V.minH,"max-h":V.maxH,"min-w":V.minW,w:V.w,h:V.h,i:V.i},{default:e.withCtx(()=>{var H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ye===((H=d==null?void 0:d.children)==null?void 0:H.length)-1?"0px":"24px"})},[((ie=(j=V==null?void 0:V.component)==null?void 0:j.comp)==null?void 0:ie.toUpperCase())!=="TABLE"&&((w=V==null?void 0:V.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((z=V==null?void 0:V.component)==null?void 0:z.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:g.value,config:{showIndex:(A=e.unref(Et)[ye])==null?void 0:A.showIndex,allowMove:(T=e.unref(Et)[ye])==null?void 0:T.allowMove,viewport:(le=e.unref(Et)[ye])==null?void 0:le.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(wo),itemData:(Fe=V==null?void 0:V.component)==null?void 0:Fe.compData,childItemData:(ot=V==null?void 0:V.component)==null?void 0:ot.itemChildData,key:e.unref(ga),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ye,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Ie=V==null?void 0:V.component)==null?void 0:Ie.tableId,allMapContents:e.unref(Ja),children:(je=V==null?void 0:V.component)==null?void 0:je.children,level:D.value,onRowClick:E,onRouteUrl:_,onClickTrigger:e.unref(Ml),onClickMainKey:e.unref(zl)},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(d==null?void 0:d.children,(V,ye)=>{var H,j;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:parseInt(ye)===((H=d==null?void 0:d.children)==null?void 0:H.length)-1?"0px":"24px"})},[((j=V==null?void 0:V.comp)==null?void 0:j.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",Qd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"0px":"8px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(ga),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ye,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:_},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),ef=Rt._export_sfc(Zd,[["__scopeId","data-v-3babf83a"]]),lr=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"}]),tf={TABLE:fa.ssTable,FORM:Po,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ro,FOLD:tc,CALCULATOR:ic,METHODBUTTON:_c,AVATARUPLOAD:Mo.ssAvatar,SIGNATURE:Mo.ssSignature,FORMTOP:Po,STEP:Rc,STEPOPERATE:Hs,TIMELINE:Uc,TIMELINEOPERATE:Qs,FORMTOPOPERATE:Ro,SIGNATUREOPERATE:Mc,AVATARUPLOADOPERATE:Ic,TABS:qc,TABSOPERATE:Nu,CHART:Hu,CHARTOPERATE:ap,LAYOUT:Pp,LAYOUTOPERATE:Hp,PARENTITEM:ef};function ma(a){return tf[a==null?void 0:a.toUpperCase()]||null}exports.De=or;exports.activeStepInfo=ha;exports.affixItems=bp;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=mc;exports.checkIsQuote=dc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=pc;exports.checkIsShowTable=vc;exports.checkIsTableCheck=uc;exports.checkIsUsingGroup=cc;exports.clickMainKey=zl;exports.clickSavePage=yp;exports.clickStep=Rl;exports.clickTrigger=Ml;exports.compId=ga;exports.compNames=wo;exports.compShow=Ya;exports.contentTransArray=wa;exports.contentTransArrayToAll=Ea;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ko;exports.existLayouts=Tp;exports.formToExtraContent=gc;exports.generateLayouts=gs;exports.getComponent=ma;exports.getComponents=Qa;exports.getExtraContents=bc;exports.getSliceContLength=Np;exports.gridRowHeight=ps;exports.isStepLayout=Do;exports.isUndefined=wl;exports.newContentTransArrayToAllNoExtra=hc;exports.onBack=gp;exports.onChange=eo;exports.onClick=mp;exports.onContentChange=to;exports.onExtendTaskEnd=Sp;exports.onPageBack=Ip;exports.onPageChange=no;exports.onSaveBack=Bl;exports.onSelectFixContent=vp;exports.renderShowItems=Nl;exports.showItems=Et;exports.sliceTableLength=Vl;exports.slotContent=lr;exports.st=ao;exports.stepItems=Vp;exports.toNumber=go;exports.toolBar=Fn;exports.verifyButton=Bp;
|
|
1
|
+
"use strict";const fa=require("./index-DIqmyCXw.cjs"),e=require("vue"),p=require("./index-C8qRkCgn.cjs"),Tt=require("./index-DZrrnLsD.cjs"),Re=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BnVF9mg-.cjs"),Yt=require("./index-BDur1jFN.cjs"),Vo=require("./threeViewerHost-CSVMxHgm.cjs"),jt=require("./index-H18D4EBa.cjs"),Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oo=require("./isString--eJE54G5.cjs"),Mo=require("./index-Cxu7w2E_.cjs"),kl=require("./index-BVaHwt5f.cjs"),Rr=require("./index-C8peX_zn.cjs");var Lr=/\s/;function Fr(a){for(var i=a.length;i--&&Lr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Fr(a)+1).replace($r,"")}var zo=NaN,Kr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function go(a){if(typeof a=="number")return a;if(p.isSymbol(a))return zo;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=jr(a);var s=Ur.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Kr.test(a)?zo:+a}var uo=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function ko(a,i,s){var l,c,d,x,g,h,D=0,E=!1,_=!1,N=!0;if(typeof a!="function")throw new TypeError(qr);i=go(i)||0,p.isObject(s)&&(E=!!s.leading,_="maxWait"in s,d=_?Gr(go(s.maxWait)||0,i):d,N="trailing"in s?!!s.trailing:N);function $(A){var T=l,le=c;return l=c=void 0,D=A,x=a.apply(le,T),x}function V(A){return D=A,g=setTimeout(j,i),E?$(A):x}function ye(A){var T=A-h,le=A-D,Fe=i-T;return _?Xr(Fe,d-le):Fe}function H(A){var T=A-h,le=A-D;return h===void 0||T>=i||T<0||_&&le>=d}function j(){var A=uo();if(H(A))return ie(A);g=setTimeout(j,ye(A))}function ie(A){return g=void 0,N&&l?$(A):(l=c=void 0,x)}function w(){g!==void 0&&clearTimeout(g),D=0,l=h=c=g=void 0}function z(){return g===void 0?x:ie(uo())}function k(){var A=uo(),T=H(A);if(l=arguments,c=this,h=A,T){if(g===void 0)return V(h);if(_)return clearTimeout(g),g=setTimeout(j,i),$(h)}return g===void 0&&(g=setTimeout(j,i)),x}return k.cancel=w,k.flush=z,k}var Yr="[object Boolean]";function xl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function wl(a){return a===void 0}const Jr={class:"form-content"},Qr={title:"选择标签"},Zr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={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(a,{emit:i}){const s=()=>{x.value=!1,g.value=!1,h.value=[]},l=a;e.computed(()=>{var Z;const v=(Z=Ue.value)==null?void 0:Z.split("/");return(v==null?void 0:v.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:Ie.value==="view"});const c=i,d=e.ref([]),x=e.ref(!1),g=e.ref(!1),h=e.ref([]);Vo.useThreeSystem();const D=e.ref(),E=e.ref(!1),_=e.ref(!1),N=e.ref([]),$=e.ref(),V=e.ref(!1),ye=e.ref([]),H=fa.useFormToTableComp(p.pinia),j=fa.useFormComp(p.pinia),ie=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),T=e.ref(!0),le=jt.useModelComp(p.pinia),{tableViewContents:Fe,itemData:ot,isEdit:Ie,routeToChildPath:je,lockingPage:we}=p.storeToRefs(le),I=e.ref(null),te=e.ref(!1),ee=e.ref(!1),he=jt.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(he),st=Re.useOriginalState(p.pinia),{originalPath:q}=p.storeToRefs(st),M=e.ref([]),me=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ke=async v=>{ee.value=v,await tt("disabled",null,v,!0)},Me=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Ve=()=>{e.nextTick(()=>{Q()})},Ye=v=>{var F;d.value=(F=d.value)==null?void 0:F.map(Z=>({...Z,isFormColHidden:!(v!=null&&v.includes(Z.label))}))};e.onUnmounted(()=>{I.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var F,Z,P,ue,R,X;if(v===""){let se="";(F=d.value)==null||F.forEach(G=>{G!=null&&G.isMain&&(se=G==null?void 0:G.value)});let ve=await Re.getItemData(je.value,sessionStorage.getItem("systemKey"),"");se=((X=(R=(ue=(P=(Z=ve==null?void 0:ve[0])==null?void 0:Z.compData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="mainRouters"))==null?void 0:ue.contents)==null?void 0:R[0])==null?void 0:X.routerContent)+q.value+se;let ae=await Re.getItemData(se,sessionStorage.getItem("systemKey"),"");V.value=!0,ye.value=ae==null?void 0:ae.filter(G=>(G==null?void 0:G.comp)!=="methodButton"),c("routeUrl",ye.value)}},Q=()=>{var F;const v=(F=I.value)==null?void 0:F.$el;v&&Re.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Z=>{const{oldIndex:P,newIndex:ue}=Z;if(P===ue)return;const R=d.value.splice(P,1)[0];d.value.splice(ue,0,R)}})},tt=async(v,F,Z,P=!1)=>{var ue,R,X,se,ve,K,ae,G;try{le.setRefreshCurStructure(!1);const _e=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((ue=_e==null?void 0:_e.data)==null?void 0:ue.code)===200){let de=(ve=(se=(X=(R=_e==null?void 0:_e.data)==null?void 0:R.result)==null?void 0:X[0])==null?void 0:se.value)==null?void 0:ve.pageData;P?de={...de,compData:(ae=de==null?void 0:de.compData)==null?void 0:ae.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"?{...L,contents:(fe=L==null?void 0:L.contents)==null?void 0:fe.map(ne=>({...ne,[v]:Z}))}:L})}:de={...de,compData:(K=de==null?void 0:de.compData)==null?void 0:K.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"?{...L,contents:(fe=L==null?void 0:L.contents)==null?void 0:fe.map(ne=>(ne==null?void 0:ne.prop)===(F==null?void 0:F.prop)?{...ne,[v]:Z}:ne)}:L})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:de}});((G=Ee==null?void 0:Ee.data)==null?void 0:G.code)===200?(p.ElMessage.success("编辑成功"),le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},nt=async(v,F)=>{await tt("label",F,v)},ze=async(v,F)=>{v&&await tt("type",F,v)},ce=async(v,F,Z)=>{await tt(F,Z,v,!1)},oe=(v,F)=>{A.value===F?T.value=!1:T.value=!0,A.value=F==null?void 0:F.changeProp},re=async v=>{var Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe;let F=[];if((Z=v==null?void 0:v.toString())!=null&&Z.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],g.value=!0,x.value=!0;return}if((P=v==null?void 0:v.toString())!=null&&P.includes(".stl")||(ue=v==null?void 0:v.toString())!=null&&ue.includes(".STL")||(R=v==null?void 0:v.toString())!=null&&R.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){h.value=(se=v==null?void 0:v.toString())==null?void 0:se.split(","),g.value=!1,x.value=!0;return}if((ve=v==null?void 0:v.toString())!=null&&ve.includes(".stl")||(K=v==null?void 0:v.toString())!=null&&K.includes(".STL")||(ae=v==null?void 0:v.toString())!=null&&ae.includes(".obj")||(G=v==null?void 0:v.toString())!=null&&G.includes(".mtl")){let ne,Be=[],Je={};if(Array.isArray(v)?ne=v:ne=v==null?void 0:v.split(","),ne==null||ne.forEach(Oe=>{Oe.includes(".mtl")?Be.push(Oe):Je.blob=Je.blob?Je.blob+","+Oe:Oe}),(Be==null?void 0:Be.length)>0&&(Je.mtlBlobs=Be),(de=(_e=Object.values(Je))==null?void 0:_e[0])!=null&&de.includes("http:"))F.push(Je);else{const Oe=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ne=URL.createObjectURL(Oe),ge="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,Ke)=>{var be;Ke===((be=v==null?void 0:v.split("/"))==null?void 0:be.length)-1&&(ge=ct)}),(L=Je.blob)!=null&&L.includes(".stl")&&(ge=(ge==null?void 0:ge.replaceAll(">",""))+".urdf"),$.value=[{name:ge,blobUrl:Ne}],_.value=!0}}else{const ne=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Be=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ne.close()}),Je=new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"});let Oe=URL.createObjectURL(Je),Ne="";(fe=v==null?void 0:v.split("/"))==null||fe.forEach((ge,ct)=>{var Ke;ct===((Ke=v==null?void 0:v.split("/"))==null?void 0:Ke.length)-1&&(Ne=ge)}),$.value=[{name:Ne,blobUrl:Oe}],_.value=!0}(F==null?void 0:F.length)>0&&j.setBlobUrls(F)},Te=()=>{_.value=!1},Xe=v=>{var R,X,se,ve;const F=(X=(R=p.cloneDeep(l.itemData))==null?void 0:R.find(K=>(K==null?void 0:K.key)==="formContent"))==null?void 0:X.contents,Z=p.cloneDeep(v.content);let P={};Z&&((se=Object.values(Z))==null?void 0:se.length)>0&&((ve=Object.values(Z))==null||ve.forEach((K,ae)=>{P[F[ae].key]=K}));const ue={content:P,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",ue)},dt=e.computed(()=>"http://222.92.178.198:62001"),m=async v=>{var _e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe;if(!v)return;(de=(_e=l==null?void 0:l.itemData)==null?void 0:_e.find(pe=>(pe==null?void 0:pe.key)==="parentFormPath"))==null||de.contents;let F=Fe.value;(F==null?void 0:F.length)>0&&(F=F==null?void 0:F.map(pe=>{var Le,We,O,Ce;let Ae=(Le=pe==null?void 0:pe.key)==null?void 0:Le.split("/");return(l==null?void 0:l.compName)===(Ae==null?void 0:Ae[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1]))&&(pe.value=(Ce=(O=d.value)==null?void 0:O.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:Ce.value),pe}),le.setTableViewContents(F));const Z=p.cloneDeep(l.itemData);let P=Z==null?void 0:Z.map(pe=>{var Ae;return(pe==null?void 0:pe.key)==="formContent"&&((Ae=pe.contents)==null||Ae.map((Le,We)=>{var O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Ut,Lt;return Le.type=(Ce=(O=d.value)==null?void 0:O.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ce.type,Le.options=Le!=null&&Le.options?Le.options:((ft=(et=(ut=Le==null?void 0:Le.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=fa.formGetOptions((Se=(rt=Le==null?void 0:Le.key)==null?void 0:rt.split("$"))==null?void 0:Se[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Le==null?void 0:Le.key)!=null&&pt.includes("$")&&(Le.key=(It=(vt=Le==null?void 0:Le.key)==null?void 0:vt.split("$"))==null?void 0:It[0]),Le.signature=(xt=(Bt=d.value)==null?void 0:Bt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:xt.signature,Le.isLoginUser=(Ot=(wt=d.value)==null?void 0:wt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ot.isLoginUser,Le.value=(At=Object.values(v))==null?void 0:At[We],Le.isFormColHidden=(Lt=(Ut=d.value)==null?void 0:Ut.find(Vt=>(Vt==null?void 0:Vt.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Lt.isFormColHidden,Le})),pe}),ue=d.value,R=(L=(Ee=p.cloneDeep(P))==null?void 0:Ee.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:L.contents;if(ue=ue==null?void 0:ue.map(pe=>{var Ae;return pe.value=(Ae=R==null?void 0:R.find((Le,We)=>((Le==null?void 0:Le.id)??We)===(pe==null?void 0:pe.id)))==null?void 0:Ae.value,pe}),!T.value){c("contentChange",{contents:P,index:l.index});return}let X="",se=(Be=(ne=(fe=p.cloneDeep(P))==null?void 0:fe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:ne.contents)==null?void 0:Be.find((pe,Ae)=>{var Le,We,O;return(pe==null?void 0:pe.label)===A.value||Ae.toString()===((O=(We=(Le=A.value)==null?void 0:Le.split("t"))==null?void 0:We[1])==null?void 0:O.toString())}),ve=(Je=se==null?void 0:se.optionUrl)==null?void 0:Je.menuSelect,K=!0;if((ge=(Ne=(Oe=p.cloneDeep(P))==null?void 0:Oe.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:Ne.contents)==null||ge.forEach(pe=>{var Ae,Le,We,O,Ce,ut;K&&((We=(Le=(Ae=pe==null?void 0:pe.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:Le[1])!=null&&We.includes("["))&&(X=(Ce=(O=pe==null?void 0:pe.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ce[1],JSON.stringify(ve)===JSON.stringify((ut=pe==null?void 0:pe.optionUrl)==null?void 0:ut.menuSelect)&&(K=!1))}),(ct=se==null?void 0:se.optionUrl)!=null&&ct.menuSelect&&T.value){let pe=await fa.getSelectRow(se),Ae,Le=(Ke=se==null?void 0:se.optionUrl)==null?void 0:Ke.menuSelect;if(pe==null||pe.forEach(We=>{var O,Ce,ut,et,ft,rt,Se,Ze,He,pt;X===((Ce=(O=se==null?void 0:se.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=se==null?void 0:se.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Se=(rt=se==null?void 0:se.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Se[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(se==null?void 0:se.value)&&(Ae=We)}),Ae){let We=p.cloneDeep(ue);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt;return(Ae!=null&&Ae[Ce==null?void 0:Ce.label]||Ae!=null&&Ae[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Le!=null&&Le.every(xt=>{var wt,Ot;return(Ot=(wt=Ce==null?void 0:Ce.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:Ot.includes(xt)})&&(Ce.value=(Ae==null?void 0:Ae[Ce==null?void 0:Ce.label])||(Ae==null?void 0:Ae[(Bt=(It=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(xt=>(xt==null?void 0:xt.url)&&(xt==null?void 0:xt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let O=p.cloneDeep(We);O=O==null?void 0:O.map(Ce=>{var ut,et,ft,rt,Se,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,It,Bt;if(He!=null&&He.includes("[")){let xt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(Bt=(It=p.cloneDeep(We))==null?void 0:It.find(wt=>(wt==null?void 0:wt.label)===xt))==null?void 0:Bt.value}return He})),Ce}),d.value=O}else d.value=ue;P=P==null?void 0:P.map(We=>{var O;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(O=We.contents)==null?void 0:O.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Se=>(Se==null?void 0:Se.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Se=>(Se==null?void 0:Se.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}T.value=!1,c("contentChange",{contents:P,index:l.index});let ae=[],G=[];if((De=p.cloneDeep((be=P==null?void 0:P.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:be.contents))==null||De.forEach(pe=>{var Ae;Array.isArray(pe==null?void 0:pe.value)&&((Ae=pe==null?void 0:pe.value)!=null&&Ae.find(Le=>{var We;return(We=Le==null?void 0:Le.url)==null?void 0:We.includes(".obj")}))&&(G=pe==null?void 0:pe.value)}),(G==null?void 0:G.length)>0){const pe=(Qe=p.cloneDeep(G))==null?void 0:Qe.filter(Ae=>{var Le;return(Le=Ae==null?void 0:Ae.url)==null?void 0:Le.includes(".obj")});pe==null||pe.forEach(Ae=>{var We,O,Ce,ut;const Le=(We=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);ae.push({objUrl:Ae==null?void 0:Ae.url,mtlUrls:((O=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:O.length)===1?(ut=(Ce=G==null?void 0:G.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Le})}),j.setObjUrl(ae)}},C=v=>{if(!v)return;const F=[];let Z="";for(let P of v)(P.includes("[")||Z.includes("["))&&(Z+=P.trim(),p.cloneDeep(Z).split("【").length-1===p.cloneDeep(Z).split("】").length-1&&p.cloneDeep(Z).split("[").length-1===p.cloneDeep(Z).split("]").length-1&&(F.push(Z.replace(/\/\*[\s\S]*?\*\//g,"")),Z=""));return F},W=(v,F,Z)=>{let P="";const ue=F==null?void 0:F.map(R=>{var X;return(X=R==null?void 0:R.value)==null?void 0:X.pageData});return ue==null||ue.forEach(R=>{var X;(R==null?void 0:R.name)===(v==null?void 0:v[0])&&((X=R==null?void 0:R.compData)==null||X.forEach(se=>{var ve;(se==null?void 0:se.key)==="formContent"&&((ve=se==null?void 0:se.contents)==null||ve.forEach(K=>{var ae;(K==null?void 0:K.prop)===(v==null?void 0:v[1])&&(P=(K==null?void 0:K.value)===""?Re.judgeContents((ae=p.cloneDeep(K))==null?void 0:ae.optionUrl,Z):K==null?void 0:K.value)}))}))}),P},Y=(v,F,Z,P)=>{var se,ve;let ue="",R="";(se=p.cloneDeep(F))==null||se.forEach((K,ae)=>{K!=null&&K.includes("[")?R=R+q.value+v[ae]:R=R===""?R+K:R+"/"+K});let X=(ve=P[R])==null?void 0:ve.map(K=>{var ae;return(ae=K==null?void 0:K.value)==null?void 0:ae.pageData});return X==null||X.forEach(K=>{var ae;(K==null?void 0:K.name)===(Z==null?void 0:Z[0])&&((ae=K==null?void 0:K.compData)==null||ae.forEach(G=>{var _e;(G==null?void 0:G.key)==="formContent"&&((_e=G==null?void 0:G.contents)==null||_e.forEach(de=>{(de==null?void 0:de.prop)===(Z==null?void 0:Z[1])&&(ue=de==null?void 0:de.value)}))}))}),ue};return e.watch(()=>l.itemData,async()=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke;const v=(X=l.itemData)==null?void 0:X.find(be=>(be==null?void 0:be.key)==="formContent"),F=(se=p.cloneDeep(l.itemData))==null?void 0:se.find(be=>(be==null?void 0:be.key)==="formButton"),Z=(ve=p.cloneDeep(l.itemData))==null?void 0:ve.find(be=>(be==null?void 0:be.key)==="formFlex"),P=(K=p.cloneDeep(l.itemData))==null?void 0:K.find(be=>(be==null?void 0:be.key)==="formWrap"),ue=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(be=>(be==null?void 0:be.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?E.value=!1:E.value=!0,ie.value=(ue==null?void 0:ue.contents)===void 0?!1:ue==null?void 0:ue.contents,w.value=typeof(Z==null?void 0:Z.contents)!="boolean"?!(!(Z!=null&&Z.contents)===""||((G=Z==null?void 0:Z.contents)==null?void 0:G.toUpperCase())==="VERTICAL"):Z==null?void 0:Z.contents,((_e=v==null?void 0:v.contents)==null?void 0:_e.length)>0&&Array.isArray(v==null?void 0:v.contents)){let be=l.allMapContents;const De=(Ee=(de=p.cloneDeep(v))==null?void 0:de.contents)==null?void 0:Ee.map((O,Ce)=>{var xt,wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn;let ut=(O==null?void 0:O.label)??(O==null?void 0:O.key)??"",et=(O==null?void 0:O.type)??"",ft=(O==null?void 0:O.options)??[];if((xt=O==null?void 0:O.key)!=null&&xt.includes("$")&&(ut=(wt=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:wt[0],((At=(Ot=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ot[1])==null?void 0:At.length)>0)){const[bt,Jt]=(Lt=(Ut=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ut[1])==null?void 0:Lt.split(/[()]/);et=((Vt=Re.FormType.find(gt=>(gt==null?void 0:gt.key)===bt))==null?void 0:Vt.value)??"",((qt=Jt==null?void 0:Jt.split(","))==null?void 0:qt.length)>0&&(ft=(wn=Jt==null?void 0:Jt.split(","))==null?void 0:wn.map(gt=>({label:gt,value:gt})))}let rt=[];O!=null&&O.contents&&!Array.isArray(O==null?void 0:O.contents)&&(rt=(Dn=(fn=O==null?void 0:O.contents)==null?void 0:fn.split(","))==null?void 0:Dn.map(bt=>({label:bt,value:bt}))),((Sn=O==null?void 0:O.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(rt=(Tn=(hn=O==null?void 0:O.optionUrl)==null?void 0:hn.defaultSelect)==null?void 0:Tn.map(bt=>({label:bt,value:bt})));let Se=!1,Ze=(O==null?void 0:O.isFormColHidden)??!1,He=Re.judgeContents((vn=p.cloneDeep(O))==null?void 0:vn.optionUrl,be),pt=He!==void 0&&He!==""?He:O!=null&&O.originalContent&&(O==null?void 0:O.originalContent)!==""?O.originalContent:O!=null&&O.value?O.value:(ft==null?void 0:ft.length)>0?(In=ft==null?void 0:ft[0])==null?void 0:In.value:(O==null?void 0:O.value)??"",vt=!1,It=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url))))&&(It="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||O!=null&&O.isLoginUser)Se=!0,pt=((gn=k.value)==null?void 0:gn.姓名)||((Xn=k.value)==null?void 0:Xn.account)||((Yn=k.value)==null?void 0:Yn.账号)||((Jn=k.value)==null?void 0:Jn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||O!=null&&O.signature||O!=null&&O.isShow)if(vt=!0,(O==null?void 0:O.isShow)==="originalSignature")It="image",pt=dt.value+"/"+((jn=k.value)==null?void 0:jn.signature);else{let bt=[...new Set(C(O.isShow))].map(Mt=>{var Nn,on,Vn,Zt;return{key:(Zt=(Vn=(on=(Nn=Mt==null?void 0:Mt.split("["))==null?void 0:Nn[1])==null?void 0:on.split("]"))==null?void 0:Vn[0])==null?void 0:Zt.split(":"),value:""}});(Bn=ot.value)==null||Bn.forEach(Mt=>{bt==null||bt.forEach((yn,Nn)=>{var Vn;let on=yn==null?void 0:yn.key;(Mt==null?void 0:Mt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Vn=Mt==null?void 0:Mt.compData)==null||Vn.forEach(Zt=>{var Kn;(Zt==null?void 0:Zt.key)==="formContent"&&((Kn=Zt==null?void 0:Zt.contents)==null||Kn.forEach(bn=>{(bn==null?void 0:bn.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(bt[Nn].value=bn==null?void 0:bn.value)}))}))})});let Jt=bt==null?void 0:bt.map(Mt=>{var yn;return Mt.key="["+((yn=Mt.key)==null?void 0:yn.join(":"))+"]",Mt}),gt=O==null?void 0:O.isShow;Jt==null||Jt.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=((mn=gt==null?void 0:gt.split("==="))==null?void 0:mn[0])+"==='"+((zn=gt==null?void 0:gt.split("==="))==null?void 0:zn[1])+"'":gt=((An=gt==null?void 0:gt.split("="))==null?void 0:An[0])+"='"+((an=gt==null?void 0:gt.split("="))==null?void 0:an[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 }`)()?(Ze=!1,It="image",pt=dt.value+"/"+((Cn=k.value)==null?void 0:Cn.signature)):pt=""}return Array.isArray(pt)&&pt.every(bt=>(bt==null?void 0:bt.url)&&(bt==null?void 0:bt.name))&&(O.type="Upload"),O!=null&&O.isMainUrl&&(It="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(O==null?void 0:O.key),type:It,value:O!=null&&O.isNewDate&&pt===""?new Date:pt,id:(O==null?void 0:O.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(O==null?void 0:O.width)??1,isLoginUser:Se,config:O==null?void 0:O.config,optionUrl:(O==null?void 0:O.optionUrl)??O,isFormColHidden:Ze,signature:vt,isMain:O==null?void 0:O.isMain,isMainUrl:O==null?void 0:O.isMainUrl,operable:(O==null?void 0:O.operable)??!1,disabled:(O==null?void 0:O.disabled)??!1}}),Qe=De==null?void 0:De.map(O=>O==null?void 0:O.value);let pe="";Qe==null||Qe.forEach(O=>{O!==""&&O!==void 0&&(pe=pe===""?O:pe+"/"+O)}),H.setSelectArray(Qe),H.setSelectString(pe);let Ae=(L=p.cloneDeep(De))==null?void 0:L.map(O=>(O!=null&&O.value&&Re.IsJson(O==null?void 0:O.value)&&Array.isArray(JSON.parse(O==null?void 0:O.value))&&(O.value=JSON.parse(O.value)),O));Ae=Ae==null?void 0:Ae.map(O=>{var Ce,ut,et,ft,rt,Se,Ze,He;if((ut=(Ce=O==null?void 0:O.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";O.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(O))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,O.optionUrl.menuSelect=(Se=(rt=O==null?void 0:O.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Se.map(vt=>{var It,Bt,xt,wt,Ot,At;if(vt!=null&&vt.includes("[")){let Ut=(Bt=(It=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Bt[1];pt=W((xt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),be==null?void 0:be[Ue.value],be),vt=((Ot=(wt=p.cloneDeep(Ae))==null?void 0:wt.find(Lt=>(Lt==null?void 0:Lt.label)===Ut))==null?void 0:Ot.value)||W((At=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:At.split(":"),be==null?void 0:be[Ue.value],be)}return vt}),pt!==""&&O.value===""&&(O.value=Y(O.optionUrl.menuSelect,O.optionUrl.oldMenuSelect,(Ze=O==null?void 0:O.optionUrl)==null?void 0:Ze.groupSelect,be),Array.isArray(O.value)&&((He=O.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(O.type="UPLOAD"))}return O}),d.value=Ae,ee.value=((fe=d.value)==null?void 0:fe.every(O=>O==null?void 0:O.disabled))||we.value===Ue.value,te.value=(ne=d.value)==null?void 0:ne.every(O=>O==null?void 0:O.operable),M.value=(Be=d.value)==null?void 0:Be.map(O=>O==null?void 0:O.label);let Le=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(O=>{var Ce;Array.isArray(O==null?void 0:O.value)&&((Ce=O==null?void 0:O.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=O==null?void 0:O.value)}),(We==null?void 0:We.length)>0){const O=(Oe=p.cloneDeep(We))==null?void 0:Oe.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});O==null||O.forEach(Ce=>{var et,ft,rt,Se;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Le.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Se=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Se.url:ut})}),j.setObjUrl(Le)}(Ne=p.cloneDeep(d.value))==null||Ne.forEach(O=>{var Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt;if((ut=(Ce=O==null?void 0:O.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=O==null?void 0:O.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Se=(rt=O==null?void 0:O.value)==null?void 0:rt.toString())!=null&&Se.includes(".obj")||(He=(Ze=O==null?void 0:O.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=O==null?void 0:O.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let wt={},Ot=[],At;Array.isArray(O==null?void 0:O.value)?At=O==null?void 0:O.value:At=(It=O==null?void 0:O.value)==null?void 0:It.split(","),At==null||At.forEach(Ut=>{Ut.includes(".mtl")?Ot.push(Ut):wt.blob=wt.blob==="undefined"?Ut:wt.blob+","+Ut}),(Ot==null?void 0:Ot.length)>0&&(wt.mtlBlobs=Ot),(xt=(Bt=Object.values(wt))==null?void 0:Bt[0])!=null&&xt.includes("http:")}})}else d.value=[];let R=Fe.value;if((R==null?void 0:R.length)>0&&(R=R==null?void 0:R.map(be=>{var Qe,pe,Ae,Le;let De=(Qe=be==null?void 0:be.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(De==null?void 0:De[0])&&(pe=d.value)!=null&&pe.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1]))&&(be.value=(Le=(Ae=d.value)==null?void 0:Ae.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1])))==null?void 0:Le.value),be}),le.setTableViewContents(R)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let be={};(ge=p.cloneDeep(d).value)==null||ge.forEach(De=>{(De==null?void 0:De.isMain)===!0&&(be[(De==null?void 0:De.prop)??(De==null?void 0:De.name)]=[{required:!0,message:`${(De==null?void 0:De.prop)||(De==null?void 0:De.name)}不能为空`}])}),D.value=be}if(((ct=F==null?void 0:F.contents)==null?void 0:ct.length)>0){const be=[];(Ke=F==null?void 0:F.contents)==null||Ke.forEach((De,Qe)=>{(De==null?void 0:De.label)!==""&&be.push({label:(De==null?void 0:De.label)??"",id:(De==null?void 0:De.id)??Qe,type:(De==null?void 0:De.type)??"",background:De==null?void 0:De.background})}),N.value=be}else N.value=[]},{deep:!0,immediate:!0}),e.watch(()=>we.value,v=>{ee.value=v===Ue.value},{immediate:!0}),(v,F)=>{const Z=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),ue=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-popover"),X=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Tt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:N.value,isRowFlex:!1,isEnableWrap:ie.value,onOnButtonClick:Xe,onChange:m,formDisabled:ee.value,formLabelsOperable:te.value,isButtonRow:E.value,onPreview:re,onBlurChange:oe,onHandleColEditChange:nt,onHandleColTypeChange:ze,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:se,formDisabled:ve,formLabelsOperable:K})=>[e.createVNode(R,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ve},{reference:e.withCtx(()=>[e.createElementVNode("span",Qr,[e.createVNode(Z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Zr,[F[1]||(F[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":ve,"active-text":"禁用","inactive-text":"",onChange:ke,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":K,"active-text":"编辑所有标签","inactive-text":"",onChange:Me},null,8,["model-value"]),F[2]||(F[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(X,{modelValue:M.value,"onUpdate:modelValue":F[0]||(F[0]=ae=>M.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:I,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(ue,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(R,{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 G;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=Object.keys(ae))==null?void 0:G.filter(_e=>{var de;return(de=me.value)==null?void 0:de.find(Ee=>(Ee==null?void 0:Ee.value)===_e)}),_e=>{var de,Ee;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(Tt._sfc_main$1,{value:ae==null?void 0:ae[_e],"active-text":(Ee=(de=me.value)==null?void 0:de.find(L=>(L==null?void 0:L.value)===_e))==null?void 0:Ee.label,inactiveText:"",onChange:L=>ce(L,_e,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[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"]),_.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:$.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Vo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:g.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Po=Rt._export_sfc(ni,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),Dl=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},ai=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},Cl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,i),l)),a)},El=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,i),l)),a)},_l=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,i),l)),a)},Sl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,i),l)),a)},St=[{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"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=Re.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},N=w=>{l("fixChange",p.cloneDeep(w))},$=w=>{l("deleteChange",p.cloneDeep(w))},V=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},ye=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},H=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="id"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Fe=>(Fe==null?void 0:Fe.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},j=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},ie=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(A,T)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(A.label),1),e.createElementVNode("div",ui,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>_(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:le=>ie(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Tl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:$,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ye},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:H},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Rt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),x=Re.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),_=w=>{l("fixChange",p.cloneDeep(w))},N=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let T=p.cloneDeep(g.value)+1;x.setTableIndex(T),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:g.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},$=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:g.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},ye=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const T=St==null?void 0:St.find(le=>(le==null?void 0:le.label)===(A==null?void 0:A.label));T?w[T.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(g.value)+1;x.setTableIndex(A),w.id="idChild"+g.value,(k=D.value)==null||k.forEach(T=>{const le=St==null?void 0:St.find(Fe=>(Fe==null?void 0:Fe.label)===(T==null?void 0:T.label));le?w[le.key]=T.value:T!=null&&T.children&&T.children.length>0&&(w.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},H=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},j=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,le)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(T.label),1),e.createElementVNode("div",bi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>$(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>N(T)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Fe=>j(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:T==null?void 0:T.children,onDeleteChange:ie,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:H,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(A,{onClick:H,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ye,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Rt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},zi={class:"fix-button"},Pi={class:"operate-title"},Ri={class:"operate-content"},Li={class:"fix-content"},Fi={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ki={class:"operate-content"},Ui={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Qi={class:"dialog-footer"},Zi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),g=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),_=e.ref([]),N=e.ref(""),$=e.ref(""),V=e.ref([]),ye=e.ref([]),H=e.ref([]),j=e.ref([]),ie=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),T=e.ref([]),le=e.ref([]),Fe=()=>{ie.value=!0;let m=[];Rn==null||Rn.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:k.value,contents:C==null?void 0:C.options})}),w.value=m,z.value=m},ot=()=>{var C,W,Y;x.value=!0;let m=[];(Y=(W=(C=Re.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:W.value)==null||Y.forEach(v=>{k.value++,m.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=m,T.value=m},Ie=m=>{m||(A.value=T.value)},je=async m=>{var C,W,Y,v,F,Z,P,ue,R,X,se,ve;if((m==null?void 0:m.类型)!==((W=(C=T.value)==null?void 0:C.find(K=>(K==null?void 0:K.label)==="类型"))==null?void 0:W.value)){let K=[],ae=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:v.value)==null?void 0:F.value)?await((X=(R=(ue=Re.FormContent)==null?void 0:ue.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=Re.FormContent)==null?void 0:Z.find(G=>(G==null?void 0:G.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:P.value;if(ae==null||ae.forEach(G=>{k.value++,K.push({label:G==null?void 0:G.label,name:(G==null?void 0:G.name)||(G==null?void 0:G.label),type:G.type,value:G!=null&&G.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[G.label])??"",id:k.value,contents:G==null?void 0:G.options,prop:(G==null?void 0:G.prop)||(G==null?void 0:G.name)||(G==null?void 0:G.label)})}),m!=null&&m.菜单选项&&((se=m==null?void 0:m.菜单选项)==null?void 0:se.length)>0){const G=await Re.menuToContentType(m==null?void 0:m.菜单选项);K=K==null?void 0:K.map(_e=>((_e==null?void 0:_e.name)==="组信息选项"&&(_e.contents=G),_e))}T.value=await Re.selectToBase(p.cloneDeep(K)),A.value=await Re.selectToBase(p.cloneDeep(K))}else{let K=p.cloneDeep(A.value);if(K=K==null?void 0:K.map(ae=>(ae.value=m==null?void 0:m[ae.name],ae)),m!=null&&m.菜单选项&&((ve=m==null?void 0:m.菜单选项)==null?void 0:ve.length)>0){const ae=await Re.menuToContentType(m==null?void 0:m.菜单选项);K=K==null?void 0:K.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ae),G))}K=Re.formToOptionsContents(K),T.value=await Re.selectToBase(p.cloneDeep(K))}},we=async m=>{await je(m),A.value=T.value},I=(m,C)=>{if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.selectRelateType)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.menuSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const W=C==null?void 0:C.optionUrl;return(W==null?void 0:W.groupSelect)||C[m.key]}if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(C==null?void 0:C.value)||C[m.key];if((C==null?void 0:C.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const W=C[m.key];return xl(W)?W:m.default}return(m==null?void 0:m.label)==="类型"&&C[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!C[m.key]?!1:C[m.key]},te=async m=>{var Y,v,F,Z,P,ue,R,X,se;x.value=!0;let C=[];const W=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:v.value)==null?void 0:F.value)?await((X=(R=(ue=Re.FormContent)==null?void 0:ue.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:R.value)==null?void 0:X.value):(P=(Z=Re.FormContent)==null?void 0:Z.find(ve=>(ve==null?void 0:ve.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:P.value;if(W==null||W.forEach(ve=>{k.value++,C.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):I(ve,m),id:k.value,contents:ve==null?void 0:ve.options})}),m!=null&&m.menuSelect&&((se=m==null?void 0:m.menuSelect)==null?void 0:se.length)>0){const ve=await Re.menuToContentType(m==null?void 0:m.menuSelect);C=C==null?void 0:C.map(K=>((K==null?void 0:K.name)==="组信息选项"&&(K.contents=ve),K))}N.value=m==null?void 0:m.id,A.value=await Re.selectToBase(Re.formToOptionsContents(C)),T.value=await Re.selectToBase(Re.formToOptionsContents(C))},ee=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;le.value=(C=p.cloneDeep(le.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=le.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{x.value=!1,A.value=[],N.value=""},Ue=async()=>{var Y,v,F,Z,P,ue,R,X,se,ve;A.value=T.value;let m={};N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value);let C=await((F=(v=(Y=Re.FormContent)==null?void 0:Y.find(K=>{var ae,G;return(K==null?void 0:K.key)===(((G=(ae=A.value)==null?void 0:ae.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:v.value)==null?void 0:F.value)??((P=(Z=Re.FormContent)==null?void 0:Z.find(K=>{var ae,G;return(K==null?void 0:K.key)===(((G=(ae=A.value)==null?void 0:ae.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:G.value)??"label")}))==null?void 0:P.value);if((ue=A.value)==null||ue.forEach(K=>{const ae=C==null?void 0:C.find(G=>(G==null?void 0:G.label)===(K==null?void 0:K.label));ae&&(m[ae.key]=K.value)}),m.name=m.label,(R=le.value)!=null&&R.find(K=>K.id===m.id))le.value=(X=le.value)==null?void 0:X.map(K=>(K.id===m.id&&(K=m),K));else{let K=p.cloneDeep(le.value);le.value||(le.value=[]),K.push(m),le.value=K}le.value=le.value.map(({id:K,...ae})=>ae),x.value=!1,N.value="";let W=p.cloneDeep(s.originalItemContents);(se=p.cloneDeep(s.originalItemContents))!=null&&se.find(K=>(K==null?void 0:K.key)==="tableToForm")?W=(ve=p.cloneDeep(s.originalItemContents))==null?void 0:ve.map(K=>((K==null?void 0:K.key)==="tableToForm"&&(K.contents=le.value),K)):W.push({key:"tableToForm",contents:le.value}),l("change",W)},st=m=>{ie.value=!0;let C=[];Rn==null||Rn.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:m[W.key],id:k.value,contents:W==null?void 0:W.options})}),N.value=m==null?void 0:m.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,W;let m=p.cloneDeep(s.originalItemContents);(C=p.cloneDeep(s.originalItemContents))!=null&&C.find(Y=>(Y==null?void 0:Y.key)==="page")?m=(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=E.value),Y)):m.push({key:"page",contents:E.value}),l("change",m)},{deep:!0});const q=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;ye.value=(C=p.cloneDeep(ye.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=ye.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var W,Y,v,F,Z;w.value=z.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=w.value)==null||W.forEach(P=>{const ue=Rn==null?void 0:Rn.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=ye.value)!=null&&Y.find(P=>P.id===m.id))ye.value=(v=ye.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(ye.value)??[];P.push(m),ye.value=P}ie.value=!1,N.value="";let C=p.cloneDeep(s.originalItemContents);(F=p.cloneDeep(s.originalItemContents))!=null&&F.find(P=>(P==null?void 0:P.key)==="extraButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="extraButton"&&(P.contents=ye.value),P)):C.push({key:"extraButton",contents:ye.value}),l("change",C)},me=m=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),z.value=C},ke=()=>{ie.value=!1,w.value=[],N.value=""},Me=m=>{h.value=!0;let C=[];Ln==null||Ln.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:m[W.key],id:k.value,contents:W==null?void 0:W.options})}),N.value=m==null?void 0:m.id,H.value=C,j.value=C},Ve=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=V.value),Y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let m=[];St==null||St.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=m,_.value=m},qe=()=>{h.value=!0;let m=[];Ln==null||Ln.forEach(C=>{k.value++,m.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),H.value=m,j.value=m},lt=m=>{let C=p.cloneDeep(j.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),j.value=C},Q=()=>{var W,Y,v,F,Z;H.value=j.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=H.value)==null||W.forEach(P=>{const ue=Ln==null?void 0:Ln.find(R=>(R==null?void 0:R.label)===(P==null?void 0:P.label));ue?m[ue.key]=P.value:P!=null&&P.children&&P.children.length>0&&(m.children=P.children)}),(Y=V.value)!=null&&Y.find(P=>P.id===m.id))V.value=(v=V.value)==null?void 0:v.map(P=>(P.id===m.id&&(P=m),P));else{let P=p.cloneDeep(V.value);P.push(m),V.value=P}h.value=!1,N.value="";let C=p.cloneDeep(s.originalItemContents);(F=p.cloneDeep(s.originalItemContents))!=null&&F.find(P=>(P==null?void 0:P.key)==="rowButton")?C=(Z=p.cloneDeep(s.originalItemContents))==null?void 0:Z.map(P=>((P==null?void 0:P.key)==="rowButton"&&(P.contents=V.value),P)):C.push({key:"rowButton",contents:V.value}),l("change",C)},tt=()=>{h.value=!1,N.value="",j.value=[],H.value=[]},nt=m=>{d.value=!0;let C=[];St==null||St.forEach(W=>{k.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:"",id:k.value,contents:W==null?void 0:W.options})}),D.value=C,$.value=m==null?void 0:m.id,_.value=C},ze=m=>{var C;g.value=Cl(p.cloneDeep(g.value),m==null?void 0:m.id),l("change",(C=p.cloneDeep(s.originalItemContents))==null?void 0:C.map(W=>{var Y;return(W==null?void 0:W.key)==="header"&&(W.contents=(Y=g.value)!=null&&Y.some(v=>v==null?void 0:v.children)?[g.value]:g.value),W}))},ce=m=>{var W,Y,v;m.type==="fix"?m.id!==""?g.value=_l(g.value,m):g.value=El(g.value,m==null?void 0:m.contents):g.value=Sl(g.value,m),g.value=(W=g.value)!=null&&W.some(F=>F==null?void 0:F.children)?[g.value]:g.value,N.value="";let C=p.cloneDeep(s.originalItemContents);(Y=p.cloneDeep(s.originalItemContents))!=null&&Y.find(F=>(F==null?void 0:F.key)==="header")?C=(v=p.cloneDeep(s.originalItemContents))==null?void 0:v.map(F=>((F==null?void 0:F.key)==="header"&&(F.contents=g.value),F)):C.push({key:"header",contents:g.value}),l("change",C)},oe=m=>{var W;d.value=!0;let C=[];St==null||St.forEach(Y=>{k.value++,C.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:m[Y.key],id:k.value,contents:Y==null?void 0:Y.options})}),m!=null&&m.children&&((W=m==null?void 0:m.children)==null?void 0:W.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),N.value=m==null?void 0:m.id,$.value="",D.value=C,_.value=C},re=m=>{let C=p.cloneDeep(_.value);C=C==null?void 0:C.map(W=>(W.children||(W.value=m==null?void 0:m[W.name]),W)),_.value=C},Te=()=>{d.value=!1,N.value="",$.value="",_.value=[]},Xe=()=>{var W,Y,v,F,Z,P;D.value=_.value;let m={};if(N.value!==""?m.id=N.value:(k.value++,m.id="id"+k.value),(W=D.value)==null||W.forEach(ue=>{const R=St==null?void 0:St.find(X=>(X==null?void 0:X.label)===(ue==null?void 0:ue.label));R?m[R.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(m.children=ue.children)}),(Y=g.value)!=null&&Y.find(ue=>ue.id===m.id))g.value=(v=g.value)==null?void 0:v.map(ue=>(ue.id===m.id&&(ue=m),ue));else{let ue=p.cloneDeep(g.value)??[];$.value===""?ue.push(m):ue=ue==null?void 0:ue.map(R=>(R.id===$.value&&(R.children||(R.children=[]),R.children.push(m)),R)),g.value=ue}g.value=(F=g.value)!=null&&F.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,d.value=!1,N.value="",$.value="";let C=p.cloneDeep(s.originalItemContents);(Z=p.cloneDeep(s.originalItemContents))!=null&&Z.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(P=p.cloneDeep(s.originalItemContents))==null?void 0:P.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),l("change",C)},dt=m=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,W;g.value=(C=p.cloneDeep(g.value))==null?void 0:C.filter(Y=>(Y==null?void 0:Y.id)!==(m==null?void 0:m.id)),l("change",(W=p.cloneDeep(s.originalItemContents))==null?void 0:W.map(Y=>{var v;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(v=g.value)!=null&&v.some(F=>F==null?void 0:F.children)?[g.value]:g.value),Y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),g.value=(C=(m=c.value)==null?void 0:m.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:C.contents,V.value=(Y=(W=c.value)==null?void 0:W.find(L=>(L==null?void 0:L.key)==="rowButton"))==null?void 0:Y.contents,ye.value=(F=(v=c.value)==null?void 0:v.find(L=>(L==null?void 0:L.key)==="extraButton"))==null?void 0:F.contents,E.value=(P=(Z=c.value)==null?void 0:Z.find(L=>(L==null?void 0:L.key)==="page"))!=null&&P.contents?!!((R=(ue=c.value)==null?void 0:ue.find(L=>(L==null?void 0:L.key)==="page"))!=null&&R.contents):!1,le.value=(se=(X=c.value)==null?void 0:X.find(L=>(L==null?void 0:L.key)==="tableToForm"))==null?void 0:se.contents,g.value=(ve=g.value)==null?void 0:ve.map((L,fe)=>(Array.isArray(L)?L=ai(L):L={label:(L==null?void 0:L.label)??"",prop:(L==null?void 0:L.label)==="操作"?"operate":L==null?void 0:L.prop,width:L!=null&&L.width?parseInt(L.width):"",fixed:(L==null?void 0:L.fixed)??void 0,sortable:(L==null?void 0:L.sortable)??!1,align:(L==null?void 0:L.align)??"left",showOverflowTooltip:(L==null?void 0:L.showOverflowTooltip)??!0,isNotDrag:(L==null?void 0:L.isNotDrag)??!1,isEditCol:(L==null?void 0:L.isEditCol)??!1,isOperate:(L==null?void 0:L.isOperate)??!1,id:(L==null?void 0:L.id)??fe,formMenuSelect:(L==null?void 0:L.formMenuSelect)??void 0,groupSelect:(L==null?void 0:L.groupSelect)??void 0},L)),g.value=(K=g.value)!=null&&K.every(L=>Array.isArray(L))?(ae=g.value)==null?void 0:ae[0]:g.value,V.value=(G=V.value)==null?void 0:G.map((L,fe)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",textColor:(L==null?void 0:L.textColor)??"#000000",id:(L==null?void 0:L.id)??fe}),ye.value=(_e=ye.value)==null?void 0:_e.map((L,fe)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:(L==null?void 0:L.id)??fe}),le.value)le.value=(Ee=le.value)==null?void 0:Ee.map(L=>{k.value++;let fe=L;return fe.id=k.value,fe});else{let L=[];const fe=(de=Re.getColumnChild(p.cloneDeep(g.value)))==null?void 0:de.filter(ne=>(ne==null?void 0:ne.prop)!=="operate");fe==null||fe.forEach(ne=>{var Be;k.value++,L.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.label),type:ne!=null&&ne.groupSelect?"Select":"Input",value:"",id:k.value,contents:ne==null?void 0:ne.options,menuSelect:ne==null?void 0:ne.formMenuSelect,groupSelect:(Be=ne==null?void 0:ne.groupSelect)==null?void 0:Be.split(":"),selectRelateType:"关联绑定列"})}),le.value=L}},{deep:!0,immediate:!0}),(m,C)=>{const W=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(W,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>nt(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>oe(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Tl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:ze,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",zi,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>Me(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>Ve(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Fe},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Li,[e.createElementVNode("div",Fi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",$i,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>st(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>q(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ot},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Wi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Hi,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Z=>te(v)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>ee(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(Y,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qi,[e.createVNode(Y,{onClick:tt,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:Q,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:ie.value,onBeforeDestroy:ke,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zi,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(Y,{onClick:ke,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:je,onChangeVisible:Ie,onBlurChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(Y,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Rt._export_sfc(as,[["__scopeId","data-v-7a6b87b5"]]),ls=jt.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=jt.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((g=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:g.y)||i,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||cs.value,h:((_=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:_.h)||s,minW:(($=(N=a==null?void 0:a.value)==null?void 0:N.tableData)==null?void 0:$.minW)||us.value,minH:((ye=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ye.minH)||ds.value,maxH:((j=(H=a==null?void 0:a.value)==null?void 0:H.tableData)==null?void 0:j.maxH)||fs.value,i:((w=(ie=a==null?void 0:a.value)==null?void 0:ie.tableData)==null?void 0:w.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,x,g,h,D,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((g=a==null?void 0:a.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return s*2},Il=(a,i,s)=>{var x,g;const l=(g=(x=rs.value)==null?void 0:x[ss.value])==null?void 0:g.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,_;return((_=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:_.id)===a.id}),d=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Il(h,D))),{...hs(c,i,d,a)}},gs=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Il(l,c)):[]},ms=a=>({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}]}]}}),ys=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),bs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,g=>{var E;const h=ms(s==null?void 0:s.optionItems),D=g?(E=h[g==null?void 0:g.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=D==null?void 0:D.map(_=>{for(const[N,$]of Object.entries((s==null?void 0:s.comp)||{}))if((_==null?void 0:_.prop)===N)return{..._,value:$};return _})},{immediate:!0});const d=g=>Tt.getComponent(g),x=g=>{var h,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(N=>({...N,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var _;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(_=E==null?void 0:E.options)==null?void 0:_.map(N=>({...N,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:g==null?void 0:g.prop})};return(g,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(_.type)),{modelValue:_.value,"onUpdate:modelValue":N=>_.value=N,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:N=>x(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Rt._export_sfc(bs,[["__scopeId","data-v-6c233914"]]),xs=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(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=j=>j==null?void 0:j.reduce((ie,w)=>(ie[w==null?void 0:w.prop]=w==null?void 0:w.rule,ie),{}),g=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(j,ie,w)=>{var A;let z=[];(s==null?void 0:s.activeTabName)==="任务配置"?(z=[{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:ie}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(z=[{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:(A=s==null?void 0:s.relatedData)==null?void 0:A.map(T=>({label:T==null?void 0:T.任务名称,value:T==null?void 0:T.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return w&&(w==null?void 0:w.length)>0?k=[...z,..._(j,ie,w)]:k=z,k},_=(j,ie,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},N=(j,ie)=>{var T,le,Fe,ot,Ie,je,we,I,te;const w=((Ie=(ot=(Fe=(le=(T=s==null?void 0:s.comp)==null?void 0:T.compData)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Fe.contents)==null?void 0:ot.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:Ie.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],z=/button/i,k=((te=(I=(we=(je=s==null?void 0:s.comp)==null?void 0:je.compData)==null?void 0:we.filter(ee=>z.test(ee==null?void 0:ee.key)))==null?void 0:I.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:te.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],A=E(w,k,j);h.value=ie?ys(A,ie):A,j&&(j==null?void 0:j.length)>0&&d.value.push(...j==null?void 0:j.map(ee=>({prop:ee,rule:c})))};e.onMounted(()=>{N(null,s==null?void 0:s.extendItem)});const $=j=>{const ie=j==null?void 0:j[D.value];if(D.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const w=ie==null?void 0:ie.join("/");N(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,j)}},V=j=>{l("change",{target:s==null?void 0:s.target,extendConfigs:j})},ye=(j,ie)=>{D.value=ie==null?void 0:ie.changeProp,$(j)},H=j=>{l("onButtonClick",j)};return(j,ie)=>(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:V,onBlurChange:ye,onOnButtonClick:H},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Rt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Rt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},zs={style:{display:"flex","justify-content":"space-between"}},Ps={class:"form-content"},Rs={class:"dialog-footer"},Ls={class:"form-content"},Fs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),x=e.ref([]),g=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),_=e.ref(!1),N=e.ref(0),$=e.ref([]),V=e.ref([]),ye=(I,te)=>{if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="selectRelateType"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.selectRelateType)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="menuSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.menuSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="groupSelect"){const ee=te==null?void 0:te.optionUrl;return(ee==null?void 0:ee.groupSelect)||te[I.key]}if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="originalContent")return(te==null?void 0:te.value)||te[I.key];if((te==null?void 0:te.type)=="Select"&&(I==null?void 0:I.key)==="multiple"){const ee=te[I.key];return xl(ee)?ee:I.default}return(I==null?void 0:I.label)==="类型"&&te[I.key]===""?"Input":(I==null?void 0:I.key)==="isFormColHidden"&&!te[I.key]?!1:te[I.key]},H=async I=>{var he,Ue,st,q,M,me;c.value=!0;let te=[];const ee=await((st=(Ue=(he=Re.FormContent)==null?void 0:he.find(ke=>(ke==null?void 0:ke.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(q=Re.FormContent)==null?void 0:q.find(ke=>(ke==null?void 0:ke.key)===((I==null?void 0:I.type)===""?"Input":I==null?void 0:I.type)))==null?void 0:M.value);if(ee==null||ee.forEach(ke=>{N.value++,te.push({label:ke==null?void 0:ke.label,name:ke==null?void 0:ke.label,type:ke.type,prop:ke==null?void 0:ke.prop,value:ye(ke,I),id:N.value,contents:ke==null?void 0:ke.options,width:(I==null?void 0:I.width)??1})}),I!=null&&I.menuSelect&&((me=I==null?void 0:I.menuSelect)==null?void 0:me.length)>0){const ke=await Re.menuToContentType(I==null?void 0:I.menuSelect);te=te==null?void 0:te.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=ke),Me))}E.value=I==null?void 0:I.id,d.value=await Re.selectToBase(Re.formToOptionsContents(te)),x.value=await Re.selectToBase(Re.formToOptionsContents(te))},j=I=>{var ee;g.value=!0;let te=[];(ee=Re.FormButton)==null||ee.forEach(he=>{N.value++,te.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&I[he.key]===""?"normal":I[he.key],id:N.value,contents:he==null?void 0:he.options})}),$.value=te,V.value=te,E.value=I==null?void 0:I.id};e.watch(()=>_.value,()=>{var te,ee;let I=p.cloneDeep(s.originalItemContents);(te=p.cloneDeep(s.originalItemContents))!=null&&te.find(he=>(he==null?void 0:he.key)==="enableWrap")?I=(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!_.value),he)):I.push({key:"enableWrap",contents:!_.value}),l("change",I)},{deep:!0});const ie=()=>{var ee,he,Ue,st,q;$.value=V.value;let I={};if(E.value!==""?I.id=E.value:(N.value++,I.id="id"+N.value),(ee=$.value)==null||ee.forEach(M=>{var ke;const me=(ke=Re.FormButton)==null?void 0:ke.find(Me=>(Me==null?void 0:Me.label)===(M==null?void 0:M.label));me&&(I[me.key]=M.value)}),(he=h.value)!=null&&he.find(M=>M.id===I.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===I.id&&(M=I),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(I),h.value=M}g.value=!1,E.value="";let te=p.cloneDeep(s.originalItemContents);(st=p.cloneDeep(s.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?te=(q=p.cloneDeep(s.originalItemContents))==null?void 0:q.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):te.push({key:"formButton",contents:h.value}),l("change",te)},w=I=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;D.value=(te=p.cloneDeep(D.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=I=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ee;h.value=(te=p.cloneDeep(h.value))==null?void 0:te.filter(he=>(he==null?void 0:he.id)!==(I==null?void 0:I.id)),l("change",(ee=p.cloneDeep(s.originalItemContents))==null?void 0:ee.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=h.value),he))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var te;g.value=!0;let I=[];(te=Re.FormButton)==null||te.forEach(ee=>{N.value++,I.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"?"normal":"",id:N.value,contents:ee==null?void 0:ee.options})}),$.value=I,V.value=I},A=()=>{var te,ee,he;c.value=!0;let I=[];(he=(ee=(te=Re.FormContent)==null?void 0:te.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:ee.value)==null||he.forEach(Ue=>{N.value++,I.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:N.value,contents:Ue==null?void 0:Ue.options})}),d.value=I,x.value=I},T=I=>{let te=p.cloneDeep(V.value);te=te==null?void 0:te.map(ee=>(ee.value=I==null?void 0:I[ee.name],ee)),V.value=te},le=I=>{const te=I.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ee=I.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),he=I.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");ee!=null&&ee.value&&Oo.isString(he.value)&&(he.value=[he.value]),!(ee!=null&&ee.value)&&!Oo.isString(he.value)&&(he.value="")},Fe=async I=>{var te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye;if((I==null?void 0:I.类型)!==((ee=(te=x.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ee.value)){let qe=[];const lt=await((st=(Ue=(he=Re.FormContent)==null?void 0:he.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((Me=(ke=(me=Re.FormContent)==null?void 0:me.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:ke.value)==null?void 0:Me.value):(M=(q=Re.FormContent)==null?void 0:q.find(Q=>(Q==null?void 0:Q.key)===((I==null?void 0:I.类型)===""?"Input":I==null?void 0:I.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Q=>{var nt,ze;N.value++;const tt=wl(Q==null?void 0:Q.default)?(I==null?void 0:I[Q.label])??Q.value??"":Q==null?void 0:Q.default;qe.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:tt,prop:Q==null?void 0:Q.prop,id:N.value,contents:Q==null?void 0:Q.options,width:((ze=(nt=x.value)==null?void 0:nt[0])==null?void 0:ze.width)??1})}),I!=null&&I.菜单选项&&((Ve=I==null?void 0:I.菜单选项)==null?void 0:Ve.length)>0){const Q=await Re.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Q),tt))}le(qe),x.value=await Re.selectToBase(p.cloneDeep(qe)),d.value=await Re.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=I==null?void 0:I[lt.name],lt)),I!=null&&I.菜单选项&&((Ye=I==null?void 0:I.菜单选项)==null?void 0:Ye.length)>0){const lt=await Re.menuToContentType(I==null?void 0:I.菜单选项);qe=qe==null?void 0:qe.map(Q=>((Q==null?void 0:Q.name)==="组信息选项"&&(Q.contents=lt),Q))}qe=Re.formToOptionsContents(qe),le(qe),x.value=await Re.selectToBase(p.cloneDeep(qe))}},ot=I=>{I||(d.value=x.value)},Ie=async I=>{await Fe(I),d.value=x.value},je=ko(async()=>{var he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt;d.value=x.value;let I={};I.width=((Ue=(he=d.value)==null?void 0:he[0])==null?void 0:Ue.width)??1,E.value!==""?I.id=E.value:(N.value++,I.id="id"+N.value);let te=await((M=(q=(st=Re.FormContent)==null?void 0:st.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(ze=>(ze==null?void 0:ze.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:q.value)==null?void 0:M.value)??((ke=(me=Re.FormContent)==null?void 0:me.find(Q=>{var tt,nt;return(Q==null?void 0:Q.key)===(((nt=(tt=d.value)==null?void 0:tt.find(ze=>(ze==null?void 0:ze.label)==="类型"))==null?void 0:nt.value)??"label")}))==null?void 0:ke.value);if((Me=d.value)==null||Me.forEach(Q=>{const tt=te==null?void 0:te.find(nt=>(nt==null?void 0:nt.label)===(Q==null?void 0:Q.label));tt&&(I[tt.key]=Q.value)}),I.width=I.width?I.width:1,I.key=I==null?void 0:I.label,I.isFormColHidden=I==null?void 0:I.isFormColHidden,(Ve=D.value)!=null&&Ve.find(Q=>Q.id===I.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Q=>(Q.id===I.id&&(Q=I),Q));else{let Q=p.cloneDeep(D.value);Q.push(I),D.value=Q}D.value=D.value.map(({id:Q,...tt})=>tt),c.value=!1,E.value="";let ee=p.cloneDeep(s.originalItemContents);(qe=p.cloneDeep(s.originalItemContents))!=null&&qe.find(Q=>(Q==null?void 0:Q.key)==="formContent")?ee=(lt=p.cloneDeep(s.originalItemContents))==null?void 0:lt.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=D.value),Q)):ee.push({key:"formContent",contents:D.value}),l("change",ee)},300),we=()=>{c.value=!1,g.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ee,he,Ue,st,q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const I=p.cloneDeep(s.originalItemContents);D.value=((te=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:te.contents)??[],h.value=((ee=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:ee.contents)??[],_.value=(he=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ue=I==null?void 0:I.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,me)=>{var Me;let ke=M;return ke.id=(M==null?void 0:M.id)??me,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Me=M==null?void 0:M.options)==null?void 0:Me.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,ke}),D.value=Re.formToOptionsContents(D.value),h.value=(q=h.value)==null?void 0:q.map((M,me)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:me})},{deep:!0,immediate:!0}),(I,te)=>{const ee=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",As,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>H(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",Ms,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>j(Ue)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(Ue)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",zs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Tt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":te[0]||(te[0]=Ue=>_.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Fe,onChangeVisible:ot,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(he,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(je),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:$.value,key:$.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:we,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ro=Rt._export_sfc(Fs,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Ks={class:"step-module layout"},Us={class:"form-content"},Ws=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),_=H=>{var j;D.value=H,l("change",(j=V())==null?void 0:j.compData)},N=(H,j)=>{var ie,w;switch(H){case"create":(ie=d.value)==null||ie.forEach(z=>{z.value=""}),h.value="create",g.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),h.value="update",g.visible=!0;break;case"delete":E.value.splice(j,1),h.value="delete";break}},$=H=>{var j,ie,w;if((H==null?void 0:H.buttonName)==="确认"){const z=p.cloneDeep(H==null?void 0:H.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((j=E.value)==null?void 0:j.length)+1});break;case"update":E.value=(ie=E.value)==null?void 0:ie.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=V())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ye=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(D.value=((j=H==null?void 0:H.find(w=>w.key==="stepConfig"))==null?void 0:j.contents)??{},E.value=((ie=H==null?void 0:H.find(w=>w.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>N("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>N("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ks,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ye,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Rt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),x=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}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=H=>{var j;d.value=H,l("change",(j=V())==null?void 0:j.compData)},N=(H,j)=>{var ie,w;switch(H){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(j,1),c.value="delete";break}},$=H=>{var j,ie,w,z;if((H==null?void 0:H.buttonName)==="确认"){const k=p.cloneDeep(H==null?void 0:H.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(ie=x.value)==null||ie.push({...k,index:((j=x.value)==null?void 0:j.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(z=V())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ye=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(d.value=((j=H==null?void 0:H.find(w=>w.key==="timeLineConfig"))==null?void 0:j.contents)??{},x.value=((ie=H==null?void 0:H.find(w=>w.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>N("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>N("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ye,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Qs=Rt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Zs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Rt._export_sfc(Zs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=i,g=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var z;const w=p.cloneDeep(s.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let T=[];(A=k.value)==null||A.forEach(le=>{var Fe;T.push((Fe=Object.values(le))==null?void 0:Fe[0])}),k.value=T}return k})},{deep:!0,immediate:!0});const _=(w,z,k,A)=>{var le;let T={};((le=w==null?void 0:w[0])==null?void 0:le.contents)==="详情"&&(g.value=!0,T[z]=w,d.value=w==null?void 0:w.filter(Fe=>(Fe==null?void 0:Fe.key)!=="tableContentName"),h.value=T,D.value=k,E.value=A.id)},N=w=>{var Fe,ot,Ie,je;const z=(ot=(Fe=Object.values(p.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:ot.filter(we=>(we==null?void 0:we.key)==="tableContentName"),k=(je=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:je.filter(we=>(we==null?void 0:we.key)!=="tableContentName"),A=k==null?void 0:k.map((we,I)=>{var te;return I===w.index&&(we==null?void 0:we.comp)==="Table"&&(we.compData=(te=we.compData)==null?void 0:te.map(ee=>{var he,Ue;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ue=(he=w.content)==null?void 0:he.map(st=>{let q={};for(let M in st)M!=="id"&&(q[M]=st[M]);return q}))==null?void 0:Ue.map(st=>Object.values(st))),ee})),we});A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let we in T)le[we]=A;h.value=le},$=()=>{g.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=w=>{var Fe,ot,Ie,je;const z=(ot=(Fe=Object.values(p.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:ot.filter(we=>(we==null?void 0:we.key)==="tableContentName"),k=(je=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:je.filter(we=>(we==null?void 0:we.key)!=="tableContentName"),A=k==null?void 0:k.map((we,I)=>(I===w.index&&(we.compData=w.contents),we));A.unshift(z==null?void 0:z[0]);let T=p.cloneDeep(h.value),le={};for(let we in T)le[we]=A;h.value=le},ye=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),g.value=!1,h.value={},D.value={},E.value=void 0},H=()=>{g.value=!1,h.value={},D.value={},E.value=void 0},j=w=>{x("change",w,"methodData")},ie=w=>ma(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:T,index:(A==null?void 0:A.id)??T,onContentClick:_,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:H},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(A.comp)),{itemData:A==null?void 0:A.compData,onChange:N,childItemData:A==null?void 0:A.itemChildData,key:T,onContentChange:V,index:(A==null?void 0:A.id)??T,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ye,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Rt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Ct="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=a=>{var s,l;let i=a.trim();if((i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"){let c=(l=(s=i==null?void 0:i.replace(":",Ct))==null?void 0:s.split(Ct))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},uc=a=>{var s;let i=a.trim();return(i==null?void 0:i[0])!=="["&&(i==null?void 0:i[0])!=="{"&&((s=Ga(i,","))==null?void 0:s.length)===1},pc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),dc=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),fc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),wa=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Ea=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},hc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Lo=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},Ga=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const x of s)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Lo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Lo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},vc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),gc=a=>{var i,s,l,c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct;if(fc(a)){let Ke={},be=(l=(s=(i=a==null?void 0:a.replace(":",Ct))==null?void 0:i.split(Ct))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),De="",Qe="",pe=(d=(c=a==null?void 0:a.replace(":",Ct))==null?void 0:c.split(Ct))==null?void 0:d[1];if((pe==null?void 0:pe[0])==="("&&(Qe=(h=(g=(x=pe==null?void 0:pe.split("("))==null?void 0:x[1])==null?void 0:g.split(")"))==null?void 0:h[0],pe=(E=(D=pe==null?void 0:pe.replace(")",Ct))==null?void 0:D.split(Ct))==null?void 0:E[1]),((_=Ga(pe,"/"))==null?void 0:_.length)>1)De=(N=Ga(pe,"/"))==null?void 0:N.map(Ae=>Ae==null?void 0:Ae.replaceAll("/","").replaceAll("'",""));else if(pe.includes("{")||pe.includes("("))if(pe.includes("{")?De=De+((ie=(j=(H=(ye=(V=($=pe==null?void 0:pe.split("{"))==null?void 0:$[1])==null?void 0:V.split("}"))==null?void 0:ye[0])==null?void 0:H.replaceAll(":","/").replaceAll("'",""))==null?void 0:j.replaceAll("[","(["))==null?void 0:ie.replaceAll("]","])"))+"[":De=De+((le=(T=(A=(k=(z=(w=pe==null?void 0:pe.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:T.replaceAll("[","(["))==null?void 0:le.replaceAll("]","])"))+"[",!((Fe=pe==null?void 0:pe.split(")"))!=null&&Fe[1]))De=De+((je=(Ie=(ot=pe==null?void 0:pe.split("["))==null?void 0:ot[1])==null?void 0:Ie.split("]"))==null?void 0:je[0])+"]";else{const Ae=(ee=(te=(I=(we=pe==null?void 0:pe.split(")"))==null?void 0:we[1])==null?void 0:I.replace("[",Ct))==null?void 0:te.split(Ct))==null?void 0:ee[1];if(pe!=null&&pe.includes("?"))De=((he=pe==null?void 0:pe.split("?"))==null?void 0:he[1])+"&&"+((st=(Ue=pe==null?void 0:pe.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ae){const Le=Ae.lastIndexOf("]"),We=Ae.substring(0,Le)+Ct+Ae.substring(Le+1);De=De+((q=We==null?void 0:We.split(Ct))==null?void 0:q[0])+"]"}else De=(ke=(me=(M=a==null?void 0:a.replace(":",Ct))==null?void 0:M.split(Ct))==null?void 0:me[1])==null?void 0:ke.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Ye=(Ve=(Me=a==null?void 0:a.replace(":",Ct))==null?void 0:Me.split(Ct))==null?void 0:Ve[1])==null?void 0:Ye.replaceAll("'","");else{let Ae=(Q=(lt=(qe=a==null?void 0:a.replace(":",Ct))==null?void 0:qe.split(Ct))==null?void 0:lt[1])==null?void 0:Q.replaceAll("'","");De=((ze=(nt=(tt=Ae==null?void 0:Ae.split("?"))==null?void 0:tt[1])==null?void 0:nt.split(":"))==null?void 0:ze[0])+"&&"+((ce=Ae==null?void 0:Ae.split("?"))==null?void 0:ce[0])}return Ke[be]=Qe!==""?Qe+"$##"+De:De,{groupName:"",formContents:[[Ke]]}}else{let Ke={},be="",De="";if(a.includes("#")){be=(re=(oe=a==null?void 0:a.split("#"))==null?void 0:oe[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?De=De+((W=(C=(m=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:m.split("}"))==null?void 0:C[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((Z=(F=(v=(Y=Qe==null?void 0:Qe.split("("))==null?void 0:Y[1])==null?void 0:v.split(")"))==null?void 0:F[0])==null?void 0:Z.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((ve=(ue=(P=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:P.split(Ct))==null?void 0:ue[1])==null?void 0:ve.slice(0,((se=(X=(R=Qe==null?void 0:Qe.replace("[",Ct))==null?void 0:R.split(Ct))==null?void 0:X[1])==null?void 0:se.length)-1))}else{let Qe=(G=(ae=(K=a==null?void 0:a.split("]"))==null?void 0:K[0])==null?void 0:ae.split("["))==null?void 0:G[1];if((_e=Qe==null?void 0:Qe.split(":"))==null||_e.forEach((pe,Ae)=>{var Le;((Le=Qe==null?void 0:Qe.split(":"))==null?void 0:Le.length)-1===Ae&&(be=pe==null?void 0:pe.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((fe=(L=(Ee=(de=a==null?void 0:a.split("]"))==null?void 0:de[1])==null?void 0:Ee.replace(":",Ct).split(Ct))==null?void 0:L[1])==null?void 0:fe.replaceAll("'",""))??"";else{let pe=(ge=(Ne=(Oe=(Je=(Be=(ne=p.cloneDeep(a))==null?void 0:ne.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Oe[0])==null?void 0:Ne.replaceAll("{","").replaceAll("}",""))==null?void 0:ge.replaceAll("'","").replaceAll(":","/"),Ae="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Le=>{Ae=Ae===""?Ae+(Le==null?void 0:Le.replaceAll("'","")):Ae+":"+(Le==null?void 0:Le.replaceAll("'",""))}),De=pe+"["+Ae+"]"}}return Ke[be]=De,{groupName:"",formContents:[[Ke]]}}},mc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),yc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},bc=a=>{var d,x,g,h,D;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(x=(d=wa(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(g=wa(p.cloneDeep(i)))==null?void 0:g.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(D=p.cloneDeep(s))==null?void 0:D.map(E=>{var _,N;return E=(N=(_=E.replace(")",Ct))==null?void 0:_.split(Ct))==null?void 0:N[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var $,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F;let _=(V=($=p.cloneDeep(E))==null?void 0:$.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",Ct).split(Ct);if(((H=(ye=p.cloneDeep(_))==null?void 0:ye[0])==null?void 0:H.replaceAll("'",""))==="输入"){if(!((ie=(j=p.cloneDeep(_))==null?void 0:j[1])!=null&&ie.includes("["))&&!((z=(w=p.cloneDeep(_))==null?void 0:w[1])!=null&&z.includes("("))){Re.IsJson((k=p.cloneDeep(_))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(_))==null?void 0:A[1].replaceAll("'",'"')));return}if(((le=(T=p.cloneDeep(_))==null?void 0:T[1])==null?void 0:le[0])==="["){let Z=(je=(Fe=p.cloneDeep(_))==null?void 0:Fe[1])==null?void 0:je.slice(1,((Ie=(ot=p.cloneDeep(_))==null?void 0:ot[1])==null?void 0:Ie.length)-1);(I=(we=wa(Z))==null?void 0:we.filter(P=>P!==","))==null||I.forEach(P=>{var ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae;let ue={},R=(ae=(K=p.cloneDeep(P))==null?void 0:K.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;(_e=R==null?void 0:R[1])!=null&&_e.includes("(")?(se=(Ne=(Oe=(Je=(Be=(ne=(fe=(L=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:L.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Oe[0])==null?void 0:Ne.replaceAll(":","/").replaceAll("'",""),(ct=(ge=p.cloneDeep(R))==null?void 0:ge[1])!=null&&ct.includes("[")&&(se=p.cloneDeep(se)+"["+((Ae=(pe=(Qe=(De=(be=(Ke=p.cloneDeep(R))==null?void 0:Ke[1])==null?void 0:be.split("["))==null?void 0:De[1])==null?void 0:Qe.split("]"))==null?void 0:pe[0])==null?void 0:Ae.replaceAll("'",""))+"]")):se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'",""),ue[X]=se,c.push(ue)})}}else{if(!((ee=(te=p.cloneDeep(_))==null?void 0:te[1])!=null&&ee.includes("["))&&!((Ue=(he=p.cloneDeep(_))==null?void 0:he[1])!=null&&Ue.includes("("))){Re.IsJson((st=p.cloneDeep(_))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((q=p.cloneDeep(_))==null?void 0:q[1].replaceAll("'",'"')));return}if(((me=(M=p.cloneDeep(_))==null?void 0:M[1])==null?void 0:me[0])==="["){let Z=(Ye=(ke=p.cloneDeep(_))==null?void 0:ke[1])==null?void 0:Ye.slice(1,((Ve=(Me=p.cloneDeep(_))==null?void 0:Me[1])==null?void 0:Ve.length)-1);(lt=(qe=wa(Z))==null?void 0:qe.filter(P=>P!==","))==null||lt.forEach(P=>{var ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It;let ue={},R=(ae=(K=p.cloneDeep(P))==null?void 0:K.slice(1,((ve=p.cloneDeep(P))==null?void 0:ve.length)-1))==null?void 0:ae.replace(":",Ct).split(Ct),X=(G=R==null?void 0:R[0])==null?void 0:G.replaceAll("'",""),se;if(!((_e=R==null?void 0:R[1])!=null&&_e.includes("(")))se=(de=R==null?void 0:R[1])==null?void 0:de.replaceAll("'","");else if(se=(Je=(Be=(ne=(fe=(L=(Ee=p.cloneDeep(R))==null?void 0:Ee[1])==null?void 0:L.replaceAll("{",""))==null?void 0:fe.replaceAll("}",""))==null?void 0:ne.replace("(",Ct))==null?void 0:Be.split(Ct))==null?void 0:Je[1],se=(Ne=(Oe=yc(p.cloneDeep(se),Ct))==null?void 0:Oe.split(Ct))==null?void 0:Ne[0],!(se!=null&&se.includes("(")))se=(ge=p.cloneDeep(se))==null?void 0:ge.replaceAll(":","/").replaceAll("'",""),(Ke=(ct=p.cloneDeep(R))==null?void 0:ct[1])!=null&&Ke.includes("[")&&(se=p.cloneDeep(se)+"["+((Ce=(O=(We=(Le=(De=(be=p.cloneDeep(R))==null?void 0:be[1])==null?void 0:De.split("["))==null?void 0:Le[((Ae=(pe=(Qe=p.cloneDeep(R))==null?void 0:Qe[1])==null?void 0:pe.split("["))==null?void 0:Ae.length)-1])==null?void 0:We.split("]"))==null?void 0:O[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let Bt="";(ut=Ea(se,":"))==null||ut.forEach(xt=>{var wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In;if(!(xt!=null&&xt.includes("(")))Bt=Bt===""?Bt+((wt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:wt.replaceAll("'","")):Bt+"/"+((Ot=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let gn=(Dn=(fn=(wn=(qt=(Vt=(Lt=(Ut=(At=p.cloneDeep(xt))==null?void 0:At.replaceAll("{",""))==null?void 0:Ut.replaceAll("}",""))==null?void 0:Lt.replace("(",Ct))==null?void 0:Vt.split(Ct))==null?void 0:qt[1])==null?void 0:wn.split(")"))==null?void 0:fn[0])==null?void 0:Dn.replaceAll(":","/").replaceAll("'","");gn=gn+"["+((In=(vn=(Tn=(hn=(Sn=p.cloneDeep(xt))==null?void 0:Sn.split("["))==null?void 0:hn[1])==null?void 0:Tn.split("]"))==null?void 0:vn[0])==null?void 0:In.replaceAll("'",""))+"]",Bt=Bt===""?Bt+"["+gn+"]":Bt+"/["+gn+"]"}}),se=Bt+"["+((It=(vt=(pt=(He=(ft=(et=p.cloneDeep(R))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Se=(rt=p.cloneDeep(R))==null?void 0:rt[1])==null?void 0:Se.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:It.replaceAll("'",""))+"]"}ue[X]=se,l.push(ue)})}else{let Z=(ze=(Q=p.cloneDeep(_))==null?void 0:Q[1])==null?void 0:ze.slice(1,((nt=(tt=p.cloneDeep(_))==null?void 0:tt[1])==null?void 0:nt.length)-1),P={},ue=(W=(C=(re=(oe=(ce=p.cloneDeep(Z))==null?void 0:ce.split("]"))==null?void 0:oe[0])==null?void 0:re.split(":"))==null?void 0:C[((m=(dt=(Xe=(Te=p.cloneDeep(Z))==null?void 0:Te.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:m.length)-1])==null?void 0:W.replaceAll("'",""),R=((F=(v=(Y=p.cloneDeep(Z))==null?void 0:Y.split("]"))==null?void 0:v[0])==null?void 0:F.replaceAll("'",""))+"]";P[ue]=R,l.push(P)}}}),{output:l,input:c}},kc=jt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(kc),Mn=jt.useMenuState(p.pinia),{activeMenuPath:aa}=p.storeToRefs(Mn),Da=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Da),xc=Re.useOriginalState(p.pinia),{originalPath:wc}=p.storeToRefs(xc),Qt=wc.value,Dc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const g=x.match(i);g&&d.push({idx:Number(g[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,g)=>x.idx-g.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],g=[];c.forEach(_=>{var N;return(((N=_.names)==null?void 0:N.length)>d?x:g).push(_)});const h=g.map(_=>_.item),D=new Map;for(const _ of x){const N=_.names[_.names.length-d-1].value;D.has(N)||D.set(N,[]),D.get(N).push(_)}return[...Array.from(D.entries()).map(([_,N])=>{var $;return N[0].names.length===1&&(($=N[0].names[0])==null?void 0:$.idx)===-1?N[0].item:{name:_,isShow:!0,comp:"ParentItem",children:l(N,d+1)}}),...h]}if(s)return l(s,0)},Aa=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:Dc(a),Bl=async()=>{var d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je,we,I,te,ee,he,Ue,st,q,M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e;Mn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:x.length)>0){let de=($=(N=(_=(E=(D=(h=(g=i==null?void 0:i.data)==null?void 0:g.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:_.compData)==null?void 0:N.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:$.contents;a=(ye=(V=p.cloneDeep(de))==null?void 0:V[0])==null?void 0:ye.label}let s=aa.value;(ie=aa.value)!=null&&ie.includes(`updateLoading${((H=Xt.value)==null?void 0:H.account)||((j=Xt.value)==null?void 0:j.账号)}`)?s=p.cloneDeep(aa).value:(k=aa.value)!=null&&k.includes(`loading${((w=Xt.value)==null?void 0:w.account)||((z=Xt.value)==null?void 0:z.账号)}`)&&(s=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((T=Xt.value)==null?void 0:T.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Fe=(le=l==null?void 0:l.data)==null?void 0:le.result)==null?void 0:Fe.length)>0){let de="",Ee=[];(Ie=(ot=l==null?void 0:l.data)==null?void 0:ot.result)==null||Ie.forEach(fe=>{var ne,Be,Je,Oe,Ne;((Be=(ne=fe==null?void 0:fe.value)==null?void 0:ne.pageData)==null?void 0:Be.comp)==="Form"&&((Ne=(Oe=(Je=fe==null?void 0:fe.value)==null?void 0:Je.pageData)==null?void 0:Oe.compData)==null||Ne.forEach(ge=>{(ge==null?void 0:ge.key)==="formContent"&&(Ee=[...Ee,...ge==null?void 0:ge.contents])}))});let L=Ee==null?void 0:Ee.find(fe=>(fe==null?void 0:fe.isMain)===!0);if(L?(de=L==null?void 0:L.value,a=L==null?void 0:L.key):de=(q=(st=(Ue=(he=(ee=(te=(I=(we=(je=l==null?void 0:l.data)==null?void 0:je.result)==null?void 0:we[0])==null?void 0:I.value)==null?void 0:te.pageData)==null?void 0:ee.compData)==null?void 0:he.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(fe=>{var ne,Be;return(fe==null?void 0:fe.key)===a||((Be=(ne=fe==null?void 0:fe.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:Be[1])===a}))==null?void 0:q.value,(ke=aa.value)!=null&&ke.includes(`updateLoading${((M=Xt.value)==null?void 0:M.account)||((me=Xt.value)==null?void 0:me.账号)}`)){let fe=[],ne=[];const Be=await p.getInsofDataApi({key:{pageKey:(oe=aa.value.split(Qt+`updateLoading${((ze=Xt.value)==null?void 0:ze.account)||((ce=Xt.value)==null?void 0:ce.账号)}`))==null?void 0:oe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(re=Be==null?void 0:Be.data)==null?void 0:re.result)==null?void 0:Te.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Oe=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ne=>{var ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et;if(((ge=Ne==null?void 0:Ne.key)==null?void 0:ge.type)==="structure"){let ft=(De=(be=(Ke=(ct=Ne==null?void 0:Ne.value)==null?void 0:ct.pageData)==null?void 0:Ke.compData)==null?void 0:be.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:De.contents;if(ft){let rt=await Re.getItemData(ft,sessionStorage.getItem("systemKey"),""),Se=(Le=(Ae=(pe=(Qe=Ne==null?void 0:Ne.value)==null?void 0:Qe.pageData)==null?void 0:pe.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Le.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var It,Bt;if((vt==null?void 0:vt.key)==="formContent"&&((It=vt==null?void 0:vt.contents)==null?void 0:It.some(wt=>Se==null?void 0:Se.find(Ot=>(Ot==null?void 0:Ot.prop)===(wt==null?void 0:wt.prop))))){let wt=He;wt.compData=(Bt=wt.compData)==null?void 0:Bt.map(At=>{var Ut;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(Ut=At.contents)==null?void 0:Ut.map(Lt=>{var Vt;return Se!=null&&Se.find(qt=>(qt==null?void 0:qt.prop)===(Lt==null?void 0:Lt.prop))&&(Lt.value=(Vt=Se==null?void 0:Se.find(qt=>(qt==null?void 0:qt.prop)===(Lt==null?void 0:Lt.prop)))==null?void 0:Vt.value),Lt})),At});let Ot={};for(let At in wt)At!=="id"&&(Ot[At]=wt[At]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((O=(We=Be==null?void 0:Be.data)==null?void 0:We.result)!=null&&O.find(rt=>{var Se,Ze,He,pt;return((Ze=(Se=rt==null?void 0:rt.value)==null?void 0:Se.pageData)==null?void 0:Ze.name)===((pt=(He=Ne==null?void 0:Ne.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ne==null?void 0:Ne.key;rt.pageKey=p.cloneDeep(_n).value+Qt+de,c.push({id:(et=(ut=(Ce=Be==null?void 0:Be.data)==null?void 0:Ce.result)==null?void 0:ut.find(Se=>{var Ze,He,pt,vt;return((He=(Ze=Se==null?void 0:Se.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ne==null?void 0:Ne.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ne==null?void 0:Ne.value})}else{let rt=Ne==null?void 0:Ne.key;rt.pageKey=p.cloneDeep(_n).value+Qt+de,fe.push({key:rt,value:Ne==null?void 0:Ne.value})}}});await Promise.all(Oe),(C=(m=l==null?void 0:l.data)==null?void 0:m.result)==null||C.forEach(Ne=>{var ct,Ke,be;let ge=(ct=p.cloneDeep(Ne))==null?void 0:ct.key;ge.pageKey=p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((be=Xt.value)==null?void 0:be.账号)}`,Mn.setChildMenu(ge.pageKey),c.push({id:Ne==null?void 0:Ne.id,key:ge})})}if(de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(W=c==null?void 0:c[0])!=null&&W.key&&await Da.setLogRecordAsync({type:"保存",data:c},(Y=c==null?void 0:c[0])==null?void 0:Y.key),(fe==null?void 0:fe.length)>0&&(await p.batchAddInsofDataApi({dataList:fe}),(v=fe==null?void 0:fe[0])!=null&&v.key&&await Da.setLogRecordAsync({type:"保存",data:fe},(F=fe==null?void 0:fe[0])==null?void 0:F.key));const Je=await p.getInsofDataApi({key:{pageKey:(ue=aa.value.split(Qt+`updateLoading${((Z=Xt.value)==null?void 0:Z.account)||((P=Xt.value)==null?void 0:P.账号)}`))==null?void 0:ue[0],systemKey:sessionStorage.getItem("systemKey")}});if(((X=(R=Je==null?void 0:Je.data)==null?void 0:R.result)==null?void 0:X.length)>0){let Oe=[],Ne=(se=l==null?void 0:l.data)==null?void 0:se.result;(ve=p.cloneDeep(Ne))==null||ve.forEach(ge=>{var ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut;if(((ct=ge==null?void 0:ge.key)==null?void 0:ct.type)!=="structure"){let et=(De=(be=(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.result)==null?void 0:be.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:De.map(Ze=>Ze==null?void 0:Ze.id);Oe=[...Oe,...et];let ft=(Le=(Ae=(pe=(Qe=p.cloneDeep(Ne))==null?void 0:Qe.find(Ze=>{var He;return((He=ge==null?void 0:ge.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:pe.value)==null?void 0:Ae.pageData)==null?void 0:Le.name,rt=(Ce=(O=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:O.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Se=(ut=p.cloneDeep(ge))==null?void 0:ut.key;Se.tableId=rt,Se.pageKey=p.cloneDeep(_n).value+Qt+de,ne.push({key:Se,value:ge==null?void 0:ge.value})}}),(Oe==null?void 0:Oe.length)>0&&(Oe=[...new Set(Oe)],await p.batchDeleteInsofDataApi({ids:Oe})),(ae=(K=l==null?void 0:l.data)==null?void 0:K.result)==null||ae.forEach(ge=>{var Ke,be,De;let ct=(Ke=p.cloneDeep(ge))==null?void 0:Ke.key;ct.pageKey=p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((be=Xt.value)==null?void 0:be.account)||((De=Xt.value)==null?void 0:De.账号)}`,Mn.setChildMenu(ct.pageKey),c.push({id:ge==null?void 0:ge.id,key:ct})})}(ne==null?void 0:ne.length)>0&&(await p.batchAddInsofDataApi({dataList:ne}),(G=fe==null?void 0:fe[0])!=null&&G.key&&await Da.setLogRecordAsync({type:"保存",data:ne},(_e=ne==null?void 0:ne[0])==null?void 0:_e.key)),p.ElMessage.success("保存成功")}}else{if((Ve=(Me=l==null?void 0:l.data)==null?void 0:Me.result)==null||Ve.forEach(fe=>{var Be;let ne=(Be=p.cloneDeep(fe))==null?void 0:Be.key;ne.pageKey=p.cloneDeep(_n).value+Qt+de,Mn.setChildMenu(ne.pageKey),c.push({id:fe==null?void 0:fe.id,key:ne})}),de===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1),Mn.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Da.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await Re.loadingConstruct(p.cloneDeep(_n).value+Qt+de,p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((lt=Xt.value)==null?void 0:lt.account)||((Q=Xt.value)==null?void 0:Q.账号)}`),Mn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+de+Qt+`updateLoading${((tt=Xt.value)==null?void 0:tt.account)||((nt=Xt.value)==null?void 0:nt.账号)}`),p.ElMessage.success("保存成功")}}Mn.setImportLoading(!1)},Cc={key:0,class:"method-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=Re.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),x=e.ref(),g=Re.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(g),D=jt.useModelComp(p.pinia),E=e.ref(!1),_=jt.useMenuState(p.pinia),N=p.useLoginState(p.pinia),{itemData:$,isEdit:V,routeToChildPath:ye,tableViewContents:H,lockingPage:j,payloadTypes:ie}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(_),{loginUserInfo:A}=p.storeToRefs(N),T=e.ref(!1),le=async()=>{var q,M;(q=i.value)!=null&&q.find(me=>(me==null?void 0:me.buttonName)==="保存")&&await ee((M=i.value)==null?void 0:M.find(me=>(me==null?void 0:me.buttonName)==="保存")),await Bl()};e.watch(()=>$.value,async()=>{V.value==="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{deep:!0});const Fe=()=>{d.value=!1,x.value=void 0},ot=q=>q.map(M=>{const me={};for(const ke in M){const Me=M[ke];if(ke.includes(h.value)){const Ve=ke.split(h.value);let Ye=me;Ve.forEach((qe,lt)=>{lt===Ve.length-1?Ye[qe]=Me:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else me[ke]=Me}return me}),Ie=async(q,M,me=[])=>{var Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt;let ke=(Me=p.cloneDeep(M))==null?void 0:Me.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(q!=null&&q.includes("[")){let m=(Q=(lt=(qe=(Ye=(Ve=p.cloneDeep(q))==null?void 0:Ve.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Q.split(":"),C="";if(m!=null&&m[0]){let W=(tt=ke==null?void 0:ke.find(Y=>(Y==null?void 0:Y.name)===(m==null?void 0:m[0])))==null?void 0:tt.compData;if(!W){let Y=(nt=q==null?void 0:q.split("["))==null?void 0:nt[0],v=await Re.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",me);W=(ze=v==null?void 0:v.find(F=>(F==null?void 0:F.name)===(m==null?void 0:m[0])))==null?void 0:ze.compData}W==null||W.forEach(Y=>{var v,F,Z,P,ue,R;if((Y==null?void 0:Y.key)==="formContent")(v=Y==null?void 0:Y.contents)==null||v.forEach(X=>{var se;(X==null?void 0:X.key)===(m==null?void 0:m[1])&&(Array.isArray(X==null?void 0:X.value)?C=X==null?void 0:X.value:C=(se=X==null?void 0:X.value)==null?void 0:se.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let X=[],se=(F=W==null?void 0:W.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:F.contents,ve=(m==null?void 0:m[1])??"";if(se!=null&&se.every(K=>Array.isArray(K))){let K=Re.getColumnChild((ue=se==null?void 0:se[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(R=Y.contents)==null||R.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(_e=>!(_e!=null&&_e.id)),K==null||K.forEach((_e,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===_e.prop)&&(G[_e.prop]=Ee)}),X.push(G)}),X=ot(X)}else{let K=(Z=se==null?void 0:se.map(ae=>ae==null?void 0:ae.label))==null?void 0:Z.filter(ae=>ae!=="操作");(P=Y.contents)==null||P.forEach(ae=>{let G={};ae=ae==null?void 0:ae.filter(_e=>!(_e!=null&&_e.id)),K==null||K.forEach((_e,de)=>{let Ee=ae[de];typeof ae[de]=="number"&&(Ee=ae[de].toString()),(ve===""||ve===_e)&&(G[_e]=Ee)}),X.push(G)})}C=X}})}return C}else if(q!=null&&q.includes("/")){let m={};return(ce=p.cloneDeep(ke))==null||ce.forEach((C,W)=>{var Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne;if((C==null?void 0:C.comp)==="Table"){let Be=Array.isArray((F=(v=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:v.contents)==null?void 0:F[0])?(R=(ue=(P=(Z=C==null?void 0:C.compData)==null?void 0:Z.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:P.contents)==null?void 0:ue[0])==null?void 0:R.some(ge=>ge==null?void 0:ge.children):[],Je=(ve=(se=(X=C==null?void 0:C.compData)==null?void 0:X.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:ve.map(ge=>(ge!=null&&ge.find(ct=>ct==null?void 0:ct.id)&&(ge=ge.slice(1)),ge)),Oe=(de=(_e=(G=(ae=(K=C==null?void 0:C.compData)==null?void 0:K.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:ae.contents)==null?void 0:G[0])==null?void 0:_e[0])==null?void 0:de.label,Ne=(L=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:L.contents;if(Be)(Be==null?void 0:Be.length)===0?m[C.name]=m!=null&&m[C.name]?m[C.name]:Re.tableToForm(Je,Ne):m[Oe]=Re.tableToForm(Je,Ne);else{const ge=[];Ne=Ne.slice(1,Ne.length-1),Ne==null||Ne.forEach((ct,Ke)=>{Je==null||Je.forEach(be=>{ge.push({key:ct.label+be[0],value:be[Ke+1]})})}),m["form"+W]=ge}}else{const Be=(ne=(fe=C.compData)==null?void 0:fe.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:ne.contents;m!=null&&m.form||(m.form=[]);const Je=[];Be==null||Be.forEach(Oe=>{Oe.key!==""&&(Oe={key:(Oe==null?void 0:Oe.key)??(Oe==null?void 0:Oe.label),value:Oe==null?void 0:Oe.value},Je.push(Oe))}),m.form=[...Je,...p.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(q==="createInsofDataApi"){let m=(oe=p.cloneDeep(M))==null?void 0:oe[0];return m={comp:(re=p.cloneDeep(m))==null?void 0:re.comp,compData:(Te=p.cloneDeep(m))==null?void 0:Te.compData,name:(Xe=p.cloneDeep(m))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:m}}}return q}},je=async(q,M,me)=>{var Ve,Ye,qe;let ke=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Me=ke==null?void 0:ke.find(lt=>(lt==null?void 0:lt.name)===(me==null?void 0:me[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let lt={};for(let re in p.cloneDeep(q))p.cloneDeep(q)[re]!=="loginUser"?lt[re]=p.cloneDeep(q)[re]:lt[re]=((Ve=A.value)==null?void 0:Ve.account)||((Ye=A.value)==null?void 0:Ye.账号);let Q=[],tt=lt;Array.isArray(q)||(tt=[lt]),tt==null||tt.forEach(re=>{Q.push({[re[me[1]]]:re})});let nt=[],ze=Q==null?void 0:Q.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]});ke==null||ke.forEach(re=>{var Te;(re==null?void 0:re.name)===(me==null?void 0:me[0])&&((Te=re==null?void 0:re.compData)==null||Te.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(m=>{m!=null&&m.some(C=>ze.includes(C))&&nt.push({[m.find(C=>C.id).id]:m.find(C=>ze.includes(C))})}))}))});let ce=nt==null?void 0:nt.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]}),oe=[];if(ce==null||ce.forEach(re=>{var dt;let Te=(dt=nt==null?void 0:nt.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Q==null?void 0:Q.find(m=>{var C;return((C=Object.keys(m))==null?void 0:C[0])===Te});oe.push({id:parseInt(re),value:{tableData:Xe[Te]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((Me==null?void 0:Me.comp)==="Form"){let lt=p.cloneDeep(Me);lt.compData=(qe=lt.compData)==null?void 0:qe.map(nt=>{var ze;return(nt==null?void 0:nt.key)==="formContent"&&(nt.contents=(ze=nt.contents)==null?void 0:ze.map(ce=>((ce==null?void 0:ce.key)===(me==null?void 0:me[1])&&(ce.value=(q==null?void 0:q[ce==null?void 0:ce.prop])||q),ce))),nt});let Q={};for(let nt in lt)nt!=="id"&&(Q[nt]=lt[nt]);let tt=[];if(tt.push({id:Me==null?void 0:Me.id,keyType:me==null?void 0:me[1],value:{pageData:Q}}),(tt==null?void 0:tt.length)>0)return tt}}},we=async(q,M,me)=>{var Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe;let ke=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Me=ke==null?void 0:ke.find(re=>(re==null?void 0:re.name)===(me==null?void 0:me[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let re={};for(let Te in p.cloneDeep(q))p.cloneDeep(q)[Te]!=="loginUser"?re[Te]=p.cloneDeep(q)[Te]:re[Te]=((Ve=A.value)==null?void 0:Ve.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((Me==null?void 0:Me.comp)==="Form"){let re=p.cloneDeep(Me),Te=Object.keys(q),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var F,Z;(v==null?void 0:v.key)==="formContent"&&((Z=(F=p.cloneDeep(v))==null?void 0:F.contents)==null||Z.forEach(P=>{var ue;Te.includes(P==null?void 0:P.key)&&(P==null?void 0:P.value)===((ue=A.value)==null?void 0:ue.姓名)&&(Xe=P==null?void 0:P.key)}))});let dt=[];(Q=Object.values(q[Xe]))==null||Q.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async v=>{var R,X,se,ve,K,ae,G,_e,de,Ee,L,fe;let F="";(ae=(K=(ve=(se=(X=(R=p.cloneDeep(v))==null?void 0:R.split("("))==null?void 0:X[1])==null?void 0:se.split(")"))==null?void 0:ve[0])==null?void 0:K.split(":"))==null||ae.forEach(ne=>{F=F===""?F+ne.replaceAll("'",""):F+"/"+ne.replaceAll("'","")});let Z=[];(fe=(L=(Ee=(de=(_e=(G=p.cloneDeep(v))==null?void 0:G.split("<"))==null?void 0:_e[1])==null?void 0:de.split(">"))==null?void 0:Ee[0])==null?void 0:L.split(":"))==null||fe.forEach(ne=>{Z.push(ne.replaceAll("'",""))});const P=await Re.getItemData(F,sessionStorage.getItem("systemKey"),"");let ue="";return P==null||P.forEach(ne=>{var Be;ne.name===(Z==null?void 0:Z[0])&&((Be=ne==null?void 0:ne.compData)==null||Be.forEach(Je=>{var Oe;(Je==null?void 0:Je.key)==="formContent"&&((Oe=Je.contents)==null||Oe.forEach(Ne=>{(Ne==null?void 0:Ne.key)===(Z==null?void 0:Z[1])&&(ue=Ne==null?void 0:Ne.value)}))}))}),{[v]:ue}}),C=await Promise.all(m);re.compData=(nt=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:nt.map(v=>{var F,Z;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(Z=(F=p.cloneDeep(v))==null?void 0:F.contents)==null?void 0:Z.map(P=>{var ue,R,X,se;return(ue=q[Xe])!=null&&ue[P==null?void 0:P.key]&&(q[Xe][P==null?void 0:P.key].includes("(")?P.value=(R=C==null?void 0:C.find(ve=>{var K;return((K=Object.keys(ve))==null?void 0:K[0])===q[Xe][P==null?void 0:P.key]}))==null?void 0:R[q[Xe][P==null?void 0:P.key]]:P.value=(se=(X=p.cloneDeep(q))==null?void 0:X[Xe])==null?void 0:se[P==null?void 0:P.key]),P})),v});const W=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((ze=W==null?void 0:W.data)==null?void 0:ze.type)==="success"&&((oe=(ce=W==null?void 0:W.data)==null?void 0:ce.result)==null||oe.forEach(v=>{var F,Z;((Z=(F=v==null?void 0:v.value)==null?void 0:F.pageData)==null?void 0:Z.name)===(me==null?void 0:me[0])&&(Y=v.id)}),await p.updateInsofDataApi({id:Y,value:{pageData:re}}))}}},I=(q,M="",me={})=>{for(const[ke,Me]of Object.entries(q)){const Ve=M?`${M}.${ke}`:ke;Me!==null&&typeof Me=="object"&&!Array.isArray(Me)&&Object.prototype.toString.call(Me)!=="[object Date]"?I(Me,Ve,me):me[Ve]=Me}return me},te=async(q,M,me,ke)=>{var Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te,Xe,dt,m,C,W,Y,v,F,Z,P,ue,R,X,se;let Me=await Re.getItemData(M,sessionStorage.getItem("systemKey"),""),Ve=Me==null?void 0:Me.find(ve=>(ve==null?void 0:ve.name)===(me==null?void 0:me[0]));if(Ve){if(!(me!=null&&me[1])&&(Ve==null?void 0:Ve.comp)==="Table"){let ve={},K=[],ae=(qe=(Ye=Ve==null?void 0:Ve.compData)==null?void 0:Ye.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:qe.contents;ae!=null&&ae.every(de=>Array.isArray(de))?K=(Q=Re.getColumnChild((lt=ae==null?void 0:ae[0])==null?void 0:lt.filter(de=>(de==null?void 0:de.label)!=="操作")))==null?void 0:Q.map(de=>de==null?void 0:de.prop):K=ae==null?void 0:ae.map(de=>de==null?void 0:de.label);for(let de in p.cloneDeep(q))if(p.cloneDeep(q)[de]!=="loginUser"){let Ee=I(p.cloneDeep(q)[de]),L={};for(let fe in Ee)if(K!=null&&K.find(ne=>ne===fe))L[fe]=Ee[fe];else if(K!=null&&K.find(ne=>(ne==null?void 0:ne.toUpperCase())===(fe==null?void 0:fe.toUpperCase()))){let ne=K==null?void 0:K.find(Be=>(Be==null?void 0:Be.toUpperCase())===(fe==null?void 0:fe.toUpperCase()));L[ne]=Ee[fe]}ve[de]=L}else ve[de]=((tt=A.value)==null?void 0:tt.account)||((nt=A.value)==null?void 0:nt.账号);let G=await p.getInsofDataApi({keyLikes:{tableId:Ve==null?void 0:Ve.id}});if(((ce=(ze=G==null?void 0:G.data)==null?void 0:ze.result)==null?void 0:ce.length)>0){let de=(re=(oe=G==null?void 0:G.data)==null?void 0:oe.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(de==null?void 0:de.length)>0&&await p.batchDeleteInsofDataApi({ids:de})}let _e=[];if((Te=Ve==null?void 0:Ve.compData)!=null&&Te.find(de=>(de==null?void 0:de.key)==="pageColumn")&&((m=(dt=(Xe=Ve==null?void 0:Ve.compData)==null?void 0:Xe.find(de=>(de==null?void 0:de.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const de=await p.getInsofDataApi({id:Ve==null?void 0:Ve.tableId});let Ee=((v=(Y=(W=(C=de==null?void 0:de.data)==null?void 0:C.result)==null?void 0:W[0])==null?void 0:Y.key)==null?void 0:v.pageKey)??"";(F=Object.values(ve))==null||F.forEach(L=>{_e.push({key:{type:"data",pageKey:Ee,tableId:Ve==null?void 0:Ve.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:L}})})}else(Z=Object.values(ve))==null||Z.forEach(de=>{_e.push({key:{type:"data",pageKey:M,tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})});(_e==null?void 0:_e.length)>0&&await p.batchAddInsofDataApi({dataList:_e})}else if(!(me!=null&&me[1])&&(Ve==null?void 0:Ve.comp)==="Form"){let ve=p.cloneDeep(Ve);ve.compData=(ue=(P=p.cloneDeep(ve))==null?void 0:P.compData)==null?void 0:ue.map(G=>{var _e,de;return(G==null?void 0:G.key)==="formContent"&&(G.contents=(de=(_e=p.cloneDeep(G))==null?void 0:_e.contents)==null?void 0:de.map(Ee=>{var L,fe;return(L=p.cloneDeep(q))!=null&&L[Ee==null?void 0:Ee.key]&&(Ee.value=(fe=p.cloneDeep(q))==null?void 0:fe[Ee==null?void 0:Ee.key]),Ee})),G});const K=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((R=K==null?void 0:K.data)==null?void 0:R.type)==="success"&&((se=(X=K==null?void 0:K.data)==null?void 0:X.result)==null||se.forEach(G=>{var _e,de;((de=(_e=G==null?void 0:G.value)==null?void 0:_e.pageData)==null?void 0:de.name)===(me==null?void 0:me[0])&&(ae=G.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:ve}}))}}},ee=async q=>{var M,me,ke,Me,Ve,Ye,qe,lt,Q,tt,nt,ze,ce,oe,re,Te;_.setImportLoading(!0);try{if(q.api){let Xe=new WeakMap;(me=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:M.filter(R=>{var X,se;return((X=R==null?void 0:R.key)==null?void 0:X.pageKey)!=="menu"&&((se=R==null?void 0:R.key)==null?void 0:se.pageKey)!=="secret"}))==null||me.forEach(R=>{Xe[R.key.pageKey]?Xe[R.key.pageKey]=[...Xe[R.key.pageKey],R]:Xe[R.key.pageKey]=[R]});let m=await Re.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(m=m==null?void 0:m.map(R=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne;if((R==null?void 0:R.comp)==="Form")R.compData=(X=R.compData)==null?void 0:X.map(Be=>{var Je;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(Je=Be.contents)==null?void 0:Je.map(Oe=>{var Ne;if((Oe==null?void 0:Oe.value)===""&&(Oe==null?void 0:Oe.type)==="Select"){let ge=Re.judgeContents((Ne=p.cloneDeep(Oe))==null?void 0:Ne.optionUrl,Xe);Oe.value=Oe.value||ge}return Oe})),Be});else if((R==null?void 0:R.comp)==="Table"&&(se=R.compData)!=null&&se.find(Be=>(Be==null?void 0:Be.key)==="pageColumn")){let Be=(K=(ve=R.compData)==null?void 0:ve.find(ge=>(ge==null?void 0:ge.key)==="pageColumn"))==null?void 0:K.contents,Je=((G=(ae=R.compData)==null?void 0:ae.find(ge=>(ge==null?void 0:ge.key)==="pageGroup"))==null?void 0:G.contents)??"",Oe=(Ee=(de=(_e=Be==null?void 0:Be.split("["))==null?void 0:_e[1])==null?void 0:de.split("]"))==null?void 0:Ee[0];C=((L=Be==null?void 0:Be.split("["))==null?void 0:L[0])+((ne=(fe=H.value)==null?void 0:fe.find(ge=>(ge==null?void 0:ge.key)===Oe))==null?void 0:ne.value)}return R}),!(C===""||C==="")){const R=await Re.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);m=m==null?void 0:m.map(X=>{var se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je;if((X==null?void 0:X.comp)==="Table"&&(se=X.compData)!=null&&se.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn")){let Oe=(K=(ve=X.compData)==null?void 0:ve.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:K.contents,Ne=((G=(ae=X.compData)==null?void 0:ae.find(be=>(be==null?void 0:be.key)==="pageGroup"))==null?void 0:G.contents)??"",ge=(Ee=(de=(_e=Oe==null?void 0:Oe.split("["))==null?void 0:_e[1])==null?void 0:de.split("]"))==null?void 0:Ee[0],ct=((L=Oe==null?void 0:Oe.split("["))==null?void 0:L[0])+((ne=(fe=H.value)==null?void 0:fe.find(be=>(be==null?void 0:be.key)===ge))==null?void 0:ne.value),Ke=(Be=R==null?void 0:R.find(be=>(be==null?void 0:be.name)===(Ne===""?c==null?void 0:c.compName:Ne)))==null?void 0:Be.compData;X.compData=(Je=X.compData)==null?void 0:Je.map(be=>{var De;return(be==null?void 0:be.key)==="tableContents"&&(be.contents=(De=Ke==null?void 0:Ke.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:De.contents),be})}return X})}let W={};if(((Me=(ke=q==null?void 0:q.extraValues)==null?void 0:ke.input)==null?void 0:Me.length)>0){const R=(Ye=(Ve=q==null?void 0:q.extraValues)==null?void 0:Ve.input)==null?void 0:Ye.map(async X=>{var se;he!=null&&he.find(ve=>ve===X)?W=await Ie(X,m):W[Object.keys(X)[0]]=await Ie((se=Object.values(X))==null?void 0:se[0],m,Xe)});await Promise.all(R)}else W=await Ie("/",m);let Y=!1;(lt=(qe=q==null?void 0:q.extraValues)==null?void 0:qe.output)==null||lt.forEach(R=>{var X,se;(se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc")&&(Y=!0)});let v;if(Y){const R=Tt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(q.api,W,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{R.close()})}else v=await p.axios.post(q.api,W,{headers:{"Content-Type":"application/json"}});let F=(ze=(nt=(tt=(Q=p.cloneDeep(q))==null?void 0:Q.extraValues)==null?void 0:tt.output)==null?void 0:nt.map(R=>{var X,se,ve,K,ae,G,_e,de,Ee,L,fe,ne,Be,Je,Oe,Ne;if(!((se=(X=Object.values(R))==null?void 0:X[0])!=null&&se.includes(".doc"))){let ge=(L=(Ee=(de=(K=p.cloneDeep((ve=Object.values(R))==null?void 0:ve[0]))==null?void 0:K.split("["))==null?void 0:de[((_e=(G=p.cloneDeep((ae=Object.values(R))==null?void 0:ae[0]))==null?void 0:G.split("["))==null?void 0:_e.length)-1])==null?void 0:Ee.split("]"))==null?void 0:L[0],ct=ge==null?void 0:ge.split(":"),Ke=(Be=p.cloneDeep((fe=Object.values(R))==null?void 0:fe[0]))==null?void 0:Be.substring(0,p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]).lastIndexOf("["));if(Ke=(Oe=p.cloneDeep(Ke))==null?void 0:Oe.slice(0,((Je=p.cloneDeep(Ke))==null?void 0:Je.length)-1),Ke!=null&&Ke.includes("[")){let be="";if((Ne=Ea(Ke,"/"))==null||Ne.forEach(De=>{var Qe,pe,Ae,Le,We,O,Ce;if(!(De!=null&&De.includes("[")))be=be===""?be+De.replaceAll("/",""):be+"/"+De.replaceAll("/","");else{let ut=p.cloneDeep(De).slice(1,((Qe=p.cloneDeep(De))==null?void 0:Qe.length)-1),et=(O=(We=(Le=(Ae=(pe=p.cloneDeep(ut))==null?void 0:pe.split("["))==null?void 0:Ae[1])==null?void 0:Le.split("]"))==null?void 0:We[0])==null?void 0:O.split(":"),ft="",rt=(Ce=m==null?void 0:m.find(Se=>(Se==null?void 0:Se.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Se=>{var Ze;(Se==null?void 0:Se.key)==="formContent"&&((Ze=Se==null?void 0:Se.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),be=be===""?be+ft.replaceAll("/",""):be+"/"+ft.replaceAll("/","")}}),Ke=be,Ke[(Ke==null?void 0:Ke.length)-1]!=="/")return Ke}}}))==null?void 0:ze.filter(R=>R);F=[...new Set(p.cloneDeep(F))];let Z=F==null?void 0:F.map(async R=>{let X=await Re.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((X==null?void 0:X.length)===0)return await Re.getParentContents(R)});await Promise.all(Z);let P=[],ue=(re=(oe=(ce=p.cloneDeep(q))==null?void 0:ce.extraValues)==null?void 0:oe.output)==null?void 0:re.map(async R=>{var de,Ee,L,fe,ne,Be,Je,Oe,Ne,ge,ct,Ke,be,De,Qe,pe,Ae,Le,We,O,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,It,Bt,xt,wt,Ot,At,Ut,Lt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn,bt,Jt,gt,Qn,Mt,yn,Nn,on,Vn,Zt,Kn;if((Ee=(de=Object.values(R))==null?void 0:de[0])!=null&&Ee.includes(".doc")){var X=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),se=v.headers["content-disposition"],ve=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),K=ve.exec(se),ae=K==null?void 0:K[1],G=document.createElement("a"),_e=window.URL.createObjectURL(X);x.value=[{name:ae,blobUrl:_e}],d.value=!0}else{let bn=(ge=(Ne=(Oe=(fe=p.cloneDeep((L=Object.values(R))==null?void 0:L[0]))==null?void 0:fe.split("["))==null?void 0:Oe[((Je=(Be=p.cloneDeep((ne=Object.values(R))==null?void 0:ne[0]))==null?void 0:Be.split("["))==null?void 0:Je.length)-1])==null?void 0:Ne.split("]"))==null?void 0:ge[0],zt=bn==null?void 0:bn.split(":"),Gt=(be=p.cloneDeep((ct=Object.values(R))==null?void 0:ct[0]))==null?void 0:be.substring(0,p.cloneDeep((Ke=Object.values(R))==null?void 0:Ke[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(Qe=p.cloneDeep(Gt))==null?void 0:Qe.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=w.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let Dt="";(pe=Ea(Gt,"/"))==null||pe.forEach((Nt,Wt)=>{var Ht,$t,cn,rn,Un,Zn,Wn,ea,Na,ca,ya;if(!(Nt!=null&&Nt.includes("[")))Dt=Dt===""?Dt+Nt.replaceAll("/",""):Dt+"/"+Nt.replaceAll("/","");else{let ua="",kn="";(Ht=p.cloneDeep(Nt))!=null&&Ht.includes("]")?(ua=p.cloneDeep(Nt).slice(1,(($t=p.cloneDeep(Nt))==null?void 0:$t.length)-1),kn=(Wn=(Zn=(Un=(rn=(cn=p.cloneDeep(ua))==null?void 0:cn.split("["))==null?void 0:rn[1])==null?void 0:Un.split("]"))==null?void 0:Zn[0])==null?void 0:Wn.split(":")):(ua=p.cloneDeep(Nt).slice(1,(ea=p.cloneDeep(Nt))==null?void 0:ea.length),kn=(Na=p.cloneDeep(ua))==null?void 0:Na.split("/"));let ta="",pa=(ca=m==null?void 0:m.find(sn=>(sn==null?void 0:sn.name)===(kn==null?void 0:kn[0])))==null?void 0:ca.compData;pa==null||pa.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Hn=>{(Hn==null?void 0:Hn.key)===(kn==null?void 0:kn[1])&&(ta=Hn==null?void 0:Hn.value)}))}),((ya=Ea(Gt,"/"))==null?void 0:ya.length)-1!==Wt?Dt=Dt===""?Dt+ta.replaceAll("/",""):Dt+"/"+ta.replaceAll("/",""):Dt=Dt+l.value+ta.replaceAll("/","")}}),(Ae=w.value)!=null&&Ae.includes(Dt)?Gt=w.value:Gt=Dt}let ln=p.cloneDeep((Le=Object.keys(R))==null?void 0:Le[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((O=v==null?void 0:v.data)==null?void 0:O.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[ln]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[ln])&&(zt==null?void 0:zt.length)===1)return await te(((Se=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Se[ln])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[ln]),p.cloneDeep(Gt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[ln]||(Bt=(It=v==null?void 0:v.data)==null?void 0:It.result)!=null&&Bt[ln]){let Dt=await je(((wt=(xt=v==null?void 0:v.data)==null?void 0:xt.data)==null?void 0:wt[ln])||((At=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:At[ln]),p.cloneDeep(Gt),zt);return Dt&&(P=[...P,...Dt]),Dt}else{if(!((Ut=v==null?void 0:v.data)!=null&&Ut.data)){let Dt=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Dt=Dt==null?void 0:Dt.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(zt==null?void 0:zt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var cn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(cn=$t.contents)==null?void 0:cn.map(rn=>{var Un,Zn;return(rn==null?void 0:rn.key)===(zt==null?void 0:zt[1])&&(rn.value=(Zn=(Un=v==null?void 0:v.data)==null?void 0:Un.result)==null?void 0:Zn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let Nt=[];(Lt=Dt==null?void 0:Dt.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Lt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);Nt.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(Nt==null?void 0:Nt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Nt});return}if((zt==null?void 0:zt.length)===1){const Dt=(wn=(qt=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:qt.path)==null?void 0:wn.path;let Nt="";(Tn=(hn=(Sn=(Dn=(fn=Dt==null?void 0:Dt.split("("))==null?void 0:fn[1])==null?void 0:Dn.split(")"))==null?void 0:Sn[0])==null?void 0:hn.split(":"))==null||Tn.forEach($t=>{var cn,rn;Nt=Nt===""?Nt+((cn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:cn.trim()):Nt+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Yn=(Xn=(gn=(In=(vn=Dt==null?void 0:Dt.split("<"))==null?void 0:vn[1])==null?void 0:In.split(">"))==null?void 0:gn[0])==null?void 0:Xn.replaceAll("'",""))==null?void 0:Yn.trim()],Ht;return(Bn=(jn=(Jn=v==null?void 0:v.data)==null?void 0:Jn.data)==null?void 0:jn.data)!=null&&Bn[zt==null?void 0:zt[0]]?Ht=await te((An=(zn=(mn=v==null?void 0:v.data)==null?void 0:mn.data)==null?void 0:zn.data)==null?void 0:An[zt==null?void 0:zt[0]],Nt,zt,C):Ht=await we((Cn=(an=v==null?void 0:v.data)==null?void 0:an.data)==null?void 0:Cn.data,Nt,Wt,Xe),Ht}else{const Dt=(gt=(Jt=(bt=v==null?void 0:v.data)==null?void 0:bt.data)==null?void 0:Jt.path)==null?void 0:gt.path;let Nt="";return(on=(Nn=(yn=(Mt=(Qn=Dt==null?void 0:Dt.split("("))==null?void 0:Qn[1])==null?void 0:Mt.split(")"))==null?void 0:yn[0])==null?void 0:Nn.split(":"))==null||on.forEach(Ht=>{var $t,cn;Nt=Nt===""?Nt+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):Nt+"/"+((cn=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:cn.trim())}),await je((Kn=(Zt=(Vn=v==null?void 0:v.data)==null?void 0:Vn.data)==null?void 0:Zt.data)==null?void 0:Kn[zt==null?void 0:zt[0]],Nt,zt)}}}}});if(await Promise.all(ue),(P==null?void 0:P.length)>0){let R=[];P==null||P.forEach(ve=>{R!=null&&R.find(K=>{var ae,G,_e,de;return((G=(ae=K==null?void 0:K.value)==null?void 0:ae.pageData)==null?void 0:G.name)===((de=(_e=ve==null?void 0:ve.value)==null?void 0:_e.pageData)==null?void 0:de.name)})||R.push(ve)});let X=[];R==null||R.forEach(ve=>{var G,_e,de,Ee;let K=p.cloneDeep(ve);K.value.pageData.compData=(G=K.value.pageData.compData)==null?void 0:G.map(L=>{var fe;return(L==null?void 0:L.key)==="formContent"&&(L.contents=(fe=L.contents)==null?void 0:fe.map(ne=>{var Je,Oe,Ne,ge;let Be=(Je=p.cloneDeep(P))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ne==null?void 0:ne.key));if(Be){let ct=(ge=(Ne=(Oe=Be.value.pageData.compData)==null?void 0:Oe.find(Ke=>(Ke==null?void 0:Ke.key)==="formContent"))==null?void 0:Ne.contents)==null?void 0:ge.find(Ke=>(Ke==null?void 0:Ke.key)===(ne==null?void 0:ne.key));ne.value=ct==null?void 0:ct.value}return ne})),L}),X.push({id:K==null?void 0:K.id,value:K==null?void 0:K.value});let ae=[];(Ee=(de=(_e=K==null?void 0:K.value)==null?void 0:_e.pageData)==null?void 0:de.compData)==null||Ee.forEach(L=>{var fe;(L==null?void 0:L.key)==="formContent"&&((fe=L==null?void 0:L.contents)==null||fe.forEach(ne=>{var Be,Je,Oe,Ne,ge,ct;if((Je=(Be=ne==null?void 0:ne.optionUrl)==null?void 0:Be.menuSelect)!=null&&Je.find(Ke=>Ke==null?void 0:Ke.includes("[")))if(ae!=null&&ae.find(Ke=>{var be,De,Qe;return((be=Ke==null?void 0:Ke.key)==null?void 0:be.join(","))===((Qe=(De=ne==null?void 0:ne.optionUrl)==null?void 0:De.menuSelect)==null?void 0:Qe.join(","))})){let Ke=(Oe=ae==null?void 0:ae.find(be=>{var De,Qe,pe;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))}))==null?void 0:Oe.value;Ke.push({key:ne==null?void 0:ne.prop,groups:(Ne=ne==null?void 0:ne.optionUrl)==null?void 0:Ne.groupSelect,value:ne==null?void 0:ne.value}),ae=ae==null?void 0:ae.map(be=>{var De,Qe,pe;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((pe=(Qe=ne==null?void 0:ne.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:pe.join(","))&&(be.value=Ke),be})}else ae.push({key:(ge=ne==null?void 0:ne.optionUrl)==null?void 0:ge.menuSelect,value:[{key:ne==null?void 0:ne.prop,groups:(ct=ne==null?void 0:ne.optionUrl)==null?void 0:ct.groupSelect,value:ne==null?void 0:ne.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(L=>{var ne;let fe="";return(ne=L==null?void 0:L.key)==null||ne.forEach(Be=>{var Je;if(!(Be!=null&&Be.includes("[")))fe=fe===""?fe+Be:fe+"/"+Be;else{let Oe="",Ne=(Je=Be==null?void 0:Be.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");m==null||m.forEach(ge=>{var ct;(ge==null?void 0:ge.name)===(Ne==null?void 0:Ne[0])&&((ct=ge==null?void 0:ge.compData)==null||ct.forEach(Ke=>{var be;(Ke==null?void 0:Ke.key)==="formContent"&&((be=Ke==null?void 0:Ke.contents)==null||be.forEach(De=>{(De==null?void 0:De.prop)===(Ne==null?void 0:Ne[1])&&(Oe=De==null?void 0:De.value)}))}))}),fe=fe+l.value+Oe}}),L.key=fe,L})),ae==null||ae.forEach(L=>{var Je,Oe,Ne;let fe=(Je=Xe[L.key])==null?void 0:Je.find(ge=>{var ct,Ke,be,De,Qe,pe,Ae;return((Ke=(ct=ge==null?void 0:ge.value)==null?void 0:ct.pageData)==null?void 0:Ke.name)===((Qe=(De=(be=L==null?void 0:L.value)==null?void 0:be[0])==null?void 0:De.groups)==null?void 0:Qe[0])&&((Ae=(pe=ge==null?void 0:ge.value)==null?void 0:pe.pageData)==null?void 0:Ae.name)!==void 0}),ne=fe==null?void 0:fe.id,Be=(Oe=fe==null?void 0:fe.value)==null?void 0:Oe.pageData;Be.compData=(Ne=Be.compData)==null?void 0:Ne.map(ge=>{var ct;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(ct=ge.contents)==null?void 0:ct.map(Ke=>{var De;let be=(De=L.value)==null?void 0:De.find(Qe=>(Qe==null?void 0:Qe.key)===(Ke==null?void 0:Ke.prop));return be&&(Ke.value=be.value),Ke})),ge}),X.push({id:ne,value:{pageData:Be}})})});let se=(Te=p.cloneDeep(P))==null?void 0:Te[0];(X==null?void 0:X.length)>0&&await p.batchUpdateInsofDataApi({dataList:X})}D.setFreshContent(!0)}_.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}T.value=!0},he=["createInsofDataApi"],Ue=ko(async q=>{ee(q)},100),st=async q=>{var qe,lt,Q,tt,nt;const M=p.cloneDeep(q);let me,ke=new WeakMap,Me=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(lt=(qe=Me.data.result)==null?void 0:qe.filter(ze=>{var ce,oe;return((ce=ze==null?void 0:ze.key)==null?void 0:ce.pageKey)!=="menu"&&((oe=ze==null?void 0:ze.key)==null?void 0:oe.pageKey)!=="secret"}))==null||lt.forEach(ze=>{ke[ze.key.pageKey]?ke[ze.key.pageKey]=[...ke[ze.key.pageKey],ze]:ke[ze.key.pageKey]=[ze]}),q!=null&&q[0].path&&(me=await(M==null?void 0:M.map(async(ze,ce)=>{var W,Y,v,F,Z,P,ue,R,X,se,ve,K,ae,G,_e,de;const re=(W=ke[ze==null?void 0:ze.path])==null?void 0:W.filter(Ee=>{var L;return((L=Ee==null?void 0:Ee.key)==null?void 0:L.type)==="data"});let Te="";const Xe=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke);re==null||re.forEach(Ee=>{var L,fe,ne,Be,Je;((fe=(L=Ee==null?void 0:Ee.value)==null?void 0:L.tableData)==null?void 0:fe.算法名称)===((ne=M==null?void 0:M[ce])==null?void 0:ne.method)&&(Te=(Je=(Be=Ee==null?void 0:Ee.value)==null?void 0:Be.tableData)==null?void 0:Je.算法体)});const dt=await Re.getItemData(ze==null?void 0:ze.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke);let m="",C=(Z=(F=(v=(Y=dt==null?void 0:dt[0])==null?void 0:Y.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:F.contents)==null?void 0:Z.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(ue=(P=dt==null?void 0:dt[0])==null?void 0:P.compData)==null||ue.forEach(Ee=>{var L;(Ee==null?void 0:Ee.key)==="tableContents"&&((L=Ee==null?void 0:Ee.contents)==null||L.forEach(fe=>{fe!=null&&fe.find(ne=>ne===(ze==null?void 0:ze.method))&&(m=fe[C])}))}),{buttonName:((R=M==null?void 0:M[ce])==null?void 0:R.method)||((ve=(se=(X=re==null?void 0:re[0])==null?void 0:X.value)==null?void 0:se.tableData)==null?void 0:ve.算法名称),api:(Te===""?(G=(ae=(K=re==null?void 0:re[0])==null?void 0:K.value)==null?void 0:ae.tableData)==null?void 0:G.算法体:Te)||m,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(_e=p.cloneDeep(ze.value))==null?void 0:_e.slice(1),methodName:(ze==null?void 0:ze.path)??"",extraValues:(de=M==null?void 0:M[ce])==null?void 0:de.data}})));const Ve=M==null?void 0:M.map(async ze=>{var dt,m,C,W,Y,v;const ce=(dt=Me.data.result)==null?void 0:dt.filter(F=>{var Z,P,ue;return((Z=F==null?void 0:F.key)==null?void 0:Z.parentTable)===""&&((P=F==null?void 0:F.key)==null?void 0:P.type)==="method"&&((ue=F==null?void 0:F.key)==null?void 0:ue.methodName)===F.method}),oe=ce==null?void 0:ce[0],re=(m=Me.data.result)==null?void 0:m.filter(F=>{var Z,P;return((Z=F==null?void 0:F.key)==null?void 0:Z.type)==="methodData"&&((P=F==null?void 0:F.key)==null?void 0:P.tableId)===(oe==null?void 0:oe.id)}),Te=await Re.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ke),Xe=re==null?void 0:re[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(Y=(W=Xe==null?void 0:Xe.value)==null?void 0:W.tableData)==null?void 0:Y[0],content:Te==null?void 0:Te.filter(F=>F.comp!=="methodButton"),extraContent:(v=p.cloneDeep(ze.value))==null?void 0:v.slice(1),methodName:(ze==null?void 0:ze.method)??""}}),Ye=(Q=q==null?void 0:q[0])!=null&&Q.path&&((tt=q==null?void 0:q[0])==null?void 0:tt.path)!==""?await Promise.all(me):await Promise.all(Ve);i.value=Ye==null?void 0:Ye.filter(ze=>ze==null?void 0:ze.extraContent),(nt=i.value)==null||nt.forEach(ze=>{var ce;ze.api===""&&((ce=ze.content)==null||ce.forEach(oe=>{var re;oe.comp=="Table"&&D.setExtraContents(Re.methodTableToContent(oe.compData,(re=ze.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!T.value&&await st(p.cloneDeep(c.itemData)),T.value=!1},{immediate:!0,deep:!0}),(q,M)=>{var me,ke,Me;return e.unref(V)!=="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(Ve=>(Ve==null?void 0:Ve.buttonName)!=="保存"),Ve=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Ve.api!==""?(e.openBlock(),e.createBlock(e.unref(Yt._sfc_main),{key:0,disabled:e.unref(j)===e.unref(w)&&!((Ye=Ve==null?void 0:Ve.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Ve.buttonName,onClickTrigger:qe=>e.unref(Ue)(Ve),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ye)!==""&&((Me=e.unref(w))==null?void 0:Me[((ke=e.unref(w))==null?void 0:ke.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Yt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:le,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Tt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Fe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},_c=Rt._export_sfc(Ec,[["__scopeId","data-v-11fca7e0"]]),Sc={};function Tc(a,i){return" 567 "}const Ic=Rt._export_sfc(Sc,[["render",Tc]]),Bc={class:"module content"},Ac={class:"module data"},Nc={class:"module layout"},Vc={class:"form-content"},Oc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=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}]),h=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:""}]),D=e.ref({}),E=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),N=H=>{var j;D.value=p.cloneDeep(H),l("change",(j=_())==null?void 0:j.compData)},$=H=>{var j,ie;if((H==null?void 0:H.buttonName)==="确认"){const w=p.cloneDeep(H==null?void 0:H.content);switch(d.value){case"create":E.value.push({...w,index:((j=E.value)==null?void 0:j.length)+1});break}l("change",(ie=_())==null?void 0:ie.compData),c.visible=!1}else c.visible=!1},V=(H,j)=>{var ie,w;switch(H){case"create":(ie=h.value)==null||ie.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=j[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(j,1),d.value="delete";break}},ye=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,H=>{var j,ie;H&&(D.value=((j=H==null?void 0:H.find(w=>w.key==="signConfig"))==null?void 0:j.contents)??{},E.value=((ie=H==null?void 0:H.find(w=>w.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(H,j)=>{const ie=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(Tt.ssForm,{rowContents:g.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ye,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Vc,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:$},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Mc=Rt._export_sfc(Oc,[["__scopeId","data-v-487e0536"]]),zc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var _,N;return(_=s==null?void 0:s.stepConfig)!=null&&_.allowTrigger?c.value:(N=s==null?void 0:s.stepConfig)==null?void 0:N.active}),x=(_,N)=>{c.value=N,l("clickStep",_,N)},g=_=>Tt.getComponent(_),h=()=>{var N;const _=(N=s==null?void 0:s.stepList)==null?void 0:N.find(($,V)=>V+1===d.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},D=_=>{l("clickTrigger",_)},E=_=>{l("changeTrigger",_)};return(_,N)=>{var ye,H,j,ie,w;const $=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ye=a.stepConfig)==null?void 0:ye.direction,active:d.value,"finish-status":"success",simple:(H=a.stepConfig)==null?void 0:H.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock($,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=a.stepConfig)!=null&&ie.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(_.$slots,(A,T)=>({name:T,fn:e.withCtx(le=>[e.renderSlot(_.$slots,T,e.mergeProps({ref_for:!0},le||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Pc=Rt._export_sfc(zc,[["__scopeId","data-v-d7c99969"]]),Rc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),x=(g,h)=>{l("clickStep",g,h)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var h,D;d.value=(h=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=g==null?void 0:g.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Pc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Lc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Fc=Rt._export_sfc(Lc,[["__scopeId","data-v-4172a886"]]),$c={class:"line-content"},jc={class:"line-time"},Kc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:d.contents,s.value=(x=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Fc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:g})=>[e.createElementVNode("span",$c,e.toDisplayString(x),1),e.createElementVNode("span",jc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Rt._export_sfc(Kc,[["__scopeId","data-v-b4d9deed"]]),Wc={class:"tabs-content"},Hc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Wc,[e.createVNode(Tt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},qc=Rt._export_sfc(Hc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Gc={class:"type-select"},Xc=["onClick"],Yc={class:"list-icon"},Jc={__name:"modelSelect",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(lr),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(g)},[e.createElementVNode("div",Yc,[e.createVNode(x,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Xc)]))),128))])}}},Qc=Rt._export_sfc(Jc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},eu={class:"operate-content"},tu={class:"collapse-title-content"},nu={class:"collapse-title-item"},au={key:1},ou=["onClick"],lu={class:"icon-content"},ru={key:0,class:"edit-content"},iu=["onClick"],su={class:"comp-child"},cu={__name:"modelFill",setup(a){const i=lo(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),g=$=>{var ye;let V=(ye=p.cloneDeep(x.value))==null?void 0:ye.map((H,j)=>($===j&&(H.content=!0),H));x.value=V},h=$=>{var ye;let V=(ye=p.cloneDeep(x.value))==null?void 0:ye.map((H,j)=>($===j&&(H.content=!1),H));x.value=V,c.value=p.cloneDeep(s.value)},D=($,V)=>{var ie;let ye=(ie=p.cloneDeep(x.value))==null?void 0:ie.map((w,z)=>($===z&&(w.content=!1),w));x.value=ye;const H=p.cloneDeep(s.value),j=H==null?void 0:H.filter((w,z)=>(z===$&&(w.name=V),w));i.setOriginalData(j),i.setItemData(j)};e.watch(()=>s.value,()=>{var $,V,ye;!s.value||(($=s.value)==null?void 0:$.length)===0?c.value=[]:c.value=(V=p.cloneDeep(s.value))==null?void 0:V.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),d.value=c.value,x.value=(ye=p.cloneDeep(d.value))==null?void 0:ye.map((H,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const E=$=>ma($),_=($,V,ye)=>{var j,ie;if(!$)return;let H=p.cloneDeep(s.value);H=(j=H==null?void 0:H.map((w,z)=>(z===ye&&(w.compData=$),w)))==null?void 0:j.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(ie=p.cloneDeep(H))==null?void 0:ie.map((w,z)=>({id:z,content:!1})),i.setOriginalData(H),i.setItemData(H)},N=$=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(s.value),ye=V==null?void 0:V.filter((H,j)=>j!==$);i.setOriginalData(ye),i.setItemData(ye),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return($,V)=>{const ye=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",eu,[e.createVNode(kl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:H,index:j})=>{var ie,w,z,k,A,T,le,Fe,ot,Ie;return[e.createElementVNode("div",tu,[e.createElementVNode("div",nu,[(w=(ie=x.value)==null?void 0:ie.find(je=>je.id===j))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:H.name&&H.name!==""?"8px":"0px"})},e.toDisplayString(H.name),5)),(k=(z=x.value)==null?void 0:z.find(je=>je.id===j))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Tt._sfc_main$2,{modelValue:H.name,"onUpdate:modelValue":je=>H.name=je,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(T=(A=x.value)==null?void 0:A.find(je=>je.id===j))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(je=>g(j),["stop"]),class:"icon-content"},[e.createVNode(ye,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ou))]),e.createElementVNode("div",lu,[(Fe=(le=x.value)==null?void 0:le.find(je=>je.id===j))!=null&&Fe.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(ye,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(je=>h(j),["stop"])},null,8,["onClick"]),e.createVNode(ye,{name:"Save",onClick:e.withModifiers(je=>D(j,H.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ie=(ot=x.value)==null?void 0:ot.find(je=>je.id===j))!=null&&Ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(je=>N(j),["stop"]),class:"icon-content"},[e.createVNode(ye,{name:"Delete",style:{width:"16px",height:"16px"}})],8,iu))])])]}),content:e.withCtx(({item:H,index:j})=>{var ie,w;return[e.createElementVNode("div",su,[e.createTextVNode(e.toDisplayString(E(H.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(H.comp+"Operate")),{itemContents:H==null?void 0:H.compData,originalItemContents:(w=(ie=d.value)==null?void 0:ie.find((z,k)=>k===j))==null?void 0:w.compData,onChange:z=>_(z,H,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},uu=Rt._export_sfc(cu,[["__scopeId","data-v-a46a44b9"]]),pu={key:0,class:"show-content"},du={style:{display:"flex"}},fu={__name:"modelShow",setup(a){const i=lo(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>ma(d);return(d,x)=>{var g;return((g=l.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",pu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",du,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},hu=Rt._export_sfc(fu,[["__scopeId","data-v-3f3e863e"]]),vu={class:"tabs-header"},gu={class:"tabs-list"},mu={class:"tab-name"},yu={class:"tab-actions"},bu=["onClick"],ku=["onClick"],xu=["onClick"],wu={class:"model-operate"},Du={class:"model-select",style:{display:"unset"}},Cu={class:"existing-components"},Eu={class:"component-list"},_u=["onClick"],Su={class:"component-info"},Tu={class:"component-type"},Iu={class:"component-name"},Bu={class:"model-fill"},Au={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),x=e.ref(""),g=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),_=e.ref(new WeakMap),N=e.ref(null),$=lo(p.pinia),{itemData:V}=p.storeToRefs($),ye=()=>{x.value="新增标签页",g.value.title="",h.value=-1,d.value=!0},H=q=>{x.value="修改标签页",g.value.title=c.value[q].title,h.value=q,d.value=!0},j=q=>{const M=z(q);_.value.delete(M),c.value.splice(q,1),st()},ie=()=>{if(g.value.title.trim()){if(h.value===-1){const q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};c.value.push(q)}else c.value[h.value].title=g.value.title,c.value[h.value].value=g.value.title,c.value[h.value].label=g.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=q=>{const M=c.value[q];return M.id||(M.id=w()),M.id},k=q=>{var ke;E.value=q;const M=z(q);N.value=p.cloneDeep(V.value);let me=_.value.get(M);!me&&((ke=c.value[q].children)==null?void 0:ke.length)>0&&(me=Fe(c.value[q].children)),me?$.setItemData(p.cloneDeep(me)):$.setItemData([]),D.value=!0},A=e.computed(()=>{const q=jt.useModelComp(p.pinia),M=p.storeToRefs(q).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(me=>{var ke;if(me.comp==="Tabs"&&E.value>=0){const Me=z(E.value);if((ke=me.compData)==null?void 0:ke.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===Me))}))return!1}return!0})}),T=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,le=q=>{var M;try{const me=p.cloneDeep(q);me.id=Date.now()+Math.random(),me.comp==="Tabs"&&((M=me.compData)==null||M.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Ve=>{Ve.id=w()})}));const ke=p.cloneDeep(V.value);ke.push(me),$.setItemData(ke)}catch(me){console.error("添加组件失败:",me)}},Fe=q=>q.map(M=>{var me;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:ot(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ie(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((me=M.content)==null?void 0:me.originalData)||[]}}}),ot=q=>{if(!q)return[];const M=[];return q.rowContents&&M.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&M.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:q.isEnableWrap}),M},Ie=q=>[],je=()=>{if(E.value>=0&&E.value<c.value.length){const q=z(E.value);_.value.set(q,p.cloneDeep(V.value)),c.value[E.value].children=te(V.value),console.log("保存后的数据",te(V.value))}D.value=!1,E.value=-1,N.value=null,st()},we=()=>{N.value&&$.setItemData(p.cloneDeep(N.value)),D.value=!1,E.value=-1,N.value=null},I=()=>{D.value&&we()},te=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((M,me)=>{if(!M||typeof M!="object")return M;const{comp:ke,name:Me,compData:Ve}=M;switch(ke){case"Form":return{type:"form",content:ee(Ve||[]),value:"表单"};case"Table":return{type:"table",content:he(Ve||[]),value:"表格"};default:return{type:"xxx",content:Ue(Ve||[]),value:""}}})},ee=q=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},me={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((ke,Me)=>{if(!ke||typeof ke!="object"){console.warn(`Invalid config at index ${Me}:`,ke);return}const{key:Ve,contents:Ye}=ke,qe=me[Ve];if(!qe){console.warn(`Unknown Form config key: ${Ve}`);return}Ve==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},he=q=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},me={header:"columns",tableContents:"tableData"};return q.forEach((ke,Me)=>{if(!ke||typeof ke!="object"){console.warn(`Invalid config at index ${Me}:`,ke);return}const{key:Ve,contents:Ye}=ke,qe=me[Ve];if(!qe){console.warn(`Unknown Table config key: ${Ve}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),st=()=>{const q=[{key:"stepList",contents:c.value}];l("change",q)};return e.watch(()=>s.itemContents,q=>{if(q&&q.length>0){const M=q.find(me=>me.key==="stepList");M&&M.contents&&(c.value=M.contents.map(me=>({title:me.title||"",value:me.value||me.title||"",label:me.label||me.title||"",children:me.children||[],id:me.id||w()})))}},{immediate:!0,deep:!0}),(q,M)=>{const me=e.resolveComponent("svg-icon"),ke=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Ve=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ye},[e.createVNode(me,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",mu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",yu,[e.createElementVNode("button",{onClick:lt=>H(qe)},"修改标题",8,bu),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ku),e.createElementVNode("button",{onClick:lt=>j(qe)},"删除",8,xu)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Ve,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ke,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>g.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:I},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:we},"取消"),e.createElementVNode("button",{onClick:je},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",wu,[e.createElementVNode("div",Du,[e.createVNode(Qc),e.createElementVNode("div",Cu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>le(Ye)},[e.createElementVNode("div",Su,[e.createElementVNode("span",Tu,e.toDisplayString(T(Ye.comp)),1),e.createElementVNode("span",Iu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,_u))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(hu)])),e.createElementVNode("div",Bu,[e.createVNode(uu)])])]),_:1},8,["modelValue"])])}}},Nu=Rt._export_sfc(Au,[["__scopeId","data-v-9096ed0d"]]);function Vu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function Ou(a){return{type:"line",...a}}function Mu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function zu(a){return{type:"bar",barWidth:"60%",...a}}function Pu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const $n={line:{initBaseoptions:Vu,initSeries:Ou},bar:{initBaseoptions:Mu,initSeries:zu},pie:{initBaseoptions:Pu,initSeries:Ru}},Fo=jt.useMenuState(p.pinia),Al=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:x}=i||{},g=a==null?void 0:a.find(_=>{const{name:N}=_;return N===c});if(!g)return{names:s,values:l};const h=(E=g==null?void 0:g.compData)==null?void 0:E.find(_=>{const{key:N}=_;return N==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(_=>{const N=_==null?void 0:_[0];let $=!1;p.isObject(N)&&(N!=null&&N.id)&&($=!0);let V=d,ye=x;$&&(V=V+1,ye=ye+1);const H=_==null?void 0:_[V],j=_==null?void 0:_[ye];s.push(H),l.push(j)}),{names:s,values:l}},Lu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let g=null;const h=sessionStorage.getItem("systemKey");if(x&&Fo.activeMenuPath&&(g=await Re.getItemData(`${Fo.activeMenuPath}`,h,"")),!x){const D=i==null?void 0:i.join("/");g=await Re.getItemData(`${D}^${s}`,h,"")}return Al(g,{group:l,nameCol:c,valueCol:d})},Fu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),x=sessionStorage.getItem("systemKey"),g=await Re.getItemData(d,x,"");return Al(g,{group:s,nameCol:l,valueCol:c})},xo=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return s;const{mainKey:g,group:h,nameCol:D,valueCol:E,isSelfDetail:_}=i||{};return g&&h&&Tt.isNumber(D)&&Tt.isNumber(E)?await Lu({menu:l,mainKey:g,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:_}):Tt.isNumber(d)&&Tt.isNumber(x)?await Fu({menu:l,group:c,nameCol:d,valueCol:x}):s},$u=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},ju=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;h.xAxis.data=D;const _=g({data:E});return h.series.push(_),h},Ku=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:g}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await xo(i,s);if(!D||!E)return h;const _=[];for(let $=0;$<D.length;$++){const V=D[$],ye=E[$];_.push({name:V,value:ye})}const N=g({data:_});return h.series.push(N),h},Uu=async(a=[])=>{var x,g,h;const i=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((g=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:g.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await $u({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await ju({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Ku({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},Wu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await Uu(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Hu=Rt._export_sfc(Wu,[["__scopeId","data-v-d4c081e8"]]),qu={class:"chart-module layout"},Gu={class:"chart-module content"},Xu={class:"chart-module content"},Yu={class:"form-content"},Ju={class:"dialog-footer"},Qu={class:"form-content"},Zu={class:"dialog-footer"},ep={class:"form-content"},tp={class:"dialog-footer"},np=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{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({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(oe=>{var Te;const re=oe==null?void 0:oe.prop;oe.value=(Te=g==null?void 0:g.value)==null?void 0:Te[re]}),c.visible=!0},D=ce=>{g.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=nt())==null?void 0:ce.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),N=e.ref([]),$=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ye=()=>{const ce=N.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=V.value)==null?void 0:Xe[Te]}),oe},H=ce=>{var re;V.value=ce;const oe=ye();N.value=oe,l("change",(re=nt())==null?void 0:re.compData)},j=async()=>{const ce=await Re.getMenusContent(),oe=ye();oe==null||oe.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),N.value=oe,_.visible=!0,await Ye(V.value.menu),await Q(V.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{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:[]}],k=e.ref({}),A=()=>{const ce=w.value,oe=p.cloneDeep(ce);return oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Te]}),oe},T=ce=>{var re;k.value=ce;const oe=A();w.value=oe,l("change",(re=nt())==null?void 0:re.compData)},le=async()=>{await I();const ce=p.cloneDeep(Fe.value),oe=A();oe==null||oe.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Te],Te==="mainKey"&&(re.contents=ce)}),w.value=oe,ie.visible=!0},Fe=e.ref([]),ot=e.ref([]),Ie=e.ref({}),je=e.ref({}),we=()=>{const{compData:ce}=ke.value||{},oe=ce==null?void 0:ce.find(W=>{const{key:Y}=W;return Y==="header"}),re=(oe==null?void 0:oe.contents)||[],Te=re==null?void 0:re.filter((W,Y)=>{const{label:v}=W;return v!=="操作"}),Xe=Te==null?void 0:Te.findIndex((W,Y)=>{const{isMainKey:v}=W;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(W=>{const{key:Y}=W;return Y==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(W=>{const Y=W==null?void 0:W[0];let v=Xe;p.isObject(Y)&&(Y!=null&&Y.id)&&(v=v+1);const F=W==null?void 0:W[v];return{label:F,value:F}})},I=async()=>{const ce=await we();Fe.value=ce},te=async ce=>{const oe=sessionStorage.getItem("systemKey");return await Re.getItemData(ce,oe,"")},ee=async ce=>{const oe=ce;ot.value=oe==null?void 0:oe.map(re=>{const{name:Te}=re;return Ie.value[Te]=re,{label:Te,value:Te}})},he=ce=>{const{comp:oe,compData:re}=je.value||{};if(oe==="Table"){let Te=A();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),w.value=Te}},Ue=async()=>{var re,Te;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,oe=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(ce){const dt=`${oe==null?void 0:oe.join("/")}^${ce}`,m=await te(dt);await ee(m);const C=A();C==null||C.forEach(W=>{(W==null?void 0:W.prop)==="group"&&(W.contents=ot.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,oe)=>{ce!=oe&&ce&&await Ue()});const st=async ce=>{const oe=Ie.value[ce];je.value=oe,await he()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&ce&&st(ce)});const q=async()=>{var oe;await Ue();const ce=(oe=k.value)==null?void 0:oe.group;await st(ce)},M=e.ref([]),me=e.ref({}),ke=e.ref({}),Me=async ce=>{const oe=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await Re.getItemData(oe,re,"")},Ve=async ce=>{const oe=await Me(ce);M.value=oe==null?void 0:oe.map(re=>{const{name:Te}=re;return me.value[Te]=re,{label:Te,value:Te}})},Ye=async(ce,oe)=>{await Ve(ce);const re=ye();re==null||re.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=M.value)}),N.value=re};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.menu},async(ce,oe)=>{const re=ce==null?void 0:ce.join("/"),Te=oe==null?void 0:oe.join("/");re!=Te&&await Ye(ce)});const qe=(ce,oe)=>{const re=oe==null?void 0:oe.find(m=>{const{key:C}=m;return C==="header"}),Te=(re==null?void 0:re.contents)||[],Xe=Te==null?void 0:Te.filter((m,C)=>{const{label:W}=m;return W!=="操作"}),dt=Xe==null?void 0:Xe.map((m,C)=>{const{label:W}=m;return{label:W,value:C}});ce==null||ce.forEach(m=>{const C=m==null?void 0:m.prop;(C==="nameCol"||C==="valueCol")&&(m.contents=dt)})},lt=ce=>{const{comp:oe,compData:re}=ke.value||{};if(oe==="Table"){V.value.formItems=[];let Te=ye();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),N.value=Te}},Q=async ce=>{const oe=me.value[ce];ke.value=oe,await lt()};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.group},async(ce,oe)=>{ce!=oe&&Q(ce)});const tt=async()=>{var re,Te;const ce=(re=V.value)==null?void 0:re.menu;await Ye(ce);const oe=(Te=V.value)==null?void 0:Te.group;await Q(oe)},nt=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),ze=()=>{c.visible=!1,_.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var oe,re,Te;N.value=$(),w.value=z();const ce=s==null?void 0:s.itemContents;g.value=((oe=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},V.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Te=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await q()}),(ce,oe)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[0]||(oe[0]=Te=>h())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Gu,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[1]||(oe[1]=Te=>j())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:oe[2]||(oe[2]=Te=>le())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ze,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ju,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ze,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:ze,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:ze,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",ep,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",tp,[e.createVNode(re,{class:"cancel-button button",onClick:ze,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:ze,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ap=Rt._export_sfc(np,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},op=Ka.exports,$o;function lp(){return $o||($o=1,function(a,i){(function(s,l){l()})(op,function(){function s(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,_){var N=new XMLHttpRequest;N.open("GET",D),N.responseType="blob",N.onload=function(){h(N.response,E,_)},N.onerror=function(){console.error("could not download file")},N.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Re.commonjsGlobal=="object"&&Re.commonjsGlobal.global===Re.commonjsGlobal?Re.commonjsGlobal:void 0,g=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(D,E,_){var N=x.URL||x.webkitURL,$=document.createElement("a");E=E||D.name||"download",$.download=E,$.rel="noopener",typeof D=="string"?($.href=D,$.origin===location.origin?d($):c($.href)?l(D,E,_):d($,$.target="_blank")):($.href=N.createObjectURL(D),setTimeout(function(){N.revokeObjectURL($.href)},4e4),setTimeout(function(){d($)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,_){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,_),E);else if(c(D))l(D,E,_);else{var N=document.createElement("a");N.href=D,N.target="_blank",setTimeout(function(){d(N)})}}:function(D,E,_,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,_);var $=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ye=/CriOS\/[\d]+/.test(navigator.userAgent);if((ye||$&&V||g)&&typeof FileReader<"u"){var H=new FileReader;H.onloadend=function(){var w=H.result;w=ye?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=w:location=w,N=null},H.readAsDataURL(D)}else{var j=x.URL||x.webkitURL,ie=j.createObjectURL(D);N?N.location=ie:location.href=ie,N=null,setTimeout(function(){j.revokeObjectURL(ie)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}lp();const ia=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(ia),Ft=jt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:rp,itemGridData:oa,curStructureCompIds:jo,isSubmitCurStructure:ip,isRefreshCurStructure:sp,freshContent:Ko,routeToChildPath:cp,payloadTypes:up,pageMapState:Xa,itemExtendData:La}=p.storeToRefs(Ft),dn=jt.useMenuState(p.pinia),{activeTopMenuPath:pp,activeMenuPath:Pt,platform:nf,activeAsideMenu:dp,buttonTriggerType:fp}=p.storeToRefs(dn),xn=fa.useUnit(p.pinia),{selectTitle:Uo}=p.storeToRefs(xn),hp=Re.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(hp),Wo=jt.useAuthorityState(p.pinia),Ya=e.ref(!0),ga=e.ref(0),Ja=e.ref([]),Ia=e.computed(async()=>{var i,s;const a=(i=Pt.value)!=null&&i.startsWith("/")?(s=Pt.value)==null?void 0:s.substring(1):Pt.value;return(a==null?void 0:a.includes(ro.value))||await Cp(a)}),vp=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Pt.value!=="/平台管理/菜单管理")},gp=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},mp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Uo.value.length===1)Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value),xn.setSelectIndex(""),xn.setSelectMenu(""),xn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),l,!1,[],await Ia.value);let c=-1;(i=Uo.value)==null||i.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&s.push(d)}),xn.setSelectTitle(s),l!==""?xn.setSelectMenu(a==null?void 0:a.key):(xn.setSelectIndex(""),xn.setSelectMenu(""))}Et.value=Aa(Et.value),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value)},po=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const g=await x(d);if(((c=g==null?void 0:g.data)==null?void 0:c.code)===200)return g.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Ho=async(a,i,s,l)=>{var c,d,x,g,h,D,E,_,N,$,V;try{const ye=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:k}})),H=(g=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:g.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),j=JSON.parse(p.cloneDeep(JSON.stringify(a))),ie=(h=j==null?void 0:j.results)==null?void 0:h.map(k=>k.id);let w;s?w=(_=(E=(D=Xa.value)==null?void 0:D[Pt.value])==null?void 0:E.filter(k=>{var A,T,le;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i&&((le=(T=k==null?void 0:k.key)==null?void 0:T.relatedInfo)==null?void 0:le.target)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id):w=(V=($=(N=Xa.value)==null?void 0:N[Pt.value])==null?void 0:$.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===i}))==null?void 0:V.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(ie!=null&&ie.includes(k))&&typeof k=="number");(ye==null?void 0:ye.length)>0&&await p.batchAddInsofDataApi({dataList:ye}),(H==null?void 0:H.length)>0&&await p.batchUpdateInsofDataApi({dataList:H}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(ye){throw new Error(ye)}},yp=async a=>{var D,E,_,N,$,V,ye,H,j,ie;dn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(rp.value)));if(!ip.value)return dn.setCacheStructures({key:fp.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),l=s.filter(w=>{var z;return!((z=jo.value)!=null&&z.includes(w))}),c=(D=jo.value)==null?void 0:D.filter(w=>!s.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(po(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(po(x,"create",a)),g&&(g==null?void 0:g.length)>0&&h.push(po(g,"update",a)),oa.value&&((E=oa.value)!=null&&E.isDelete&&((N=(_=oa.value)==null?void 0:_.results)==null?void 0:N.length)>0&&((V=($=oa.value)==null?void 0:$.results)!=null&&V.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(ye=oa.value)==null?void 0:ye.results}):(console.log("itemGridData.value",oa.value),h.push(await Ho(oa.value,"gridLayout")))),La.value)for(const w in La.value)h.push(await Ho((H=La.value)==null?void 0:H[w],"extend",{target:w,compId:(ie=(j=La.value)==null?void 0:j[w])==null?void 0:ie.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),dn.setContentLoading(!1)},Qa=a=>ma(a),Et=e.ref([]),bp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nl=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),kp=async a=>{var l,c,d,x,g,h;let i=p.cloneDeep(Pt).value;i=i+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(g=(x=s==null?void 0:s.data)==null?void 0:x.result)==null?void 0:g.map(_=>_==null?void 0:_.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},qo=async a=>{var i,s;try{let l=p.cloneDeep(Pt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var g;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((g=Object.values(x==null?void 0:x.singleContent))==null?void 0:g[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var g;return((g=x==null?void 0:x.data)==null?void 0:g.code)===200}))){const x=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),g=await p.batchDeleteInsofDataApi({ids:x});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await kp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},xp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Pt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Vl=e.ref(0),Za=e.ref(null),eo=async(a,i="data",s)=>{var l,c,d,x,g,h,D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await qo(a):await Re.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ia.setLogRecordAsync({type:"删除",data:a},Pt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(le=>typeof(le==null?void 0:le.id)=="string")){const le=(x=a==null?void 0:a.selectItems)==null?void 0:x.map(Fe=>({content:a==null?void 0:a.content,singleContent:Fe,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await qo(le)}else{const le=(g=a==null?void 0:a.selectItems)==null?void 0:g.map(Fe=>Fe==null?void 0:Fe.id);await p.batchDeleteInsofDataApi({ids:le}),await ia.setLogRecordAsync({type:"删除",data:le},Pt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let le={};for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);const Fe=await Re.addTableContents(i,Pt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a,{param:s});Za.value={resId:Fe,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let le=[],Fe=[],ot=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Ie=s==null?void 0:s.url,je="",we="";if(ot!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((N=(_=a==null?void 0:a.content)==null?void 0:_[0])==null?void 0:N.id)!="string"){const I=await p.getInsofDataApi({id:ot});je=((H=(ye=(V=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:V[0])==null?void 0:ye.key)==null?void 0:H.tableId)??"",we=((z=(w=(ie=(j=I==null?void 0:I.data)==null?void 0:j.result)==null?void 0:ie[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(I=>{let te={};for(let ee in I)ee!=="id"&&ee!=="index"&&(te[ee]=I[ee]);typeof(I==null?void 0:I.id)=="number"?le.push({id:I==null?void 0:I.id,value:{tableData:te}}):Fe.push({key:{type:i,pageKey:Ie||we||Pt.value,tableId:je||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}),(Fe==null?void 0:Fe.length)>0&&await p.batchAddInsofDataApi({dataList:Fe}),(le==null?void 0:le.length)>0&&await p.batchUpdateInsofDataApi({dataList:le})}else{let le={},Fe=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let ot in a==null?void 0:a.singleContent)ot!=="id"&&ot!=="index"&&(le[ot]=a==null?void 0:a.singleContent[ot]);await Re.fixTableContents(i,Pt.value,a==null?void 0:a.index,Fe,sessionStorage.getItem("systemKey"),Object.values(le),a==null?void 0:a.column,a)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await xp(a==null?void 0:a.value);Ft.setTableLoading(!1),(T=a==null?void 0:a.column)!=null&&T.some(le=>le==null?void 0:le.isMainKey)||(Et.value=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value)),Et.value=Aa(Et.value),Do.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},wp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,i)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const s=await wp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Re.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(g=>g.contents),name:l,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),i&&(dn.setActiveMenuPath(null),dn.setActiveMenuPath(i))},no=a=>{Et.value=Aa(a),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value)},Dp=async a=>{var i;await e.nextTick(),(i=dp.value)!=null&&i.isRouter?Wo.setRouterPageStructure(a):Wo.setRouterPageStructure([])},Cp=async a=>{var d,x,g,h,D,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((_,N)=>{var $;(($=a==null?void 0:a.split("/"))==null?void 0:$.length)-2>N&&(i=i===""?i+_:i+"/"+_)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((_,N)=>{var $;(($=a==null?void 0:a.split("/"))==null?void 0:$.length)-1>N&&(s=s===""?s+_:s+"/"+_)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(g=l==null?void 0:l.data)==null?void 0:g.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},Ep=e.ref(),Fn=e.ref(null),_p=a=>{var D,E,_,N,$,V,ye,H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je;const i=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(we=>{var I;return((I=we==null?void 0:we.key)==null?void 0:I.type)==="extend"});if((i==null?void 0:i.length)===0)return Fn.value=null;Ep.value=i;const s=(N=(_=i==null?void 0:i.find(we=>{var I,te,ee;return(ee=(te=(I=we==null?void 0:we.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:_.value)==null?void 0:N.tableData;if(!s)return Fn.value=null;const l=(ye=(V=($=i==null?void 0:i.find(we=>{var I,te,ee;return(ee=(te=(I=we==null?void 0:we.value)==null?void 0:I.tableData)==null?void 0:te.执行任务)==null?void 0:ee.includes("计时")}))==null?void 0:$.key)==null?void 0:V.relatedInfo)==null?void 0:ye.compId,c=(H=Et.value)==null?void 0:H.find(we=>(we==null?void 0:we.id)===l);if(!c)return Fn.value=null;const d=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((j=s==null?void 0:s.任务关键词)==null?void 0:j.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(we=>(we==null?void 0:we.prop)===d),g=(Fe=(le=(T=(A=c==null?void 0:c.compData)==null?void 0:A.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:T.contents)==null?void 0:le.find(we=>we==null?void 0:we.isMainKey))==null?void 0:Fe.prop,h=(je=(Ie=(ot=c==null?void 0:c.compData)==null?void 0:ot.find(we=>(we==null?void 0:we.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:je[x];Fn.value={prop:d,value:h,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)},Sp=()=>{var a,i;console.log("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(i=(a=Pt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ol=()=>{var a,i,s,l;try{if(pp.value!=="报告中心"||!((a=Pt.value)!=null&&a.includes(ro.value)))return;const c=(i=Et.value)==null?void 0:i.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,g=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Pt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},wo=e.ref([]),Tp=e.computed(()=>{var a,i;return(i=(a=Xa.value)==null?void 0:a[Pt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Pt.value,sp.value],async a=>{var d,x,g,h,D,E,_,N;if(!Pt.value)return;Ft.setLockingPage(""),Et.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,Ya.value=!1,Ua.value=!0;const s=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(g=a==null?void 0:a[0])==null?void 0:g.substring(1):a==null?void 0:a[0];let l=new WeakMap;(D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:up.value})).data.result)==null?void 0:h.filter($=>{var V,ye;return((V=$==null?void 0:$.key)==null?void 0:V.pageKey)!=="menu"&&((ye=$==null?void 0:$.key)==null?void 0:ye.pageKey)!=="secret"}))==null||D.forEach($=>{l[$.key.pageKey]?l[$.key.pageKey]=[...l[$.key.pageKey],$]:l[$.key.pageKey]=[$]}),Ja.value=l,s?(dn.setContentLoading(!0),sessionStorage.setItem("pageKey",Pt.value),Et.value=await Re.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value,l),await ia.setLogRecordAsync({type:"查询",data:Et.value},Pt.value),Et.value=Aa(Et.value),await Dp(Et.value),Ol(),_p(s),wo.value=(E=Et.value)==null?void 0:E.map($=>({label:$==null?void 0:$.name,value:$==null?void 0:$.id})),Ft.setExtraContents([]),xn.setSelectTitle([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Ft.setItemData(Et.value),Ft.setOriginalData(Et.value),Ft.setCurStructureCompIds((_=Et.value)==null?void 0:_.map($=>$==null?void 0:$.id)),Ft.setRefreshCurStructure(!1),xn.setSelectTitle((N=Pt.value)==null?void 0:N.split("/").map($=>({value:$.trim()}))),dn.setChildMenu(""),dn.setContentLoading(!1),Ft.setTableLoading(!1),Ua.value=!1):(Et.value=[],Ua.value=!1),e.nextTick(()=>{ga.value=ga.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Ko.value,async()=>{if(Ko.value){let a=await Re.getItemData(Pt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Ia.value);Et.value=Aa(a),Ft.setFreshContent(!1),Ol()}},{deep:!0});const Ip=async()=>{var c,d,x,g,h,D,E,_;dn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ra.value)==null?void 0:c.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=Ra.value)==null?void 0:x.account)||((g=Ra.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(N=>N==null?void 0:N.id);const l=(_=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:_.map(N=>N==null?void 0:N.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(N=>N!==null&&N))&&(await p.batchDeleteInsofDataApi({ids:s}),await ia.setLogRecordAsync({type:"删除",data:s},Pt.value)),dn.setActiveMenuPath(cp.value),Et.value=null,Ft.setRouteToChildPath(""),dn.setChildMenu("")},Bp=a=>new RegExp("button","i").test(a),Ap=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ml=a=>{if(Ap(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&dn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zl=a=>{var i;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(i=Fn.value)==null?void 0:i.mainKeyProp]})},Np=a=>{Vl.value=a},ha=e.reactive({index:0,comp:null}),Vp=e.computed(()=>{var a;return(a=Et.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Op(i,s)}))}),Pl=(a,i)=>{var h,D,E,_,N;const s=i?a:a-2,l=(h=Et.value)==null?void 0:h[s],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find($=>($==null?void 0:$.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex($=>($==null?void 0:$.isMainKey)&&($==null?void 0:$.label)!=="操作"),x=d===-1?0:d,g=(N=(_=l==null?void 0:l.compData)==null?void 0:_.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:N.contents;return{valid:g==null?void 0:g.every($=>$==null?void 0:$[x+1]),length:(g==null?void 0:g.length)||0}},Op=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Pl(i,!0);ha.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Rl=a=>{var s,l,c,d,x;const i=a+1;if(i>1&&((c=(l=(s=Et.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:g}=Pl(i);g?(ha.index=i,ha.comp=(d=Et.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=i,ha.comp=(x=Et.value)==null?void 0:x[a]},Do=e.computed(()=>{var a,i;return(i=(a=Nl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Do.value,a=>{a&&Rl(0)},{immediate:!0});const Mp={class:"layout"},zp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:N}=_;return N==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(_=>{const{key:N}=_;return N==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let _=0;const N=[];if(D=D.map($=>{const V=$.span;return V?($.span=Number(V),_=_+$.span):N.push($),$}),_<24){const $=Math.floor((24-_)/E);N.forEach(V=>{V.span=$})}return D}),h=D=>{s("rowClick",D)};return(D,E)=>{var $;const _=e.resolveComponent("el-col"),N=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Mp,[e.createVNode(N,{style:e.normalizeStyle({height:($=d.value)==null?void 0:$.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(V,ye)=>(e.openBlock(),e.createBlock(_,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var H;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(ga),compName:V.name,index:(V==null?void 0:V.id)??ye,height:(H=d.value)==null?void 0:H.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Pp=Rt._export_sfc(zp,[["__scopeId","data-v-ab9a36ed"]]),Rp={class:"layout-operate"},Lp={class:"layout-module"},Fp={class:"collapse-title-item"},$p={class:"collapse-title"},jp={class:"icon-content"},Kp=["onClick"],Up={class:"comp-child"},Wp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{ye()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),g=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),_=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],N=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),$=e.computed(()=>{const k=N==null?void 0:N.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=N==null?void 0:N.value,A=k==null?void 0:k.find(T=>{const{key:le}=T;return le==="children"});return A==null?void 0:A.contents}),ye=()=>{var k;c.value=N.value||{},D.value=(V==null?void 0:V.value)||[],x.value=g(),x.value=(k=x.value)==null?void 0:k.map(A=>{var le;const{prop:T}=A;return A.value=(le=$.value)==null?void 0:le[T],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>_(A))},{immediate:!0});const H=(k,A)=>{const T=p.cloneDeep(V==null?void 0:V.value);T[A].span=k.span,D.value=T,l("change",z(),!0)},j=k=>ma(k),ie=(k,A,T)=>{if(!k)return;const le=p.cloneDeep(V==null?void 0:V.value);le[T]&&(le[T].compData=k,D.value=le,l("change",z(),!0))},w=k=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((T,le)=>k!==le),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const T=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",Lp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Tt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=le=>h(le))},null,8,["rowContents"])])]),e.createVNode(kl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:le,index:Fe})=>[e.createElementVNode("div",Fp,[e.createElementVNode("div",$p,e.toDisplayString(le.name),1),e.createElementVNode("div",jp,[e.createElementVNode("div",{onClick:e.withModifiers(ot=>w(Fe),["stop"]),class:"icon-content"},[e.createVNode(T,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Kp)])])]),content:e.withCtx(({item:le,index:Fe})=>[e.createElementVNode("div",Up,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Tt.ssForm,{rowContents:E.value[Fe],key:Fe,isEnableWrap:!0,onChange:ot=>H(ot,Fe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(le.comp+"Operate")),{itemContents:le==null?void 0:le.compData,originalItemContents:le.compData,onChange:ot=>ie(ot,le,Fe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Hp=Rt._export_sfc(Wp,[["__scopeId","data-v-ba05456e"]]),qp=typeof window<"u";var Go;qp&&((Go=window==null?void 0:window.navigator)!=null&&Go.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pn(a){return a==null}function Ll(){}const Gp=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Gp)));function Xp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function Xo(a,i=16){if(typeof a!="function")return Ll;const s=(...d)=>{a(...d)};if(i<=0)return Fl(s);let l=0,c;return function(...d){const x=Date.now(),g=x-l;clearTimeout(c),g>=i?(l=x,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-g))}}function Yp(a,i=100){if(typeof a!="function")return Ll;const s=(...c)=>{a(...c)};if(i<=0)return Fl(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Fl(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const _a=new Set,$l=new WeakMap;function Jp(){_a.forEach(a=>{a(...$l.get(a))}),_a.clear()}function nn(a,...i){if(typeof a!="function")return a;$l.set(a,i),!_a.has(a)&&(_a.add(a),_a.size===1&&Promise.resolve().then(Jp))}const jl=Symbol("LAYOUT_KEY"),Kl=Symbol("EMITTER_KEY");function Qp(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function mo(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Zp(a[s]);return i}function Zp(a){return{...a}}function Ul(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function da(a,i,s){const l=Hl(a),c=ql(a),d=Array(a.length);for(let x=0,g=c.length;x<g;x++){let h=c[x];h.static||(h=ed(l,h,i,s),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function ed(a,i,s,l){if(s)for(;i.y>0&&!Sa(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Sa(a,i);)i.y--}let c;for(;c=Sa(a,i);)i.y=c.y+c.h;return i}function td(a,i){const s=Hl(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Sa(s,d);)d.y++}return a}function Yo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Sa(a,i){for(let s=0,l=a.length;s<l;s++)if(Ul(a[s],i))return a[s]}function Wl(a,i){return a.filter(s=>Ul(s,i))}function Hl(a){return a.filter(i=>i.static)}function yo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const x=i.x,g=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let D=ql(a);h&&(D=D.reverse());const E=Wl(D,i);if(d&&E.length)return i.x=x,i.y=g,i.moved=!1,a;for(let _=0,N=E.length;_<N;_++){const $=E[_];$.moved||i.y>$.y&&i.y-$.y>$.h/4||($.static?a=Jo(a,$,i,c):a=Jo(a,i,$,c))}return a}function Jo(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Sa(a,c))return yo(a,s,void 0,c.y,!1)}return yo(a,s,void 0,s.y+1,!1)}function nd(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ad(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function od(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ld(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ql(a){return Array.from(a).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 rd(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let g=0;g<s.length;g++)if(typeof x[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[g]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function id(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function Qo(a){return sd(a)}function sd(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function Zo(a,i,s,l){return cd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function cd(a){return typeof a=="number"&&!Number.isNaN(a)}function ud(a,i){const s=Xl(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const x=s[c];i>a[x]&&(l=x)}return l}function Gl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function pd(a,i,s,l,c,d,x){if(i[l])return mo(i[l]);let g=a;const h=Xl(s),D=h.slice(h.indexOf(l));for(let E=0,_=D.length;E<_;E++){const N=D[E];if(i[N]){g=i[N];break}}return g=mo(g||[]),da(td(g,{cols:d}),x)}function Xl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let dd="auto";function fd(){return typeof document<"u"}function el(){return fd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):dd}var Ca={exports:{}},hd=Ca.exports,tl;function vd(){return tl||(tl=1,function(a,i){(function(s,l){a.exports=l()})(hd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=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},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ye(r.key),r)}}function g(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ye(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&_(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function _(n,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},_(n,t)}function N(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function $(n){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,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ye(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var H=function(n){return!(!n||!n.Window)&&n instanceof n.Window},j=void 0,ie=void 0;function w(n){j=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),ie=n}function z(n){return H(n)?n:(n.ownerDocument||n).defaultView||ie.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},T={window:function(n){return n===ie||H(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=z(n)||ie;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function le(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Fe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var ot={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=ot.draggable,t.map.drag=ot,t.methodDict.drag="draggable",r.actions.drag=ot.defaults},listeners:{"interactions:before-action-move":le,"interactions:action-resume":le,"interactions:action-move":Fe,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return T.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):T.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:le,move:Fe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ie=ot,je={init:function(n){var t=n;je.document=t.document,je.DocumentFragment=t.DocumentFragment||we,je.SVGElement=t.SVGElement||we,je.SVGSVGElement=t.SVGSVGElement||we,je.SVGElementInstance=t.SVGElementInstance||we,je.Element=t.Element||we,je.HTMLElement=t.HTMLElement||je.Element,je.Event=t.Event,je.Touch=t.Touch||we,je.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function we(){}var I=je,te={init:function(n){var t=I.Element,o=n.navigator||{};te.supportsTouch="ontouchstart"in n||T.func(n.DocumentTouch)&&I.document instanceof n.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!I.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?I.PointerEvent===n.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,te.wheelEvent=I.document&&"onmousewheel"in I.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=te;function he(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;T.element(n);){if(q(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(T.docFrag(t)){for(;(t=t.host)&&T.docFrag(t););return t}return t}function q(n,t){return ie!==j&&(t=t.replace(/\/deep\//g," ")),n[ee.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function me(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function ke(n,t,o){for(;T.element(n);){if(q(n,t))return!0;if((n=st(n))===o)return q(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Ve(n){var t=n instanceof I.SVGElement?n.getBoundingClientRect():n.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 Ye(n){var t,o=Ve(n);if(!ee.isIOS7&&o){var r={x:(t=(t=z(n))||ie).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!T.string(n)&&(I.document.querySelector(n),!0)}function Q(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function nt(n,t,o,r){var u=n;return T.string(u)?u=tt(u,t,o):T.func(u)&&(u=u.apply(void 0,r)),T.element(u)&&(u=Ye(u)),u}function ze(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Q({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function oe(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function re(n,t,o){var r=o&&n.options[o];return ze(nt(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},T.string(n)&&n.search(" ")!==-1&&(n=Xe(n)),T.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(T.object(n)&&(t=n,n=""),T.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(T.array(t))for(var u=0,f=t;u<f.length;u++){var y=f[u];Te(n,y,o,r)}else if(T.object(t))for(var b in t)Te(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(m.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function W(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function Y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function v(n){return n instanceof I.Event||n instanceof I.Touch}function F(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Z(n,t){return t=t||{x:0,y:0},ee.isOperaMobile&&v(n)?(F("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):F("page",n,t),t}function P(n){return T.number(n.pointerId)?n.pointerId:n.identifier}function ue(n,t,o){var r=t.length>1?X(t):t[0];Z(r,n.page),function(u,f){f=f||{},ee.isOperaMobile&&v(u)?F("screen",u,f):F("client",u,f)}(r,n.client),n.timeStamp=o}function R(n){var t=[];return T.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function X(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function se(n){if(!n.length)return null;var t=R(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ve(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function K(n,t){var o=t+"X",r=t+"Y",u=R(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function ae(n){return T.string(n.pointerType)?n.pointerType:T.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof I.Touch?"touch":"mouse"}function G(n){var t=T.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var _e=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(_e.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var de=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return de([],n)},L=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},fe=function(n,t){return n[L(n,t)]},ne=function(n){D(o,n);var t=$(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,U=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=U,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return g(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,y=L(f,function(S){var U=S.dropzone,B=S.element;return U===r.dropzone&&B===r.target});u.activeDrops.splice(y,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(_e);function Be(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,U=f.interactables.list;S<U.length;S++){var B=U[S];if(B.options.drop.enabled){var J=B.options.drop.accept;if(!(T.element(J)&&J!==y||T.string(J)&&!q(y,J)||T.func(J)&&!J({dropzone:B,draggableElement:y})))for(var xe=0,$e=B.getAllElements();xe<$e.length;xe++){var Pe=$e[xe];Pe!==y&&b.push({dropzone:B,element:Pe,rect:B.getRect(Pe)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Oe(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var U=S[b],B=U.dropzone,J=U.element,xe=U.rect,$e=B.dropCheck(t,o,u,f,J,xe);y.push($e?J:null)}var Pe=function(Ge){for(var it,at,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],kt=Ge[it];if(mt&&_t!==it)if(kt){var tn=M(mt),Kt=M(kt);if(tn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(tn!==Kt){yt=yt.length?yt:me(kt);var un=void 0;if(kt instanceof I.HTMLElement&&mt instanceof I.SVGElement&&!(mt instanceof I.SVGSVGElement)){if(mt===Kt)continue;un=mt.ownerSVGElement}else un=mt;for(var En=me(un,kt.ownerDocument),Pn=0;En[Pn]&&En[Pn]===yt[Pn];)Pn++;var Pa=[En[Pn-1],En[Pn],yt[Pn]];if(Pa[0])for(var xa=Pa[0].lastChild;xa;){if(xa===Pa[1]){it=_t,yt=En;break}if(xa===Pa[2])break;xa=xa.previousSibling}}else ht=kt,(parseInt(z(at=mt).getComputedStyle(at).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Pe]||null}function Ne(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ne(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ne(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function ge(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Be(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Je(t,o.element));var y=r,b=Oe(o,y,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ne(o,0,y)}}var Ke={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ie),r.prototype.dropzone=function(f){return function(y,b){if(T.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),U=Object.keys(S).reduce(function(J,xe){return J[/^(enter|leave)/.test(xe)?"drag".concat(xe):/^(activate|deactivate|move)/.test(xe)?"drop".concat(xe):xe]=S[xe],J},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(U),y.options.drop.listeners=U}return T.func(b.ondrop)&&y.on("drop",b.ondrop),T.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),T.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),T.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),T.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),T.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:T.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return T.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,U,B){return function(J,xe,$e,Pe,Ge,it,at){var ht=!1;if(!(at=at||J.getRect(it)))return!!J.options.drop.checker&&J.options.drop.checker(xe,$e,ht,J,it,Pe,Ge);var yt=J.options.drop.overlap;if(yt==="pointer"){var _t=re(Pe,Ge,"drag"),mt=Z(xe);mt.x+=_t.x,mt.y+=_t.y;var kt=mt.x>at.left&&mt.x<at.right,tn=mt.y>at.top&&mt.y<at.bottom;ht=kt&&tn}var Kt=Pe.getRect(Ge);if(Kt&&yt==="center"){var un=Kt.left+Kt.width/2,En=Kt.top+Kt.height/2;ht=un>=at.left&&un<=at.right&&En>=at.top&&En<=at.bottom}return Kt&&T.number(yt)&&(ht=Math.max(0,Math.min(at.right,Kt.right)-Math.max(at.left,Kt.left))*Math.max(0,Math.min(at.bottom,Kt.bottom)-Math.max(at.top,Kt.top))/(Kt.width*Kt.height)>=yt),J.options.drop.checker&&(ht=J.options.drop.checker(xe,$e,ht,J,it,Pe,Ge)),ht}(this,f,y,b,S,U,B)},o.dynamicDrop=function(f){return T.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Q(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ke.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.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(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Je(t,o.element),u.events=Ne(o,0,r),u.events.activate&&(Be(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;ge(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;ct(n,t),ge(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.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:Je,getDrop:Oe,getDropEvents:Ne,fireDropEvents:ge,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},be=Ke;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(U){return U.pointer}),f=r==="start",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ve(u,b),o.box=se(u),o.scale=1,o.ds=0,o.angle=K(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=ve(u,b),o.box=se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=K(u,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,T.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Qe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return T.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):T.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},pe=Qe;function Ae(n,t,o,r,u,f,y){if(!t)return!1;if(t===!0){var b=T.number(f.width)?f.width:f.right-f.left,S=T.number(f.height)?f.height:f.bottom-f.top;if(y=Math.min(y,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var U=b>=0?f.left:f.right;return o.x<U+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!T.element(r)&&(T.element(t)?t===r:ke(r,t,u))}function Le(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var We,O,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return T.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),T.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),T.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:T.bool(b.square)&&(y.options.resize.square=b.square),y):T.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:Q({},f),corrected:Q({},f),previous:Q({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Le(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,U=S.start,B=S.corrected,J=S.delta,xe=S.previous;if(Q(xe,B),y){if(Q(B,b),f==="reposition"){if(B.top>B.bottom){var $e=B.top;B.top=B.bottom,B.bottom=$e}if(B.left>B.right){var Pe=B.left;B.left=B.right,B.right=Pe}}}else B.top=Math.min(b.top,U.bottom),B.bottom=Math.max(b.bottom,U.top),B.left=Math.min(b.left,U.right),B.right=Math.max(b.right,U.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)J[Ge]=B[Ge]-xe[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=J}})(n),Le(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var y=Q({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(T.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var U in S)S[U]=Ae(U,b.edges[U],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,J=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||J)&&(n.action={name:"resize",axes:(B?"x":"")+(J?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var U=S[b];t[U]&&(y+=U)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(pe),n.usePlugin(ut),n.usePlugin(Ie),n.usePlugin(be)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return O(n)},init:function(n){if(We=n.requestAnimationFrame,O=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],O=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),O=O&&O.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},O=function(u){return clearTimeout(u)})}},Se={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(n){Se.isScrolling=!0,rt.cancel(Se.i),n.autoScroll=Se,Se.interaction=n,Se.prevTime=Se.now(),Se.i=rt.request(Se.scroll)},stop:function(){Se.isScrolling=!1,Se.interaction&&(Se.interaction.autoScroll=null),rt.cancel(Se.i)},scroll:function(){var n=Se.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Se.now(),b=(y-Se.prevTime)/1e3,S=u.speed*b;if(S>=1){var U={x:Se.x*S,y:Se.y*S};if(U.x||U.y){var B=He(f);T.window(f)?f.scrollBy(U.x,U.y):f&&(f.scrollLeft+=U.x,f.scrollTop+=U.y);var J=He(f),xe={x:J.x-B.x,y:J.y-B.y};(xe.x||xe.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:xe,interaction:n,container:f})}Se.prevTime=y}Se.isScrolling&&(rt.cancel(Se.i),Se.i=rt.request(Se.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Se.check(t.interactable,t.prepared.name))if(t.simulation)Se.x=Se.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,U=t.prepared.name,B=b.options[U].autoScroll,J=Ze(B.container,b,S);if(T.window(J))y=o.clientX<Se.margin,r=o.clientY<Se.margin,u=o.clientX>J.innerWidth-Se.margin,f=o.clientY>J.innerHeight-Se.margin;else{var xe=Ve(J);y=o.clientX<xe.left+Se.margin,r=o.clientY<xe.top+Se.margin,u=o.clientX>xe.right-Se.margin,f=o.clientY>xe.bottom-Se.margin}Se.x=u?1:y?-1:0,Se.y=f?1:r?-1:0,Se.isScrolling||(Se.margin=B.margin,Se.speed=B.speed,Se.start(t))}}};function Ze(n,t,o){return(T.string(n)?tt(n,t,o):n)||z(o)}function He(n){return T.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Se,Se.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Se.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Se.stop(),Se.interaction&&(Se.interaction=null)},"interactions:stop":Se.stop,"interactions:action-move":function(n){return Se.onInteractionMove(n)}}},vt=pt;function It(n,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),n.apply(this,arguments)}}function Bt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return T.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wt(n){return T.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,U,B,J){var xe=b.getRect(B),$e=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Pe={action:null,interactable:b,interaction:U,element:B,rect:xe,buttons:$e};return J.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=It(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=It(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wt,t.prototype.styleCursor=xt}};function At(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&qt(t,o,n,u)?n:null}function Ut(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var U=r[b],B=u[b],J=U.getAction(t,o,n,B);if(J){var xe=At(J,U,B,f,y);if(xe)return{action:xe,interactable:U,element:B}}}return{action:null,interactable:null,element:null}}function Lt(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;T.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var U=Ut(n,t,o,f,y,r,u);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,Bt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,Dn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,U=0,B=0;if(!(f&&y&&b))return!1;for(var J=0,xe=r.interactions.list;J<xe.length;J++){var $e=xe[J],Pe=$e.prepared.name;if($e.interacting()&&(++S>=b||$e.interactable===n&&((U+=Pe===o.name?1:0)>=f||$e.element===t&&(B++,Pe===o.name&&B>=y))))return!1}return b>0}function wn(n,t){return T.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function fn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Dn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var y=o.options[u.name].cursorChecker;f=T.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}fn(n.element,f||"",t)}else t.autoStart.cursorElement&&fn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Q(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return wn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Lt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Lt(u,f,y,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!qt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),Dn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&fn(o.element,"",t)}},maxInteractions:wn,withinInteractionLimit:qt,validateAction:At},hn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,U=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&U!=="xy"&&U!==B){o.prepared.name=null;for(var J=r,xe=function(Pe){if(Pe!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Pe.testIgnoreAllow(Ge,J,r)){var it=Pe.getAction(o.downPointer,o.downEvent,o,J);if(it&&it.name==="drag"&&function(at,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return at==="xy"||yt==="xy"||yt===at}(B,Pe)&&hn.validateAction(it,Pe,J,r,t))return Pe}}};T.element(J);){var $e=t.interactables.forEachMatch(J,xe);if($e){o.prepared.name="drag",o.interactable=$e,o.element=J;break}J=st(J)}}}}}};function vn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(hn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=vn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;vn(t)>0&&(t.prepared.name=null)}},getHoldDuration:vn},gn=In,Xn={id:"auto-start",install:function(n){n.usePlugin(hn),n.usePlugin(gn),n.usePlugin(Tn)}},Yn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):T.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Jn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var jn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Yn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||T.element(f.target)&&q(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||he(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Jn,n},{})};function Bn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function mn(n){var t={};for(var o in n){var r=n[o];T.plainObject(r)?t[o]=mn(r):T.array(r)?t[o]=Ee(r):t[o]=r}return t}var zn=function(){function n(t){d(this,n),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=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(U){var B=U.interactable.options[U.prepared.name],J=B.modifiers;return J&&J.length?J:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(xe){var $e=B[xe];return $e&&$e.enabled&&{options:$e,methods:$e._methods}}).filter(function(xe){return!!xe})}(y);this.prepareStates(b),this.startEdges=Q({},y.edges),this.edges=Q({},this.startEdges),this.startOffset=(r=y.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{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,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,y=t.edges;t.coords=Q({},t.pageCoords),t.rect=Q({},f),t.edges=Q({},y);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),U=0;U<b.length;U++){var B,J=b[U],xe=J.options,$e=Q({},t.coords),Pe=null;(B=J.methods)!=null&&B.set&&this.shouldDo(xe,r,o)&&(t.state=J,Pe=J.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-$e.x,y:t.coords.y-$e.y})),S.eventProps.push(Pe)}Q(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var at=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=at||Ge.x!==S.coords.x||Ge.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Q(this.startDelta,y.delta);for(var U=0,B=[[f,b],[u,S]];U<B.length;U++){var J=B[U],xe=J[0],$e=J[1];xe.page.x+=$e.x,xe.page.y+=$e.y,xe.client.x+=$e.x,xe.client.y+=$e.y}var Pe=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Pe.left,Ge.right+=Pe.right,Ge.top+=Pe.top,Ge.bottom+=Pe.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,U=b.methods,B=U.beforeEnd&&U.beforeEnd(t);if(B)return this.endResult=B,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=Q({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var y=f[u];r.state=y,y.methods.stop&&y.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var y=f.startDelta,b=f.result,S=b.delta,U=b.rectDelta,B=0,J=[[r.start,y],[r.cur,S]];B<J.length;B++){var xe=J[B],$e=xe[0],Pe=xe[1];$e.page.x-=Pe.x,$e.page.y-=Pe.y,$e.client.x-=Pe.x,$e.client.y-=Pe.y}u.left-=U.left,u.right-=U.right,u.top-=U.top,u.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="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 mn(o)}),this.result=An(Q({},t.result.coords),Q({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Cn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var bt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new zn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Cn,"interactions:action-move":Cn,"interactions:action-end":Cn,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},Jt=bt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Qn=function(n){D(o,n);var t=$(o);function o(r,u,f,y,b,S,U){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var J=r.interactable,xe=(J&&J.options||gt).deltaSource,$e=re(J,b,f),Pe=y==="start",Ge=y==="end",it=Pe?N(B):r.prevEvent,at=Pe?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Q({},at.page),B.client=Q({},at.client),B.rect=Q({},r.rect),B.timeStamp=at.timeStamp,Ge||(B.page.x-=$e.x,B.page.y-=$e.y,B.client.x-=$e.x,B.client.y-=$e.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=U||f+(y||""),B.interactable=J,B.t0=Pe?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-$e.x,B.y0=r.coords.start.page.y-$e.y,B.clientX0=r.coords.start.client.x-$e.x,B.clientY0=r.coords.start.client.y-$e.y,B.delta=Pe||Ge?{x:0,y:0}:{x:B[xe].x-it[xe].x,y:B[xe].y-it[xe].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Q({},r.coords.velocity[xe]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return g(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,y=202.5<=u&&u<337.5;return{up:y,down:!y&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(_e);Object.defineProperties(Qn.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var Mt=g(function n(t,o,r,u,f){d(this,n),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=r,this.downTime=u,this.downTarget=f}),yn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Nn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),on=0,Vn=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),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=It(function(B){this.move(B)},"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=on++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in yn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var U in Nn)S(U);this._scopeFire("interactions:new",{interaction:this})}return g(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){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=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Q({},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,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,y=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&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,f)>this.pointerMoveTolerance);var b,S,U,B=this.getPointerIndex(t),J={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(b=this.coords.velocity,S=this.coords.delta,U=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/U,b.page.y=S.page.y/U,b.client.x=S.client.x/U,b.client.y=S.client.y/U,b.timeStamp=U),this._scopeFire("interactions:move",J),y||this.simulation||(this.interacting()&&(J.type=null,this.move(J)),this.pointerWasMoved&&W(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=Q({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,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,curEventTarget:u,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=P(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:L(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,y,b,S=P(t),U=this.getPointerIndex(t),B=this.pointers[U];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),U=this.pointers.length,this.pointers.push(B)),ue(this.coords.cur,this.pointers.map(function(J){return J.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(W(this.coords.start,this.coords.cur),W(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:B,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Qn(this,t,this.prepared.name,o,this.element,r,u)}},{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,r=t.phase,u=t.preEnd,f=t.type,y=this.rect;if(y&&r==="move"&&(oe(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Zt(n){Kn(n.interaction)}function Kn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),oe(n.edges,n.rect,t),t.x=0,t.y=0,!0}function bn(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function zt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}Nn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=bn},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Zt,"interactions:before-action-move":Zt,"interactions:before-action-end":function(n){var t=n.interaction;if(Kn(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ln=Gt,Dt=function(){function n(t){d(this,n),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(n,[{key:"start",value:function(t){var o=this.interaction,r=Nt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new zn(o));if(y.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(y.result=y.setAll(this.modifierArg),!y.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,r=Nt(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,U=this.interaction,B=Nt(U).resistance,J=(U._now()-this.t0)/1e3;if(J<this.te){var xe,$e=1-(Math.exp(-B*J)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,y=this.modifiedOffset.y,xe={x:Ht(b=$e,t,r,f),y:Ht(b,o,u,y)}):xe={x:this.targetOffset.x*$e,y:this.targetOffset.y*$e};var Pe={x:xe.x-this.currentOffset.x,y:xe.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,U.offsetBy(Pe),U.move(),this.onNextFrame(function(){return S.inertiaTick()})}else U.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=Nt(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),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,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),W(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rt.cancel(this.timeout)}}]),n}();function Nt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(Jt),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;T.element(u);){if(u===t.element){r.resume(n);break}u=st(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Cn,"interactions:action-inertiastart":Cn,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var cn=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Un=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=Q({},t||{})}return g(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=de(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Zn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Wn(n){return T.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function ea(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:y,remove:b,addDelegate:function(B,J,xe,$e,Pe){var Ge=Wn(Pe);if(!r[xe]){r[xe]=[];for(var it=0;it<u.length;it++){var at=u[it];y(at,xe,S),y(at,xe,U,!0)}}var ht=r[xe],yt=fe(ht,function(_t){return _t.selector===B&&_t.context===J});yt||(yt={selector:B,context:J,listeners:[]},ht.push(yt)),yt.listeners.push({func:$e,options:Ge})},removeDelegate:function(B,J,xe,$e,Pe){var Ge,it=Wn(Pe),at=r[xe],ht=!1;if(at)for(Ge=at.length-1;Ge>=0;Ge--){var yt=at[Ge];if(yt.selector===B&&yt.context===J){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var kt=_t[mt];if(kt.func===$e&&ea(kt.options,it)){_t.splice(mt,1),_t.length||(at.splice(Ge,1),b(J,xe,S),b(J,xe,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:U,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,J,xe,$e){if(B.addEventListener){var Pe=Wn($e),Ge=fe(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[J]||(Ge.events[J]=[]),fe(Ge.events[J],function(it){return it.func===xe&&ea(it.options,Pe)})||(B.addEventListener(J,xe,f.supportsOptions?Pe:Pe.capture),Ge.events[J].push({func:xe,options:Pe}))}}function b(B,J,xe,$e){if(B.addEventListener&&B.removeEventListener){var Pe=L(o,function(tn){return tn.eventTarget===B}),Ge=o[Pe];if(Ge&&Ge.events)if(J!=="all"){var it=!1,at=Ge.events[J];if(at){if(xe==="all"){for(var ht=at.length-1;ht>=0;ht--){var yt=at[ht];b(B,J,yt.func,yt.options)}return}for(var _t=Wn($e),mt=0;mt<at.length;mt++){var kt=at[mt];if(kt.func===xe&&ea(kt.options,_t)){B.removeEventListener(J,xe,f.supportsOptions?_t:_t.capture),at.splice(mt,1),at.length===0&&(delete Ge.events[J],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Pe,1)}else for(J in Ge.events)Ge.events.hasOwnProperty(J)&&b(B,J,"all")}}function S(B,J){for(var xe=Wn(J),$e=new Zn(B),Pe=r[B.type],Ge=G(B)[0],it=Ge;T.element(it);){for(var at=0;at<Pe.length;at++){var ht=Pe[at],yt=ht.selector,_t=ht.context;if(q(it,yt)&&he(_t,Ge)&&he(_t,it)){var mt=ht.listeners;$e.currentTarget=it;for(var kt=0;kt<mt.length;kt++){var tn=mt[kt];ea(tn.options,xe)&&tn.func($e)}}}it=st(it)}}function U(B){return S(B,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ca={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ca.methodOrder;t<o.length;t++){var r=o[t],u=ca[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ya(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var U=0,B=f.interactions.list;U<B.length;U++){var J=B[U];if(!(J.pointerType!==r||/down/i.test(u)&&J.simulation))return J}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ya(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ya(n,t){return n.pointers.some(function(o){return o.id===t})}var ua=ca,kn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ta(n,t){return function(o){var r=t.interactions.list,u=ae(o),f=G(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,B=o.changedTouches;U<B.length;U++){var J=B[U],xe={pointer:J,pointerId:P(J),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},$e=pa(xe);S.push([xe.pointer,xe.eventTarget,xe.curEventTarget,$e])}}else{var Pe=!1;if(!ee.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Pe;Ge++)Pe=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var it={pointer:o,pointerId:P(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},at=pa(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,at])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],kt=yt[2];yt[3][n](_t,o,mt,kt)}}}function pa(n){var t=n.pointerType,o=n.scope,r={interaction:ua.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var U=u&&u.events,B=0;B<f.length;B++){var J=f[B];b(o,J.type,J.listener,U)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<kn.length;o++){var r=kn[o];t[r]=ta(r,n)}var u,f=ee.pEventTypes;function y(){for(var b=0,S=n.interactions.list;b<S.length;b++){var U=S[b];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var B=function(){var $e=xe[J];n.documents.some(function(Pe){return he(Pe.doc,$e.downTarget)})||U.removePointer($e.pointer,$e.event)},J=0,xe=U.pointers;J<xe.length;J++)B()}}(u=I.PointerEvent?[{type:f.down,listener:y},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:y},{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 S=0,U=n.interactions.list;S<U.length;S++)U[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(U,b);var S=$(U);function U(){return d(this,U),S.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),U}(Vn),n.interactions={list:[],new:function(b){b.scopeFire=function(U,B){return n.fire(U,B)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(jn)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ta,methodNames:kn},Hn=Va,qn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(qn||{}),rr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,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||r,this._win=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return g(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return T.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),T.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),T.func(o.onend)&&this.on("".concat(t,"end"),o.onend),T.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&Bn(S,f._actions)};(T.array(o)||T.object(o))&&this._onOff(qn.Off,t,o,void 0,b),(T.array(r)||T.object(r))&&this._onOff(qn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),T.array(b)?y[f]=Ee(b):T.plainObject(b)?(y[f]=Q(y[f]||{},mn(b)),T.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):T.bool(b)&&T.object(r.perAction[f])?y[f].enabled=b:y[f]=b}}},{key:"getRect",value:function(t){return t=t||(T.element(this.target)?this.target:null),T.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return T.func(t)?(this.getRect=function(r){var u=Q({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(lt(o)||T.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][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 T.string(t)?Array.from(this._context.querySelectorAll(t)):T.func(t)&&t.getAllElements?t.getAllElements():T.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||he(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!T.element(r)&&(T.string(t)?ke(r,t,o):!!T.element(t)&&he(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!T.element(r))&&(T.string(t)?ke(r,t,o):!!T.element(t)&&he(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){T.object(o)&&!T.array(o)&&(u=r,r=null);var y=Te(o,r,f);for(var b in y){b==="wheel"&&(b=ee.wheelEvent);for(var S=0,U=y[b];S<U.length;S++){var B=U[S];Bn(b,this._actions)?this.events[t===qn.On?"on":"off"](b,B):T.string(this.target)?this._scopeEvents[t===qn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===qn.On?"add":"remove"](this.target,b,B,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(qn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(qn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in T.object(t)||(t={}),this.options=mn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Q(Q({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?T.func(this[y])&&this[y](t[y]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(T.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,y=u.context,b=u.listeners;f===this.target&&y===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ir=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,y=T.string(f)?o.selectorMap[f]:f[o.scope.id],b=L(y,function(S){return S===u});y.splice(b,1)}})}return g(n,[{key:"new",value:function(t,o){o=Q(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),T.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=T.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return fe(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((T.string(f.target)?T.element(t)&&q(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),sr=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ee,this.defaults=mn(gt),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=X,u.getTouchBBox=se,u.getTouchDistance=ve,u.getTouchAngle=K,u.getElementRect=Ye,u.getElementClientRect=Ve,u.matchesSelector=q,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=It(function(f,y,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,U=f;S<U.length;S++){var B=U[S];this.on(B,y,b)}return this}if(T.object(f)){for(var J in f)this.on(J,f[J],y);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=It(function(f,y,b){if(T.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),T.array(f)){for(var S=0,U=f;S<U.length;S++){var B=U[S];this.off(B,y,b)}return this}if(T.object(f)){for(var J in f)this.off(J,f[J],y);return this}var xe;return Bn(f,this.scope.actions)?f in this.globalEvents&&(xe=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(xe,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ee.supportsTouch},u.supportsPointerEvent=function(){return ee.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[f].stop();return this},u.pointerMoveTolerance=function(f){return T.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Qn,this.Interactable=void 0,this.interactables=new ir(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=$(f);function f(){return d(this,f),u.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return V(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){V(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(rr)}return g(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,T.window(r)&&w(r),I.init(r),ee.init(r),rt.init(r),o.window=r,o.document=r.document,o.usePlugin(Hn),o.usePlugin(Na),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 r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[Eo(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[Eo(y)]))break}this.listenerMaps.splice(r,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 r=z(t);o=o?Q({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=z(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{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()}}]),n}();function Eo(n){return n&&n.replace(/\/.*$/,"")}var _o=new sr,en=_o.interactStatic,cr=typeof globalThis<"u"?globalThis:window;_o.init(cr);var ur=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,U=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},J=0;J<t.length;J++){var xe=t[J],$e=xe[0],Pe=xe[1],Ge=Math.round((r-U.x)/n[$e]),it=Math.round((u-U.y)/n[Pe]);B[$e]=Math.max(b.left,Math.min(b.right,Ge*n[$e]+U.x)),B[Pe]=Math.max(b.top,Math.min(b.bottom,it*n[Pe]+U.y))}return B};return o.grid=n,o.coordFields=t,o}}),pr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Q(t.snappers||{},ur),t.createSnapGrid=t.snappers.grid}},dr=pr,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,U=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Q({},u),t.startRect=Q({},o),t.ratio=y,t.equalDelta=U;var J=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var xe=(J.left?1:-1)*(J.top?1:-1);t.edgeSign={x:xe,y:xe}}else t.edgeSign={x:J.left?-1:1,y:J.top?-1:1};if(b!==!1&&Q(r,J),B!=null&&B.length){var $e=new zn(n.interaction);$e.copyFrom(n.interaction.modification),$e.prepareStates(B),t.subModification=$e,$e.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Q({},r),y=t.equalDelta?hr:vr;if(Q(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Q({},o);oe(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),U=S.delta;return S.changed&&(y(t,Math.abs(U.x)>Math.abs(U.y),S.coords,S.rect),Q(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function vr(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var U=r.height*y;o.x=f.x+(U-u.width)*b.x}}var gr=an(fr,"aspectRatio"),So=function(){};So._defaults={};var Oa=So;function na(n,t,o){return T.func(n)?nt(n,t.interactable,t.element,[o.x,o.y,t]):nt(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,y=r.options,b=y.elementRect,S=Q({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var U=na(y.restriction,u,f);if(U){var B=U.right-U.left-t.width,J=U.bottom-U.top-t.height;B<0&&(S.left+=B,S.right+=B),J<0&&(S.top+=J,S.bottom+=J)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,y=na(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Q({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(y);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},mr=an(Ma,"restrict"),To={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Bo(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ba={noInner:To,noOuter:Io,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=ze(na(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,y=u.options;if(o){var b=Q({},t),S=na(y.inner,r,b)||{},U=na(y.outer,r,b)||{};Bo(S,To),Bo(U,Io),o.top?t.y=Math.min(Math.max(U.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(U.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(U.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yr=an(ba,"restrictEdges"),br=Q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),kr=an({start:Ma.start,set:Ma.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=an({start:function(n){return ba.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(na(f.min,t,n.coords))||xr,b=ce(na(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:Q({},ba.noInner),outer:Q({},ba.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ba.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,U=S.offsetWithOrigin?function(xe){var $e=xe.interaction.element,Pe=ze(nt(xe.state.options.origin,null,null,[$e])),Ge=Pe||re(xe.interactable,$e,xe.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=nt(S.offset,r,u,[o]);(t=ze(B)||{x:0,y:0}).x+=U.x,t.y+=U.y}var J=S.relativePoints;y.offsets=f&&J&&J.length?J.map(function(xe,$e){return{index:$e,relativePoint:xe,x:b.left-f.width*xe.x+t.x,y:b.top-f.height*xe.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,y=re(t.interactable,t.element,t.prepared.name),b=Q({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var U=0,B=f;U<B.length;U++)for(var J=B[U],xe=b.x-J.x,$e=b.y-J.y,Pe=0,Ge=u.targets.length;Pe<Ge;Pe++){var it=u.targets[Pe],at=void 0;(at=T.func(it)?it(xe,$e,t._proxy,J,Pe):it)&&S.push({x:(T.number(at.x)?at.x:xe)+J.x,y:(T.number(at.y)?at.y:$e)+J.y,range:T.number(at.range)?at.range:u.range,source:it,index:Pe,offset:J})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,kt=_t.x-b.x,tn=_t.y-b.y,Kt=dt(kt,tn),un=Kt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(un=!1),ht.target&&!(un?ht.inRange&&mt!==1/0?Kt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=_t,ht.distance=Kt,ht.range=mt,ht.inRange=un,ht.delta.x=kt,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Q({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var U=S[b],B=void 0;if(B=T.func(U)?U(y.x,y.y,t):U){for(var J=0,xe=o.targetFields;J<xe.length;J++){var $e=xe[J],Pe=$e[0],Ge=$e[1];if(Pe in B||Ge in B){B.x=B[Pe],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=io.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=an(za,"snapSize"),so={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:Q(mn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Jt),n.usePlugin(dr),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,Ao=function(n){D(o,n);var t=$(o);function o(r,u,f,y,b,S){var U;if(d(this,o),C(N(U=t.call(this,b)),f),f!==u&&C(N(U),u),U.timeStamp=S,U.originalEvent=f,U.type=r,U.pointerId=P(u),U.pointerType=ae(u),U.target=y,U.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);U.dt=U.timeStamp-b.pointers[B].downTime;var J=U.timeStamp-b.tapTime;U.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===U.target&&J<500}else r==="doubletap"&&(U.dt=u.timeStamp-b.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(_e),ka={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ka,n.defaults.actions.pointerEvents=ka.defaults,Q(n.actions.phaselessTypes,ka.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget,S=o.pointerIndex,U=u.pointers[S].hold,B=qe(b),J={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},xe=0;xe<B.length;xe++){var $e=B[xe];J.node=$e,r.fire("pointerEvents:collect-targets",J)}if(J.targets.length){for(var Pe=1/0,Ge=0,it=J.targets;Ge<it.length;Ge++){var at=it[Ge].eventable.options.holdDuration;at<Pe&&(Pe=at)}U.duration=Pe,U.timeout=setTimeout(function(){Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Pe)}})(n,t),Gn(n,t)},"interactions:up":function(n,t){co(n),Gn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),Gn(n,t)}},PointerEvent:Ao,fire:Gn,collectEventTargets:No,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 Gn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=n.targets,S=b===void 0?No(n,t):b,U=new Ao(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:U},J=0;J<S.length;J++){var xe=S[J];for(var $e in xe.props||{})U[$e]=xe.props[$e];var Pe=re(xe.eventable,xe.node);if(U._subtractOrigin(Pe),U.eventable=xe.eventable,U.currentTarget=xe.node,xe.eventable.fire(U),U._addOrigin(Pe),U.immediatePropagationStopped||U.propagationStopped&&J+1<S.length&&S[J+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=U.double?Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):U;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return U}function No(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var U=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:U,targets:[],node:null},J=0;J<U.length;J++){var xe=U[J];B.node=xe,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function($e){var Pe,Ge;return $e.eventable.options.holdDuration===((Pe=o.pointers[b])==null||(Ge=Pe.hold)==null?void 0:Ge.duration)})),B.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ka});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ka);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Ir,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Q(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;Q(o.events.options,t.pointerEvents.defaults),Q(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,zr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,U=function(){var J=y[B],xe=r.getRect(J);if(!xe)return 1;var $e,Pe=fe(f.interactions.list,function(at){return at.interacting()&&at.interactable===r&&at.element===J&&at.prepared.name===u.name});if(Pe)Pe.move(),S&&($e=Pe._reflowPromise||new b(function(at){Pe._reflowResolve=at}));else{var Ge=ce(xe),it=function(at){return{coords:at,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});$e=function(at,ht,yt,_t,mt){var kt=at.interactions.new({pointerType:"reflow"}),tn={interaction:kt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};kt.interactable=ht,kt.element=yt,kt.prevEvent=mt,kt.updatePointer(mt,mt,yt,!0),Y(kt.coords.delta),Bt(kt.prepared,_t),kt._doPhase(tn);var Kt=at.window,un=Kt.Promise,En=un?new un(function(Pn){kt._reflowResolve=Pn}):void 0;return kt._reflowPromise=En,kt.start(_t,ht,yt),kt._interacting?(kt.move(tn),kt.end(mt)):(kt.stop(),kt._reflowResolve()),kt.removePointer(mt,mt),En}(f,r,J,u,it)}S&&S.push($e)},B=0;B<y.length&&!U();B++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Pr=zr;if(en.use(jn),en.use(ln),en.use(Mr),en.use(cn),en.use(Sr),en.use(Xn),en.use(et),en.use(vt),en.use(Pr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ca,Ca.exports)),Ca.exports}var gd=vd();const nl=Re.getDefaultExportFromCjs(gd),ao=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(jl),x=e.inject(Kl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),h=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 D=!1,E=!1,_=NaN,N=NaN,$=NaN,V=NaN,ye=-1,H=-1,j=-1,ie=-1,w=l.x,z=l.y,k=l.w,A=l.h;const T=e.ref(),le=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:T,calcXY:nt});function Fe(v){Te(v)}function ot(){Xe()}function Ie(v){pn(l.isDraggable)&&(h.draggable=v)}function je(v){pn(l.isResizable)&&(h.resizable=v)}function we(v){pn(l.isBounded)&&(h.bounded=v)}function I(v){h.transformScale=v}function te(v){h.rowHeight=v}function ee(v){h.maxRows=v}function he(){h.rtl=el()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(le),e.onBeforeMount(()=>{h.rtl=el()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Gl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,pn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,pn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,pn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,nn(Ye)}),x.on("updateWidth",Fe),x.on("compact",ot),x.on("setDraggable",Ie),x.on("setResizable",je),x.on("setBounded",we),x.on("setTransformScale",I),x.on("setRowHeight",te),x.on("setMaxRows",ee),x.on("directionchange",he),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Fe),x.off("compact",ot),x.off("setDraggable",Ie),x.off("setResizable",je),x.off("setBounded",we),x.off("setTransformScale",I),x.off("setRowHeight",te),x.off("setMaxRows",ee),x.off("directionchange",he),x.off("setColNum",Ue),g.value&&(g.value.unset(),g.value=null),d.decreaseItem(le)}),i({state:h,wrapper:T});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),me=e.computed(()=>(h.draggable||h.resizable)&&!l.static),ke=id("item"),Me=e.computed(()=>({[ke.b()]:!0,[ke.bm("resizable")]:q.value,[ke.bm("static")]:l.static,[ke.bm("resizing")]:h.isResizing,[ke.bm("dragging")]:h.isDragging,[ke.bm("transform")]:h.useCssTransforms,[ke.bm("rtl")]:M.value,[ke.bm("no-touch")]:st&&me.value})),Ve=e.computed(()=>[ke.be("resizer"),M.value&&ke.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{nn(C),nn(Y)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{nn(Y)}),e.watch(()=>h.rowHeight,()=>{nn(Ye),nn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(Y),nn(Ye),nn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Y)}),e.watch(M,()=>{nn(Y),nn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),nn(Ye),nn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let F;h.useCssTransforms?M.value?F=ad(v.top,v.right,v.width,v.height):F=nd(v.top,v.left,v.width,v.height):M.value?F=ld(v.top,v.right,v.width,v.height):F=od(v.top,v.left,v.width,v.height),h.style=F}function qe(){const v={};for(const F of["width","height"]){const Z=h.style[F].match(/^(\d+)px$/);if(!Z)return;v[F]=Z[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const F=v.type;if(F==="resizestart"&&h.isResizing||F!=="resizestart"&&!h.isResizing)return;const Z=Qo(v);if(pn(Z))return;const{x:P,y:ue}=Z,R={width:0,height:0};let X;switch(F){case"resizestart":{Y(),ye=k,H=A,X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing=R,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&($=P),!v.edges.top&&!v.edges.bottom&&(V=ue);const se=Zo($,V,P,ue);M.value?R.width=h.resizing.width-se.deltaX/h.transformScale:R.width=h.resizing.width+se.deltaX/h.transformScale,R.height=h.resizing.height+se.deltaY/h.transformScale,h.resizing=R;break}case"resizeend":{X=tt(w,z,k,A),R.width=X.width,R.height=X.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}X=re(R.height,R.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),$=P,V=ue,(k!==X.w||A!==X.h)&&c("resize",l.i,X.h,X.w,R.height,R.width),v.type==="resizeend"&&(ye!==k||H!==A)&&c("resized",l.i,X.h,X.w,R.height,R.width),x.emit("resizeEvent",v.type,l.i,w,z,X.h,X.w)}function Q(v){if(l.static||h.isResizing)return;const F=v.type;if(F==="dragstart"&&h.isDragging||F!=="dragstart"&&!h.isDragging)return;const Z=Qo(v);if(pn(Z))return;const{x:P,y:ue}=Z,R=v.target;if(!R.offsetParent)return;const X={top:0,left:0};switch(F){case"dragstart":{j=w,ie=z;const ve=R.offsetParent.getBoundingClientRect(),K=R.getBoundingClientRect(),ae=K.left/h.transformScale,G=ve.left/h.transformScale,_e=K.right/h.transformScale,de=ve.right/h.transformScale,Ee=K.top/h.transformScale,L=ve.top/h.transformScale;M.value?X.left=(_e-de)*-1:X.left=ae-G,X.top=Ee-L,h.dragging=X,h.isDragging=!0;break}case"dragmove":{const ve=Zo(_,N,P,ue);if(M.value?X.left=h.dragging.left-ve.deltaX/h.transformScale:X.left=h.dragging.left+ve.deltaX/h.transformScale,X.top=h.dragging.top+ve.deltaY/h.transformScale,h.bounded){const K=R.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);X.top=oe(X.top,0,K);const ae=ze(),G=h.containerWidth-ce(l.w,ae,h.margin[0]);X.left=oe(X.left,0,G)}h.dragging=X;break}case"dragend":{const ve=R.offsetParent.getBoundingClientRect(),K=R.getBoundingClientRect(),ae=K.left/h.transformScale,G=ve.left/h.transformScale,_e=K.right/h.transformScale,de=ve.right/h.transformScale,Ee=K.top/h.transformScale,L=ve.top/h.transformScale;M.value?X.left=(_e-de)*-1:X.left=ae-G,X.top=Ee-L,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let se;M.value,se=nt(X.top,X.left),_=P,N=ue,(w!==se.x||z!==se.y)&&c("move",l.i,se.x,se.y),v.type==="dragend"&&(j!==w||ie!==z)&&c("moved",l.i,se.x,se.y),x.emit("dragEvent",v.type,l.i,se.x,se.y,A,k)}function tt(v,F,Z,P){const ue=ze();let R;return M.value?R={right:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])}:R={left:Math.round(ue*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:Z===1/0?Z:Math.round(ue*Z+Math.max(0,Z-1)*h.margin[0]),height:P===1/0?P:Math.round(h.rowHeight*P+Math.max(0,P-1)*h.margin[1])},R}function nt(v,F){const Z=ze();let P=Math.round((F-h.margin[0])/(Z+h.margin[0])),ue=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return P=Math.max(Math.min(P,h.cols-k),0),ue=Math.max(Math.min(ue,h.maxRows-A),0),{x:P,y:ue}}function ze(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,F,Z){return Number.isFinite(v)?Math.round(F*v+Math.max(0,v-1)*Z):v}function oe(v,F,Z){return Math.max(Math.min(v,Z),F)}function re(v,F,Z=!1){const P=ze();let ue=Math.round((F+h.margin[0])/(P+h.margin[0])),R=0;return Z?R=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):R=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),ue=Math.max(Math.min(ue,h.cols-w),0),R=Math.max(Math.min(R,h.maxRows-z),0),{w:ue,h:R}}function Te(v,F){h.containerWidth=v}function Xe(){Ye()}function dt(){!g.value&&T.value&&(g.value=nl(T.value),h.useStyleCursor||g.value.styleCursor(!1))}const m=Xo(Q);function C(){if(dt(),!!g.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};g.value.draggable(v),D||(D=!0,g.value.on("dragstart dragmove dragend",F=>{F.type==="dragmove"?m(F):Q(F)}))}else g.value.draggable({enabled:!1})}const W=Xo(lt);function Y(){if(dt(),!!g.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),F=tt(0,0,l.minW,l.minH),Z={edges:{left:M.value?`.${Ve.value[0]}`:!1,right:M.value?!1:`.${Ve.value[0]}`,bottom:`.${Ve.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:F.height*h.transformScale,width:F.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Z.modifiers=[nl.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(Z),E||(E=!0,g.value.on("resizestart resizemove resizeend",P=>{P.type==="resizemove"?W(P):lt(P)}))}else g.value.resizable({enabled:!1})}return(v,F)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:T,class:e.normalizeClass(Me.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ve.value)},null,2)):e.createCommentVNode("",!0)],6))}}),sa=typeof window<"u";var al;sa&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ol(a){return a!=null}function ll(){}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)));const yd=sa&&("ontouchstart"in window||kd()>0),bd=yd?"pointerdown":"click";function kd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function xd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=i;if(!ol(l)||l==="")return!1;let g;return ol(s)?g=new s(l,{bubbles:c,cancelable:d}):(g=document.createEvent("HTMLEvents"),g.initEvent(l,c,d)),Object.assign(g,x),a.dispatchEvent(g)}const wd="clickoutside",Dd=new Set;sa&&document.addEventListener(bd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();Dd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&xd(l,{type:wd})})},!0);const Cd=[["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 Wa;if(sa){for(const a of Cd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const Ed=new Set,_d=new WeakMap;if(sa&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(Ed.forEach(s=>{s.value=!1}),document[a]){const s=_d.get(document[a]);s&&(s.value=!0)}},!1)}const Yl=new Map;Yl.set("x",0);Yl.set("y",0);var la=[],Sd=function(){return la.some(function(a){return a.activeTargets.length>0})},Td=function(){return la.some(function(a){return a.skippedTargets.length>0})},rl="ResizeObserver loop completed with undelivered notifications.",Id=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:rl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=rl),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var ra=function(a){return Object.freeze(a)},Bd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,ra(this)}return a}(),Jl=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ra(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,x=i.bottom,g=i.left,h=i.width,D=i.height;return{x:s,y:l,top:c,right:d,bottom:x,left:g,width:h,height:D}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Co=function(a){return a instanceof SVGElement&&"getBBox"in a},Ql=function(a){if(Co(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},il=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Ad=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ta=typeof window<"u"?window:{},Fa=new WeakMap,sl=/auto|scroll/,Nd=/^tb|vertical/,Vd=/msie|trident/i.test(Ta.navigator&&Ta.navigator.userAgent),On=function(a){return parseFloat(a||"0")},va=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Bd((s?i:a)||0,(s?a:i)||0)},cl=ra({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Jl(0,0,0,0)}),Zl=function(a,i){if(i===void 0&&(i=!1),Fa.has(a)&&!i)return Fa.get(a);if(Ql(a))return Fa.set(a,cl),cl;var s=getComputedStyle(a),l=Co(a)&&a.ownerSVGElement&&a.getBBox(),c=!Vd&&s.boxSizing==="border-box",d=Nd.test(s.writingMode||""),x=!l&&sl.test(s.overflowY||""),g=!l&&sl.test(s.overflowX||""),h=l?0:On(s.paddingTop),D=l?0:On(s.paddingRight),E=l?0:On(s.paddingBottom),_=l?0:On(s.paddingLeft),N=l?0:On(s.borderTopWidth),$=l?0:On(s.borderRightWidth),V=l?0:On(s.borderBottomWidth),ye=l?0:On(s.borderLeftWidth),H=_+D,j=h+E,ie=ye+$,w=N+V,z=g?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-ie-a.clientWidth:0,A=c?H+ie:0,T=c?j+w:0,le=l?l.width:On(s.width)-A-k,Fe=l?l.height:On(s.height)-T-z,ot=le+H+k+ie,Ie=Fe+j+z+w,je=ra({devicePixelContentBoxSize:va(Math.round(le*devicePixelRatio),Math.round(Fe*devicePixelRatio),d),borderBoxSize:va(ot,Ie,d),contentBoxSize:va(le,Fe,d),contentRect:new Jl(_,h,le,Fe)});return Fa.set(a,je),je},er=function(a,i,s){var l=Zl(a,s),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(i){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},Od=function(){function a(i){var s=Zl(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=ra([s.borderBoxSize]),this.contentBoxSize=ra([s.contentBoxSize]),this.devicePixelContentBoxSize=ra([s.devicePixelContentBoxSize])}return a}(),tr=function(a){if(Ql(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Md=function(){var a=1/0,i=[];la.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(g){var h=new Od(g.target),D=tr(g.target);x.push(h),g.lastReportedSize=er(g.target,g.observedBox),D<a&&(a=D)}),i.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},ul=function(a){la.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},zd=function(){var a=0;for(ul(a);Sd();)a=Md(),ul(a);return Td()&&Id(),a>0},fo,nr=[],Pd=function(){return nr.splice(0).forEach(function(a){return a()})},Rd=function(a){if(!fo){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Pd()}).observe(s,l),fo=function(){s.textContent="".concat(i?i--:i++)}}nr.push(a),fo()},Ld=function(a){Rd(function(){requestAnimationFrame(a)})},Ha=0,Fd=function(){return!!Ha},$d=250,jd={attributes:!0,characterData:!0,childList:!0,subtree:!0},pl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},ho=!1,Kd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=$d),!ho){ho=!0;var l=dl(i);Ld(function(){var c=!1;try{c=zd()}finally{if(ho=!1,i=l-dl(),!Fd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,jd)};document.body?s():Ta.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),pl.forEach(function(s){return Ta.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),pl.forEach(function(s){return Ta.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),bo=new Kd,fl=function(a){!Ha&&a>0&&bo.start(),Ha+=a,!Ha&&bo.stop()},Ud=function(a){return!Co(a)&&!Ad(a)&&getComputedStyle(a).display==="inline"},Wd=function(){function a(i,s){this.target=i,this.observedBox=s||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=er(this.target,this.observedBox,!0);return Ud(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Hd=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,hl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},ja=function(){function a(){}return a.connect=function(i,s){var l=new Hd(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;hl(c.observationTargets,s)<0&&(d&&la.push(c),c.observationTargets.push(new Wd(s,l&&l.box)),fl(1),bo.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=hl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&la.splice(la.indexOf(l),1),l.observationTargets.splice(c,1),fl(-1))},a.disconnect=function(i){var s=this,l=$a.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),qd=function(){function a(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.");ja.connect(this,i)}return a.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(!il(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,i,s)},a.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(!il(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,i)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Gd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:g}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:g??D}))}}}const ar=new(sa&&window.ResizeObserver||qd)(Gd);function vl(a,i){oo.set(a,i),ar.observe(a)}function gl(a){oo.has(a)&&(ar.unobserve(a),oo.delete(a))}function Xd(a={}){let i=ll;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(vl(c,a.onResize),i=()=>{gl(c),i=ll})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:vl,unobserveResize:gl,unobserve:l}}const Yd=e.ref(!1);e.computed(()=>Yd.value);const ml="__theme_style__",vo="__theme_observer__",yl=e.reactive(new Map),bl=new Map;e.watch(yl,()=>{if(!sa)return;bl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${vo} { width: 1px }`,l=1;for(const[c,[d,x]]of yl.entries())s+=` html.${d} .${vo}, .${x} .${vo} { width: ${++l}px }`,bl.set(l,c);i.textContent=s,i.id=ml,document.head.appendChild(i)});const or=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(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,g=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Xd(),_=Xp();_.on("resizeEvent",N),_.on("dragEvent",$),e.onBeforeMount(()=>{c("layout-before-mount",g.value)}),e.onMounted(()=>{c("layout-mounted",g.value),e.nextTick(()=>{rd(g.value),d.originalLayout=g.value,e.nextTick(()=>{Fe(),h.value&&D(h.value,Yp(w,16)),da(g.value,l.verticalCompact),c("layout-updated",g.value),ie(),w()})})}),e.onBeforeUnmount(()=>{_.clearAll(),h.value&&E(h.value)});function N(Ie,je,we,I,te,ee){T(Ie,je,we,I,te,ee)}function $(Ie,je,we,I,te,ee){A(Ie,je,we,I,te,ee)}e.watch(()=>d.width,(Ie,je)=>{e.nextTick(()=>{_.emit("updateWidth",Ie),je===-1&&e.nextTick(()=>{c("layout-ready",g.value)}),ie()})}),e.watch(()=>[l.layout,l.layout.length],()=>{g.value=l.layout,j()}),e.watch(()=>l.colNum,Ie=>{_.emit("setColNum",Ie)}),e.watch(()=>l.rowHeight,Ie=>{_.emit("setRowHeight",Ie)}),e.watch(()=>l.isDraggable,Ie=>{_.emit("setDraggable",Ie)}),e.watch(()=>l.isResizable,Ie=>{_.emit("setResizable",Ie)}),e.watch(()=>l.isBounded,Ie=>{_.emit("setBounded",Ie)}),e.watch(()=>l.transformScale,Ie=>{_.emit("setTransformScale",Ie)}),e.watch(()=>l.responsive,Ie=>{Ie||(c("update:layout",d.originalLayout),_.emit("setColNum",l.colNum)),w()}),e.watch(()=>l.maxRows,Ie=>{_.emit("setMaxRows",Ie)}),e.watch([()=>l.margin,()=>l.margin[1]],ie),e.provide(jl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ye})),e.provide(Kl,_),i({state:d,getItem:H,resizeEvent:T,dragEvent:A,layoutUpdate:j});function V(Ie){x.set(Ie.i,Ie)}function ye(Ie){x.delete(Ie.i)}function H(Ie){return x.get(Ie)}function j(){if(!pn(g.value)&&!pn(d.originalLayout)){if(g.value.length!==d.originalLayout.length){const Ie=ot(g.value,d.originalLayout);if(Ie.length>0)if(g.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ie);else{const je=new Set(Ie.map(we=>we.i));d.originalLayout=d.originalLayout.filter(we=>!je.has(we.i))}d.lastLayoutLength=g.value.length,Fe()}da(g.value,l.verticalCompact),_.emit("updateWidth",d.width),ie(),c("layout-updated",g.value)}}function ie(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),_.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Ie=parseFloat(l.margin[1]);return Qp(g.value)*(l.rowHeight+Ie)+Ie+"px"}let k;function A(Ie,je,we,I,te,ee){let he=Yo(g.value,je);pn(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Ie==="dragstart"&&!l.verticalCompact&&(k=g.value.reduce((Ue,{i:st,x:q,y:M})=>({...Ue,[st]:{x:q,y:M}}),{})),Ie==="dragmove"||Ie==="dragstart"?(d.placeholder.i=je,d.placeholder.x=he.x,d.placeholder.y=he.y,d.placeholder.w=ee,d.placeholder.h=te,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),g.value=yo(g.value,he,we,I,!0,l.preventCollision),l.restoreOnDrag?(he.static=!0,da(g.value,l.verticalCompact,k),he.static=!1):da(g.value,l.verticalCompact),_.emit("compact"),ie(),Ie==="dragend"&&(k=void 0,c("layout-updated",g.value))}function T(Ie,je,we,I,te,ee){let he=Yo(g.value,je);pn(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Wl(g.value,{...he,w:ee,h:te}).filter(q=>q.i!==he.i);if(Ue=st.length>0,Ue){let q=1/0,M=1/0;st.forEach(me=>{me.x>he.x&&(q=Math.min(q,me.x)),me.y>he.y&&(M=Math.min(M,me.y))}),Number.isFinite(q)&&(he.w=q-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ue||(he.w=ee,he.h=te),Ie==="resizestart"||Ie==="resizemove"?(d.placeholder.i=je,d.placeholder.x=we,d.placeholder.y=I,d.placeholder.w=he.w,d.placeholder.h=he.h,e.nextTick(()=>{d.isDragging=!0}),_.emit("updateWidth",d.width)):Ie&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&le(),da(g.value,l.verticalCompact),_.emit("compact"),ie(),Ie==="resizeend"&&c("layout-updated",g.value)}function le(){const Ie=ud(l.breakpoints,d.width);if(Ie===d.lastBreakpoint)return;const je=Gl(Ie,l.cols);!pn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=mo(g.value));const we=pd(d.originalLayout,d.layouts,l.breakpoints,Ie,d.lastBreakpoint,je,l.verticalCompact);d.layouts[Ie]=we,d.lastBreakpoint!==Ie&&c("breakpoint-changed",Ie,we),g.value=we,c("update:layout",we),d.lastBreakpoint=Ie,_.emit("setColNum",je)}function Fe(){d.layouts=Object.assign({},l.responsiveLayouts)}function ot(Ie,je){const we=new Set(je.map(he=>he.i)),I=new Set(Ie.map(he=>he.i)),te=Ie.filter(he=>!we.has(he.i)),ee=je.filter(he=>!I.has(he.i));return te.concat(ee)}return(Ie,je)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ie.$slots.default?e.renderSlot(Ie.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,we=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:we.i,ref_for:!0},we),{default:e.withCtx(()=>[e.renderSlot(Ie.$slots,"item",{item:we})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Jd={key:0,class:"item-view-group"},Qd={key:0,class:"item-view-group"},Zd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=jt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,x=e.computed(()=>d==null?void 0:d.children),g=e.computed(()=>{var N,$,V,ye;return((N=d==null?void 0:d.children)==null?void 0:N.length)>0&&(($=d==null?void 0:d.children)!=null&&$.every(H=>H==null?void 0:H.layout))?(ye=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ye.layout:"vertical"}),h=e.computed(()=>{var N,$;return(($=(N=d==null?void 0:d.children)==null?void 0:N[0])==null?void 0:$.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=N=>{c("rowClick",N)},_=(N,$)=>{c("routeUrl",N,$)};return(N,$)=>h.value?(e.openBlock(),e.createBlock(e.unref(or),{key:0,layout:x.value,"onUpdate:layout":$[0]||($[0]=V=>x.value=V),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(V,ye)=>(e.openBlock(),e.createBlock(e.unref(ao),{key:V.i,x:V.x,y:V.y,"min-h":V.minH,"max-h":V.maxH,"min-w":V.minW,w:V.w,h:V.h,i:V.i},{default:e.withCtx(()=>{var H,j,ie,w,z,k,A,T,le,Fe,ot,Ie,je;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ye===((H=d==null?void 0:d.children)==null?void 0:H.length)-1?"0px":"24px"})},[((ie=(j=V==null?void 0:V.component)==null?void 0:j.comp)==null?void 0:ie.toUpperCase())!=="TABLE"&&((w=V==null?void 0:V.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((z=V==null?void 0:V.component)==null?void 0:z.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:g.value,config:{showIndex:(A=e.unref(Et)[ye])==null?void 0:A.showIndex,allowMove:(T=e.unref(Et)[ye])==null?void 0:T.allowMove,viewport:(le=e.unref(Et)[ye])==null?void 0:le.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(wo),itemData:(Fe=V==null?void 0:V.component)==null?void 0:Fe.compData,childItemData:(ot=V==null?void 0:V.component)==null?void 0:ot.itemChildData,key:e.unref(ga),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ye,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Ie=V==null?void 0:V.component)==null?void 0:Ie.tableId,allMapContents:e.unref(Ja),children:(je=V==null?void 0:V.component)==null?void 0:je.children,level:D.value,onRowClick:E,onRouteUrl:_,onClickTrigger:e.unref(Ml),onClickMainKey:e.unref(zl)},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(d==null?void 0:d.children,(V,ye)=>{var H,j;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:parseInt(ye)===((H=d==null?void 0:d.children)==null?void 0:H.length)-1?"0px":"24px"})},[((j=V==null?void 0:V.comp)==null?void 0:j.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",Qd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"0px":"8px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(ga),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ye,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:_},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),ef=Rt._export_sfc(Zd,[["__scopeId","data-v-3babf83a"]]),lr=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"}]),tf={TABLE:fa.ssTable,FORM:Po,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ro,FOLD:tc,CALCULATOR:ic,METHODBUTTON:_c,AVATARUPLOAD:Mo.ssAvatar,SIGNATURE:Mo.ssSignature,FORMTOP:Po,STEP:Rc,STEPOPERATE:Hs,TIMELINE:Uc,TIMELINEOPERATE:Qs,FORMTOPOPERATE:Ro,SIGNATUREOPERATE:Mc,AVATARUPLOADOPERATE:Ic,TABS:qc,TABSOPERATE:Nu,CHART:Hu,CHARTOPERATE:ap,LAYOUT:Pp,LAYOUTOPERATE:Hp,PARENTITEM:ef};function ma(a){return tf[a==null?void 0:a.toUpperCase()]||null}exports.De=or;exports.activeStepInfo=ha;exports.affixItems=bp;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=mc;exports.checkIsQuote=dc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=pc;exports.checkIsShowTable=vc;exports.checkIsTableCheck=uc;exports.checkIsUsingGroup=cc;exports.clickMainKey=zl;exports.clickSavePage=yp;exports.clickStep=Rl;exports.clickTrigger=Ml;exports.compId=ga;exports.compNames=wo;exports.compShow=Ya;exports.contentTransArray=wa;exports.contentTransArrayToAll=Ea;exports.contentTransArrayToAllNoExtra=Ga;exports.debounce=ko;exports.existLayouts=Tp;exports.formToExtraContent=gc;exports.generateLayouts=gs;exports.getComponent=ma;exports.getComponents=Qa;exports.getExtraContents=bc;exports.getSliceContLength=Np;exports.gridRowHeight=ps;exports.isStepLayout=Do;exports.isUndefined=wl;exports.newContentTransArrayToAllNoExtra=hc;exports.onBack=gp;exports.onChange=eo;exports.onClick=mp;exports.onContentChange=to;exports.onExtendTaskEnd=Sp;exports.onPageBack=Ip;exports.onPageChange=no;exports.onSaveBack=Bl;exports.onSelectFixContent=vp;exports.renderShowItems=Nl;exports.showItems=Et;exports.sliceTableLength=Vl;exports.slotContent=lr;exports.st=ao;exports.stepItems=Vp;exports.toNumber=go;exports.toolBar=Fn;exports.verifyButton=Bp;
|