ss-component-new 1.2.111 → 1.2.113
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-hWX_D7j7.js → MTLLoader-CxvMDUe0.js} +1 -1
- package/dist/{MTLLoader-BgOTItOM.cjs → MTLLoader-DGjQiY9j.cjs} +1 -1
- package/dist/{OBJLoader-C3tq7BYe.cjs → OBJLoader-DJpc8vUj.cjs} +1 -1
- package/dist/{OBJLoader-BukOM4Nu.js → OBJLoader-qAJoaDam.js} +1 -1
- package/dist/{OrbitControls-jkIlFyOy.js → OrbitControls-BMEUSilq.js} +1 -1
- package/dist/{OrbitControls-DKRnuekm.cjs → OrbitControls-Y0_MwO63.cjs} +1 -1
- package/dist/{URDFLoader-VSdgVBcE.js → URDFLoader-DFaB1rOB.js} +97 -97
- package/dist/{URDFLoader-CX_gwIob.cjs → URDFLoader-z_OD751c.cjs} +1 -1
- package/dist/{animationData-B6OrW5p6.js → animationData-Clde34ha.js} +7 -7
- package/dist/{animationData-C7dHVqYg.cjs → animationData-DcdD2uXH.cjs} +1 -1
- package/dist/{array-B_QF2OoW.js → array-DdC5qADi.js} +1 -1
- package/dist/{array-BgZ91brz.cjs → array-DyI9Z7da.cjs} +1 -1
- package/dist/{iconfont-BgB-_U_6.js → iconfont-BXKkx1g6.js} +88 -88
- package/dist/iconfont-Bi9FnKuf.cjs +1 -0
- package/dist/{index-d_PGJZkK.js → index-4PVKlafX.js} +1 -1
- package/dist/{index-CT0ojXx1.cjs → index-6hYePeg5.cjs} +1 -1
- package/dist/{index-cgzu94nF.cjs → index-B1DG30Df.cjs} +1 -1
- package/dist/{index-azgr74so.js → index-B8eH4yd_.js} +1 -1
- package/dist/{index-CUKZC4Nj.js → index-BAvTpFlb.js} +1 -1
- package/dist/{index-CbzP4t5J.cjs → index-BDUgsfdc.cjs} +1 -1
- package/dist/{index-DkTkLUFp.js → index-BGYM_yzB.js} +1 -1
- package/dist/index-BUC9msP6.cjs +1 -0
- package/dist/{index-9Bq99VYB.cjs → index-BWdy2G65.cjs} +1 -1
- package/dist/{index-BOfis0vA.js → index-BZBOlP5a.js} +3 -3
- package/dist/{index-Bx40M9YE.js → index-BfVijxl4.js} +1 -1
- package/dist/{index-CcCFQb0J.cjs → index-BgMxvBrj.cjs} +1 -1
- package/dist/{index-BheoHyAf.cjs → index-BsyhUS4V.cjs} +1 -1
- package/dist/{index-B2-FEPjF.js → index-BxrVd7R_.js} +1 -1
- package/dist/{index-BcQjNx-Q.cjs → index-C5pOxrIu.cjs} +1 -1
- package/dist/{index-Co-G3YR2.cjs → index-C6VrMmAM.cjs} +1 -1
- package/dist/{index-Cyq0NQxD.js → index-CH7VgZsg.js} +4 -4
- package/dist/{index-DTM9dTrs.js → index-CKtVnHqz.js} +1 -1
- package/dist/{index-D4M6WyOm.js → index-CL-M8PGp.js} +3422 -3421
- package/dist/{index-BPP3Oi4x.js → index-CNyI4C5D.js} +4 -4
- package/dist/{index-ClqfqYxq.cjs → index-CWUgMjDD.cjs} +1 -1
- package/dist/{index-C1XnW8VT.cjs → index-CXPAg3zi.cjs} +1 -1
- package/dist/{index-DPGM3-ZE.js → index-Cag9EKDi.js} +9 -9
- package/dist/{index-BNGaTEx5.cjs → index-Ce63svvK.cjs} +1 -1
- package/dist/{index-Dll9lcYi.js → index-Cfh6xox2.js} +1 -1
- package/dist/{index-D-h6ztpZ.cjs → index-CoVIQ7yB.cjs} +1 -1
- package/dist/{index-ygHebc1d.js → index-CrLgmQwX.js} +16 -16
- package/dist/{index-DaMyMwHq.js → index-Ct7FxVrb.js} +1 -1
- package/dist/{index-BKWeM8bu.js → index-D2J4nD2U.js} +3 -3
- package/dist/{index-CCixZ8x2.cjs → index-D6gzqbUQ.cjs} +1 -1
- package/dist/{index-DQW-r04P.js → index-D7uWgp_G.js} +1 -1
- package/dist/{index-Cs6-4hum.js → index-DZ6iK-To.js} +2 -2
- package/dist/{index-B_CKxC0N.cjs → index-Ddk7mQP9.cjs} +1 -1
- package/dist/{index-DbDdlA5q.js → index-Ddl5YPaT.js} +7 -7
- package/dist/{index-BE67ZntN.js → index-Dn7a-X3Y.js} +2 -2
- package/dist/index-DnoDETkE.cjs +1 -0
- package/dist/{index-9ASTWGRl.cjs → index-DvR7fcc6.cjs} +1 -1
- package/dist/{index-i-fwIxhy.cjs → index-Dw15nvpm.cjs} +1 -1
- package/dist/{index-DalbUyWu.cjs → index-DyLovBRT.cjs} +1 -1
- package/dist/{index-Cjs5dfSY.cjs → index-Md9bylWp.cjs} +1 -1
- package/dist/{index-Bnhk2Wum.js → index-OXqTOaYL.js} +1 -1
- package/dist/{index-6kcPKvxJ.cjs → index-PGBtNsFS.cjs} +1 -1
- package/dist/{index-VMUoElNW.js → index-bNwKGgV2.js} +4 -4
- package/dist/{index-Cf1Y1Sze.cjs → index-lOzwjQZi.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BgpRnb6p.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D1CNkdop.js} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-cYS0o50W.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DzZjQSCB.cjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dgy71NC0.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DV9lk-8w.js} +22 -31
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-o8Cf7V1D.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eVz0Sp.cjs} +149 -149
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-D5E2HyCn.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Bo97w4bj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BEM7doEB.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Deyo5lI4.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_1_lang-C6g1KtOz.cjs → index.vue_vue_type_style_index_1_lang-BwsR7epS.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Cqs4qqQV.js → index.vue_vue_type_style_index_1_lang-Duqg1WtV.js} +4 -4
- package/dist/{loaderUtil-BFbM8t6R.js → loaderUtil-1wRb28no.js} +1 -1
- package/dist/{loaderUtil-DWuLgv1P.cjs → loaderUtil-Cq8QCp9W.cjs} +1 -1
- package/dist/{main-BlxcR1aO.js → main-5e5sWLUD.js} +3 -3
- package/dist/{main-BIJA7Oyr.cjs → main-CBFpUWMt.cjs} +1 -1
- 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 +10 -10
- package/dist/{threeModel-wFgYGhPU.cjs → threeModel-BbUQzHU5.cjs} +1 -1
- package/dist/{threeModel-B8-8TvnY.js → threeModel-BqpIaxlN.js} +4 -4
- package/dist/{threePreview-vuENkCyX.cjs → threePreview-Aib1ZmEj.cjs} +1 -1
- package/dist/{threePreview-BgJvhDAL.js → threePreview-B-BL8PZx.js} +4 -4
- package/dist/{threeSceneView-D18FzdLv.js → threeSceneView-BVK89QUf.js} +8 -8
- package/dist/{threeSceneView-B7qSJrwR.cjs → threeSceneView-CLF-6z2y.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-RT8liwZe.js → threeSceneViewForCPMPIP-BjV_TpZd.js} +7 -7
- package/dist/{threeSceneViewForCPMPIP-9yi6jiex.cjs → threeSceneViewForCPMPIP-wW_fS1HP.cjs} +1 -1
- package/dist/threeTrackPathView-BwlIgu4k.js +605 -0
- package/dist/threeTrackPathView-CjpKhUbd.cjs +1 -0
- package/dist/{threeViewerHost-DeU3hwnv.js → threeViewerHost-D3LMGTE2.js} +2 -2
- package/dist/{threeViewerHost-LpwVv2oj.cjs → threeViewerHost-EljVz9SK.cjs} +1 -1
- package/dist/{urdfTree-DLpxOUSk.js → urdfTree-C1_9e3Ka.js} +1 -1
- package/dist/{urdfTree-DE-KsOZc.cjs → urdfTree-W9sGK4ua.cjs} +1 -1
- package/dist/{workpieceTreePanel-D2M5yIk2.js → workpieceTreePanel-B5YNWinu.js} +47 -47
- package/dist/{workpieceTreePanel-D0Y23OeS.cjs → workpieceTreePanel-DrSgMdW9.cjs} +1 -1
- package/package.json +1 -1
- package/dist/iconfont-DU9A12zM.cjs +0 -1
- package/dist/index-B-6muHKY.cjs +0 -1
- package/dist/index-CRIDwb3u.cjs +0 -1
- package/dist/threeTrackPathView-DWGdVtPl.js +0 -1458
- package/dist/threeTrackPathView-cB27_BKX.cjs +0 -370
package/dist/index-CRIDwb3u.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const xn=require("./index-B-6muHKY.cjs"),e=require("vue"),d=require("./index-C8qRkCgn.cjs"),zt=require("./index-DalbUyWu.cjs"),Ae=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-o8Cf7V1D.cjs"),Yt=require("./index-CT0ojXx1.cjs"),Ol=require("./threeViewerHost-LpwVv2oj.cjs"),jt=require("./index-DOCHgBta.cjs"),Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ml=require("./isString--eJE54G5.cjs"),zl=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Fl=require("./index-D-h6ztpZ.cjs"),Do=require("./index-BVaHwt5f.cjs"),jr=require("./index-ClqfqYxq.cjs"),Ur=require("./index-BpPyaNFa.cjs"),Wr=require("vue-router"),kn=require("./index-9hspBVrQ.cjs"),dn=require("./index-D_tbgi5B.cjs");var Hr=/\s/;function qr(n){for(var r=n.length;r--&&Hr.test(n.charAt(r)););return r}var Gr=/^\s+/;function Xr(n){return n&&n.slice(0,qr(n)+1).replace(Gr,"")}var Rl=NaN,Yr=/^[-+]0x[0-9a-f]+$/i,Jr=/^0b[01]+$/i,Qr=/^0o[0-7]+$/i,Zr=parseInt;function fl(n){if(typeof n=="number")return n;if(d.isSymbol(n))return Rl;if(d.isObject(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=d.isObject(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=Xr(n);var s=Jr.test(n);return s||Qr.test(n)?Zr(n.slice(2),s?2:8):Yr.test(n)?Rl:+n}var sl=function(){return d.root.Date.now()},ei="Expected a function",ti=Math.max,ai=Math.min;function ml(n,r,s){var o,c,u,y,g,h,b=0,w=!1,I=!1,L=!0;if(typeof n!="function")throw new TypeError(ei);r=fl(r)||0,d.isObject(s)&&(w=!!s.leading,I="maxWait"in s,u=I?ti(fl(s.maxWait)||0,r):u,L="trailing"in s?!!s.trailing:L);function J(N){var _=o,me=c;return o=c=void 0,b=N,y=n.apply(me,_),y}function M(N){return b=N,g=setTimeout(K,r),w?J(N):y}function Ee(N){var _=N-h,me=N-b,Ue=r-_;return I?ai(Ue,u-me):Ue}function X(N){var _=N-h,me=N-b;return h===void 0||_>=r||_<0||I&&me>=u}function K(){var N=sl();if(X(N))return pe(N);g=setTimeout(K,Ee(N))}function pe(N){return g=void 0,L&&o?J(N):(o=c=void 0,y)}function E(){g!==void 0&&clearTimeout(g),b=0,o=h=c=g=void 0}function F(){return g===void 0?y:pe(sl())}function D(){var N=sl(),_=X(N);if(o=arguments,c=this,h=N,_){if(g===void 0)return M(h);if(I)return clearTimeout(g),g=setTimeout(K,r),J(h)}return g===void 0&&(g=setTimeout(K,r)),y}return D.cancel=E,D.flush=F,D}var ni="[object Boolean]";function wo(n){return n===!0||n===!1||d.isObjectLike(n)&&d.baseGetTag(n)==ni}function Co(n){return n===void 0}const li={class:"form-content"},oi={title:"选择标签"},ri={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ii={class:"col-operate-wrap"},si={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ci={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:r}){const s=()=>{y.value=!1,g.value=!1,h.value=[]},o=n;e.computed(()=>{var z;const T=(z=ot.value)==null?void 0:z.split("/");return(T==null?void 0:T.some(U=>(U==null?void 0:U.includes("updateLoading"))||(U==null?void 0:U.includes("loading"))))?!1:We.value==="view"});const c=r,u=e.ref([]),y=e.ref(!1),g=e.ref(!1),h=e.ref([]),{getFileExtension:b}=Ol.useThreeSystem(),w=e.ref(),I=e.ref(!1),L=e.ref(!1),J=e.ref([]),M=e.ref(),Ee=e.ref(!1),X=e.ref([]),K=xn.useFormToTableComp(d.pinia),pe=xn.useFormComp(d.pinia),E=e.ref(!1),F=e.ref(),D=d.useLoginState(d.pinia),{loginUserInfo:N}=d.storeToRefs(D),_=e.ref(),me=e.ref(!0),Ue=jt.useModelComp(d.pinia),{tableViewContents:it,itemData:Fe,isEdit:We,routeToChildPath:_e,lockingPage:V}=d.storeToRefs(Ue),le=e.ref(null),ie=e.ref(!1),ue=e.ref(!1),Ye=jt.useMenuState(),{activeMenuPath:ot}=d.storeToRefs(Ye),Q=Ae.useOriginalState(d.pinia),{originalPath:R}=d.storeToRefs(Q),ye=e.ref([]),we=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),je=async T=>{ue.value=T,await Oe("disabled",null,T,!0)},$e=async T=>{await Oe("operable",null,T,!0)};e.watch(()=>ot.value,async()=>{u.value=[],h.value=[]},{deep:!0,immediate:!0});const Je=()=>{e.nextTick(()=>{W()})},Ge=T=>{var ae;u.value=(ae=u.value)==null?void 0:ae.map(z=>({...z,isFormColHidden:!(T!=null&&T.includes(z.label))}))};e.onUnmounted(()=>{le.value=null});const de=T=>{c("clickTrigger",T)},S=async T=>{var ae,z,U,$,H,De;if(T===""){let oe="";(ae=u.value)==null||ae.forEach(xe=>{xe!=null&&xe.isMain&&(oe=xe==null?void 0:xe.value)});let Y=await Ae.getItemData(_e.value,sessionStorage.getItem("systemKey"),"");oe=((De=(H=($=(U=(z=Y==null?void 0:Y[0])==null?void 0:z.compData)==null?void 0:U.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:$.contents)==null?void 0:H[0])==null?void 0:De.routerContent)+R.value+oe;let se=await Ae.getItemData(oe,sessionStorage.getItem("systemKey"),"");Ee.value=!0,X.value=se==null?void 0:se.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),c("routeUrl",X.value)}},W=()=>{var ae;const T=(ae=le.value)==null?void 0:ae.$el;T&&Ae.Sortable.create(T,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:U,newIndex:$}=z;if(U===$)return;const H=u.value.splice(U,1)[0];u.value.splice($,0,H)}})},Oe=async(T,ae,z,U=!1)=>{var $,H,De,oe,Y,re,se,xe;try{Ue.setRefreshCurStructure(!1);const Se=await d.getInsofDataApi({id:o==null?void 0:o.index});if((($=Se==null?void 0:Se.data)==null?void 0:$.code)===200){let Ie=(Y=(oe=(De=(H=Se==null?void 0:Se.data)==null?void 0:H.result)==null?void 0:De[0])==null?void 0:oe.value)==null?void 0:Y.pageData;U?Ie={...Ie,compData:(se=Ie==null?void 0:Ie.compData)==null?void 0:se.map(Ve=>{var ge;return(Ve==null?void 0:Ve.key)==="formContent"?{...Ve,contents:(ge=Ve==null?void 0:Ve.contents)==null?void 0:ge.map(Ke=>({...Ke,[T]:z}))}:Ve})}:Ie={...Ie,compData:(re=Ie==null?void 0:Ie.compData)==null?void 0:re.map(Ve=>{var ge;return(Ve==null?void 0:Ve.key)==="formContent"?{...Ve,contents:(ge=Ve==null?void 0:Ve.contents)==null?void 0:ge.map(Ke=>(Ke==null?void 0:Ke.prop)===(ae==null?void 0:ae.prop)?{...Ke,[T]:z}:Ke)}:Ve})};const q=await d.updateInsofDataApi({id:o==null?void 0:o.index,value:{pageData:Ie}});((xe=q==null?void 0:q.data)==null?void 0:xe.code)===200?(d.ElMessage.success("编辑成功"),Ue.setRefreshCurStructure(!0)):d.ElMessage.error("编辑响应失败")}}catch{d.ElMessage.error("编辑处理失败")}},be=async(T,ae)=>{await Oe("label",ae,T)},ee=async(T,ae)=>{T&&await Oe("type",ae,T)},j=async(T,ae,z)=>{await Oe(ae,z,T,!1)},te=(T,ae)=>{_.value===ae?me.value=!1:me.value=!0,_.value=ae==null?void 0:ae.changeProp},Te=async T=>{var z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge;let ae=[];if((z=T==null?void 0:T.toString())!=null&&z.includes(".urdf")){if(T.includes(",")){d.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:T,extension:b(T)}],g.value=!0,y.value=!0;return}if((U=T==null?void 0:T.toString())!=null&&U.includes(".stl")||($=T==null?void 0:T.toString())!=null&&$.includes(".STL")||(H=T==null?void 0:T.toString())!=null&&H.includes(".obj")||(De=T==null?void 0:T.toString())!=null&&De.includes(".mtl")){const rt=((oe=T==null?void 0:T.toString())==null?void 0:oe.split(",")).map(He=>({url:He,extension:b(He)}));h.value=rt,g.value=!1,y.value=!0;return}if((Y=T==null?void 0:T.toString())!=null&&Y.includes(".stl")||(re=T==null?void 0:T.toString())!=null&&re.includes(".STL")||(se=T==null?void 0:T.toString())!=null&&se.includes(".obj")||(xe=T==null?void 0:T.toString())!=null&&xe.includes(".mtl")){let Ke,rt=[],He={};if(Array.isArray(T)?Ke=T:Ke=T==null?void 0:T.split(","),Ke==null||Ke.forEach(lt=>{lt.includes(".mtl")?rt.push(lt):He.blob=He.blob?He.blob+","+lt:lt}),(rt==null?void 0:rt.length)>0&&(He.mtlBlobs=rt),(Ie=(Se=Object.values(He))==null?void 0:Se[0])!=null&&Ie.includes("http:"))ae.push(He);else{const lt=new Blob([He.blob],{type:"application/octet-stream;charset=UTF-8"});let Pe=URL.createObjectURL(lt),ft="";(q=T==null?void 0:T.split("/"))==null||q.forEach((et,Ze)=>{var ne;Ze===((ne=T==null?void 0:T.split("/"))==null?void 0:ne.length)-1&&(ft=et)}),(Ve=He.blob)!=null&&Ve.includes(".stl")&&(ft=(ft==null?void 0:ft.replaceAll(">",""))+".urdf"),M.value=[{name:ft,blobUrl:Pe}],L.value=!0}}else{const Ke=zt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),rt=await d.axios.get(T,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ke.close()}),He=new Blob([rt.data],{type:"application/octet-stream;charset=UTF-8"});let lt=URL.createObjectURL(He),Pe="";(ge=T==null?void 0:T.split("/"))==null||ge.forEach((ft,et)=>{var Ze;et===((Ze=T==null?void 0:T.split("/"))==null?void 0:Ze.length)-1&&(Pe=ft)}),M.value=[{name:Pe,blobUrl:lt}],L.value=!0}(ae==null?void 0:ae.length)>0&&pe.setBlobUrls(ae)},Me=()=>{L.value=!1},at=T=>{var H,De,oe,Y;const ae=(De=(H=d.cloneDeep(o.itemData))==null?void 0:H.find(re=>(re==null?void 0:re.key)==="formContent"))==null?void 0:De.contents,z=d.cloneDeep(T.content);let U={};z&&((oe=Object.values(z))==null?void 0:oe.length)>0&&((Y=Object.values(z))==null||Y.forEach((re,se)=>{U[ae[se].key]=re}));const $={content:U,index:o==null?void 0:o.index,buttonName:T==null?void 0:T.buttonName};c("change",$)},v=e.computed(()=>"http://222.92.178.198:62001"),C=async T=>{var Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze,ne,fe,Be;if(!T)return;(Ie=(Se=o==null?void 0:o.itemData)==null?void 0:Se.find(ve=>(ve==null?void 0:ve.key)==="parentFormPath"))==null||Ie.contents;let ae=it.value;(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(ve=>{var ze,Ce,A,ke;let he=(ze=ve==null?void 0:ve.key)==null?void 0:ze.split("/");return(o==null?void 0:o.compName)===(he==null?void 0:he[0])&&(Ce=u.value)!=null&&Ce.find(nt=>(nt==null?void 0:nt.prop)===(he==null?void 0:he[1]))&&(ve.value=(ke=(A=u.value)==null?void 0:A.find(nt=>(nt==null?void 0:nt.prop)===(he==null?void 0:he[1])))==null?void 0:ke.value),ve}),Ue.setTableViewContents(ae));const z=d.cloneDeep(o.itemData);let U=z==null?void 0:z.map(ve=>{var he;return(ve==null?void 0:ve.key)==="formContent"&&((he=ve.contents)==null||he.map((ze,Ce)=>{var A,ke,nt,Le,Qe,Re,ht,pt,st,vt,yt,Dt,It,Bt,wt,Rt,kt,Ut,Gt;return ze.type=(ke=(A=u.value)==null?void 0:A.find(Ot=>(Ot==null?void 0:Ot.prop)===(ze==null?void 0:ze.prop)))==null?void 0:ke.type,ze.options=ze!=null&&ze.options?ze.options:((Qe=(Le=(nt=ze==null?void 0:ze.key)==null?void 0:nt.split("$"))==null?void 0:Le[1])==null?void 0:Qe.length)>0?(st=(pt=xn.formGetOptions((ht=(Re=ze==null?void 0:ze.key)==null?void 0:Re.split("$"))==null?void 0:ht[1]))==null?void 0:pt.split(","))==null?void 0:st.map(Ot=>({label:Ot,value:Ot})):[],(vt=ze==null?void 0:ze.key)!=null&&vt.includes("$")&&(ze.key=(Dt=(yt=ze==null?void 0:ze.key)==null?void 0:yt.split("$"))==null?void 0:Dt[0]),ze.signature=(Bt=(It=u.value)==null?void 0:It.find(Ot=>(Ot==null?void 0:Ot.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Bt.signature,ze.isLoginUser=(Rt=(wt=u.value)==null?void 0:wt.find(Ot=>(Ot==null?void 0:Ot.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Rt.isLoginUser,ze.value=(kt=Object.values(T))==null?void 0:kt[Ce],ze.isFormColHidden=(Gt=(Ut=u.value)==null?void 0:Ut.find(Ot=>(Ot==null?void 0:Ot.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Gt.isFormColHidden,ze})),ve}),$=u.value,H=(Ve=(q=d.cloneDeep(U))==null?void 0:q.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ve.contents;if($=$==null?void 0:$.map(ve=>{var he;return ve.value=(he=H==null?void 0:H.find((ze,Ce)=>((ze==null?void 0:ze.id)??Ce)===(ve==null?void 0:ve.id)))==null?void 0:he.value,ve}),!me.value){c("contentChange",{contents:U,index:o.index});return}let De="",oe=(rt=(Ke=(ge=d.cloneDeep(U))==null?void 0:ge.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:rt.find((ve,he)=>{var ze,Ce,A;return(ve==null?void 0:ve.label)===_.value||he.toString()===((A=(Ce=(ze=_.value)==null?void 0:ze.split("t"))==null?void 0:Ce[1])==null?void 0:A.toString())}),Y=(He=oe==null?void 0:oe.optionUrl)==null?void 0:He.menuSelect,re=!0;if((ft=(Pe=(lt=d.cloneDeep(U))==null?void 0:lt.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Pe.contents)==null||ft.forEach(ve=>{var he,ze,Ce,A,ke,nt;re&&((Ce=(ze=(he=ve==null?void 0:ve.optionUrl)==null?void 0:he.groupSelect)==null?void 0:ze[1])!=null&&Ce.includes("["))&&(De=(ke=(A=ve==null?void 0:ve.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ke[1],JSON.stringify(Y)===JSON.stringify((nt=ve==null?void 0:ve.optionUrl)==null?void 0:nt.menuSelect)&&(re=!1))}),(et=oe==null?void 0:oe.optionUrl)!=null&&et.menuSelect&&me.value){let ve=await xn.getSelectRow(oe),he,ze=(Ze=oe==null?void 0:oe.optionUrl)==null?void 0:Ze.menuSelect;if(ve==null||ve.forEach(Ce=>{var A,ke,nt,Le,Qe,Re,ht,pt,st,vt;De===((ke=(A=oe==null?void 0:oe.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ke[1])&&((Qe=(Le=(nt=oe==null?void 0:oe.optionUrl)==null?void 0:nt.groupSelect)==null?void 0:Le[1])!=null&&Qe.includes("["))&&((vt=d.cloneDeep(Ce))==null?void 0:vt[(st=(pt=(ht=(Re=oe==null?void 0:oe.optionUrl)==null?void 0:Re.groupSelect)==null?void 0:ht[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(oe==null?void 0:oe.value)&&(he=Ce)}),he){let Ce=d.cloneDeep($);Ce=Ce==null?void 0:Ce.map(ke=>{var nt,Le,Qe,Re,ht,pt,st,vt,yt,Dt,It;return(he!=null&&he[ke==null?void 0:ke.label]||he!=null&&he[(Re=(Qe=(Le=(nt=ke==null?void 0:ke.optionUrl)==null?void 0:nt.groupSelect)==null?void 0:Le[1])==null?void 0:Qe.replaceAll("[",""))==null?void 0:Re.replaceAll("]","")])&&((st=(pt=(ht=ke==null?void 0:ke.optionUrl)==null?void 0:ht.groupSelect)==null?void 0:pt[1])!=null&&st.includes("["))&&ze!=null&&ze.every(Bt=>{var wt,Rt;return(Rt=(wt=ke==null?void 0:ke.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:Rt.includes(Bt)})&&(ke.value=(he==null?void 0:he[ke==null?void 0:ke.label])||(he==null?void 0:he[(It=(Dt=(yt=(vt=ke==null?void 0:ke.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:yt[1])==null?void 0:Dt.replaceAll("[",""))==null?void 0:It.replaceAll("]","")]),Array.isArray(ke.value)&&ke.value.every(Bt=>(Bt==null?void 0:Bt.url)&&(Bt==null?void 0:Bt.name))&&(ke.type="Upload")),ke}),Ce=Ce==null?void 0:Ce.map(ke=>{var nt,Le,Qe;return(nt=ke==null?void 0:ke.optionUrl)!=null&&nt.oldMenuSelect&&(ke.optionUrl.menuSelect=(Qe=(Le=d.cloneDeep(ke))==null?void 0:Le.optionUrl)==null?void 0:Qe.oldMenuSelect),ke}),u.value=d.cloneDeep(Ce);let A=d.cloneDeep(Ce);A=A==null?void 0:A.map(ke=>{var nt,Le,Qe,Re,ht,pt;return(Le=(nt=ke==null?void 0:ke.optionUrl)==null?void 0:nt.menuSelect)!=null&&Le.some(st=>st==null?void 0:st.includes("["))&&(ke.optionUrl.oldMenuSelect=(Re=(Qe=d.cloneDeep(ke))==null?void 0:Qe.optionUrl)==null?void 0:Re.menuSelect,ke.optionUrl.menuSelect=(pt=(ht=ke==null?void 0:ke.optionUrl)==null?void 0:ht.menuSelect)==null?void 0:pt.map(st=>{var vt,yt,Dt,It;if(st!=null&&st.includes("[")){let Bt=(yt=(vt=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:yt[1];st=(It=(Dt=d.cloneDeep(Ce))==null?void 0:Dt.find(wt=>(wt==null?void 0:wt.label)===Bt))==null?void 0:It.value}return st})),ke}),u.value=A}else u.value=$;U=U==null?void 0:U.map(Ce=>{var A;return(Ce==null?void 0:Ce.key)==="formContent"&&(Ce.contents=(A=Ce.contents)==null?void 0:A.map(ke=>{var nt,Le,Qe,Re;return ke.value=((Le=(nt=u.value)==null?void 0:nt.find(ht=>(ht==null?void 0:ht.label)===(ke==null?void 0:ke.key)))==null?void 0:Le.value)??(ke==null?void 0:ke.value),ke.type=((Re=(Qe=u.value)==null?void 0:Qe.find(ht=>(ht==null?void 0:ht.prop)===(ke==null?void 0:ke.key)))==null?void 0:Re.type)??(ke==null?void 0:ke.type),ke})),Ce})}me.value=!1,c("contentChange",{contents:U,index:o.index});let se=[],xe=[];if((fe=d.cloneDeep((ne=U==null?void 0:U.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:ne.contents))==null||fe.forEach(ve=>{var he;Array.isArray(ve==null?void 0:ve.value)&&((he=ve==null?void 0:ve.value)!=null&&he.find(ze=>{var Ce;return(Ce=ze==null?void 0:ze.url)==null?void 0:Ce.includes(".obj")}))&&(xe=ve==null?void 0:ve.value)}),(xe==null?void 0:xe.length)>0){const ve=(Be=d.cloneDeep(xe))==null?void 0:Be.filter(he=>{var ze;return(ze=he==null?void 0:he.url)==null?void 0:ze.includes(".obj")});ve==null||ve.forEach(he=>{var Ce,A,ke,nt;const ze=(Ce=xe==null?void 0:xe.filter(Le=>{var Qe;return(Le==null?void 0:Le.name)===(he==null?void 0:he.name)&&((Qe=Le==null?void 0:Le.url)==null?void 0:Qe.includes(".mtl"))}))==null?void 0:Ce.map(Le=>Le==null?void 0:Le.url);se.push({objUrl:he==null?void 0:he.url,mtlUrls:((A=xe==null?void 0:xe.filter(Le=>{var Qe;return(Le==null?void 0:Le.name)===(he==null?void 0:he.name)&&((Qe=Le==null?void 0:Le.url)==null?void 0:Qe.includes(".mtl"))}))==null?void 0:A.length)===1?(nt=(ke=xe==null?void 0:xe.filter(Le=>{var Qe;return(Le==null?void 0:Le.name)===(he==null?void 0:he.name)&&((Qe=Le==null?void 0:Le.url)==null?void 0:Qe.includes(".mtl"))}))==null?void 0:ke[0])==null?void 0:nt.url:ze})}),pe.setObjUrl(se)}},P=T=>{if(!T)return;const ae=[];let z="";for(let U of T)(U.includes("[")||z.includes("["))&&(z+=U.trim(),d.cloneDeep(z).split("【").length-1===d.cloneDeep(z).split("】").length-1&&d.cloneDeep(z).split("[").length-1===d.cloneDeep(z).split("]").length-1&&(ae.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return ae},Z=(T,ae,z)=>{let U="";const $=ae==null?void 0:ae.map(H=>{var De;return(De=H==null?void 0:H.value)==null?void 0:De.pageData});return $==null||$.forEach(H=>{var De;(H==null?void 0:H.name)===(T==null?void 0:T[0])&&((De=H==null?void 0:H.compData)==null||De.forEach(oe=>{var Y;(oe==null?void 0:oe.key)==="formContent"&&((Y=oe==null?void 0:oe.contents)==null||Y.forEach(re=>{var se;(re==null?void 0:re.prop)===(T==null?void 0:T[1])&&(U=(re==null?void 0:re.value)===""?Ae.judgeContents((se=d.cloneDeep(re))==null?void 0:se.optionUrl,z):re==null?void 0:re.value)}))}))}),U},x=(T,ae,z,U)=>{var oe,Y;let $="",H="";(oe=d.cloneDeep(ae))==null||oe.forEach((re,se)=>{re!=null&&re.includes("[")?H=H+R.value+T[se]:H=H===""?H+re:H+"/"+re});let De=(Y=U[H])==null?void 0:Y.map(re=>{var se;return(se=re==null?void 0:re.value)==null?void 0:se.pageData});return De==null||De.forEach(re=>{var se;(re==null?void 0:re.name)===(z==null?void 0:z[0])&&((se=re==null?void 0:re.compData)==null||se.forEach(xe=>{var Se;(xe==null?void 0:xe.key)==="formContent"&&((Se=xe==null?void 0:xe.contents)==null||Se.forEach(Ie=>{(Ie==null?void 0:Ie.prop)===(z==null?void 0:z[1])&&($=Ie==null?void 0:Ie.value)}))}))}),$};return e.watch(()=>o.itemData,async()=>{var De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze;const T=(De=o.itemData)==null?void 0:De.find(ne=>(ne==null?void 0:ne.key)==="formContent"),ae=(oe=d.cloneDeep(o.itemData))==null?void 0:oe.find(ne=>(ne==null?void 0:ne.key)==="formButton"),z=(Y=d.cloneDeep(o.itemData))==null?void 0:Y.find(ne=>(ne==null?void 0:ne.key)==="formFlex"),U=(re=d.cloneDeep(o.itemData))==null?void 0:re.find(ne=>(ne==null?void 0:ne.key)==="formWrap"),$=(se=d.cloneDeep(o.itemData))==null?void 0:se.find(ne=>(ne==null?void 0:ne.key)==="enableWrap");if((U==null?void 0:U.contents)==="纵向"?I.value=!1:I.value=!0,E.value=($==null?void 0:$.contents)===void 0?!1:$==null?void 0:$.contents,F.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((xe=z==null?void 0:z.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((Se=T==null?void 0:T.contents)==null?void 0:Se.length)>0&&Array.isArray(T==null?void 0:T.contents)){let ne=o.allMapContents;const fe=(q=(Ie=d.cloneDeep(T))==null?void 0:Ie.contents)==null?void 0:q.map((A,ke)=>{var Bt,wt,Rt,kt,Ut,Gt,Ot,xa,ha,Da,_a,va,Sa,ga,Ta,ma,qa,Ga,Xa,La,Ia,ya,Na,Ba,la,wa,Ya;let nt=(A==null?void 0:A.label)??(A==null?void 0:A.key)??"",Le=(A==null?void 0:A.type)??"",Qe=(A==null?void 0:A.options)??[];if((Bt=A==null?void 0:A.key)!=null&&Bt.includes("$")&&(nt=(wt=d.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:wt[0],((kt=(Rt=d.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Rt[1])==null?void 0:kt.length)>0)){const[Ct,Qt]=(Gt=(Ut=d.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Ut[1])==null?void 0:Gt.split(/[()]/);Le=((Ot=Ae.FormType.find(bt=>(bt==null?void 0:bt.key)===Ct))==null?void 0:Ot.value)??"",((xa=Qt==null?void 0:Qt.split(","))==null?void 0:xa.length)>0&&(Qe=(ha=Qt==null?void 0:Qt.split(","))==null?void 0:ha.map(bt=>({label:bt,value:bt})))}let Re=[];A!=null&&A.contents&&!Array.isArray(A==null?void 0:A.contents)&&(Re=(_a=(Da=A==null?void 0:A.contents)==null?void 0:Da.split(","))==null?void 0:_a.map(Ct=>({label:Ct,value:Ct}))),((va=A==null?void 0:A.optionUrl)==null?void 0:va.selectRelateType)==="自定义绑定"&&(Re=(ga=(Sa=A==null?void 0:A.optionUrl)==null?void 0:Sa.defaultSelect)==null?void 0:ga.map(Ct=>({label:Ct,value:Ct})));let ht=!1,pt=(A==null?void 0:A.isFormColHidden)??!1,st=Ae.judgeContents((Ta=d.cloneDeep(A))==null?void 0:Ta.optionUrl,ne),vt=st!==void 0&&st!==""?st:A!=null&&A.originalContent&&(A==null?void 0:A.originalContent)!==""?A.originalContent:A!=null&&A.value?A.value:(Qe==null?void 0:Qe.length)>0?(ma=Qe==null?void 0:Qe[0])==null?void 0:ma.value:(A==null?void 0:A.value)??"",yt=!1,Dt=st!==void 0||Le===""?"Input":Le;if((Array.isArray(st)&&(st!=null&&st.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&(Dt="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||A!=null&&A.isLoginUser)ht=!0,vt=((qa=N.value)==null?void 0:qa.姓名)||((Ga=N.value)==null?void 0:Ga.account)||((Xa=N.value)==null?void 0:Xa.账号)||((La=N.value)==null?void 0:La.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||A!=null&&A.signature||A!=null&&A.isShow)if(yt=!0,(A==null?void 0:A.isShow)==="originalSignature")Dt="image",vt=v.value+"/"+((Ia=N.value)==null?void 0:Ia.signature);else{let Ct=[...new Set(P(A.isShow))].map(Ft=>{var Va,oa,Ca,ea;return{key:(ea=(Ca=(oa=(Va=Ft==null?void 0:Ft.split("["))==null?void 0:Va[1])==null?void 0:oa.split("]"))==null?void 0:Ca[0])==null?void 0:ea.split(":"),value:""}});(ya=Fe.value)==null||ya.forEach(Ft=>{Ct==null||Ct.forEach((ua,Va)=>{var Ca;let oa=ua==null?void 0:ua.key;(Ft==null?void 0:Ft.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((Ca=Ft==null?void 0:Ft.compData)==null||Ca.forEach(ea=>{var Pa;(ea==null?void 0:ea.key)==="formContent"&&((Pa=ea==null?void 0:ea.contents)==null||Pa.forEach(At=>{(At==null?void 0:At.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(Ct[Va].value=At==null?void 0:At.value)}))}))})});let Qt=Ct==null?void 0:Ct.map(Ft=>{var ua;return Ft.key="["+((ua=Ft.key)==null?void 0:ua.join(":"))+"]",Ft}),bt=A==null?void 0:A.isShow;Qt==null||Qt.forEach(Ft=>{Ft!=null&&Ft.value?bt=bt.replaceAll(Ft==null?void 0:Ft.key,"'"+(Ft==null?void 0:Ft.value)+"'"):bt=bt.replaceAll(Ft==null?void 0:Ft.key,"undefined")}),bt!=null&&bt.includes("(")||(bt!=null&&bt.includes("==")?bt=((Na=bt==null?void 0:bt.split("==="))==null?void 0:Na[0])+"==='"+((Ba=bt==null?void 0:bt.split("==="))==null?void 0:Ba[1])+"'":bt=((la=bt==null?void 0:bt.split("="))==null?void 0:la[0])+"='"+((wa=bt==null?void 0:bt.split("="))==null?void 0:wa[1])+"'"),bt!=null&&bt.includes("=")&&!(bt!=null&&bt.includes("=="))&&!(bt!=null&&bt.includes("==="))&&(bt=bt==null?void 0:bt.replaceAll("=","==")),new Function(`if (${bt}) { return true } else { return false }`)()?(pt=!1,Dt="image",vt=v.value+"/"+((Ya=N.value)==null?void 0:Ya.signature)):vt=""}return Array.isArray(vt)&&vt.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(A.type="Upload"),A!=null&&A.isMainUrl&&(Dt="Url"),{label:nt??"",name:"t"+ke,prop:d.cloneDeep(A==null?void 0:A.key),type:Dt,value:A!=null&&A.isNewDate&&vt===""?new Date:vt,id:(A==null?void 0:A.id)??ke,contents:(Re==null?void 0:Re.length)>0?Re:Qe??[],width:(A==null?void 0:A.width)??1,isLoginUser:ht,config:A==null?void 0:A.config,optionUrl:(A==null?void 0:A.optionUrl)??A,isFormColHidden:pt,signature:yt,isMain:A==null?void 0:A.isMain,isMainUrl:A==null?void 0:A.isMainUrl,operable:(A==null?void 0:A.operable)??!1,disabled:(A==null?void 0:A.disabled)??!1}}),Be=fe==null?void 0:fe.map(A=>A==null?void 0:A.value);let ve="";Be==null||Be.forEach(A=>{A!==""&&A!==void 0&&(ve=ve===""?A:ve+"/"+A)}),K.setSelectArray(Be),K.setSelectString(ve);let he=(Ve=d.cloneDeep(fe))==null?void 0:Ve.map(A=>(A!=null&&A.value&&Ae.IsJson(A==null?void 0:A.value)&&Array.isArray(JSON.parse(A==null?void 0:A.value))&&(A.value=JSON.parse(A.value)),A));he=he==null?void 0:he.map(A=>{var ke,nt,Le,Qe,Re,ht,pt,st;if((nt=(ke=A==null?void 0:A.optionUrl)==null?void 0:ke.menuSelect)!=null&&nt.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";A.optionUrl.oldMenuSelect=(Qe=(Le=d.cloneDeep(A))==null?void 0:Le.optionUrl)==null?void 0:Qe.menuSelect,A.optionUrl.menuSelect=(ht=(Re=A==null?void 0:A.optionUrl)==null?void 0:Re.menuSelect)==null?void 0:ht.map(yt=>{var Dt,It,Bt,wt,Rt,kt;if(yt!=null&&yt.includes("[")){let Ut=(It=(Dt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Dt.split(":"))==null?void 0:It[1];vt=Z((Bt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"),ne==null?void 0:ne[ot.value],ne),yt=((Rt=(wt=d.cloneDeep(he))==null?void 0:wt.find(Gt=>(Gt==null?void 0:Gt.label)===Ut))==null?void 0:Rt.value)||Z((kt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:kt.split(":"),ne==null?void 0:ne[ot.value],ne)}return yt}),vt!==""&&A.value===""&&(A.value=x(A.optionUrl.menuSelect,A.optionUrl.oldMenuSelect,(pt=A==null?void 0:A.optionUrl)==null?void 0:pt.groupSelect,ne),Array.isArray(A.value)&&((st=A.value)!=null&&st.every(yt=>yt==null?void 0:yt.url))&&(A.type="UPLOAD"))}return A}),u.value=he,ue.value=((ge=u.value)==null?void 0:ge.every(A=>A==null?void 0:A.disabled))||V.value===ot.value,ie.value=(Ke=u.value)==null?void 0:Ke.every(A=>A==null?void 0:A.operable),ye.value=(rt=u.value)==null?void 0:rt.map(A=>A==null?void 0:A.label);let ze=[],Ce=[];if((He=d.cloneDeep(u.value))==null||He.forEach(A=>{var ke;Array.isArray(A==null?void 0:A.value)&&((ke=A==null?void 0:A.value)!=null&&ke.find(nt=>{var Le;return(Le=nt==null?void 0:nt.url)==null?void 0:Le.includes(".obj")}))&&(Ce=A==null?void 0:A.value)}),(Ce==null?void 0:Ce.length)>0){const A=(lt=d.cloneDeep(Ce))==null?void 0:lt.filter(ke=>{var nt;return(nt=ke==null?void 0:ke.url)==null?void 0:nt.includes(".obj")});A==null||A.forEach(ke=>{var Le,Qe,Re,ht;const nt=(Le=Ce==null?void 0:Ce.filter(pt=>{var st;return(pt==null?void 0:pt.name)===(ke==null?void 0:ke.name)&&((st=pt==null?void 0:pt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Le.map(pt=>pt==null?void 0:pt.url);ze.push({objUrl:ke==null?void 0:ke.url,mtlUrls:((Qe=Ce==null?void 0:Ce.filter(pt=>{var st;return(pt==null?void 0:pt.name)===(ke==null?void 0:ke.name)&&((st=pt==null?void 0:pt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Qe.length)===1?(ht=(Re=Ce==null?void 0:Ce.filter(pt=>{var st;return(pt==null?void 0:pt.name)===(ke==null?void 0:ke.name)&&((st=pt==null?void 0:pt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Re[0])==null?void 0:ht.url:nt})}),pe.setObjUrl(ze)}(Pe=d.cloneDeep(u.value))==null||Pe.forEach(A=>{var ke,nt,Le,Qe,Re,ht,pt,st,vt,yt,Dt,It,Bt;if((nt=(ke=A==null?void 0:A.value)==null?void 0:ke.toString())!=null&&nt.includes(".stl")||(Qe=(Le=A==null?void 0:A.value)==null?void 0:Le.toString())!=null&&Qe.includes(".STL")||(ht=(Re=A==null?void 0:A.value)==null?void 0:Re.toString())!=null&&ht.includes(".obj")||(st=(pt=A==null?void 0:A.value)==null?void 0:pt.toString())!=null&&st.includes(".mtl")||(yt=(vt=A==null?void 0:A.value)==null?void 0:vt.toString())!=null&&yt.includes(".urdf")){let wt={},Rt=[],kt;Array.isArray(A==null?void 0:A.value)?kt=A==null?void 0:A.value:kt=(Dt=A==null?void 0:A.value)==null?void 0:Dt.split(","),kt==null||kt.forEach(Ut=>{Ut.includes(".mtl")?Rt.push(Ut):wt.blob=wt.blob==="undefined"?Ut:wt.blob+","+Ut}),(Rt==null?void 0:Rt.length)>0&&(wt.mtlBlobs=Rt),(Bt=(It=Object.values(wt))==null?void 0:It[0])!=null&&Bt.includes("http:")}})}else u.value=[];let H=it.value;if((H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(ne=>{var Be,ve,he,ze;let fe=(Be=ne==null?void 0:ne.key)==null?void 0:Be.split("/");return(o==null?void 0:o.compName)===(fe==null?void 0:fe[0])&&(ve=u.value)!=null&&ve.find(Ce=>(Ce==null?void 0:Ce.prop)===(fe==null?void 0:fe[1]))&&(ne.value=(ze=(he=u.value)==null?void 0:he.find(Ce=>(Ce==null?void 0:Ce.prop)===(fe==null?void 0:fe[1])))==null?void 0:ze.value),ne}),Ue.setTableViewContents(H)),o!=null&&o.formRules)w.value=o==null?void 0:o.formRules;else{let ne={};(ft=d.cloneDeep(u).value)==null||ft.forEach(fe=>{(fe==null?void 0:fe.isMain)===!0&&(ne[(fe==null?void 0:fe.prop)??(fe==null?void 0:fe.name)]=[{required:!0,message:`${(fe==null?void 0:fe.prop)||(fe==null?void 0:fe.name)}不能为空`}])}),w.value=ne}if(((et=ae==null?void 0:ae.contents)==null?void 0:et.length)>0){const ne=[];(Ze=ae==null?void 0:ae.contents)==null||Ze.forEach((fe,Be)=>{(fe==null?void 0:fe.label)!==""&&ne.push({label:(fe==null?void 0:fe.label)??"",id:(fe==null?void 0:fe.id)??Be,type:(fe==null?void 0:fe.type)??"",background:fe==null?void 0:fe.background})}),J.value=ne}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>V.value,T=>{ue.value=T===ot.value},{immediate:!0}),(T,ae)=>{const z=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-switch"),$=e.resolveComponent("el-checkbox"),H=e.resolveComponent("el-popover"),De=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",li,[e.createVNode(zt.ssForm,{rowContents:u.value,formRules:w.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:E.value,onOnButtonClick:at,onChange:C,formDisabled:ue.value,formLabelsOperable:ie.value,isButtonRow:I.value,onPreview:Te,onBlurChange:te,onHandleColEditChange:be,onHandleColTypeChange:ee,onRouteUrl:S,onClickTrigger:de},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:Y,formLabelsOperable:re})=>[e.createVNode(H,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Je},{reference:e.withCtx(()=>[e.createElementVNode("span",oi,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ri,[ae[1]||(ae[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(U,{"model-value":Y,"active-text":"禁用","inactive-text":"",onChange:je,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(U,{"model-value":re,"active-text":"编辑所有标签","inactive-text":"",onChange:$e},null,8,["model-value"]),ae[2]||(ae[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(De,{modelValue:ye.value,"onUpdate:modelValue":ae[0]||(ae[0]=se=>ye.value=se),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:le,onChange:Ge},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,se=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:se.label},[e.createVNode($,{value:se.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(se.label),1)]),_:2},1032,["value"]),e.createVNode(H,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var xe;return[e.createElementVNode("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xe=Object.keys(se))==null?void 0:xe.filter(Se=>{var Ie;return(Ie=we.value)==null?void 0:Ie.find(q=>(q==null?void 0:q.value)===Se)}),Se=>{var Ie,q;return e.openBlock(),e.createElementBlock("div",{key:Se},[e.createVNode(zt._sfc_main$2,{value:se==null?void 0:se[Se],"active-text":(q=(Ie=we.value)==null?void 0:Ie.find(Ve=>(Ve==null?void 0:Ve.value)===Se))==null?void 0:q.label,inactiveText:"",onChange:Ve=>j(Ve,Se,se)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",si,[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"]),L.value?(e.openBlock(),e.createBlock(zt.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:Me},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:y.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Ol.ThreeViewerHost,{files:h.value,onGetAnimationData:T.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ll=Pt._export_sfc(ci,[["__scopeId","data-v-e237c271"]]),Un=e.ref(0),Eo=n=>{var r;return!n||(n==null?void 0:n.length)===0?[]:(r=d.cloneDeep(n))==null?void 0:r.map(o=>(Un.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Un.value,children:Eo(o==null?void 0:o.children)},o))},ui=n=>{var s;return(s=d.cloneDeep(n))==null?void 0:s.map(o=>(Un.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Un.value,children:Eo(o==null?void 0:o.children)},o))},_o=(n,r)=>{var s;return n!=null&&n.find(o=>(o==null?void 0:o.id)===r)?(s=d.cloneDeep(n))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==r):(n=n==null?void 0:n.map(o=>(o.children=_o(o==null?void 0:o.children,r),o)),n)},So=(n,r)=>{var s;return n!=null&&n.find(o=>(o==null?void 0:o.id)===(r==null?void 0:r.id))?(s=d.cloneDeep(n))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(r==null?void 0:r.id)&&(c=r),c)):(n=n==null?void 0:n.map(o=>(o.children=So(o==null?void 0:o.children,r),o)),n)},To=(n,r)=>{var s;return n!=null&&n.find(o=>{var c;return(o==null?void 0:o.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)})?(s=d.cloneDeep(n))==null?void 0:s.map(c=>{var u;return(c==null?void 0:c.id)===((u=r==null?void 0:r.contents)==null?void 0:u.id)&&(c=r==null?void 0:r.contents),c}):(n=n==null?void 0:n.map(o=>(o.children=To(o==null?void 0:o.children,r),o)),n)},Io=(n,r)=>{var s;return n!=null&&n.find(o=>(o==null?void 0:o.id)===(r==null?void 0:r.id))?(s=d.cloneDeep(n))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(r==null?void 0:r.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(r.contents)),c)):(n=n==null?void 0:n.map(o=>(o.children=Io(o==null?void 0:o.children,r),o)),n)},Vt=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],pi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],di=[{label:"新增",value:"add"}],Ma=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:di},{key:"background",label:"按钮背景色",type:"Color"}],za=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:pi},{key:"textColor",label:"按钮颜色",type:"Color"}],fi={class:"table-header-child"},hi={class:"table-header-child-main"},vi={class:"table-header-child-content"},gi={class:"table-header-child-content-item"},mi={class:"fix-button"},yi={key:0},bi={class:"form-content"},ki={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const s=n,o=r,c=e.ref(!1),u=e.ref(""),y=Ae.useTableComp(d.pinia),{tableIndex:g}=d.storeToRefs(y);e.ref(0);const h=e.ref(""),b=e.ref([]),w=e.ref([]),I=E=>{var D;c.value=!0;let F=[];Vt==null||Vt.forEach(N=>{let _=d.cloneDeep(g.value)+1;y.setTableIndex(_),F.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:E[N.key],id:g.value,contents:N==null?void 0:N.options})}),E!=null&&E.children&&((D=E==null?void 0:E.children)==null?void 0:D.length)>0&&F.push({children:E==null?void 0:E.children,isFormColHidden:!0}),h.value=E==null?void 0:E.id,b.value=F,w.value=F},L=E=>{o("fixChange",d.cloneDeep(E))},J=E=>{o("deleteChange",d.cloneDeep(E))},M=E=>{c.value=!0;let F=[];Vt==null||Vt.forEach(D=>{let N=d.cloneDeep(g.value)+1;y.setTableIndex(N),F.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:g.value,contents:D==null?void 0:D.options})}),u.value=E==null?void 0:E.id,b.value=F,w.value=F},Ee=E=>{let F=d.cloneDeep(w.value);F=F==null?void 0:F.map(D=>(D.children||(D.value=E==null?void 0:E[D.name]),D)),w.value=F},X=()=>{var F,D;b.value=w.value;let E={};if(h.value!=="")E.id=h.value,(F=b.value)==null||F.forEach(N=>{const _=Vt==null?void 0:Vt.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));_?E[_.key]=N.value:N!=null&&N.children&&N.children.length>0&&(E.children=N.children)}),c.value=!1,o("fixChange",{contents:d.cloneDeep(E),id:u.value,type:"fix"});else{let N=d.cloneDeep(g.value)+1;y.setTableIndex(N),E.id="id"+g.value,(D=b.value)==null||D.forEach(_=>{const me=Vt==null?void 0:Vt.find(Ue=>(Ue==null?void 0:Ue.label)===(_==null?void 0:_.label));me?E[me.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),c.value=!1,o("fixChange",{contents:d.cloneDeep(E),id:u.value,type:"add"})}h.value="",b.value=[],w.value=[]},K=()=>{c.value=!1,h.value="",u.value="",b.value=[],w.value=[]},pe=E=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",E),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,F)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(N,_)=>(e.openBlock(),e.createElementBlock("div",hi,[e.createElementVNode("div",vi,[e.createElementVNode("div",gi,e.toDisplayString(N.label),1),e.createElementVNode("div",mi,[e.createVNode(D,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>M(N)},null,8,["onClick"]),e.createVNode(D,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>I(N)},null,8,["onClick"]),e.createVNode(D,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:me=>pe(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",yi,[e.createVNode(Bo,{tableChildContents:N==null?void 0:N.children,onDeleteChange:J,onFixChange:L},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",bi,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},xi=Pt._export_sfc(ki,[["__scopeId","data-v-e0fef72d"]]),Di={class:"table-header-child"},wi={class:"table-header-child-main"},Ci={class:"table-header-child-content"},Ei={class:"table-header-child-content-item"},_i={class:"fix-button"},Si={key:0},Ti={class:"form-content"},Ii={class:"dialog-footer"},Bi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:r}){const s=n,o=r,c=e.ref(!1),u=e.ref(""),y=Ae.useTableComp(d.pinia),{tableIndex:g}=d.storeToRefs(y),h=e.ref(""),b=e.ref([]),w=e.ref([]),I=E=>{o("fixChange",d.cloneDeep(E))},L=E=>{var D;c.value=!0;let F=[];Vt==null||Vt.forEach(N=>{let _=d.cloneDeep(g.value)+1;y.setTableIndex(_),F.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:E[N.key],id:g.value,contents:N==null?void 0:N.options})}),E!=null&&E.children&&((D=E==null?void 0:E.children)==null?void 0:D.length)>0&&F.push({children:E==null?void 0:E.children,isFormColHidden:!0}),h.value=E==null?void 0:E.id,b.value=F,w.value=F},J=E=>{c.value=!0;let F=[];Vt==null||Vt.forEach(D=>{let N=d.cloneDeep(g.value)+1;y.setTableIndex(N),F.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:g.value,contents:D==null?void 0:D.options})}),u.value=E==null?void 0:E.id,b.value=F,w.value=F},M=E=>{let F=d.cloneDeep(w.value);F=F==null?void 0:F.map(D=>(D.children||(D.value=E==null?void 0:E[D.name]),D)),w.value=F},Ee=()=>{var F,D;b.value=w.value;let E={};if(h.value!=="")E.id=h.value,(F=b.value)==null||F.forEach(N=>{const _=Vt==null?void 0:Vt.find(me=>(me==null?void 0:me.label)===(N==null?void 0:N.label));_?E[_.key]=N.value:N!=null&&N.children&&N.children.length>0&&(E.children=N.children)}),c.value=!1,o("fixChange",{contents:d.cloneDeep(E),id:u.value,type:"fix"});else{let N=d.cloneDeep(g.value)+1;y.setTableIndex(N),E.id="idChild"+g.value,(D=b.value)==null||D.forEach(_=>{const me=Vt==null?void 0:Vt.find(Ue=>(Ue==null?void 0:Ue.label)===(_==null?void 0:_.label));me?E[me.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),c.value=!1,o("fixChange",{contents:d.cloneDeep(E),id:u.value,type:"add"})}h.value="",b.value=[],w.value=[]},X=()=>{c.value=!1,h.value="",u.value="",b.value=[],w.value=[]},K=E=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",E),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=E=>{o("deleteChange",E)};return(E,F)=>{const D=e.resolveComponent("svg-icon"),N=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(_,me)=>(e.openBlock(),e.createElementBlock("div",wi,[e.createElementVNode("div",Ci,[e.createElementVNode("div",Ei,e.toDisplayString(_.label),1),e.createElementVNode("div",_i,[e.createVNode(D,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>J(_)},null,8,["onClick"]),e.createVNode(D,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>L(_)},null,8,["onClick"]),e.createVNode(D,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>K(_)},null,8,["onClick"])])]),_!=null&&_.children&&_.children.length>0?(e.openBlock(),e.createElementBlock("div",Si,[e.createVNode(xi,{tableChildContents:_==null?void 0:_.children,onDeleteChange:pe,onFixChange:I},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ti,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ii,[e.createVNode(N,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>F[0]||(F[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(N,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Bo=Pt._export_sfc(Bi,[["__scopeId","data-v-ebd68fa1"]]),Ai={class:"table-operate-content"},Ni={class:"table-operate-item"},Vi={class:"operate-title"},Oi={class:"operate-content"},Mi={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={key:0},Li={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-title"},Yi={class:"operate-content"},Ji={class:"fix-content"},Qi={class:"fix-content-label"},Zi={class:"fix-button"},es={class:"operate-content"},ts={style:{display:"flex","justify-content":"space-between"}},as={class:"form-content"},ns={class:"dialog-footer"},ls={class:"form-content"},os={class:"dialog-footer"},rs={class:"form-content"},is={class:"dialog-footer"},ss={class:"form-content"},cs={class:"dialog-footer"},us={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.ref([]),u=e.ref(!1),y=e.ref(!1),g=e.ref([]),h=e.ref(!1),b=e.ref([]),w=e.ref(!1),I=e.ref([]),L=e.ref(""),J=e.ref(""),M=e.ref([]),Ee=e.ref([]),X=e.ref([]),K=e.ref([]),pe=e.ref(!1),E=e.ref([]),F=e.ref([]),D=e.ref(0),N=e.ref([]),_=e.ref([]),me=e.ref([]),Ue=()=>{pe.value=!0;let v=[];Ma==null||Ma.forEach(C=>{D.value++,v.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:D.value,contents:C==null?void 0:C.options})}),E.value=v,F.value=v},it=()=>{var C,P,Z;y.value=!0;let v=[];(Z=(P=(C=Ae.FormContent)==null?void 0:C.find(x=>(x==null?void 0:x.key)==="Input"))==null?void 0:P.value)==null||Z.forEach(x=>{D.value++,v.push({label:x==null?void 0:x.label,name:(x==null?void 0:x.name)||(x==null?void 0:x.label),type:x.type,value:(x==null?void 0:x.label)==="类型"?"Input":"",id:D.value,contents:x==null?void 0:x.options})}),N.value=v,_.value=v},Fe=v=>{v||(N.value=_.value)},We=async v=>{var C,P,Z,x,T,ae,z,U,$,H,De,oe;if((v==null?void 0:v.类型)!==((P=(C=_.value)==null?void 0:C.find(Y=>(Y==null?void 0:Y.label)==="类型"))==null?void 0:P.value)){let Y=[],re=await((T=(x=(Z=Ae.FormContent)==null?void 0:Z.find(se=>(se==null?void 0:se.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:x.value)==null?void 0:T.value)?await((H=($=(U=Ae.FormContent)==null?void 0:U.find(se=>(se==null?void 0:se.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:$.value)==null?void 0:H.value):(z=(ae=Ae.FormContent)==null?void 0:ae.find(se=>(se==null?void 0:se.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:z.value;if(re==null||re.forEach(se=>{D.value++,Y.push({label:se==null?void 0:se.label,name:(se==null?void 0:se.name)||(se==null?void 0:se.label),type:se.type,value:se!=null&&se.属性名?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):(v==null?void 0:v[se.label])??"",id:D.value,contents:se==null?void 0:se.options,prop:(se==null?void 0:se.prop)||(se==null?void 0:se.name)||(se==null?void 0:se.label)})}),v!=null&&v.菜单选项&&((De=v==null?void 0:v.菜单选项)==null?void 0:De.length)>0){const se=await Ae.menuToContentType(v==null?void 0:v.菜单选项);Y=Y==null?void 0:Y.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=se),xe))}_.value=await Ae.selectToBase(d.cloneDeep(Y)),N.value=await Ae.selectToBase(d.cloneDeep(Y))}else{let Y=d.cloneDeep(N.value);if(Y=Y==null?void 0:Y.map(re=>(re.value=v==null?void 0:v[re.name],re)),v!=null&&v.菜单选项&&((oe=v==null?void 0:v.菜单选项)==null?void 0:oe.length)>0){const re=await Ae.menuToContentType(v==null?void 0:v.菜单选项);Y=Y==null?void 0:Y.map(se=>((se==null?void 0:se.name)==="组信息选项"&&(se.contents=re),se))}Y=Ae.formToOptionsContents(Y),_.value=await Ae.selectToBase(d.cloneDeep(Y))}},_e=async v=>{await We(v),N.value=_.value},V=(v,C)=>{if((C==null?void 0:C.type)=="Select"&&(v==null?void 0:v.key)==="selectRelateType"){const P=C==null?void 0:C.optionUrl;return(P==null?void 0:P.selectRelateType)||C[v.key]}if((C==null?void 0:C.type)=="Select"&&(v==null?void 0:v.key)==="menuSelect"){const P=C==null?void 0:C.optionUrl;return(P==null?void 0:P.menuSelect)||C[v.key]}if((C==null?void 0:C.type)=="Select"&&(v==null?void 0:v.key)==="groupSelect"){const P=C==null?void 0:C.optionUrl;return(P==null?void 0:P.groupSelect)||C[v.key]}if((C==null?void 0:C.type)=="Select"&&(v==null?void 0:v.key)==="originalContent")return(C==null?void 0:C.value)||C[v.key];if((C==null?void 0:C.type)=="Select"&&(v==null?void 0:v.key)==="multiple"){const P=C[v.key];return wo(P)?P:v.default}return(v==null?void 0:v.label)==="类型"&&C[v.key]===""?"Input":(v==null?void 0:v.key)==="isFormColHidden"&&!C[v.key]?!1:C[v.key]},le=async v=>{var Z,x,T,ae,z,U,$,H,De;y.value=!0;let C=[];const P=await((T=(x=(Z=Ae.FormContent)==null?void 0:Z.find(oe=>(oe==null?void 0:oe.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:x.value)==null?void 0:T.value)?await((H=($=(U=Ae.FormContent)==null?void 0:U.find(oe=>(oe==null?void 0:oe.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:$.value)==null?void 0:H.value):(z=(ae=Ae.FormContent)==null?void 0:ae.find(oe=>(oe==null?void 0:oe.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:z.value;if(P==null||P.forEach(oe=>{D.value++,C.push({label:oe==null?void 0:oe.label,name:(oe==null?void 0:oe.name)||(oe==null?void 0:oe.label),type:oe.type,value:(oe==null?void 0:oe.label)==="属性名"?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):V(oe,v),id:D.value,contents:oe==null?void 0:oe.options})}),v!=null&&v.menuSelect&&((De=v==null?void 0:v.menuSelect)==null?void 0:De.length)>0){const oe=await Ae.menuToContentType(v==null?void 0:v.menuSelect);C=C==null?void 0:C.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=oe),Y))}L.value=v==null?void 0:v.id,N.value=await Ae.selectToBase(Ae.formToOptionsContents(C)),_.value=await Ae.selectToBase(Ae.formToOptionsContents(C))},ie=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,P;me.value=(C=d.cloneDeep(me.value))==null?void 0:C.filter(Z=>(Z==null?void 0:Z.id)!==(v==null?void 0:v.id)),o("change",(P=d.cloneDeep(s.originalItemContents))==null?void 0:P.map(Z=>((Z==null?void 0:Z.key)==="tableToForm"&&(Z.contents=me.value),Z))),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=()=>{y.value=!1,N.value=[],L.value=""},Ye=async()=>{var Z,x,T,ae,z,U,$,H,De,oe;N.value=_.value;let v={};L.value!==""?v.id=L.value:(D.value++,v.id="id"+D.value);let C=await((T=(x=(Z=Ae.FormContent)==null?void 0:Z.find(Y=>{var re,se;return(Y==null?void 0:Y.key)===(((se=(re=N.value)==null?void 0:re.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:se.value)??"label")}))==null?void 0:x.value)==null?void 0:T.value)??((z=(ae=Ae.FormContent)==null?void 0:ae.find(Y=>{var re,se;return(Y==null?void 0:Y.key)===(((se=(re=N.value)==null?void 0:re.find(xe=>(xe==null?void 0:xe.label)==="类型"))==null?void 0:se.value)??"label")}))==null?void 0:z.value);if((U=N.value)==null||U.forEach(Y=>{const re=C==null?void 0:C.find(se=>(se==null?void 0:se.label)===(Y==null?void 0:Y.label));re&&(v[re.key]=Y.value)}),v.name=v.label,($=me.value)!=null&&$.find(Y=>Y.id===v.id))me.value=(H=me.value)==null?void 0:H.map(Y=>(Y.id===v.id&&(Y=v),Y));else{let Y=d.cloneDeep(me.value);me.value||(me.value=[]),Y.push(v),me.value=Y}me.value=me.value.map(({id:Y,...re})=>re),y.value=!1,L.value="";let P=d.cloneDeep(s.originalItemContents);(De=d.cloneDeep(s.originalItemContents))!=null&&De.find(Y=>(Y==null?void 0:Y.key)==="tableToForm")?P=(oe=d.cloneDeep(s.originalItemContents))==null?void 0:oe.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=me.value),Y)):P.push({key:"tableToForm",contents:me.value}),o("change",P)},ot=v=>{pe.value=!0;let C=[];Ma==null||Ma.forEach(P=>{D.value++,C.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:v[P.key],id:D.value,contents:P==null?void 0:P.options})}),L.value=v==null?void 0:v.id,E.value=C,F.value=C};e.watch(()=>w.value,()=>{var C,P;let v=d.cloneDeep(s.originalItemContents);(C=d.cloneDeep(s.originalItemContents))!=null&&C.find(Z=>(Z==null?void 0:Z.key)==="page")?v=(P=d.cloneDeep(s.originalItemContents))==null?void 0:P.map(Z=>((Z==null?void 0:Z.key)==="page"&&(Z.contents=w.value),Z)):v.push({key:"page",contents:w.value}),o("change",v)},{deep:!0});const Q=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,P;Ee.value=(C=d.cloneDeep(Ee.value))==null?void 0:C.filter(Z=>(Z==null?void 0:Z.id)!==(v==null?void 0:v.id)),o("change",(P=d.cloneDeep(s.originalItemContents))==null?void 0:P.map(Z=>((Z==null?void 0:Z.key)==="extraButton"&&(Z.contents=Ee.value),Z))),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>{var P,Z,x,T,ae;E.value=F.value;let v={};if(L.value!==""?v.id=L.value:(D.value++,v.id="id"+D.value),(P=E.value)==null||P.forEach(z=>{const U=Ma==null?void 0:Ma.find($=>($==null?void 0:$.label)===(z==null?void 0:z.label));U?v[U.key]=z.value:z!=null&&z.children&&z.children.length>0&&(v.children=z.children)}),(Z=Ee.value)!=null&&Z.find(z=>z.id===v.id))Ee.value=(x=Ee.value)==null?void 0:x.map(z=>(z.id===v.id&&(z=v),z));else{let z=d.cloneDeep(Ee.value)??[];z.push(v),Ee.value=z}pe.value=!1,L.value="";let C=d.cloneDeep(s.originalItemContents);(T=d.cloneDeep(s.originalItemContents))!=null&&T.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(ae=d.cloneDeep(s.originalItemContents))==null?void 0:ae.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=Ee.value),z)):C.push({key:"extraButton",contents:Ee.value}),o("change",C)},ye=v=>{let C=d.cloneDeep(F.value);C=C==null?void 0:C.map(P=>(P.children||(P.value=v==null?void 0:v[P.name]),P)),F.value=C},we=()=>{pe.value=!1,E.value=[],L.value=""},je=v=>{h.value=!0;let C=[];za==null||za.forEach(P=>{D.value++,C.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:v[P.key],id:D.value,contents:P==null?void 0:P.options})}),L.value=v==null?void 0:v.id,X.value=C,K.value=C},$e=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,P;M.value=(C=d.cloneDeep(M.value))==null?void 0:C.filter(Z=>(Z==null?void 0:Z.id)!==(v==null?void 0:v.id)),o("change",(P=d.cloneDeep(s.originalItemContents))==null?void 0:P.map(Z=>((Z==null?void 0:Z.key)==="rowButton"&&(Z.contents=M.value),Z))),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Je=()=>{u.value=!0;let v=[];Vt==null||Vt.forEach(C=>{D.value++,v.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:D.value,contents:C==null?void 0:C.options})}),b.value=v,I.value=v},Ge=()=>{h.value=!0;let v=[];za==null||za.forEach(C=>{D.value++,v.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:D.value,contents:C==null?void 0:C.options})}),X.value=v,K.value=v},de=v=>{let C=d.cloneDeep(K.value);C=C==null?void 0:C.map(P=>(P.children||(P.value=v==null?void 0:v[P.name]),P)),K.value=C},S=()=>{var P,Z,x,T,ae;X.value=K.value;let v={};if(L.value!==""?v.id=L.value:(D.value++,v.id="id"+D.value),(P=X.value)==null||P.forEach(z=>{const U=za==null?void 0:za.find($=>($==null?void 0:$.label)===(z==null?void 0:z.label));U?v[U.key]=z.value:z!=null&&z.children&&z.children.length>0&&(v.children=z.children)}),(Z=M.value)!=null&&Z.find(z=>z.id===v.id))M.value=(x=M.value)==null?void 0:x.map(z=>(z.id===v.id&&(z=v),z));else{let z=d.cloneDeep(M.value);z.push(v),M.value=z}h.value=!1,L.value="";let C=d.cloneDeep(s.originalItemContents);(T=d.cloneDeep(s.originalItemContents))!=null&&T.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(ae=d.cloneDeep(s.originalItemContents))==null?void 0:ae.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=M.value),z)):C.push({key:"rowButton",contents:M.value}),o("change",C)},W=()=>{h.value=!1,L.value="",K.value=[],X.value=[]},Oe=v=>{u.value=!0;let C=[];Vt==null||Vt.forEach(P=>{D.value++,C.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:"",id:D.value,contents:P==null?void 0:P.options})}),b.value=C,J.value=v==null?void 0:v.id,I.value=C},be=v=>{var C;g.value=_o(d.cloneDeep(g.value),v==null?void 0:v.id),o("change",(C=d.cloneDeep(s.originalItemContents))==null?void 0:C.map(P=>{var Z;return(P==null?void 0:P.key)==="header"&&(P.contents=(Z=g.value)!=null&&Z.some(x=>x==null?void 0:x.children)?[g.value]:g.value),P}))},ee=v=>{var P,Z,x;v.type==="fix"?v.id!==""?g.value=To(g.value,v):g.value=So(g.value,v==null?void 0:v.contents):g.value=Io(g.value,v),g.value=(P=g.value)!=null&&P.some(T=>T==null?void 0:T.children)?[g.value]:g.value,L.value="";let C=d.cloneDeep(s.originalItemContents);(Z=d.cloneDeep(s.originalItemContents))!=null&&Z.find(T=>(T==null?void 0:T.key)==="header")?C=(x=d.cloneDeep(s.originalItemContents))==null?void 0:x.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=g.value),T)):C.push({key:"header",contents:g.value}),o("change",C)},j=v=>{var P;u.value=!0;let C=[];Vt==null||Vt.forEach(Z=>{D.value++,C.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:v[Z.key],id:D.value,contents:Z==null?void 0:Z.options})}),v!=null&&v.children&&((P=v==null?void 0:v.children)==null?void 0:P.length)>0&&C.push({children:v==null?void 0:v.children,isFormColHidden:!0}),L.value=v==null?void 0:v.id,J.value="",b.value=C,I.value=C},te=v=>{let C=d.cloneDeep(I.value);C=C==null?void 0:C.map(P=>(P.children||(P.value=v==null?void 0:v[P.name]),P)),I.value=C},Te=()=>{u.value=!1,L.value="",J.value="",I.value=[]},Me=()=>{var P,Z,x,T,ae,z;b.value=I.value;let v={};if(L.value!==""?v.id=L.value:(D.value++,v.id="id"+D.value),(P=b.value)==null||P.forEach(U=>{const $=Vt==null?void 0:Vt.find(H=>(H==null?void 0:H.label)===(U==null?void 0:U.label));$?v[$.key]=U.value:U!=null&&U.children&&U.children.length>0&&(v.children=U.children)}),(Z=g.value)!=null&&Z.find(U=>U.id===v.id))g.value=(x=g.value)==null?void 0:x.map(U=>(U.id===v.id&&(U=v),U));else{let U=d.cloneDeep(g.value)??[];J.value===""?U.push(v):U=U==null?void 0:U.map($=>($.id===J.value&&($.children||($.children=[]),$.children.push(v)),$)),g.value=U}g.value=(T=g.value)!=null&&T.some(U=>U==null?void 0:U.children)?[g.value]:g.value,u.value=!1,L.value="",J.value="";let C=d.cloneDeep(s.originalItemContents);(ae=d.cloneDeep(s.originalItemContents))!=null&&ae.find(U=>(U==null?void 0:U.key)==="header")?C=(z=d.cloneDeep(s.originalItemContents))==null?void 0:z.map(U=>((U==null?void 0:U.key)==="header"&&(U.contents=g.value),U)):C.push({key:"header",contents:g.value}),o("change",C)},at=v=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,P;g.value=(C=d.cloneDeep(g.value))==null?void 0:C.filter(Z=>(Z==null?void 0:Z.id)!==(v==null?void 0:v.id)),o("change",(P=d.cloneDeep(s.originalItemContents))==null?void 0:P.map(Z=>{var x;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(x=g.value)!=null&&x.some(T=>T==null?void 0:T.children)?[g.value]:g.value),Z})),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var v,C,P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=d.cloneDeep(s.originalItemContents),g.value=(C=(v=c.value)==null?void 0:v.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:C.contents,M.value=(Z=(P=c.value)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="rowButton"))==null?void 0:Z.contents,Ee.value=(T=(x=c.value)==null?void 0:x.find(q=>(q==null?void 0:q.key)==="extraButton"))==null?void 0:T.contents,w.value=(z=(ae=c.value)==null?void 0:ae.find(q=>(q==null?void 0:q.key)==="page"))!=null&&z.contents?!!(($=(U=c.value)==null?void 0:U.find(q=>(q==null?void 0:q.key)==="page"))!=null&&$.contents):!1,me.value=(De=(H=c.value)==null?void 0:H.find(q=>(q==null?void 0:q.key)==="tableToForm"))==null?void 0:De.contents,g.value=(oe=g.value)==null?void 0:oe.map((q,Ve)=>(Array.isArray(q)?q=ui(q):q={label:(q==null?void 0:q.label)??"",prop:(q==null?void 0:q.label)==="操作"?"operate":q==null?void 0:q.prop,width:q!=null&&q.width?parseInt(q.width):"",fixed:(q==null?void 0:q.fixed)??void 0,sortable:(q==null?void 0:q.sortable)??!1,align:(q==null?void 0:q.align)??"left",showOverflowTooltip:(q==null?void 0:q.showOverflowTooltip)??!0,isNotDrag:(q==null?void 0:q.isNotDrag)??!1,isEditCol:(q==null?void 0:q.isEditCol)??!1,isOperate:(q==null?void 0:q.isOperate)??!1,id:(q==null?void 0:q.id)??Ve,formMenuSelect:(q==null?void 0:q.formMenuSelect)??void 0,groupSelect:(q==null?void 0:q.groupSelect)??void 0},q)),g.value=(Y=g.value)!=null&&Y.every(q=>Array.isArray(q))?(re=g.value)==null?void 0:re[0]:g.value,M.value=(se=M.value)==null?void 0:se.map((q,Ve)=>q={label:(q==null?void 0:q.label)??"",type:(q==null?void 0:q.type)??"",textColor:(q==null?void 0:q.textColor)??"#000000",id:(q==null?void 0:q.id)??Ve}),Ee.value=(xe=Ee.value)==null?void 0:xe.map((q,Ve)=>q={label:(q==null?void 0:q.label)??"",type:(q==null?void 0:q.type)??"",background:(q==null?void 0:q.background)??"var(--ssComponent-primary-color)",id:(q==null?void 0:q.id)??Ve}),me.value)me.value=(Ie=me.value)==null?void 0:Ie.map(q=>{D.value++;let Ve=q;return Ve.id=D.value,Ve});else{let q=[];const Ve=(Se=Ae.getColumnChild(d.cloneDeep(g.value)))==null?void 0:Se.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Ve==null||Ve.forEach(ge=>{var Ke;D.value++,q.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:D.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(Ke=ge==null?void 0:ge.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),me.value=q}},{deep:!0,immediate:!0}),(v,C)=>{const P=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("div",Ni,[e.createElementVNode("div",Vi,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Z,{class:"icon-content",onClick:Je,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Mi,[e.createElementVNode("div",zi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Fi,[e.createVNode(P,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>Oe(x)},null,8,["onClick"]),e.createVNode(P,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>j(x)},null,8,["onClick"]),e.createVNode(P,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>at(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Ri,[e.createVNode(Bo,{tableChildContents:x==null?void 0:x.children,onDeleteChange:be,onFixChange:ee},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Li,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:Ge},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(x,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",ji,[e.createVNode(P,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ae=>je(x)},null,8,["onClick"]),e.createVNode(P,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>$e(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:Ue},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(x,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Gi,[e.createVNode(P,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ae=>ot(x)},null,8,["onClick"]),e.createVNode(P,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>Q(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Xi,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:it},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(x,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Ji,[e.createElementVNode("div",Qi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Zi,[e.createVNode(P,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ae=>le(x)},null,8,["onClick"]),e.createVNode(P,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>ie(x)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",es,[e.createElementVNode("div",ts,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(zt._sfc_main$2,{modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=x=>w.value=x)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:u.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",as,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(Z,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Z,{class:"ok-button button",onClick:Me,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:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(Z,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Z,{class:"ok-button button",onClick:S,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:pe.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",rs,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",is,[e.createVNode(Z,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Z,{class:"ok-button button",onClick:R,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:y.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ss,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:We,onChangeVisible:Fe,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cs,[e.createVNode(Z,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Z,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ps=Pt._export_sfc(us,[["__scopeId","data-v-7a6b87b5"]]),ds=jt.useModelComp(d.pinia),{pageMapState:fs}=d.storeToRefs(ds),hs=jt.useMenuState(d.pinia),{activeMenuPath:vs}=d.storeToRefs(hs),gs=e.ref(24),ms=e.ref(6),ys=e.ref(70),bs=e.ref(.18),ks=e.ref(45),xs=(n,r,s,o)=>{var c,u,y,g,h,b,w,I,L,J,M,Ee,X,K,pe,E;return{x:((u=(c=n==null?void 0:n.value)==null?void 0:c.tableData)==null?void 0:u.x)||r%2*12,y:((g=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:g.y)||r,w:((b=(h=n==null?void 0:n.value)==null?void 0:h.tableData)==null?void 0:b.w)||gs.value,h:((I=(w=n==null?void 0:n.value)==null?void 0:w.tableData)==null?void 0:I.h)||s,minW:((J=(L=n==null?void 0:n.value)==null?void 0:L.tableData)==null?void 0:J.minW)||ms.value,minH:((Ee=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:Ee.minH)||bs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||ks.value,i:((E=(pe=n==null?void 0:n.value)==null?void 0:pe.tableData)==null?void 0:E.i)||r,id:(n==null?void 0:n.id)||r+"",component:o}},Ds=(n,r)=>{var o,c,u,y,g,h,b,w;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((o=n==null?void 0:n.comp)==null?void 0:o.toUpperCase())==="TABLE"){if(((y=(u=(c=n==null?void 0:n.compData)==null?void 0:c.find(L=>(L==null?void 0:L.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:y.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((w=(b=(h=n==null?void 0:n.compData)==null?void 0:h.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:b.contents)==null?void 0:w.length)/5);return s*2},Ao=(n,r,s)=>{var y,g;const o=(g=(y=fs.value)==null?void 0:y[vs.value])==null?void 0:g.filter(h=>{var b;return((b=h==null?void 0:h.key)==null?void 0:b.type)==="gridLayout"}),c=o==null?void 0:o.find(h=>{var b,w,I;return((I=(w=(b=h==null?void 0:h.value)==null?void 0:b.tableData)==null?void 0:w.component)==null?void 0:I.id)===n.id}),u=Ds(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((h,b)=>Ao(h,b))),{...xs(c,r,u,n)}},ws=(n,r)=>{if((n==null?void 0:n.length)===0)return[];const s=d.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((o,c)=>Ao(o,c)):[]},Cs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),Es=(n,r)=>n==null?void 0:n.map(s=>{for(const o in r)if(o===(s==null?void 0:s.prop))return{...s,value:r[o]};return s}),_s=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.ref([]);e.watch(()=>s.compType,g=>{var w;const h=Cs(s==null?void 0:s.optionItems),b=g?(w=h[g==null?void 0:g.toUpperCase()])==null?void 0:w[s==null?void 0:s.target]:[];c.value=b==null?void 0:b.map(I=>{for(const[L,J]of Object.entries((s==null?void 0:s.comp)||{}))if((I==null?void 0:I.prop)===L)return{...I,value:J};return I})},{immediate:!0});const u=g=>zt.getComponent(g),y=g=>{var h,b;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(w=>{var I;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(I=w==null?void 0:w.options)==null?void 0:I.map(L=>({...L,disabled:!0}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!0}:w}):c.value=(b=c.value)==null?void 0:b.map(w=>{var I;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(I=w==null?void 0:w.options)==null?void 0:I.map(L=>({...L,disabled:!1}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!1}:w}),o("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:g==null?void 0:g.prop})};return(g,h)=>{const b=e.resolveComponent("el-col"),w=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,I=>(e.openBlock(),e.createBlock(w,{class:"style-row",key:I==null?void 0:I.prop},{default:e.withCtx(()=>[e.createVNode(b,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I==null?void 0:I.label)+":",1)]),_:2},1024),e.createVNode(b,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(I.type)),{modelValue:I.value,"onUpdate:modelValue":L=>I.value=L,content:I==null?void 0:I.options,optionUrl:I==null?void 0:I.optionUrl,disabled:I==null?void 0:I.disabled,activeText:I==null?void 0:I.activeText,inactiveText:I==null?void 0:I.inactiveText,onChange:L=>y(I)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ss=Pt._export_sfc(_s,[["__scopeId","data-v-6c233914"]]),Ts=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:r}){const s=n,o=r,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),y=K=>K==null?void 0:K.reduce((pe,E)=>(pe[E==null?void 0:E.prop]=E==null?void 0:E.rule,pe),{}),g=e.computed(()=>({formRules:y(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),b=e.ref(""),w=(K,pe,E)=>{var N;let F=[];(s==null?void 0:s.activeTabName)==="任务配置"?(F=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:pe}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(F=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(N=s==null?void 0:s.relatedData)==null?void 0:N.map(_=>({label:_==null?void 0:_.任务名称,value:_==null?void 0:_.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let D;return E&&(E==null?void 0:E.length)>0?D=[...F,...I(K,pe,E)]:D=F,D},I=(K,pe,E)=>{const F=[{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 E?F==null?void 0:F.filter(D=>E==null?void 0:E.includes(D==null?void 0:D.prop)):F},L=(K,pe)=>{var _,me,Ue,it,Fe,We,_e,V,le;const E=((Fe=(it=(Ue=(me=(_=s==null?void 0:s.comp)==null?void 0:_.compData)==null?void 0:me.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Ue.contents)==null?void 0:it.filter(ie=>(ie==null?void 0:ie.label)!=="操作"))==null?void 0:Fe.map(ie=>({value:ie==null?void 0:ie.prop,label:ie.label})))||[],F=/button/i,D=((le=(V=(_e=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:_e.filter(ie=>F.test(ie==null?void 0:ie.key)))==null?void 0:V.flatMap(ie=>ie==null?void 0:ie.contents))==null?void 0:le.map(ie=>({value:ie==null?void 0:ie.label,label:ie.label})))||[],N=w(E,D,K);h.value=pe?Es(N,pe):N,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(ie=>({prop:ie,rule:c})))};e.onMounted(()=>{L(null,s==null?void 0:s.extendItem)});const J=K=>{const pe=K==null?void 0:K[b.value];if(b.value==="执行任务"){if(!(pe!=null&&pe.join("/")))return;const E=pe==null?void 0:pe.join("/");L(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,K)}},M=K=>{o("change",{target:s==null?void 0:s.target,extendConfigs:K})},Ee=(K,pe)=>{b.value=pe==null?void 0:pe.changeProp,J(K)},X=K=>{o("onButtonClick",K)};return(K,pe)=>(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:M,onBlurChange:Ee,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Is=Pt._export_sfc(Ts,[["__scopeId","data-v-7c660c1f"]]),Bs={};function As(n,r){return null}const Ns=Pt._export_sfc(Bs,[["render",As]]),Vs={class:"form-operate-content"},Os={class:"form-operate-item"},Ms={class:"operate-title"},zs={class:"operate-content"},Fs={class:"fix-content"},Rs={class:"fix-button"},Ls={class:"operate-title"},Ps={class:"operate-content"},$s={class:"fix-content"},Ks={class:"fix-button"},js={style:{display:"flex","justify-content":"space-between"}},Us={class:"form-content"},Ws={class:"dialog-footer"},Hs={class:"form-content"},qs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.ref(!1),u=e.ref([]),y=e.ref([]),g=e.ref(!1),h=e.ref([]),b=e.ref([]),w=e.ref(""),I=e.ref(!1),L=e.ref(0),J=e.ref([]),M=e.ref([]),Ee=(V,le)=>{if((le==null?void 0:le.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const ie=le==null?void 0:le.optionUrl;return(ie==null?void 0:ie.selectRelateType)||le[V.key]}if((le==null?void 0:le.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const ie=le==null?void 0:le.optionUrl;return(ie==null?void 0:ie.menuSelect)||le[V.key]}if((le==null?void 0:le.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const ie=le==null?void 0:le.optionUrl;return(ie==null?void 0:ie.groupSelect)||le[V.key]}if((le==null?void 0:le.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(le==null?void 0:le.value)||le[V.key];if((le==null?void 0:le.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const ie=le[V.key];return wo(ie)?ie:V.default}return(V==null?void 0:V.label)==="类型"&&le[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!le[V.key]?!1:le[V.key]},X=async V=>{var ue,Ye,ot,Q,R,ye;c.value=!0;let le=[];const ie=await((ot=(Ye=(ue=Ae.FormContent)==null?void 0:ue.find(we=>(we==null?void 0:we.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ye.value)==null?void 0:ot.value)??((R=(Q=Ae.FormContent)==null?void 0:Q.find(we=>(we==null?void 0:we.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:R.value);if(ie==null||ie.forEach(we=>{L.value++,le.push({label:we==null?void 0:we.label,name:we==null?void 0:we.label,type:we.type,prop:we==null?void 0:we.prop,value:Ee(we,V),id:L.value,contents:we==null?void 0:we.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((ye=V==null?void 0:V.menuSelect)==null?void 0:ye.length)>0){const we=await Ae.menuToContentType(V==null?void 0:V.menuSelect);le=le==null?void 0:le.map(je=>((je==null?void 0:je.name)==="组信息选项"&&(je.contents=we),je))}w.value=V==null?void 0:V.id,u.value=await Ae.selectToBase(Ae.formToOptionsContents(le)),y.value=await Ae.selectToBase(Ae.formToOptionsContents(le))},K=V=>{var ie;g.value=!0;let le=[];(ie=Ae.FormButton)==null||ie.forEach(ue=>{L.value++,le.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)==="类型"&&V[ue.key]===""?"normal":V[ue.key],id:L.value,contents:ue==null?void 0:ue.options})}),J.value=le,M.value=le,w.value=V==null?void 0:V.id};e.watch(()=>I.value,()=>{var le,ie;let V=d.cloneDeep(s.originalItemContents);(le=d.cloneDeep(s.originalItemContents))!=null&&le.find(ue=>(ue==null?void 0:ue.key)==="enableWrap")?V=(ie=d.cloneDeep(s.originalItemContents))==null?void 0:ie.map(ue=>((ue==null?void 0:ue.key)==="enableWrap"&&(ue.contents=!I.value),ue)):V.push({key:"enableWrap",contents:!I.value}),o("change",V)},{deep:!0});const pe=()=>{var ie,ue,Ye,ot,Q;J.value=M.value;let V={};if(w.value!==""?V.id=w.value:(L.value++,V.id="id"+L.value),(ie=J.value)==null||ie.forEach(R=>{var we;const ye=(we=Ae.FormButton)==null?void 0:we.find(je=>(je==null?void 0:je.label)===(R==null?void 0:R.label));ye&&(V[ye.key]=R.value)}),(ue=h.value)!=null&&ue.find(R=>R.id===V.id))h.value=(Ye=h.value)==null?void 0:Ye.map(R=>(R.id===V.id&&(R=V),R));else{let R=d.cloneDeep(h.value);h.value||(h.value=[]),R.push(V),h.value=R}g.value=!1,w.value="";let le=d.cloneDeep(s.originalItemContents);(ot=d.cloneDeep(s.originalItemContents))!=null&&ot.find(R=>(R==null?void 0:R.key)==="formButton")?le=(Q=d.cloneDeep(s.originalItemContents))==null?void 0:Q.map(R=>((R==null?void 0:R.key)==="formButton"&&(R.contents=h.value),R)):le.push({key:"formButton",contents:h.value}),o("change",le)},E=V=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,ie;b.value=(le=d.cloneDeep(b.value))==null?void 0:le.filter(ue=>(ue==null?void 0:ue.id)!==(V==null?void 0:V.id)),o("change",(ie=d.cloneDeep(s.originalItemContents))==null?void 0:ie.map(ue=>((ue==null?void 0:ue.key)==="formContent"&&(ue.contents=b.value),ue))),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=V=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,ie;h.value=(le=d.cloneDeep(h.value))==null?void 0:le.filter(ue=>(ue==null?void 0:ue.id)!==(V==null?void 0:V.id)),o("change",(ie=d.cloneDeep(s.originalItemContents))==null?void 0:ie.map(ue=>((ue==null?void 0:ue.key)==="formButton"&&(ue.contents=h.value),ue))),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=()=>{var le;g.value=!0;let V=[];(le=Ae.FormButton)==null||le.forEach(ie=>{L.value++,V.push({label:ie==null?void 0:ie.label,name:ie==null?void 0:ie.label,type:ie.type,value:(ie==null?void 0:ie.label)==="类型"?"normal":"",id:L.value,contents:ie==null?void 0:ie.options})}),J.value=V,M.value=V},N=()=>{var le,ie,ue;c.value=!0;let V=[];(ue=(ie=(le=Ae.FormContent)==null?void 0:le.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:ie.value)==null||ue.forEach(Ye=>{L.value++,V.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:L.value,contents:Ye==null?void 0:Ye.options})}),u.value=V,y.value=V},_=V=>{let le=d.cloneDeep(M.value);le=le==null?void 0:le.map(ie=>(ie.value=V==null?void 0:V[ie.name],ie)),M.value=le},me=V=>{const le=V.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((le==null?void 0:le.value)!="Select")return;const ie=V.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),ue=V.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");ie!=null&&ie.value&&Ml.isString(ue.value)&&(ue.value=[ue.value]),!(ie!=null&&ie.value)&&!Ml.isString(ue.value)&&(ue.value="")},Ue=async V=>{var le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je;if((V==null?void 0:V.类型)!==((ie=(le=y.value)==null?void 0:le.find(Ge=>(Ge==null?void 0:Ge.label)==="类型"))==null?void 0:ie.value)){let Ge=[];const de=await((ot=(Ye=(ue=Ae.FormContent)==null?void 0:ue.find(S=>(S==null?void 0:S.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ye.value)==null?void 0:ot.value)?await((je=(we=(ye=Ae.FormContent)==null?void 0:ye.find(S=>(S==null?void 0:S.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:we.value)==null?void 0:je.value):(R=(Q=Ae.FormContent)==null?void 0:Q.find(S=>(S==null?void 0:S.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:R.value;if(de==null||de.forEach(S=>{var Oe,be;L.value++;const W=Co(S==null?void 0:S.default)?(V==null?void 0:V[S.label])??S.value??"":S==null?void 0:S.default;Ge.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:W,prop:S==null?void 0:S.prop,id:L.value,contents:S==null?void 0:S.options,width:((be=(Oe=y.value)==null?void 0:Oe[0])==null?void 0:be.width)??1})}),V!=null&&V.菜单选项&&(($e=V==null?void 0:V.菜单选项)==null?void 0:$e.length)>0){const S=await Ae.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(W=>((W==null?void 0:W.name)==="组信息选项"&&(W.contents=S),W))}me(Ge),y.value=await Ae.selectToBase(d.cloneDeep(Ge)),u.value=await Ae.selectToBase(d.cloneDeep(Ge))}else{let Ge=d.cloneDeep(y.value);if(Ge=Ge==null?void 0:Ge.map(de=>(de.value=V==null?void 0:V[de.name],de)),V!=null&&V.菜单选项&&((Je=V==null?void 0:V.菜单选项)==null?void 0:Je.length)>0){const de=await Ae.menuToContentType(V==null?void 0:V.菜单选项);Ge=Ge==null?void 0:Ge.map(S=>((S==null?void 0:S.name)==="组信息选项"&&(S.contents=de),S))}Ge=Ae.formToOptionsContents(Ge),me(Ge),y.value=await Ae.selectToBase(d.cloneDeep(Ge))}},it=V=>{V||(u.value=y.value)},Fe=async V=>{await Ue(V),u.value=y.value},We=ml(async()=>{var ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de;u.value=y.value;let V={};V.width=((Ye=(ue=u.value)==null?void 0:ue[0])==null?void 0:Ye.width)??1,w.value!==""?V.id=w.value:(L.value++,V.id="id"+L.value);let le=await((R=(Q=(ot=Ae.FormContent)==null?void 0:ot.find(S=>{var W,Oe;return(S==null?void 0:S.key)===(((Oe=(W=u.value)==null?void 0:W.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:Q.value)==null?void 0:R.value)??((we=(ye=Ae.FormContent)==null?void 0:ye.find(S=>{var W,Oe;return(S==null?void 0:S.key)===(((Oe=(W=u.value)==null?void 0:W.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:we.value);if((je=u.value)==null||je.forEach(S=>{const W=le==null?void 0:le.find(Oe=>(Oe==null?void 0:Oe.label)===(S==null?void 0:S.label));W&&(V[W.key]=S.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,($e=b.value)!=null&&$e.find(S=>S.id===V.id))b.value=(Je=b.value)==null?void 0:Je.map(S=>(S.id===V.id&&(S=V),S));else{let S=d.cloneDeep(b.value);S.push(V),b.value=S}b.value=b.value.map(({id:S,...W})=>W),c.value=!1,w.value="";let ie=d.cloneDeep(s.originalItemContents);(Ge=d.cloneDeep(s.originalItemContents))!=null&&Ge.find(S=>(S==null?void 0:S.key)==="formContent")?ie=(de=d.cloneDeep(s.originalItemContents))==null?void 0:de.map(S=>((S==null?void 0:S.key)==="formContent"&&(S.contents=b.value),S)):ie.push({key:"formContent",contents:b.value}),o("change",ie)},300),_e=()=>{c.value=!1,g.value=!1,w.value="",y.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var le,ie,ue,Ye,ot,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const V=d.cloneDeep(s.originalItemContents);b.value=((le=V==null?void 0:V.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:le.contents)??[],h.value=((ie=V==null?void 0:V.find(R=>(R==null?void 0:R.key)==="formButton"))==null?void 0:ie.contents)??[],I.value=(ue=V==null?void 0:V.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&ue.contents?!((Ye=V==null?void 0:V.find(R=>(R==null?void 0:R.key)==="enableWrap"))!=null&&Ye.contents):!0,b.value=(ot=d.cloneDeep(b.value))==null?void 0:ot.map((R,ye)=>{var je;let we=R;return we.id=(R==null?void 0:R.id)??ye,R!=null&&R.label||(R.label=(R==null?void 0:R.key)??(R==null?void 0:R.label)??""),R!=null&&R.type||(R.type=(R==null?void 0:R.type)??""),R.contents=((je=R==null?void 0:R.options)==null?void 0:je.length)===0?(R==null?void 0:R.contents)??"":R==null?void 0:R.options,we}),b.value=Ae.formToOptionsContents(b.value),h.value=(Q=h.value)==null?void 0:Q.map((R,ye)=>R={label:(R==null?void 0:R.label)??"",type:(R==null?void 0:R.type)??"",background:(R==null?void 0:R.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(V,le)=>{const ie=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Vs,[e.createElementVNode("div",Os,[e.createElementVNode("div",Ms,[le[2]||(le[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:N},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[1]||(le[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(Ye,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",Fs,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Rs,[e.createVNode(ie,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Ye)},null,8,["onClick"]),e.createVNode(ie,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>E(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ls,[le[4]||(le[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:D},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[3]||(le[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ye,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",$s,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ks,[e.createVNode(ie,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Ye)},null,8,["onClick"]),e.createVNode(ie,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>F(Ye)},null,8,["onClick"])])])]))),128))]),le[6]||(le[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",js,[le[5]||(le[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(zt._sfc_main$2,{modelValue:I.value,"onUpdate:modelValue":le[0]||(le[0]=Ye=>I.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ue,onChangeVisible:it,onBlurChange:Fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ws,[e.createVNode(ue,{onClick:_e,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ue,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>le[8]||(le[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:pe},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pl=Pt._export_sfc(qs,[["__scopeId","data-v-20850524"]]),Gs={class:"step-module content"},Xs={class:"module-data"},Ys={class:"step-module layout"},Js={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,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}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),b=e.ref({}),w=e.ref([]),I=X=>{var K;b.value=X,o("change",(K=M())==null?void 0:K.compData)},L=(X,K)=>{var pe,E;switch(X){case"create":(pe=u.value)==null||pe.forEach(F=>{F.value=""}),h.value="create",g.visible=!0;break;case"update":(E=u.value)==null||E.forEach(F=>{F.value=K[F==null?void 0:F.prop]}),h.value="update",g.visible=!0;break;case"delete":w.value.splice(K,1),h.value="delete";break}},J=X=>{var K,pe,E;if((X==null?void 0:X.buttonName)==="确认"){const F=d.cloneDeep(X==null?void 0:X.content);switch(Object.keys(F).forEach(D=>{F[D]===""&&delete F[D]}),h.value){case"create":w.value.push({...F,index:((K=w.value)==null?void 0:K.length)+1});break;case"update":w.value=(pe=w.value)==null?void 0:pe.map(D=>D.index===(F==null?void 0:F.index)?{...D,title:F==null?void 0:F.title,description:F==null?void 0:F.description}:D);break}o("change",(E=M())==null?void 0:E.compData),g.visible=!1}else g.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:w.value},{key:"stepConfig",contents:b.value}]}),Ee=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,pe;X&&(b.value=((K=X==null?void 0:X.find(E=>E.key==="stepConfig"))==null?void 0:K.contents)??{},w.value=((pe=X==null?void 0:X.find(E=>E.key==="stepList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(X,K)=>{const pe=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Gs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=F=>L("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(F,D)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:D},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:N=>L("update",{...F,index:D+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:N=>L("delete",D)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ys,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(zt.ssForm,{rowContents:c.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:Ee,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Js,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Pt._export_sfc(Qs,[["__scopeId","data-v-7dbd17f2"]]),ec={class:"step-module content"},tc={class:"module-data"},ac={class:"step-module layout"},nc={class:"form-content"},lc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.ref("create"),u=e.ref({}),y=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:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),w=e.reactive({visible:!1,width:"40%",title:"时间线"}),I=X=>{var K;u.value=X,o("change",(K=M())==null?void 0:K.compData)},L=(X,K)=>{var pe,E;switch(X){case"create":(pe=h.value)==null||pe.forEach(F=>{F.value=""}),c.value="create",w.visible=!0;break;case"update":(E=h.value)==null||E.forEach(F=>{F.value=K[F==null?void 0:F.prop]}),c.value="update",w.visible=!0;break;case"delete":y.value.splice(K,1),c.value="delete";break}},J=X=>{var K,pe,E,F;if((X==null?void 0:X.buttonName)==="确认"){const D=d.cloneDeep(X==null?void 0:X.content);switch(Object.keys(D).forEach(N=>{D[N]===""&&delete D[N]}),c.value){case"create":(pe=y.value)==null||pe.push({...D,index:((K=y.value)==null?void 0:K.length)+1});break;case"update":y.value=(E=y.value)==null?void 0:E.map(N=>N.index===(D==null?void 0:D.index)?{...N,content:D==null?void 0:D.content,timestamp:D==null?void 0:D.timestamp}:N);break}o("change",(F=M())==null?void 0:F.compData),w.visible=!1}else w.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:u.value}]}),Ee=()=>{w.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,pe;X&&(u.value=((K=X==null?void 0:X.find(E=>E.key==="timeLineConfig"))==null?void 0:K.contents)??{},y.value=((pe=X==null?void 0:X.find(E=>E.key==="timeLineList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(X,K)=>{const pe=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",ec,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=F=>L("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(F,D)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:D},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:N=>L("update",{...F,index:D+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:N=>L("delete",D)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",ac,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(zt.ssForm,{rowContents:g.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:Ee,width:w.width},{default:e.withCtx(()=>[e.createElementVNode("div",nc,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),oc=Pt._export_sfc(lc,[["__scopeId","data-v-39ffc861"]]),rc={};function ic(n,r){return e.openBlock(),e.createElementBlock("div")}const sc=Pt._export_sfc(rc,[["render",ic]]),cc={class:"extra-content"},uc={key:0},pc={key:1},dc={class:"dialog-footer"},fc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:r}){const s=n,o=e.ref(0),c=e.ref(),u=e.ref(),y=r,g=e.ref(!1),h=e.ref({}),b=e.ref({}),w=e.ref();e.watch(()=>[s.itemData],()=>{var F;const E=d.cloneDeep(s.itemData);c.value=(F=d.cloneDeep(E))==null?void 0:F.map(D=>{var N;if(D.key==="extra"){let _=[];(N=D.value)==null||N.forEach(me=>{var Ue;_.push((Ue=Object.values(me))==null?void 0:Ue[0])}),D.value=_}return D})},{deep:!0,immediate:!0});const I=(E,F,D,N)=>{var me;let _={};((me=E==null?void 0:E[0])==null?void 0:me.contents)==="详情"&&(g.value=!0,_[F]=E,u.value=E==null?void 0:E.filter(Ue=>(Ue==null?void 0:Ue.key)!=="tableContentName"),h.value=_,b.value=D,w.value=N.id)},L=E=>{var Ue,it,Fe,We;const F=(it=(Ue=Object.values(d.cloneDeep(h.value)))==null?void 0:Ue[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),D=(We=(Fe=Object.values(d.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=D==null?void 0:D.map((_e,V)=>{var le;return V===E.index&&(_e==null?void 0:_e.comp)==="Table"&&(_e.compData=(le=_e.compData)==null?void 0:le.map(ie=>{var ue,Ye;return(ie==null?void 0:ie.key)==="tableContents"&&(ie.contents=(Ye=(ue=E.content)==null?void 0:ue.map(ot=>{let Q={};for(let R in ot)R!=="id"&&(Q[R]=ot[R]);return Q}))==null?void 0:Ye.map(ot=>Object.values(ot))),ie})),_e});N.unshift(F==null?void 0:F[0]);let _=d.cloneDeep(h.value),me={};for(let _e in _)me[_e]=N;h.value=me},J=()=>{g.value=!1,h.value={},b.value={},w.value=void 0,o.value++},M=E=>{var Ue,it,Fe,We;const F=(it=(Ue=Object.values(d.cloneDeep(h.value)))==null?void 0:Ue[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),D=(We=(Fe=Object.values(d.cloneDeep(h.value)))==null?void 0:Fe[0])==null?void 0:We.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),N=D==null?void 0:D.map((_e,V)=>(V===E.index&&(_e.compData=E.contents),_e));N.unshift(F==null?void 0:F[0]);let _=d.cloneDeep(h.value),me={};for(let _e in _)me[_e]=N;h.value=me},Ee=()=>{var F,D;let E={};for(let N in b.value)N===((F=Object.keys(h.value))==null?void 0:F[0])?E[N]=(D=Object.values(h.value))==null?void 0:D[0]:E[N]=b.value[N];y("change",{buttonName:"编辑",index:w.value,singleContent:E},"methodData"),g.value=!1,h.value={},b.value={},w.value=void 0},X=()=>{g.value=!1,h.value={},b.value={},w.value=void 0},K=E=>{y("change",E,"methodData")},pe=E=>on(E);return(E,F)=>{const D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(N,_)=>(e.openBlock(),e.createElementBlock("div",{key:o.value},[(N==null?void 0:N.key)==="extra"?(e.openBlock(),e.createElementBlock("div",uc)):(e.openBlock(),e.createElementBlock("div",pc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(N.comp)),{itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:_,index:(N==null?void 0:N.id)??_,onContentClick:I,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(N,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(N.comp)),{itemData:N==null?void 0:N.compData,onChange:L,childItemData:N==null?void 0:N.itemChildData,key:_,onContentChange:M,index:(N==null?void 0:N.id)??_,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",dc,[e.createVNode(D,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>F[0]||(F[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(D,{class:"confirm-button footer-button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},hc=Pt._export_sfc(fc,[["__scopeId","data-v-2d9c5ab2"]]);let Tt="$R";const vc=n=>/^'[^']+':\{.*\}$/.exec(d.cloneDeep(n)),gc=n=>{var s,o;let r=n.trim();if((r==null?void 0:r[0])!=="["&&(r==null?void 0:r[0])!=="{"){let c=(o=(s=r==null?void 0:r.replace(":",Tt))==null?void 0:s.split(Tt))==null?void 0:o[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},mc=n=>{var s;let r=n.trim();return(r==null?void 0:r[0])!=="["&&(r==null?void 0:r[0])!=="{"&&((s=Wn(r,","))==null?void 0:s.length)===1},yc=n=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(d.cloneDeep(n)),bc=n=>/\[[^\[\]]*\]=.*$/.exec(d.cloneDeep(n)),kc=n=>/^'([^']+)':.*$/.exec(d.cloneDeep(n)),Dn=n=>{let r=n;const s=[];let o="";for(const c of r)c.includes("{")||o.includes("{")||c.includes("[")||o.includes("[")||c.includes("【")||o.includes("【")||c.includes("(")||o.includes("(")||c.includes("(")||o.includes("(")||c.includes("/*")||o.includes("/*")||c.includes("&")||o.includes("&")?(o+=c.trim(),d.cloneDeep(o).split("{").length-1===d.cloneDeep(o).split("}").length-1&&d.cloneDeep(o).split("【").length-1===d.cloneDeep(o).split("】").length-1&&d.cloneDeep(o).split("[").length-1===d.cloneDeep(o).split("]").length-1&&d.cloneDeep(o).split("(").length-1===d.cloneDeep(o).split(")").length-1&&d.cloneDeep(o).split("(").length-1===d.cloneDeep(o).split(")").length-1&&d.cloneDeep(o).split("/*").length-1===d.cloneDeep(o).split("*/").length-1&&o[o.length-1]!==","&&o[o.length-1]!=="&"&&(s.push(o.replace(/\/\*[\s\S]*?\*\//g,"")),o="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Cn=(n,r)=>{let s=n;const o=[];let c="",u=0;for(const y of s)u++,y.includes("{")||c.includes("{")||y.includes("[")||c.includes("[")||y.includes("【")||c.includes("【")||y.includes("(")||c.includes("(")||y.includes("(")||c.includes("(")||y.includes("/*")||c.includes("/*")?(c+=y.trim(),d.cloneDeep(c).split("{").length-1===d.cloneDeep(c).split("}").length-1&&d.cloneDeep(c).split("【").length-1===d.cloneDeep(c).split("】").length-1&&d.cloneDeep(c).split("[").length-1===d.cloneDeep(c).split("]").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("/*").length-1===d.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===r?(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):u===(n==null?void 0:n.length)&&o.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=y.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===r&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return o},xc=(n,r)=>{let s=n;const o=[];let c="",u=0;for(const y of s)u++,y.includes("{")||c.includes("{")||y.includes("[")||c.includes("[")||y.includes("【")||c.includes("【")||y.includes("(")||c.includes("(")||y.includes("(")||c.includes("(")||y.includes("/*")||c.includes("/*")?(c+=y.trim(),d.cloneDeep(c).split("{").length-1===d.cloneDeep(c).split("}").length-1&&d.cloneDeep(c).split("【").length-1===d.cloneDeep(c).split("】").length-1&&d.cloneDeep(c).split("[").length-1===d.cloneDeep(c).split("]").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("/*").length-1===d.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===r)&&(c.match(/'/g)||[]).length%2===0?(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):u===(n==null?void 0:n.length)&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=y.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===r||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),o},$l=(n,r)=>{let s=0;for(let o=0;o<n.length;o++)n[o]===r&&s++;return s%2===0},Wn=(n,r)=>{let s=n;const o=[];let c="",u=0;for(const y of s)u++,y.includes("{")||c.includes("{")||y.includes("[")||c.includes("[")||y.includes("【")||c.includes("【")||y.includes("(")||c.includes("(")||y.includes("(")||c.includes("(")||y.includes("/*")||c.includes("/*")?(c+=y.trim(),d.cloneDeep(c).split("{").length-1===d.cloneDeep(c).split("}").length-1&&d.cloneDeep(c).split("【").length-1===d.cloneDeep(c).split("】").length-1&&d.cloneDeep(c).split("[").length-1===d.cloneDeep(c).split("]").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("(").length-1===d.cloneDeep(c).split(")").length-1&&d.cloneDeep(c).split("/*").length-1===d.cloneDeep(c).split("*/").length-1&&c[c.length-1]===r&&$l(c,"'")?(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):u===(n==null?void 0:n.length)&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=y.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===r&&$l(c,"'")&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),o},Dc=n=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(d.cloneDeep(n)),wc=n=>{var r,s,o,c,u,y,g,h,b,w,I,L,J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We,_e,V,le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te,Me,at,v,C,P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft;if(kc(n)){let et={},Ze=(o=(s=(r=n==null?void 0:n.replace(":",Tt))==null?void 0:r.split(Tt))==null?void 0:s[0])==null?void 0:o.replaceAll("'",""),ne="",fe="",Be=(u=(c=n==null?void 0:n.replace(":",Tt))==null?void 0:c.split(Tt))==null?void 0:u[1];if((Be==null?void 0:Be[0])==="("&&(fe=(h=(g=(y=Be==null?void 0:Be.split("("))==null?void 0:y[1])==null?void 0:g.split(")"))==null?void 0:h[0],Be=(w=(b=Be==null?void 0:Be.replace(")",Tt))==null?void 0:b.split(Tt))==null?void 0:w[1]),((I=Wn(Be,"/"))==null?void 0:I.length)>1)ne=(L=Wn(Be,"/"))==null?void 0:L.map(ve=>ve==null?void 0:ve.replaceAll("/","").replaceAll("'",""));else if(Be.includes("{")||Be.includes("("))if(Be.includes("{")?ne=ne+((pe=(K=(X=(Ee=(M=(J=Be==null?void 0:Be.split("{"))==null?void 0:J[1])==null?void 0:M.split("}"))==null?void 0:Ee[0])==null?void 0:X.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:pe.replaceAll("]","])"))+"[":ne=ne+((me=(_=(N=(D=(F=(E=Be==null?void 0:Be.split("("))==null?void 0:E[1])==null?void 0:F.split(")"))==null?void 0:D[0])==null?void 0:N.replaceAll(":","/").replaceAll("'",""))==null?void 0:_.replaceAll("[","(["))==null?void 0:me.replaceAll("]","])"))+"[",!((Ue=Be==null?void 0:Be.split(")"))!=null&&Ue[1]))ne=ne+((We=(Fe=(it=Be==null?void 0:Be.split("["))==null?void 0:it[1])==null?void 0:Fe.split("]"))==null?void 0:We[0])+"]";else{const ve=(ie=(le=(V=(_e=Be==null?void 0:Be.split(")"))==null?void 0:_e[1])==null?void 0:V.replace("[",Tt))==null?void 0:le.split(Tt))==null?void 0:ie[1];if(Be!=null&&Be.includes("?"))ne=((ue=Be==null?void 0:Be.split("?"))==null?void 0:ue[1])+"&&"+((ot=(Ye=Be==null?void 0:Be.split("?"))==null?void 0:Ye[0])==null?void 0:ot.replaceAll("#","==="));else if(ve){const he=ve.lastIndexOf("]"),ze=ve.substring(0,he)+Tt+ve.substring(he+1);ne=ne+((Q=ze==null?void 0:ze.split(Tt))==null?void 0:Q[0])+"]"}else ne=(we=(ye=(R=n==null?void 0:n.replace(":",Tt))==null?void 0:R.split(Tt))==null?void 0:ye[1])==null?void 0:we.replaceAll("'","")}else if(!(n!=null&&n.includes("?")))ne=(Je=($e=(je=n==null?void 0:n.replace(":",Tt))==null?void 0:je.split(Tt))==null?void 0:$e[1])==null?void 0:Je.replaceAll("'","");else{let ve=(S=(de=(Ge=n==null?void 0:n.replace(":",Tt))==null?void 0:Ge.split(Tt))==null?void 0:de[1])==null?void 0:S.replaceAll("'","");ne=((be=(Oe=(W=ve==null?void 0:ve.split("?"))==null?void 0:W[1])==null?void 0:Oe.split(":"))==null?void 0:be[0])+"&&"+((ee=ve==null?void 0:ve.split("?"))==null?void 0:ee[0])}return et[Ze]=fe!==""?fe+"$##"+ne:ne,{groupName:"",formContents:[[et]]}}else{let et={},Ze="",ne="";if(n.includes("#")){Ze=(te=(j=n==null?void 0:n.split("#"))==null?void 0:j[0])==null?void 0:te.replaceAll("'","");let fe=(Me=(Te=n==null?void 0:n.split("#"))==null?void 0:Te[1])==null?void 0:Me.replaceAll("'","");fe!=null&&fe.includes("{")?ne=ne+((P=(C=(v=(at=fe==null?void 0:fe.split("{"))==null?void 0:at[1])==null?void 0:v.split("}"))==null?void 0:C[0])==null?void 0:P.replaceAll(":","/").replaceAll("'",""))+"[":ne=ne+((ae=(T=(x=(Z=fe==null?void 0:fe.split("("))==null?void 0:Z[1])==null?void 0:x.split(")"))==null?void 0:T[0])==null?void 0:ae.replaceAll(":","/").replaceAll("'",""))+"[",ne=ne+((oe=(U=(z=fe==null?void 0:fe.replace("[",Tt))==null?void 0:z.split(Tt))==null?void 0:U[1])==null?void 0:oe.slice(0,((De=(H=($=fe==null?void 0:fe.replace("[",Tt))==null?void 0:$.split(Tt))==null?void 0:H[1])==null?void 0:De.length)-1))}else{let fe=(se=(re=(Y=n==null?void 0:n.split("]"))==null?void 0:Y[0])==null?void 0:re.split("["))==null?void 0:se[1];if((xe=fe==null?void 0:fe.split(":"))==null||xe.forEach((Be,ve)=>{var he;((he=fe==null?void 0:fe.split(":"))==null?void 0:he.length)-1===ve&&(Ze=Be==null?void 0:Be.replaceAll("'",""))}),!(n!=null&&n.includes("[")))ne=((Ve=(q=(Ie=(Se=n==null?void 0:n.split("]"))==null?void 0:Se[1])==null?void 0:Ie.replace(":",Tt).split(Tt))==null?void 0:q[1])==null?void 0:Ve.replaceAll("'",""))??"";else{let Be=(Pe=(lt=(He=(rt=(Ke=(ge=d.cloneDeep(n))==null?void 0:ge.split("("))==null?void 0:Ke[1])==null?void 0:rt.split(")"))==null?void 0:He[0])==null?void 0:lt.replaceAll("{","").replaceAll("}",""))==null?void 0:Pe.replaceAll("'","").replaceAll(":","/"),ve="";(ft=fe==null?void 0:fe.split(":"))==null||ft.forEach(he=>{ve=ve===""?ve+(he==null?void 0:he.replaceAll("'","")):ve+":"+(he==null?void 0:he.replaceAll("'",""))}),ne=Be+"["+ve+"]"}}return et[Ze]=ne,{groupName:"",formContents:[[et]]}}},Cc=n=>(n==null?void 0:n[0])==="["&&(n==null?void 0:n[n.length-1])==="]"&&!(n!=null&&n.includes("{")),Ec=(n,r)=>{let s=n.length;for(;s--;)if(n[s]===")")return n.substring(0,s)+r+n.substring(s+1);return n},_c=n=>{var u,y,g,h,b;let r=n.slice(1,n.length-1),s;(r==null?void 0:r[0])==="["?s=(y=(u=Dn(d.cloneDeep(r)))==null?void 0:u.filter(w=>w!==","))==null?void 0:y.map(w=>w==null?void 0:w.slice(1,w.length-1)):(r="["+d.cloneDeep(r)+"]",s=(h=(g=Dn(d.cloneDeep(r)))==null?void 0:g.filter(w=>w!==","))==null?void 0:h.map(w=>w==null?void 0:w.slice(1,w.length-1))),s=(b=d.cloneDeep(s))==null?void 0:b.map(w=>{var I,L;return w=(L=(I=w.replace(")",Tt))==null?void 0:I.split(Tt))==null?void 0:L[1],w});let o=[],c=[];return s==null||s.forEach(w=>{var J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We,_e,V,le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te,Me,at,v,C,P,Z,x,T;let I=(M=(J=d.cloneDeep(w))==null?void 0:J.slice(1,d.cloneDeep(w).length-1))==null?void 0:M.replace(":",Tt).split(Tt);if(((X=(Ee=d.cloneDeep(I))==null?void 0:Ee[0])==null?void 0:X.replaceAll("'",""))==="输入"){if(!((pe=(K=d.cloneDeep(I))==null?void 0:K[1])!=null&&pe.includes("["))&&!((F=(E=d.cloneDeep(I))==null?void 0:E[1])!=null&&F.includes("("))){Ae.IsJson((D=d.cloneDeep(I))==null?void 0:D[1].replaceAll("'",'"'))&&c.push(JSON.parse((N=d.cloneDeep(I))==null?void 0:N[1].replaceAll("'",'"')));return}if(((me=(_=d.cloneDeep(I))==null?void 0:_[1])==null?void 0:me[0])==="["){let ae=(We=(Ue=d.cloneDeep(I))==null?void 0:Ue[1])==null?void 0:We.slice(1,((Fe=(it=d.cloneDeep(I))==null?void 0:it[1])==null?void 0:Fe.length)-1);(V=(_e=Dn(ae))==null?void 0:_e.filter(z=>z!==","))==null||V.forEach(z=>{var oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze,ne,fe,Be,ve;let U={},$=(re=(Y=d.cloneDeep(z))==null?void 0:Y.slice(1,((oe=d.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:re.replace(":",Tt).split(Tt),H=(se=$==null?void 0:$[0])==null?void 0:se.replaceAll("'",""),De;(xe=$==null?void 0:$[1])!=null&&xe.includes("(")?(De=(lt=(He=(rt=(Ke=(ge=(Ve=(q=(Ie=d.cloneDeep($))==null?void 0:Ie[1])==null?void 0:q.replaceAll("{",""))==null?void 0:Ve.replaceAll("}",""))==null?void 0:ge.split("("))==null?void 0:Ke[1])==null?void 0:rt.split(")"))==null?void 0:He[0])==null?void 0:lt.replaceAll(":","/").replaceAll("'",""),(ft=(Pe=d.cloneDeep($))==null?void 0:Pe[1])!=null&&ft.includes("[")&&(De=d.cloneDeep(De)+"["+((ve=(Be=(fe=(ne=(Ze=(et=d.cloneDeep($))==null?void 0:et[1])==null?void 0:Ze.split("["))==null?void 0:ne[1])==null?void 0:fe.split("]"))==null?void 0:Be[0])==null?void 0:ve.replaceAll("'",""))+"]")):De=(Se=$==null?void 0:$[1])==null?void 0:Se.replaceAll("'",""),U[H]=De,c.push(U)})}}else{if(!((ie=(le=d.cloneDeep(I))==null?void 0:le[1])!=null&&ie.includes("["))&&!((Ye=(ue=d.cloneDeep(I))==null?void 0:ue[1])!=null&&Ye.includes("("))){Ae.IsJson((ot=d.cloneDeep(I))==null?void 0:ot[1].replaceAll("'",'"'))&&o.push(JSON.parse((Q=d.cloneDeep(I))==null?void 0:Q[1].replaceAll("'",'"')));return}if(((ye=(R=d.cloneDeep(I))==null?void 0:R[1])==null?void 0:ye[0])==="["){let ae=(Je=(we=d.cloneDeep(I))==null?void 0:we[1])==null?void 0:Je.slice(1,(($e=(je=d.cloneDeep(I))==null?void 0:je[1])==null?void 0:$e.length)-1);(de=(Ge=Dn(ae))==null?void 0:Ge.filter(z=>z!==","))==null||de.forEach(z=>{var oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze,ne,fe,Be,ve,he,ze,Ce,A,ke,nt,Le,Qe,Re,ht,pt,st,vt,yt;let U={},$=(re=(Y=d.cloneDeep(z))==null?void 0:Y.slice(1,((oe=d.cloneDeep(z))==null?void 0:oe.length)-1))==null?void 0:re.replace(":",Tt).split(Tt),H=(se=$==null?void 0:$[0])==null?void 0:se.replaceAll("'",""),De;if(!((xe=$==null?void 0:$[1])!=null&&xe.includes("(")))De=(Se=$==null?void 0:$[1])==null?void 0:Se.replaceAll("'","");else if(De=(rt=(Ke=(ge=(Ve=(q=(Ie=d.cloneDeep($))==null?void 0:Ie[1])==null?void 0:q.replaceAll("{",""))==null?void 0:Ve.replaceAll("}",""))==null?void 0:ge.replace("(",Tt))==null?void 0:Ke.split(Tt))==null?void 0:rt[1],De=(lt=(He=Ec(d.cloneDeep(De),Tt))==null?void 0:He.split(Tt))==null?void 0:lt[0],!(De!=null&&De.includes("(")))De=(Pe=d.cloneDeep(De))==null?void 0:Pe.replaceAll(":","/").replaceAll("'",""),(et=(ft=d.cloneDeep($))==null?void 0:ft[1])!=null&&et.includes("[")&&(De=d.cloneDeep(De)+"["+((A=(Ce=(ze=(he=(ne=(Ze=d.cloneDeep($))==null?void 0:Ze[1])==null?void 0:ne.split("["))==null?void 0:he[((ve=(Be=(fe=d.cloneDeep($))==null?void 0:fe[1])==null?void 0:Be.split("["))==null?void 0:ve.length)-1])==null?void 0:ze.split("]"))==null?void 0:Ce[0])==null?void 0:A.replaceAll("'",""))+"]");else{let Dt="";(ke=Cn(De,":"))==null||ke.forEach(It=>{var Bt,wt,Rt,kt,Ut,Gt,Ot,xa,ha,Da,_a,va,Sa,ga,Ta;if(!(It!=null&&It.includes("(")))Dt=Dt===""?Dt+((Bt=It==null?void 0:It.replaceAll(":",""))==null?void 0:Bt.replaceAll("'","")):Dt+"/"+((wt=It==null?void 0:It.replaceAll(":",""))==null?void 0:wt.replaceAll("'",""));else{let ma=(Da=(ha=(xa=(Ot=(Gt=(Ut=(kt=(Rt=d.cloneDeep(It))==null?void 0:Rt.replaceAll("{",""))==null?void 0:kt.replaceAll("}",""))==null?void 0:Ut.replace("(",Tt))==null?void 0:Gt.split(Tt))==null?void 0:Ot[1])==null?void 0:xa.split(")"))==null?void 0:ha[0])==null?void 0:Da.replaceAll(":","/").replaceAll("'","");ma=ma+"["+((Ta=(ga=(Sa=(va=(_a=d.cloneDeep(It))==null?void 0:_a.split("["))==null?void 0:va[1])==null?void 0:Sa.split("]"))==null?void 0:ga[0])==null?void 0:Ta.replaceAll("'",""))+"]",Dt=Dt===""?Dt+"["+ma+"]":Dt+"/["+ma+"]"}}),De=Dt+"["+((yt=(vt=(st=(pt=(Le=(nt=d.cloneDeep($))==null?void 0:nt[1])==null?void 0:Le.split("["))==null?void 0:pt[((ht=(Re=(Qe=d.cloneDeep($))==null?void 0:Qe[1])==null?void 0:Re.split("["))==null?void 0:ht.length)-1])==null?void 0:st.split("]"))==null?void 0:vt[0])==null?void 0:yt.replaceAll("'",""))+"]"}U[H]=De,o.push(U)})}else{let ae=(be=(S=d.cloneDeep(I))==null?void 0:S[1])==null?void 0:be.slice(1,((Oe=(W=d.cloneDeep(I))==null?void 0:W[1])==null?void 0:Oe.length)-1),z={},U=(P=(C=(te=(j=(ee=d.cloneDeep(ae))==null?void 0:ee.split("]"))==null?void 0:j[0])==null?void 0:te.split(":"))==null?void 0:C[((v=(at=(Me=(Te=d.cloneDeep(ae))==null?void 0:Te.split("]"))==null?void 0:Me[0])==null?void 0:at.split(":"))==null?void 0:v.length)-1])==null?void 0:P.replaceAll("'",""),$=((T=(x=(Z=d.cloneDeep(ae))==null?void 0:Z.split("]"))==null?void 0:x[0])==null?void 0:T.replaceAll("'",""))+"]";z[U]=$,o.push(z)}}}),{output:o,input:c}},Sc={key:0,class:"method-content"},Tc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const r=e.ref([]),s=Ae.useOriginalState(d.pinia),{originalPath:o}=d.storeToRefs(s),c=n,u=e.ref(!1),y=e.ref(),g=Ae.useTableComp(d.pinia),{multipleTableConst:h}=d.storeToRefs(g),b=jt.useModelComp(d.pinia),w=e.ref(!1),I=jt.useMenuState(d.pinia),L=d.useLoginState(d.pinia),{itemData:J,isEdit:M,routeToChildPath:Ee,tableViewContents:X,lockingPage:K,payloadTypes:pe}=d.storeToRefs(b),{activeMenuPath:E,platform:F,childMenu:D}=d.storeToRefs(I),{loginUserInfo:N}=d.storeToRefs(L),_=e.ref(!1),me=async()=>{var Q,R;(Q=r.value)!=null&&Q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await ie((R=r.value)==null?void 0:R.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await Ae.onSaveBack()};e.watch(()=>J.value,async()=>{M.value==="view"&&!_.value&&await ot(d.cloneDeep(c.itemData)),_.value=!1},{deep:!0});const Ue=()=>{u.value=!1,y.value=void 0},it=Q=>Q.map(R=>{const ye={};for(const we in R){const je=R[we];if(we.includes(h.value)){const $e=we.split(h.value);let Je=ye;$e.forEach((Ge,de)=>{de===$e.length-1?Je[Ge]=je:(Je[Ge]||(Je[Ge]={}),Je=Je[Ge])})}else ye[we]=je}return ye}),Fe=async(Q,R,ye=[])=>{var je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te,Me,at;let we=(je=d.cloneDeep(R))==null?void 0:je.filter(v=>(v==null?void 0:v.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let v=(S=(de=(Ge=(Je=($e=d.cloneDeep(Q))==null?void 0:$e.split("["))==null?void 0:Je[1])==null?void 0:Ge.split("]"))==null?void 0:de[0])==null?void 0:S.split(":"),C="";if(v!=null&&v[0]){let P=(W=we==null?void 0:we.find(Z=>(Z==null?void 0:Z.name)===(v==null?void 0:v[0])))==null?void 0:W.compData;if(!P){let Z=(Oe=Q==null?void 0:Q.split("["))==null?void 0:Oe[0],x=await Ae.getItemData(Z,sessionStorage.getItem("systemKey"),"",!1,"","",ye);P=(be=x==null?void 0:x.find(T=>(T==null?void 0:T.name)===(v==null?void 0:v[0])))==null?void 0:be.compData}P==null||P.forEach(Z=>{var x,T,ae,z,U,$;if((Z==null?void 0:Z.key)==="formContent")(x=Z==null?void 0:Z.contents)==null||x.forEach(H=>{var De;(H==null?void 0:H.key)===(v==null?void 0:v[1])&&(Array.isArray(H==null?void 0:H.value)?C=H==null?void 0:H.value:C=(De=H==null?void 0:H.value)==null?void 0:De.toString())});else if((Z==null?void 0:Z.key)==="tableContents"){let H=[],De=(T=P==null?void 0:P.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:T.contents,oe=(v==null?void 0:v[1])??"";if(De!=null&&De.every(Y=>Array.isArray(Y))){let Y=Ae.getColumnChild((U=De==null?void 0:De[0])==null?void 0:U.filter(re=>(re==null?void 0:re.label)!=="操作"));($=Z.contents)==null||$.forEach(re=>{let se={};re=re==null?void 0:re.filter(xe=>!(xe!=null&&xe.id)),Y==null||Y.forEach((xe,Se)=>{let Ie=re[Se];typeof re[Se]=="number"&&(Ie=re[Se].toString()),(oe===""||oe===xe.prop)&&(se[xe.prop]=Ie)}),H.push(se)}),H=it(H)}else{let Y=(ae=De==null?void 0:De.map(re=>re==null?void 0:re.label))==null?void 0:ae.filter(re=>re!=="操作");(z=Z.contents)==null||z.forEach(re=>{let se={};re=re==null?void 0:re.filter(xe=>!(xe!=null&&xe.id)),Y==null||Y.forEach((xe,Se)=>{let Ie=re[Se];typeof re[Se]=="number"&&(Ie=re[Se].toString()),(oe===""||oe===xe)&&(se[xe]=Ie)}),H.push(se)})}C=H}})}return C}else if(Q!=null&&Q.includes("/")){let v={};return(ee=d.cloneDeep(we))==null||ee.forEach((C,P)=>{var Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge;if((C==null?void 0:C.comp)==="Table"){let Ke=Array.isArray((T=(x=(Z=C==null?void 0:C.compData)==null?void 0:Z.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:x.contents)==null?void 0:T[0])?($=(U=(z=(ae=C==null?void 0:C.compData)==null?void 0:ae.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:z.contents)==null?void 0:U[0])==null?void 0:$.some(Pe=>Pe==null?void 0:Pe.children):[],rt=(oe=(De=(H=C==null?void 0:C.compData)==null?void 0:H.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:De.contents)==null?void 0:oe.map(Pe=>(Pe!=null&&Pe.find(ft=>ft==null?void 0:ft.id)&&(Pe=Pe.slice(1)),Pe)),He=(Se=(xe=(se=(re=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:re.contents)==null?void 0:se[0])==null?void 0:xe[0])==null?void 0:Se.label,lt=(q=(Ie=C==null?void 0:C.compData)==null?void 0:Ie.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:q.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?v[C.name]=v!=null&&v[C.name]?v[C.name]:Ae.tableToForm(rt,lt):v[He]=Ae.tableToForm(rt,lt);else{const Pe=[];lt=lt.slice(1,lt.length-1),lt==null||lt.forEach((ft,et)=>{rt==null||rt.forEach(Ze=>{Pe.push({key:ft.label+Ze[0],value:Ze[et+1]})})}),v["form"+P]=Pe}}else{const Ke=(ge=(Ve=C.compData)==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:ge.contents;v!=null&&v.form||(v.form=[]);const rt=[];Ke==null||Ke.forEach(He=>{He.key!==""&&(He={key:(He==null?void 0:He.key)??(He==null?void 0:He.label),value:He==null?void 0:He.value},rt.push(He))}),v.form=[...rt,...d.cloneDeep(v==null?void 0:v.form)]}}),v}else{if(Q==="createInsofDataApi"){let v=(j=d.cloneDeep(R))==null?void 0:j[0];return v={comp:(te=d.cloneDeep(v))==null?void 0:te.comp,compData:(Te=d.cloneDeep(v))==null?void 0:Te.compData,name:(Me=d.cloneDeep(v))==null?void 0:Me.name,isShow:(at=d.cloneDeep(v))==null?void 0:at.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:v}}}return Q}},We=async(Q,R,ye)=>{var $e,Je,Ge;let we=await Ae.getItemData(R,sessionStorage.getItem("systemKey"),""),je=we==null?void 0:we.find(de=>(de==null?void 0:de.name)===(ye==null?void 0:ye[0]));if(je){if((je==null?void 0:je.comp)==="Table"){let de={};for(let te in d.cloneDeep(Q))d.cloneDeep(Q)[te]!=="loginUser"?de[te]=d.cloneDeep(Q)[te]:de[te]=(($e=N.value)==null?void 0:$e.account)||((Je=N.value)==null?void 0:Je.账号);let S=[],W=de;Array.isArray(Q)||(W=[de]),W==null||W.forEach(te=>{S.push({[te[ye[1]]]:te})});let Oe=[],be=S==null?void 0:S.map(te=>{var Te;return(Te=Object.keys(te))==null?void 0:Te[0]});we==null||we.forEach(te=>{var Te;(te==null?void 0:te.name)===(ye==null?void 0:ye[0])&&((Te=te==null?void 0:te.compData)==null||Te.forEach(Me=>{var at;(Me==null?void 0:Me.key)==="tableContents"&&((at=Me==null?void 0:Me.contents)==null||at.forEach(v=>{v!=null&&v.some(C=>be.includes(C))&&Oe.push({[v.find(C=>C.id).id]:v.find(C=>be.includes(C))})}))}))});let ee=Oe==null?void 0:Oe.map(te=>{var Te;return(Te=Object.keys(te))==null?void 0:Te[0]}),j=[];if(ee==null||ee.forEach(te=>{var at;let Te=(at=Oe==null?void 0:Oe.find(v=>{var C;return((C=Object.keys(v))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:at[te],Me=S==null?void 0:S.find(v=>{var C;return((C=Object.keys(v))==null?void 0:C[0])===Te});j.push({id:parseInt(te),value:{tableData:Me[Te]}})}),(j==null?void 0:j.length)>0)return j}else if((je==null?void 0:je.comp)==="Form"){let de=d.cloneDeep(je);de.compData=(Ge=de.compData)==null?void 0:Ge.map(Oe=>{var be;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(be=Oe.contents)==null?void 0:be.map(ee=>((ee==null?void 0:ee.key)===(ye==null?void 0:ye[1])&&(ee.value=(Q==null?void 0:Q[ee==null?void 0:ee.prop])||Q),ee))),Oe});let S={};for(let Oe in de)Oe!=="id"&&(S[Oe]=de[Oe]);let W=[];if(W.push({id:je==null?void 0:je.id,keyType:ye==null?void 0:ye[1],value:{pageData:S}}),(W==null?void 0:W.length)>0)return W}}},_e=async(Q,R,ye)=>{var $e,Je,Ge,de,S,W,Oe,be,ee,j;let we=await Ae.getItemData(R,sessionStorage.getItem("systemKey"),""),je=we==null?void 0:we.find(te=>(te==null?void 0:te.name)===(ye==null?void 0:ye[0]));if(je){if((je==null?void 0:je.comp)==="Table"){let te={};for(let Te in d.cloneDeep(Q))d.cloneDeep(Q)[Te]!=="loginUser"?te[Te]=d.cloneDeep(Q)[Te]:te[Te]=(($e=N.value)==null?void 0:$e.account)||((Je=N.value)==null?void 0:Je.账号);await d.createInsofDataApi({key:{type:"data",pageKey:R,tableId:je==null?void 0:je.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if((je==null?void 0:je.comp)==="Form"){let te=d.cloneDeep(je),Te=Object.keys(Q),Me="";(de=(Ge=d.cloneDeep(te))==null?void 0:Ge.compData)==null||de.forEach(x=>{var T,ae;(x==null?void 0:x.key)==="formContent"&&((ae=(T=d.cloneDeep(x))==null?void 0:T.contents)==null||ae.forEach(z=>{var U;Te.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((U=N.value)==null?void 0:U.姓名)&&(Me=z==null?void 0:z.key)}))});let at=[];(S=Object.values(Q[Me]))==null||S.forEach(x=>{x!=null&&x.includes("(")&&at.push(x)}),at=[...new Set(at)];const v=at==null?void 0:at.map(async x=>{var $,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve;let T="";(re=(Y=(oe=(De=(H=($=d.cloneDeep(x))==null?void 0:$.split("("))==null?void 0:H[1])==null?void 0:De.split(")"))==null?void 0:oe[0])==null?void 0:Y.split(":"))==null||re.forEach(ge=>{T=T===""?T+ge.replaceAll("'",""):T+"/"+ge.replaceAll("'","")});let ae=[];(Ve=(q=(Ie=(Se=(xe=(se=d.cloneDeep(x))==null?void 0:se.split("<"))==null?void 0:xe[1])==null?void 0:Se.split(">"))==null?void 0:Ie[0])==null?void 0:q.split(":"))==null||Ve.forEach(ge=>{ae.push(ge.replaceAll("'",""))});const z=await Ae.getItemData(T,sessionStorage.getItem("systemKey"),"");let U="";return z==null||z.forEach(ge=>{var Ke;ge.name===(ae==null?void 0:ae[0])&&((Ke=ge==null?void 0:ge.compData)==null||Ke.forEach(rt=>{var He;(rt==null?void 0:rt.key)==="formContent"&&((He=rt.contents)==null||He.forEach(lt=>{(lt==null?void 0:lt.key)===(ae==null?void 0:ae[1])&&(U=lt==null?void 0:lt.value)}))}))}),{[x]:U}}),C=await Promise.all(v);te.compData=(Oe=(W=d.cloneDeep(te))==null?void 0:W.compData)==null?void 0:Oe.map(x=>{var T,ae;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(ae=(T=d.cloneDeep(x))==null?void 0:T.contents)==null?void 0:ae.map(z=>{var U,$,H,De;return(U=Q[Me])!=null&&U[z==null?void 0:z.key]&&(Q[Me][z==null?void 0:z.key].includes("(")?z.value=($=C==null?void 0:C.find(oe=>{var Y;return((Y=Object.keys(oe))==null?void 0:Y[0])===Q[Me][z==null?void 0:z.key]}))==null?void 0:$[Q[Me][z==null?void 0:z.key]]:z.value=(De=(H=d.cloneDeep(Q))==null?void 0:H[Me])==null?void 0:De[z==null?void 0:z.key]),z})),x});const P=await d.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let Z="";((be=P==null?void 0:P.data)==null?void 0:be.type)==="success"&&((j=(ee=P==null?void 0:P.data)==null?void 0:ee.result)==null||j.forEach(x=>{var T,ae;((ae=(T=x==null?void 0:x.value)==null?void 0:T.pageData)==null?void 0:ae.name)===(ye==null?void 0:ye[0])&&(Z=x.id)}),await d.updateInsofDataApi({id:Z,value:{pageData:te}}))}}},V=(Q,R="",ye={})=>{for(const[we,je]of Object.entries(Q)){const $e=R?`${R}.${we}`:we;je!==null&&typeof je=="object"&&!Array.isArray(je)&&Object.prototype.toString.call(je)!=="[object Date]"?V(je,$e,ye):ye[$e]=je}return ye},le=async(Q,R,ye,we)=>{var Je,Ge,de,S,W,Oe,be,ee,j,te,Te,Me,at,v,C,P,Z,x,T,ae,z,U,$,H,De;let je=await Ae.getItemData(R,sessionStorage.getItem("systemKey"),""),$e=je==null?void 0:je.find(oe=>(oe==null?void 0:oe.name)===(ye==null?void 0:ye[0]));if($e){if(!(ye!=null&&ye[1])&&($e==null?void 0:$e.comp)==="Table"){let oe={},Y=[],re=(Ge=(Je=$e==null?void 0:$e.compData)==null?void 0:Je.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:Ge.contents;re!=null&&re.every(Se=>Array.isArray(Se))?Y=(S=Ae.getColumnChild((de=re==null?void 0:re[0])==null?void 0:de.filter(Se=>(Se==null?void 0:Se.label)!=="操作")))==null?void 0:S.map(Se=>Se==null?void 0:Se.prop):Y=re==null?void 0:re.map(Se=>Se==null?void 0:Se.label);for(let Se in d.cloneDeep(Q))if(d.cloneDeep(Q)[Se]!=="loginUser"){let Ie=V(d.cloneDeep(Q)[Se]),q={};for(let Ve in Ie)if(Y!=null&&Y.find(ge=>ge===Ve))q[Ve]=Ie[Ve];else if(Y!=null&&Y.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()))){let ge=Y==null?void 0:Y.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()));q[ge]=Ie[Ve]}oe[Se]=q}else oe[Se]=((W=N.value)==null?void 0:W.account)||((Oe=N.value)==null?void 0:Oe.账号);let se=await d.getInsofDataApi({keyLikes:{tableId:$e==null?void 0:$e.id}});if(((ee=(be=se==null?void 0:se.data)==null?void 0:be.result)==null?void 0:ee.length)>0){let Se=(te=(j=se==null?void 0:se.data)==null?void 0:j.result)==null?void 0:te.map(Ie=>Ie==null?void 0:Ie.id);(Se==null?void 0:Se.length)>0&&await d.batchDeleteInsofDataApi({ids:Se})}let xe=[];if((Te=$e==null?void 0:$e.compData)!=null&&Te.find(Se=>(Se==null?void 0:Se.key)==="pageColumn")&&((v=(at=(Me=$e==null?void 0:$e.compData)==null?void 0:Me.find(Se=>(Se==null?void 0:Se.key)==="pageColumn"))==null?void 0:at.contents)!=null&&v.includes("["))){const Se=await d.getInsofDataApi({id:$e==null?void 0:$e.tableId});let Ie=((x=(Z=(P=(C=Se==null?void 0:Se.data)==null?void 0:C.result)==null?void 0:P[0])==null?void 0:Z.key)==null?void 0:x.pageKey)??"";(T=Object.values(oe))==null||T.forEach(q=>{xe.push({key:{type:"data",pageKey:Ie,tableId:$e==null?void 0:$e.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:q}})})}else(ae=Object.values(oe))==null||ae.forEach(Se=>{xe.push({key:{type:"data",pageKey:R,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Se}})});(xe==null?void 0:xe.length)>0&&await d.batchAddInsofDataApi({dataList:xe})}else if(!(ye!=null&&ye[1])&&($e==null?void 0:$e.comp)==="Form"){let oe=d.cloneDeep($e);oe.compData=(U=(z=d.cloneDeep(oe))==null?void 0:z.compData)==null?void 0:U.map(se=>{var xe,Se;return(se==null?void 0:se.key)==="formContent"&&(se.contents=(Se=(xe=d.cloneDeep(se))==null?void 0:xe.contents)==null?void 0:Se.map(Ie=>{var q,Ve;return(q=d.cloneDeep(Q))!=null&&q[Ie==null?void 0:Ie.key]&&(Ie.value=(Ve=d.cloneDeep(Q))==null?void 0:Ve[Ie==null?void 0:Ie.key]),Ie})),se});const Y=await d.getInsofDataApi({key:{type:"structure",pageKey:R,systemKey:sessionStorage.getItem("systemKey")}});let re="";(($=Y==null?void 0:Y.data)==null?void 0:$.type)==="success"&&((De=(H=Y==null?void 0:Y.data)==null?void 0:H.result)==null||De.forEach(se=>{var xe,Se;((Se=(xe=se==null?void 0:se.value)==null?void 0:xe.pageData)==null?void 0:Se.name)===(ye==null?void 0:ye[0])&&(re=se.id)}),await d.updateInsofDataApi({id:re,value:{pageData:oe}}))}}},ie=async Q=>{var R,ye,we,je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te;I.setImportLoading(!0);try{if(Q.api){let Me=new WeakMap;(ye=(R=(await d.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:pe.value})).data.result)==null?void 0:R.filter($=>{var H,De;return((H=$==null?void 0:$.key)==null?void 0:H.pageKey)!=="menu"&&((De=$==null?void 0:$.key)==null?void 0:De.pageKey)!=="secret"}))==null||ye.forEach($=>{Me[$.key.pageKey]?Me[$.key.pageKey]=[...Me[$.key.pageKey],$]:Me[$.key.pageKey]=[$]});let v=await Ae.getItemData((D==null?void 0:D.value)===""?E.value:D==null?void 0:D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me),C="";if(v=v==null?void 0:v.map($=>{var H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge;if(($==null?void 0:$.comp)==="Form")$.compData=(H=$.compData)==null?void 0:H.map(Ke=>{var rt;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(rt=Ke.contents)==null?void 0:rt.map(He=>{var lt;if((He==null?void 0:He.value)===""&&(He==null?void 0:He.type)==="Select"){let Pe=Ae.judgeContents((lt=d.cloneDeep(He))==null?void 0:lt.optionUrl,Me);He.value=He.value||Pe}return He})),Ke});else if(($==null?void 0:$.comp)==="Table"&&(De=$.compData)!=null&&De.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(Y=(oe=$.compData)==null?void 0:oe.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn"))==null?void 0:Y.contents,rt=((se=(re=$.compData)==null?void 0:re.find(Pe=>(Pe==null?void 0:Pe.key)==="pageGroup"))==null?void 0:se.contents)??"",He=(Ie=(Se=(xe=Ke==null?void 0:Ke.split("["))==null?void 0:xe[1])==null?void 0:Se.split("]"))==null?void 0:Ie[0];C=((q=Ke==null?void 0:Ke.split("["))==null?void 0:q[0])+((ge=(Ve=X.value)==null?void 0:Ve.find(Pe=>(Pe==null?void 0:Pe.key)===He))==null?void 0:ge.value)}return $}),!(C===""||C==="")){const $=await Ae.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Me);v=v==null?void 0:v.map(H=>{var De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt;if((H==null?void 0:H.comp)==="Table"&&(De=H.compData)!=null&&De.find(He=>(He==null?void 0:He.key)==="pageColumn")){let He=(Y=(oe=H.compData)==null?void 0:oe.find(Ze=>(Ze==null?void 0:Ze.key)==="pageColumn"))==null?void 0:Y.contents,lt=((se=(re=H.compData)==null?void 0:re.find(Ze=>(Ze==null?void 0:Ze.key)==="pageGroup"))==null?void 0:se.contents)??"",Pe=(Ie=(Se=(xe=He==null?void 0:He.split("["))==null?void 0:xe[1])==null?void 0:Se.split("]"))==null?void 0:Ie[0],ft=((q=He==null?void 0:He.split("["))==null?void 0:q[0])+((ge=(Ve=X.value)==null?void 0:Ve.find(Ze=>(Ze==null?void 0:Ze.key)===Pe))==null?void 0:ge.value),et=(Ke=$==null?void 0:$.find(Ze=>(Ze==null?void 0:Ze.name)===(lt===""?c==null?void 0:c.compName:lt)))==null?void 0:Ke.compData;H.compData=(rt=H.compData)==null?void 0:rt.map(Ze=>{var ne;return(Ze==null?void 0:Ze.key)==="tableContents"&&(Ze.contents=(ne=et==null?void 0:et.find(fe=>(fe==null?void 0:fe.key)==="tableContents"))==null?void 0:ne.contents),Ze})}return H})}let P={};if(((je=(we=Q==null?void 0:Q.extraValues)==null?void 0:we.input)==null?void 0:je.length)>0){const $=(Je=($e=Q==null?void 0:Q.extraValues)==null?void 0:$e.input)==null?void 0:Je.map(async H=>{var De;ue!=null&&ue.find(oe=>oe===H)?P=await Fe(H,v):P[Object.keys(H)[0]]=await Fe((De=Object.values(H))==null?void 0:De[0],v,Me)});await Promise.all($)}else P=await Fe("/",v);let Z=!1;(de=(Ge=Q==null?void 0:Q.extraValues)==null?void 0:Ge.output)==null||de.forEach($=>{var H,De;(De=(H=Object.values($))==null?void 0:H[0])!=null&&De.includes(".doc")&&(Z=!0)});let x;if(Z){const $=zt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});x=await d.axios.post(Q.api,P,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$.close()})}else x=await d.axios.post(Q.api,P,{headers:{"Content-Type":"application/json"}});let T=(be=(Oe=(W=(S=d.cloneDeep(Q))==null?void 0:S.extraValues)==null?void 0:W.output)==null?void 0:Oe.map($=>{var H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt;if(!((De=(H=Object.values($))==null?void 0:H[0])!=null&&De.includes(".doc"))){let Pe=(q=(Ie=(Se=(Y=d.cloneDeep((oe=Object.values($))==null?void 0:oe[0]))==null?void 0:Y.split("["))==null?void 0:Se[((xe=(se=d.cloneDeep((re=Object.values($))==null?void 0:re[0]))==null?void 0:se.split("["))==null?void 0:xe.length)-1])==null?void 0:Ie.split("]"))==null?void 0:q[0],ft=Pe==null?void 0:Pe.split(":"),et=(Ke=d.cloneDeep((Ve=Object.values($))==null?void 0:Ve[0]))==null?void 0:Ke.substring(0,d.cloneDeep((ge=Object.values($))==null?void 0:ge[0]).lastIndexOf("["));if(et=(He=d.cloneDeep(et))==null?void 0:He.slice(0,((rt=d.cloneDeep(et))==null?void 0:rt.length)-1),et!=null&&et.includes("[")){let Ze="";if((lt=Cn(et,"/"))==null||lt.forEach(ne=>{var fe,Be,ve,he,ze,Ce,A;if(!(ne!=null&&ne.includes("[")))Ze=Ze===""?Ze+ne.replaceAll("/",""):Ze+"/"+ne.replaceAll("/","");else{let ke=d.cloneDeep(ne).slice(1,((fe=d.cloneDeep(ne))==null?void 0:fe.length)-1),nt=(Ce=(ze=(he=(ve=(Be=d.cloneDeep(ke))==null?void 0:Be.split("["))==null?void 0:ve[1])==null?void 0:he.split("]"))==null?void 0:ze[0])==null?void 0:Ce.split(":"),Le="",Qe=(A=v==null?void 0:v.find(Re=>(Re==null?void 0:Re.name)===(nt==null?void 0:nt[0])))==null?void 0:A.compData;Qe==null||Qe.forEach(Re=>{var ht;(Re==null?void 0:Re.key)==="formContent"&&((ht=Re==null?void 0:Re.contents)==null||ht.forEach(pt=>{(pt==null?void 0:pt.key)===(nt==null?void 0:nt[1])&&(Le=pt==null?void 0:pt.value)}))}),Ze=Ze===""?Ze+Le.replaceAll("/",""):Ze+"/"+Le.replaceAll("/","")}}),et=Ze,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:be.filter($=>$);T=[...new Set(d.cloneDeep(T))];let ae=T==null?void 0:T.map(async $=>{let H=await Ae.getItemData($,sessionStorage.getItem("systemKey"),"",!1,"","",Me);if((H==null?void 0:H.length)===0)return await Ae.getParentContents($)});await Promise.all(ae);let z=[],U=(te=(j=(ee=d.cloneDeep(Q))==null?void 0:ee.extraValues)==null?void 0:j.output)==null?void 0:te.map(async $=>{var Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze,ne,fe,Be,ve,he,ze,Ce,A,ke,nt,Le,Qe,Re,ht,pt,st,vt,yt,Dt,It,Bt,wt,Rt,kt,Ut,Gt,Ot,xa,ha,Da,_a,va,Sa,ga,Ta,ma,qa,Ga,Xa,La,Ia,ya,Na,Ba,la,wa,Ya,Ct,Qt,bt,vn,Ft,ua,Va,oa,Ca,ea;if((Ie=(Se=Object.values($))==null?void 0:Se[0])!=null&&Ie.includes(".doc")){var H=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"}),De=x.headers["content-disposition"],oe=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Y=oe.exec(De),re=Y==null?void 0:Y[1],se=document.createElement("a"),xe=window.URL.createObjectURL(H);y.value=[{name:re,blobUrl:xe}],u.value=!0}else{let Pa=(Pe=(lt=(He=(Ve=d.cloneDeep((q=Object.values($))==null?void 0:q[0]))==null?void 0:Ve.split("["))==null?void 0:He[((rt=(Ke=d.cloneDeep((ge=Object.values($))==null?void 0:ge[0]))==null?void 0:Ke.split("["))==null?void 0:rt.length)-1])==null?void 0:lt.split("]"))==null?void 0:Pe[0],At=Pa==null?void 0:Pa.split(":"),Xt=(Ze=d.cloneDeep((ft=Object.values($))==null?void 0:ft[0]))==null?void 0:Ze.substring(0,d.cloneDeep((et=Object.values($))==null?void 0:et[0]).lastIndexOf("["));if(Xt!=null&&Xt.includes("[")?Xt=(fe=d.cloneDeep(Xt))==null?void 0:fe.slice(0,((ne=d.cloneDeep(Xt))==null?void 0:ne.length)-1):Xt===""&&(Xt=E.value),Xt=Xt.replaceAll("<","[").replaceAll(">","]"),Xt!=null&&Xt.includes("[")){let St="";(Be=Cn(Xt,"/"))==null||Be.forEach((Mt,Ht)=>{var qt,$t,pa,ia,$a,Ja,Ka,Qa,In,rn,gn;if(!(Mt!=null&&Mt.includes("[")))St=St===""?St+Mt.replaceAll("/",""):St+"/"+Mt.replaceAll("/","");else{let sn="",ba="";(qt=d.cloneDeep(Mt))!=null&&qt.includes("]")?(sn=d.cloneDeep(Mt).slice(1,(($t=d.cloneDeep(Mt))==null?void 0:$t.length)-1),ba=(Ka=(Ja=($a=(ia=(pa=d.cloneDeep(sn))==null?void 0:pa.split("["))==null?void 0:ia[1])==null?void 0:$a.split("]"))==null?void 0:Ja[0])==null?void 0:Ka.split(":")):(sn=d.cloneDeep(Mt).slice(1,(Qa=d.cloneDeep(Mt))==null?void 0:Qa.length),ba=(In=d.cloneDeep(sn))==null?void 0:In.split("/"));let Za="",cn=(rn=v==null?void 0:v.find(sa=>(sa==null?void 0:sa.name)===(ba==null?void 0:ba[0])))==null?void 0:rn.compData;cn==null||cn.forEach(sa=>{var Bn;(sa==null?void 0:sa.key)==="formContent"&&((Bn=sa==null?void 0:sa.contents)==null||Bn.forEach(ja=>{(ja==null?void 0:ja.key)===(ba==null?void 0:ba[1])&&(Za=ja==null?void 0:ja.value)}))}),((gn=Cn(Xt,"/"))==null?void 0:gn.length)-1!==Ht?St=St===""?St+Za.replaceAll("/",""):St+"/"+Za.replaceAll("/",""):St=St+o.value+Za.replaceAll("/","")}}),(ve=E.value)!=null&&ve.includes(St)?Xt=E.value:Xt=St}let ra=d.cloneDeep((he=Object.keys($))==null?void 0:he[0]);if(((ze=x==null?void 0:x.data)==null?void 0:ze.statusCode)===200||((Ce=x==null?void 0:x.data)==null?void 0:Ce.code)===200){if(((ke=(A=x==null?void 0:x.data)==null?void 0:A.data)!=null&&ke[ra]||(Le=(nt=x==null?void 0:x.data)==null?void 0:nt.result)!=null&&Le[ra])&&(At==null?void 0:At.length)===1)return await le(((Re=(Qe=x==null?void 0:x.data)==null?void 0:Qe.data)==null?void 0:Re[ra])||((pt=(ht=x==null?void 0:x.data)==null?void 0:ht.result)==null?void 0:pt[ra]),d.cloneDeep(Xt),At,C);if((vt=(st=x==null?void 0:x.data)==null?void 0:st.data)!=null&&vt[ra]||(Dt=(yt=x==null?void 0:x.data)==null?void 0:yt.result)!=null&&Dt[ra]){let St=await We(((Bt=(It=x==null?void 0:x.data)==null?void 0:It.data)==null?void 0:Bt[ra])||((Rt=(wt=x==null?void 0:x.data)==null?void 0:wt.result)==null?void 0:Rt[ra]),d.cloneDeep(Xt),At);return St&&(z=[...z,...St]),St}else{if(!((kt=x==null?void 0:x.data)!=null&&kt.data)){let St=await Ae.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me);St=St==null?void 0:St.map(Ht=>{var qt;return(Ht==null?void 0:Ht.name)===(At==null?void 0:At[0])&&(Ht.compData=(qt=Ht.compData)==null?void 0:qt.map($t=>{var pa;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(pa=$t.contents)==null?void 0:pa.map(ia=>{var $a,Ja;return(ia==null?void 0:ia.key)===(At==null?void 0:At[1])&&(ia.value=(Ja=($a=x==null?void 0:x.data)==null?void 0:$a.result)==null?void 0:Ja[ra==null?void 0:ra.replaceAll(":","")]),ia})),$t})),Ht});let Mt=[];(Ut=St==null?void 0:St.filter(Ht=>(Ht==null?void 0:Ht.comp)==="Form"))==null||Ut.forEach(async Ht=>{let qt={};for(let $t in Ht)$t!=="id"&&(qt[$t]=Ht[$t]);Mt.push({id:Ht==null?void 0:Ht.id,value:{pageData:qt}})}),(Mt==null?void 0:Mt.length)>0&&await d.batchUpdateInsofDataApi({dataList:Mt});return}if((At==null?void 0:At.length)===1){const St=(xa=(Ot=(Gt=x==null?void 0:x.data)==null?void 0:Gt.data)==null?void 0:Ot.path)==null?void 0:xa.path;let Mt="";(Sa=(va=(_a=(Da=(ha=St==null?void 0:St.split("("))==null?void 0:ha[1])==null?void 0:Da.split(")"))==null?void 0:_a[0])==null?void 0:va.split(":"))==null||Sa.forEach($t=>{var pa,ia;Mt=Mt===""?Mt+((pa=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:pa.trim()):Mt+"/"+((ia=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:ia.trim())});let Ht=[(Ga=(qa=(ma=(Ta=(ga=St==null?void 0:St.split("<"))==null?void 0:ga[1])==null?void 0:Ta.split(">"))==null?void 0:ma[0])==null?void 0:qa.replaceAll("'",""))==null?void 0:Ga.trim()],qt;return(Ia=(La=(Xa=x==null?void 0:x.data)==null?void 0:Xa.data)==null?void 0:La.data)!=null&&Ia[At==null?void 0:At[0]]?qt=await le((Ba=(Na=(ya=x==null?void 0:x.data)==null?void 0:ya.data)==null?void 0:Na.data)==null?void 0:Ba[At==null?void 0:At[0]],Mt,At,C):qt=await _e((wa=(la=x==null?void 0:x.data)==null?void 0:la.data)==null?void 0:wa.data,Mt,Ht,Me),qt}else{const St=(Qt=(Ct=(Ya=x==null?void 0:x.data)==null?void 0:Ya.data)==null?void 0:Ct.path)==null?void 0:Qt.path;let Mt="";return(Va=(ua=(Ft=(vn=(bt=St==null?void 0:St.split("("))==null?void 0:bt[1])==null?void 0:vn.split(")"))==null?void 0:Ft[0])==null?void 0:ua.split(":"))==null||Va.forEach(qt=>{var $t,pa;Mt=Mt===""?Mt+(($t=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:$t.trim()):Mt+"/"+((pa=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:pa.trim())}),await We((ea=(Ca=(oa=x==null?void 0:x.data)==null?void 0:oa.data)==null?void 0:Ca.data)==null?void 0:ea[At==null?void 0:At[0]],Mt,At)}}}}});if(await Promise.all(U),(z==null?void 0:z.length)>0){let $=[];z==null||z.forEach(oe=>{$!=null&&$.find(Y=>{var re,se,xe,Se;return((se=(re=Y==null?void 0:Y.value)==null?void 0:re.pageData)==null?void 0:se.name)===((Se=(xe=oe==null?void 0:oe.value)==null?void 0:xe.pageData)==null?void 0:Se.name)})||$.push(oe)});let H=[];$==null||$.forEach(oe=>{var se,xe,Se,Ie;let Y=d.cloneDeep(oe);Y.value.pageData.compData=(se=Y.value.pageData.compData)==null?void 0:se.map(q=>{var Ve;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(Ve=q.contents)==null?void 0:Ve.map(ge=>{var rt,He,lt,Pe;let Ke=(rt=d.cloneDeep(z))==null?void 0:rt.find(ft=>(ft==null?void 0:ft.keyType)===(ge==null?void 0:ge.key));if(Ke){let ft=(Pe=(lt=(He=Ke.value.pageData.compData)==null?void 0:He.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:lt.contents)==null?void 0:Pe.find(et=>(et==null?void 0:et.key)===(ge==null?void 0:ge.key));ge.value=ft==null?void 0:ft.value}return ge})),q}),H.push({id:Y==null?void 0:Y.id,value:Y==null?void 0:Y.value});let re=[];(Ie=(Se=(xe=Y==null?void 0:Y.value)==null?void 0:xe.pageData)==null?void 0:Se.compData)==null||Ie.forEach(q=>{var Ve;(q==null?void 0:q.key)==="formContent"&&((Ve=q==null?void 0:q.contents)==null||Ve.forEach(ge=>{var Ke,rt,He,lt,Pe,ft;if((rt=(Ke=ge==null?void 0:ge.optionUrl)==null?void 0:Ke.menuSelect)!=null&&rt.find(et=>et==null?void 0:et.includes("[")))if(re!=null&&re.find(et=>{var Ze,ne,fe;return((Ze=et==null?void 0:et.key)==null?void 0:Ze.join(","))===((fe=(ne=ge==null?void 0:ge.optionUrl)==null?void 0:ne.menuSelect)==null?void 0:fe.join(","))})){let et=(He=re==null?void 0:re.find(Ze=>{var ne,fe,Be;return((ne=Ze==null?void 0:Ze.key)==null?void 0:ne.join(","))===((Be=(fe=ge==null?void 0:ge.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:Be.join(","))}))==null?void 0:He.value;et.push({key:ge==null?void 0:ge.prop,groups:(lt=ge==null?void 0:ge.optionUrl)==null?void 0:lt.groupSelect,value:ge==null?void 0:ge.value}),re=re==null?void 0:re.map(Ze=>{var ne,fe,Be;return((ne=Ze==null?void 0:Ze.key)==null?void 0:ne.join(","))===((Be=(fe=ge==null?void 0:ge.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:Be.join(","))&&(Ze.value=et),Ze})}else re.push({key:(Pe=ge==null?void 0:ge.optionUrl)==null?void 0:Pe.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(ft=ge==null?void 0:ge.optionUrl)==null?void 0:ft.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(re==null?void 0:re.length)>0&&(re=re==null?void 0:re.map(q=>{var ge;let Ve="";return(ge=q==null?void 0:q.key)==null||ge.forEach(Ke=>{var rt;if(!(Ke!=null&&Ke.includes("[")))Ve=Ve===""?Ve+Ke:Ve+"/"+Ke;else{let He="",lt=(rt=Ke==null?void 0:Ke.replaceAll("[","").replaceAll("]",""))==null?void 0:rt.split(":");v==null||v.forEach(Pe=>{var ft;(Pe==null?void 0:Pe.name)===(lt==null?void 0:lt[0])&&((ft=Pe==null?void 0:Pe.compData)==null||ft.forEach(et=>{var Ze;(et==null?void 0:et.key)==="formContent"&&((Ze=et==null?void 0:et.contents)==null||Ze.forEach(ne=>{(ne==null?void 0:ne.prop)===(lt==null?void 0:lt[1])&&(He=ne==null?void 0:ne.value)}))}))}),Ve=Ve+o.value+He}}),q.key=Ve,q})),re==null||re.forEach(q=>{var rt,He,lt;let Ve=(rt=Me[q.key])==null?void 0:rt.find(Pe=>{var ft,et,Ze,ne,fe,Be,ve;return((et=(ft=Pe==null?void 0:Pe.value)==null?void 0:ft.pageData)==null?void 0:et.name)===((fe=(ne=(Ze=q==null?void 0:q.value)==null?void 0:Ze[0])==null?void 0:ne.groups)==null?void 0:fe[0])&&((ve=(Be=Pe==null?void 0:Pe.value)==null?void 0:Be.pageData)==null?void 0:ve.name)!==void 0}),ge=Ve==null?void 0:Ve.id,Ke=(He=Ve==null?void 0:Ve.value)==null?void 0:He.pageData;Ke.compData=(lt=Ke.compData)==null?void 0:lt.map(Pe=>{var ft;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(ft=Pe.contents)==null?void 0:ft.map(et=>{var ne;let Ze=(ne=q.value)==null?void 0:ne.find(fe=>(fe==null?void 0:fe.key)===(et==null?void 0:et.prop));return Ze&&(et.value=Ze.value),et})),Pe}),H.push({id:ge,value:{pageData:Ke}})})});let De=(Te=d.cloneDeep(z))==null?void 0:Te[0];(H==null?void 0:H.length)>0&&await d.batchUpdateInsofDataApi({dataList:H})}b.setFreshContent(!0)}I.setImportLoading(!1)}catch{d.ElMessage.error("方法执行错误,请查看方法!"),I.setImportLoading(!1)}_.value=!0},ue=["createInsofDataApi"],Ye=ml(async Q=>{ie(Q)},100),ot=async Q=>{var Ge,de,S,W,Oe;const R=d.cloneDeep(Q);let ye,we=new WeakMap,je=await d.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:pe.value});(de=(Ge=je.data.result)==null?void 0:Ge.filter(be=>{var ee,j;return((ee=be==null?void 0:be.key)==null?void 0:ee.pageKey)!=="menu"&&((j=be==null?void 0:be.key)==null?void 0:j.pageKey)!=="secret"}))==null||de.forEach(be=>{we[be.key.pageKey]?we[be.key.pageKey]=[...we[be.key.pageKey],be]:we[be.key.pageKey]=[be]}),Q!=null&&Q[0].path&&(ye=await(R==null?void 0:R.map(async(be,ee)=>{var P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se;const te=(P=we[be==null?void 0:be.path])==null?void 0:P.filter(Ie=>{var q;return((q=Ie==null?void 0:Ie.key)==null?void 0:q.type)==="data"});let Te="";const Me=await Ae.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);te==null||te.forEach(Ie=>{var q,Ve,ge,Ke,rt;((Ve=(q=Ie==null?void 0:Ie.value)==null?void 0:q.tableData)==null?void 0:Ve.算法名称)===((ge=R==null?void 0:R[ee])==null?void 0:ge.method)&&(Te=(rt=(Ke=Ie==null?void 0:Ie.value)==null?void 0:Ke.tableData)==null?void 0:rt.算法体)});const at=await Ae.getItemData(be==null?void 0:be.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);let v="",C=(ae=(T=(x=(Z=at==null?void 0:at[0])==null?void 0:Z.compData)==null?void 0:x.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:T.contents)==null?void 0:ae.findIndex(Ie=>(Ie==null?void 0:Ie.prop)==="算法体");return(U=(z=at==null?void 0:at[0])==null?void 0:z.compData)==null||U.forEach(Ie=>{var q;(Ie==null?void 0:Ie.key)==="tableContents"&&((q=Ie==null?void 0:Ie.contents)==null||q.forEach(Ve=>{Ve!=null&&Ve.find(ge=>ge===(be==null?void 0:be.method))&&(v=Ve[C])}))}),{buttonName:(($=R==null?void 0:R[ee])==null?void 0:$.method)||((oe=(De=(H=te==null?void 0:te[0])==null?void 0:H.value)==null?void 0:De.tableData)==null?void 0:oe.算法名称),api:(Te===""?(se=(re=(Y=te==null?void 0:te[0])==null?void 0:Y.value)==null?void 0:re.tableData)==null?void 0:se.算法体:Te)||v,content:Me==null?void 0:Me.filter(Ie=>Ie.comp!=="methodButton"),extraContent:(xe=d.cloneDeep(be.value))==null?void 0:xe.slice(1),methodName:(be==null?void 0:be.path)??"",extraValues:(Se=R==null?void 0:R[ee])==null?void 0:Se.data}})));const $e=R==null?void 0:R.map(async be=>{var at,v,C,P,Z,x;const ee=(at=je.data.result)==null?void 0:at.filter(T=>{var ae,z,U;return((ae=T==null?void 0:T.key)==null?void 0:ae.parentTable)===""&&((z=T==null?void 0:T.key)==null?void 0:z.type)==="method"&&((U=T==null?void 0:T.key)==null?void 0:U.methodName)===T.method}),j=ee==null?void 0:ee[0],te=(v=je.data.result)==null?void 0:v.filter(T=>{var ae,z;return((ae=T==null?void 0:T.key)==null?void 0:ae.type)==="methodData"&&((z=T==null?void 0:T.key)==null?void 0:z.tableId)===(j==null?void 0:j.id)}),Te=await Ae.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we),Me=te==null?void 0:te[0];return{buttonName:(C=j==null?void 0:j.key)==null?void 0:C.methodKey,api:(Z=(P=Me==null?void 0:Me.value)==null?void 0:P.tableData)==null?void 0:Z[0],content:Te==null?void 0:Te.filter(T=>T.comp!=="methodButton"),extraContent:(x=d.cloneDeep(be.value))==null?void 0:x.slice(1),methodName:(be==null?void 0:be.method)??""}}),Je=(S=Q==null?void 0:Q[0])!=null&&S.path&&((W=Q==null?void 0:Q[0])==null?void 0:W.path)!==""?await Promise.all(ye):await Promise.all($e);r.value=Je==null?void 0:Je.filter(be=>be==null?void 0:be.extraContent),(Oe=r.value)==null||Oe.forEach(be=>{var ee;be.api===""&&((ee=be.content)==null||ee.forEach(j=>{var te;j.comp=="Table"&&b.setExtraContents(Ae.methodTableToContent(j.compData,(te=be.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>c.itemData,async()=>{M.value=="view"&&!_.value&&await ot(d.cloneDeep(c.itemData)),_.value=!1},{immediate:!0,deep:!0}),(Q,R)=>{var ye,we,je;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=r.value)==null?void 0:ye.filter($e=>($e==null?void 0:$e.buttonName)!=="保存"),$e=>{var Je;return e.openBlock(),e.createElementBlock("div",null,[$e.api!==""?(e.openBlock(),e.createBlock(e.unref(zl._sfc_main),{key:0,disabled:e.unref(K)===e.unref(E)&&!((Je=$e==null?void 0:$e.buttonName)!=null&&Je.includes("预览")),class:"calculator-content",modelValue:$e.buttonName,onClickTrigger:Ge=>e.unref(Ye)($e),loading:w.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Ee)!==""&&((je=e.unref(E))==null?void 0:je[((we=e.unref(E))==null?void 0:we.length)-1])!==e.unref(o)?(e.openBlock(),e.createBlock(e.unref(zl._sfc_main),{key:0,class:"calculator-content",onClickTrigger:me,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(zt.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:Ue},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Ic=Pt._export_sfc(Tc,[["__scopeId","data-v-11fca7e0"]]),Bc={};function Ac(n,r){return" 567 "}const Nc=Pt._export_sfc(Bc,[["render",Ac]]),Vc={class:"module content"},Oc={class:"module data"},Mc={class:"module layout"},zc={class:"form-content"},Fc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),y=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:""}]),b=e.ref({}),w=e.ref([]),I=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:w.value},{key:"signConfig",contents:b.value}]}),L=X=>{var K;b.value=d.cloneDeep(X),o("change",(K=I())==null?void 0:K.compData)},J=X=>{var K,pe;if((X==null?void 0:X.buttonName)==="确认"){const E=d.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":w.value.push({...E,index:((K=w.value)==null?void 0:K.length)+1});break}o("change",(pe=I())==null?void 0:pe.compData),c.visible=!1}else c.visible=!1},M=(X,K)=>{var pe,E;switch(X){case"create":(pe=h.value)==null||pe.forEach(F=>{F.value=""}),u.value="create",c.visible=!0;break;case"update":(E=h.value)==null||E.forEach(F=>{F.value=K[F==null?void 0:F.prop]}),u.value="update",c.visible=!0;break;case"delete":w.value.splice(K,1),u.value="delete";break}},Ee=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,pe;X&&(b.value=((K=X==null?void 0:X.find(E=>E.key==="signConfig"))==null?void 0:K.contents)??{},w.value=((pe=X==null?void 0:X.find(E=>E.key==="signTypeList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(X,K)=>{const pe=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=F=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(F,D)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:D},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:N=>M("update",{...F,index:D+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:N=>M("delete",D)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Mc,[e.createVNode(zt.ssForm,{rowContents:g.value,onChange:L},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ee,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",zc,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Rc=Pt._export_sfc(Fc,[["__scopeId","data-v-487e0536"]]),Lc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:r}){const s=n,o=r,c=e.ref(1),u=e.computed(()=>{var I,L;return(I=s==null?void 0:s.stepConfig)!=null&&I.allowTrigger?c.value:(L=s==null?void 0:s.stepConfig)==null?void 0:L.active}),y=(I,L)=>{c.value=L,o("clickStep",I,L)},g=I=>zt.getComponent(I),h=()=>{var L;const I=(L=s==null?void 0:s.stepList)==null?void 0:L.find((J,M)=>M+1===u.value);return console.log("findStep",I),I?I==null?void 0:I.children:[]},b=I=>{o("clickTrigger",I)},w=I=>{o("changeTrigger",I)};return(I,L)=>{var Ee,X,K,pe,E;const J=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(Ee=n.stepConfig)==null?void 0:Ee.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(F,D)=>(e.openBlock(),e.createBlock(J,{key:D,class:"step-item",onClick:N=>y(F,D+1)},{title:e.withCtx(()=>[e.renderSlot(I.$slots,"title",{title:F==null?void 0:F.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(I.$slots,"description",{description:F==null?void 0:F.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(pe=n.stepConfig)!=null&&pe.allowTrigger&&((E=n.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(F,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(F==null?void 0:F.type)),{modelValue:F.value,"onUpdate:modelValue":N=>F.value=N,onClickTrigger:b,onChangeTrigger:w,content:F==null?void 0:F.content},e.createSlots({_:2},[e.renderList(I.$slots,(N,_)=>({name:_,fn:e.withCtx(me=>[e.renderSlot(I.$slots,_,e.mergeProps({ref_for:!0},me||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Pc=Pt._export_sfc(Lc,[["__scopeId","data-v-d7c99969"]]),$c=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:r}){const s=n,o=r,c=e.ref({}),u=e.ref([]),y=(g,h)=>{o("clickStep",g,h)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var h,b;u.value=(h=g==null?void 0:g.find(w=>(w==null?void 0:w.key)==="stepList"))==null?void 0:h.contents,c.value=(b=g==null?void 0:g.find(w=>(w==null?void 0:w.key)==="stepConfig"))==null?void 0:b.contents},{immediate:!0,deep:!0}),(g,h)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Pc,{stepConfig:c.value,stepList:u.value,onClickStep:y},{icon:e.withCtx(()=>[e.createVNode(b,{name:"import"})]),title:e.withCtx(({title:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),description:e.withCtx(({description:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),_:1},8,["stepConfig","stepList"])}}}),Kc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(r,s)=>{const o=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(n.activities,(u,y)=>(e.openBlock(),e.createBlock(o,{key:y,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),jc=Pt._export_sfc(Kc,[["__scopeId","data-v-4172a886"]]),Uc={class:"line-content"},Wc={class:"line-time"},Hc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const r=n,s=e.ref({}),o=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,c=>{var u,y;o.value=(u=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(y=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:y.contents},{immediate:!0}),(c,u)=>(e.openBlock(),e.createBlock(jc,{activities:o.value,timeLineConfig:s.value},{content:e.withCtx(({content:y,timestamp:g})=>[e.createElementVNode("span",Uc,e.toDisplayString(y),1),e.createElementVNode("span",Wc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),qc=Pt._export_sfc(Hc,[["__scopeId","data-v-b4d9deed"]]),Gc={class:"tabs-content"},Xc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const r=n,s=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,o=>{const c=o.find(u=>(u==null?void 0:u.key)=="stepList");c?s.value=c.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(o,c)=>(e.openBlock(),e.createElementBlock("div",Gc,[e.createVNode(zt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Yc=Pt._export_sfc(Xc,[["__scopeId","data-v-40865f68"]]),nl=d.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Jc={class:"type-select"},Qc=["onClick"],Zc={class:"list-icon"},eu={__name:"modelSelect",setup(n){const r=nl(d.pinia),{itemData:s}=d.storeToRefs(r),o=c=>{const u=d.cloneDeep(s.value);u.push({comp:c.comp,name:c.name,compData:[]}),r.setItemData(u)};return(c,u)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ur),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:b=>o(g)},[e.createElementVNode("div",Zc,[e.createVNode(y,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Qc)]))),128))])}}},tu=Pt._export_sfc(eu,[["__scopeId","data-v-91799bf8"]]),au={class:"fill-content"},nu={class:"operate-content"},lu={class:"collapse-title-content"},ou={class:"collapse-title-item"},ru={key:1},iu=["onClick"],su={class:"icon-content"},cu={key:0,class:"edit-content"},uu=["onClick"],pu={class:"comp-child"},du={__name:"modelFill",setup(n){const r=nl(d.pinia),{itemData:s,originalData:o}=d.storeToRefs(r),c=e.ref([]);e.ref([]);const u=e.ref([]),y=e.ref([]),g=J=>{var Ee;let M=(Ee=d.cloneDeep(y.value))==null?void 0:Ee.map((X,K)=>(J===K&&(X.content=!0),X));y.value=M},h=J=>{var Ee;let M=(Ee=d.cloneDeep(y.value))==null?void 0:Ee.map((X,K)=>(J===K&&(X.content=!1),X));y.value=M,c.value=d.cloneDeep(s.value)},b=(J,M)=>{var pe;let Ee=(pe=d.cloneDeep(y.value))==null?void 0:pe.map((E,F)=>(J===F&&(E.content=!1),E));y.value=Ee;const X=d.cloneDeep(s.value),K=X==null?void 0:X.filter((E,F)=>(F===J&&(E.name=M),E));r.setOriginalData(K),r.setItemData(K)};e.watch(()=>s.value,()=>{var J,M,Ee;!s.value||((J=s.value)==null?void 0:J.length)===0?c.value=[]:c.value=(M=d.cloneDeep(s.value))==null?void 0:M.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=c.value,y.value=(Ee=d.cloneDeep(u.value))==null?void 0:Ee.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const w=J=>on(J),I=(J,M,Ee)=>{var K,pe;if(!J)return;let X=d.cloneDeep(s.value);X=(K=X==null?void 0:X.map((E,F)=>(F===Ee&&(E.compData=J),E)))==null?void 0:K.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),y.value=(pe=d.cloneDeep(X))==null?void 0:pe.map((E,F)=>({id:F,content:!1})),r.setOriginalData(X),r.setItemData(X)},L=J=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=d.cloneDeep(s.value),Ee=M==null?void 0:M.filter((X,K)=>K!==J);r.setOriginalData(Ee),r.setItemData(Ee),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,M)=>{const Ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",au,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",nu,[e.createVNode(Do.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:X,index:K})=>{var pe,E,F,D,N,_,me,Ue,it,Fe;return[e.createElementVNode("div",lu,[e.createElementVNode("div",ou,[(E=(pe=y.value)==null?void 0:pe.find(We=>We.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(D=(F=y.value)==null?void 0:F.find(We=>We.id===K))!=null&&D.content?(e.openBlock(),e.createElementBlock("div",ru,[e.createVNode(zt._sfc_main$3,{modelValue:X.name,"onUpdate:modelValue":We=>X.name=We,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(_=(N=y.value)==null?void 0:N.find(We=>We.id===K))!=null&&_.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(K),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,iu))]),e.createElementVNode("div",su,[(Ue=(me=y.value)==null?void 0:me.find(We=>We.id===K))!=null&&Ue.content?(e.openBlock(),e.createElementBlock("div",cu,[e.createVNode(Ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(Ee,{name:"Save",onClick:e.withModifiers(We=>b(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Fe=(it=y.value)==null?void 0:it.find(We=>We.id===K))!=null&&Fe.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>L(K),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,uu))])])]}),content:e.withCtx(({item:X,index:K})=>{var pe,E;return[e.createElementVNode("div",pu,[e.createTextVNode(e.toDisplayString(w(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(E=(pe=u.value)==null?void 0:pe.find((F,D)=>D===K))==null?void 0:E.compData,onChange:F=>I(F,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},fu=Pt._export_sfc(du,[["__scopeId","data-v-a46a44b9"]]),hu={key:0,class:"show-content"},vu={style:{display:"flex"}},gu={__name:"modelShow",setup(n){const r=nl(d.pinia),{itemData:s}=d.storeToRefs(r),o=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?o.value=[]:o.value=d.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=u=>on(u);return(u,y)=>{var g;return((g=o.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",hu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(h,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",vu,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:b},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},mu=Pt._export_sfc(gu,[["__scopeId","data-v-3f3e863e"]]),yu={class:"tabs-header"},bu={class:"tabs-list"},ku={class:"tab-name"},xu={class:"tab-actions"},Du=["onClick"],wu=["onClick"],Cu=["onClick"],Eu={class:"model-operate"},_u={class:"model-select",style:{display:"unset"}},Su={class:"existing-components"},Tu={class:"component-list"},Iu=["onClick"],Bu={class:"component-info"},Au={class:"component-type"},Nu={class:"component-name"},Vu={class:"model-fill"},Ou={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.ref([]),u=e.ref(!1),y=e.ref(""),g=e.ref({title:""}),h=e.ref(-1),b=e.ref(!1),w=e.ref(-1),I=e.ref(new WeakMap),L=e.ref(null),J=nl(d.pinia),{itemData:M}=d.storeToRefs(J),Ee=()=>{y.value="新增标签页",g.value.title="",h.value=-1,u.value=!0},X=Q=>{y.value="修改标签页",g.value.title=c.value[Q].title,h.value=Q,u.value=!0},K=Q=>{const R=F(Q);I.value.delete(R),c.value.splice(Q,1),ot()},pe=()=>{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:E()};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;u.value=!1,ot()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,F=Q=>{const R=c.value[Q];return R.id||(R.id=E()),R.id},D=Q=>{var we;w.value=Q;const R=F(Q);L.value=d.cloneDeep(M.value);let ye=I.value.get(R);!ye&&((we=c.value[Q].children)==null?void 0:we.length)>0&&(ye=Ue(c.value[Q].children)),ye?J.setItemData(d.cloneDeep(ye)):J.setItemData([]),b.value=!0},N=e.computed(()=>{const Q=jt.useModelComp(d.pinia),R=d.storeToRefs(Q).itemData.value;return console.log("可用组件数据",R),!R||!Array.isArray(R)?[]:R.filter(ye=>{var we;if(ye.comp==="Tabs"&&w.value>=0){const je=F(w.value);if((we=ye.compData)==null?void 0:we.some(Je=>{var Ge;return Je.key==="stepList"&&((Ge=Je.contents)==null?void 0:Ge.some(de=>de.id===je))}))return!1}return!0})}),_=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,me=Q=>{var R;try{const ye=d.cloneDeep(Q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((R=ye.compData)==null||R.forEach(je=>{je.key==="stepList"&&je.contents&&je.contents.forEach($e=>{$e.id=E()})}));const we=d.cloneDeep(M.value);we.push(ye),J.setItemData(we)}catch(ye){console.error("添加组件失败:",ye)}},Ue=Q=>Q.map(R=>{var ye;switch(R.type){case"form":return{comp:"Form",name:R.value||"表单",compData:it(R.content)};case"table":return{comp:"Table",name:R.value||"表格",compData:Fe(R.content)};default:return{comp:"Unknown",name:R.value||"",compData:((ye=R.content)==null?void 0:ye.originalData)||[]}}}),it=Q=>{if(!Q)return[];const R=[];return Q.rowContents&&R.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&R.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&R.push({key:"enableWrap",contents:Q.isEnableWrap}),R},Fe=Q=>[],We=()=>{if(w.value>=0&&w.value<c.value.length){const Q=F(w.value);I.value.set(Q,d.cloneDeep(M.value)),c.value[w.value].children=le(M.value),console.log("保存后的数据",le(M.value))}b.value=!1,w.value=-1,L.value=null,ot()},_e=()=>{L.value&&J.setItemData(d.cloneDeep(L.value)),b.value=!1,w.value=-1,L.value=null},V=()=>{b.value&&_e()},le=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((R,ye)=>{if(!R||typeof R!="object")return R;const{comp:we,name:je,compData:$e}=R;switch(we){case"Form":return{type:"form",content:ie($e||[]),value:"表单"};case"Table":return{type:"table",content:ue($e||[]),value:"表格"};default:return{type:"xxx",content:Ye($e||[]),value:""}}})},ie=Q=>{const R={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((we,je)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${je}:`,we);return}const{key:$e,contents:Je}=we,Ge=ye[$e];if(!Ge){console.warn(`Unknown Form config key: ${$e}`);return}$e==="enableWrap"?R[Ge]=!!Je:R[Ge]=Array.isArray(Je)?Je:[]}),R},ue=Q=>{const R={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return Q.forEach((we,je)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${je}:`,we);return}const{key:$e,contents:Je}=we,Ge=ye[$e];if(!Ge){console.warn(`Unknown Table config key: ${$e}`);return}R[Ge]=Array.isArray(Je)?Je:[]}),R},Ye=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),ot=()=>{const Q=[{key:"stepList",contents:c.value}];o("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const R=Q.find(ye=>ye.key==="stepList");R&&R.contents&&(c.value=R.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||E()})))}},{immediate:!0,deep:!0}),(Q,R)=>{const ye=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-input"),je=e.resolveComponent("el-form-item"),$e=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",yu,[R[6]||(R[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ee},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),R[5]||(R[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Je,Ge)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ge},[e.createElementVNode("span",ku,e.toDisplayString(Je.title),1),e.createElementVNode("div",xu,[e.createElementVNode("button",{onClick:de=>X(Ge)},"修改标题",8,Du),e.createElementVNode("button",{onClick:de=>D(Ge)},"布局调整",8,wu),e.createElementVNode("button",{onClick:de=>K(Ge)},"删除",8,Cu)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":R[2]||(R[2]=Je=>u.value=Je),title:y.value,onBeforeDestroy:R[3]||(R[3]=Je=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:R[1]||(R[1]=Je=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:pe},"确定")]),default:e.withCtx(()=>[e.createVNode($e,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(je,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(we,{modelValue:g.value.title,"onUpdate:modelValue":R[0]||(R[0]=Je=>g.value.title=Je),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:b.value,"onUpdate:modelValue":R[4]||(R[4]=Je=>b.value=Je),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:_e},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Eu,[e.createElementVNode("div",_u,[e.createVNode(tu),e.createElementVNode("div",Su,[R[8]||(R[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Je=>(e.openBlock(),e.createElementBlock("div",{key:Je.id,class:"component-item",onClick:Ge=>me(Je)},[e.createElementVNode("div",Bu,[e.createElementVNode("span",Au,e.toDisplayString(_(Je.comp)),1),e.createElementVNode("span",Nu,e.toDisplayString(Je.name),1)]),R[7]||(R[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Iu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(mu)])),e.createElementVNode("div",Vu,[e.createVNode(fu)])])]),_:1},8,["modelValue"])])}}},Mu=Pt._export_sfc(Ou,[["__scopeId","data-v-9096ed0d"]]);function zu(){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 Fu(n){return{type:"line",...n}}function Ru(){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 Lu(n){return{type:"bar",barWidth:"60%",...n}}function Pu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function $u(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Ra={line:{initBaseoptions:zu,initSeries:Fu},bar:{initBaseoptions:Ru,initSeries:Lu},pie:{initBaseoptions:Pu,initSeries:$u}},Kl=jt.useMenuState(d.pinia),No=(n,r)=>{var w;const s=[],o=[],{group:c,nameCol:u,valueCol:y}=r||{},g=n==null?void 0:n.find(I=>{const{name:L}=I;return L===c});if(!g)return{names:s,values:o};const h=(w=g==null?void 0:g.compData)==null?void 0:w.find(I=>{const{key:L}=I;return L==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(I=>{const L=I==null?void 0:I[0];let J=!1;d.isObject(L)&&(L!=null&&L.id)&&(J=!0);let M=u,Ee=y;J&&(M=M+1,Ee=Ee+1);const X=I==null?void 0:I[M],K=I==null?void 0:I[Ee];s.push(X),o.push(K)}),{names:s,values:o}},Ku=async n=>{const{menu:r,mainKey:s,detailGroup:o,detailNameCol:c,detailValueCol:u,isSelfDetail:y}=n||{};let g=null;const h=sessionStorage.getItem("systemKey");if(y&&Kl.activeMenuPath&&(g=await Ae.getItemData(`${Kl.activeMenuPath}`,h,"")),!y){const b=r==null?void 0:r.join("/");g=await Ae.getItemData(`${b}^${s}`,h,"")}return No(g,{group:o,nameCol:c,valueCol:u})},ju=async n=>{const{menu:r,group:s,nameCol:o,valueCol:c}=n||{},u=r==null?void 0:r.join("/"),y=sessionStorage.getItem("systemKey"),g=await Ae.getItemData(u,y,"");return No(g,{group:s,nameCol:o,valueCol:c})},yl=async(n,r)=>{const s={names:[],values:[]},{menu:o,group:c,nameCol:u,valueCol:y}=n||{};if(!o.length||!c)return s;const{mainKey:g,group:h,nameCol:b,valueCol:w,isSelfDetail:I}=r||{};return g&&h&&Ae.isNumber(b)&&Ae.isNumber(w)?await Ku({menu:o,mainKey:g,detailGroup:h,detailNameCol:b,detailValueCol:w,isSelfDetail:I}):Ae.isNumber(u)&&Ae.isNumber(y)?await ju({menu:o,group:c,nameCol:u,valueCol:y}):s},Uu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:s})=>{const{type:o,title:c}=n||{},u=Ra==null?void 0:Ra[o];if(!u)return;const{initBaseoptions:y,initSeries:g}=u,h=y();h.title.text=c??"";const{names:b,values:w}=await yl(r,s);if(!b||!w)return h;h.xAxis.data=b;const I=g({data:w});return h.series.push(I),h},Wu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:s})=>{const{type:o,title:c}=n||{},u=Ra==null?void 0:Ra[o];if(!u)return;const{initBaseoptions:y,initSeries:g}=u,h=y();h.title.text=c??"";const{names:b,values:w}=await yl(r,s);if(!b||!w)return h;h.xAxis.data=b;const I=g({data:w});return h.series.push(I),h},Hu=async({chartBaseConfig:n,chartDataConfig:r,chartDetailConfig:s})=>{const{type:o,title:c}=n||{},u=Ra==null?void 0:Ra[o];if(!u)return;const{initBaseoptions:y,initSeries:g}=u,h=y();h.title.text=c??"";const{names:b,values:w}=await yl(r,s);if(!b||!w)return h;const I=[];for(let J=0;J<b.length;J++){const M=b[J],Ee=w[J];I.push({name:M,value:Ee})}const L=g({data:I});return h.series.push(L),h},qu=async(n=[])=>{var y,g,h;const r=((y=n==null?void 0:n.find(b=>b.key==="chartBaseConfig"))==null?void 0:y.contents)??{},s=((g=n==null?void 0:n.find(b=>b.key==="chartDataConfig"))==null?void 0:g.contents)??{},o=((h=n==null?void 0:n.find(b=>b.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=r;let u={};return c==="line"&&(u=await Uu({chartBaseConfig:r,chartDataConfig:s,chartDetailConfig:o})),c==="bar"&&(u=await Wu({chartBaseConfig:r,chartDataConfig:s,chartDetailConfig:o})),c==="pie"&&(u=await Hu({chartBaseConfig:r,chartDataConfig:s,chartDetailConfig:o})),u},Gu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const r=n,s=e.ref({});e.onMounted(async()=>{const c=r==null?void 0:r.itemData;s.value=await qu(c)});const o=e.computed(()=>(r==null?void 0:r.height)||"300px");return(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:o.value})},[e.createVNode(jr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Xu=Pt._export_sfc(Gu,[["__scopeId","data-v-d4c081e8"]]),Yu={class:"chart-module layout"},Ju={class:"chart-module content"},Qu={class:"chart-module content"},Zu={class:"form-content"},ep={class:"dialog-footer"},tp={class:"form-content"},ap={class:"dialog-footer"},np={class:"form-content"},lp={class:"dialog-footer"},op=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),y=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),h=()=>{var ee;u.value=y(),(ee=u.value)==null||ee.forEach(j=>{var Te;const te=j==null?void 0:j.prop;j.value=(Te=g==null?void 0:g.value)==null?void 0:Te[te]}),c.visible=!0},b=ee=>{g.value=ee},w=()=>{var ee;c.visible=!1,o("change",(ee=Oe())==null?void 0:ee.compData)},I=e.reactive({visible:!1,width:"840",title:"数据配置"}),L=e.ref([]),J=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],M=e.ref({}),Ee=()=>{const ee=L.value,j=d.cloneDeep(ee);return j==null||j.forEach(te=>{var Me;const Te=te==null?void 0:te.prop;te.value=(Me=M.value)==null?void 0:Me[Te]}),j},X=ee=>{var te;M.value=ee;const j=Ee();L.value=j,o("change",(te=Oe())==null?void 0:te.compData)},K=async()=>{const ee=await Ae.getMenusContent(),j=Ee();j==null||j.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=ee)}),L.value=j,I.visible=!0,await Je(M.value.menu),await S(M.value.group)},pe=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),F=()=>[{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:[]}],D=e.ref({}),N=()=>{const ee=E.value,j=d.cloneDeep(ee);return j==null||j.forEach(te=>{var Me;const Te=te==null?void 0:te.prop;te.value=(Me=D.value)==null?void 0:Me[Te]}),j},_=ee=>{var te;D.value=ee;const j=N();E.value=j,o("change",(te=Oe())==null?void 0:te.compData)},me=async()=>{await V();const ee=d.cloneDeep(Ue.value),j=N();j==null||j.forEach(te=>{var Me;const Te=te==null?void 0:te.prop;te.value=(Me=D==null?void 0:D.value)==null?void 0:Me[Te],Te==="mainKey"&&(te.contents=ee)}),E.value=j,pe.visible=!0},Ue=e.ref([]),it=e.ref([]),Fe=e.ref({}),We=e.ref({}),_e=()=>{const{compData:ee}=we.value||{},j=ee==null?void 0:ee.find(P=>{const{key:Z}=P;return Z==="header"}),te=(j==null?void 0:j.contents)||[],Te=te==null?void 0:te.filter((P,Z)=>{const{label:x}=P;return x!=="操作"}),Me=Te==null?void 0:Te.findIndex((P,Z)=>{const{isMainKey:x}=P;return x});if(Me<0)return[];const at=ee==null?void 0:ee.find(P=>{const{key:Z}=P;return Z==="tableContents"}),v=(at==null?void 0:at.contents)||[];return v==null?void 0:v.map(P=>{const Z=P==null?void 0:P[0];let x=Me;d.isObject(Z)&&(Z!=null&&Z.id)&&(x=x+1);const T=P==null?void 0:P[x];return{label:T,value:T}})},V=async()=>{const ee=await _e();Ue.value=ee},le=async ee=>{const j=sessionStorage.getItem("systemKey");return await Ae.getItemData(ee,j,"")},ie=async ee=>{const j=ee;it.value=j==null?void 0:j.map(te=>{const{name:Te}=te;return Fe.value[Te]=te,{label:Te,value:Te}})},ue=ee=>{const{comp:j,compData:te}=We.value||{};if(j==="Table"){let Te=N();Te=Te.filter(Me=>{const{prop:at}=Me;return at!=="formItems"}),Ge(Te,te),E.value=Te}},Ye=async()=>{var te,Te;const ee=(te=D==null?void 0:D.value)==null?void 0:te.mainKey,j=(Te=M==null?void 0:M.value)==null?void 0:Te.menu;if(ee){const at=`${j==null?void 0:j.join("/")}^${ee}`,v=await le(at);await ie(v);const C=N();C==null||C.forEach(P=>{(P==null?void 0:P.prop)==="group"&&(P.contents=it.value)}),E.value=C}};e.watch(()=>{var ee;return(ee=D==null?void 0:D.value)==null?void 0:ee.mainKey},async(ee,j)=>{ee!=j&&ee&&await Ye()});const ot=async ee=>{const j=Fe.value[ee];We.value=j,await ue()};e.watch(()=>{var ee;return(ee=D==null?void 0:D.value)==null?void 0:ee.group},async(ee,j)=>{ee!=j&&ee&&ot(ee)});const Q=async()=>{var j;await Ye();const ee=(j=D.value)==null?void 0:j.group;await ot(ee)},R=e.ref([]),ye=e.ref({}),we=e.ref({}),je=async ee=>{const j=ee==null?void 0:ee.join("/"),te=sessionStorage.getItem("systemKey");return await Ae.getItemData(j,te,"")},$e=async ee=>{const j=await je(ee);R.value=j==null?void 0:j.map(te=>{const{name:Te}=te;return ye.value[Te]=te,{label:Te,value:Te}})},Je=async(ee,j)=>{await $e(ee);const te=Ee();te==null||te.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=R.value)}),L.value=te};e.watch(()=>{var ee;return(ee=M==null?void 0:M.value)==null?void 0:ee.menu},async(ee,j)=>{const te=ee==null?void 0:ee.join("/"),Te=j==null?void 0:j.join("/");te!=Te&&await Je(ee)});const Ge=(ee,j)=>{const te=j==null?void 0:j.find(v=>{const{key:C}=v;return C==="header"}),Te=(te==null?void 0:te.contents)||[],Me=Te==null?void 0:Te.filter((v,C)=>{const{label:P}=v;return P!=="操作"}),at=Me==null?void 0:Me.map((v,C)=>{const{label:P}=v;return{label:P,value:C}});ee==null||ee.forEach(v=>{const C=v==null?void 0:v.prop;(C==="nameCol"||C==="valueCol")&&(v.contents=at)})},de=ee=>{const{comp:j,compData:te}=we.value||{};if(j==="Table"){M.value.formItems=[];let Te=Ee();Te=Te.filter(Me=>{const{prop:at}=Me;return at!=="formItems"}),Ge(Te,te),L.value=Te}},S=async ee=>{const j=ye.value[ee];we.value=j,await de()};e.watch(()=>{var ee;return(ee=M==null?void 0:M.value)==null?void 0:ee.group},async(ee,j)=>{ee!=j&&S(ee)});const W=async()=>{var te,Te;const ee=(te=M.value)==null?void 0:te.menu;await Je(ee);const j=(Te=M.value)==null?void 0:Te.group;await S(j)},Oe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:D.value}]}),be=()=>{c.visible=!1,I.visible=!1,pe.visible=!1};return e.onMounted(async()=>{var j,te,Te;L.value=J(),E.value=F();const ee=s==null?void 0:s.itemContents;g.value=((j=ee==null?void 0:ee.find(Me=>Me.key==="chartBaseConfig"))==null?void 0:j.contents)??{},M.value=((te=ee==null?void 0:ee.find(Me=>Me.key==="chartDataConfig"))==null?void 0:te.contents)??{},await W(),D.value=((Te=ee==null?void 0:ee.find(Me=>Me.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await Q()}),(ee,j)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Yu,[j[4]||(j[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:j[0]||(j[0]=Te=>h())},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ju,[j[6]||(j[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:j[1]||(j[1]=Te=>K())},{default:e.withCtx(()=>j[5]||(j[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Qu,[j[8]||(j[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:j[2]||(j[2]=Te=>me())},{default:e.withCtx(()=>j[7]||(j[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:be,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zu,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ep,[e.createVNode(te,{class:"cancel-button button",onClick:be,id:"themeBorderButton"},{default:e.withCtx(()=>j[9]||(j[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:w,id:"themeButton"},{default:e.withCtx(()=>j[10]||(j[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:I.visible,title:I.title,onBeforeDestroy:be,width:I.width},{default:e.withCtx(()=>[e.createElementVNode("div",tp,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:L.value,key:L.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createVNode(te,{class:"cancel-button button",onClick:be,id:"themeBorderButton"},{default:e.withCtx(()=>j[11]||(j[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:be,id:"themeButton"},{default:e.withCtx(()=>j[12]||(j[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:pe.visible,title:pe.title,onBeforeDestroy:be,width:pe.width},{default:e.withCtx(()=>[e.createElementVNode("div",np,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",lp,[e.createVNode(te,{class:"cancel-button button",onClick:be,id:"themeBorderButton"},{default:e.withCtx(()=>j[13]||(j[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:be,id:"themeButton"},{default:e.withCtx(()=>j[14]||(j[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),rp=Pt._export_sfc(op,[["__scopeId","data-v-fe119645"]]);var Pn={exports:{}},ip=Pn.exports,jl;function sp(){return jl||(jl=1,function(n,r){(function(s,o){o()})(ip,function(){function s(b,w){return typeof w>"u"?w={autoBom:!1}:typeof w!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),w={autoBom:!w}),w.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.type)?new Blob(["\uFEFF",b],{type:b.type}):b}function o(b,w,I){var L=new XMLHttpRequest;L.open("GET",b),L.responseType="blob",L.onload=function(){h(L.response,w,I)},L.onerror=function(){console.error("could not download file")},L.send()}function c(b){var w=new XMLHttpRequest;w.open("HEAD",b,!1);try{w.send()}catch{}return 200<=w.status&&299>=w.status}function u(b){try{b.dispatchEvent(new MouseEvent("click"))}catch{var w=document.createEvent("MouseEvents");w.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),b.dispatchEvent(w)}}var y=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ae.commonjsGlobal=="object"&&Ae.commonjsGlobal.global===Ae.commonjsGlobal?Ae.commonjsGlobal:void 0,g=y.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=y.saveAs||(typeof window!="object"||window!==y?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(b,w,I){var L=y.URL||y.webkitURL,J=document.createElement("a");w=w||b.name||"download",J.download=w,J.rel="noopener",typeof b=="string"?(J.href=b,J.origin===location.origin?u(J):c(J.href)?o(b,w,I):u(J,J.target="_blank")):(J.href=L.createObjectURL(b),setTimeout(function(){L.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(b,w,I){if(w=w||b.name||"download",typeof b!="string")navigator.msSaveOrOpenBlob(s(b,I),w);else if(c(b))o(b,w,I);else{var L=document.createElement("a");L.href=b,L.target="_blank",setTimeout(function(){u(L)})}}:function(b,w,I,L){if(L=L||open("","_blank"),L&&(L.document.title=L.document.body.innerText="downloading..."),typeof b=="string")return o(b,w,I);var J=b.type==="application/octet-stream",M=/constructor/i.test(y.HTMLElement)||y.safari,Ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ee||J&&M||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var E=X.result;E=Ee?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),L?L.location.href=E:location=E,L=null},X.readAsDataURL(b)}else{var K=y.URL||y.webkitURL,pe=K.createObjectURL(b);L?L.location=pe:location.href=pe,L=null,setTimeout(function(){K.revokeObjectURL(pe)},4e4)}});y.saveAs=h.saveAs=h,n.exports=h})}(Pn)),Pn.exports}sp();const Hn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DalbUyWu.cjs")).then(n=>n.index));Hn.install=n=>{n.component("ssMenu",Hn)};const Vo={__name:"index",props:{name:String},setup(n){const r=n,s=e.computed(()=>d.ElIcons[r.name]);return e.onMounted(()=>{}),(o,c)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},bl=(n,r,s=0)=>{let o=n;return o!=null&&o.every(c=>Array.isArray(c))&&(o!=null&&o.every(c=>Array.isArray(c)&&c.length===1)?o=o==null?void 0:o.filter(c=>(c==null?void 0:c[0])!==(r==null?void 0:r[s])):o=o==null?void 0:o.map(c=>{if(c!=null&&c.find(u=>u===(r==null?void 0:r[s]))&&(r==null?void 0:r.length)!==1){let u=d.cloneDeep(r),y=c==null?void 0:c.filter(w=>w!==(u==null?void 0:u[s])),g=s+1,h=bl(y,u,g),b=[];b.push(c==null?void 0:c[0]),h==null||h.forEach(w=>{b.push(w)}),c=b}return c})),o},kl=(n,r,s,o=0)=>{let c=n;return c!=null&&c.every(u=>Array.isArray(u))&&(c!=null&&c.every(u=>Array.isArray(u)&&u.length===1)?c.push([s]):c=c==null?void 0:c.map(u=>{if(u!=null&&u.find(y=>y===(r==null?void 0:r[o]))&&(r==null?void 0:r.length)!==1){let y=d.cloneDeep(r),g=u==null?void 0:u.filter(I=>I!==(y==null?void 0:y[o])),h=o+1,b=kl(g,y,s,h),w=[];w.push(u==null?void 0:u[0]),b==null||b.forEach(I=>{w.push(I)}),u=w}return u})),c},xl=(n,r,s,o,c=0)=>{let u=n;return u!=null&&u.every(y=>Array.isArray(y))&&(u!=null&&u.every(y=>Array.isArray(y)&&y.length===1)?u=u==null?void 0:u.map(y=>((y==null?void 0:y[0])===s&&(y=[o]),y)):u=u==null?void 0:u.map(y=>{if(y!=null&&y.find(g=>g===(r==null?void 0:r[c]))&&(r==null?void 0:r.length)!==1){let g=d.cloneDeep(r),h=y==null?void 0:y.filter(L=>L!==(g==null?void 0:g[c])),b=c+1,w=xl(h,g,s,o,b),I=[];I.push(y==null?void 0:y[0]),w==null||w.forEach(L=>{I.push(L)}),y=I}return y})),u};function Oo(n="menu"){return{name:n,components:{SvgIcon:Ur.SvgIcon,ssMenu:Hn,DynamicIcon:Vo,ssDialog:Yt.ssDialog,ssInput:zt._sfc_main$3},setup(r,{emit:s}){const o=e.defineProps({mode:{type:String,default:"vertical"}}),c=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=jt.useMenuState(),y=jt.useModelComp(d.pinia),g=d.useLoginState(d.pinia),{loginUserInfo:h}=d.storeToRefs(g),b=e.ref(0),w=Wr.useRouter(),I=e.ref(),{asideMenus:L,menuTriggerType:J,platform:M}=d.storeToRefs(u),{fixMenuStatus:Ee}=d.storeToRefs(y),X=e.computed(()=>o==null?void 0:o.mode),K=de=>de==null?void 0:de.map(W=>{var Oe,be;return!(W!=null&&W.children)||((Oe=W==null?void 0:W.children)==null?void 0:Oe.length)===0?W.config=c.value:W!=null&&W.children&&((be=W==null?void 0:W.children)==null?void 0:be.length)>0&&(W.children=K(W.children)),W}),pe=e.computed(()=>{let de=[...L.value];if((de==null?void 0:de.length)===0)return w.push("/"),[];const S=Ue(de,_.value);return S.isFlag||(de=S==null?void 0:S.data),de=de==null?void 0:de.map(W=>{var Oe,be;return!(W!=null&&W.children)||((Oe=W==null?void 0:W.children)==null?void 0:Oe.length)===0?W.config=c.value:W!=null&&W.children&&((be=W==null?void 0:W.children)==null?void 0:be.length)>0&&(W.children=K(W.children)),W}),de}),E=async(de,S)=>{y.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(de==null?void 0:de.path),u.setActiveAsideMenu(de),de.isRouter?w.push(de.path):w.push("/"),s("node-click",de,S)},F=async de=>{const S=d.findNodeByPropInTree(pe.value,"path",de);u.setActiveAsideMenu(S),y.setRouteToChildPath(""),Ee.value?y.setFixMenuStatus(!1):J.value==="click"?b.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(de):(u.setMenuTriggerType("click"),u.setActiveMenuPath(de)),de!=null&&de.startsWith("/")?w.push(de):w.push("/"),b.value++},D=de=>{u.setActiveMenuPath(de)},N=de=>{const S=document.documentElement;de==null||de.forEach(W=>{S.style.setProperty(W.name,W.value)})};e.onMounted(()=>{b.value=1});const _=e.computed(()=>{const de=sessionStorage.getItem("authority");return de?JSON.parse(de):[]});e.watch(()=>M.value,de=>{de==="browser"?N(kn.browserVerticalMenuClasses):de==="client"?(N(kn.clientHorizontalMenuClasses),N(kn.clientVerticalMenuClasses)):de==="three"&&(N(kn.threeHorizontalMenuClasses),N(kn.threeVerticalMenuClasses))},{immediate:!0});const me=(de,S)=>{function W(Oe){Oe==null||Oe.forEach(be=>{var j,te;const ee=(j=be==null?void 0:be.path)!=null&&j.startsWith("/")?(te=be==null?void 0:be.path)==null?void 0:te.substring(1):be==null?void 0:be.path;be.show=S==null?void 0:S.some(Te=>Te==null?void 0:Te.includes(ee)),be.children&&W(be.children)})}return W(de),de},Ue=(de,S)=>{if(Array.isArray(S)){const W=Array.from(new Set(S==null?void 0:S.map(Oe=>Oe.substring(0,Oe.lastIndexOf("/")))));return{data:me(de,W),isFlag:!1}}else return{isFlag:(S==null?void 0:S.toUpperCase())==="SUPERADMIN"}},it=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Fe=de=>on(de),We=e.ref({}),_e=e.ref([]),V=e.ref({}),le=e.ref({}),ie=de=>{switch(de){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ue=e.ref({}),Ye=de=>{u.setCacheInputMenu({type:it.type,data:de}),u.setIsRefreshMenus(!0)},ot=async(de,S,W)=>{var Oe,be,ee,j,te,Te,Me,at,v,C,P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze,ne,fe,Be,ve;if(S==="create"){let he=(W==null?void 0:W.title)+"(1)",ze=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ce=(be=(Oe=ze==null?void 0:ze.data)==null?void 0:Oe.result)==null?void 0:be[0],A=(ee=Ce==null?void 0:Ce.value)==null?void 0:ee.pageData;A.compData=(j=A.compData)==null?void 0:j.map(Le=>{var Qe;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=kl(Le.contents,(Qe=W==null?void 0:W.path)==null?void 0:Qe.split("/"),he)),Le}),await d.updateInsofDataApi({id:Ce==null?void 0:Ce.id,value:{pageData:A}});let ke=(Te=(te=W==null?void 0:W.path)==null?void 0:te.split("/"))==null?void 0:Te.filter((Le,Qe)=>{var Re,ht;return Qe!==((ht=(Re=W==null?void 0:W.path)==null?void 0:Re.split("/"))==null?void 0:ht.length)-1}),nt=await Ae.getItemData((v=(at=(Me=W==null?void 0:W.path)==null?void 0:Me.split("/"))==null?void 0:at.filter((Le,Qe)=>{var Re,ht;return Qe!==((ht=(Re=W==null?void 0:W.path)==null?void 0:Re.split("/"))==null?void 0:ht.length)-1}))==null?void 0:v.join("/"),sessionStorage.getItem("systemKey"),"");if(ke.push(he),ke=ke==null?void 0:ke.join("/"),(nt==null?void 0:nt.length)>0){let Le=nt==null?void 0:nt[0],Qe=(P=(C=Le==null?void 0:Le.compData)==null?void 0:C.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:P.contents;if(((Z=Qe==null?void 0:Qe[0])==null?void 0:Z.directiveLabel)==="#isMain"){let Re=(x=Qe==null?void 0:Qe[0])==null?void 0:x.prop,ht=(ae=(T=Le==null?void 0:Le.compData)==null?void 0:T.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:ae.contents,pt;ht==null||ht.forEach(st=>{var vt,yt;if(st.length===1)((vt=st==null?void 0:st[0])==null?void 0:vt[Re])===(W==null?void 0:W.title)&&(pt=st==null?void 0:st[0],pt[Re]=he);else{let Dt=(yt=Qe==null?void 0:Qe.filter(wt=>wt!=="操作"))==null?void 0:yt.map(wt=>wt==null?void 0:wt.prop),It=st==null?void 0:st.filter(wt=>!(wt!=null&&wt.id)),Bt=Ae.getValueToObjectValue(It,Dt);Bt[Re]=he,pt=Bt}}),await d.createInsofDataApi({key:{type:"data",pageKey:($=(U=(z=W==null?void 0:W.path)==null?void 0:z.split("/"))==null?void 0:U.filter((st,vt)=>{var yt,Dt;return vt!==((Dt=(yt=W==null?void 0:W.path)==null?void 0:yt.split("/"))==null?void 0:Dt.length)-1}))==null?void 0:$.join("/"),tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(H=h.value)==null?void 0:H.id,createUserLayer:((De=h.value)==null?void 0:De.dept)||((oe=h.value)==null?void 0:oe.部门名称)},value:{tableData:pt}})}}await Ae.newLoadingConstruct(W==null?void 0:W.path,ke),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((se=(re=(Y=W==null?void 0:W.path)==null?void 0:Y.split("/"))==null?void 0:re.filter((Le,Qe)=>{var Re,ht;return Qe!==((ht=(Re=W==null?void 0:W.path)==null?void 0:Re.split("/"))==null?void 0:ht.length)-1}))==null?void 0:se.join("/")),u.setActiveTopMenuPath((Se=(xe=W==null?void 0:W.path)==null?void 0:xe.split("/"))==null?void 0:Se[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(S==="update")I.value=W;else if(S==="delete"){let he=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:W==null?void 0:W.path}}),ze=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ce=(q=(Ie=ze==null?void 0:ze.data)==null?void 0:Ie.result)==null?void 0:q[0],A=(Ve=Ce==null?void 0:Ce.value)==null?void 0:Ve.pageData;if(A.compData=(ge=A.compData)==null?void 0:ge.map(Le=>{var Qe;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=bl(Le.contents,(Qe=W==null?void 0:W.path)==null?void 0:Qe.split("/"))),Le}),await d.updateInsofDataApi({id:Ce==null?void 0:Ce.id,value:{pageData:A}}),((rt=(Ke=he==null?void 0:he.data)==null?void 0:Ke.result)==null?void 0:rt.length)>0){let Le=(lt=(He=he==null?void 0:he.data)==null?void 0:He.result)==null?void 0:lt.map(Qe=>Qe==null?void 0:Qe.id);(Le==null?void 0:Le.length)>0&&await d.batchDeleteInsofDataApi({ids:Le})}let ke=await Ae.getItemData((et=(ft=(Pe=W==null?void 0:W.path)==null?void 0:Pe.split("/"))==null?void 0:ft.filter((Le,Qe)=>{var Re,ht;return Qe!==((ht=(Re=W==null?void 0:W.path)==null?void 0:Re.split("/"))==null?void 0:ht.length)-1}))==null?void 0:et.join("/"),sessionStorage.getItem("systemKey"),""),nt=[];(ke==null?void 0:ke.length)>0&&(ke==null||ke.forEach(Le=>{var Re,ht,pt,st,vt,yt,Dt,It,Bt,wt,Rt;let Qe=(st=(pt=(ht=(Re=Le==null?void 0:Le.compData)==null?void 0:Re.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:ht.contents)==null?void 0:pt[0])==null?void 0:st.prop;((It=(Dt=(yt=(vt=Le==null?void 0:Le.compData)==null?void 0:vt.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:yt.contents)==null?void 0:Dt[0])==null?void 0:It.directiveLabel)==="#isMain"&&((Rt=(wt=(Bt=Le==null?void 0:Le.compData)==null?void 0:Bt.find(kt=>(kt==null?void 0:kt.key)==="tableContents"))==null?void 0:wt.contents)==null||Rt.forEach(kt=>{var Ut,Gt,Ot;(kt==null?void 0:kt.length)>1?(kt==null?void 0:kt[1])===(W==null?void 0:W.title)&&nt.push((Ut=kt==null?void 0:kt[0])==null?void 0:Ut.id):((Gt=kt==null?void 0:kt[0])==null?void 0:Gt[Qe])===(W==null?void 0:W.title)&&nt.push((Ot=kt==null?void 0:kt[0])==null?void 0:Ot.id)}))})),(nt==null?void 0:nt.length)>0&&await d.batchDeleteInsofDataApi({ids:nt}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((fe=(ne=(Ze=W==null?void 0:W.path)==null?void 0:Ze.split("/"))==null?void 0:ne.filter((Le,Qe)=>{var Re,ht;return Qe!==((ht=(Re=W==null?void 0:W.path)==null?void 0:Re.split("/"))==null?void 0:ht.length)-1}))==null?void 0:fe.join("/")),u.setActiveTopMenuPath((ve=(Be=W==null?void 0:W.path)==null?void 0:Be.split("/"))==null?void 0:ve[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(de,S)=>{var at,v,C,P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze;let W=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Oe=(v=(at=W==null?void 0:W.data)==null?void 0:at.result)==null?void 0:v[0],be=(C=Oe==null?void 0:Oe.value)==null?void 0:C.pageData;be.compData=(P=be.compData)==null?void 0:P.map(ne=>{var fe,Be;return(ne==null?void 0:ne.key)==="menuContents"&&(ne.contents=xl(ne.contents,(fe=S==null?void 0:S.path)==null?void 0:fe.split("/"),S==null?void 0:S.title,(Be=de==null?void 0:de.target)==null?void 0:Be.value)),ne}),Oe!=null&&Oe.id&&await d.updateInsofDataApi({id:Oe==null?void 0:Oe.id,value:{pageData:be}});let ee=(x=(Z=S==null?void 0:S.path)==null?void 0:Z.split("/"))==null?void 0:x.filter((ne,fe)=>{var Be,ve;return fe!==((ve=(Be=S==null?void 0:S.path)==null?void 0:Be.split("/"))==null?void 0:ve.length)-1}),j=ee==null?void 0:ee.join("/");ee.push((T=de==null?void 0:de.target)==null?void 0:T.value),ee=ee==null?void 0:ee.join("/");let te=await Ae.getItemData(j,sessionStorage.getItem("systemKey"),"");if(((H=($=(U=(z=(ae=te==null?void 0:te[0])==null?void 0:ae.compData)==null?void 0:z.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:U.contents)==null?void 0:$[0])==null?void 0:H.directiveLabel)==="#isMain"){let ne=(se=(re=(Y=(oe=(De=te==null?void 0:te[0])==null?void 0:De.compData)==null?void 0:oe.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:Y.contents)==null?void 0:re[0])==null?void 0:se.prop,fe=(Ie=(Se=(xe=te==null?void 0:te[0])==null?void 0:xe.compData)==null?void 0:Se.find(he=>(he==null?void 0:he.key)==="tableContents"))==null?void 0:Ie.contents,Be=(Ke=(ge=(Ve=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:Ve.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:ge.contents)==null?void 0:Ke.map(he=>he==null?void 0:he.prop),ve;if(fe==null||fe.forEach(he=>{var Ce;let ze=Ae.getValueToObjectValue(he,Be);(ze==null?void 0:ze[ne])===S.title&&(ve=ze,ve[ne]=(Ce=de==null?void 0:de.target)==null?void 0:Ce.value)}),ve){let he={};for(let Ce in ve)Ce!=="id"&&(he[Ce]=ve==null?void 0:ve[Ce]);let ze=[{id:ve==null?void 0:ve.id,value:{tableData:he}}];await d.batchUpdateInsofDataApi({dataList:ze})}}let Te=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:S==null?void 0:S.path}}),Me=(He=(rt=Te==null?void 0:Te.data)==null?void 0:rt.result)==null?void 0:He.map(ne=>({id:ne==null?void 0:ne.id,key:ne==null?void 0:ne.key}));Me=Me==null?void 0:Me.map(ne=>(ne.key.pageKey=ee,ne)),(Me==null?void 0:Me.length)>0&&await d.batchUpdateInsofDataApi({dataList:Me}),u.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),u.setActiveMenuPath((ft=(Pe=(lt=S==null?void 0:S.path)==null?void 0:lt.split("/"))==null?void 0:Pe.filter((ne,fe)=>{var Be,ve;return fe!==((ve=(Be=S==null?void 0:S.path)==null?void 0:Be.split("/"))==null?void 0:ve.length)-1}))==null?void 0:ft.join("/")),u.setActiveTopMenuPath((Ze=(et=S==null?void 0:S.path)==null?void 0:et.split("/"))==null?void 0:Ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),I.value=void 0},R=async(de,S)=>{it.type=ie(S==null?void 0:S.operateType),await ot(S,it.type,de),le.value=de,ue.value=S},ye=()=>{it.show=!1},we=de=>de==null?void 0:de.filter(S=>S.allowInherit),je=()=>{var W,Oe,be,ee,j;let de;it.type==="create"&&(de=((W=le.value)==null?void 0:W.path)+"/"+V.value[(Oe=V.value)==null?void 0:Oe.prop]),it.type==="update"&&(de=(be=le.value)==null?void 0:be.path);const S={...le.value,config:we((ee=le.value)==null?void 0:ee.config),children:[],childMenus:[],title:V.value[(j=V.value)==null?void 0:j.prop],path:de};console.log("clickSubmitForm",ue.value,le.value,S),Ye(S),it.show=!1},$e=de=>{var W,Oe;const S=(W=de==null?void 0:de.contents)==null?void 0:W.find(be=>be.key==="formContent");S&&(V.value=(Oe=S==null?void 0:S.contents)==null?void 0:Oe.reduce((be,ee)=>(be[ee.key]=ee.value,be.prop=ee.key,be),{}))},Je=e.ref(!1);return{isCollapse:Je,handleMenuCollapse:()=>{Je.value=!Je.value},handleCompChange:$e,dialogForm:We,dialogRenderComps:_e,getComponents:Fe,clickSubmitForm:je,dialogInfo:it,beforeDialogDestroy:ye,clickMenuIcon:R,mode:X,renderMenuList:pe,clickMenu:E,openMenu:F,closeMenu:D,changeMenuStyle:N,fixElement:I,onBlur:Q}}}}e.defineComponent(Oo());const Ha=d.useLoginState(),{loginUserInfo:Mn}=d.storeToRefs(Ha),Kt=jt.useModelComp(d.pinia),$n=e.ref(!1),{itemData:cp,itemGridData:tn,curStructureCompIds:Ul,isSubmitCurStructure:up,isRefreshCurStructure:pp,freshContent:Wl,routeToChildPath:dp,payloadTypes:Dl,pageMapState:qn,itemExtendData:zn}=d.storeToRefs(Kt),Lt=jt.useMenuState(d.pinia),{activeTopMenuPath:Mo,activeMenuPath:gt,platform:rf,activeAsideMenu:fp,buttonTriggerType:hp,menus:vp}=d.storeToRefs(Lt),ka=zt.useUnit(d.pinia),{selectTitle:gp,chooseTitle:Jt}=d.storeToRefs(ka),mp=Ae.useOriginalState(d.pinia),{originalPath:ll}=d.storeToRefs(mp),Zt=e.ref(),Hl=jt.useAuthorityState(d.pinia),Gn=e.ref(!0),hn=e.ref(0),Xn=e.ref([]),zo=e.ref(!1),ca=e.computed(async()=>{var r,s;const n=(r=gt.value)!=null&&r.startsWith("/")?(s=gt.value)==null?void 0:s.substring(1):gt.value;return(n==null?void 0:n.includes(ll.value))||await Sp(n)}),yp=()=>{Kt.setItemGridData([]),Kt.setIsEdit("edit"),Kt.setSubmitCurStructure(gt.value!=="/平台管理/菜单管理")},bp=()=>{Kt.setIsEdit("view"),Kt.setRefreshCurStructure(!0)},kp=async n=>{var y,g,h;let r=gp.value,s=r==null?void 0:r.findIndex(b=>(b==null?void 0:b.value)===(n==null?void 0:n.value)),o=(y=r==null?void 0:r.filter(b=>(b==null?void 0:b.condition)==="parent"))==null?void 0:y.map(b=>b==null?void 0:b.value),c=o==null?void 0:o[0],u=(h=(g=r==null?void 0:r.filter((b,w)=>!(b!=null&&b.condition)&&w<=s))==null?void 0:g.map(b=>b.value))==null?void 0:h.join("/");c?(u==null?void 0:u.length)>0?c=c+"/"+u:c=o==null?void 0:o.join("/"):(u==null?void 0:u.length)>0&&(c=u,r=r==null?void 0:r.filter(b=>(b==null?void 0:b.condition)!=="child"),ka.setSelectTitle(r),ka.setChooseTitle([])),Lt.setActiveMenuPath(c)},cl=async(n,r,s,o="contentConfig")=>{var c;try{if(!Array.isArray(n))return;let u,y;r==="create"?(u={dataList:n==null?void 0:n.map(h=>{var b;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:o,parentTable:"",version:1},value:{pageData:{...h,compData:(b=h==null?void 0:h.compData)==null?void 0:b.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},y=d.batchAddInsofDataApi):r==="update"?(u={dataList:n==null?void 0:n.map(h=>{var b;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(b=h==null?void 0:h.compData)==null?void 0:b.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},y=d.batchUpdateInsofDataApi):r==="delete"&&(u={ids:n},y=d.batchDeleteInsofDataApi);const g=await y(u);if(((c=g==null?void 0:g.data)==null?void 0:c.code)===200)return g.data.result;throw d.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{d.ElMessage.error("保存响应失败")}},ql=async(n,r,s,o)=>{var c,u,y,g,h,b,w,I,L,J,M;try{const Ee=(u=(c=n==null?void 0:n.results)==null?void 0:c.filter(D=>!(D!=null&&D.id)||typeof(D==null?void 0:D.id)=="string"))==null?void 0:u.map(D=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:s},value:{tableData:D}})),X=(g=(y=n==null?void 0:n.results)==null?void 0:y.filter(D=>(D==null?void 0:D.id)&&typeof(D==null?void 0:D.id)=="number"))==null?void 0:g.map(D=>({id:D==null?void 0:D.id,value:{tableData:D}})),K=JSON.parse(d.cloneDeep(JSON.stringify(n))),pe=(h=K==null?void 0:K.results)==null?void 0:h.map(D=>D.id);let E;s?E=(I=(w=(b=qn.value)==null?void 0:b[gt.value])==null?void 0:w.filter(D=>{var N,_,me;return((N=D==null?void 0:D.key)==null?void 0:N.type)===r&&((me=(_=D==null?void 0:D.key)==null?void 0:_.relatedInfo)==null?void 0:me.target)===o}))==null?void 0:I.map(D=>D==null?void 0:D.id):E=(M=(J=(L=qn.value)==null?void 0:L[gt.value])==null?void 0:J.filter(D=>{var N;return((N=D==null?void 0:D.key)==null?void 0:N.type)===r}))==null?void 0:M.map(D=>D==null?void 0:D.id);const F=E==null?void 0:E.filter(D=>!(pe!=null&&pe.includes(D))&&typeof D=="number");(Ee==null?void 0:Ee.length)>0&&await d.batchAddInsofDataApi({dataList:Ee}),(X==null?void 0:X.length)>0&&await d.batchUpdateInsofDataApi({dataList:X}),(F==null?void 0:F.length)>0&&await d.batchDeleteInsofDataApi({ids:F})}catch(Ee){throw new Error(Ee)}},xp=async n=>{var b,w,I,L,J,M,Ee,X,K,pe;Lt.setContentLoading(!0);const r=JSON.parse(d.cloneDeep(JSON.stringify(cp.value)));if(!up.value)return Lt.setCacheStructures({key:hp.value,data:r}),d.ElMessage.success("已暂存");const s=r==null?void 0:r.map(E=>E.id),o=s.filter(E=>{var F;return!((F=Ul.value)!=null&&F.includes(E))}),c=(b=Ul.value)==null?void 0:b.filter(E=>!s.includes(E)),u=[...o,...c].filter(E=>typeof E!==null&&typeof E<"u"),y=r==null?void 0:r.filter(E=>!E.id),g=r==null?void 0:r.filter(E=>E.id);let h=[];if(u&&(u==null?void 0:u.length)>0&&h.push(cl(u,"delete",n)),y&&(y==null?void 0:y.length)>0&&h.push(cl(y,"create",n)),g&&(g==null?void 0:g.length)>0&&h.push(cl(g,"update",n)),tn.value&&((w=tn.value)!=null&&w.isDelete&&((L=(I=tn.value)==null?void 0:I.results)==null?void 0:L.length)>0&&((M=(J=tn.value)==null?void 0:J.results)!=null&&M.every(E=>typeof E=="number"))?await d.batchDeleteInsofDataApi({ids:(Ee=tn.value)==null?void 0:Ee.results}):(console.log("itemGridData.value",tn.value),h.push(await ql(tn.value,"gridLayout")))),zn.value)for(const E in zn.value)h.push(await ql((X=zn.value)==null?void 0:X[E],"extend",{target:E,compId:(pe=(K=zn.value)==null?void 0:K[E])==null?void 0:pe.compId},E));await Promise.all(h).then(()=>{d.ElMessage.success("保存成功"),Kt.setRefreshCurStructure(!0)}).catch(E=>{d.ElMessage.success(E)}),Lt.setContentLoading(!1)},Yn=n=>on(n),ct=e.ref([]),Dp=e.computed(()=>{var n;return(n=ct.value)==null?void 0:n.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),Fo=e.computed(()=>{var n;return(n=ct.value)==null?void 0:n.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),wp=async n=>{var o,c,u,y,g,h;let r=d.cloneDeep(gt).value;r=r+ll.value+((o=Object.values(n==null?void 0:n.singleContent))==null?void 0:o[0]);const s=await d.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r}});if(((u=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:u.length)>0){const b=(g=(y=s==null?void 0:s.data)==null?void 0:y.result)==null?void 0:g.map(I=>I==null?void 0:I.id),w=await d.batchDeleteInsofDataApi({ids:b});((h=w==null?void 0:w.data)==null?void 0:h.code)===200?(d.ElMessage.success("删除成功"),await Ha.setLogRecordAsync({type:"删除",data:n},r)):d.ElMessage.error("删除响应失败"),Kt.setTableLoading(!1)}},Gl=async n=>{var r,s;try{let o=d.cloneDeep(gt).value,c=[];if(Array.isArray(n)){n==null||n.forEach(y=>{var g;c.push(d.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:o+ll.value+((g=Object.values(y==null?void 0:y.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(c);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(y=>{var g;return((g=y==null?void 0:y.data)==null?void 0:g.code)===200}))){const y=Array.from(new Set((r=u==null?void 0:u.flatMap(h=>{var b;return(b=h==null?void 0:h.data)==null?void 0:b.result}))==null?void 0:r.map(h=>h==null?void 0:h.id))),g=await d.batchDeleteInsofDataApi({ids:y});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(d.ElMessage.success("删除成功"),await Ha.setLogRecordAsync({type:"删除",data:n},o)):d.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await wp(n)}catch{d.ElMessage.error("删除数据时处理失败")}finally{Kt.setTableLoading(!1)}},Cp=async n=>{var r,s;try{if(!n||!(n!=null&&n.data))return;const{id:o,...c}=d.cloneDeep(n==null?void 0:n.data),u=await d.createInsofDataApi({key:{type:"data",pageKey:gt.value,tableId:(r=n==null?void 0:n.to)==null?void 0:r.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const y=await Promise.all([u]);(y==null?void 0:y.every(h=>{var b;return((b=h==null?void 0:h.data)==null?void 0:b.code)===200}))?d.ElMessage.success("迁移成功"):d.ElMessage.error("迁移响应失败")}catch(o){throw d.ElMessage.error(o),new Error(o)}},Ro=e.ref(0),Jn=e.ref(null),Qn=async(n,r="data",s)=>{var c,u,y,g,h,b,w,I,L,J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We,_e,V,le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te,Me,at,v,C,P,Z,x,T,ae,z,U,$,H,De,oe,Y,re,se,xe,Se,Ie,q,Ve,ge,Ke,rt,He,lt,Pe,ft,et,Ze;Jn.value=null;let o=gt.value;if((c=Zt.value)!=null&&c.compData&&((u=Zt.value)==null?void 0:u.compData)!==gt.value&&(o=o+"/"+((g=(y=Jt.value)==null?void 0:y[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除"){if(typeof((h=n==null?void 0:n.singleContent)==null?void 0:h.id)=="string"?await Gl(n):await Ae.deleteTableContents((b=n==null?void 0:n.singleContent)==null?void 0:b.id,n),((I=(w=n==null?void 0:n.column)==null?void 0:w[0])==null?void 0:I.directiveLabel)==="#isMain"){let ne=(M=n==null?void 0:n.singleContent)==null?void 0:M[(J=(L=n==null?void 0:n.column)==null?void 0:L[0])==null?void 0:J.prop],fe=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Be=gt.value+"/"+ne,ve=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Be}}),he=(X=(Ee=fe==null?void 0:fe.data)==null?void 0:Ee.result)==null?void 0:X[0],ze=(K=he==null?void 0:he.value)==null?void 0:K.pageData;if(ze.compData=(pe=ze.compData)==null?void 0:pe.map(Ce=>((Ce==null?void 0:Ce.key)==="menuContents"&&(Ce.contents=bl(Ce.contents,Be==null?void 0:Be.split("/"))),Ce)),await d.updateInsofDataApi({id:he==null?void 0:he.id,value:{pageData:ze}}),((F=(E=ve==null?void 0:ve.data)==null?void 0:E.result)==null?void 0:F.length)>0){let Ce=(N=(D=ve==null?void 0:ve.data)==null?void 0:D.result)==null?void 0:N.map(A=>A==null?void 0:A.id);(Ce==null?void 0:Ce.length)>0&&await d.batchDeleteInsofDataApi({ids:Ce})}Lt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Lt.setIsRefreshMenus(!1),Lt.setIsRefreshMenus(!0),Lt.setActiveMenuPath((me=(_=Be==null?void 0:Be.split("/"))==null?void 0:_.filter((Ce,A)=>{var ke;return A!==((ke=Be==null?void 0:Be.split("/"))==null?void 0:ke.length)-1}))==null?void 0:me.join("/"))}await Ha.setLogRecordAsync({type:"删除",data:n},gt.value)}else if((n==null?void 0:n.buttonName)==="批量删除")if((Ue=n==null?void 0:n.selectItems)!=null&&Ue.every(ne=>typeof(ne==null?void 0:ne.id)=="string")){const ne=(it=n==null?void 0:n.selectItems)==null?void 0:it.map(fe=>({content:n==null?void 0:n.content,singleContent:fe,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Gl(ne)}else{const ne=(Fe=n==null?void 0:n.selectItems)==null?void 0:Fe.map(fe=>fe==null?void 0:fe.id);await d.batchDeleteInsofDataApi({ids:ne}),await Ha.setLogRecordAsync({type:"删除",data:ne},gt.value)}else if((n==null?void 0:n.buttonName)==="新增"){let ne={};for(let Be in n==null?void 0:n.singleContent)Be!=="id"&&Be!=="index"&&(ne[Be]=n==null?void 0:n.singleContent[Be]);const fe=await Ae.addTableContents(r,o,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(ne),n==null?void 0:n.column,n,{param:s});if(Jn.value={resId:fe,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((_e=(We=n==null?void 0:n.column)==null?void 0:We[0])==null?void 0:_e.directiveLabel)==="#isMain"&&((le=(V=n==null?void 0:n.column)==null?void 0:V[0])==null?void 0:le.directiveColor)!==!0){let Be=(Ye=n==null?void 0:n.singleContent)==null?void 0:Ye[(ue=(ie=n==null?void 0:n.column)==null?void 0:ie[0])==null?void 0:ue.prop],ve=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),he=gt.value+"/"+(Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-3)),ze=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:he}}),Ce=(Q=(ot=ve==null?void 0:ve.data)==null?void 0:ot.result)==null?void 0:Q[0],A=(R=Ce==null?void 0:Ce.value)==null?void 0:R.pageData;if(A.compData=(ye=A.compData)==null?void 0:ye.map(ke=>((ke==null?void 0:ke.key)==="menuContents"&&(ke.contents=kl(ke.contents,he==null?void 0:he.split("/"),Be)),ke)),await d.updateInsofDataApi({id:Ce==null?void 0:Ce.id,value:{pageData:A}}),((je=(we=ze==null?void 0:ze.data)==null?void 0:we.result)==null?void 0:je.length)>0)await Ae.newLoadingConstruct(he,gt.value+"/"+Be);else{let ke=await d.getInsofDataApi({key:{pageKey:gt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Je=($e=ke==null?void 0:ke.data)==null?void 0:$e.result)==null?void 0:Je.length)>=1?await Ae.newLoadingCutFirstConstruct(gt.value+"/",gt.value+"/"+Be):await Ae.newLoadingCutFirstConstruct(gt.value,gt.value+"/"+Be)}Lt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Lt.setIsRefreshMenus(!1),Lt.setIsRefreshMenus(!0),Lt.setActiveMenuPath((de=(Ge=he==null?void 0:he.split("/"))==null?void 0:Ge.filter((ke,nt)=>{var Le;return nt!==((Le=he==null?void 0:he.split("/"))==null?void 0:Le.length)-1}))==null?void 0:de.join("/"))}Kt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((W=(S=n==null?void 0:n.column)==null?void 0:S[0])==null?void 0:W.directiveLabel)==="#isMain"&&((be=(Oe=n==null?void 0:n.column)==null?void 0:Oe[0])==null?void 0:be.directiveColor)!==!0){let ne=(te=n==null?void 0:n.singleContent)==null?void 0:te[(j=(ee=n==null?void 0:n.column)==null?void 0:ee[0])==null?void 0:j.prop];if(Ae.isNumber((Te=n==null?void 0:n.singleContent)==null?void 0:Te.id)){let fe=await d.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Be=await d.getInsofDataApi({id:(Me=n==null?void 0:n.singleContent)==null?void 0:Me.id}),ve=(T=(P=(C=(v=(at=Be==null?void 0:Be.data)==null?void 0:at.result)==null?void 0:v[0])==null?void 0:C.value)==null?void 0:P.tableData)==null?void 0:T[(x=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:x.prop],he=gt.value+"/"+ve,ze=(z=(ae=fe==null?void 0:fe.data)==null?void 0:ae.result)==null?void 0:z[0],Ce=(U=ze==null?void 0:ze.value)==null?void 0:U.pageData;Ce.compData=($=Ce.compData)==null?void 0:$.map(A=>((A==null?void 0:A.key)==="menuContents"&&(A.contents=xl(A.contents,he==null?void 0:he.split("/"),ve,ne)),A)),await d.updateInsofDataApi({id:ze==null?void 0:ze.id,value:{pageData:Ce}}),Lt.setUpdateMenuStatus(!1),await dn.verifyStructureDataToStore(),Lt.setIsRefreshMenus(!1),Lt.setIsRefreshMenus(!0),Lt.setActiveMenuPath((De=(H=he==null?void 0:he.split("/"))==null?void 0:H.filter((A,ke)=>{var nt;return ke!==((nt=he==null?void 0:he.split("/"))==null?void 0:nt.length)-1}))==null?void 0:De.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let ne=[],fe=[],Be=((Y=(oe=n==null?void 0:n.content)==null?void 0:oe[0])==null?void 0:Y.id)??"",ve=s==null?void 0:s.url,he="",ze="";if(Be!==""&&((re=n==null?void 0:n.content)==null?void 0:re.length)>1&&typeof((xe=(se=n==null?void 0:n.content)==null?void 0:se[0])==null?void 0:xe.id)!="string"){const Ce=await d.getInsofDataApi({id:Be});he=((Ve=(q=(Ie=(Se=Ce==null?void 0:Ce.data)==null?void 0:Se.result)==null?void 0:Ie[0])==null?void 0:q.key)==null?void 0:Ve.tableId)??"",ze=((He=(rt=(Ke=(ge=Ce==null?void 0:Ce.data)==null?void 0:ge.result)==null?void 0:Ke[0])==null?void 0:rt.key)==null?void 0:He.pageKey)??""}(lt=n==null?void 0:n.singleContent)==null||lt.forEach(Ce=>{let A={};for(let ke in Ce)ke!=="id"&&ke!=="index"&&(A[ke]=Ce[ke]);typeof(Ce==null?void 0:Ce.id)=="number"?ne.push({id:Ce==null?void 0:Ce.id,value:{tableData:A}}):fe.push({key:{type:r,pageKey:ve||ze||gt.value,tableId:he||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:A}})}),(fe==null?void 0:fe.length)>0&&await d.batchAddInsofDataApi({dataList:fe}),(ne==null?void 0:ne.length)>0&&await d.batchUpdateInsofDataApi({dataList:ne})}else{let ne={},fe=(Pe=n==null?void 0:n.singleContent)==null?void 0:Pe.id;for(let Be in n==null?void 0:n.singleContent)Be!=="id"&&Be!=="index"&&(ne[Be]=n==null?void 0:n.singleContent[Be]);await Ae.fixTableContents(r,o,n==null?void 0:n.index,fe,sessionStorage.getItem("systemKey"),Object.values(ne),n==null?void 0:n.column,n)}Kt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await Cp(n==null?void 0:n.value);Kt.setTableLoading(!1),(ft=n==null?void 0:n.column)!=null&&ft.some(ne=>ne==null?void 0:ne.isMainKey)||(ct.value=await Ae.getItemData(o,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value)),ct.value=Ae.filterChildContent(ct.value),ct.value=(et=ct.value)==null?void 0:et.filter(ne=>{var fe;return((fe=ne==null?void 0:ne.compData)==null?void 0:fe.length)>0}),ct.value=(Ze=ct.value)==null?void 0:Ze.filter(ne=>(ne==null?void 0:ne.comp)!==""),ct.value=await Ae.getDeepDiffItems(ct.value),Cl.value&&(n==null?void 0:n.buttonName)!=="删除"&&Kt.setRefreshCurStructure(!0)},Ep=async n=>{var s,o,c;const r=await d.getInsofDataApi({id:n});return(c=(o=(s=r==null?void 0:r.data)==null?void 0:s.result)==null?void 0:o[0])==null?void 0:c.value},Zn=async(n,r)=>{var c,u,y;if($n.value||typeof(n==null?void 0:n.index)=="string")return;const s=await Ep(n==null?void 0:n.index),o=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Ae.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=d.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:o,isShow:(y=s==null?void 0:s.pageData)==null?void 0:y.isShow}),r&&(Lt.setActiveMenuPath(null),Lt.setActiveMenuPath(r))},el=async n=>{ct.value=await Ae.getDeepDiffItems(n),Kt.setItemData(ct.value),Kt.setOriginalData(ct.value)},_p=async n=>{var r;await e.nextTick(),(r=fp.value)!=null&&r.isRouter?Hl.setRouterPageStructure(n):Hl.setRouterPageStructure([])},Sp=async n=>{var u,y,g,h,b,w;let r="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((I,L)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>L&&(r=r===""?r+I:r+"/"+I)}),(y=n==null?void 0:n.split("/"))==null||y.forEach((I,L)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>L&&(s=s===""?s+I:s+"/"+I)}),r=r+"/",s=s+"/";let o=await d.getInsofDataApi({key:{pageKey:r,systemKey:sessionStorage.getItem("systemKey")}}),c=await d.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(g=o==null?void 0:o.data)==null?void 0:g.result)==null?void 0:h.length)>0||((w=(b=c==null?void 0:c.data)==null?void 0:b.result)==null?void 0:w.length)>0},Tp=e.ref(),Fa=e.ref(null),Ip=n=>{var b,w,I,L,J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We;const r=(w=(b=qn.value)==null?void 0:b[n])==null?void 0:w.filter(_e=>{var V;return((V=_e==null?void 0:_e.key)==null?void 0:V.type)==="extend"});if((r==null?void 0:r.length)===0)return Fa.value=null;Tp.value=r;const s=(L=(I=r==null?void 0:r.find(_e=>{var V,le,ie;return(ie=(le=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:le.执行任务)==null?void 0:ie.includes("计时")}))==null?void 0:I.value)==null?void 0:L.tableData;if(!s)return Fa.value=null;const o=(Ee=(M=(J=r==null?void 0:r.find(_e=>{var V,le,ie;return(ie=(le=(V=_e==null?void 0:_e.value)==null?void 0:V.tableData)==null?void 0:le.执行任务)==null?void 0:ie.includes("计时")}))==null?void 0:J.key)==null?void 0:M.relatedInfo)==null?void 0:Ee.compId,c=(X=ct.value)==null?void 0:X.find(_e=>(_e==null?void 0:_e.id)===o);if(!c)return Fa.value=null;const u=(pe=s==null?void 0:s.任务关键词)==null?void 0:pe[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],y=(D=(F=(E=c==null?void 0:c.compData)==null?void 0:E.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:F.contents)==null?void 0:D.findIndex(_e=>(_e==null?void 0:_e.prop)===u),g=(Ue=(me=(_=(N=c==null?void 0:c.compData)==null?void 0:N.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:_.contents)==null?void 0:me.find(_e=>_e==null?void 0:_e.isMainKey))==null?void 0:Ue.prop,h=(We=(Fe=(it=c==null?void 0:c.compData)==null?void 0:it.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Fe.contents)==null?void 0:We[y];Fa.value={prop:u,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,r)},Bp=()=>{var n,r;console.log("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(r=(n=gt.value)==null?void 0:n.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Lo=()=>{var n,r,s,o;try{if(Mo.value!=="报告中心"||!((n=gt.value)!=null&&n.includes(ll.value)))return;const c=(r=ct.value)==null?void 0:r.find(h=>{var b;return((b=h==null?void 0:h.comp)==null?void 0:b.toUpperCase())==="FORM"});if(!c)return;const u={prop:"状态",value:"编制中"},y=(o=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:o.contents,g=y==null?void 0:y.find(h=>(h==null?void 0:h.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Kt.setLockingPage(gt.value)}catch(c){throw d.ElMessage.error(c),new Error(c)}},wl=e.ref([]),Ap=e.computed(()=>{var n,r;return(r=(n=qn.value)==null?void 0:n[gt.value])==null?void 0:r.filter(s=>{var o;return((o=s==null?void 0:s.key)==null?void 0:o.type)==="gridLayout"})});e.watch(()=>[Mo.value],()=>{ka.setSelectTitle([]),ka.setChooseTitle([])},{deep:!0});e.watch(()=>[Jt.value],async()=>{var o,c,u,y,g,h,b,w,I,L,J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We,_e,V,le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de;if(((o=Zt.value)==null?void 0:o.compData)===gt.value||((c=Jt.value)==null?void 0:c.length)===0)return;Lt.setContentLoading(!0);let n=new WeakMap;if((y=(u=(await d.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Dl.value})).data.result)==null?void 0:u.filter(S=>{var W,Oe;return((W=S==null?void 0:S.key)==null?void 0:W.pageKey)!=="menu"&&((Oe=S==null?void 0:S.key)==null?void 0:Oe.pageKey)!=="secret"}))==null||y.forEach(S=>{n[S.key.pageKey]?n[S.key.pageKey]=[...n[S.key.pageKey],S]:n[S.key.pageKey]=[S]}),ct.value=await Ae.getItemData(gt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,n),zo.value=!!((g=ct.value)!=null&&g.find(S=>(S==null?void 0:S.comp)==="")),Zt.value=(h=ct.value)==null?void 0:h.find(S=>(S==null?void 0:S.comp)===""),((b=Zt.value)==null?void 0:b.compData)===gt.value){let S=(w=gt.value)==null?void 0:w.split("/").map(W=>({value:W.trim()}));S=[...S,...Jt.value??[]]}else{let S=(L=(I=Zt.value)==null?void 0:I.compData)==null?void 0:L.split("/").map(W=>({value:W.trim(),condition:"parent"}));if(!(!S||(S==null?void 0:S.length)===0)){let W=await Ae.getItemData((J=Zt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,n);W=W==null?void 0:W.filter(j=>{var te,Te,Me;return Array.isArray(j==null?void 0:j.compData)&&((Me=(Te=(te=j==null?void 0:j.compData)==null?void 0:te.find(at=>(at==null?void 0:at.key)==="header"))==null?void 0:Te.contents)==null?void 0:Me.find(at=>(at==null?void 0:at.directiveLabel)==="#isMain"))});let Oe=(pe=(K=(X=(Ee=(M=W==null?void 0:W[0])==null?void 0:M.compData)==null?void 0:Ee.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(j=>(j==null?void 0:j.directiveLabel)==="#isMain"))==null?void 0:pe.prop,be=(N=(D=(F=(E=W==null?void 0:W[0])==null?void 0:E.compData)==null?void 0:F.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:D.contents)==null?void 0:N.findIndex(j=>(j==null?void 0:j.directiveLabel)==="#isMain"),ee=(it=(Ue=(me=(_=W==null?void 0:W[0])==null?void 0:_.compData)==null?void 0:me.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:Ue.contents)==null?void 0:it.map(j=>{var te;return(j==null?void 0:j.length)>1?j==null?void 0:j[be+1]:(te=j==null?void 0:j[0])==null?void 0:te[Oe]});if(ee=ee==null?void 0:ee.map(j=>({label:j,value:j})),(Fe=Jt.value)==null||Fe.length,((_e=(We=Jt.value)==null?void 0:We[0])==null?void 0:_e.value)!==""){let j=await Ae.getItemData(gt.value+"/"+((le=(V=Jt.value)==null?void 0:V[0])==null?void 0:le.value),sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,n);j||await Ae.newLoadingCutFirstConstruct(gt.value,gt.value+"/"+((ue=(ie=Jt.value)==null?void 0:ie[0])==null?void 0:ue.value)),j=await Ae.getItemData(gt.value+"/"+((ot=(Ye=Jt.value)==null?void 0:Ye[0])==null?void 0:ot.value),sessionStorage.getItem("systemKey"),"",!1,[],await ca.value),ct.value=j}}}ct.value=(Q=ct.value)==null?void 0:Q.filter(S=>(S==null?void 0:S.comp)!=="");let s="";if(!ct.value){let S=(we=(ye=(R=gt.value)==null?void 0:R.split("/"))==null?void 0:ye.filter((W,Oe)=>{var be,ee;return Oe!==((ee=(be=gt.value)==null?void 0:be.split("/"))==null?void 0:ee.length)-1}))==null?void 0:we.join("/");ct.value=await Ae.getItemData(S,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,n),s=(Ge=(je=gt.value)==null?void 0:je.split("/"))==null?void 0:Ge[((Je=($e=gt.value)==null?void 0:$e.split("/"))==null?void 0:Je.length)-1]}await Ha.setLogRecordAsync({type:"查询",data:ct.value},gt.value),ct.value=Ae.filterChildContent(ct.value),s!==""&&(ct.value=(de=ct.value)==null?void 0:de.map(S=>{var W;return S!=null&&S.isShow&&(S.compData=(W=S==null?void 0:S.compData)==null?void 0:W.map(Oe=>{var be,ee,j,te,Te;if((Oe==null?void 0:Oe.key)==="tableContents"){let Me=[],at="";at=(te=(j=(ee=(be=S==null?void 0:S.compData)==null?void 0:be.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:ee.contents)==null?void 0:j[0])==null?void 0:te.prop,Me=(Te=Oe.contents)==null?void 0:Te.filter(v=>(v==null?void 0:v[at])===s||(v==null?void 0:v[1])===s),Oe.contents=Me}return Oe})),S})),ct.value=await Ae.getDeepDiffItems(ct.value),Lt.setContentLoading(!1)},{deep:!0});const Np=(n,r)=>{let s="";const o=(c,u)=>{c=c==null?void 0:c.forEach(y=>{var g,h,b;if((y==null?void 0:y.title)===(u==null?void 0:u[0])){let w=u.slice(1);Array.isArray(y==null?void 0:y.childMenus)&&((g=y==null?void 0:y.childMenus)==null?void 0:g.length)===0||(w!=null&&w[0]&&(w==null?void 0:w.length)!==0?o(y==null?void 0:y.childMenus,w):s=(b=(h=y==null?void 0:y.childMenus)==null?void 0:h[0])==null?void 0:b.title)}})};return n!=null&&n.some(c=>{var u;return Array.isArray(c==null?void 0:c.childMenus)&&((u=c==null?void 0:c.childMenus)==null?void 0:u.length)>0})&&o(n,r),s};e.watch(()=>[gt.value,pp.value],async n=>{var u,y,g,h,b,w,I,L,J,M,Ee,X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We,_e,V,le,ie,ue,Ye,ot,Q,R,ye,we,je,$e,Je,Ge,de,S,W,Oe,be,ee,j,te,Te;if(!gt.value)return;Kt.setLockingPage(""),ct.value=[];let r=e.getCurrentInstance();(u=r==null?void 0:r.scope)==null||u.stop(),r=null,Gn.value=!1,$n.value=!0;const s=(y=n==null?void 0:n[0])!=null&&y.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let o=new WeakMap;if((b=(h=(await d.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Dl.value})).data.result)==null?void 0:h.filter(Me=>{var at,v;return((at=Me==null?void 0:Me.key)==null?void 0:at.pageKey)!=="menu"&&((v=Me==null?void 0:Me.key)==null?void 0:v.pageKey)!=="secret"}))==null||b.forEach(Me=>{o[Me.key.pageKey]?o[Me.key.pageKey]=[...o[Me.key.pageKey],Me]:o[Me.key.pageKey]=[Me]}),Xn.value=o,s){Lt.setContentLoading(!0),sessionStorage.setItem("pageKey",gt.value),ka.setSelectTitle([]),ct.value=await Ae.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,o),zo.value=!!((w=ct.value)!=null&&w.find(v=>(v==null?void 0:v.comp)==="")),Zt.value=(I=ct.value)==null?void 0:I.find(v=>(v==null?void 0:v.comp)==="");let Me=[];if(!((L=Zt.value)!=null&&L.compData)){let v=Np(vp.value,(J=gt.value)==null?void 0:J.split("/")),C=await Ae.getItemData(s+"/"+v,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,o);C!=null&&C.find(P=>(P==null?void 0:P.comp)==="")?Me=(Ee=(M=C==null?void 0:C.find(P=>(P==null?void 0:P.comp)===""))==null?void 0:M.compData)==null?void 0:Ee.split("/").map(P=>({value:P.trim(),condition:"parent"})):ka.setChooseTitle([])}if(((X=Zt.value)==null?void 0:X.compData)===gt.value){let v=(K=gt.value)==null?void 0:K.split("/").map(C=>({value:C.trim()}));v=[...v,...Jt.value??[]],ka.setSelectTitle(v)}else{let v=[],C=(E=(pe=Zt.value)==null?void 0:pe.compData)==null?void 0:E.split("/").map(x=>({value:x.trim(),condition:"parent"}));if(!C||(C==null?void 0:C.length)===0)C=Me;else{let x=await Ae.getItemData((F=Zt.value)==null?void 0:F.compData,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,o);x=x==null?void 0:x.filter(U=>{var $,H,De;return Array.isArray(U==null?void 0:U.compData)&&((De=(H=($=U==null?void 0:U.compData)==null?void 0:$.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:H.contents)==null?void 0:De.find(oe=>(oe==null?void 0:oe.directiveLabel)==="#isMain"))});let T=(Ue=(me=(_=(N=(D=x==null?void 0:x[0])==null?void 0:D.compData)==null?void 0:N.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:_.contents)==null?void 0:me.find(U=>(U==null?void 0:U.directiveLabel)==="#isMain"))==null?void 0:Ue.prop,ae=(_e=(We=(Fe=(it=x==null?void 0:x[0])==null?void 0:it.compData)==null?void 0:Fe.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:We.contents)==null?void 0:_e.findIndex(U=>(U==null?void 0:U.directiveLabel)==="#isMain"),z=(ue=(ie=(le=(V=x==null?void 0:x[0])==null?void 0:V.compData)==null?void 0:le.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:ie.contents)==null?void 0:ue.map(U=>{var $;return(U==null?void 0:U.length)>1?U==null?void 0:U[ae+1]:($=U==null?void 0:U[0])==null?void 0:$[T]});if(z=z==null?void 0:z.map(U=>({label:U,value:U})),((Ye=Jt.value)==null?void 0:Ye.length)===0&&ka.setChooseTitle([{value:"",condition:"child",options:z,parentContent:(ot=Zt.value)==null?void 0:ot.compData}]),((R=(Q=Jt.value)==null?void 0:Q[0])==null?void 0:R.value)!==""){let U=await Ae.getItemData(gt.value+"/"+((we=(ye=Jt.value)==null?void 0:ye[0])==null?void 0:we.value),sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,o);U||await Ae.newLoadingCutFirstConstruct(gt.value,gt.value+"/"+(($e=(je=Jt.value)==null?void 0:je[0])==null?void 0:$e.value)),U=await Ae.getItemData(gt.value+"/"+((Ge=(Je=Jt.value)==null?void 0:Je[0])==null?void 0:Ge.value),sessionStorage.getItem("systemKey"),"",!1,[],await ca.value),ct.value=U}}v=[...v,...C??[]],v=[...v,...Jt.value??[]];let P=(de=gt.value)==null?void 0:de.split("/").map(x=>({value:x.trim()})),Z=P==null?void 0:P.filter(x=>!(v!=null&&v.find(T=>(T==null?void 0:T.value)===(x==null?void 0:x.value))));v=[...v,...Z],ka.setSelectTitle(v)}ct.value=(S=ct.value)==null?void 0:S.filter(v=>(v==null?void 0:v.comp)!=="");let at="";if(!ct.value){let v=(Oe=(W=s==null?void 0:s.split("/"))==null?void 0:W.filter((C,P)=>{var Z;return P!==((Z=s==null?void 0:s.split("/"))==null?void 0:Z.length)-1}))==null?void 0:Oe.join("/");ct.value=await Ae.getItemData(v,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,o),at=(ee=s==null?void 0:s.split("/"))==null?void 0:ee[((be=s==null?void 0:s.split("/"))==null?void 0:be.length)-1]}await Ha.setLogRecordAsync({type:"查询",data:ct.value},gt.value),ct.value=Ae.filterChildContent(ct.value),at!==""&&(ct.value=(j=ct.value)==null?void 0:j.map(v=>{var C;return v!=null&&v.isShow&&(v.compData=(C=v==null?void 0:v.compData)==null?void 0:C.map(P=>{var Z,x,T,ae,z;if((P==null?void 0:P.key)==="tableContents"){let U=[],$="";$=(ae=(T=(x=(Z=v==null?void 0:v.compData)==null?void 0:Z.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:x.contents)==null?void 0:T[0])==null?void 0:ae.prop,U=(z=P.contents)==null?void 0:z.filter(H=>(H==null?void 0:H[$])===at||(H==null?void 0:H[1])===at),P.contents=U}return P})),v})),ct.value=await Ae.getDeepDiffItems(ct.value),await _p(ct.value),Lo(),Ip(s),wl.value=(te=ct.value)==null?void 0:te.map(v=>({label:v==null?void 0:v.name,value:v==null?void 0:v.id})),Kt.setExtraContents([]),ka.setSelectIndex(""),ka.setSelectMenu(""),Kt.setItemData(ct.value),Kt.setOriginalData(ct.value),Kt.setCurStructureCompIds((Te=ct.value)==null?void 0:Te.map(v=>v==null?void 0:v.id)),Kt.setRefreshCurStructure(!1),Lt.setChildMenu(""),Lt.setContentLoading(!1),Kt.setTableLoading(!1),$n.value=!1}else ct.value=[],$n.value=!1;e.nextTick(()=>{hn.value=hn.value++,Gn.value=!0})},{immediate:!0});e.watch(()=>Wl.value,async()=>{var n,r,s,o,c,u,y,g,h,b,w,I,L,J,M,Ee,X;if(Wl.value){let K=new WeakMap;(r=(n=(await d.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Dl.value})).data.result)==null?void 0:n.filter(_=>{var me,Ue;return((me=_==null?void 0:_.key)==null?void 0:me.pageKey)!=="menu"&&((Ue=_==null?void 0:_.key)==null?void 0:Ue.pageKey)!=="secret"}))==null||r.forEach(_=>{K[_.key.pageKey]?K[_.key.pageKey]=[...K[_.key.pageKey],_]:K[_.key.pageKey]=[_]});let E=gt.value;(s=Zt.value)!=null&&s.compData&&((o=Zt.value)==null?void 0:o.compData)!==gt.value&&(E=E+"/"+((u=(c=Jt.value)==null?void 0:c[0])==null?void 0:u.value));const F=(g=(y=gt.value)==null?void 0:y[0])!=null&&g.startsWith("/")?(b=(h=gt.value)==null?void 0:h[0])==null?void 0:b.substring(1):(w=gt.value)==null?void 0:w[0];let D=await Ae.getItemData(E,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value);ct.value=Ae.filterChildContent(ct.value);let N="";if(!ct.value){let _=(L=(I=F==null?void 0:F.split("/"))==null?void 0:I.filter((me,Ue)=>{var it;return Ue!==((it=F==null?void 0:F.split("/"))==null?void 0:it.length)-1}))==null?void 0:L.join("/");ct.value=await Ae.getItemData(_,sessionStorage.getItem("systemKey"),"",!1,[],await ca.value,K),N=(M=F==null?void 0:F.split("/"))==null?void 0:M[((J=F==null?void 0:F.split("/"))==null?void 0:J.length)-1]}N!==""&&(ct.value=(Ee=ct.value)==null?void 0:Ee.map(_=>{var me;return _!=null&&_.isShow&&(_.compData=(me=_==null?void 0:_.compData)==null?void 0:me.map(Ue=>{var it,Fe,We,_e,V;if((Ue==null?void 0:Ue.key)==="tableContents"){let le=[],ie="";ie=(_e=(We=(Fe=(it=_==null?void 0:_.compData)==null?void 0:it.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Fe.contents)==null?void 0:We[0])==null?void 0:_e.prop,le=(V=Ue.contents)==null?void 0:V.filter(ue=>(ue==null?void 0:ue[ie])===N||(ue==null?void 0:ue[1])===N),Ue.contents=le}return Ue})),_})),ct.value=(X=ct.value)==null?void 0:X.filter(_=>(_==null?void 0:_.comp)!==""),ct.value=await Ae.getDeepDiffItems(D),Kt.setFreshContent(!1),Lo()}},{deep:!0});const Vp=async()=>{var c,u,y,g,h,b,w,I;Lt.setLinkMenuInfo(null);const n=await d.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Mn.value)==null?void 0:c.account)||((u=Mn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await d.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((y=Mn.value)==null?void 0:y.account)||((g=Mn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(b=(h=n==null?void 0:n.data)==null?void 0:h.result)==null?void 0:b.map(L=>L==null?void 0:L.id);const o=(I=(w=r==null?void 0:r.data)==null?void 0:w.result)==null?void 0:I.map(L=>L==null?void 0:L.id);s=[...d.cloneDeep(s),...o],(s==null?void 0:s.length)>0&&(s!=null&&s.every(L=>L!==null&&L))&&(await d.batchDeleteInsofDataApi({ids:s}),await Ha.setLogRecordAsync({type:"删除",data:s},gt.value)),Lt.setActiveMenuPath(dp.value),ct.value=null,Kt.setRouteToChildPath(""),Lt.setChildMenu("")},Op=n=>new RegExp("button","i").test(n),Mp=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Po=n=>{if(Mp(n)){const r=n==null?void 0:n.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Lt.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},$o=n=>{var r;Fa.value&&(Fa.value={...Fa.value,mainKeyPropValue:n==null?void 0:n[(r=Fa.value)==null?void 0:r.mainKeyProp]})},zp=n=>{Ro.value=n},pn=e.reactive({index:0,comp:null}),Fp=e.computed(()=>{var n;return(n=ct.value)==null?void 0:n.map((r,s)=>({id:r.id,name:r.name,status:Rp(r,s)}))}),Ko=(n,r)=>{var h,b,w,I,L;const s=r?n:n-2,o=(h=ct.value)==null?void 0:h[s],c=(w=(b=o==null?void 0:o.compData)==null?void 0:b.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:w.contents,u=c==null?void 0:c.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),y=u===-1?0:u,g=(L=(I=o==null?void 0:o.compData)==null?void 0:I.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:L.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[y+1]),length:(g==null?void 0:g.length)||0}},Rp=(n,r)=>{var o;let s="process";if(((o=n==null?void 0:n.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c,length:u}=Ko(r,!0);pn.index===r?s="process":u===0?s="wait":s=c?"success":"error"}return s},jo=n=>{var s,o,c,u,y;const r=n+1;if(r>1&&((c=(o=(s=ct.value)==null?void 0:s[n])==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:g}=Ko(r);g?(pn.index=r,pn.comp=(u=ct.value)==null?void 0:u[n]):d.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else pn.index=r,pn.comp=(y=ct.value)==null?void 0:y[n]},Cl=e.computed(()=>{var n,r;return(r=(n=Fo.value)==null?void 0:n[0])==null?void 0:r.isStepLayout});e.watch(()=>Cl.value,n=>{n&&jo(0)},{immediate:!0});const Lp={class:"layout"},Pp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:r}){const s=r,o=n;e.onMounted(async()=>{});const c=e.computed(()=>d.cloneDeep(o==null?void 0:o.itemData)||[]),u=e.computed(()=>{var w;const b=(w=c==null?void 0:c.value)==null?void 0:w.find(I=>{const{key:L}=I;return L==="baseConfig"});return b==null?void 0:b.contents}),y=e.computed(()=>{var w;const b=(w=c==null?void 0:c.value)==null?void 0:w.find(I=>{const{key:L}=I;return L==="children"});return b==null?void 0:b.contents}),g=e.computed(()=>{let b=d.cloneDeep(y.value)||[];const w=b.length;let I=0;const L=[];if(b=b.map(J=>{const M=J.span;return M?(J.span=Number(M),I=I+J.span):L.push(J),J}),I<24){const J=Math.floor((24-I)/w);L.forEach(M=>{M.span=J})}return b}),h=b=>{s("rowClick",b)};return(b,w)=>{var J;const I=e.resolveComponent("el-col"),L=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Lp,[e.createVNode(L,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(M,Ee)=>(e.openBlock(),e.createBlock(I,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var X;return[e.unref(Gn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Yn)(M.comp)),{key:e.unref(hn),compName:M.name,index:(M==null?void 0:M.id)??Ee,height:(X=u.value)==null?void 0:X.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Qn),onContentChange:e.unref(Zn),onPageChange:e.unref(el),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),$p=Pt._export_sfc(Pp,[["__scopeId","data-v-ab9a36ed"]]),Kp={class:"layout-operate"},jp={class:"layout-module"},Up={class:"collapse-title-item"},Wp={class:"collapse-title"},Hp={class:"icon-content"},qp=["onClick"],Gp={class:"comp-child"},Xp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const s=n,o=r;e.onMounted(()=>{Ee()});const c=e.ref({}),u=e.ref({}),y=e.ref([]),g=D=>[{label:"高度",prop:"height",type:"input",value:D==null?void 0:D.height}],h=D=>{u.value=D,o("change",F(),!0)},b=e.ref([]),w=e.ref([]),I=D=>[{label:"占比",prop:"span",type:"input",value:D==null?void 0:D.span}],L=e.computed(()=>{const D=s==null?void 0:s.itemContents;return d.cloneDeep(D)}),J=e.computed(()=>{const D=L==null?void 0:L.value,N=D==null?void 0:D.find(_=>{const{key:me}=_;return me==="baseConfig"});return N==null?void 0:N.contents}),M=e.computed(()=>{const D=L==null?void 0:L.value,N=D==null?void 0:D.find(_=>{const{key:me}=_;return me==="children"});return N==null?void 0:N.contents}),Ee=()=>{var D;c.value=L.value||{},b.value=(M==null?void 0:M.value)||[],y.value=g(),y.value=(D=y.value)==null?void 0:D.map(N=>{var me;const{prop:_}=N;return N.value=(me=J.value)==null?void 0:me[_],N})};e.watch(()=>{var D;return(D=M==null?void 0:M.value)==null?void 0:D.length},()=>{var D;b.value=(M==null?void 0:M.value)||[],w.value=(D=M.value)==null?void 0:D.map(N=>I(N))},{immediate:!0});const X=(D,N)=>{const _=d.cloneDeep(M==null?void 0:M.value);_[N].span=D.span,b.value=_,o("change",F(),!0)},K=D=>on(D),pe=(D,N,_)=>{if(!D)return;const me=d.cloneDeep(M==null?void 0:M.value);me[_]&&(me[_].compData=D,b.value=me,o("change",F(),!0))},E=D=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let N=d.cloneDeep(M==null?void 0:M.value);N=N==null?void 0:N.filter((_,me)=>D!==me),b.value=N,o("change",F(),!0),d.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:b==null?void 0:b.value}]});return(D,N)=>{const _=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Kp,[e.createElementVNode("div",jp,[N[1]||(N[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(zt.ssForm,{rowContents:y.value,isEnableWrap:!0,onChange:N[0]||(N[0]=me=>h(me))},null,8,["rowContents"])])]),e.createVNode(Do.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:me,index:Ue})=>[e.createElementVNode("div",Up,[e.createElementVNode("div",Wp,e.toDisplayString(me.name),1),e.createElementVNode("div",Hp,[e.createElementVNode("div",{onClick:e.withModifiers(it=>E(Ue),["stop"]),class:"icon-content"},[e.createVNode(_,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qp)])])]),content:e.withCtx(({item:me,index:Ue})=>[e.createElementVNode("div",Gp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(zt.ssForm,{rowContents:w.value[Ue],key:Ue,isEnableWrap:!0,onChange:it=>X(it,Ue)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(me.comp+"Operate")),{itemContents:me==null?void 0:me.compData,originalItemContents:me.compData,onChange:it=>pe(it,me,Ue)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Yp=Pt._export_sfc(Xp,[["__scopeId","data-v-ba05456e"]]),Jp=typeof window<"u";var Xl;Jp&&((Xl=window==null?void 0:window.navigator)!=null&&Xl.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function fa(n){return n==null}function Uo(){}const Qp=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Qp)));function Zp(){const n=new Map;return{on(r,s){const o=n.get(r);o!=null&&o.add(s)||n.set(r,new Set([s]))},off(r,s){const o=n.get(r);o&&o.delete(s)},clear(r){const s=n.get(r);s&&s.clear()},clearAll(){n.clear()},emit(r,...s){const o=n.get(r);o&&o.forEach(c=>{c(...s)})}}}function Yl(n,r=16){if(typeof n!="function")return Uo;const s=(...u)=>{n(...u)};if(r<=0)return Wo(s);let o=0,c;return function(...u){const y=Date.now(),g=y-o;clearTimeout(c),g>=r?(o=y,s(...u)):c=setTimeout(()=>{o=Date.now(),s(...u)},Math.max(0,r-g))}}function ed(n,r=100){if(typeof n!="function")return Uo;const s=(...c)=>{n(...c)};if(r<=0)return Wo(s);let o;return function(...c){clearTimeout(o),o=setTimeout(()=>{s(...c)},r)}}function Wo(n){if(typeof n!="function")return n;let r=!1,s,o;return function(...c){return s=c,r||(r=!0,o=Promise.resolve().then(()=>(r=!1,o=void 0,n(...s)))),o}}const En=new Set,Ho=new WeakMap;function td(){En.forEach(n=>{n(...Ho.get(n))}),En.clear()}function na(n,...r){if(typeof n!="function")return n;Ho.set(n,r),!En.has(n)&&(En.add(n),En.size===1&&Promise.resolve().then(td))}const qo=Symbol("LAYOUT_KEY"),Go=Symbol("EMITTER_KEY");function ad(n){let r=0,s;for(let o=0,c=n.length;o<c;o++)s=n[o].y+n[o].h,s>r&&(r=s);return r}function hl(n){const r=Array(n.length);for(let s=0,o=n.length;s<o;s++)r[s]=nd(n[s]);return r}function nd(n){return{...n}}function Xo(n,r){return!(n===r||n.x+n.w<=r.x||n.x>=r.x+r.w||n.y+n.h<=r.y||n.y>=r.y+r.h)}function un(n,r,s){const o=Jo(n),c=Qo(n),u=Array(n.length);for(let y=0,g=c.length;y<g;y++){let h=c[y];h.static||(h=ld(o,h,r,s),o.push(h)),u[n.findIndex(b=>b.i===h.i)]=h,h.moved=!1}return u}function ld(n,r,s,o){if(s)for(;r.y>0&&!_n(n,r);)r.y--;else if(o){const u=o[r.i].y;for(;r.y>u&&!_n(n,r);)r.y--}let c;for(;c=_n(n,r);)r.y=c.y+c.h;return r}function od(n,r){const s=Jo(n);for(let o=0,c=n.length;o<c;o++){const u=n[o];if(u.x+u.w>r.cols&&(u.x=r.cols-u.w),u.x<0&&(u.x=0,u.w=r.cols),!u.static)s.push(u);else for(;_n(s,u);)u.y++}return n}function Jl(n,r){for(let s=0,o=n.length;s<o;s++)if(n[s].i===r)return n[s]}function _n(n,r){for(let s=0,o=n.length;s<o;s++)if(Xo(n[s],r))return n[s]}function Yo(n,r){return n.filter(s=>Xo(s,r))}function Jo(n){return n.filter(r=>r.static)}function vl(n,r,s,o,c=!1,u=!1){if(r.static)return n;const y=r.x,g=r.y,h=o&&r.y>o;typeof s=="number"&&(r.x=s),typeof o=="number"&&(r.y=o),r.moved=!0;let b=Qo(n);h&&(b=b.reverse());const w=Yo(b,r);if(u&&w.length)return r.x=y,r.y=g,r.moved=!1,n;for(let I=0,L=w.length;I<L;I++){const J=w[I];J.moved||r.y>J.y&&r.y-J.y>J.h/4||(J.static?n=Ql(n,J,r,c):n=Ql(n,r,J,c))}return n}function Ql(n,r,s,o){if(o){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(r.y-s.h,0),!_n(n,c))return vl(n,s,void 0,c.y,!1)}return vl(n,s,void 0,s.y+1,!1)}function rd(n,r,s,o){const c="translate3d("+r+"px,"+n+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:o+"px",position:"absolute"}}function id(n,r,s,o){const c="translate3d("+r*-1+"px,"+n+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:o+"px",position:"absolute"}}function sd(n,r,s,o){return{top:n+"px",left:r+"px",width:s+"px",height:o+"px",position:"absolute"}}function cd(n,r,s,o){return{top:n+"px",right:r+"px",width:s+"px",height:o+"px",position:"absolute"}}function Qo(n){return Array.from(n).sort(function(r,s){return r.y===s.y&&r.x===s.x?0:r.y>s.y||r.y===s.y&&r.x>s.x?1:-1})}function ud(n,r){r=r||"Layout";const s=["x","y","w","h"],o=[];if(!Array.isArray(n))throw new Error(r+" must be an array!");for(let c=0,u=n.length;c<u;c++){const y=n[c];for(let g=0;g<s.length;g++)if(typeof y[s[g]]!="number")throw new Error("VueGridLayout: "+r+"["+c+"]."+s[g]+" must be a number!");if(y.i===void 0||y.i===null)throw new Error("VueGridLayout: "+r+"["+c+"].i cannot be null!");if(typeof y.i!="number"&&typeof y.i!="string")throw new Error("VueGridLayout: "+r+"["+c+"].i must be a string or number!");if(o.indexOf(y.i)>=0)throw new Error("VueGridLayout: "+r+"["+c+"].i must be unique!");if(o.push(y.i),y.static!==void 0&&typeof y.static!="boolean")throw new Error("VueGridLayout: "+r+"["+c+"].static must be a boolean!")}}function pd(n,r="vgl"){const s=()=>`${r}-${n}`;return{b:s,be:o=>`${s()}__${o}`,bm:o=>`${s()}--${o}`,bem:(o,c)=>`${s()}__${o}--${c}`}}function Zl(n){return dd(n)}function dd(n){var r;const s=((r=n.target)==null?void 0:r.offsetParent)||document.body,o=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=n.clientX+s.scrollLeft-o.left,u=n.clientY+s.scrollTop-o.top;return{x:c,y:u}}function eo(n,r,s,o){return fd(n)?{deltaX:s-n,deltaY:o-r,lastX:n,lastY:r,x:s,y:o}:{deltaX:0,deltaY:0,lastX:s,lastY:o,x:s,y:o}}function fd(n){return typeof n=="number"&&!Number.isNaN(n)}function hd(n,r){const s=er(n);let o=s[0];for(let c=1,u=s.length;c<u;c++){const y=s[c];r>n[y]&&(o=y)}return o}function Zo(n,r){if(!r[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return r[n]}function vd(n,r,s,o,c,u,y){if(r[o])return hl(r[o]);let g=n;const h=er(s),b=h.slice(h.indexOf(o));for(let w=0,I=b.length;w<I;w++){const L=b[w];if(r[L]){g=r[L];break}}return g=hl(g||[]),un(od(g,{cols:u}),y)}function er(n){return Object.keys(n).sort((r,s)=>n[r]-n[s])}let gd="auto";function md(){return typeof document<"u"}function to(){return md()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):gd}var wn={exports:{}},yd=wn.exports,ao;function bd(){return ao||(ao=1,function(n,r){(function(s,o){n.exports=o()})(yd,function(){function s(a,t){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);t&&(i=i.filter(function(p){return Object.getOwnPropertyDescriptor(a,p).enumerable})),l.push.apply(l,i)}return l}function o(a){for(var t=1;t<arguments.length;t++){var l=arguments[t]!=null?arguments[t]:{};t%2?s(Object(l),!0).forEach(function(i){h(a,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):s(Object(l)).forEach(function(i){Object.defineProperty(a,i,Object.getOwnPropertyDescriptor(l,i))})}return a}function c(a){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(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function y(a,t){for(var l=0;l<t.length;l++){var i=t[l];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,Ee(i.key),i)}}function g(a,t,l){return t&&y(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function h(a,t,l){return(t=Ee(t))in a?Object.defineProperty(a,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[t]=l,a}function b(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&I(a,t)}function w(a){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(a)}function I(a,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,i){return l.__proto__=i,l},I(a,t)}function L(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function J(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var l,i=w(a);if(t){var p=w(this).constructor;l=Reflect.construct(i,arguments,p)}else l=i.apply(this,arguments);return function(f,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L(f)}(this,l)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,l){var i=function(f,m){for(;!Object.prototype.hasOwnProperty.call(f,m)&&(f=w(f))!==null;);return f}(a,t);if(i){var p=Object.getOwnPropertyDescriptor(i,t);return p.get?p.get.call(arguments.length<3?a:l):p.value}},M.apply(this,arguments)}function Ee(a){var t=function(l,i){if(typeof l!="object"||l===null)return l;var p=l[Symbol.toPrimitive];if(p!==void 0){var f=p.call(l,i);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,pe=void 0;function E(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),pe=a}function F(a){return X(a)?a:(a.ownerDocument||a).defaultView||pe.window}typeof window<"u"&&window&&E(window);var D=function(a){return!!a&&c(a)==="object"},N=function(a){return typeof a=="function"},_={window:function(a){return a===pe||X(a)},docFrag:function(a){return D(a)&&a.nodeType===11},object:D,func:N,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||c(a)!=="object")return!1;var t=F(a)||pe;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return D(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return D(a)&&a.length!==void 0&&N(a.splice)}};function me(a){var t=a.interaction;if(t.prepared.name==="drag"){var l=t.prepared.axis;l==="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):l==="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 Ue(a){var t=a.iEvent,l=a.interaction;if(l.prepared.name==="drag"){var i=l.prepared.axis;if(i==="x"||i==="y"){var p=i==="x"?"y":"x";t.page[p]=l.coords.start.page[p],t.client[p]=l.coords.start.client[p],t.delta[p]=0}}}var it={id:"actions/drag",install:function(a){var t=a.actions,l=a.Interactable,i=a.defaults;l.prototype.draggable=it.draggable,t.map.drag=it,t.methodDict.drag="draggable",i.actions.drag=it.defaults},listeners:{"interactions:before-action-move":me,"interactions:action-resume":me,"interactions:action-move":Ue,"auto-start:check":function(a){var t=a.interaction,l=a.interactable,i=a.buttons,p=l.options.drag;if(p&&p.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&l.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:p.lockAxis==="start"?p.startAxis:p.lockAxis},!1}},draggable:function(a){return _.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):_.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:me,move:Ue,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Fe=it,We={init:function(a){var t=a;We.document=t.document,We.DocumentFragment=t.DocumentFragment||_e,We.SVGElement=t.SVGElement||_e,We.SVGSVGElement=t.SVGSVGElement||_e,We.SVGElementInstance=t.SVGElementInstance||_e,We.Element=t.Element||_e,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||_e,We.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function _e(){}var V=We,le={init:function(a){var t=V.Element,l=a.navigator||{};le.supportsTouch="ontouchstart"in a||_.func(a.DocumentTouch)&&V.document instanceof a.DocumentTouch,le.supportsPointerEvent=l.pointerEnabled!==!1&&!!V.PointerEvent,le.isIOS=/iP(hone|od|ad)/.test(l.platform),le.isIOS7=/iP(hone|od|ad)/.test(l.platform)&&/OS 7[^\d]/.test(l.appVersion),le.isIe9=/MSIE 9/.test(l.userAgent),le.isOperaMobile=l.appName==="Opera"&&le.supportsTouch&&/Presto/.test(l.userAgent),le.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",le.pEventTypes=le.supportsPointerEvent?V.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,le.wheelEvent=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ie=le;function ue(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ye(a,t){for(;_.element(a);){if(Q(a,t))return a;a=ot(a)}return null}function ot(a){var t=a.parentNode;if(_.docFrag(t)){for(;(t=t.host)&&_.docFrag(t););return t}return t}function Q(a,t){return pe!==K&&(t=t.replace(/\/deep\//g," ")),a[ie.prefixedMatchesSelector](t)}var R=function(a){return a.parentNode||a.host};function ye(a,t){for(var l,i=[],p=a;(l=R(p))&&p!==t&&l!==p.ownerDocument;)i.unshift(p),p=l;return i}function we(a,t,l){for(;_.element(a);){if(Q(a,t))return!0;if((a=ot(a))===l)return Q(a,t)}return!1}function je(a){return a.correspondingUseElement||a}function $e(a){var t=a instanceof V.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Je(a){var t,l=$e(a);if(!ie.isIOS7&&l){var i={x:(t=(t=F(a))||pe).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};l.left+=i.x,l.right+=i.x,l.top+=i.y,l.bottom+=i.y}return l}function Ge(a){for(var t=[];a;)t.push(a),a=ot(a);return t}function de(a){return!!_.string(a)&&(V.document.querySelector(a),!0)}function S(a,t){for(var l in t)a[l]=t[l];return a}function W(a,t,l){return a==="parent"?ot(l):a==="self"?t.getRect(l):Ye(l,a)}function Oe(a,t,l,i){var p=a;return _.string(p)?p=W(p,t,l):_.func(p)&&(p=p.apply(void 0,i)),_.element(p)&&(p=Je(p)),p}function be(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function ee(a){return!a||"x"in a&&"y"in a||((a=S({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function j(a,t,l){a.left&&(t.left+=l.x),a.right&&(t.right+=l.x),a.top&&(t.top+=l.y),a.bottom&&(t.bottom+=l.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function te(a,t,l){var i=l&&a.options[l];return be(Oe(i&&i.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Te(a,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(B){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},_.string(a)&&a.search(" ")!==-1&&(a=Me(a)),_.array(a))return a.forEach(function(B){return Te(B,t,l,i)}),i;if(_.object(a)&&(t=a,a=""),_.func(t)&&l(a))i[a]=i[a]||[],i[a].push(t);else if(_.array(t))for(var p=0,f=t;p<f.length;p++){var m=f[p];Te(a,m,l,i)}else if(_.object(t))for(var k in t)Te(Me(k).map(function(B){return"".concat(a).concat(B)}),t[k],l,i);return i}function Me(a){return a.trim().split(/ +/)}var at=function(a,t){return Math.sqrt(a*a+t*t)},v=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var l=function(p){if(v.some(function(f){return p.indexOf(f)===0}))return 1;typeof a[p]!="function"&&p!=="__set"&&Object.defineProperty(a,p,{get:function(){return p in a.__set?a.__set[p]:a.__set[p]=t[p]},set:function(f){a.__set[p]=f},configurable:!0})};for(var i in t)l(i);return a}function P(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function Z(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function x(a){return a instanceof V.Event||a instanceof V.Touch}function T(a,t,l){return a=a||"page",(l=l||{}).x=t[a+"X"],l.y=t[a+"Y"],l}function ae(a,t){return t=t||{x:0,y:0},ie.isOperaMobile&&x(a)?(T("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):T("page",a,t),t}function z(a){return _.number(a.pointerId)?a.pointerId:a.identifier}function U(a,t,l){var i=t.length>1?H(t):t[0];ae(i,a.page),function(p,f){f=f||{},ie.isOperaMobile&&x(p)?T("screen",p,f):T("client",p,f)}(i,a.client),a.timeStamp=l}function $(a){var t=[];return _.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function H(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},l=0;l<a.length;l++){var i=a[l];for(var p in t)t[p]+=i[p]}for(var f in t)t[f]/=a.length;return t}function De(a){if(!a.length)return null;var t=$(a),l=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),p=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:l,y:i,left:l,top:i,right:p,bottom:f,width:p-l,height:f-i}}function oe(a,t){var l=t+"X",i=t+"Y",p=$(a),f=p[0][l]-p[1][l],m=p[0][i]-p[1][i];return at(f,m)}function Y(a,t){var l=t+"X",i=t+"Y",p=$(a),f=p[1][l]-p[0][l],m=p[1][i]-p[0][i];return 180*Math.atan2(m,f)/Math.PI}function re(a){return _.string(a.pointerType)?a.pointerType:_.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof V.Touch?"touch":"mouse"}function se(a){var t=_.func(a.composedPath)?a.composedPath():a.path;return[je(t?t[0]:a.target),je(a.currentTarget)]}var xe=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(xe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Se=function(a,t){for(var l=0;l<t.length;l++){var i=t[l];a.push(i)}return a},Ie=function(a){return Se([],a)},q=function(a,t){for(var l=0;l<a.length;l++)if(t(a[l],l,a))return l;return-1},Ve=function(a,t){return a[q(a,t)]},ge=function(a){b(l,a);var t=J(l);function l(i,p,f){var m;u(this,l),(m=t.call(this,p._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=f==="dragleave"?i.prev:i.cur,B=k.element,G=k.dropzone;return m.type=f,m.target=B,m.currentTarget=B,m.dropzone=G,m.dragEvent=p,m.relatedTarget=p.target,m.draggable=p.interactable,m.timeStamp=p.timeStamp,m}return g(l,[{key:"reject",value:function(){var i=this,p=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&p.cur.dropzone===this.dropzone&&p.cur.element===this.target)if(p.prev.dropzone=this.dropzone,p.prev.element=this.target,p.rejected=!0,p.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=p.activeDrops,m=q(f,function(B){var G=B.dropzone,O=B.element;return G===i.dropzone&&O===i.target});p.activeDrops.splice(m,1);var k=new l(p,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new l(p,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),l}(xe);function Ke(a,t){for(var l=0,i=a.slice();l<i.length;l++){var p=i[l],f=p.dropzone,m=p.element;t.dropzone=f,t.target=m,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function rt(a,t){for(var l=function(f,m){for(var k=[],B=0,G=f.interactables.list;B<G.length;B++){var O=G[B];if(O.options.drop.enabled){var ce=O.options.drop.accept;if(!(_.element(ce)&&ce!==m||_.string(ce)&&!Q(m,ce)||_.func(ce)&&!ce({dropzone:O,draggableElement:m})))for(var Ne=0,Xe=O.getAllElements();Ne<Xe.length;Ne++){var qe=Xe[Ne];qe!==m&&k.push({dropzone:O,element:qe,rect:O.getRect(qe)})}}}return k}(a,t),i=0;i<l.length;i++){var p=l[i];p.rect=p.dropzone.getRect(p.element)}return l}function He(a,t,l){for(var i=a.dropState,p=a.interactable,f=a.element,m=[],k=0,B=i.activeDrops;k<B.length;k++){var G=B[k],O=G.dropzone,ce=G.element,Ne=G.rect,Xe=O.dropCheck(t,l,p,f,ce,Ne);m.push(Xe?ce:null)}var qe=function(tt){for(var dt,ut,mt,Et=[],Nt=0;Nt<tt.length;Nt++){var xt=tt[Nt],_t=tt[dt];if(xt&&Nt!==dt)if(_t){var aa=R(xt),Wt=R(_t);if(aa!==xt.ownerDocument)if(Wt!==xt.ownerDocument)if(aa!==Wt){Et=Et.length?Et:ye(_t);var da=void 0;if(_t instanceof V.HTMLElement&&xt instanceof V.SVGElement&&!(xt instanceof V.SVGSVGElement)){if(xt===Wt)continue;da=xt.ownerSVGElement}else da=xt;for(var Ea=ye(da,_t.ownerDocument),Oa=0;Ea[Oa]&&Ea[Oa]===Et[Oa];)Oa++;var On=[Ea[Oa-1],Ea[Oa],Et[Oa]];if(On[0])for(var bn=On[0].lastChild;bn;){if(bn===On[1]){dt=Nt,Et=Ea;break}if(bn===On[2])break;bn=bn.previousSibling}}else mt=_t,(parseInt(F(ut=xt).getComputedStyle(ut).zIndex,10)||0)>=(parseInt(F(mt).getComputedStyle(mt).zIndex,10)||0)&&(dt=Nt);else dt=Nt}else dt=Nt}return dt}(m);return i.activeDrops[qe]||null}function lt(a,t,l){var i=a.dropState,p={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return l.type==="dragstart"&&(p.activate=new ge(i,l,"dropactivate"),p.activate.target=null,p.activate.dropzone=null),l.type==="dragend"&&(p.deactivate=new ge(i,l,"dropdeactivate"),p.deactivate.target=null,p.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(p.leave=new ge(i,l,"dragleave"),l.dragLeave=p.leave.target=i.prev.element,l.prevDropzone=p.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(p.enter=new ge(i,l,"dragenter"),l.dragEnter=i.cur.element,l.dropzone=i.cur.dropzone)),l.type==="dragend"&&i.cur.dropzone&&(p.drop=new ge(i,l,"drop"),l.dropzone=i.cur.dropzone,l.relatedTarget=i.cur.element),l.type==="dragmove"&&i.cur.dropzone&&(p.move=new ge(i,l,"dropmove"),l.dropzone=i.cur.dropzone)),p}function Pe(a,t){var l=a.dropState,i=l.activeDrops,p=l.cur,f=l.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&p.dropzone.fire(t.enter),t.move&&p.dropzone.fire(t.move),t.drop&&p.dropzone.fire(t.drop),t.deactivate&&Ke(i,t.deactivate),l.prev.dropzone=p.dropzone,l.prev.element=p.element}function ft(a,t){var l=a.interaction,i=a.iEvent,p=a.event;if(i.type==="dragmove"||i.type==="dragend"){var f=l.dropState;t.dynamicDrop&&(f.activeDrops=rt(t,l.element));var m=i,k=He(l,m,p);f.rejected=f.rejected&&!!k&&k.dropzone===f.cur.dropzone&&k.element===f.cur.element,f.cur.dropzone=k&&k.dropzone,f.cur.element=k&&k.element,f.events=lt(l,0,m)}}var et={id:"actions/drop",install:function(a){var t=a.actions,l=a.interactStatic,i=a.Interactable,p=a.defaults;a.usePlugin(Fe),i.prototype.dropzone=function(f){return function(m,k){if(_.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var B=Te(k.listeners),G=Object.keys(B).reduce(function(ce,Ne){return ce[/^(enter|leave)/.test(Ne)?"drag".concat(Ne):/^(activate|deactivate|move)/.test(Ne)?"drop".concat(Ne):Ne]=B[Ne],ce},{}),O=m.options.drop.listeners;O&&m.off(O),m.on(G),m.options.drop.listeners=G}return _.func(k.ondrop)&&m.on("drop",k.ondrop),_.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),_.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),_.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),_.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),_.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:_.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return _.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,f)},i.prototype.dropCheck=function(f,m,k,B,G,O){return function(ce,Ne,Xe,qe,tt,dt,ut){var mt=!1;if(!(ut=ut||ce.getRect(dt)))return!!ce.options.drop.checker&&ce.options.drop.checker(Ne,Xe,mt,ce,dt,qe,tt);var Et=ce.options.drop.overlap;if(Et==="pointer"){var Nt=te(qe,tt,"drag"),xt=ae(Ne);xt.x+=Nt.x,xt.y+=Nt.y;var _t=xt.x>ut.left&&xt.x<ut.right,aa=xt.y>ut.top&&xt.y<ut.bottom;mt=_t&&aa}var Wt=qe.getRect(tt);if(Wt&&Et==="center"){var da=Wt.left+Wt.width/2,Ea=Wt.top+Wt.height/2;mt=da>=ut.left&&da<=ut.right&&Ea>=ut.top&&Ea<=ut.bottom}return Wt&&_.number(Et)&&(mt=Math.max(0,Math.min(ut.right,Wt.right)-Math.max(ut.left,Wt.left))*Math.max(0,Math.min(ut.bottom,Wt.bottom)-Math.max(ut.top,Wt.top))/(Wt.width*Wt.height)>=Et),ce.options.drop.checker&&(mt=ce.options.drop.checker(Ne,Xe,mt,ce,dt,qe,tt)),mt}(this,f,m,k,B,G,O)},l.dynamicDrop=function(f){return _.bool(f)?(a.dynamicDrop=f,l):a.dynamicDrop},S(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,p.actions.drop=et.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var l=a.interaction,i=(a.event,a.iEvent);if(l.prepared.name==="drag"){var p=l.dropState;p.activeDrops=[],p.events={},p.activeDrops=rt(t,l.element),p.events=lt(l,0,i),p.events.activate&&(Ke(p.activeDrops,p.events.activate),t.fire("actions/drop:start",{interaction:l,dragEvent:i}))}},"interactions:action-move":ft,"interactions:after-action-move":function(a,t){var l=a.interaction,i=a.iEvent;if(l.prepared.name==="drag"){var p=l.dropState;Pe(l,p.events),t.fire("actions/drop:move",{interaction:l,dragEvent:i}),p.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var l=a.interaction,i=a.iEvent;ft(a,t),Pe(l,l.dropState.events),t.fire("actions/drop:end",{interaction:l,dragEvent:i})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var l=t.dropState;l&&(l.activeDrops=null,l.events=null,l.cur.dropzone=null,l.cur.element=null,l.prev.dropzone=null,l.prev.element=null,l.rejected=!1)}}},getActiveDrops:rt,getDrop:He,getDropEvents:lt,fireDropEvents:Pe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ze=et;function ne(a){var t=a.interaction,l=a.iEvent,i=a.phase;if(t.prepared.name==="gesture"){var p=t.pointers.map(function(G){return G.pointer}),f=i==="start",m=i==="end",k=t.interactable.options.deltaSource;if(l.touches=[p[0],p[1]],f)l.distance=oe(p,k),l.box=De(p),l.scale=1,l.ds=0,l.angle=Y(p,k),l.da=0,t.gesture.startDistance=l.distance,t.gesture.startAngle=l.angle;else if(m||t.pointers.length<2){var B=t.prevEvent;l.distance=B.distance,l.box=B.box,l.scale=B.scale,l.ds=0,l.angle=B.angle,l.da=0}else l.distance=oe(p,k),l.box=De(p),l.scale=l.distance/t.gesture.startDistance,l.angle=Y(p,k),l.ds=l.scale-t.gesture.scale,l.da=l.angle-t.gesture.angle;t.gesture.distance=l.distance,t.gesture.angle=l.angle,_.number(l.scale)&&l.scale!==1/0&&!isNaN(l.scale)&&(t.gesture.scale=l.scale)}}var fe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,l=a.Interactable,i=a.defaults;l.prototype.gesturable=function(p){return _.object(p)?(this.options.gesture.enabled=p.enabled!==!1,this.setPerAction("gesture",p),this.setOnEvents("gesture",p),this):_.bool(p)?(this.options.gesture.enabled=p,this):this.options.gesture},t.map.gesture=fe,t.methodDict.gesture="gesturable",i.actions.gesture=fe.defaults},listeners:{"interactions:action-start":ne,"interactions:action-move":ne,"interactions:action-end":ne,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},Be=fe;function ve(a,t,l,i,p,f,m){if(!t)return!1;if(t===!0){var k=_.number(f.width)?f.width:f.right-f.left,B=_.number(f.height)?f.height:f.bottom-f.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:B)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),B<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var G=k>=0?f.left:f.right;return l.x<G+m}if(a==="top"){var O=B>=0?f.top:f.bottom;return l.y<O+m}if(a==="right")return l.x>(k>=0?f.right:f.left)-m;if(a==="bottom")return l.y>(B>=0?f.bottom:f.top)-m}return!!_.element(i)&&(_.element(t)?t===i:we(i,t,p))}function he(a){var t=a.iEvent,l=a.interaction;if(l.prepared.name==="resize"&&l.resizeAxes){var i=t;l.interactable.options.resize.square?(l.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=l.resizeAxes,l.resizeAxes==="x"?i.delta.y=0:l.resizeAxes==="y"&&(i.delta.x=0))}}var ze,Ce,A={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,l=a.browser,i=a.Interactable,p=a.defaults;A.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"}}(l),A.defaultMargin=l.supportsTouch||l.supportsPointerEvent?20:10,i.prototype.resizable=function(f){return function(m,k,B){return _.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),_.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=B.defaults.actions.resize.axis),_.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:_.bool(k.square)&&(m.options.resize.square=k.square),m):_.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,f,a)},t.map.resize=A,t.methodDict.resize="resizable",p.actions.resize=A.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var l=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var p=l,f=i.rect;i._rects={start:S({},f),corrected:S({},f),previous:S({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},p.edges=i.prepared.edges,p.rect=i._rects.corrected,p.deltaRect=i._rects.delta}})(a),he(a)},"interactions:action-move":function(a){(function(t){var l=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var p=l,f=i.interactable.options.resize.invert,m=f==="reposition"||f==="negate",k=i.rect,B=i._rects,G=B.start,O=B.corrected,ce=B.delta,Ne=B.previous;if(S(Ne,O),m){if(S(O,k),f==="reposition"){if(O.top>O.bottom){var Xe=O.top;O.top=O.bottom,O.bottom=Xe}if(O.left>O.right){var qe=O.left;O.left=O.right,O.right=qe}}}else O.top=Math.min(k.top,G.bottom),O.bottom=Math.max(k.bottom,G.top),O.left=Math.min(k.left,G.right),O.right=Math.max(k.right,G.left);for(var tt in O.width=O.right-O.left,O.height=O.bottom-O.top,O)ce[tt]=O[tt]-Ne[tt];p.edges=i.prepared.edges,p.rect=O,p.deltaRect=ce}})(a),he(a)},"interactions:action-end":function(a){var t=a.iEvent,l=a.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var i=t;i.edges=l.prepared.edges,i.rect=l._rects.corrected,i.deltaRect=l._rects.delta}},"auto-start:check":function(a){var t=a.interaction,l=a.interactable,i=a.element,p=a.rect,f=a.buttons;if(p){var m=S({},t.coords.cur.page),k=l.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&k.mouseButtons)!=0)){if(_.object(k.edges)){var B={left:!1,right:!1,top:!1,bottom:!1};for(var G in B)B[G]=ve(G,k.edges[G],m,t._latestPointer.eventTarget,i,p,k.margin||A.defaultMargin);B.left=B.left&&!B.right,B.top=B.top&&!B.bottom,(B.left||B.right||B.top||B.bottom)&&(a.action={name:"resize",edges:B})}else{var O=k.axis!=="y"&&m.x>p.right-A.defaultMargin,ce=k.axis!=="x"&&m.y>p.bottom-A.defaultMargin;(O||ce)&&(a.action={name:"resize",axes:(O?"x":"")+(ce?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,l=a.axis,i=a.name,p=A.cursors,f=null;if(l)f=p[i+l];else if(t){for(var m="",k=0,B=["top","bottom","left","right"];k<B.length;k++){var G=B[k];t[G]&&(m+=G)}f=p[m]}return f},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},ke=A,nt={id:"actions",install:function(a){a.usePlugin(Be),a.usePlugin(ke),a.usePlugin(Fe),a.usePlugin(Ze)}},Le=0,Qe={request:function(a){return ze(a)},cancel:function(a){return Ce(a)},init:function(a){if(ze=a.requestAnimationFrame,Ce=a.cancelAnimationFrame,!ze)for(var t=["ms","moz","webkit","o"],l=0;l<t.length;l++){var i=t[l];ze=a["".concat(i,"RequestAnimationFrame")],Ce=a["".concat(i,"CancelAnimationFrame")]||a["".concat(i,"CancelRequestAnimationFrame")]}ze=ze&&ze.bind(a),Ce=Ce&&Ce.bind(a),ze||(ze=function(p){var f=Date.now(),m=Math.max(0,16-(f-Le)),k=a.setTimeout(function(){p(f+m)},m);return Le=f+m,k},Ce=function(p){return clearTimeout(p)})}},Re={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){Re.isScrolling=!0,Qe.cancel(Re.i),a.autoScroll=Re,Re.interaction=a,Re.prevTime=Re.now(),Re.i=Qe.request(Re.scroll)},stop:function(){Re.isScrolling=!1,Re.interaction&&(Re.interaction.autoScroll=null),Qe.cancel(Re.i)},scroll:function(){var a=Re.interaction,t=a.interactable,l=a.element,i=a.prepared.name,p=t.options[i].autoScroll,f=ht(p.container,t,l),m=Re.now(),k=(m-Re.prevTime)/1e3,B=p.speed*k;if(B>=1){var G={x:Re.x*B,y:Re.y*B};if(G.x||G.y){var O=pt(f);_.window(f)?f.scrollBy(G.x,G.y):f&&(f.scrollLeft+=G.x,f.scrollTop+=G.y);var ce=pt(f),Ne={x:ce.x-O.x,y:ce.y-O.y};(Ne.x||Ne.y)&&t.fire({type:"autoscroll",target:l,interactable:t,delta:Ne,interaction:a,container:f})}Re.prevTime=m}Re.isScrolling&&(Qe.cancel(Re.i),Re.i=Qe.request(Re.scroll))},check:function(a,t){var l;return(l=a.options[t].autoScroll)==null?void 0:l.enabled},onInteractionMove:function(a){var t=a.interaction,l=a.pointer;if(t.interacting()&&Re.check(t.interactable,t.prepared.name))if(t.simulation)Re.x=Re.y=0;else{var i,p,f,m,k=t.interactable,B=t.element,G=t.prepared.name,O=k.options[G].autoScroll,ce=ht(O.container,k,B);if(_.window(ce))m=l.clientX<Re.margin,i=l.clientY<Re.margin,p=l.clientX>ce.innerWidth-Re.margin,f=l.clientY>ce.innerHeight-Re.margin;else{var Ne=$e(ce);m=l.clientX<Ne.left+Re.margin,i=l.clientY<Ne.top+Re.margin,p=l.clientX>Ne.right-Re.margin,f=l.clientY>Ne.bottom-Re.margin}Re.x=p?1:m?-1:0,Re.y=f?1:i?-1:0,Re.isScrolling||(Re.margin=O.margin,Re.speed=O.speed,Re.start(t))}}};function ht(a,t,l){return(_.string(a)?W(a,t,l):a)||F(l)}function pt(a){return _.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var st={id:"auto-scroll",install:function(a){var t=a.defaults,l=a.actions;a.autoScroll=Re,Re.now=function(){return a.now()},l.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Re.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Re.stop(),Re.interaction&&(Re.interaction=null)},"interactions:stop":Re.stop,"interactions:action-move":function(a){return Re.onInteractionMove(a)}}},vt=st;function yt(a,t){var l=!1;return function(){return l||(pe.console.warn(t),l=!0),a.apply(this,arguments)}}function Dt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function It(a){return _.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Bt(a){return _.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var wt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(l,i,p,f){var m=function(k,B,G,O,ce){var Ne=k.getRect(O),Xe=B.buttons||{0:1,1:4,3:8,4:16}[B.button],qe={action:null,interactable:k,interaction:G,element:O,rect:Ne,buttons:Xe};return ce.fire("auto-start:check",qe),qe.action}(this,i,p,f,a);return this.options.actionChecker?this.options.actionChecker(l,i,m,this,f,p):m},t.prototype.ignoreFrom=yt(function(l){return this._backCompatOption("ignoreFrom",l)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=yt(function(l){return this._backCompatOption("allowFrom",l)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Bt,t.prototype.styleCursor=It}};function Rt(a,t,l,i,p){return t.testIgnoreAllow(t.options[a.name],l,i)&&t.options[a.name].enabled&&Ot(t,l,a,p)?a:null}function kt(a,t,l,i,p,f,m){for(var k=0,B=i.length;k<B;k++){var G=i[k],O=p[k],ce=G.getAction(t,l,a,O);if(ce){var Ne=Rt(ce,G,O,f,m);if(Ne)return{action:Ne,interactable:G,element:O}}}return{action:null,interactable:null,element:null}}function Ut(a,t,l,i,p){var f=[],m=[],k=i;function B(O){f.push(O),m.push(k)}for(;_.element(k);){f=[],m=[],p.interactables.forEachMatch(k,B);var G=kt(a,t,l,f,m,i,p);if(G.action&&!G.interactable.options[G.action.name].manualStart)return G;k=ot(k)}return{action:null,interactable:null,element:null}}function Gt(a,t,l){var i=t.action,p=t.interactable,f=t.element;i=i||{name:null},a.interactable=p,a.element=f,Dt(a.prepared,i),a.rect=p&&i.name?p.getRect(f):null,Da(a,l),l.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,l,i){var p=a.options,f=p[l.name].max,m=p[l.name].maxPerElement,k=i.autoStart.maxInteractions,B=0,G=0,O=0;if(!(f&&m&&k))return!1;for(var ce=0,Ne=i.interactions.list;ce<Ne.length;ce++){var Xe=Ne[ce],qe=Xe.prepared.name;if(Xe.interacting()&&(++B>=k||Xe.interactable===a&&((G+=qe===l.name?1:0)>=f||Xe.element===t&&(O++,qe===l.name&&O>=m))))return!1}return k>0}function xa(a,t){return _.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function ha(a,t,l){var i=l.autoStart.cursorElement;i&&i!==a&&(i.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,l.autoStart.cursorElement=t?a:null}function Da(a,t){var l=a.interactable,i=a.element,p=a.prepared;if(a.pointerType==="mouse"&&l&&l.options.styleCursor){var f="";if(p.name){var m=l.options[p.name].cursorChecker;f=_.func(m)?m(p,l,i,a._interacting):t.actions.map[p.name].getCursor(p)}ha(a.element,f||"",t)}else t.autoStart.cursorElement&&ha(t.autoStart.cursorElement,"",t)}var _a={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,l=a.defaults;a.usePlugin(wt),l.base.actionChecker=null,l.base.styleCursor=!0,S(l.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return xa(i,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var l=a.interaction,i=a.pointer,p=a.event,f=a.eventTarget;l.interacting()||Gt(l,Ut(l,i,p,f,t),t)},"interactions:move":function(a,t){(function(l,i){var p=l.interaction,f=l.pointer,m=l.event,k=l.eventTarget;p.pointerType!=="mouse"||p.pointerIsDown||p.interacting()||Gt(p,Ut(p,f,m,k,i),i)})(a,t),function(l,i){var p=l.interaction;if(p.pointerIsDown&&!p.interacting()&&p.pointerWasMoved&&p.prepared.name){i.fire("autoStart:before-start",l);var f=p.interactable,m=p.prepared.name;m&&f&&(f.options[m].manualStart||!Ot(f,p.element,p.prepared,i)?p.stop():(p.start(p.prepared,f,p.element),Da(p,i)))}}(a,t)},"interactions:stop":function(a,t){var l=a.interaction,i=l.interactable;i&&i.options.styleCursor&&ha(l.element,"",t)}},maxInteractions:xa,withinInteractionLimit:Ot,validateAction:Rt},va=_a,Sa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var l=a.interaction,i=a.eventTarget,p=a.dx,f=a.dy;if(l.prepared.name==="drag"){var m=Math.abs(p),k=Math.abs(f),B=l.interactable.options.drag,G=B.startAxis,O=m>k?"x":m<k?"y":"xy";if(l.prepared.axis=B.lockAxis==="start"?O[0]:B.lockAxis,O!=="xy"&&G!=="xy"&&G!==O){l.prepared.name=null;for(var ce=i,Ne=function(qe){if(qe!==l.interactable){var tt=l.interactable.options.drag;if(!tt.manualStart&&qe.testIgnoreAllow(tt,ce,i)){var dt=qe.getAction(l.downPointer,l.downEvent,l,ce);if(dt&&dt.name==="drag"&&function(ut,mt){if(!mt)return!1;var Et=mt.options.drag.startAxis;return ut==="xy"||Et==="xy"||Et===ut}(O,qe)&&va.validateAction(dt,qe,ce,i,t))return qe}}};_.element(ce);){var Xe=t.interactables.forEachMatch(ce,Ne);if(Xe){l.prepared.name="drag",l.interactable=Xe,l.element=ce;break}ce=ot(ce)}}}}}};function ga(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var l=a.interactable.options;return l[t].hold||l[t].delay}var Ta={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(va),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,l=ga(t);l>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},l))},"interactions:move":function(a){var t=a.interaction,l=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!l&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;ga(t)>0&&(t.prepared.name=null)}},getHoldDuration:ga},ma=Ta,qa={id:"auto-start",install:function(a){a.usePlugin(va),a.usePlugin(ma),a.usePlugin(Sa)}},Ga=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):_.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Xa(a){var t=a.interaction,l=a.event;t.interactable&&t.interactable.checkAndPreventDefault(l)}var La={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Ga,t.prototype.checkAndPreventDefault=function(l){return function(i,p,f){var m=i.options.preventDefault;if(m!=="never")if(m!=="always"){if(p.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var k=F(f.target).document,B=p.getDocOptions(k);if(!B||!B.events||B.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||_.element(f.target)&&Q(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,a,l)},a.interactions.docEvents.push({type:"dragstart",listener:function(l){for(var i=0,p=a.interactions.list;i<p.length;i++){var f=p[i];if(f.element&&(f.element===l.target||ue(f.element,l.target)))return void f.interactable.checkAndPreventDefault(l)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Xa,a},{})};function Ia(a,t){if(t.phaselessTypes[a])return!0;for(var l in t.map)if(a.indexOf(l)===0&&a.substr(l.length)in t.phases)return!0;return!1}function ya(a){var t={};for(var l in a){var i=a[l];_.plainObject(i)?t[l]=ya(i):_.array(i)?t[l]=Ie(i):t[l]=i}return t}var Na=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=Ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,l){var i,p,f=t.phase,m=this.interaction,k=function(G){var O=G.interactable.options[G.prepared.name],ce=O.modifiers;return ce&&ce.length?ce:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ne){var Xe=O[Ne];return Xe&&Xe.enabled&&{options:Xe,methods:Xe._methods}}).filter(function(Ne){return!!Ne})}(m);this.prepareStates(k),this.startEdges=S({},m.edges),this.edges=S({},this.startEdges),this.startOffset=(i=m.rect,p=l,i?{left:p.x-i.left,top:p.y-i.top,right:i.right-p.x,bottom:i.bottom-p.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var B=this.fillArg({phase:f,pageCoords:l,preEnd:!1});return this.result=Ba(),this.startAll(B),this.result=this.setAll(B)}},{key:"fillArg",value:function(t){var l=this.interaction;return t.interaction=l,t.interactable=l.interactable,t.element=l.element,t.rect||(t.rect=l.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var l=0,i=this.states;l<i.length;l++){var p=i[l];p.methods.start&&(t.state=p,p.methods.start(t))}}},{key:"setAll",value:function(t){var l=t.phase,i=t.preEnd,p=t.skipModifiers,f=t.rect,m=t.edges;t.coords=S({},t.pageCoords),t.rect=S({},f),t.edges=S({},m);for(var k=p?this.states.slice(p):this.states,B=Ba(t.coords,t.rect),G=0;G<k.length;G++){var O,ce=k[G],Ne=ce.options,Xe=S({},t.coords),qe=null;(O=ce.methods)!=null&&O.set&&this.shouldDo(Ne,i,l)&&(t.state=ce,qe=ce.methods.set(t),j(t.edges,t.rect,{x:t.coords.x-Xe.x,y:t.coords.y-Xe.y})),B.eventProps.push(qe)}S(this.edges,t.edges),B.delta.x=t.coords.x-t.pageCoords.x,B.delta.y=t.coords.y-t.pageCoords.y,B.rectDelta.left=t.rect.left-f.left,B.rectDelta.right=t.rect.right-f.right,B.rectDelta.top=t.rect.top-f.top,B.rectDelta.bottom=t.rect.bottom-f.bottom;var tt=this.result.coords,dt=this.result.rect;if(tt&&dt){var ut=B.rect.left!==dt.left||B.rect.right!==dt.right||B.rect.top!==dt.top||B.rect.bottom!==dt.bottom;B.changed=ut||tt.x!==B.coords.x||tt.y!==B.coords.y}return B}},{key:"applyToInteraction",value:function(t){var l=this.interaction,i=t.phase,p=l.coords.cur,f=l.coords.start,m=this.result,k=this.startDelta,B=m.delta;i==="start"&&S(this.startDelta,m.delta);for(var G=0,O=[[f,k],[p,B]];G<O.length;G++){var ce=O[G],Ne=ce[0],Xe=ce[1];Ne.page.x+=Xe.x,Ne.page.y+=Xe.y,Ne.client.x+=Xe.x,Ne.client.y+=Xe.y}var qe=this.result.rectDelta,tt=t.rect||l.rect;tt.left+=qe.left,tt.right+=qe.right,tt.top+=qe.top,tt.bottom+=qe.bottom,tt.width=tt.right-tt.left,tt.height=tt.bottom-tt.top}},{key:"setAndApply",value:function(t){var l=this.interaction,i=t.phase,p=t.preEnd,f=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:p,phase:i,pageCoords:t.modifiedCoords||l.coords.cur.page}));if(this.result=m,!m.changed&&(!f||f<this.states.length)&&l.interacting())return!1;if(t.modifiedCoords){var k=l.coords.cur.page,B={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=B.x,m.coords.y+=B.y,m.delta.x+=B.x,m.delta.y+=B.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var l=t.interaction,i=t.event,p=this.states;if(p&&p.length){for(var f=!1,m=0;m<p.length;m++){var k=p[m];t.state=k;var B=k.options,G=k.methods,O=G.beforeEnd&&G.beforeEnd(t);if(O)return this.endResult=O,!1;f=f||!f&&this.shouldDo(B,!0,t.phase,!0)}f&&l.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var l=t.interaction;if(this.states&&this.states.length){var i=S({states:this.states,interactable:l.interactable,element:l.element,rect:null},t);this.fillArg(i);for(var p=0,f=this.states;p<f.length;p++){var m=f[p];i.state=m,m.methods.stop&&m.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var l=0;l<t.length;l++){var i=t[l],p=i.options,f=i.methods,m=i.name;this.states.push({options:p,methods:f,index:l,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var l=t.interaction,i=l.coords,p=l.rect,f=l.modification;if(f.result){for(var m=f.startDelta,k=f.result,B=k.delta,G=k.rectDelta,O=0,ce=[[i.start,m],[i.cur,B]];O<ce.length;O++){var Ne=ce[O],Xe=Ne[0],qe=Ne[1];Xe.page.x-=qe.x,Xe.page.y-=qe.y,Xe.client.x-=qe.x,Xe.client.y-=qe.y}p.left-=G.left,p.right-=G.right,p.top-=G.top,p.bottom-=G.bottom}}},{key:"shouldDo",value:function(t,l,i,p){return!(!t||t.enabled===!1||p&&!t.endOnly||t.endOnly&&!l||i==="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(l){return ya(l)}),this.result=Ba(S({},t.result.coords),S({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function Ba(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function la(a,t){var l=a.defaults,i={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},p=function(f){var m=f||{};for(var k in m.enabled=m.enabled!==!1,l)k in m||(m[k]=l[k]);var B={options:m,methods:i,name:t,enable:function(){return m.enabled=!0,B},disable:function(){return m.enabled=!1,B}};return B};return t&&typeof t=="string"&&(p._defaults=l,p._methods=i),p}function wa(a){var t=a.iEvent,l=a.interaction.modification.result;l&&(t.modifiers=l.eventProps)}var Ya={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new Na(t)},"interactions:before-action-start":function(a){var t=a.interaction,l=a.interaction.modification;l.start(a,t.coords.start.page),t.edges=l.edges,l.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,l=t.modification,i=l.setAndApply(a);return t.edges=l.edges,i},"interactions:before-action-end":function(a){var t=a.interaction,l=t.modification,i=l.beforeEnd(a);return t.edges=l.startEdges,i},"interactions:action-start":wa,"interactions:action-move":wa,"interactions:action-end":wa,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},Ct=Ya,Qt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},bt=function(a){b(l,a);var t=J(l);function l(i,p,f,m,k,B,G){var O;u(this,l),(O=t.call(this,i)).relatedTarget=null,O.screenX=void 0,O.screenY=void 0,O.button=void 0,O.buttons=void 0,O.ctrlKey=void 0,O.shiftKey=void 0,O.altKey=void 0,O.metaKey=void 0,O.page=void 0,O.client=void 0,O.delta=void 0,O.rect=void 0,O.x0=void 0,O.y0=void 0,O.t0=void 0,O.dt=void 0,O.duration=void 0,O.clientX0=void 0,O.clientY0=void 0,O.velocity=void 0,O.speed=void 0,O.swipe=void 0,O.axes=void 0,O.preEnd=void 0,k=k||i.element;var ce=i.interactable,Ne=(ce&&ce.options||Qt).deltaSource,Xe=te(ce,k,f),qe=m==="start",tt=m==="end",dt=qe?L(O):i.prevEvent,ut=qe?i.coords.start:tt?{page:dt.page,client:dt.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return O.page=S({},ut.page),O.client=S({},ut.client),O.rect=S({},i.rect),O.timeStamp=ut.timeStamp,tt||(O.page.x-=Xe.x,O.page.y-=Xe.y,O.client.x-=Xe.x,O.client.y-=Xe.y),O.ctrlKey=p.ctrlKey,O.altKey=p.altKey,O.shiftKey=p.shiftKey,O.metaKey=p.metaKey,O.button=p.button,O.buttons=p.buttons,O.target=k,O.currentTarget=k,O.preEnd=B,O.type=G||f+(m||""),O.interactable=ce,O.t0=qe?i.pointers[i.pointers.length-1].downTime:dt.t0,O.x0=i.coords.start.page.x-Xe.x,O.y0=i.coords.start.page.y-Xe.y,O.clientX0=i.coords.start.client.x-Xe.x,O.clientY0=i.coords.start.client.y-Xe.y,O.delta=qe||tt?{x:0,y:0}:{x:O[Ne].x-dt[Ne].x,y:O[Ne].y-dt[Ne].y},O.dt=i.coords.delta.timeStamp,O.duration=O.timeStamp-O.t0,O.velocity=S({},i.coords.velocity[Ne]),O.speed=at(O.velocity.x,O.velocity.y),O.swipe=tt||m==="inertiastart"?O.getSwipe():null,O}return g(l,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var p=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;p<0&&(p+=360);var f=112.5<=p&&p<247.5,m=202.5<=p&&p<337.5;return{up:m,down:!m&&22.5<=p&&p<157.5,left:f,right:!f&&(292.5<=p||p<67.5),angle:p,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),l}(xe);Object.defineProperties(bt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var vn=g(function a(t,l,i,p,f){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=l,this.event=i,this.downTime=p,this.downTarget=f}),Ft=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ua=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Va=0,oa=function(){function a(t){var l=this,i=t.pointerType,p=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=yt(function(O){this.move(O)},"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=Va++,this._scopeFire=p,this.pointerType=i;var f=this;this._proxy={};var m=function(O){Object.defineProperty(l._proxy,O,{get:function(){return f[O]}})};for(var k in Ft)m(k);var B=function(O){Object.defineProperty(l._proxy,O,{value:function(){return f[O].apply(f,arguments)}})};for(var G in ua)B(G);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,l,i){var p=this.updatePointer(t,l,i,!0),f=this.pointers[p];this._scopeFire("interactions:down",{pointer:t,event:l,eventTarget:i,pointerIndex:p,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,l,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!l.options[t.name].enabled)&&(Dt(this.prepared,t),this.interactable=l,this.element=i,this.rect=l.getRect(i),this.edges=this.prepared.edges?S({},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,l,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,l,i,!1);var p,f,m=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(p=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=at(p,f)>this.pointerMoveTolerance);var k,B,G,O=this.getPointerIndex(t),ce={pointer:t,pointerIndex:O,pointerInfo:this.pointers[O],event:l,type:"move",eventTarget:i,dx:p,dy:f,duplicate:m,interaction:this};m||(k=this.coords.velocity,B=this.coords.delta,G=Math.max(B.timeStamp/1e3,.001),k.page.x=B.page.x/G,k.page.y=B.page.y/G,k.client.x=B.client.x/G,k.client.y=B.client.y/G,k.timeStamp=G),this._scopeFire("interactions:move",ce),m||this.simulation||(this.interacting()&&(ce.type=null,this.move(ce)),this.pointerWasMoved&&P(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Z(this.coords.delta),(t=S({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,l,i,p){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,l,i,!1));var m=/cancel$/i.test(l.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:l,eventTarget:i,type:m,curEventTarget:p,interaction:this}),this.simulation||this.end(l),this.removePointer(t,l)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var l;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(l=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,l===!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 l=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:q(this.pointers,function(i){return i.id===l})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,l,i,p){var f,m,k,B=z(t),G=this.getPointerIndex(t),O=this.pointers[G];return p=p!==!1&&(p||/(down|start)$/i.test(l.type)),O?O.pointer=t:(O=new vn(B,t,l,null,null),G=this.pointers.length,this.pointers.push(O)),U(this.coords.cur,this.pointers.map(function(ce){return ce.pointer}),this._now()),f=this.coords.delta,m=this.coords.prev,k=this.coords.cur,f.page.x=k.page.x-m.page.x,f.page.y=k.page.y-m.page.y,f.client.x=k.client.x-m.client.x,f.client.y=k.client.y-m.client.y,f.timeStamp=k.timeStamp-m.timeStamp,p&&(this.pointerIsDown=!0,O.downTime=this.coords.cur.timeStamp,O.downTarget=i,C(this.downPointer,t),this.interacting()||(P(this.coords.start,this.coords.cur),P(this.coords.prev,this.coords.cur),this.downEvent=l,this.pointerWasMoved=!1)),this._updateLatestPointer(t,l,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:l,eventTarget:i,down:p,pointerInfo:O,pointerIndex:G,interaction:this}),G}},{key:"removePointer",value:function(t,l){var i=this.getPointerIndex(t);if(i!==-1){var p=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:l,eventTarget:null,pointerIndex:i,pointerInfo:p,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,l,i){this._latestPointer.pointer=t,this._latestPointer.event=l,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,l,i,p){return new bt(this,t,this.prepared.name,l,this.element,i,p)}},{key:"_fireEvent",value:function(t){var l;(l=this.interactable)==null||l.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var l=t.event,i=t.phase,p=t.preEnd,f=t.type,m=this.rect;if(m&&i==="move"&&(j(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(l,i,p,f);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function Ca(a){ea(a.interaction)}function ea(a){if(!function(l){return!(!l.offset.pending.x&&!l.offset.pending.y)}(a))return!1;var t=a.offset.pending;return At(a.coords.cur,t),At(a.coords.delta,t),j(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Pa(a){var t=a.x,l=a.y;this.offset.pending.x+=t,this.offset.pending.y+=l,this.offset.total.x+=t,this.offset.total.y+=l}function At(a,t){var l=a.page,i=a.client,p=t.x,f=t.y;l.x+=p,l.y+=f,i.x+=p,i.y+=f}ua.offsetBy="";var Xt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Pa},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(At(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":Ca,"interactions:before-action-move":Ca,"interactions:before-action-end":function(a){var t=a.interaction;if(ea(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=Xt,St=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var l=this.interaction,i=Mt(l);if(!i||!i.enabled)return!1;var p=l.coords.velocity.client,f=at(p.x,p.y),m=this.modification||(this.modification=new Na(l));if(m.copyFrom(l.modification),this.t0=l._now(),this.allowResume=i.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=l.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-l.coords.cur.timeStamp<50&&f>i.minSpeed&&f>i.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.result.changed)return!1;this.startSmoothEnd()}return l.modification.result.rect=null,l.offsetBy(this.targetOffset),l._doPhase({interaction:l,event:t,phase:"inertiastart"}),l.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),l.modification.result.rect=null,this.active=!0,l.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,l=this.interaction.coords.velocity.client,i=Mt(this.interaction),p=i.resistance,f=-Math.log(i.endSpeed/this.v0)/p;this.targetOffset={x:(l.x-f)/p,y:(l.y-f)/p},this.te=f,this.lambda_v0=p/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var l=this;this.timeout=Qe.request(function(){l.active&&t()})}},{key:"inertiaTick",value:function(){var t,l,i,p,f,m,k,B=this,G=this.interaction,O=Mt(G).resistance,ce=(G._now()-this.t0)/1e3;if(ce<this.te){var Ne,Xe=1-(Math.exp(-O*ce)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,l=0,i=this.targetOffset.x,p=this.targetOffset.y,f=this.modifiedOffset.x,m=this.modifiedOffset.y,Ne={x:qt(k=Xe,t,i,f),y:qt(k,l,p,m)}):Ne={x:this.targetOffset.x*Xe,y:this.targetOffset.y*Xe};var qe={x:Ne.x-this.currentOffset.x,y:Ne.y-this.currentOffset.y};this.currentOffset.x+=qe.x,this.currentOffset.y+=qe.y,G.offsetBy(qe),G.move(),this.onNextFrame(function(){return B.inertiaTick()})}else G.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,l=this.interaction,i=l._now()-this.t0,p=Mt(l).smoothEndDuration;if(i<p){var f={x:$t(i,0,this.targetOffset.x,p),y:$t(i,0,this.targetOffset.y,p)},m={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,l.offsetBy(m),l.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else l.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var l=t.pointer,i=t.event,p=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(l,i,p,!0),f._doPhase({interaction:f,event:i,phase:"resume"}),P(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Qe.cancel(this.timeout)}}]),a}();function Mt(a){var t=a.interactable,l=a.prepared;return t&&t.options&&l.name&&t.options[l.name].inertia}var Ht={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(Ct),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new St(t)},"interactions:before-action-end":function(a){var t=a.interaction,l=a.event;return(!t._interacting||t.simulation||!t.inertia.start(l))&&null},"interactions:down":function(a){var t=a.interaction,l=a.eventTarget,i=t.inertia;if(i.active)for(var p=l;_.element(p);){if(p===t.element){i.resume(a);break}p=ot(p)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":wa,"interactions:action-inertiastart":wa,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function qt(a,t,l,i){var p=1-a;return p*p*t+2*p*a*l+a*a*i}function $t(a,t,l,i){return-l*(a/=i)*(a-2)+t}var pa=Ht;function ia(a,t){for(var l=0;l<t.length;l++){var i=t[l];if(a.immediatePropagationStopped)break;i(a)}}var $a=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=S({},t||{})}return g(a,[{key:"fire",value:function(t){var l,i=this.global;(l=this.types[t.type])&&ia(t,l),!t.propagationStopped&&i&&(l=i[t.type])&&ia(t,l)}},{key:"on",value:function(t,l){var i=Te(t,l);for(t in i)this.types[t]=Se(this.types[t]||[],i[t])}},{key:"off",value:function(t,l){var i=Te(t,l);for(t in i){var p=this.types[t];if(p&&p.length)for(var f=0,m=i[t];f<m.length;f++){var k=m[f],B=p.indexOf(k);B!==-1&&p.splice(B,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ja=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Ka(a){return _.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Qa(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var In={id:"events",install:function(a){var t,l=[],i={},p=[],f={add:m,remove:k,addDelegate:function(O,ce,Ne,Xe,qe){var tt=Ka(qe);if(!i[Ne]){i[Ne]=[];for(var dt=0;dt<p.length;dt++){var ut=p[dt];m(ut,Ne,B),m(ut,Ne,G,!0)}}var mt=i[Ne],Et=Ve(mt,function(Nt){return Nt.selector===O&&Nt.context===ce});Et||(Et={selector:O,context:ce,listeners:[]},mt.push(Et)),Et.listeners.push({func:Xe,options:tt})},removeDelegate:function(O,ce,Ne,Xe,qe){var tt,dt=Ka(qe),ut=i[Ne],mt=!1;if(ut)for(tt=ut.length-1;tt>=0;tt--){var Et=ut[tt];if(Et.selector===O&&Et.context===ce){for(var Nt=Et.listeners,xt=Nt.length-1;xt>=0;xt--){var _t=Nt[xt];if(_t.func===Xe&&Qa(_t.options,dt)){Nt.splice(xt,1),Nt.length||(ut.splice(tt,1),k(ce,Ne,B),k(ce,Ne,G,!0)),mt=!0;break}}if(mt)break}}},delegateListener:B,delegateUseCapture:G,delegatedEvents:i,documents:p,targets:l,supportsOptions:!1,supportsPassive:!1};function m(O,ce,Ne,Xe){if(O.addEventListener){var qe=Ka(Xe),tt=Ve(l,function(dt){return dt.eventTarget===O});tt||(tt={eventTarget:O,events:{}},l.push(tt)),tt.events[ce]||(tt.events[ce]=[]),Ve(tt.events[ce],function(dt){return dt.func===Ne&&Qa(dt.options,qe)})||(O.addEventListener(ce,Ne,f.supportsOptions?qe:qe.capture),tt.events[ce].push({func:Ne,options:qe}))}}function k(O,ce,Ne,Xe){if(O.addEventListener&&O.removeEventListener){var qe=q(l,function(aa){return aa.eventTarget===O}),tt=l[qe];if(tt&&tt.events)if(ce!=="all"){var dt=!1,ut=tt.events[ce];if(ut){if(Ne==="all"){for(var mt=ut.length-1;mt>=0;mt--){var Et=ut[mt];k(O,ce,Et.func,Et.options)}return}for(var Nt=Ka(Xe),xt=0;xt<ut.length;xt++){var _t=ut[xt];if(_t.func===Ne&&Qa(_t.options,Nt)){O.removeEventListener(ce,Ne,f.supportsOptions?Nt:Nt.capture),ut.splice(xt,1),ut.length===0&&(delete tt.events[ce],dt=!0);break}}}dt&&!Object.keys(tt.events).length&&l.splice(qe,1)}else for(ce in tt.events)tt.events.hasOwnProperty(ce)&&k(O,ce,"all")}}function B(O,ce){for(var Ne=Ka(ce),Xe=new Ja(O),qe=i[O.type],tt=se(O)[0],dt=tt;_.element(dt);){for(var ut=0;ut<qe.length;ut++){var mt=qe[ut],Et=mt.selector,Nt=mt.context;if(Q(dt,Et)&&ue(Nt,tt)&&ue(Nt,dt)){var xt=mt.listeners;Xe.currentTarget=dt;for(var _t=0;_t<xt.length;_t++){var aa=xt[_t];Qa(aa.options,Ne)&&aa.func(Xe)}}}dt=ot(dt)}}function G(O){return B(O,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),a.events=f,f}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,l=rn.methodOrder;t<l.length;t++){var i=l[t],p=rn[i](a);if(p)return p}return null},simulationResume:function(a){var t=a.pointerType,l=a.eventType,i=a.eventTarget,p=a.scope;if(!/down|start/i.test(l))return null;for(var f=0,m=p.interactions.list;f<m.length;f++){var k=m[f],B=i;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;B;){if(B===k.element)return k;B=ot(B)}}return null},mouseOrPen:function(a){var t,l=a.pointerId,i=a.pointerType,p=a.eventType,f=a.scope;if(i!=="mouse"&&i!=="pen")return null;for(var m=0,k=f.interactions.list;m<k.length;m++){var B=k[m];if(B.pointerType===i){if(B.simulation&&!gn(B,l))continue;if(B.interacting())return B;t||(t=B)}}if(t)return t;for(var G=0,O=f.interactions.list;G<O.length;G++){var ce=O[G];if(!(ce.pointerType!==i||/down/i.test(p)&&ce.simulation))return ce}return null},hasPointer:function(a){for(var t=a.pointerId,l=0,i=a.scope.interactions.list;l<i.length;l++){var p=i[l];if(gn(p,t))return p}return null},idle:function(a){for(var t=a.pointerType,l=0,i=a.scope.interactions.list;l<i.length;l++){var p=i[l];if(p.pointers.length===1){var f=p.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(p.pointers.length>=2)continue;if(!p.interacting()&&t===p.pointerType)return p}return null}};function gn(a,t){return a.pointers.some(function(l){return l.id===t})}var sn=rn,ba=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(l){var i=t.interactions.list,p=re(l),f=se(l),m=f[0],k=f[1],B=[];if(/^touch/.test(l.type)){t.prevTouchTime=t.now();for(var G=0,O=l.changedTouches;G<O.length;G++){var ce=O[G],Ne={pointer:ce,pointerId:z(ce),pointerType:p,eventType:l.type,eventTarget:m,curEventTarget:k,scope:t},Xe=cn(Ne);B.push([Ne.pointer,Ne.eventTarget,Ne.curEventTarget,Xe])}}else{var qe=!1;if(!ie.supportsPointerEvent&&/mouse/.test(l.type)){for(var tt=0;tt<i.length&&!qe;tt++)qe=i[tt].pointerType!=="mouse"&&i[tt].pointerIsDown;qe=qe||t.now()-t.prevTouchTime<500||l.timeStamp===0}if(!qe){var dt={pointer:l,pointerId:z(l),pointerType:p,eventType:l.type,curEventTarget:k,eventTarget:m,scope:t},ut=cn(dt);B.push([dt.pointer,dt.eventTarget,dt.curEventTarget,ut])}}for(var mt=0;mt<B.length;mt++){var Et=B[mt],Nt=Et[0],xt=Et[1],_t=Et[2];Et[3][a](Nt,l,xt,_t)}}}function cn(a){var t=a.pointerType,l=a.scope,i={interaction:sn.search(a),searchDetails:a};return l.fire("interactions:find",i),i.interaction||l.interactions.new({pointerType:t})}function sa(a,t){var l=a.doc,i=a.scope,p=a.options,f=i.interactions.docEvents,m=i.events,k=m[t];for(var B in i.browser.isIOS&&!p.events&&(p.events={passive:!1}),m.delegatedEvents)k(l,B,m.delegateListener),k(l,B,m.delegateUseCapture,!0);for(var G=p&&p.events,O=0;O<f.length;O++){var ce=f[O];k(l,ce.type,ce.listener,G)}}var Bn={id:"core/interactions",install:function(a){for(var t={},l=0;l<ba.length;l++){var i=ba[l];t[i]=Za(i,a)}var p,f=ie.pEventTypes;function m(){for(var k=0,B=a.interactions.list;k<B.length;k++){var G=B[k];if(G.pointerIsDown&&G.pointerType==="touch"&&!G._interacting)for(var O=function(){var Xe=Ne[ce];a.documents.some(function(qe){return ue(qe.doc,Xe.downTarget)})||G.removePointer(Xe.pointer,Xe.event)},ce=0,Ne=G.pointers;ce<Ne.length;ce++)O()}}(p=V.PointerEvent?[{type:f.down,listener:m},{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:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var B=0,G=a.interactions.list;B<G.length;B++)G[B].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){b(G,k);var B=J(G);function G(){return u(this,G),B.apply(this,arguments)}return g(G,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(O){a.interactions.pointerMoveTolerance=O}},{key:"_now",value:function(){return a.now()}}]),G}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(G,O){return a.fire(G,O)};var B=new a.Interaction(k);return a.interactions.list.push(B),B},listeners:t,docEvents:p,pointerMoveTolerance:1},a.usePlugin(La)},listeners:{"scope:add-document":function(a){return sa(a,"add")},"scope:remove-document":function(a){return sa(a,"remove")},"interactable:unset":function(a,t){for(var l=a.interactable,i=t.interactions.list.length-1;i>=0;i--){var p=t.interactions.list[i];p.interactable===l&&(p.stop(),t.fire("interactions:destroy",{interaction:p}),p.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:sa,doOnInteractions:Za,methodNames:ba},ja=Bn,Ua=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ua||{}),pr=function(){function a(t,l,i,p){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new $a,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=l.actions,this.target=t,this._context=l.context||i,this._win=F(de(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=p,this.set(l)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,l){return _.func(l.onstart)&&this.on("".concat(t,"start"),l.onstart),_.func(l.onmove)&&this.on("".concat(t,"move"),l.onmove),_.func(l.onend)&&this.on("".concat(t,"end"),l.onend),_.func(l.oninertiastart)&&this.on("".concat(t,"inertiastart"),l.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,l,i){var p,f=this,m=(p=this._actions.map[t])==null?void 0:p.filterEventType,k=function(B){return(m==null||m(B))&&Ia(B,f._actions)};(_.array(l)||_.object(l))&&this._onOff(Ua.Off,t,l,void 0,k),(_.array(i)||_.object(i))&&this._onOff(Ua.On,t,i,void 0,k)}},{key:"setPerAction",value:function(t,l){var i=this._defaults;for(var p in l){var f=p,m=this.options[t],k=l[f];f==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),_.array(k)?m[f]=Ie(k):_.plainObject(k)?(m[f]=S(m[f]||{},ya(k)),_.object(i.perAction[f])&&"enabled"in i.perAction[f]&&(m[f].enabled=k.enabled!==!1)):_.bool(k)&&_.object(i.perAction[f])?m[f].enabled=k:m[f]=k}}},{key:"getRect",value:function(t){return t=t||(_.element(this.target)?this.target:null),_.string(this.target)&&(t=t||this._context.querySelector(this.target)),Je(t)}},{key:"rectChecker",value:function(t){var l=this;return _.func(t)?(this.getRect=function(i){var p=S({},t.apply(l,i));return"width"in p||(p.width=p.right-p.left,p.height=p.bottom-p.top),p},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,l){if(de(l)||_.object(l)){for(var i in this.options[t]=l,this._actions.map)this.options[i][t]=l;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 _.string(t)?Array.from(this._context.querySelectorAll(t)):_.func(t)&&t.getAllElements?t.getAllElements():_.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ue(this._context,t)}},{key:"testIgnoreAllow",value:function(t,l,i){return!this.testIgnore(t.ignoreFrom,l,i)&&this.testAllow(t.allowFrom,l,i)}},{key:"testAllow",value:function(t,l,i){return!t||!!_.element(i)&&(_.string(t)?we(i,t,l):!!_.element(t)&&ue(t,i))}},{key:"testIgnore",value:function(t,l,i){return!(!t||!_.element(i))&&(_.string(t)?we(i,t,l):!!_.element(t)&&ue(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,l,i,p,f){_.object(l)&&!_.array(l)&&(p=i,i=null);var m=Te(l,i,f);for(var k in m){k==="wheel"&&(k=ie.wheelEvent);for(var B=0,G=m[k];B<G.length;B++){var O=G[B];Ia(k,this._actions)?this.events[t===Ua.On?"on":"off"](k,O):_.string(this.target)?this._scopeEvents[t===Ua.On?"addDelegate":"removeDelegate"](this.target,this._context,k,O,p):this._scopeEvents[t===Ua.On?"add":"remove"](this.target,k,O,p)}}return this}},{key:"on",value:function(t,l,i){return this._onOff(Ua.On,t,l,i)}},{key:"off",value:function(t,l,i){return this._onOff(Ua.Off,t,l,i)}},{key:"set",value:function(t){var l=this._defaults;for(var i in _.object(t)||(t={}),this.options=ya(l.base),this._actions.methodDict){var p=i,f=this._actions.methodDict[p];this.options[p]={},this.setPerAction(p,S(S({},l.perAction),l.actions[p])),this[f](t[p])}for(var m in t)m!=="getRect"?_.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(_.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var l=this._scopeEvents.delegatedEvents[t],i=l.length-1;i>=0;i--){var p=l[i],f=p.selector,m=p.context,k=p.listeners;f===this.target&&m===this._context&&l.splice(i,1);for(var B=k.length-1;B>=0;B--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[B][0],k[B][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),dr=function(){function a(t){var l=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var p=i.interactable,f=p.target,m=_.string(f)?l.selectorMap[f]:f[l.scope.id],k=q(m,function(B){return B===p});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,l){l=S(l||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,l,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),_.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:l,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,l){var i=l&&l.context||this.scope.document,p=_.string(t),f=p?this.selectorMap[t]:t[this.scope.id];if(f)return Ve(f,function(m){return m._context===i&&(p||m.inContext(t))})}},{key:"forEachMatch",value:function(t,l){for(var i=0,p=this.list;i<p.length;i++){var f=p[i],m=void 0;if((_.string(f.target)?_.element(t)&&Q(t,f.target):t===f.target)&&f.inContext(t)&&(m=l(f)),m!==void 0)return m}}}]),a}(),fr=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ie,this.defaults=ya(Qt),this.Eventable=$a,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var p=function f(m,k){var B=i.interactables.getExisting(m,k);return B||((B=i.interactables.new(m,k)).events.global=f.globalEvents),B};return p.getPointerAverage=H,p.getTouchBBox=De,p.getTouchDistance=oe,p.getTouchAngle=Y,p.getElementRect=Je,p.getElementClientRect=$e,p.matchesSelector=Q,p.closest=Ye,p.globalEvents={},p.version="1.10.27",p.scope=i,p.use=function(f,m){return this.scope.usePlugin(f,m),this},p.isSet=function(f,m){return!!this.scope.interactables.get(f,m&&m.context)},p.on=yt(function(f,m,k){if(_.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),_.array(f)){for(var B=0,G=f;B<G.length;B++){var O=G[B];this.on(O,m,k)}return this}if(_.object(f)){for(var ce in f)this.on(ce,f[ce],m);return this}return Ia(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(m):this.globalEvents[f]=[m]:this.scope.events.add(this.scope.document,f,m,{options:k}),this},"The interact.on() method is being deprecated"),p.off=yt(function(f,m,k){if(_.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),_.array(f)){for(var B=0,G=f;B<G.length;B++){var O=G[B];this.off(O,m,k)}return this}if(_.object(f)){for(var ce in f)this.off(ce,f[ce],m);return this}var Ne;return Ia(f,this.scope.actions)?f in this.globalEvents&&(Ne=this.globalEvents[f].indexOf(m))!==-1&&this.globalEvents[f].splice(Ne,1):this.scope.events.remove(this.scope.document,f,m,k),this},"The interact.off() method is being deprecated"),p.debug=function(){return this.scope},p.supportsTouch=function(){return ie.supportsTouch},p.supportsPointerEvent=function(){return ie.supportsPointerEvent},p.stop=function(){for(var f=0,m=this.scope.interactions.list;f<m.length;f++)m[f].stop();return this},p.pointerMoveTolerance=function(f){return _.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},p.addDocument=function(f,m){this.scope.addDocument(f,m)},p.removeDocument=function(f){this.scope.removeDocument(f)},p}(this),this.InteractEvent=bt,this.Interactable=void 0,this.interactables=new dr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var l=this;this.Interactable=function(i){b(f,i);var p=J(f);function f(){return u(this,f),p.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return l.defaults}},{key:"set",value:function(m){return M(w(f.prototype),"set",this).call(this,m),l.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){M(w(f.prototype),"unset",this).call(this);var m=l.interactables.list.indexOf(this);m<0||(l.interactables.list.splice(m,1),l.fire("interactable:unset",{interactable:this}))}}]),f}(pr)}return g(a,[{key:"addListeners",value:function(t,l){this.listenerMaps.push({id:l,map:t})}},{key:"fire",value:function(t,l){for(var i=0,p=this.listenerMaps;i<p.length;i++){var f=p[i].map[t];if(f&&f(l,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(l,i){return l.isInitialized=!0,_.window(i)&&E(i),V.init(i),ie.init(i),Qe.init(i),l.window=i,l.document=i.document,l.usePlugin(ja),l.usePlugin(In),l}(this,t)}},{key:"pluginIsInstalled",value:function(t){var l=t.id;return l?!!this._plugins.map[l]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,l){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,l),t.listeners&&t.before){for(var i=0,p=this.listenerMaps.length,f=t.before.reduce(function(k,B){return k[B]=!0,k[_l(B)]=!0,k},{});i<p;i++){var m=this.listenerMaps[i].id;if(m&&(f[m]||f[_l(m)]))break}this.listenerMaps.splice(i,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,l){if(this.getDocIndex(t)!==-1)return!1;var i=F(t);l=l?S({},l):{},this.documents.push({doc:t,options:l}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:l})}},{key:"removeDocument",value:function(t){var l=this.getDocIndex(t),i=F(t),p=this.documents[l].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(l,1),this.events.documents.splice(l,1),this.fire("scope:remove-document",{doc:t,window:i,scope:this,options:p})}},{key:"getDocIndex",value:function(t){for(var l=0;l<this.documents.length;l++)if(this.documents[l].doc===t)return l;return-1}},{key:"getDocOptions",value:function(t){var l=this.getDocIndex(t);return l===-1?null:this.documents[l].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function _l(a){return a&&a.replace(/\/.*$/,"")}var Sl=new fr,ta=Sl.interactStatic,hr=typeof globalThis<"u"?globalThis:window;Sl.init(hr);var vr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var p=i[0],f=i[1];return p in a||f in a}),l=function(i,p){for(var f=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,B=a.offset,G=B===void 0?{x:0,y:0}:B,O={range:f,grid:a,x:null,y:null},ce=0;ce<t.length;ce++){var Ne=t[ce],Xe=Ne[0],qe=Ne[1],tt=Math.round((i-G.x)/a[Xe]),dt=Math.round((p-G.y)/a[qe]);O[Xe]=Math.max(k.left,Math.min(k.right,tt*a[Xe]+G.x)),O[qe]=Math.max(k.top,Math.min(k.bottom,dt*a[qe]+G.y))}return O};return l.grid=a,l.coordFields=t,l}}),gr={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=S(t.snappers||{},vr),t.createSnapGrid=t.snappers.grid}},mr=gr,yr={start:function(a){var t=a.state,l=a.rect,i=a.edges,p=a.pageCoords,f=t.options,m=f.ratio,k=f.enabled,B=t.options,G=B.equalDelta,O=B.modifiers;m==="preserve"&&(m=l.width/l.height),t.startCoords=S({},p),t.startRect=S({},l),t.ratio=m,t.equalDelta=G;var ce=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var Ne=(ce.left?1:-1)*(ce.top?1:-1);t.edgeSign={x:Ne,y:Ne}}else t.edgeSign={x:ce.left?-1:1,y:ce.top?-1:1};if(k!==!1&&S(i,ce),O!=null&&O.length){var Xe=new Na(a.interaction);Xe.copyFrom(a.interaction.modification),Xe.prepareStates(O),t.subModification=Xe,Xe.startAll(o({},a))}},set:function(a){var t=a.state,l=a.rect,i=a.coords,p=t.linkedEdges,f=S({},i),m=t.equalDelta?br:kr;if(S(a.edges,p),m(t,t.xIsPrimaryAxis,i,l),!t.subModification)return null;var k=S({},l);j(p,k,{x:i.x-f.x,y:i.y-f.y});var B=t.subModification.setAll(o(o({},a),{},{rect:k,edges:p,pageCoords:i,prevCoords:i,prevRect:k})),G=B.delta;return B.changed&&(m(t,Math.abs(G.x)>Math.abs(G.y),B.coords,B.rect),S(i,B.coords)),B.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function br(a,t,l){var i=a.startCoords,p=a.edgeSign;t?l.y=i.y+(l.x-i.x)*p.y:l.x=i.x+(l.y-i.y)*p.x}function kr(a,t,l,i){var p=a.startRect,f=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var B=i.width/m;l.y=f.y+(B-p.height)*k.y}else{var G=i.height*m;l.x=f.x+(G-p.width)*k.x}}var xr=la(yr,"aspectRatio"),Tl=function(){};Tl._defaults={};var An=Tl;function en(a,t,l){return _.func(a)?Oe(a,t.interactable,t.element,[l.x,l.y,t]):Oe(a,t.interactable,t.element)}var Nn={start:function(a){var t=a.rect,l=a.startOffset,i=a.state,p=a.interaction,f=a.pageCoords,m=i.options,k=m.elementRect,B=S({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var G=en(m.restriction,p,f);if(G){var O=G.right-G.left-t.width,ce=G.bottom-G.top-t.height;O<0&&(B.left+=O,B.right+=O),ce<0&&(B.top+=ce,B.bottom+=ce)}B.left+=l.left-t.width*k.left,B.top+=l.top-t.height*k.top,B.right+=l.right-t.width*(1-k.right),B.bottom+=l.bottom-t.height*(1-k.bottom)}i.offset=B},set:function(a){var t=a.coords,l=a.interaction,i=a.state,p=i.options,f=i.offset,m=en(p.restriction,l,t);if(m){var k=function(B){return!B||"left"in B&&"top"in B||((B=S({},B)).left=B.x||0,B.top=B.y||0,B.right=B.right||B.left+B.width,B.bottom=B.bottom||B.top+B.height),B}(m);t.x=Math.max(Math.min(k.right-f.right,t.x),k.left+f.left),t.y=Math.max(Math.min(k.bottom-f.bottom,t.y),k.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Dr=la(Nn,"restrict"),Il={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Bl={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Al(a,t){for(var l=0,i=["top","left","bottom","right"];l<i.length;l++){var p=i[l];p in a||(a[p]=t[p])}return a}var mn={noInner:Il,noOuter:Bl,start:function(a){var t,l=a.interaction,i=a.startOffset,p=a.state,f=p.options;f&&(t=be(en(f.offset,l,l.coords.start.page))),t=t||{x:0,y:0},p.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(a){var t=a.coords,l=a.edges,i=a.interaction,p=a.state,f=p.offset,m=p.options;if(l){var k=S({},t),B=en(m.inner,i,k)||{},G=en(m.outer,i,k)||{};Al(B,Il),Al(G,Bl),l.top?t.y=Math.min(Math.max(G.top+f.top,k.y),B.top+f.top):l.bottom&&(t.y=Math.max(Math.min(G.bottom+f.bottom,k.y),B.bottom+f.bottom)),l.left?t.x=Math.min(Math.max(G.left+f.left,k.x),B.left+f.left):l.right&&(t.x=Math.max(Math.min(G.right+f.right,k.x),B.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},wr=la(mn,"restrictEdges"),Cr=S({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Nn.defaults),Er=la({start:Nn.start,set:Nn.set,defaults:Cr},"restrictRect"),_r={width:-1/0,height:-1/0},Sr={width:1/0,height:1/0},Tr=la({start:function(a){return mn.start(a)},set:function(a){var t=a.interaction,l=a.state,i=a.rect,p=a.edges,f=l.options;if(p){var m=ee(en(f.min,t,a.coords))||_r,k=ee(en(f.max,t,a.coords))||Sr;l.options={endOnly:f.endOnly,inner:S({},mn.noInner),outer:S({},mn.noOuter)},p.top?(l.options.inner.top=i.bottom-m.height,l.options.outer.top=i.bottom-k.height):p.bottom&&(l.options.inner.bottom=i.top+m.height,l.options.outer.bottom=i.top+k.height),p.left?(l.options.inner.left=i.right-m.width,l.options.outer.left=i.right-k.width):p.right&&(l.options.inner.right=i.left+m.width,l.options.outer.right=i.left+k.width),mn.set(a),l.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ol={start:function(a){var t,l=a.interaction,i=a.interactable,p=a.element,f=a.rect,m=a.state,k=a.startOffset,B=m.options,G=B.offsetWithOrigin?function(Ne){var Xe=Ne.interaction.element,qe=be(Oe(Ne.state.options.origin,null,null,[Xe])),tt=qe||te(Ne.interactable,Xe,Ne.interaction.prepared.name);return tt}(a):{x:0,y:0};if(B.offset==="startCoords")t={x:l.coords.start.page.x,y:l.coords.start.page.y};else{var O=Oe(B.offset,i,p,[l]);(t=be(O)||{x:0,y:0}).x+=G.x,t.y+=G.y}var ce=B.relativePoints;m.offsets=f&&ce&&ce.length?ce.map(function(Ne,Xe){return{index:Xe,relativePoint:Ne,x:k.left-f.width*Ne.x+t.x,y:k.top-f.height*Ne.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,l=a.coords,i=a.state,p=i.options,f=i.offsets,m=te(t.interactable,t.element,t.prepared.name),k=S({},l),B=[];p.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var G=0,O=f;G<O.length;G++)for(var ce=O[G],Ne=k.x-ce.x,Xe=k.y-ce.y,qe=0,tt=p.targets.length;qe<tt;qe++){var dt=p.targets[qe],ut=void 0;(ut=_.func(dt)?dt(Ne,Xe,t._proxy,ce,qe):dt)&&B.push({x:(_.number(ut.x)?ut.x:Ne)+ce.x,y:(_.number(ut.y)?ut.y:Xe)+ce.y,range:_.number(ut.range)?ut.range:p.range,source:dt,index:qe,offset:ce})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Et=0;Et<B.length;Et++){var Nt=B[Et],xt=Nt.range,_t=Nt.x-k.x,aa=Nt.y-k.y,Wt=at(_t,aa),da=Wt<=xt;xt===1/0&&mt.inRange&&mt.range!==1/0&&(da=!1),mt.target&&!(da?mt.inRange&&xt!==1/0?Wt/xt<mt.distance/mt.range:xt===1/0&&mt.range!==1/0||Wt<mt.distance:!mt.inRange&&Wt<mt.distance)||(mt.target=Nt,mt.distance=Wt,mt.range=xt,mt.inRange=da,mt.delta.x=_t,mt.delta.y=aa)}return mt.inRange&&(l.x=mt.target.x,l.y=mt.target.y),i.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ir=la(ol,"snap"),Vn={start:function(a){var t=a.state,l=a.edges,i=t.options;if(!l)return null;a.state={options:{targets:null,relativePoints:[{x:l.left?0:1,y:l.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ol.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,l=a.state,i=a.coords,p=l.options,f=l.offsets,m={x:i.x-f[0].x,y:i.y-f[0].y};l.options=S({},p),l.options.targets=[];for(var k=0,B=p.targets||[];k<B.length;k++){var G=B[k],O=void 0;if(O=_.func(G)?G(m.x,m.y,t):G){for(var ce=0,Ne=l.targetFields;ce<Ne.length;ce++){var Xe=Ne[ce],qe=Xe[0],tt=Xe[1];if(qe in O||tt in O){O.x=O[qe],O.y=O[tt];break}}l.options.targets.push(O)}}var dt=ol.set(a);return l.options=p,dt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Br=la(Vn,"snapSize"),rl={aspectRatio:xr,restrictEdges:wr,restrict:Dr,restrictRect:Er,restrictSize:Tr,snapEdges:la({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Vn.start(a)):null},set:Vn.set,defaults:S(ya(Vn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ir,snapSize:Br,spring:An,avoid:An,transform:An,rubberband:An},Ar={id:"modifiers",install:function(a){var t=a.interactStatic;for(var l in a.usePlugin(Ct),a.usePlugin(mr),t.modifiers=rl,rl){var i=rl[l],p=i._defaults,f=i._methods;p._methods=f,a.defaults.perAction[l]=p}}},Nr=Ar,Nl=function(a){b(l,a);var t=J(l);function l(i,p,f,m,k,B){var G;if(u(this,l),C(L(G=t.call(this,k)),f),f!==p&&C(L(G),p),G.timeStamp=B,G.originalEvent=f,G.type=i,G.pointerId=z(p),G.pointerType=re(p),G.target=m,G.currentTarget=null,i==="tap"){var O=k.getPointerIndex(p);G.dt=G.timeStamp-k.pointers[O].downTime;var ce=G.timeStamp-k.tapTime;G.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===G.target&&ce<500}else i==="doubletap"&&(G.dt=p.timeStamp-k.tapTime,G.double=!0);return G}return g(l,[{key:"_subtractOrigin",value:function(i){var p=i.x,f=i.y;return this.pageX-=p,this.pageY-=f,this.clientX-=p,this.clientY-=f,this}},{key:"_addOrigin",value:function(i){var p=i.x,f=i.y;return this.pageX+=p,this.pageY+=f,this.clientX+=p,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),l}(xe),yn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=yn,a.defaults.actions.pointerEvents=yn.defaults,S(a.actions.phaselessTypes,yn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,l=a.pointerInfo;!t&&l.hold||(l.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var l=a.interaction,i=a.pointer,p=a.event,f=a.eventTarget;a.duplicate||l.pointerIsDown&&!l.pointerWasMoved||(l.pointerIsDown&&il(a),Wa({interaction:l,pointer:i,event:p,eventTarget:f,type:"move"},t))},"interactions:down":function(a,t){(function(l,i){for(var p=l.interaction,f=l.pointer,m=l.event,k=l.eventTarget,B=l.pointerIndex,G=p.pointers[B].hold,O=Ge(k),ce={interaction:p,pointer:f,event:m,eventTarget:k,type:"hold",targets:[],path:O,node:null},Ne=0;Ne<O.length;Ne++){var Xe=O[Ne];ce.node=Xe,i.fire("pointerEvents:collect-targets",ce)}if(ce.targets.length){for(var qe=1/0,tt=0,dt=ce.targets;tt<dt.length;tt++){var ut=dt[tt].eventable.options.holdDuration;ut<qe&&(qe=ut)}G.duration=qe,G.timeout=setTimeout(function(){Wa({interaction:p,eventTarget:k,pointer:f,event:m,type:"hold"},i)},qe)}})(a,t),Wa(a,t)},"interactions:up":function(a,t){il(a),Wa(a,t),function(l,i){var p=l.interaction,f=l.pointer,m=l.event,k=l.eventTarget;p.pointerWasMoved||Wa({interaction:p,eventTarget:k,pointer:f,event:m,type:"tap"},i)}(a,t)},"interactions:cancel":function(a,t){il(a),Wa(a,t)}},PointerEvent:Nl,fire:Wa,collectEventTargets:Vl,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 Wa(a,t){var l=a.interaction,i=a.pointer,p=a.event,f=a.eventTarget,m=a.type,k=a.targets,B=k===void 0?Vl(a,t):k,G=new Nl(m,i,p,f,l,t.now());t.fire("pointerEvents:new",{pointerEvent:G});for(var O={interaction:l,pointer:i,event:p,eventTarget:f,targets:B,type:m,pointerEvent:G},ce=0;ce<B.length;ce++){var Ne=B[ce];for(var Xe in Ne.props||{})G[Xe]=Ne.props[Xe];var qe=te(Ne.eventable,Ne.node);if(G._subtractOrigin(qe),G.eventable=Ne.eventable,G.currentTarget=Ne.node,Ne.eventable.fire(G),G._addOrigin(qe),G.immediatePropagationStopped||G.propagationStopped&&ce+1<B.length&&B[ce+1].node!==G.currentTarget)break}if(t.fire("pointerEvents:fired",O),m==="tap"){var tt=G.double?Wa({interaction:l,pointer:i,event:p,eventTarget:f,type:"doubletap"},t):G;l.prevTap=tt,l.tapTime=tt.timeStamp}return G}function Vl(a,t){var l=a.interaction,i=a.pointer,p=a.event,f=a.eventTarget,m=a.type,k=l.getPointerIndex(i),B=l.pointers[k];if(m==="tap"&&(l.pointerWasMoved||!B||B.downTarget!==f))return[];for(var G=Ge(f),O={interaction:l,pointer:i,event:p,eventTarget:f,type:m,path:G,targets:[],node:null},ce=0;ce<G.length;ce++){var Ne=G[ce];O.node=Ne,t.fire("pointerEvents:collect-targets",O)}return m==="hold"&&(O.targets=O.targets.filter(function(Xe){var qe,tt;return Xe.eventable.options.holdDuration===((qe=l.pointers[k])==null||(tt=qe.hold)==null?void 0:tt.duration)})),O.targets}function il(a){var t=a.interaction,l=a.pointerIndex,i=t.pointers[l].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var Vr=Object.freeze({__proto__:null,default:yn});function Or(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Mr={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(yn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Or,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var l=a.interaction,i=a.pointerEvent,p=a.eventTarget,f=a.targets;if(i.type==="hold"&&f.length){var m=f[0].eventable.options.holdRepeatInterval;m<=0||(l.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:l,eventTarget:p,type:"hold",pointer:i,event:i},t)},m))}}})},zr=Mr,Fr={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(i){return S(this.events.options,i),this};var l=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,p){var f=l.call(this,i,p);return f===this&&(this.events.options[i]=p),f}},listeners:{"pointerEvents:collect-targets":function(a,t){var l=a.targets,i=a.node,p=a.type,f=a.eventTarget;t.interactables.forEachMatch(i,function(m){var k=m.events,B=k.options;k.types[p]&&k.types[p].length&&m.testIgnoreAllow(B,i,f)&&l.push({node:i,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(l){return t.getRect(l)}},"interactable:set":function(a,t){var l=a.interactable,i=a.options;S(l.events.options,t.pointerEvents.defaults),S(l.events.options,i.pointerEvents||{})}}},Rr=Fr,Lr={id:"pointer-events",install:function(a){a.usePlugin(Vr),a.usePlugin(zr),a.usePlugin(Rr)}},Pr=Lr,$r={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(l){return function(i,p,f){for(var m=i.getAllElements(),k=f.window.Promise,B=k?[]:null,G=function(){var ce=m[O],Ne=i.getRect(ce);if(!Ne)return 1;var Xe,qe=Ve(f.interactions.list,function(ut){return ut.interacting()&&ut.interactable===i&&ut.element===ce&&ut.prepared.name===p.name});if(qe)qe.move(),B&&(Xe=qe._reflowPromise||new k(function(ut){qe._reflowResolve=ut}));else{var tt=ee(Ne),dt=function(ut){return{coords:ut,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:tt.x,y:tt.y},client:{x:tt.x,y:tt.y},timeStamp:f.now()});Xe=function(ut,mt,Et,Nt,xt){var _t=ut.interactions.new({pointerType:"reflow"}),aa={interaction:_t,event:xt,pointer:xt,eventTarget:Et,phase:"reflow"};_t.interactable=mt,_t.element=Et,_t.prevEvent=xt,_t.updatePointer(xt,xt,Et,!0),Z(_t.coords.delta),Dt(_t.prepared,Nt),_t._doPhase(aa);var Wt=ut.window,da=Wt.Promise,Ea=da?new da(function(Oa){_t._reflowResolve=Oa}):void 0;return _t._reflowPromise=Ea,_t.start(Nt,mt,Et),_t._interacting?(_t.move(aa),_t.end(xt)):(_t.stop(),_t._reflowResolve()),_t.removePointer(xt,xt),Ea}(f,i,ce,p,dt)}B&&B.push(Xe)},O=0;O<m.length&&!G();O++);return B&&k.all(B).then(function(){return i})}(this,l,a)}},listeners:{"interactions:stop":function(a,t){var l=a.interaction;l.pointerType==="reflow"&&(l._reflowResolve&&l._reflowResolve(),function(i,p){i.splice(i.indexOf(p),1)}(t.interactions.list,l))}}},Kr=$r;if(ta.use(La),ta.use(ra),ta.use(Pr),ta.use(pa),ta.use(Nr),ta.use(qa),ta.use(nt),ta.use(vt),ta.use(Kr),ta.default=ta,c(n)==="object"&&n)try{n.exports=ta}catch{}return ta.default=ta,ta})}(wn,wn.exports)),wn.exports}var kd=bd();const no=Ae.getDefaultExportFromCjs(kd),tl=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:r,emit:s}){const o=n,c=s,u=e.inject(qo),y=e.inject(Go);if(!u)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 b=!1,w=!1,I=NaN,L=NaN,J=NaN,M=NaN,Ee=-1,X=-1,K=-1,pe=-1,E=o.x,F=o.y,D=o.w,N=o.h;const _=e.ref(),me=e.reactive({i:e.toRef(o,"i"),state:h,wrapper:_,calcXY:Oe});function Ue(x){Te(x)}function it(){Me()}function Fe(x){fa(o.isDraggable)&&(h.draggable=x)}function We(x){fa(o.isResizable)&&(h.resizable=x)}function _e(x){fa(o.isBounded)&&(h.bounded=x)}function V(x){h.transformScale=x}function le(x){h.rowHeight=x}function ie(x){h.maxRows=x}function ue(){h.rtl=to()==="rtl",Me()}function Ye(x){h.cols=Math.floor(x)}u.increaseItem(me),e.onBeforeMount(()=>{h.rtl=to()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?h.cols=Zo(u.lastBreakpoint,u.cols):h.cols=u.colNum,h.rowHeight=u.rowHeight,h.containerWidth=u.width!==null?u.width:100,h.margin=u.margin!==void 0?u.margin.map(Number):[10,10],h.maxRows=u.maxRows,fa(o.isDraggable)?h.draggable=u.isDraggable:h.draggable=o.isDraggable,fa(o.isResizable)?h.resizable=u.isResizable:h.resizable=o.isResizable,fa(o.isBounded)?h.bounded=u.isBounded:h.bounded=o.isBounded,h.transformScale=u.transformScale,h.useCssTransforms=u.useCssTransforms,h.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{E=o.x,F=o.y,N=o.h,D=o.w,na(Je)}),y.on("updateWidth",Ue),y.on("compact",it),y.on("setDraggable",Fe),y.on("setResizable",We),y.on("setBounded",_e),y.on("setTransformScale",V),y.on("setRowHeight",le),y.on("setMaxRows",ie),y.on("directionchange",ue),y.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{y.off("updateWidth",Ue),y.off("compact",it),y.off("setDraggable",Fe),y.off("setResizable",We),y.off("setBounded",_e),y.off("setTransformScale",V),y.off("setRowHeight",le),y.off("setMaxRows",ie),y.off("directionchange",ue),y.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(me)}),r({state:h,wrapper:_});const ot=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>h.resizable&&!o.static),R=e.computed(()=>u.isMirrored?!h.rtl:h.rtl),ye=e.computed(()=>(h.draggable||h.resizable)&&!o.static),we=pd("item"),je=e.computed(()=>({[we.b()]:!0,[we.bm("resizable")]:Q.value,[we.bm("static")]:o.static,[we.bm("resizing")]:h.isResizing,[we.bm("dragging")]:h.isDragging,[we.bm("transform")]:h.useCssTransforms,[we.bm("rtl")]:R.value,[we.bm("no-touch")]:ot&&ye.value})),$e=e.computed(()=>[we.be("resizer"),R.value&&we.bem("resizer","rtl")].filter(Boolean));e.watch(()=>o.isDraggable,x=>{h.draggable=x}),e.watch(()=>o.static,()=>{na(C),na(Z)}),e.watch(()=>h.draggable,()=>{na(C)}),e.watch(()=>o.isResizable,x=>{h.resizable=x}),e.watch(()=>o.isBounded,x=>{h.bounded=x}),e.watch(()=>h.resizable,()=>{na(Z)}),e.watch(()=>h.rowHeight,()=>{na(Je),na(Ge)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{na(Z),na(Je),na(Ge)}),e.watch([()=>o.minH,()=>o.maxH,()=>o.minW,()=>o.maxW],()=>{na(Z)}),e.watch(R,()=>{na(Z),na(Je)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const x=u.margin;!x||x[0]===h.margin[0]&&x[1]===h.margin[1]||(h.margin=x.map(Number),na(Je),na(Ge))});function Je(){o.x+o.w>h.cols?(E=0,D=o.w>h.cols?h.cols:o.w):(E=o.x,D=o.w);const x=W(E,F,D,N);h.isDragging&&(x.top=h.dragging.top,R.value?x.right=h.dragging.left:x.left=h.dragging.left),h.isResizing&&(x.width=h.resizing.width,x.height=h.resizing.height);let T;h.useCssTransforms?R.value?T=id(x.top,x.right,x.width,x.height):T=rd(x.top,x.left,x.width,x.height):R.value?T=cd(x.top,x.right,x.width,x.height):T=sd(x.top,x.left,x.width,x.height),h.style=T}function Ge(){const x={};for(const T of["width","height"]){const ae=h.style[T].match(/^(\d+)px$/);if(!ae)return;x[T]=ae[1]}c("container-resized",o.i,o.h,o.w,x.height,x.width)}function de(x){if(o.static)return;const T=x.type;if(T==="resizestart"&&h.isResizing||T!=="resizestart"&&!h.isResizing)return;const ae=Zl(x);if(fa(ae))return;const{x:z,y:U}=ae,$={width:0,height:0};let H;switch(T){case"resizestart":{Z(),Ee=D,X=N,H=W(E,F,D,N),$.width=H.width,$.height=H.height,h.resizing=$,h.isResizing=!0;break}case"resizemove":{!x.edges.right&&!x.edges.left&&(J=z),!x.edges.top&&!x.edges.bottom&&(M=U);const De=eo(J,M,z,U);R.value?$.width=h.resizing.width-De.deltaX/h.transformScale:$.width=h.resizing.width+De.deltaX/h.transformScale,$.height=h.resizing.height+De.deltaY/h.transformScale,h.resizing=$;break}case"resizeend":{H=W(E,F,D,N),$.width=H.width,$.height=H.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}H=te($.height,$.width),H.w<o.minW&&(H.w=o.minW),H.w>o.maxW&&(H.w=o.maxW),H.h<o.minH&&(H.h=o.minH),H.h>o.maxH&&(H.h=o.maxH),H.h<1&&(H.h=1),H.w<1&&(H.w=1),J=z,M=U,(D!==H.w||N!==H.h)&&c("resize",o.i,H.h,H.w,$.height,$.width),x.type==="resizeend"&&(Ee!==D||X!==N)&&c("resized",o.i,H.h,H.w,$.height,$.width),y.emit("resizeEvent",x.type,o.i,E,F,H.h,H.w)}function S(x){if(o.static||h.isResizing)return;const T=x.type;if(T==="dragstart"&&h.isDragging||T!=="dragstart"&&!h.isDragging)return;const ae=Zl(x);if(fa(ae))return;const{x:z,y:U}=ae,$=x.target;if(!$.offsetParent)return;const H={top:0,left:0};switch(T){case"dragstart":{K=E,pe=F;const oe=$.offsetParent.getBoundingClientRect(),Y=$.getBoundingClientRect(),re=Y.left/h.transformScale,se=oe.left/h.transformScale,xe=Y.right/h.transformScale,Se=oe.right/h.transformScale,Ie=Y.top/h.transformScale,q=oe.top/h.transformScale;R.value?H.left=(xe-Se)*-1:H.left=re-se,H.top=Ie-q,h.dragging=H,h.isDragging=!0;break}case"dragmove":{const oe=eo(I,L,z,U);if(R.value?H.left=h.dragging.left-oe.deltaX/h.transformScale:H.left=h.dragging.left+oe.deltaX/h.transformScale,H.top=h.dragging.top+oe.deltaY/h.transformScale,h.bounded){const Y=$.offsetParent.clientHeight-ee(o.h,h.rowHeight,h.margin[1]);H.top=j(H.top,0,Y);const re=be(),se=h.containerWidth-ee(o.w,re,h.margin[0]);H.left=j(H.left,0,se)}h.dragging=H;break}case"dragend":{const oe=$.offsetParent.getBoundingClientRect(),Y=$.getBoundingClientRect(),re=Y.left/h.transformScale,se=oe.left/h.transformScale,xe=Y.right/h.transformScale,Se=oe.right/h.transformScale,Ie=Y.top/h.transformScale,q=oe.top/h.transformScale;R.value?H.left=(xe-Se)*-1:H.left=re-se,H.top=Ie-q,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let De;R.value,De=Oe(H.top,H.left),I=z,L=U,(E!==De.x||F!==De.y)&&c("move",o.i,De.x,De.y),x.type==="dragend"&&(K!==E||pe!==F)&&c("moved",o.i,De.x,De.y),y.emit("dragEvent",x.type,o.i,De.x,De.y,N,D)}function W(x,T,ae,z){const U=be();let $;return R.value?$={right:Math.round(U*x+(x+1)*h.margin[0]),top:Math.round(h.rowHeight*T+(T+1)*h.margin[1]),width:ae===1/0?ae:Math.round(U*ae+Math.max(0,ae-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])}:$={left:Math.round(U*x+(x+1)*h.margin[0]),top:Math.round(h.rowHeight*T+(T+1)*h.margin[1]),width:ae===1/0?ae:Math.round(U*ae+Math.max(0,ae-1)*h.margin[0]),height:z===1/0?z:Math.round(h.rowHeight*z+Math.max(0,z-1)*h.margin[1])},$}function Oe(x,T){const ae=be();let z=Math.round((T-h.margin[0])/(ae+h.margin[0])),U=Math.round((x-h.margin[1])/(h.rowHeight+h.margin[1]));return z=Math.max(Math.min(z,h.cols-D),0),U=Math.max(Math.min(U,h.maxRows-N),0),{x:z,y:U}}function be(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ee(x,T,ae){return Number.isFinite(x)?Math.round(T*x+Math.max(0,x-1)*ae):x}function j(x,T,ae){return Math.max(Math.min(x,ae),T)}function te(x,T,ae=!1){const z=be();let U=Math.round((T+h.margin[0])/(z+h.margin[0])),$=0;return ae?$=Math.ceil((x+h.margin[1])/(h.rowHeight+h.margin[1])):$=Math.round((x+h.margin[1])/(h.rowHeight+h.margin[1])),U=Math.max(Math.min(U,h.cols-E),0),$=Math.max(Math.min($,h.maxRows-F),0),{w:U,h:$}}function Te(x,T){h.containerWidth=x}function Me(){Je()}function at(){!g.value&&_.value&&(g.value=no(_.value),h.useStyleCursor||g.value.styleCursor(!1))}const v=Yl(S);function C(){if(at(),!!g.value)if(h.draggable&&!o.static){const x={ignoreFrom:o.dragIgnoreFrom,allowFrom:o.dragAllowFrom,...o.dragOption};g.value.draggable(x),b||(b=!0,g.value.on("dragstart dragmove dragend",T=>{T.type==="dragmove"?v(T):S(T)}))}else g.value.draggable({enabled:!1})}const P=Yl(de);function Z(){if(at(),!!g.value)if(h.resizable&&!o.static){const x=W(0,0,o.maxW,o.maxH),T=W(0,0,o.minW,o.minH),ae={edges:{left:R.value?`.${$e.value[0]}`:!1,right:R.value?!1:`.${$e.value[0]}`,bottom:`.${$e.value[0]}`,top:!1},ignoreFrom:o.resizeIgnoreFrom,restrictSize:{min:{height:T.height*h.transformScale,width:T.width*h.transformScale},max:{height:x.height*h.transformScale,width:x.width*h.transformScale}},...o.resizeOption};o.preserveAspectRatio&&(ae.modifiers=[no.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(ae),w||(w=!0,g.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?P(z):de(z)}))}else g.value.resizable({enabled:!1})}return(x,T)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:_,class:e.normalizeClass(je.value),style:e.normalizeStyle(h.style)},[e.renderSlot(x.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass($e.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ln=typeof window<"u";var lo;ln&&(lo=window==null?void 0:window.navigator)!=null&&lo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function oo(n){return n!=null}function ro(){}const xd=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(xd)));const Dd=ln&&("ontouchstart"in window||Cd()>0),wd=Dd?"pointerdown":"click";function Cd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Ed(n,r,s=window.Event){const{type:o,bubbles:c=!1,cancelable:u=!1,...y}=r;if(!oo(o)||o==="")return!1;let g;return oo(s)?g=new s(o,{bubbles:c,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(o,c,u)),Object.assign(g,y),n.dispatchEvent(g)}const _d="clickoutside",Sd=new Set;ln&&document.addEventListener(wd,n=>{const r=n.target,s=n.composedPath&&n.composedPath();Sd.forEach(o=>{o!==r&&(s?!s.includes(o):!o.contains(r))&&(!o.__transferElement||o.__transferElement!==r&&!o.__transferElement.contains(r))&&Ed(o,{type:_d})})},!0);const Td=[["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 Kn;if(ln){for(const n of Td)if(n[1]in document){Kn=n;break}}e.computed(()=>!1);const Id=new Set,Bd=new WeakMap;if(ln&&Kn){const n=Kn[2],r=Kn[4];document.addEventListener(r,()=>{if(Id.forEach(s=>{s.value=!1}),document[n]){const s=Bd.get(document[n]);s&&(s.value=!0)}},!1)}const tr=new Map;tr.set("x",0);tr.set("y",0);var an=[],Ad=function(){return an.some(function(n){return n.activeTargets.length>0})},Nd=function(){return an.some(function(n){return n.skippedTargets.length>0})},io="ResizeObserver loop completed with undelivered notifications.",Vd=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:io}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=io),window.dispatchEvent(n)},Tn;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Tn||(Tn={}));var nn=function(n){return Object.freeze(n)},Od=function(){function n(r,s){this.inlineSize=r,this.blockSize=s,nn(this)}return n}(),ar=function(){function n(r,s,o,c){return this.x=r,this.y=s,this.width=o,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,nn(this)}return n.prototype.toJSON=function(){var r=this,s=r.x,o=r.y,c=r.top,u=r.right,y=r.bottom,g=r.left,h=r.width,b=r.height;return{x:s,y:o,top:c,right:u,bottom:y,left:g,width:h,height:b}},n.fromRect=function(r){return new n(r.x,r.y,r.width,r.height)},n}(),El=function(n){return n instanceof SVGElement&&"getBBox"in n},nr=function(n){if(El(n)){var r=n.getBBox(),s=r.width,o=r.height;return!s&&!o}var c=n,u=c.offsetWidth,y=c.offsetHeight;return!(u||y||n.getClientRects().length)},so=function(n){var r;if(n instanceof Element)return!0;var s=(r=n==null?void 0:n.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(s&&n instanceof s.Element)},Md=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Sn=typeof window<"u"?window:{},Fn=new WeakMap,co=/auto|scroll/,zd=/^tb|vertical/,Fd=/msie|trident/i.test(Sn.navigator&&Sn.navigator.userAgent),Aa=function(n){return parseFloat(n||"0")},fn=function(n,r,s){return n===void 0&&(n=0),r===void 0&&(r=0),s===void 0&&(s=!1),new Od((s?r:n)||0,(s?n:r)||0)},uo=nn({devicePixelContentBoxSize:fn(),borderBoxSize:fn(),contentBoxSize:fn(),contentRect:new ar(0,0,0,0)}),lr=function(n,r){if(r===void 0&&(r=!1),Fn.has(n)&&!r)return Fn.get(n);if(nr(n))return Fn.set(n,uo),uo;var s=getComputedStyle(n),o=El(n)&&n.ownerSVGElement&&n.getBBox(),c=!Fd&&s.boxSizing==="border-box",u=zd.test(s.writingMode||""),y=!o&&co.test(s.overflowY||""),g=!o&&co.test(s.overflowX||""),h=o?0:Aa(s.paddingTop),b=o?0:Aa(s.paddingRight),w=o?0:Aa(s.paddingBottom),I=o?0:Aa(s.paddingLeft),L=o?0:Aa(s.borderTopWidth),J=o?0:Aa(s.borderRightWidth),M=o?0:Aa(s.borderBottomWidth),Ee=o?0:Aa(s.borderLeftWidth),X=I+b,K=h+w,pe=Ee+J,E=L+M,F=g?n.offsetHeight-E-n.clientHeight:0,D=y?n.offsetWidth-pe-n.clientWidth:0,N=c?X+pe:0,_=c?K+E:0,me=o?o.width:Aa(s.width)-N-D,Ue=o?o.height:Aa(s.height)-_-F,it=me+X+D+pe,Fe=Ue+K+F+E,We=nn({devicePixelContentBoxSize:fn(Math.round(me*devicePixelRatio),Math.round(Ue*devicePixelRatio),u),borderBoxSize:fn(it,Fe,u),contentBoxSize:fn(me,Ue,u),contentRect:new ar(I,h,me,Ue)});return Fn.set(n,We),We},or=function(n,r,s){var o=lr(n,s),c=o.borderBoxSize,u=o.contentBoxSize,y=o.devicePixelContentBoxSize;switch(r){case Tn.DEVICE_PIXEL_CONTENT_BOX:return y;case Tn.BORDER_BOX:return c;default:return u}},Rd=function(){function n(r){var s=lr(r);this.target=r,this.contentRect=s.contentRect,this.borderBoxSize=nn([s.borderBoxSize]),this.contentBoxSize=nn([s.contentBoxSize]),this.devicePixelContentBoxSize=nn([s.devicePixelContentBoxSize])}return n}(),rr=function(n){if(nr(n))return 1/0;for(var r=0,s=n.parentNode;s;)r+=1,s=s.parentNode;return r},Ld=function(){var n=1/0,r=[];an.forEach(function(u){if(u.activeTargets.length!==0){var y=[];u.activeTargets.forEach(function(g){var h=new Rd(g.target),b=rr(g.target);y.push(h),g.lastReportedSize=or(g.target,g.observedBox),b<n&&(n=b)}),r.push(function(){u.callback.call(u.observer,y,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,o=r;s<o.length;s++){var c=o[s];c()}return n},po=function(n){an.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(s){s.isActive()&&(rr(s.target)>n?r.activeTargets.push(s):r.skippedTargets.push(s))})})},Pd=function(){var n=0;for(po(n);Ad();)n=Ld(),po(n);return Nd()&&Vd(),n>0},ul,ir=[],$d=function(){return ir.splice(0).forEach(function(n){return n()})},Kd=function(n){if(!ul){var r=0,s=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return $d()}).observe(s,o),ul=function(){s.textContent="".concat(r?r--:r++)}}ir.push(n),ul()},jd=function(n){Kd(function(){requestAnimationFrame(n)})},jn=0,Ud=function(){return!!jn},Wd=250,Hd={attributes:!0,characterData:!0,childList:!0,subtree:!0},fo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ho=function(n){return n===void 0&&(n=0),Date.now()+n},pl=!1,qd=function(){function n(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return n.prototype.run=function(r){var s=this;if(r===void 0&&(r=Wd),!pl){pl=!0;var o=ho(r);jd(function(){var c=!1;try{c=Pd()}finally{if(pl=!1,r=o-ho(),!Ud())return;c?s.run(1e3):r>0?s.run(r):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var r=this,s=function(){return r.observer&&r.observer.observe(document.body,Hd)};document.body?s():Sn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),fo.forEach(function(s){return Sn.addEventListener(s,r.listener,!0)}))},n.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),fo.forEach(function(s){return Sn.removeEventListener(s,r.listener,!0)}),this.stopped=!0)},n}(),gl=new qd,vo=function(n){!jn&&n>0&&gl.start(),jn+=n,!jn&&gl.stop()},Gd=function(n){return!El(n)&&!Md(n)&&getComputedStyle(n).display==="inline"},Xd=function(){function n(r,s){this.target=r,this.observedBox=s||Tn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var r=or(this.target,this.observedBox,!0);return Gd(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},n}(),Yd=function(){function n(r,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=s}return n}(),Rn=new WeakMap,go=function(n,r){for(var s=0;s<n.length;s+=1)if(n[s].target===r)return s;return-1},Ln=function(){function n(){}return n.connect=function(r,s){var o=new Yd(r,s);Rn.set(r,o)},n.observe=function(r,s,o){var c=Rn.get(r),u=c.observationTargets.length===0;go(c.observationTargets,s)<0&&(u&&an.push(c),c.observationTargets.push(new Xd(s,o&&o.box)),vo(1),gl.schedule())},n.unobserve=function(r,s){var o=Rn.get(r),c=go(o.observationTargets,s),u=o.observationTargets.length===1;c>=0&&(u&&an.splice(an.indexOf(o),1),o.observationTargets.splice(c,1),vo(-1))},n.disconnect=function(r){var s=this,o=Rn.get(r);o.observationTargets.slice().forEach(function(c){return s.unobserve(r,c.target)}),o.activeTargets.splice(0,o.activeTargets.length)},n}(),Jd=function(){function n(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ln.connect(this,r)}return n.prototype.observe=function(r,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.observe(this,r,s)},n.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.unobserve(this,r)},n.prototype.disconnect=function(){Ln.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const al=new WeakMap;function Qd(n){var r;for(let s=0,o=n.length;s<o;++s){const c=n[s],u=al.get(c.target);if(typeof u=="function"){const{inlineSize:y,blockSize:g}=((r=c.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:h,offsetHeight:b}=c.target;u(Object.assign(c,{offsetWidth:h,offsetHeight:b,width:y??h,height:g??b}))}}}const sr=new(ln&&window.ResizeObserver||Jd)(Qd);function mo(n,r){al.set(n,r),sr.observe(n)}function yo(n){al.has(n)&&(sr.unobserve(n),al.delete(n))}function Zd(n={}){let r=ro;const s=e.watch(()=>e.unref(n.target),c=>{r(),!(!c||typeof n.onResize!="function")&&(mo(c,n.onResize),r=()=>{yo(c),r=ro})},{immediate:!0}),o=()=>{s(),r()};return e.getCurrentScope()&&e.onScopeDispose(o),{observeResize:mo,unobserveResize:yo,unobserve:o}}const ef=e.ref(!1);e.computed(()=>ef.value);const bo="__theme_style__",dl="__theme_observer__",ko=e.reactive(new Map),xo=new Map;e.watch(ko,()=>{if(!ln)return;xo.clear();const n=document.head.querySelector(`#${bo}`);n&&document.head.removeChild(n);const r=document.createElement("style");let s=`.${dl} { width: 1px }`,o=1;for(const[c,[u,y]]of ko.entries())s+=` html.${u} .${dl}, .${y} .${dl} { width: ${++o}px }`,xo.set(o,c);r.textContent=s,r.id=bo,document.head.appendChild(r)});const cr=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:r,emit:s}){const o=n,c=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),y=new Map,g=e.ref(o.layout),h=e.ref(),{observeResize:b,unobserveResize:w}=Zd(),I=Zp();I.on("resizeEvent",L),I.on("dragEvent",J),e.onBeforeMount(()=>{c("layout-before-mount",g.value)}),e.onMounted(()=>{c("layout-mounted",g.value),e.nextTick(()=>{ud(g.value),u.originalLayout=g.value,e.nextTick(()=>{Ue(),h.value&&b(h.value,ed(E,16)),un(g.value,o.verticalCompact),c("layout-updated",g.value),pe(),E()})})}),e.onBeforeUnmount(()=>{I.clearAll(),h.value&&w(h.value)});function L(Fe,We,_e,V,le,ie){_(Fe,We,_e,V,le,ie)}function J(Fe,We,_e,V,le,ie){N(Fe,We,_e,V,le,ie)}e.watch(()=>u.width,(Fe,We)=>{e.nextTick(()=>{I.emit("updateWidth",Fe),We===-1&&e.nextTick(()=>{c("layout-ready",g.value)}),pe()})}),e.watch(()=>[o.layout,o.layout.length],()=>{g.value=o.layout,K()}),e.watch(()=>o.colNum,Fe=>{I.emit("setColNum",Fe)}),e.watch(()=>o.rowHeight,Fe=>{I.emit("setRowHeight",Fe)}),e.watch(()=>o.isDraggable,Fe=>{I.emit("setDraggable",Fe)}),e.watch(()=>o.isResizable,Fe=>{I.emit("setResizable",Fe)}),e.watch(()=>o.isBounded,Fe=>{I.emit("setBounded",Fe)}),e.watch(()=>o.transformScale,Fe=>{I.emit("setTransformScale",Fe)}),e.watch(()=>o.responsive,Fe=>{Fe||(c("update:layout",u.originalLayout),I.emit("setColNum",o.colNum)),E()}),e.watch(()=>o.maxRows,Fe=>{I.emit("setMaxRows",Fe)}),e.watch([()=>o.margin,()=>o.margin[1]],pe),e.provide(qo,e.reactive({...e.toRefs(o),...e.toRefs(u),increaseItem:M,decreaseItem:Ee})),e.provide(Go,I),r({state:u,getItem:X,resizeEvent:_,dragEvent:N,layoutUpdate:K});function M(Fe){y.set(Fe.i,Fe)}function Ee(Fe){y.delete(Fe.i)}function X(Fe){return y.get(Fe)}function K(){if(!fa(g.value)&&!fa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Fe=it(g.value,u.originalLayout);if(Fe.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Fe);else{const We=new Set(Fe.map(_e=>_e.i));u.originalLayout=u.originalLayout.filter(_e=>!We.has(_e.i))}u.lastLayoutLength=g.value.length,Ue()}un(g.value,o.verticalCompact),I.emit("updateWidth",u.width),pe(),c("layout-updated",g.value)}}function pe(){u.mergedStyle={height:F()}}function E(){h.value&&(u.width=h.value.offsetWidth),I.emit("resizeEvent")}function F(){if(!o.autoSize)return;const Fe=parseFloat(o.margin[1]);return ad(g.value)*(o.rowHeight+Fe)+Fe+"px"}let D;function N(Fe,We,_e,V,le,ie){let ue=Jl(g.value,We);fa(ue)&&(ue={h:0,w:0,x:0,y:0,i:""}),Fe==="dragstart"&&!o.verticalCompact&&(D=g.value.reduce((Ye,{i:ot,x:Q,y:R})=>({...Ye,[ot]:{x:Q,y:R}}),{})),Fe==="dragmove"||Fe==="dragstart"?(u.placeholder.i=We,u.placeholder.x=ue.x,u.placeholder.y=ue.y,u.placeholder.w=ie,u.placeholder.h=le,e.nextTick(()=>{u.isDragging=!0}),I.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=vl(g.value,ue,_e,V,!0,o.preventCollision),o.restoreOnDrag?(ue.static=!0,un(g.value,o.verticalCompact,D),ue.static=!1):un(g.value,o.verticalCompact),I.emit("compact"),pe(),Fe==="dragend"&&(D=void 0,c("layout-updated",g.value))}function _(Fe,We,_e,V,le,ie){let ue=Jl(g.value,We);fa(ue)&&(ue={h:0,w:0,x:0,y:0,i:""});let Ye;if(o.preventCollision){const ot=Yo(g.value,{...ue,w:ie,h:le}).filter(Q=>Q.i!==ue.i);if(Ye=ot.length>0,Ye){let Q=1/0,R=1/0;ot.forEach(ye=>{ye.x>ue.x&&(Q=Math.min(Q,ye.x)),ye.y>ue.y&&(R=Math.min(R,ye.y))}),Number.isFinite(Q)&&(ue.w=Q-ue.x),Number.isFinite(R)&&(ue.h=R-ue.y)}}Ye||(ue.w=ie,ue.h=le),Fe==="resizestart"||Fe==="resizemove"?(u.placeholder.i=We,u.placeholder.x=_e,u.placeholder.y=V,u.placeholder.w=ue.w,u.placeholder.h=ue.h,e.nextTick(()=>{u.isDragging=!0}),I.emit("updateWidth",u.width)):Fe&&e.nextTick(()=>{u.isDragging=!1}),o.responsive&&me(),un(g.value,o.verticalCompact),I.emit("compact"),pe(),Fe==="resizeend"&&c("layout-updated",g.value)}function me(){const Fe=hd(o.breakpoints,u.width);if(Fe===u.lastBreakpoint)return;const We=Zo(Fe,o.cols);!fa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=hl(g.value));const _e=vd(u.originalLayout,u.layouts,o.breakpoints,Fe,u.lastBreakpoint,We,o.verticalCompact);u.layouts[Fe]=_e,u.lastBreakpoint!==Fe&&c("breakpoint-changed",Fe,_e),g.value=_e,c("update:layout",_e),u.lastBreakpoint=Fe,I.emit("setColNum",We)}function Ue(){u.layouts=Object.assign({},o.responsiveLayouts)}function it(Fe,We){const _e=new Set(We.map(ue=>ue.i)),V=new Set(Fe.map(ue=>ue.i)),le=Fe.filter(ue=>!_e.has(ue.i)),ie=We.filter(ue=>!V.has(ue.i));return le.concat(ie)}return(Fe,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Fe.$slots.default?e.renderSlot(Fe.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,_e=>(e.openBlock(),e.createBlock(tl,e.mergeProps({key:_e.i,ref_for:!0},_e),{default:e.withCtx(()=>[e.renderSlot(Fe.$slots,"item",{item:_e})]),_:2},1040))),128)),e.withDirectives(e.createVNode(tl,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const tf={key:0,class:"item-view-group"},af={key:0,class:"item-view-group"},nf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:r}){const s=jt.useModelComp(d.pinia),{isEdit:o}=d.storeToRefs(s),c=r,u=n,y=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var L,J,M,Ee;return((L=u==null?void 0:u.children)==null?void 0:L.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(Ee=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:Ee.layout:"vertical"}),h=e.computed(()=>{var L,J;return((J=(L=u==null?void 0:u.children)==null?void 0:L[0])==null?void 0:J.isGridLayout)||!1}),b=e.ref((u==null?void 0:u.level)+1),w=L=>{c("rowClick",L)},I=(L,J)=>{c("routeUrl",L,J)};return(L,J)=>h.value?(e.openBlock(),e.createBlock(e.unref(cr),{key:0,layout:y.value,"onUpdate:layout":J[0]||(J[0]=M=>y.value=M),"is-draggable":e.unref(o)==="edit","is-resizable":e.unref(o)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(M,Ee)=>(e.openBlock(),e.createBlock(e.unref(tl),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var X,K,pe,E,F,D,N,_,me,Ue,it,Fe,We;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Ee===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((pe=(K=M==null?void 0:M.component)==null?void 0:K.comp)==null?void 0:pe.toUpperCase())!=="TABLE"&&((E=M==null?void 0:M.component)!=null&&E.name)?(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(b.value.toString())-1)*12+"px",fontWeight:600-(b.value-1)*100>=400?600-(b.value-1)*100:400,fontSize:17-b.value>=14?17-b.value+"px":"14px"})},e.toDisplayString((F=M==null?void 0:M.component)==null?void 0:F.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Yn)((D=M==null?void 0:M.component)==null?void 0:D.comp)),{pageLayout:g.value,config:{showIndex:(N=e.unref(ct)[Ee])==null?void 0:N.showIndex,allowMove:(_=e.unref(ct)[Ee])==null?void 0:_.allowMove,viewport:(me=e.unref(ct)[Ee])==null?void 0:me.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(wl),itemData:(Ue=M==null?void 0:M.component)==null?void 0:Ue.compData,childItemData:(it=M==null?void 0:M.component)==null?void 0:it.itemChildData,key:e.unref(hn),cacheNewData:e.unref(Jn),onChange:e.unref(Qn),index:(M==null?void 0:M.id)??Ee,onContentChange:e.unref(Zn),onPageChange:e.unref(el),parentTableId:(Fe=M==null?void 0:M.component)==null?void 0:Fe.tableId,allMapContents:e.unref(Xn),children:(We=M==null?void 0:M.component)==null?void 0:We.children,level:b.value,onRowClick:w,onRouteUrl:I,onClickTrigger:e.unref(Po),onClickMainKey:e.unref($o)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,Ee)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(Ee)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=M==null?void 0:M.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",af,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(b.value.toString())>1?"12px":"0px",fontWeight:600-(b.value-1)*100>=400?600-(b.value-1)*100:400,fontSize:17-b.value>=14?17-b.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Yn)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(hn),onChange:e.unref(Qn),index:(M==null?void 0:M.id)??Ee,onContentChange:e.unref(Zn),onPageChange:e.unref(el),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(Xn),children:M==null?void 0:M.children,level:b.value,onRowClick:w,onRouteUrl:I},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),lf=Pt._export_sfc(nf,[["__scopeId","data-v-c498af99"]]),ur=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"}]),of={TABLE:xn.ssTable,FORM:Ll,TABLEOPERATE:ps,TABLESTYLE:Ss,TABLEEXTEND:Is,TABLEINTERACTION:Ns,FORMOPERATE:Pl,FOLD:sc,CALCULATOR:hc,METHODBUTTON:Ic,AVATARUPLOAD:Fl.ssAvatar,SIGNATURE:Fl.ssSignature,FORMTOP:Ll,STEP:$c,STEPOPERATE:Zs,TIMELINE:qc,TIMELINEOPERATE:oc,FORMTOPOPERATE:Pl,SIGNATUREOPERATE:Rc,AVATARUPLOADOPERATE:Nc,TABS:Yc,TABSOPERATE:Mu,CHART:Xu,CHARTOPERATE:rp,LAYOUT:$p,LAYOUTOPERATE:Yp,PARENTITEM:lf};function on(n){return of[n==null?void 0:n.toUpperCase()]||null}exports.De=cr;exports._sfc_main=Vo;exports.activeStepInfo=pn;exports.affixItems=Dp;exports.allMapContents=Xn;exports.cacheNewData=Jn;exports.checkForTableContents=Cc;exports.checkIsQuote=bc;exports.checkIsShowGroup=vc;exports.checkIsShowGroupForm=yc;exports.checkIsShowTable=Dc;exports.checkIsTableCheck=mc;exports.checkIsUsingGroup=gc;exports.clickMainKey=$o;exports.clickSavePage=xp;exports.clickStep=jo;exports.clickTrigger=Po;exports.compId=hn;exports.compNames=wl;exports.compShow=Gn;exports.contentTransArray=Dn;exports.contentTransArrayToAll=Cn;exports.contentTransArrayToAllNoExtra=Wn;exports.debounce=ml;exports.existLayouts=Ap;exports.formToExtraContent=wc;exports.generateLayouts=ws;exports.getComponent=on;exports.getComponents=Yn;exports.getExtraContents=_c;exports.getSliceContLength=zp;exports.gridRowHeight=ys;exports.isStepLayout=Cl;exports.isUndefined=Co;exports.newContentTransArrayToAllNoExtra=xc;exports.onBack=bp;exports.onChange=Qn;exports.onClick=kp;exports.onContentChange=Zn;exports.onExtendTaskEnd=Bp;exports.onPageBack=Vp;exports.onPageChange=el;exports.onSelectFixContent=yp;exports.renderShowItems=Fo;exports.selectFilterItem=Zt;exports.setComponent=Oo;exports.showItems=ct;exports.sliceTableLength=Ro;exports.slotContent=ur;exports.ssMenu=Hn;exports.st=tl;exports.stepItems=Fp;exports.toNumber=fl;exports.toolBar=Fa;exports.verifyButton=Op;
|